Expand description
A library of types to communicate with the ICP ledger canister.
Structs§
- Arguments for the
account_balance
call. - 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_blocks
andquery_archived_blocks
function. - An error for reporting invalid checksums.
- Arguments for the
get_blocks
function. - An arbitrary number associated with a transaction. The caller can set it in a
transfer
call as a correlation identifier. - Function type used by
query_blocks
for fetching blocks from the archive. Has the signature(
GetBlocksArgs
) -> (
GetBlocksResult
)
. - Return type for the
query_blocks
function. - 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_symbol
function. - Number of nanoseconds from the UNIX epoch in UTC timezone.
- A type for representing amounts of Tokens.
- A recorded ledger transaction.
- Arguments for the
transfer
call.
Enums§
- An error for reporting invalid Account Identifiers.
- An error indicating that the arguments passed to
get_blocks
orquery_archived_blocks
were invalid. - The content of a ledger transaction.
- Error of the
transfer
call.
Constants§
- The default fee for ledger transactions.
- The subaccount 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_blocks
by 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 Aliases§
- The sequence number of a block in the Tokens ledger blockchain.
- The return type of
get_blocks
. - Result of the
transfer
call.