Documentation
¶
Index ¶
- Constants
- func AwaitTxAccepted(ctx context.Context, c *Client, address ids.ShortID, nonce uint64, ...) error
- type BalanceArgs
- type BalanceReply
- type BlockArgs
- type BlockReply
- type Client
- func (c *Client) Balance(ctx context.Context, address ids.ShortID, assetID ids.ID, ...) (uint64, error)
- func (c *Client) Block(ctx context.Context, blkID ids.ID, options ...rpc.Option) (*block.Stateless, error)
- func (c *Client) Genesis(ctx context.Context, options ...rpc.Option) (*genesis.Genesis, error)
- func (c *Client) IssueTx(ctx context.Context, newTx *tx.Tx, options ...rpc.Option) (ids.ID, error)
- func (c *Client) LastAccepted(ctx context.Context, options ...rpc.Option) (ids.ID, *block.Stateless, error)
- func (c *Client) Loan(ctx context.Context, chainID ids.ID, options ...rpc.Option) (uint64, error)
- func (c *Client) Message(ctx context.Context, txID ids.ID, options ...rpc.Option) (*warp.UnsignedMessage, []byte, error)
- func (c *Client) Network(ctx context.Context, options ...rpc.Option) (uint32, ids.ID, ids.ID, error)
- func (c *Client) Nonce(ctx context.Context, address ids.ShortID, options ...rpc.Option) (uint64, error)
- type GenesisReply
- type IssueTxArgs
- type IssueTxReply
- type LastAcceptedReply
- type LoanArgs
- type LoanReply
- type MessageArgs
- type MessageReply
- type NetworkReply
- type NonceArgs
- type NonceReply
- type Server
Constants ¶
const DefaultPollingInterval = 50 * time.Millisecond
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BalanceArgs ¶
func (*BalanceArgs) MarshalZAP ¶ added in v1.36.178
func (x *BalanceArgs) MarshalZAP() ([]byte, error)
MarshalZAP writes BalanceArgs from constant offsets.
func (*BalanceArgs) UnmarshalZAP ¶ added in v1.36.178
func (x *BalanceArgs) UnmarshalZAP(data []byte) error
UnmarshalZAP reads BalanceArgs out of the buffer that arrived.
type BalanceReply ¶
type BalanceReply struct {
Balance uint64 `json:"balance"`
}
func (*BalanceReply) MarshalZAP ¶ added in v1.36.178
func (x *BalanceReply) MarshalZAP() ([]byte, error)
MarshalZAP writes BalanceReply from constant offsets.
func (*BalanceReply) UnmarshalZAP ¶ added in v1.36.178
func (x *BalanceReply) UnmarshalZAP(data []byte) error
UnmarshalZAP reads BalanceReply out of the buffer that arrived.
type BlockArgs ¶
func (*BlockArgs) MarshalZAP ¶ added in v1.36.178
MarshalZAP writes BlockArgs from constant offsets.
func (*BlockArgs) UnmarshalZAP ¶ added in v1.36.178
UnmarshalZAP reads BlockArgs out of the buffer that arrived.
type BlockReply ¶
type Client ¶
type Client struct {
Req rpc.EndpointRequester
}
func (*Client) LastAccepted ¶
type GenesisReply ¶
func (*GenesisReply) MarshalZAP ¶ added in v1.36.178
func (x *GenesisReply) MarshalZAP() ([]byte, error)
MarshalZAP writes GenesisReply from constant offsets.
func (*GenesisReply) UnmarshalZAP ¶ added in v1.36.178
func (x *GenesisReply) UnmarshalZAP(data []byte) error
UnmarshalZAP reads GenesisReply out of the buffer that arrived.
type IssueTxArgs ¶
type IssueTxArgs struct {
Tx []byte `json:"tx"`
}
func (*IssueTxArgs) MarshalZAP ¶ added in v1.36.178
func (x *IssueTxArgs) MarshalZAP() ([]byte, error)
MarshalZAP writes IssueTxArgs from constant offsets.
func (*IssueTxArgs) UnmarshalZAP ¶ added in v1.36.178
func (x *IssueTxArgs) UnmarshalZAP(data []byte) error
UnmarshalZAP reads IssueTxArgs out of the buffer that arrived.
type IssueTxReply ¶
func (*IssueTxReply) MarshalZAP ¶ added in v1.36.178
func (x *IssueTxReply) MarshalZAP() ([]byte, error)
MarshalZAP writes IssueTxReply from constant offsets.
func (*IssueTxReply) UnmarshalZAP ¶ added in v1.36.178
func (x *IssueTxReply) UnmarshalZAP(data []byte) error
UnmarshalZAP reads IssueTxReply out of the buffer that arrived.
type LastAcceptedReply ¶
type LoanArgs ¶
func (*LoanArgs) MarshalZAP ¶ added in v1.36.178
MarshalZAP writes LoanArgs from constant offsets.
func (*LoanArgs) UnmarshalZAP ¶ added in v1.36.178
UnmarshalZAP reads LoanArgs out of the buffer that arrived.
type LoanReply ¶
type LoanReply struct {
Amount uint64 `json:"amount"`
}
func (*LoanReply) MarshalZAP ¶ added in v1.36.178
MarshalZAP writes LoanReply from constant offsets.
func (*LoanReply) UnmarshalZAP ¶ added in v1.36.178
UnmarshalZAP reads LoanReply out of the buffer that arrived.
type MessageArgs ¶
func (*MessageArgs) MarshalZAP ¶ added in v1.36.178
func (x *MessageArgs) MarshalZAP() ([]byte, error)
MarshalZAP writes MessageArgs from constant offsets.
func (*MessageArgs) UnmarshalZAP ¶ added in v1.36.178
func (x *MessageArgs) UnmarshalZAP(data []byte) error
UnmarshalZAP reads MessageArgs out of the buffer that arrived.
type MessageReply ¶
type MessageReply struct {
Message *warp.UnsignedMessage `json:"message"`
Signature []byte `json:"signature"`
}
func (*MessageReply) MarshalZAP ¶ added in v1.36.178
func (x *MessageReply) MarshalZAP() ([]byte, error)
MarshalZAP writes MessageReply from constant offsets.
func (*MessageReply) UnmarshalZAP ¶ added in v1.36.178
func (x *MessageReply) UnmarshalZAP(data []byte) error
UnmarshalZAP reads MessageReply out of the buffer that arrived.
type NetworkReply ¶
func (*NetworkReply) MarshalZAP ¶ added in v1.36.178
func (x *NetworkReply) MarshalZAP() ([]byte, error)
MarshalZAP writes NetworkReply from constant offsets.
func (*NetworkReply) UnmarshalZAP ¶ added in v1.36.178
func (x *NetworkReply) UnmarshalZAP(data []byte) error
UnmarshalZAP reads NetworkReply out of the buffer that arrived.
type NonceArgs ¶
func (*NonceArgs) MarshalZAP ¶ added in v1.36.178
MarshalZAP writes NonceArgs from constant offsets.
func (*NonceArgs) UnmarshalZAP ¶ added in v1.36.178
UnmarshalZAP reads NonceArgs out of the buffer that arrived.
type NonceReply ¶
type NonceReply struct {
Nonce uint64 `json:"nonce"`
}
func (*NonceReply) MarshalZAP ¶ added in v1.36.178
func (x *NonceReply) MarshalZAP() ([]byte, error)
MarshalZAP writes NonceReply from constant offsets.
func (*NonceReply) UnmarshalZAP ¶ added in v1.36.178
func (x *NonceReply) UnmarshalZAP(data []byte) error
UnmarshalZAP reads NonceReply out of the buffer that arrived.
type Server ¶
type Server interface {
Network(r *http.Request, args *struct{}, reply *NetworkReply) error
Genesis(r *http.Request, args *struct{}, reply *GenesisReply) error
Nonce(r *http.Request, args *NonceArgs, reply *NonceReply) error
Balance(r *http.Request, args *BalanceArgs, reply *BalanceReply) error
Loan(r *http.Request, args *LoanArgs, reply *LoanReply) error
IssueTx(r *http.Request, args *IssueTxArgs, reply *IssueTxReply) error
LastAccepted(r *http.Request, args *struct{}, reply *LastAcceptedReply) error
Block(r *http.Request, args *BlockArgs, reply *BlockReply) error
Message(r *http.Request, args *MessageArgs, reply *MessageReply) error
}
Server defines the xsvm API server.