client

package
v1.0.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2023 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(req *http.Request, token string) ([]byte, error)

func GetRequest

func GetRequest(endpoint, relativePath string, token string, params map[string]string) ([]byte, error)

GetRequest http get request

func PostRequest

func PostRequest(endpoint, relativePath string, token string, params interface{}) ([]byte, error)

PostRequest http post request

Types

type BalanceInfo

type BalanceInfo struct {
	Address string `json:"address"`
	Amount  string `json:"amount"`
}

type ChangeBeneficiaryRequest

type ChangeBeneficiaryRequest struct {
	BaseParams             buildmessage.BaseParams `json:"base_params"`
	MinerId                string                  `json:"miner_id"`
	BeneficiaryAddress     string                  `json:"beneficiary_address"`
	Quota                  string                  `json:"quota"`
	Expiration             string                  `json:"expiration"`
	OverwritePendingChange bool                    `json:"overwrite_pending_change"`
}

type ChangeOwnerRequest

type ChangeOwnerRequest struct {
	BaseParams buildmessage.BaseParams `json:"base_params"`
	MinerId    string                  `json:"miner_id"`
	NewOwner   string                  `json:"new_owner"`
	From       string                  `json:"from"`
}

type ChangeWorkerRequest

type ChangeWorkerRequest struct {
	BaseParams      buildmessage.BaseParams `json:"base_params"`
	MinerId         string                  `json:"miner_id"`
	NewWorker       string                  `json:"new_worker"`
	NewControlAddrs []string                `json:"new_controlAddrs"`
}

type ConfirmChangeBeneficiaryRequest

type ConfirmChangeBeneficiaryRequest struct {
	BaseParams buildmessage.BaseParams `json:"base_params"`
	MinerId    string                  `json:"miner_id"`
}

type ConfirmChangeWorkerRequest

type ConfirmChangeWorkerRequest struct {
	BaseParams buildmessage.BaseParams `json:"base_params"`
	MinerId    string                  `json:"miner_id"`
	NewWorker  string                  `json:"new_worker"`
}

type CreateWalletRequest

type CreateWalletRequest struct {
	Index int `json:"index"`
}

type CreateWalletResponse

type CreateWalletResponse struct {
	NewWalletAddrs []string `json:"new_wallet_addrs"`
}

type DecodeRequest

type DecodeRequest struct {
	ToAddr   string `json:"to_addr"`
	Method   uint64 `json:"method"`
	Params   string `json:"params"`
	Encoding string `json:"encoding"`
}

type DecodeResponse

type DecodeResponse struct {
	DecodeMsg string `json:"decode_msg"`
}

type EncodeRequest

type EncodeRequest struct {
	Dest     string `json:"dest"`
	Method   uint64 `json:"method"`
	Params   string `json:"params"`
	Encoding string `json:"encoding"`
}

type EncodeResponse

type EncodeResponse struct {
	EncodeMsg string `json:"encode_msg"`
}

type HistoryResponse

type HistoryResponse struct {
	Version    uint64 `json:"version"`
	To         string `json:"to"`
	From       string `json:"from"`
	Nonce      uint64 `json:"nonce"`
	Value      int64  `json:"value"`
	GasLimit   int64  `json:"gas_limit"`
	GasFeeCap  int64  `json:"gas_feecap"`
	GasPremium int64  `json:"gas_premium"`
	Method     uint64 `json:"method"`
	Params     string `json:"params"`
	TxCid      string `json:"tx_cid"`
	TxState    string `json:"tx_state"`
}

type LoginInfo

type LoginInfo struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
	Token   string `json:"token"`
}

type LoginRequest

type LoginRequest struct {
	LoginPassword string `json:"login_password"`
}

type LotusClient

type LotusClient struct {
	Api    api.FullNode
	Closer jsonrpc.ClientCloser
}

func NewLotusClient

func NewLotusClient(nodeEndpoint, nodeToken string) (*LotusClient, error)

type LotusResponse

type LotusResponse struct {
	Jsonrpc string      `json:"jsonrpc"`
	Result  interface{} `json:"result"`
	Id      int         `json:"id"`
	Error   interface{} `json:"error"`
}

type Meta

type Meta struct {
	ID      string `json:"id,omitempty"`
	Address string `json:"address,omitempty"`
	Balance string `json:"balance,omitempty"`
}

type Method

type Method string
const StateSearchMsg Method = "Filecoin.StateSearchMsg"

type MinerControl

type MinerControl struct {
	Owner            Meta   `json:"owner"`
	Beneficiary      Meta   `json:"beneficiary"`
	Worker           Meta   `json:"worker"`
	NewWorker        *Meta  `json:"new_worker,omitempty"`
	ControlAddresses []Meta `json:"control_addresses"`
}

type MsgLookup

type MsgLookup struct {
	Message   cid.Cid
	Receipt   types.MessageReceipt
	ReturnDec interface{}
	TipSet    types.TipSetKey
	Height    abi.ChainEpoch
}

func LotusStateSearchMsg

func LotusStateSearchMsg(rpcAddr, token string, msgCidStr string) (*MsgLookup, error)

type MsigAddRequest

type MsigAddRequest struct {
	MsigAddress string `json:"msig_address"`
}

type MsigAddSignerApprovRequest

type MsigAddSignerApprovRequest struct {
	BaseParams        buildmessage.BaseParams `json:"base_params"`
	From              string                  `json:"from"`
	MsigAddress       string                  `json:"msig_address"`
	ProposerAddress   string                  `json:"proposer_address"`
	TxId              string                  `json:"tx_id"`
	SignerAddress     string                  `json:"signer_address"`
	IncreaseThreshold bool                    `json:"increase_threshold"`
}

type MsigAddSignerCancelRequest

type MsigAddSignerCancelRequest struct {
	BaseParams        buildmessage.BaseParams `json:"base_params"`
	From              string                  `json:"from"`
	MsigAddress       string                  `json:"msig_address"`
	TxId              string                  `json:"tx_id"`
	SignerAddress     string                  `json:"signer_address"`
	IncreaseThreshold bool                    `json:"increase_threshold"`
}

type MsigAddSignerProposeRequest

type MsigAddSignerProposeRequest struct {
	BaseParams        buildmessage.BaseParams `json:"base_params"`
	From              string                  `json:"from"`
	MsigAddress       string                  `json:"msig_address"`
	SignerAddress     string                  `json:"signer_address"`
	IncreaseThreshold bool                    `json:"increase_threshold"`
}

type MsigBaseRequest

type MsigBaseRequest struct {
	BaseParams  buildmessage.BaseParams `json:"base_params"`
	From        string                  `json:"from"`
	MsigAddress string                  `json:"msig_address"`
	TxId        string                  `json:"tx_id"`
}

type MsigChangeBeneficiaryApproveRequest

type MsigChangeBeneficiaryApproveRequest struct {
	BaseParams         buildmessage.BaseParams `json:"base_params"`
	From               string                  `json:"from"`
	MsigAddress        string                  `json:"msig_address"`
	ProposerAddress    string                  `json:"proposer_address"`
	TxId               string                  `json:"tx_id"`
	MinerId            string                  `json:"miner_id"`
	BeneficiaryAddress string                  `json:"beneficiary_address"`
	Quota              string                  `json:"quota"`
	Expiration         string                  `json:"expiration"`
}

type MsigChangeBeneficiaryProposeRequest

type MsigChangeBeneficiaryProposeRequest struct {
	BaseParams             buildmessage.BaseParams `json:"base_params"`
	From                   string                  `json:"from"`
	MsigAddress            string                  `json:"msig_address"`
	MinerId                string                  `json:"miner_id"`
	BeneficiaryAddress     string                  `json:"beneficiary_address"`
	Quota                  string                  `json:"quota"`
	Expiration             string                  `json:"expiration"`
	OverwritePendingChange bool                    `json:"overwrite_pending_change"`
}

type MsigChangeOwnerApproveRequest

type MsigChangeOwnerApproveRequest struct {
	BaseParams      buildmessage.BaseParams `json:"base_params"`
	From            string                  `json:"from"`
	MsigAddress     string                  `json:"msig_address"`
	ProposerAddress string                  `json:"proposer_address"`
	TxId            string                  `json:"tx_id"`
	MinerId         string                  `json:"miner_id"`
	NewOwner        string                  `json:"new_owner"`
}

type MsigChangeOwnerProposeRequest

type MsigChangeOwnerProposeRequest struct {
	BaseParams  buildmessage.BaseParams `json:"base_params"`
	From        string                  `json:"from"`
	MsigAddress string                  `json:"msig_address"`
	MinerId     string                  `json:"miner_id"`
	NewOwner    string                  `json:"new_owner"`
}

type MsigChangeWorkerApproveRequest

type MsigChangeWorkerApproveRequest struct {
	BaseParams      buildmessage.BaseParams `json:"base_params"`
	From            string                  `json:"from"`
	MsigAddress     string                  `json:"msig_address"`
	ProposerAddress string                  `json:"proposer_address"`
	TxId            string                  `json:"tx_id"`
	MinerId         string                  `json:"miner_id"`
	NewWorker       string                  `json:"new_worker"`
}

type MsigChangeWorkerProposeRequest

type MsigChangeWorkerProposeRequest struct {
	BaseParams  buildmessage.BaseParams `json:"base_params"`
	From        string                  `json:"from"`
	MsigAddress string                  `json:"msig_address"`
	MinerId     string                  `json:"miner_id"`
	NewWorker   string                  `json:"new_worker"`
}

type MsigConfirmChangeBeneficiaryApproveRequest

type MsigConfirmChangeBeneficiaryApproveRequest struct {
	BaseParams      buildmessage.BaseParams `json:"base_params"`
	From            string                  `json:"from"`
	MsigAddress     string                  `json:"msig_address"`
	ProposerAddress string                  `json:"proposer_address"`
	TxId            string                  `json:"tx_id"`
	MinerId         string                  `json:"miner_id"`
}

type MsigConfirmChangeBeneficiaryProposeRequest

type MsigConfirmChangeBeneficiaryProposeRequest struct {
	BaseParams  buildmessage.BaseParams `json:"base_params"`
	From        string                  `json:"from"`
	MsigAddress string                  `json:"msig_address"`
	MinerId     string                  `json:"miner_id"`
}

type MsigCreateRequest

type MsigCreateRequest struct {
	BaseParams buildmessage.BaseParams `json:"base_params"`
	From       string                  `json:"from"`
	Required   uint64                  `json:"required"`
	Duration   uint64                  `json:"duration"`
	Value      string                  `json:"value"`
	Signers    []string                `json:"signers"`
}

type MsigInspect

type MsigInspect struct {
	MsigAddr     string            `json:"msig_addr"`
	Threshold    uint64            `json:"threshold"`
	Signers      []string          `json:"signers"`
	Balance      string            `json:"balance"`
	Spendable    string            `json:"spendable"`
	Lock         MsigLockInfo      `json:"lock"`
	Transactions []MsigTransaction `json:"transactions"`
}

type MsigLockApproveRequest

type MsigLockApproveRequest struct {
	BaseParams      buildmessage.BaseParams `json:"base_params"`
	From            string                  `json:"from"`
	MsigAddress     string                  `json:"msig_address"`
	ProposerAddress string                  `json:"proposer_address"`
	TxId            string                  `json:"tx_id"`
	StartEpoch      string                  `json:"start_epoch"`
	UnlockDuration  string                  `json:"unlock_duration"`
	Amount          string                  `json:"amount"`
}

type MsigLockCancelRequest

type MsigLockCancelRequest struct {
	BaseParams     buildmessage.BaseParams `json:"base_params"`
	From           string                  `json:"from"`
	MsigAddress    string                  `json:"msig_address"`
	TxId           string                  `json:"tx_id"`
	StartEpoch     string                  `json:"start_epoch"`
	UnlockDuration string                  `json:"unlock_duration"`
	Amount         string                  `json:"amount"`
}

type MsigLockInfo

type MsigLockInfo struct {
	InitialBalance string `json:"initial_balance"`
	LockAmount     string `json:"lock_amount"`
	StartEpoch     uint64 `json:"start_epoch"`
	UnlockDuration uint64 `json:"unlock_duration"`
}

type MsigLockProposeRequest

type MsigLockProposeRequest struct {
	BaseParams     buildmessage.BaseParams `json:"base_params"`
	From           string                  `json:"from"`
	MsigAddress    string                  `json:"msig_address"`
	StartEpoch     string                  `json:"start_epoch"`
	UnlockDuration string                  `json:"unlock_duration"`
	Amount         string                  `json:"amount"`
}

type MsigSetControlApproveRequest

type MsigSetControlApproveRequest struct {
	BaseParams      buildmessage.BaseParams `json:"base_params"`
	From            string                  `json:"from"`
	MsigAddress     string                  `json:"msig_address"`
	ProposerAddress string                  `json:"proposer_address"`
	TxId            string                  `json:"tx_id"`
	MinerId         string                  `json:"miner_id"`
	ControlAddrs    []string                `json:"control_addrs"`
}

type MsigSetControlProposeRequest

type MsigSetControlProposeRequest struct {
	BaseParams   buildmessage.BaseParams `json:"base_params"`
	From         string                  `json:"from"`
	MsigAddress  string                  `json:"msig_address"`
	MinerId      string                  `json:"miner_id"`
	ControlAddrs []string                `json:"control_addrs"`
}

type MsigSwapApproveRequest

type MsigSwapApproveRequest struct {
	BaseParams      buildmessage.BaseParams `json:"base_params"`
	From            string                  `json:"from"`
	MsigAddress     string                  `json:"msig_address"`
	ProposerAddress string                  `json:"proposer_address"`
	TxId            string                  `json:"tx_id"`
	OldAddress      string                  `json:"old_address"`
	NewAddress      string                  `json:"new_address"`
}

type MsigSwapCancelRequest

type MsigSwapCancelRequest struct {
	BaseParams  buildmessage.BaseParams `json:"base_params"`
	From        string                  `json:"from"`
	MsigAddress string                  `json:"msig_address"`
	TxId        string                  `json:"tx_id"`
	OldAddress  string                  `json:"old_address"`
	NewAddress  string                  `json:"new_address"`
}

type MsigSwapProposeRequest

type MsigSwapProposeRequest struct {
	BaseParams  buildmessage.BaseParams `json:"base_params"`
	From        string                  `json:"from"`
	MsigAddress string                  `json:"msig_address"`
	OldAddress  string                  `json:"old_address"`
	NewAddress  string                  `json:"new_address"`
}

type MsigThresholdApproveRequest

type MsigThresholdApproveRequest struct {
	BaseParams      buildmessage.BaseParams `json:"base_params"`
	From            string                  `json:"from"`
	MsigAddress     string                  `json:"msig_address"`
	ProposerAddress string                  `json:"proposer_address"`
	TxId            string                  `json:"tx_id"`
	NewThreshold    string                  `json:"new_threshold"`
}

type MsigThresholdCancelRequest

type MsigThresholdCancelRequest struct {
	BaseParams   buildmessage.BaseParams `json:"base_params"`
	From         string                  `json:"from"`
	MsigAddress  string                  `json:"msig_address"`
	TxId         string                  `json:"tx_id"`
	NewThreshold string                  `json:"new_threshold"`
}

type MsigThresholdProposeRequest

type MsigThresholdProposeRequest struct {
	BaseParams   buildmessage.BaseParams `json:"base_params"`
	From         string                  `json:"from"`
	MsigAddress  string                  `json:"msig_address"`
	NewThreshold string                  `json:"new_threshold"`
}

type MsigTransaction

type MsigTransaction struct {
	Txid     int64    `json:"txid"`
	To       string   `json:"to"`
	Value    string   `json:"value"`
	Method   string   `json:"method"`
	Params   string   `json:"params"`
	Approved []string `json:"approved"`
}

type MsigTransferProposeRequest

type MsigTransferProposeRequest struct {
	BaseParams         buildmessage.BaseParams `json:"base_params"`
	From               string                  `json:"from"`
	MsigAddress        string                  `json:"msig_address"`
	DestinationAddress string                  `json:"destination_address"`
	Amount             string                  `json:"amount"`
}

type MsigUpdateRequest

type MsigUpdateRequest struct {
	MsigAddress string `json:"msig_address"`
}

type MsigWalletListInfo

type MsigWalletListInfo struct {
	MsigAddr              string   `json:"address"`
	ID                    string   `json:"id"`
	Signers               []string `json:"signers"`
	NumApprovalsThreshold uint64   `json:"num_approvals_threshold"`
	Balance               string   `json:"balance"`
}

type MsigWithdrawApproveRequest

type MsigWithdrawApproveRequest struct {
	BaseParams      buildmessage.BaseParams `json:"base_params"`
	From            string                  `json:"from"`
	MsigAddress     string                  `json:"msig_address"`
	ProposerAddress string                  `json:"proposer_address"`
	TxId            string                  `json:"tx_id"`
	MinerId         string                  `json:"miner_id"`
	Amount          string                  `json:"amount"`
}

type MsigWithdrawProposeRequest

type MsigWithdrawProposeRequest struct {
	BaseParams  buildmessage.BaseParams `json:"base_params"`
	From        string                  `json:"from"`
	MsigAddress string                  `json:"msig_address"`
	MinerId     string                  `json:"miner_id"`
	Amount      string                  `json:"amount"`
}

type NodeInfo

type NodeInfo struct {
	Name        string `json:"name"`
	Endpoint    string `json:"endpoint"`
	Token       string `json:"token"`
	IsUsing     bool   `json:"isUsing"`
	BlockHeight string `json:"blockHeight"`
}

type NodeRequest

type NodeRequest struct {
	Name     string `json:"name"`
	Endpoint string `json:"endpoint"`
	Token    string `json:"token"`
}

type OpenFilAPI

type OpenFilAPI struct {
	// contains filtered or unexported fields
}

func GetOpenFilAPI

func GetOpenFilAPI(ctx *cli.Context) (*OpenFilAPI, error)

func (*OpenFilAPI) Balance

func (api *OpenFilAPI) Balance(addr string) (*BalanceInfo, error)

func (*OpenFilAPI) ChangeBeneficiary

func (api *OpenFilAPI) ChangeBeneficiary(baseParams buildmessage.BaseParams, minerId, beneficiaryAddress, quota, expiration string, OverwritePendingChange bool) (*chain.Message, error)

func (*OpenFilAPI) ChangeControl

func (api *OpenFilAPI) ChangeControl(baseParams buildmessage.BaseParams, minerId string, controlAddrs []string) (*chain.Message, error)

func (*OpenFilAPI) ChangeOwner

func (api *OpenFilAPI) ChangeOwner(baseParams buildmessage.BaseParams, minerId string, newOwner string, from string) (*chain.Message, error)

func (*OpenFilAPI) ChangeWorker

func (api *OpenFilAPI) ChangeWorker(baseParams buildmessage.BaseParams, minerId, newWorker string) (*chain.Message, error)

func (*OpenFilAPI) ConfirmChangeBeneficiary

func (api *OpenFilAPI) ConfirmChangeBeneficiary(baseParams buildmessage.BaseParams, minerId string) (*chain.Message, error)

func (*OpenFilAPI) ConfirmChangeWorker

func (api *OpenFilAPI) ConfirmChangeWorker(baseParams buildmessage.BaseParams, minerId, newWorker string) (*chain.Message, error)

func (*OpenFilAPI) ControlList

func (api *OpenFilAPI) ControlList(minerId string) (*MinerControl, error)

func (*OpenFilAPI) Decode

func (api *OpenFilAPI) Decode(to string, method uint64, params string, encoding string) (string, error)

func (*OpenFilAPI) Encode

func (api *OpenFilAPI) Encode(dest string, method uint64, params string, encoding string) (string, error)

func (*OpenFilAPI) Login

func (api *OpenFilAPI) Login(loginPassword string) error

func (*OpenFilAPI) MsigAdd

func (api *OpenFilAPI) MsigAdd(msigAddress string) error

func (*OpenFilAPI) MsigAddApprove

func (api *OpenFilAPI) MsigAddApprove(baseParams buildmessage.BaseParams, from string, msigAddress, proposerAddress, txId, newSigner string, inc bool) (*chain.Message, error)

func (*OpenFilAPI) MsigAddCancel

func (api *OpenFilAPI) MsigAddCancel(baseParams buildmessage.BaseParams, from string, msigAddress, txId, newSigner string, inc bool) (*chain.Message, error)

func (*OpenFilAPI) MsigAddPropose

func (api *OpenFilAPI) MsigAddPropose(baseParams buildmessage.BaseParams, from string, msigAddress string, newSigner string, inc bool) (*chain.Message, error)

func (*OpenFilAPI) MsigApprove

func (api *OpenFilAPI) MsigApprove(baseParams buildmessage.BaseParams, from string, msigAddress string, txId string) (*chain.Message, error)

func (*OpenFilAPI) MsigCancel

func (api *OpenFilAPI) MsigCancel(baseParams buildmessage.BaseParams, from string, msigAddress string, txId string) (*chain.Message, error)

func (*OpenFilAPI) MsigChangeBeneficiaryApprove

func (api *OpenFilAPI) MsigChangeBeneficiaryApprove(baseParams buildmessage.BaseParams, from string, msigAddress, proposerAddress, txId, minerId string, beneficiaryAddress, quota, expiration string) (*chain.Message, error)

func (*OpenFilAPI) MsigChangeBeneficiaryPropose

func (api *OpenFilAPI) MsigChangeBeneficiaryPropose(baseParams buildmessage.BaseParams, from string, msigAddress, minerId string, beneficiaryAddress, quota, expiration string, OverwritePendingChange bool) (*chain.Message, error)

func (*OpenFilAPI) MsigChangeOwnerApprove

func (api *OpenFilAPI) MsigChangeOwnerApprove(baseParams buildmessage.BaseParams, from string, msigAddress, proposerAddress, txId, minerId, newOwner string) (*chain.Message, error)

func (*OpenFilAPI) MsigChangeOwnerPropose

func (api *OpenFilAPI) MsigChangeOwnerPropose(baseParams buildmessage.BaseParams, from string, msigAddress, minerId, newOwner string) (*chain.Message, error)

func (*OpenFilAPI) MsigChangeWorkerApprove

func (api *OpenFilAPI) MsigChangeWorkerApprove(baseParams buildmessage.BaseParams, from string, msigAddress, proposerAddress, txId, minerId, newWorker string) (*chain.Message, error)

func (*OpenFilAPI) MsigChangeWorkerPropose

func (api *OpenFilAPI) MsigChangeWorkerPropose(baseParams buildmessage.BaseParams, from string, msigAddress, minerId, newWorker string) (*chain.Message, error)

func (*OpenFilAPI) MsigConfirmChangeBeneficiaryApprove

func (api *OpenFilAPI) MsigConfirmChangeBeneficiaryApprove(baseParams buildmessage.BaseParams, from string, msigAddress, proposerAddress, txId, minerId string) (*chain.Message, error)

func (*OpenFilAPI) MsigConfirmChangeBeneficiaryPropose

func (api *OpenFilAPI) MsigConfirmChangeBeneficiaryPropose(baseParams buildmessage.BaseParams, from string, msigAddress, minerId string) (*chain.Message, error)

func (*OpenFilAPI) MsigConfirmChangeWorkerApprove

func (api *OpenFilAPI) MsigConfirmChangeWorkerApprove(baseParams buildmessage.BaseParams, from string, msigAddress, proposerAddress, txId, minerId, newWorker string) (*chain.Message, error)

func (*OpenFilAPI) MsigConfirmChangeWorkerPropose

func (api *OpenFilAPI) MsigConfirmChangeWorkerPropose(baseParams buildmessage.BaseParams, from string, msigAddress, minerId, newWorker string) (*chain.Message, error)

func (*OpenFilAPI) MsigCreate

func (api *OpenFilAPI) MsigCreate(baseParams buildmessage.BaseParams, from string, required uint64, duration uint64, value string, signer ...string) (*chain.Message, error)

func (*OpenFilAPI) MsigInspect

func (api *OpenFilAPI) MsigInspect(msigAddress string) (*MsigInspect, error)

func (*OpenFilAPI) MsigLockApprove

func (api *OpenFilAPI) MsigLockApprove(baseParams buildmessage.BaseParams, from string, msigAddress, proposerAddress, txId, startEpoch, unlockDuration, amount string) (*chain.Message, error)

func (*OpenFilAPI) MsigLockCancel

func (api *OpenFilAPI) MsigLockCancel(baseParams buildmessage.BaseParams, from string, msigAddress, txId, startEpoch, unlockDuration, amount string) (*chain.Message, error)

func (*OpenFilAPI) MsigLockPropose

func (api *OpenFilAPI) MsigLockPropose(baseParams buildmessage.BaseParams, from string, msigAddress, startEpoch, unlockDuration, amount string) (*chain.Message, error)

func (*OpenFilAPI) MsigSetControlApprove

func (api *OpenFilAPI) MsigSetControlApprove(baseParams buildmessage.BaseParams, from string, msigAddress, proposerAddress, txId, minerId string, controlAddrs []string) (*chain.Message, error)

func (*OpenFilAPI) MsigSetControlPropose

func (api *OpenFilAPI) MsigSetControlPropose(baseParams buildmessage.BaseParams, from string, msigAddress, minerId string, controlAddrs []string) (*chain.Message, error)

func (*OpenFilAPI) MsigSwapApprove

func (api *OpenFilAPI) MsigSwapApprove(baseParams buildmessage.BaseParams, from string, msigAddress, proposerAddress, txId, oldAddress, newAddress string) (*chain.Message, error)

func (*OpenFilAPI) MsigSwapCancel

func (api *OpenFilAPI) MsigSwapCancel(baseParams buildmessage.BaseParams, from string, msigAddress, txId, oldAddress, newAddress string) (*chain.Message, error)

func (*OpenFilAPI) MsigSwapPropose

func (api *OpenFilAPI) MsigSwapPropose(baseParams buildmessage.BaseParams, from string, msigAddress, oldAddress, newAddress string) (*chain.Message, error)

func (*OpenFilAPI) MsigThresholdApprove

func (api *OpenFilAPI) MsigThresholdApprove(baseParams buildmessage.BaseParams, from string, msigAddress, proposerAddress, txId, newThreshold string) (*chain.Message, error)

func (*OpenFilAPI) MsigThresholdCancel

func (api *OpenFilAPI) MsigThresholdCancel(baseParams buildmessage.BaseParams, from string, msigAddress, txId, newThreshold string) (*chain.Message, error)

func (*OpenFilAPI) MsigThresholdPropose

func (api *OpenFilAPI) MsigThresholdPropose(baseParams buildmessage.BaseParams, from string, msigAddress, newThreshold string) (*chain.Message, error)

func (*OpenFilAPI) MsigTransferApprove

func (api *OpenFilAPI) MsigTransferApprove(baseParams buildmessage.BaseParams, from string, msigAddress string, txId string) (*chain.Message, error)

func (*OpenFilAPI) MsigTransferCancel

func (api *OpenFilAPI) MsigTransferCancel(baseParams buildmessage.BaseParams, from string, msigAddress string, txId string) (*chain.Message, error)

func (*OpenFilAPI) MsigTransferPropose

func (api *OpenFilAPI) MsigTransferPropose(baseParams buildmessage.BaseParams, from string, msigAddress, destinationAddress string, amount string) (*chain.Message, error)

func (*OpenFilAPI) MsigUpdate

func (api *OpenFilAPI) MsigUpdate(msigAddress string) error

func (*OpenFilAPI) MsigWalletList

func (api *OpenFilAPI) MsigWalletList(balance bool) ([]MsigWalletListInfo, error)

func (*OpenFilAPI) MsigWithdrawApprove

func (api *OpenFilAPI) MsigWithdrawApprove(baseParams buildmessage.BaseParams, from string, msigAddress, proposerAddress, txId, minerId, amount string) (*chain.Message, error)

func (*OpenFilAPI) MsigWithdrawPropose

func (api *OpenFilAPI) MsigWithdrawPropose(baseParams buildmessage.BaseParams, from string, msigAddress, minerId, amount string) (*chain.Message, error)

func (*OpenFilAPI) NodeAdd

func (api *OpenFilAPI) NodeAdd(name, endpoint, token string) error

func (*OpenFilAPI) NodeBest

func (api *OpenFilAPI) NodeBest() (*NodeInfo, error)

func (*OpenFilAPI) NodeDelete

func (api *OpenFilAPI) NodeDelete(name string) error

func (*OpenFilAPI) NodeList

func (api *OpenFilAPI) NodeList() ([]NodeInfo, error)

func (*OpenFilAPI) NodeUpdate

func (api *OpenFilAPI) NodeUpdate(name, endpoint, token string) error

func (*OpenFilAPI) Send

func (api *OpenFilAPI) Send(req chain.SignedMessage) (string, error)

func (*OpenFilAPI) Sign

func (api *OpenFilAPI) Sign(req chain.Message) (*chain.SignedMessage, error)

func (*OpenFilAPI) SignAndSend

func (api *OpenFilAPI) SignAndSend(req chain.Message) (string, error)

func (*OpenFilAPI) SignMsg

func (api *OpenFilAPI) SignMsg(from string, msg string) (string, error)

func (*OpenFilAPI) SignOut

func (api *OpenFilAPI) SignOut() error

func (*OpenFilAPI) Status

func (api *OpenFilAPI) Status() (*StatusInfo, error)

func (*OpenFilAPI) Transfer

func (api *OpenFilAPI) Transfer(baseParams buildmessage.BaseParams, from, to, amount string) (*chain.Message, error)

func (*OpenFilAPI) TxHistory

func (api *OpenFilAPI) TxHistory(addr string) ([]HistoryResponse, error)

func (*OpenFilAPI) UseNode

func (api *OpenFilAPI) UseNode(name string) error

func (*OpenFilAPI) WalletCreate

func (api *OpenFilAPI) WalletCreate(index int) (*CreateWalletResponse, error)

func (*OpenFilAPI) WalletList

func (api *OpenFilAPI) WalletList(balance bool) ([]WalletListInfo, error)

func (*OpenFilAPI) Withdraw

func (api *OpenFilAPI) Withdraw(baseParams buildmessage.BaseParams, minerId, amount string) (*chain.Message, error)

type Response

type Response struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type SingRequest

type SingRequest struct {
	From       string `json:"from"`
	HexMessage string `json:"hex_message"`
}

type StatusInfo

type StatusInfo struct {
	Lock    bool   `json:"lock"`
	Offline bool   `json:"offline"`
	Version string `json:"version"`
}

type TransferRequest

type TransferRequest struct {
	BaseParams buildmessage.BaseParams `json:"base_params"`
	From       string                  `json:"from"`
	To         string                  `json:"to"`
	Amount     string                  `json:"amount"`
}

type WalletListInfo

type WalletListInfo struct {
	WalletType    string `json:"type"`
	WalletAddress string `json:"address"`
	WalletId      string `json:"id"`
	WalletPath    string `json:"path"`
	Balance       string `json:"balance"`
}

type WithdrawRequest

type WithdrawRequest struct {
	BaseParams buildmessage.BaseParams `json:"base_params"`
	MinerId    string                  `json:"miner_id"`
	Amount     string                  `json:"amount"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL