Documentation
¶
Index ¶
- Variables
- func AwaitTxAccepted(c *Client, ctx context.Context, txID ids.ID, freq time.Duration, ...) error
- type AssetDefinition
- type Balance
- type BuildGenesisArgs
- type BuildGenesisReply
- type Client
- func (c *Client) GetAllBalances(ctx context.Context, addr ids.ShortID, includePartial bool, ...) ([]Balance, error)deprecated
- func (c *Client) GetAssetDescription(ctx context.Context, assetID string, options ...rpc.Option) (*GetAssetDescriptionReply, error)
- func (c *Client) GetAtomicUTXOs(ctx context.Context, addrs []ids.ShortID, sourceChain string, limit uint32, ...) ([][]byte, ids.ShortID, ids.ID, error)
- func (c *Client) GetBalance(ctx context.Context, addr ids.ShortID, assetID string, includePartial bool, ...) (*GetBalanceReply, error)deprecated
- func (c *Client) GetBlock(ctx context.Context, blkID ids.ID, options ...rpc.Option) ([]byte, error)
- func (c *Client) GetBlockByHeight(ctx context.Context, height uint64, options ...rpc.Option) ([]byte, error)
- func (c *Client) GetHeight(ctx context.Context, options ...rpc.Option) (uint64, error)
- func (c *Client) GetTx(ctx context.Context, txID ids.ID, options ...rpc.Option) ([]byte, error)
- func (c *Client) GetTxFee(ctx context.Context, options ...rpc.Option) (uint64, uint64, error)
- func (c *Client) GetTxStatus(ctx context.Context, txID ids.ID, options ...rpc.Option) (choices.Status, error)deprecated
- func (c *Client) GetUTXOs(ctx context.Context, addrs []ids.ShortID, limit uint32, ...) ([][]byte, ids.ShortID, ids.ID, error)
- func (c *Client) IssueTx(ctx context.Context, txBytes []byte, options ...rpc.Option) (ids.ID, error)
- type GetAllBalancesArgs
- type GetAllBalancesReply
- type GetAssetDescriptionArgs
- type GetAssetDescriptionReply
- type GetBalanceArgs
- type GetBalanceReply
- type GetTxFeeReply
- type GetTxStatusReply
- type StaticClient
- type WalletClientdeprecated
Constants ¶
This section is empty.
Variables ¶
var ErrRejected = errors.New("rejected")
Functions ¶
Types ¶
type AssetDefinition ¶
type AssetDefinition struct {
Name string `json:"name"`
Symbol string `json:"symbol"`
Denomination byte `json:"denomination"`
InitialState map[string][]interface{} `json:"initialState"`
}
AssetDefinition defines an asset in genesis
type Balance ¶
type Balance struct {
Asset string `json:"asset"`
Balance json.Uint64 `json:"balance"`
}
Balance represents an asset balance
type BuildGenesisArgs ¶
type BuildGenesisArgs struct {
Encoding formatting.Encoding `json:"encoding"`
GenesisData map[string]AssetDefinition
}
BuildGenesisArgs are arguments for BuildGenesis
type BuildGenesisReply ¶
type BuildGenesisReply struct {
Bytes string `json:"bytes"`
Encoding formatting.Encoding `json:"encoding"`
}
BuildGenesisReply is the reply from BuildGenesis
type Client ¶
type Client struct {
Requester rpc.EndpointRequester
}
Client for interacting with the Exchange VM (X-Chain)
func (*Client) GetAssetDescription ¶
func (c *Client) GetAssetDescription(ctx context.Context, assetID string, options ...rpc.Option) (*GetAssetDescriptionReply, error)
GetAssetDescription returns a description of assetID.
func (*Client) GetAtomicUTXOs ¶
func (c *Client) GetAtomicUTXOs( ctx context.Context, addrs []ids.ShortID, sourceChain string, limit uint32, startAddress ids.ShortID, startUTXOID ids.ID, options ...rpc.Option, ) ([][]byte, ids.ShortID, ids.ID, error)
GetAtomicUTXOs returns the byte representation of the atomic UTXOs controlled by addrs from sourceChain.
func (*Client) GetBalance
deprecated
func (c *Client) GetBalance( ctx context.Context, addr ids.ShortID, assetID string, includePartial bool, options ...rpc.Option, ) (*GetBalanceReply, error)
GetBalance returns the balance of assetID held by addr.
If includePartial is set, balance includes partial owned (i.e. in a multisig) funds.
Deprecated: GetUTXOs should be used instead.
func (*Client) GetBlockByHeight ¶
func (c *Client) GetBlockByHeight(ctx context.Context, height uint64, options ...rpc.Option) ([]byte, error)
GetBlockByHeight returns the block at the given height.
func (*Client) GetTxStatus
deprecated
type GetAllBalancesArgs ¶
type GetAllBalancesArgs struct {
JSONAddress interface{} `json:"address"`
IncludePartial bool `json:"includePartial"`
}
GetAllBalancesArgs are arguments for GetAllBalances
type GetAllBalancesReply ¶
type GetAllBalancesReply struct {
Balances []Balance `json:"balances"`
}
GetAllBalancesReply is the reply from GetAllBalances
type GetAssetDescriptionArgs ¶
type GetAssetDescriptionArgs struct {
AssetID string `json:"assetID"`
}
GetAssetDescriptionArgs are arguments for GetAssetDescription
type GetAssetDescriptionReply ¶
type GetAssetDescriptionReply struct {
AssetID string `json:"assetID"`
Name string `json:"name"`
Symbol string `json:"symbol"`
Denomination byte `json:"denomination"`
}
GetAssetDescriptionReply is the reply from GetAssetDescription
type GetBalanceArgs ¶
type GetBalanceArgs struct {
Address string `json:"address"`
AssetID string `json:"assetID"`
IncludePartial bool `json:"includePartial"`
}
GetBalanceArgs are arguments for GetBalance
type GetBalanceReply ¶
type GetBalanceReply struct {
Balance json.Uint64 `json:"balance"`
UTXOIDs []string `json:"utxoIDs"`
}
GetBalanceReply is the reply from GetBalance
type GetTxFeeReply ¶
type GetTxFeeReply struct {
TxFee json.Uint64 `json:"txFee"`
CreateAssetTxFee json.Uint64 `json:"createAssetTxFee"`
}
GetTxFeeReply is the response from a GetTxFee call
type GetTxStatusReply ¶
GetTxStatusReply is the response from a GetTxStatus call
type StaticClient ¶
type StaticClient interface {
BuildGenesis(ctx context.Context, args *BuildGenesisArgs, options ...rpc.Option) (*BuildGenesisReply, error)
}
StaticClient for interacting with the XVM static api
func NewStaticClient ¶
func NewStaticClient(uri string) StaticClient
NewClient returns an XVM client for interacting with the xvm static api
type WalletClient
deprecated
type WalletClient struct {
Requester rpc.EndpointRequester
}
WalletClient for interacting with exchangevm managed wallet.
Deprecated: Transactions should be issued using the `luxfi/node/wallet/chain/x.Wallet` utility.
func NewWalletClient
deprecated
func NewWalletClient(uri, chain string) *WalletClient
NewWalletClient returns an Exchange VM wallet client for interacting with exchangevm managed wallet
Deprecated: Transactions should be issued using the `luxfi/node/wallet/chain/x.Wallet` utility.