Skip to content

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:434

{ TxTooOld: { allowed_window_nanos: bigint; }; }

TxTooOld: object

The request is too old. The ledger only accepts requests created within 24 hours window. This is a non-recoverable error.

allowed_window_nanos: bigint

{ BadFee: { expected_fee: Tokens; }; }

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.

expected_fee: Tokens

{ TxDuplicate: { duplicate_of: BlockIndex; }; }

TxDuplicate: object

The ledger has already executed the request. duplicate_of field is equal to the index of the block containing the original transaction.

duplicate_of: BlockIndex

{ TxCreatedInFuture: null; }

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: object

The account specified by the caller doesn’t have enough funds.

balance: Tokens