client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LotusGasEstimateMessageGas added in v0.1.0

func LotusGasEstimateMessageGas(rpcAddr, token string, message *types.Message, maxFee int64) (gasLimit float64, gasFeeCap, gasPremium string, err error)

func LotusMpoolGetNonce added in v0.1.0

func LotusMpoolGetNonce(rpcAddr, token string, addr string) (float64, error)

func LotusMpoolPush added in v0.1.0

func LotusMpoolPush(rpcAddr, token string, signedMessage *types.SignedMessage) (cid.Cid, error)

func LotusStateGetActor added in v0.1.1

func LotusStateGetActor(rpcAddr, token string, addr string) (string, string, float64, string, error)

func LotusStateLookupID added in v0.1.1

func LotusStateLookupID(rpcAddr, token string, addr string) (string, error)

func LotusStateMinerInfo added in v0.1.1

func LotusStateMinerInfo(rpcAddr, token string, minerId string) (string, string, []interface{}, error)

func LotusWalletBalance added in v0.1.0

func LotusWalletBalance(rpcAddr, token string, addr string) (types.BigInt, error)

func NewClient

func NewClient(rpcAddr, token string, method Method, params interface{}) *client

Types

type Method

type Method string
const (
	WalletBalance         Method = "Filecoin.WalletBalance"
	MpoolPush             Method = "Filecoin.MpoolPush"
	GasEstimateMessageGas Method = "Filecoin.GasEstimateMessageGas"
	MpoolGetNonce         Method = "Filecoin.MpoolGetNonce"
	StateLookupID         Method = "Filecoin.StateLookupID"
	StateGetActor         Method = "Filecoin.StateGetActor"
	StateMinerInfo        Method = "Filecoin.StateMinerInfo"
	StateWaitMsgLimited   Method = "Filecoin.StateWaitMsgLimited"
	StateSearchMsg        Method = "Filecoin.StateSearchMsg"
)

type MsgLookup added in v0.2.0

type MsgLookup struct {
	Message   cid.Cid // Can be different than requested, in case it was replaced, but only gas values changed
	Receipt   types.MessageReceipt
	ReturnDec interface{}
	TipSet    types.TipSetKey
	Height    abi.ChainEpoch
}

func LotusStateSearchMsg added in v0.2.0

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

func LotusStateWaitMsgLimited added in v0.2.0

func LotusStateWaitMsgLimited(rpcAddr, token string, msgCidStr string, confidence uint64) (*MsgLookup, error)

type Response

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

Jump to

Keyboard shortcuts

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