IcpLedgerDid
Interfaces
Section titled “Interfaces”_SERVICE
Section titled “_SERVICE”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:563
Properties
Section titled “Properties”account_balance
Section titled “account_balance”account_balance:
ActorMethod<[AccountBalanceArgs],Tokens>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:567
Returns the amount of Tokens on the specified account.
account_balance_dfx
Section titled “account_balance_dfx”account_balance_dfx:
ActorMethod<[AccountBalanceArgsDfx],Tokens>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:568
account_identifier
Section titled “account_identifier”account_identifier:
ActorMethod<[Account],AccountIdentifier>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:572
Returns the account identifier for the given Principal and subaccount.
archives
Section titled “archives”archives:
ActorMethod<[],Archives>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:576
Returns the existing archive canisters information.
decimals
Section titled “decimals”decimals:
ActorMethod<[], {decimals:number; }>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:580
Returns token decimals.
get_allowances
Section titled “get_allowances”get_allowances:
ActorMethod<[GetAllowancesArgs],Allowances>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:581
icrc1_balance_of
Section titled “icrc1_balance_of”icrc1_balance_of:
ActorMethod<[Account],bigint>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:586
icrc1_decimals
Section titled “icrc1_decimals”icrc1_decimals:
ActorMethod<[],number>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:587
icrc1_fee
Section titled “icrc1_fee”icrc1_fee:
ActorMethod<[],bigint>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:588
icrc1_metadata
Section titled “icrc1_metadata”icrc1_metadata:
ActorMethod<[], [string,Value][]>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:589
icrc1_minting_account
Section titled “icrc1_minting_account”icrc1_minting_account:
ActorMethod<[], [] | [Account]>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:590
icrc1_name
Section titled “icrc1_name”icrc1_name:
ActorMethod<[],string>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:595
The following methods implement the ICRC-1 Token Standard. https://github.com/dfinity/ICRC-1/tree/main/standards/ICRC-1
icrc1_supported_standards
Section titled “icrc1_supported_standards”icrc1_supported_standards:
ActorMethod<[],object[]>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:596
icrc1_symbol
Section titled “icrc1_symbol”icrc1_symbol:
ActorMethod<[],string>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:600
icrc1_total_supply
Section titled “icrc1_total_supply”icrc1_total_supply:
ActorMethod<[],bigint>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:601
icrc1_transfer
Section titled “icrc1_transfer”icrc1_transfer:
ActorMethod<[TransferArg],Icrc1TransferResult>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:602
icrc10_supported_standards
Section titled “icrc10_supported_standards”icrc10_supported_standards:
ActorMethod<[],object[]>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:582
icrc2_allowance
Section titled “icrc2_allowance”icrc2_allowance:
ActorMethod<[AllowanceArgs],Allowance>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:607
icrc2_approve
Section titled “icrc2_approve”icrc2_approve:
ActorMethod<[ApproveArgs],ApproveResult>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:608
icrc2_transfer_from
Section titled “icrc2_transfer_from”icrc2_transfer_from:
ActorMethod<[TransferFromArgs],TransferFromResult>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:609
icrc21_canister_call_consent_message
Section titled “icrc21_canister_call_consent_message”icrc21_canister_call_consent_message:
ActorMethod<[icrc21_consent_message_request],icrc21_consent_message_response>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:603
is_ledger_ready
Section titled “is_ledger_ready”is_ledger_ready:
ActorMethod<[],boolean>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:610
name:
ActorMethod<[], {name:string; }>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:614
Returns token name.
query_blocks
Section titled “query_blocks”query_blocks:
ActorMethod<[GetBlocksArgs],QueryBlocksResponse>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:618
Queries blocks in the specified range.
query_encoded_blocks
Section titled “query_encoded_blocks”query_encoded_blocks:
ActorMethod<[GetBlocksArgs],QueryEncodedBlocksResponse>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:622
Queries encoded blocks in the specified range
remove_approval
Section titled “remove_approval”remove_approval:
ActorMethod<[RemoveApprovalArgs],ApproveResult>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:626
send_dfx
Section titled “send_dfx”send_dfx:
ActorMethod<[SendArgs],bigint>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:627
symbol
Section titled “symbol”symbol:
ActorMethod<[], {symbol:string; }>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:631
Returns token symbol.
tip_of_chain
Section titled “tip_of_chain”tip_of_chain:
ActorMethod<[],TipOfChainRes>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:632
transfer
Section titled “transfer”transfer:
ActorMethod<[TransferArgs],TransferResult>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:638
Transfers tokens from a subaccount of the caller to the destination address. The source address is computed from the principal of the caller and the specified subaccount. When successful, returns the index of the block containing the transaction.
transfer_fee
Section titled “transfer_fee”transfer_fee:
ActorMethod<[TransferFeeArg],TransferFee>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:642
Returns the current transfer_fee.
Account
Section titled “Account”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:13
Properties
Section titled “Properties”owner:
Principal
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:14
subaccount
Section titled “subaccount”subaccount: [] | [
SubAccount]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:15
AccountBalanceArgs
Section titled “AccountBalanceArgs”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:20
Arguments for the account_balance call.
Properties
Section titled “Properties”account
Section titled “account”account:
AccountIdentifier
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:21
AccountBalanceArgsDfx
Section titled “AccountBalanceArgsDfx”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:23
Properties
Section titled “Properties”account
Section titled “account”account:
string
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:24
Allowance
Section titled “Allowance”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:31
Properties
Section titled “Properties”allowance
Section titled “allowance”allowance:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:32
expires_at
Section titled “expires_at”expires_at: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:33
AllowanceArgs
Section titled “AllowanceArgs”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:35
Properties
Section titled “Properties”account
Section titled “account”account:
Account
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:36
spender
Section titled “spender”spender:
Account
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:37
ApproveArgs
Section titled “ApproveArgs”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:48
Properties
Section titled “Properties”amount
Section titled “amount”amount:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:53
created_at_time
Section titled “created_at_time”created_at_time: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:52
expected_allowance
Section titled “expected_allowance”expected_allowance: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:54
expires_at
Section titled “expires_at”expires_at: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:55
fee: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:49
from_subaccount
Section titled “from_subaccount”from_subaccount: [] | [
SubAccount]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:51
memo: [] | [
Uint8Array<ArrayBufferLike>]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:50
spender
Section titled “spender”spender:
Account
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:56
Archive
Section titled “Archive”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:71
Properties
Section titled “Properties”canister_id
Section titled “canister_id”canister_id:
Principal
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:72
ArchivedBlocksRange
Section titled “ArchivedBlocksRange”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:84
Properties
Section titled “Properties”callback
Section titled “callback”callback: [
Principal,string]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:90
The function that should be called to fetch the archived blocks. The range of the blocks accessible using this function is given by [from] and [len] fields above.
length
Section titled “length”length:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:98
The number of blocks that can be fetch using the callback.
start:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:94
The index of the first archived block that can be fetched using the callback.
ArchivedEncodedBlocksRange
Section titled “ArchivedEncodedBlocksRange”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:100
Properties
Section titled “Properties”callback
Section titled “callback”callback: [
Principal,string]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:101
length
Section titled “length”length:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:103
start:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:102
ArchiveOptions
Section titled “ArchiveOptions”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:74
Properties
Section titled “Properties”controller_id
Section titled “controller_id”controller_id:
Principal
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:82
cycles_for_archive_creation
Section titled “cycles_for_archive_creation”cycles_for_archive_creation: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:80
max_message_size_bytes
Section titled “max_message_size_bytes”max_message_size_bytes: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:79
max_transactions_per_response
Section titled “max_transactions_per_response”max_transactions_per_response: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:76
more_controller_ids
Section titled “more_controller_ids”more_controller_ids: [] | [
Principal[]]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:78
node_max_memory_size_bytes
Section titled “node_max_memory_size_bytes”node_max_memory_size_bytes: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:81
num_blocks_to_archive
Section titled “num_blocks_to_archive”num_blocks_to_archive:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:75
trigger_threshold
Section titled “trigger_threshold”trigger_threshold:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:77
Archives
Section titled “Archives”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:105
Properties
Section titled “Properties”archives
Section titled “archives”archives:
Archive[]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:106
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:108
Properties
Section titled “Properties”parent_hash
Section titled “parent_hash”parent_hash: [] | [
Uint8Array<ArrayBufferLike>]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:111
timestamp
Section titled “timestamp”timestamp:
TimeStamp
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:110
transaction
Section titled “transaction”transaction:
Transaction
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:109
BlockRange
Section titled “BlockRange”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:120
A prefix of the block range specified in the [GetBlocksArgs] request.
Properties
Section titled “Properties”blocks
Section titled “blocks”blocks:
Block[]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:136
A prefix of the requested block range. The index of the first block is equal to [GetBlocksArgs.from].
Note that the number of blocks might be less than the requested [GetBlocksArgs.len] for various reasons, for example:
- The query might have hit the replica with an outdated state that doesn’t have the full block range yet.
- The requested range is too large to fit into a single reply.
NOTE: the list of blocks can be empty if:
- [GetBlocksArgs.len] was zero.
- [GetBlocksArgs.from] was larger than the last block known to the canister.
ChangeArchiveOptions
Section titled “ChangeArchiveOptions”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:138
Properties
Section titled “Properties”controller_id
Section titled “controller_id”controller_id: [] | [
Principal]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:146
cycles_for_archive_creation
Section titled “cycles_for_archive_creation”cycles_for_archive_creation: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:144
max_message_size_bytes
Section titled “max_message_size_bytes”max_message_size_bytes: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:143
max_transactions_per_response
Section titled “max_transactions_per_response”max_transactions_per_response: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:140
more_controller_ids
Section titled “more_controller_ids”more_controller_ids: [] | [
Principal[]]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:142
node_max_memory_size_bytes
Section titled “node_max_memory_size_bytes”node_max_memory_size_bytes: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:145
num_blocks_to_archive
Section titled “num_blocks_to_archive”num_blocks_to_archive: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:139
trigger_threshold
Section titled “trigger_threshold”trigger_threshold: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:141
Duration
Section titled “Duration”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:148
Properties
Section titled “Properties”nanos:
number
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:150
secs:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:149
FeatureFlags
Section titled “FeatureFlags”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:152
Properties
Section titled “Properties”icrc2:
boolean
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:153
FieldsDisplay
Section titled “FieldsDisplay”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:155
Properties
Section titled “Properties”fields
Section titled “fields”fields: [
string,Icrc21Value][]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:156
intent
Section titled “intent”intent:
string
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:157
GetAllowancesArgs
Section titled “GetAllowancesArgs”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:165
The arguments for the get_allowances endpoint.
The prev_spender_id argument can be used for pagination. If specified
the endpoint returns allowances that are lexicographically greater than
(from_account_id, prev_spender_id) - start with spender after prev_spender_id.
Properties
Section titled “Properties”from_account_id
Section titled “from_account_id”from_account_id:
string
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:167
prev_spender_id
Section titled “prev_spender_id”prev_spender_id: [] | [
string]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:166
take: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:168
GetBlocksArgs
Section titled “GetBlocksArgs”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:170
Properties
Section titled “Properties”length
Section titled “length”length:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:178
Max number of blocks to fetch.
start:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:174
The index of the first block to fetch.
icrc21_consent_info
Section titled “icrc21_consent_info”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:525
Properties
Section titled “Properties”consent_message
Section titled “consent_message”consent_message:
icrc21_consent_message
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:527
metadata
Section titled “metadata”metadata:
icrc21_consent_message_metadata
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:526
icrc21_consent_message_metadata
Section titled “icrc21_consent_message_metadata”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:534
Properties
Section titled “Properties”language
Section titled “language”language:
string
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:536
utc_offset_minutes
Section titled “utc_offset_minutes”utc_offset_minutes: [
number] | []
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:535
icrc21_consent_message_request
Section titled “icrc21_consent_message_request”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:538
Properties
Section titled “Properties”arg:
Uint8Array
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:539
method
Section titled “method”method:
string
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:540
user_preferences
Section titled “user_preferences”user_preferences:
icrc21_consent_message_spec
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:541
icrc21_consent_message_spec
Section titled “icrc21_consent_message_spec”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:546
Properties
Section titled “Properties”device_spec
Section titled “device_spec”device_spec: [] | [{
GenericDisplay:null; } | {FieldsDisplay:null; }]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:548
metadata
Section titled “metadata”metadata:
icrc21_consent_message_metadata
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:547
icrc21_error_info
Section titled “icrc21_error_info”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:560
Properties
Section titled “Properties”description
Section titled “description”description:
string
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:561
InitArgs
Section titled “InitArgs”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:211
Properties
Section titled “Properties”archive_options
Section titled “archive_options”archive_options: [] | [
ArchiveOptions]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:219
feature_flags
Section titled “feature_flags”feature_flags: [] | [
FeatureFlags]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:222
icrc1_minting_account
Section titled “icrc1_minting_account”icrc1_minting_account: [] | [
Account]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:218
initial_values
Section titled “initial_values”initial_values: [
string,Tokens][]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:220
max_message_size_bytes
Section titled “max_message_size_bytes”max_message_size_bytes: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:217
minting_account
Section titled “minting_account”minting_account:
string
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:215
send_whitelist
Section titled “send_whitelist”send_whitelist:
Principal[]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:212
token_name
Section titled “token_name”token_name: [] | [
string]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:221
token_symbol
Section titled “token_symbol”token_symbol: [] | [
string]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:213
transaction_window
Section titled “transaction_window”transaction_window: [] | [
Duration]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:216
transfer_fee
Section titled “transfer_fee”transfer_fee: [] | [
Tokens]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:214
QueryBlocksResponse
Section titled “QueryBlocksResponse”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:311
The result of a “query_blocks” call.
The structure of the result is somewhat complicated because the main ledger canister might not have all the blocks that the caller requested: One or more “archive” canisters might store some of the requested blocks.
Note: as of Q4 2021 when this interface is authored, the IC doesn’t support making nested query calls within a query call.
Properties
Section titled “Properties”archived_blocks
Section titled “archived_blocks”archived_blocks:
ArchivedBlocksRange[]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:344
Encoding of instructions for fetching archived blocks whose indices fall into the requested range.
For each entry e in [archived_blocks], [e.from, e.from + len) is a sub-range
of the originally requested block range.
blocks
Section titled “blocks”blocks:
Block[]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:326
List of blocks that were available in the ledger when it processed the call.
The blocks form a contiguous range, with the first block having index [first_block_index] (see below), and the last block having index [first_block_index] + len(blocks) - 1.
The block range can be an arbitrary sub-range of the originally requested range.
certificate
Section titled “certificate”certificate: [] | [
Uint8Array<ArrayBufferLike>]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:316
System certificate for the hash of the latest block in the chain.
Only present if query_blocks is called in a non-replicated query context.
chain_length
Section titled “chain_length”chain_length:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:331
The total number of blocks in the chain.
If the chain length is positive, the index of the last block is chain_len - 1.
first_block_index
Section titled “first_block_index”first_block_index:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:336
The index of the first block in “blocks”. If the blocks vector is empty, the exact value of this field is not specified.
QueryEncodedBlocksResponse
Section titled “QueryEncodedBlocksResponse”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:346
Properties
Section titled “Properties”archived_blocks
Section titled “archived_blocks”archived_blocks:
ArchivedEncodedBlocksRange[]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:351
blocks
Section titled “blocks”blocks:
Uint8Array<ArrayBufferLike>[]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:348
certificate
Section titled “certificate”certificate: [] | [
Uint8Array<ArrayBufferLike>]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:347
chain_length
Section titled “chain_length”chain_length:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:349
first_block_index
Section titled “first_block_index”first_block_index:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:350
RemoveApprovalArgs
Section titled “RemoveApprovalArgs”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:353
Properties
Section titled “Properties”fee: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:354
from_subaccount
Section titled “from_subaccount”from_subaccount: [] | [
SubAccount]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:355
spender
Section titled “spender”spender:
AccountIdentifier
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:356
SendArgs
Section titled “SendArgs”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:361
Arguments for the send_dfx call.
Properties
Section titled “Properties”amount
Section titled “amount”amount:
Tokens
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:367
created_at_time
Section titled “created_at_time”created_at_time: [] | [
TimeStamp]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:366
fee:
Tokens
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:363
from_subaccount
Section titled “from_subaccount”from_subaccount: [] | [
SubAccount]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:365
memo:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:364
to:
string
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:362
TimeStamp
Section titled “TimeStamp”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:382
Number of nanoseconds from the UNIX epoch in UTC timezone.
Properties
Section titled “Properties”timestamp_nanos
Section titled “timestamp_nanos”timestamp_nanos:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:383
TipOfChainRes
Section titled “TipOfChainRes”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:385
Properties
Section titled “Properties”certification
Section titled “certification”certification: [] | [
Uint8Array<ArrayBufferLike>]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:386
tip_index
Section titled “tip_index”tip_index:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:387
Tokens
Section titled “Tokens”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:392
Amount of tokens, measured in 10^-8 of a token.
Properties
Section titled “Properties”e8s:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:393
Transaction
Section titled “Transaction”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:395
Properties
Section titled “Properties”created_at_time
Section titled “created_at_time”created_at_time:
TimeStamp
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:399
icrc1_memo
Section titled “icrc1_memo”icrc1_memo: [] | [
Uint8Array<ArrayBufferLike>]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:397
memo:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:396
operation
Section titled “operation”operation: [] | [
Operation]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:398
TransferArg
Section titled “TransferArg”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:401
Properties
Section titled “Properties”amount
Section titled “amount”amount:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:407
created_at_time
Section titled “created_at_time”created_at_time: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:406
fee: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:403
from_subaccount
Section titled “from_subaccount”from_subaccount: [] | [
SubAccount]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:405
memo: [] | [
Uint8Array<ArrayBufferLike>]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:404
to:
Account
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:402
TransferArgs
Section titled “TransferArgs”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:412
Arguments for the transfer call.
Properties
Section titled “Properties”amount
Section titled “amount”amount:
Tokens
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:442
The amount that the caller wants to transfer to the destination address.
created_at_time
Section titled “created_at_time”created_at_time: [] | [
TimeStamp]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:438
The point in time when the caller created this request. If null, the ledger uses current IC time as the timestamp.
fee:
Tokens
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:422
The amount that the caller pays for the transaction. Must be 10000 e8s.
from_subaccount
Section titled “from_subaccount”from_subaccount: [] | [
SubAccount]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:433
The subaccount from which the caller wants to transfer funds.
If null, the ledger uses the default (all zeros) subaccount to compute the source address.
See comments for the SubAccount type.
memo:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:427
Transaction memo.
See comments for the Memo type.
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:417
The destination account.
If the transfer is successful, the balance of this address increases by amount.
TransferFee
Section titled “TransferFee”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:480
Properties
Section titled “Properties”transfer_fee
Section titled “transfer_fee”transfer_fee:
Tokens
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:484
The fee to pay to perform a transfer
TransferFromArgs
Section titled “TransferFromArgs”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:487
Properties
Section titled “Properties”amount
Section titled “amount”amount:
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:494
created_at_time
Section titled “created_at_time”created_at_time: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:493
fee: [] | [
bigint]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:489
from:
Account
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:491
memo: [] | [
Uint8Array<ArrayBufferLike>]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:492
spender_subaccount
Section titled “spender_subaccount”spender_subaccount: [] | [
SubAccount]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:490
to:
Account
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:488
UpgradeArgs
Section titled “UpgradeArgs”Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:512
Properties
Section titled “Properties”change_archive_options
Section titled “change_archive_options”change_archive_options: [] | [
ChangeArchiveOptions]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:513
feature_flags
Section titled “feature_flags”feature_flags: [] | [
FeatureFlags]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:515
icrc1_minting_account
Section titled “icrc1_minting_account”icrc1_minting_account: [] | [
Account]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:514
Type Aliases
Section titled “Type Aliases”AccountIdentifier
Section titled “AccountIdentifier”AccountIdentifier =
Uint8Array
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:30
AccountIdentifier is a 32-byte array. The first 4 bytes is big-endian encoding of a CRC32 checksum of the last 28 bytes.
Allowances
Section titled “Allowances”Allowances =
object[]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:42
The allowances returned by the get_allowances endpoint.
Type Declaration
Section titled “Type Declaration”allowance
Section titled “allowance”allowance:
Tokens
expires_at
Section titled “expires_at”expires_at: [] | [
bigint]
from_account_id
Section titled “from_account_id”from_account_id:
TextAccountIdentifier
to_spender_id
Section titled “to_spender_id”to_spender_id:
TextAccountIdentifier
ApproveError
Section titled “ApproveError”ApproveError = {
GenericError: {error_code:bigint;message:string; }; } | {TemporarilyUnavailable:null; } | {Duplicate: {duplicate_of:Icrc1BlockIndex; }; } | {BadFee: {expected_fee:Icrc1Tokens; }; } | {AllowanceChanged: {current_allowance:Icrc1Tokens; }; } | {CreatedInFuture: {ledger_time:bigint; }; } | {TooOld:null; } | {Expired: {ledger_time:bigint; }; } | {InsufficientFunds: {balance:Icrc1Tokens; }; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:58
ApproveResult
Section titled “ApproveResult”ApproveResult = {
Ok:Icrc1BlockIndex; } | {Err:ApproveError; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:70
BlockIndex
Section titled “BlockIndex”BlockIndex =
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:116
Sequence number of a block produced by the ledger.
Icrc1BlockIndex
Section titled “Icrc1BlockIndex”Icrc1BlockIndex =
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:180
Icrc1Timestamp
Section titled “Icrc1Timestamp”Icrc1Timestamp =
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:184
Number of nanoseconds since the UNIX epoch in UTC timezone.
Icrc1Tokens
Section titled “Icrc1Tokens”Icrc1Tokens =
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:185
Icrc1TransferError
Section titled “Icrc1TransferError”Icrc1TransferError = {
GenericError: {error_code:bigint;message:string; }; } | {TemporarilyUnavailable:null; } | {BadBurn: {min_burn_amount:Icrc1Tokens; }; } | {Duplicate: {duplicate_of:Icrc1BlockIndex; }; } | {BadFee: {expected_fee:Icrc1Tokens; }; } | {CreatedInFuture: {ledger_time:bigint; }; } | {TooOld:null; } | {InsufficientFunds: {balance:Icrc1Tokens; }; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:186
Icrc1TransferResult
Section titled “Icrc1TransferResult”Icrc1TransferResult = {
Ok:Icrc1BlockIndex; } | {Err:Icrc1TransferError; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:197
icrc21_consent_message
Section titled “icrc21_consent_message”icrc21_consent_message = {
FieldsDisplayMessage:FieldsDisplay; } | {GenericDisplayMessage:string; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:529
icrc21_consent_message_response
Section titled “icrc21_consent_message_response”icrc21_consent_message_response = {
Ok:icrc21_consent_info; } | {Err:icrc21_error; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:543
icrc21_error
Section titled “icrc21_error”icrc21_error = {
GenericError: {description:string;error_code:bigint; }; } | {InsufficientPayment:icrc21_error_info; } | {UnsupportedCanisterCall:icrc21_error_info; } | {ConsentMessageUnavailable:icrc21_error_info; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:550
Type Declaration
Section titled “Type Declaration”{ GenericError: { description: string; error_code: bigint; }; }
GenericError
Section titled “GenericError”GenericError:
object
Any error not covered by the above variants.
GenericError.description
Section titled “GenericError.description”description:
string
GenericError.error_code
Section titled “GenericError.error_code”error_code:
bigint
{ InsufficientPayment: icrc21_error_info; }
InsufficientPayment
Section titled “InsufficientPayment”InsufficientPayment:
icrc21_error_info
{ UnsupportedCanisterCall: icrc21_error_info; }
UnsupportedCanisterCall
Section titled “UnsupportedCanisterCall”UnsupportedCanisterCall:
icrc21_error_info
{ ConsentMessageUnavailable: icrc21_error_info; }
ConsentMessageUnavailable
Section titled “ConsentMessageUnavailable”ConsentMessageUnavailable:
icrc21_error_info
Icrc21Value
Section titled “Icrc21Value”Icrc21Value = {
Text: {content:string; }; } | {TokenAmount: {amount:bigint;decimals:number;symbol:string; }; } | {TimestampSeconds: {amount:bigint; }; } | {DurationSeconds: {amount:bigint; }; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:200
LedgerCanisterPayload
Section titled “LedgerCanisterPayload”LedgerCanisterPayload = {
Upgrade: [] | [UpgradeArgs]; } | {Init:InitArgs; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:224
Memo =
bigint
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:231
An arbitrary number associated with a transaction.
The caller can set it in a transfer call as a correlation identifier.
Operation
Section titled “Operation”Operation = {
Approve: {allowance:Tokens;allowance_e8s:bigint;expected_allowance: [] | [Tokens];expires_at: [] | [TimeStamp];fee:Tokens;from:AccountIdentifier;spender:AccountIdentifier; }; } | {Burn: {amount:Tokens;from:AccountIdentifier;spender: [] | [AccountIdentifier]; }; } | {Mint: {amount:Tokens;to:AccountIdentifier; }; } | {Transfer: {amount:Tokens;fee:Tokens;from:AccountIdentifier;spender: [] | [Uint8Array];to:AccountIdentifier; }; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:232
QueryArchiveError
Section titled “QueryArchiveError”QueryArchiveError = {
BadFirstBlockIndex: {first_valid_index:BlockIndex;requested_index:BlockIndex; }; } | {Other: {error_code:bigint;error_message:string; }; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:267
An error indicating that the arguments passed to [QueryArchiveFn] were invalid.
Type Declaration
Section titled “Type Declaration”{ BadFirstBlockIndex: { first_valid_index: BlockIndex; requested_index: BlockIndex; }; }
BadFirstBlockIndex
Section titled “BadFirstBlockIndex”BadFirstBlockIndex:
object
[GetBlocksArgs.from] argument was smaller than the first block served by the canister that received the request.
BadFirstBlockIndex.first_valid_index
Section titled “BadFirstBlockIndex.first_valid_index”first_valid_index:
BlockIndex
BadFirstBlockIndex.requested_index
Section titled “BadFirstBlockIndex.requested_index”requested_index:
BlockIndex
{ Other: { error_code: bigint; error_message: string; }; }
Other:
object
Reserved for future use.
Other.error_code
Section titled “Other.error_code”error_code:
bigint
Other.error_message
Section titled “Other.error_message”error_message:
string
QueryArchiveFn
Section titled “QueryArchiveFn”QueryArchiveFn =
ActorMethod<[GetBlocksArgs],QueryArchiveResult>
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:287
A function that is used for fetching archived ledger blocks.
QueryArchiveResult
Section titled “QueryArchiveResult”QueryArchiveResult = {
Ok:BlockRange; } | {Err:QueryArchiveError; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:288
Type Declaration
Section titled “Type Declaration”{ Ok: BlockRange; }
Ok:
BlockRange
Successfully fetched zero or more blocks.
{ Err: QueryArchiveError; }
Err:
QueryArchiveError
The [GetBlocksArgs] request was invalid.
SubAccount
Section titled “SubAccount”SubAccount =
Uint8Array
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:374
Subaccount is an arbitrary 32-byte byte array. Ledger uses subaccounts to compute the source address, which enables one principal to control multiple ledger accounts.
TextAccountIdentifier
Section titled “TextAccountIdentifier”TextAccountIdentifier =
string
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:378
Account identifier encoded as a 64-byte ASCII hex string.
TransferError
Section titled “TransferError”TransferError = {
TxTooOld: {allowed_window_nanos:bigint; }; } | {BadFee: {expected_fee:Tokens; }; } | {TxDuplicate: {duplicate_of:BlockIndex; }; } | {TxCreatedInFuture:null; } | {InsufficientFunds: {balance:Tokens; }; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:444
Type Declaration
Section titled “Type Declaration”{ TxTooOld: { allowed_window_nanos: bigint; }; }
TxTooOld
Section titled “TxTooOld”TxTooOld:
object
The request is too old. The ledger only accepts requests created within 24 hours window. This is a non-recoverable error.
TxTooOld.allowed_window_nanos
Section titled “TxTooOld.allowed_window_nanos”allowed_window_nanos:
bigint
{ BadFee: { expected_fee: Tokens; }; }
BadFee
Section titled “BadFee”BadFee:
object
The fee that the caller specified in the transfer request was not the one that ledger expects.
The caller can change the transfer fee to the expected_fee and retry the request.
BadFee.expected_fee
Section titled “BadFee.expected_fee”expected_fee:
Tokens
{ TxDuplicate: { duplicate_of: BlockIndex; }; }
TxDuplicate
Section titled “TxDuplicate”TxDuplicate:
object
The ledger has already executed the request.
duplicate_of field is equal to the index of the block containing the original transaction.
TxDuplicate.duplicate_of
Section titled “TxDuplicate.duplicate_of”duplicate_of:
BlockIndex
{ TxCreatedInFuture: null; }
TxCreatedInFuture
Section titled “TxCreatedInFuture”TxCreatedInFuture:
null
The caller specified created_at_time that is too far in future.
The caller can retry the request later.
{ InsufficientFunds: { balance: Tokens; }; }
InsufficientFunds
Section titled “InsufficientFunds”InsufficientFunds:
object
The account specified by the caller doesn’t have enough funds.
InsufficientFunds.balance
Section titled “InsufficientFunds.balance”balance:
Tokens
TransferFeeArg
Section titled “TransferFeeArg”TransferFeeArg =
object
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:486
TransferFromError
Section titled “TransferFromError”TransferFromError = {
GenericError: {error_code:bigint;message:string; }; } | {TemporarilyUnavailable:null; } | {InsufficientAllowance: {allowance:Icrc1Tokens; }; } | {BadBurn: {min_burn_amount:Icrc1Tokens; }; } | {Duplicate: {duplicate_of:Icrc1BlockIndex; }; } | {BadFee: {expected_fee:Icrc1Tokens; }; } | {CreatedInFuture: {ledger_time:Icrc1Timestamp; }; } | {TooOld:null; } | {InsufficientFunds: {balance:Icrc1Tokens; }; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:496
TransferFromResult
Section titled “TransferFromResult”TransferFromResult = {
Ok:Icrc1BlockIndex; } | {Err:TransferFromError; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:508
TransferResult
Section titled “TransferResult”TransferResult = {
Ok:BlockIndex; } | {Err:TransferError; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:511
Value = {
Int:bigint; } | {Nat:bigint; } | {Blob:Uint8Array; } | {Text:string; }
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:520
The value returned from the [icrc1_metadata] endpoint.
Variables
Section titled “Variables”idlFactory
Section titled “idlFactory”
constidlFactory:IDL.InterfaceFactory
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:644
init()
Section titled “init()”
constinit: (args) =>IDL.Type[]
Defined in: packages/canisters/src/declarations/ledger-icp/ledger.d.ts:645
Parameters
Section titled “Parameters”typeof IDL
Returns
Section titled “Returns”IDL.Type[]