Documentation ¶
Overview ¶
Package archive provides a client for the "archive" canister. Do NOT edit this file. It was automatically generated by https://github.com/aviate-labs/agent-go.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountIdentifier ¶
type AccountIdentifier = []byte
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent is a client for the "archive" canister.
func (Agent) GetBlocks ¶
func (a Agent) GetBlocks(arg0 GetBlocksArgs) (*GetBlocksResult, error)
GetBlocks calls the "get_blocks" method on the "archive" canister.
func (Agent) GetEncodedBlocks ¶
func (a Agent) GetEncodedBlocks(arg0 GetBlocksArgs) (*GetEncodedBlocksResult, error)
GetEncodedBlocks calls the "get_encoded_blocks" method on the "archive" canister.
type Block ¶
type Block = struct { ParentHash *[]byte `ic:"parent_hash,omitempty"` Transaction Transaction `ic:"transaction"` Timestamp Timestamp `ic:"timestamp"` }
type BlockIndex ¶
type BlockIndex = uint64
type BlockRange ¶
type BlockRange = struct {
Blocks []Block `ic:"blocks"`
}
type GetBlocksArgs ¶
type GetBlocksArgs = struct { Start BlockIndex `ic:"start"` Length uint64 `ic:"length"` }
type GetBlocksError ¶
type GetBlocksError = struct { BadFirstBlockIndex *struct { RequestedIndex BlockIndex `ic:"requested_index"` FirstValidIndex BlockIndex `ic:"first_valid_index"` } `ic:"BadFirstBlockIndex,variant"` Other *struct { ErrorCode uint64 `ic:"error_code"` ErrorMessage string `ic:"error_message"` } `ic:"Other,variant"` }
type GetBlocksResult ¶
type GetBlocksResult = struct { Ok *BlockRange `ic:"Ok,variant"` Err *GetBlocksError `ic:"Err,variant"` }
type GetEncodedBlocksResult ¶
type GetEncodedBlocksResult = struct { Ok *[][]byte `ic:"Ok,variant"` Err *GetBlocksError `ic:"Err,variant"` }
type Operation ¶
type Operation = struct { Mint *struct { To AccountIdentifier `ic:"to"` Amount Tokens `ic:"amount"` } `ic:"Mint,variant"` Burn *struct { From AccountIdentifier `ic:"from"` Spender *AccountIdentifier `ic:"spender,omitempty"` Amount Tokens `ic:"amount"` } `ic:"Burn,variant"` Transfer *struct { From AccountIdentifier `ic:"from"` To AccountIdentifier `ic:"to"` Amount Tokens `ic:"amount"` Fee Tokens `ic:"fee"` Spender *[]uint8 `ic:"spender,omitempty"` } `ic:"Transfer,variant"` Approve *struct { From AccountIdentifier `ic:"from"` Spender AccountIdentifier `ic:"spender"` AllowanceE8s idl.Int `ic:"allowance_e8s"` Allowance Tokens `ic:"allowance"` Fee Tokens `ic:"fee"` ExpiresAt *Timestamp `ic:"expires_at,omitempty"` ExpectedAllowance *Tokens `ic:"expected_allowance,omitempty"` } `ic:"Approve,variant"` }
Click to show internal directories.
Click to hide internal directories.