Crate ic_ledger_types
source ·Expand description
A library of types to communicate with the ICP ledger canister.
Structs
- Arguments for the
account_balancecall. - AccountIdentifier is a 32-byte array. The first 4 bytes is a big-endian encoding of a CRC32 checksum of the last 28 bytes.
- A function that can be called to retrieve a range of archived blocks.
- A single record in the ledger.
- A prefix of the block range specified in the
get_blocksandquery_archived_blocksfunction. - Arguments for the
get_blocksfunction. - An arbitrary number associated with a transaction. The caller can set it in a
transfercall as a correlation identifier. - Function type used by
query_blocksfor fetching blocks from the archive. Has the signature(GetBlocksArgs) -> (GetBlocksResult). - Return type for the
query_blocksfunction. - Subaccount is an arbitrary 32-byte byte array. Ledger uses subaccounts to compute account address, which enables one principal to control multiple ledger accounts.
- Return type of the
token_symbolfunction. - Number of nanoseconds from the UNIX epoch in UTC timezone.
- A type for representing amounts of Tokens.
- A recorded ledger transaction.
- Arguments for the
transfercall.
Enums
- An error indicating that the arguments passed to
get_blocksorquery_archived_blockswere invalid. - The content of a ledger transaction.
- Error of the
transfercall.
Constants
- The default fee for ledger transactions.
- The subaccont that is used by default.
- Id of the cycles minting canister on the IC.
- Id of the governance canister on the IC.
- Id of the ledger canister on the IC.
Functions
- Calls the “account_balance” method on the specified canister.
- Continues a query started in
query_blocksby calling its returned archive function. - Calls the “query_block” method on the specified canister.
- Calls the “token_symbol” method on the specified canister.
- Calls the “transfer” method on the specified canister.
Type Definitions
- The sequence number of a block in the Tokens ledger blockchain.
- The return type of
get_blocks. - Result of the
transfercall.