client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 11 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 string, message *types.Message, maxFee int64) (gasLimit float64, gasFeeCap, gasPremium string, err error)

func LotusMpoolGetNonce added in v0.1.0

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

func LotusMpoolPush added in v0.1.0

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

func LotusStateGetActor added in v0.1.1

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

func LotusStateLookupID added in v0.1.1

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

func LotusStateMinerInfo added in v0.1.1

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

func LotusWalletBalance added in v0.1.0

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

func NewClient

func NewClient(rpcAddr 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"
)

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