Documentation ¶
Index ¶
- func FromFil(v decimal.Decimal) decimal.Decimal
- func ToFil(v decimal.Decimal) decimal.Decimal
- type Client
- func (c *Client) AuthNew(ctx context.Context, perms []string) ([]byte, error)
- func (c *Client) AuthVerify(ctx context.Context, token string) ([]string, error)
- func (c *Client) BeaconGetEntry(ctx context.Context, epoch int64) (*types.BeaconEntry, error)
- func (c *Client) ChainExport(ctx context.Context, tsk types.TipSetKey) ([]byte, error)
- func (c *Client) ChainGetBlock(ctx context.Context, id cid.Cid) (*types.BlockHeader, error)
- func (c *Client) ChainGetBlockMessages(ctx context.Context, id cid.Cid) (*types.BlockMessages, error)
- func (c *Client) ChainGetGenesis(ctx context.Context) (*types.TipSet, error)
- func (c *Client) ChainGetMessage(ctx context.Context, id cid.Cid) (*types.Message, error)
- func (c *Client) ChainGetNode(ctx context.Context, p string) (*types.IpldObject, error)
- func (c *Client) ChainGetParentMessages(ctx context.Context, id cid.Cid) ([]types.Message, error)
- func (c *Client) ChainGetParentReceipts(ctx context.Context, id cid.Cid) ([]*types.MessageReceipt, error)
- func (c *Client) ChainGetPath(ctx context.Context, from types.TipSetKey, to types.TipSetKey) (*types.HeadChange, error)
- func (c *Client) ChainGetRandomnessFromBeacon(ctx context.Context, tsk types.TipSetKey, personalization int64, ...) ([]byte, error)
- func (c *Client) ChainGetRandomnessFromTickets(ctx context.Context, tsk types.TipSetKey, personalization int64, ...) ([]byte, error)
- func (c *Client) ChainGetTipSet(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, error)
- func (c *Client) ChainGetTipSetByHeight(ctx context.Context, height int64, tsk types.TipSetKey) (*types.TipSet, error)
- func (c *Client) ChainHasObj(ctx context.Context, o cid.Cid) (bool, error)
- func (c *Client) ChainHead(ctx context.Context) (*types.TipSet, error)
- func (c *Client) ChainNotify()
- func (c *Client) ChainReadObj(ctx context.Context, obj cid.Cid) ([]byte, error)
- func (c *Client) ChainSetHead(ctx context.Context, tsk types.TipSetKey) error
- func (c *Client) ChainStatObj(ctx context.Context, obj, base cid.Cid) (types.ObjStat, error)
- func (c *Client) ChainTipSetWeight(ctx context.Context, tsk types.TipSetKey) (decimal.Decimal, error)
- func (c *Client) FilecoinMethod(method string) string
- func (c *Client) GasEstimateGasLimit(ctx context.Context, message *types.Message, cids []*cid.Cid) (int64, error)
- func (c *Client) GasEstimateMessageGas(ctx context.Context, message *types.Message, spec *types.MessageSendSpec, ...) (*types.Message, error)
- func (c *Client) MpoolPush(ctx context.Context, sm *types.SignedMessage) (cid.Cid, error)
- func (c *Client) Request(ctx context.Context, method string, result interface{}, params ...interface{}) error
- func (c *Client) SetToken(token string) *Client
- func (c *Client) StateGetActor(ctx context.Context, addr address.Address, cids []*cid.Cid) (*types.Actor, error)
- func (c *Client) StateGetReceipt(ctx context.Context, id cid.Cid, cids []*cid.Cid) (*types.MessageReceipt, error)
- func (c *Client) StateReplay(ctx context.Context, tsk types.TipSetKey, mc cid.Cid) (*types.InvocResult, error)
- func (c *Client) StateSearchMsg(ctx context.Context, msg cid.Cid) (*types.MsgLookup, error)
- func (c *Client) Version(ctx context.Context) (*types.Version, error)
- func (c *Client) WalletBalance(ctx context.Context, addr address.Address) (decimal.Decimal, error)
- func (c *Client) WalletDefaultAddress(ctx context.Context) (address.Address, error)
- func (c *Client) WalletDelete(ctx context.Context, addr address.Address) error
- func (c *Client) WalletExport(ctx context.Context, addr address.Address) (*types.KeyInfo, error)
- func (c *Client) WalletHas(ctx context.Context, addr address.Address) (bool, error)
- func (c *Client) WalletImport(ctx context.Context, ki *types.KeyInfo) (address.Address, error)
- func (c *Client) WalletList(ctx context.Context) ([]address.Address, error)
- func (c *Client) WalletNew(ctx context.Context, typ types.KeyType) (address.Address, error)
- func (c *Client) WalletSetDefault(ctx context.Context, addr address.Address) error
- func (c *Client) WalletSign(ctx context.Context, addr address.Address, data []byte) (*crypto.Signature, error)
- func (c *Client) WalletSignMessage(ctx context.Context, addr address.Address, message *types.Message) (*types.SignedMessage, error)
- func (c *Client) WalletVerify(ctx context.Context, k string, msg []byte, sig *crypto.Signature) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AuthVerify ¶
AuthVerify
func (*Client) BeaconGetEntry ¶
BeaconGetEntry returns the beacon entry for the given filecoin epoch. If the entry has not yet been produced, the call will block until the entry becomes available
func (*Client) ChainExport ¶
ChainExport returns a stream of bytes with CAR dump of chain data.
func (*Client) ChainGetBlock ¶
ChainGetBlock returns the block specified by the given CID.
func (*Client) ChainGetBlockMessages ¶
func (c *Client) ChainGetBlockMessages(ctx context.Context, id cid.Cid) (*types.BlockMessages, error)
ChainGetBlockMessages returns messages stored in the specified block.
func (*Client) ChainGetGenesis ¶
ChainGetGenesis returns the genesis tipset.
func (*Client) ChainGetMessage ¶
ChainGetMessage reads a message referenced by the specified CID from the chain blockstore.
func (*Client) ChainGetNode ¶
ChainGetNode
func (*Client) ChainGetParentMessages ¶
ChainGetParentMessages returns messages stored in parent tipset of the specified block.
func (*Client) ChainGetParentReceipts ¶
func (c *Client) ChainGetParentReceipts(ctx context.Context, id cid.Cid) ([]*types.MessageReceipt, error)
ChainGetParentReceipts returns receipts for messages in parent tipset of the specified block.
func (*Client) ChainGetPath ¶
func (c *Client) ChainGetPath(ctx context.Context, from types.TipSetKey, to types.TipSetKey) (*types.HeadChange, error)
ChainGetPath returns a set of revert/apply operations needed to get from one tipset to another
func (*Client) ChainGetRandomnessFromBeacon ¶
func (c *Client) ChainGetRandomnessFromBeacon(ctx context.Context, tsk types.TipSetKey, personalization int64, randEpoch int64, entropy []byte) ([]byte, error)
ChainGetRandomnessFromBeacon is used to sample the beacon for randomness.
func (*Client) ChainGetRandomnessFromTickets ¶
func (c *Client) ChainGetRandomnessFromTickets(ctx context.Context, tsk types.TipSetKey, personalization int64, randEpoch int64, entropy []byte) ([]byte, error)
ChainGetRandomnessFromTickets is used to sample the chain for randomness.
func (*Client) ChainGetTipSet ¶
ChainGetTipSet returns the tipset specified by the given TipSetKey.
func (*Client) ChainGetTipSetByHeight ¶
func (c *Client) ChainGetTipSetByHeight(ctx context.Context, height int64, tsk types.TipSetKey) (*types.TipSet, error)
ChainGetTipSetByHeight looks back for a tipset at the specified epoch. If there are no blocks at the specified epoch, a tipset at an earlier epoch will be returned.
func (*Client) ChainHasObj ¶
ChainHasObj checks if a given CID exists in the chain blockstore.
func (*Client) ChainNotify ¶
func (c *Client) ChainNotify()
ChainNotify returns channel with chain head updates. First message is guaranteed to be of len == 1, and type == 'current'.
func (*Client) ChainReadObj ¶
ChainReadObj reads ipld nodes referenced by the specified CID from chain blockstore and returns raw bytes.
func (*Client) ChainSetHead ¶
ChainSetHead forcefully sets current chain head. Use with caution.
func (*Client) ChainStatObj ¶
ChainStatObj returns statistics about the graph referenced by 'obj'. If 'base' is also specified, then the returned stat will be a diff between the two objects.
func (*Client) ChainTipSetWeight ¶
func (c *Client) ChainTipSetWeight(ctx context.Context, tsk types.TipSetKey) (decimal.Decimal, error)
ChainTipSetWeight computes weight for the specified tipset.
func (*Client) FilecoinMethod ¶
Namespace Filecoin
func (*Client) GasEstimateGasLimit ¶
func (c *Client) GasEstimateGasLimit(ctx context.Context, message *types.Message, cids []*cid.Cid) (int64, error)
GasEstimateGasLimit estimates gas used by the message and returns it. It fails if message fails to execute.
func (*Client) GasEstimateMessageGas ¶
func (c *Client) GasEstimateMessageGas(ctx context.Context, message *types.Message, spec *types.MessageSendSpec, cids []*cid.Cid) (*types.Message, error)
GasEstimateMessageGas estimates gas values for unset message gas fields
func (*Client) Request ¶
func (c *Client) Request(ctx context.Context, method string, result interface{}, params ...interface{}) error
Request call RPC method
func (*Client) StateGetActor ¶
func (c *Client) StateGetActor(ctx context.Context, addr address.Address, cids []*cid.Cid) (*types.Actor, error)
StateGetActor returns the indicated actor's nonce and balance.
func (*Client) StateGetReceipt ¶
func (c *Client) StateGetReceipt(ctx context.Context, id cid.Cid, cids []*cid.Cid) (*types.MessageReceipt, error)
StateGetReceipt returns the message receipt for the given message
func (*Client) StateReplay ¶
func (c *Client) StateReplay(ctx context.Context, tsk types.TipSetKey, mc cid.Cid) (*types.InvocResult, error)
StateReplay returns the result of executing the indicated message, assuming it was executed in the indicated tipset.
func (*Client) StateSearchMsg ¶
StateSearchMsg searches for a message in the chain, and returns its receipt and the tipset where it was executed
func (*Client) WalletBalance ¶
WalletBalance returns the balance of the given address at the current head of the chain.
func (*Client) WalletDefaultAddress ¶
WalletDefaultAddress returns the address marked as default in the wallet.
func (*Client) WalletDelete ¶
WalletDelete deletes an address from the wallet.
func (*Client) WalletExport ¶
WalletExport returns the private key of an address in the wallet.
func (*Client) WalletImport ¶
WalletImport receives a KeyInfo, which includes a private key, and imports it into the wallet.
func (*Client) WalletList ¶
WalletList lists all the addresses in the wallet.
func (*Client) WalletSetDefault ¶
WalletSetDefault marks the given address as as the default one.
func (*Client) WalletSign ¶
func (c *Client) WalletSign(ctx context.Context, addr address.Address, data []byte) (*crypto.Signature, error)
WalletSign signs the given bytes using the given address.
func (*Client) WalletSignMessage ¶
func (c *Client) WalletSignMessage(ctx context.Context, addr address.Address, message *types.Message) (*types.SignedMessage, error)
WalletSignMessage signs the given message using the given address.