Overview
Namespaces
Section titled “Namespaces”Classes
Section titled “Classes”AccountIdentifier
Section titled “AccountIdentifier”Defined in: packages/canisters/src/ledger/icp/account_identifier.ts:23
A 32-byte account identifier used to send and receive ICP tokens.
The ICP Ledger uses the concept of an AccountIdentifier to represent accounts.
It’s a unique value derived from a principal (the identity controlling the account)
and a subaccount. This design allows a single principal to control multiple accounts
by using different subaccounts.
- https://internetcomputer.org/docs/references/ledger#_accounts
- https://internetcomputer.org/docs/defi/token-ledgers/setup/icp_ledger_setup
- https://internetcomputer.org/docs/references/ledger#_operations_transactions_blocks_transaction_ledger
Methods
Section titled “Methods”toAccountIdentifierHash()
Section titled “toAccountIdentifierHash()”toAccountIdentifierHash():
object
Defined in: packages/canisters/src/ledger/icp/account_identifier.ts:127
Returns the raw bytes wrapped in an object under the hash key.
Returns
Section titled “Returns”object
{ hash: Uint8Array } where hash is the raw 32-byte Uint8Array.
hash:
Uint8Array
toHex()
Section titled “toHex()”toHex():
string
Defined in: packages/canisters/src/ledger/icp/account_identifier.ts:100
Returns the ICP Ledger Account Identifier as a 64-character hexadecimal string. This is the format typically used to display the account identifier in a human-readable way.
Returns
Section titled “Returns”string
Hex representation (64-character string).
toNumbers()
Section titled “toNumbers()”toNumbers():
number[]
Defined in: packages/canisters/src/ledger/icp/account_identifier.ts:118
Returns the account identifier as an array of numbers.
Returns
Section titled “Returns”number[]
An array of byte values.
toUint8Array()
Section titled “toUint8Array()”toUint8Array():
Uint8Array
Defined in: packages/canisters/src/ledger/icp/account_identifier.ts:109
Returns the raw 32-byte Uint8Array of the account identifier.
Returns
Section titled “Returns”Uint8Array
The raw bytes of the account identifier.
fromHex()
Section titled “fromHex()”
staticfromHex(hex):AccountIdentifier
Defined in: packages/canisters/src/ledger/icp/account_identifier.ts:34
Creates an AccountIdentifier object from a hexadecimal string (e.g. d3e13d4777e22367532053190b6c6ccf57444a61337e996242b1abfb52cf92c8).
Validates the checksum in the process.
Parameters
Section titled “Parameters”string
The 64-character hexadecimal representation of the account identifier.
Returns
Section titled “Returns”An instance of AccountIdentifier.
Throws
Section titled “Throws”If the length is not 32 bytes or if the checksum is invalid.
fromPrincipal()
Section titled “fromPrincipal()”
staticfromPrincipal(__namedParameters):AccountIdentifier
Defined in: packages/canisters/src/ledger/icp/account_identifier.ts:68
Creates an AccountIdentifier object from a principal and optional subaccount.
When no subaccount is provided, a 32-byte array of zeros is used by default. You can use any arbitrary 32 bytes as a subaccount identifier to derive a distinct account identifier for the same principal.
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”principal
Section titled “principal”Principal
subAccount?
Section titled “subAccount?”SubAccount = ...
Returns
Section titled “Returns”An instance of AccountIdentifier.
AllowanceChangedError
Section titled “AllowanceChangedError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:57
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AllowanceChangedError(
currentAllowance):AllowanceChangedError
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:58
Parameters
Section titled “Parameters”currentAllowance
Section titled “currentAllowance”bigint
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”currentAllowance
Section titled “currentAllowance”
readonlycurrentAllowance:bigint
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:58
message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ApproveError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ApproveError.prepareStackTrace
ApproveError
Section titled “ApproveError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:7
Extends
Section titled “Extends”Extended by
Section titled “Extended by”GenericErrorTemporarilyUnavailableErrorDuplicateErrorAllowanceChangedErrorCreatedInFutureErrorTooOldErrorExpiredError
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ApproveError(
message?):ApproveError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Constructor
Section titled “Constructor”new ApproveError(
message?,options?):ApproveError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”BadFeeError
Section titled “BadFeeError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:34
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BadFeeError(
expectedFee):BadFeeError
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:35
Parameters
Section titled “Parameters”expectedFee
Section titled “expectedFee”bigint
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”expectedFee
Section titled “expectedFee”
readonlyexpectedFee:bigint
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:35
message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ConsentMessageError
Section titled “ConsentMessageError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:8
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ConsentMessageError(
message?):ConsentMessageError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Constructor
Section titled “Constructor”new ConsentMessageError(
message?,options?):ConsentMessageError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ConsentMessageUnavailableError
Section titled “ConsentMessageUnavailableError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:74
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ConsentMessageUnavailableError(
message?):ConsentMessageUnavailableError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”ConsentMessageUnavailableError
Inherited from
Section titled “Inherited from”ConsentMessageError.constructor
Constructor
Section titled “Constructor”new ConsentMessageUnavailableError(
message?,options?):ConsentMessageUnavailableError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”ConsentMessageUnavailableError
Inherited from
Section titled “Inherited from”ConsentMessageError.constructor
Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”ConsentMessageError.stackTraceLimit
Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ConsentMessageError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ConsentMessageError.prepareStackTrace
CreatedInFutureError
Section titled “CreatedInFutureError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:63
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CreatedInFutureError(
message?):CreatedInFutureError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Constructor
Section titled “Constructor”new CreatedInFutureError(
message?,options?):CreatedInFutureError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ApproveError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ApproveError.prepareStackTrace
DuplicateError
Section titled “DuplicateError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:51
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DuplicateError(
duplicateOf):DuplicateError
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:52
Parameters
Section titled “Parameters”duplicateOf
Section titled “duplicateOf”bigint
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”duplicateOf
Section titled “duplicateOf”
readonlyduplicateOf:bigint
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:52
message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ApproveError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ApproveError.prepareStackTrace
ExpiredError
Section titled “ExpiredError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:66
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ExpiredError(
ledgerTime):ExpiredError
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:67
Parameters
Section titled “Parameters”ledgerTime
Section titled “ledgerTime”bigint
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”ledgerTime
Section titled “ledgerTime”
readonlyledgerTime:bigint
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:67
message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ApproveError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ApproveError.prepareStackTrace
GenericError
Section titled “GenericError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:40
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new GenericError(
message,error_code):GenericError
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:41
Parameters
Section titled “Parameters”message
Section titled “message”string
error_code
Section titled “error_code”bigint
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”error_code
Section titled “error_code”
readonlyerror_code:bigint
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:43
message
Section titled “message”
readonlymessage:string
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:42
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ApproveError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ApproveError.prepareStackTrace
IcpIndexCanister
Section titled “IcpIndexCanister”Defined in: packages/canisters/src/ledger/icp/index.canister.ts:19
Extends
Section titled “Extends”Canister<_SERVICE>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”
protectednew IcpIndexCanister(id,service,certifiedService):IcpIndexCanister
Defined in: packages/utils/dist/services/canister.d.ts:7
Parameters
Section titled “Parameters”Principal
service
Section titled “service”certifiedService
Section titled “certifiedService”Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Canister<IcpIndexService>.constructor
Properties
Section titled “Properties”caller()
Section titled “caller()”
protectedcaller: (__namedParameters) =>_SERVICE
Defined in: packages/utils/dist/services/canister.d.ts:9
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”QueryParams
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Canister.caller
certifiedService
Section titled “certifiedService”
protectedreadonlycertifiedService:_SERVICE
Defined in: packages/utils/dist/services/canister.d.ts:6
Inherited from
Section titled “Inherited from”Canister.certifiedService
service
Section titled “service”
protectedreadonlyservice:_SERVICE
Defined in: packages/utils/dist/services/canister.d.ts:5
Inherited from
Section titled “Inherited from”Canister.service
Accessors
Section titled “Accessors”canisterId
Section titled “canisterId”Get Signature
Section titled “Get Signature”get canisterId():
Principal
Defined in: packages/utils/dist/services/canister.d.ts:8
Returns
Section titled “Returns”Principal
Inherited from
Section titled “Inherited from”Canister.canisterId
Methods
Section titled “Methods”accountBalance()
Section titled “accountBalance()”accountBalance(
params):Promise<bigint>
Defined in: packages/canisters/src/ledger/icp/index.canister.ts:45
Returns the balance of the specified account identifier.
Parameters
Section titled “Parameters”params
Section titled “params”AccountBalanceParams
The parameters to get the balance of an account.
Returns
Section titled “Returns”Promise<bigint>
The balance of the given account.
getTransactions()
Section titled “getTransactions()”getTransactions(
params):Promise<GetAccountIdentifierTransactionsResponse>
Defined in: packages/canisters/src/ledger/icp/index.canister.ts:64
Returns the transactions and balance of an ICP account.
Parameters
Section titled “Parameters”params
Section titled “params”GetTransactionsParams
The parameters to get the transactions.
Returns
Section titled “Returns”Promise<GetAccountIdentifierTransactionsResponse>
The transactions, balance and the transaction id of the oldest transaction the account has.
Throws
Section titled “Throws”IndexError
create()
Section titled “create()”
staticcreate(__namedParameters):IcpIndexCanister
Defined in: packages/canisters/src/ledger/icp/index.canister.ts:20
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”CanisterOptions<_SERVICE>
Returns
Section titled “Returns”IcpLedgerCanister
Section titled “IcpLedgerCanister”Defined in: packages/canisters/src/ledger/icp/ledger.canister.ts:33
Extends
Section titled “Extends”Canister<_SERVICE>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”
protectednew IcpLedgerCanister(id,service,certifiedService):IcpLedgerCanister
Defined in: packages/utils/dist/services/canister.d.ts:7
Parameters
Section titled “Parameters”Principal
service
Section titled “service”certifiedService
Section titled “certifiedService”Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Canister<IcpLedgerService>.constructor
Properties
Section titled “Properties”caller()
Section titled “caller()”
protectedcaller: (__namedParameters) =>_SERVICE
Defined in: packages/utils/dist/services/canister.d.ts:9
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”QueryParams
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Canister.caller
certifiedService
Section titled “certifiedService”
protectedreadonlycertifiedService:_SERVICE
Defined in: packages/utils/dist/services/canister.d.ts:6
Inherited from
Section titled “Inherited from”Canister.certifiedService
service
Section titled “service”
protectedreadonlyservice:_SERVICE
Defined in: packages/utils/dist/services/canister.d.ts:5
Inherited from
Section titled “Inherited from”Canister.service
Accessors
Section titled “Accessors”canisterId
Section titled “canisterId”Get Signature
Section titled “Get Signature”get canisterId():
Principal
Defined in: packages/utils/dist/services/canister.d.ts:8
Returns
Section titled “Returns”Principal
Inherited from
Section titled “Inherited from”Canister.canisterId
Methods
Section titled “Methods”accountBalance()
Section titled “accountBalance()”accountBalance(
params):Promise<bigint>
Defined in: packages/canisters/src/ledger/icp/ledger.canister.ts:62
Returns the balance of the specified account identifier.
If certified is true, the request is fetched as an update call, otherwise
it is fetched using a query call.
Parameters
Section titled “Parameters”params
Section titled “params”AccountBalanceParams
The parameters to get the balance of an account.
Returns
Section titled “Returns”Promise<bigint>
The balance of the given account.
Throws
Section titled “Throws”Error
icrc1Transfer()
Section titled “icrc1Transfer()”icrc1Transfer(
request):Promise<bigint>
Defined in: packages/canisters/src/ledger/icp/ledger.canister.ts:132
Transfer ICP from the caller to the destination Account.
Returns the index of the block containing the tx if it was successful.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”Promise<bigint>
Throws
Section titled “Throws”icrc21ConsentMessage()
Section titled “icrc21ConsentMessage()”icrc21ConsentMessage(
params):Promise<icrc21_consent_info>
Defined in: packages/canisters/src/ledger/icp/ledger.canister.ts:179
Fetches the consent message for a specified canister call, intended to provide a human-readable message that helps users make informed decisions.
Parameters
Section titled “Parameters”params
Section titled “params”Icrc21ConsentMessageRequest
The request parameters containing the method name, arguments, and consent preferences (e.g., language).
Returns
Section titled “Returns”Promise<icrc21_consent_info>
- A promise that resolves to the consent message response, which includes the consent message in the specified language and other related information.
Throws
Section titled “Throws”- This error is reserved for future use, in case payment extensions are introduced. For example, if consent messages, which are currently free, begin to require payments.
Throws
Section titled “Throws”- If the specified canister call is not supported.
Throws
Section titled “Throws”- If there is no consent message available.
Throws
Section titled “Throws”- For any other generic errors.
icrc2Approve()
Section titled “icrc2Approve()”icrc2Approve(
params):Promise<bigint>
Defined in: packages/canisters/src/ledger/icp/ledger.canister.ts:152
This method entitles the spender to transfer token amount on behalf of the caller from account { owner = caller; subaccount = from_subaccount }.
Reference: https://github.com/dfinity/ICRC-1/blob/main/standards/ICRC-2/index.md#icrc2_approve
Parameters
Section titled “Parameters”params
Section titled “params”The parameters to approve.
Returns
Section titled “Returns”Promise<bigint>
The block index of the approved transaction.
Throws
Section titled “Throws”If the approval fails.
metadata()
Section titled “metadata()”metadata(
params):Promise<[string,Value][]>
Defined in: packages/canisters/src/ledger/icp/ledger.canister.ts:81
Fetches the ledger metadata.
Parameters
Section titled “Parameters”params
Section titled “params”QueryParams
The parameters used to fetch the metadata, notably query or certified call.
Returns
Section titled “Returns”Promise<[string, Value][]>
The metadata of the ICP ledger. A promise that resolves to an array of metadata entries, where each entry is a tuple consisting of a string and a value.
transactionFee()
Section titled “transactionFee()”transactionFee(
params?):Promise<bigint>
Defined in: packages/canisters/src/ledger/icp/ledger.canister.ts:94
Returns the transaction fee of the ICP ledger canister.
Parameters
Section titled “Parameters”params?
Section titled “params?”QueryParams = ...
Optional query parameters for the request, defaulting to { certified: false } for backwards compatibility reason.
Returns
Section titled “Returns”Promise<bigint>
A promise that resolves to the transaction fee as a bigint.
transfer()
Section titled “transfer()”transfer(
request):Promise<bigint>
Defined in: packages/canisters/src/ledger/icp/ledger.canister.ts:112
Transfer ICP from the caller to the destination accountIdentifier.
Returns the index of the block containing the tx if it was successful.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”Promise<bigint>
Throws
Section titled “Throws”create()
Section titled “create()”
staticcreate(options):IcpLedgerCanister
Defined in: packages/canisters/src/ledger/icp/ledger.canister.ts:34
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”IcrcError
Section titled “IcrcError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:4
Extends
Section titled “Extends”Error
Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new IcrcError(
message?):IcrcError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Error.constructor
Constructor
Section titled “Constructor”new IcrcError(
message?,options?):IcrcError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Error.constructor
Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”Error.cause
message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”Error.message
name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”Error.name
stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”Error.stack
stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Error.stackTraceLimit
Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Error.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”Error.isError
prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”Error.prepareStackTrace
InsufficientFundsError
Section titled “InsufficientFundsError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:14
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InsufficientFundsError(
balance):InsufficientFundsError
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:15
Parameters
Section titled “Parameters”balance
Section titled “balance”bigint
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”balance
Section titled “balance”
readonlybalance:bigint
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:15
cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”TransferError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”TransferError.prepareStackTrace
InsufficientPaymentError
Section titled “InsufficientPaymentError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:72
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InsufficientPaymentError(
message?):InsufficientPaymentError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ConsentMessageError.constructor
Constructor
Section titled “Constructor”new InsufficientPaymentError(
message?,options?):InsufficientPaymentError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ConsentMessageError.constructor
Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”ConsentMessageError.stackTraceLimit
Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ConsentMessageError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ConsentMessageError.prepareStackTrace
InvalidAccountIDError
Section titled “InvalidAccountIDError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:12
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InvalidAccountIDError(
message?):InvalidAccountIDError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Error.constructor
Constructor
Section titled “Constructor”new InvalidAccountIDError(
message?,options?):InvalidAccountIDError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Error.constructor
Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”Error.cause
message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”Error.message
name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”Error.name
stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”Error.stack
stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Error.stackTraceLimit
Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Error.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”Error.isError
prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”Error.prepareStackTrace
InvalidSenderError
Section titled “InvalidSenderError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:10
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InvalidSenderError(
message?):InvalidSenderError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Constructor
Section titled “Constructor”new InvalidSenderError(
message?,options?):InvalidSenderError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”TransferError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”TransferError.prepareStackTrace
SubAccount
Section titled “SubAccount”Defined in: packages/canisters/src/ledger/icp/account_identifier.ts:140
A subaccount in the ICP ledger is a 32-byte identifier that allows a principal (user or canister) to control multiple independent accounts under the same principal.
https://internetcomputer.org/docs/references/ledger#_accounts
Methods
Section titled “Methods”toUint8Array()
Section titled “toUint8Array()”toUint8Array():
Uint8Array
Defined in: packages/canisters/src/ledger/icp/account_identifier.ts:218
Returns the raw 32-byte Uint8Array representing this subaccount.
Returns
Section titled “Returns”Uint8Array
A 32-byte array.
fromBytes()
Section titled “fromBytes()”
staticfromBytes(bytes):SubAccount
Defined in: packages/canisters/src/ledger/icp/account_identifier.ts:150
Creates a SubAccount from a 32‑byte array.
Parameters
Section titled “Parameters”Uint8Array
A Uint8Array of exactly 32 bytes.
Returns
Section titled “Returns”A SubAccount instance.
Throws
Section titled “Throws”If the byte array length is not 32.
fromID()
Section titled “fromID()”
staticfromID(id):SubAccount
Defined in: packages/canisters/src/ledger/icp/account_identifier.ts:189
Generates a SubAccount from a non‑negative number.
The number is encoded into the last 8 bytes of the 32‑byte array. This is a common pattern when using numbered subaccounts like 0, 1, 2…
Parameters
Section titled “Parameters”number
A non-negative integer.
Returns
Section titled “Returns”A SubAccount instance.
Throws
Section titled “Throws”If the number is negative or exceeds Number.MAX_SAFE_INTEGER.
fromPrincipal()
Section titled “fromPrincipal()”
staticfromPrincipal(principal):SubAccount
Defined in: packages/canisters/src/ledger/icp/account_identifier.ts:166
Generates a SubAccount from a principal.
The principal is embedded into the beginning of a 32‑byte array.
Parameters
Section titled “Parameters”principal
Section titled “principal”Principal
A principal to encode into the subaccount.
Returns
Section titled “Returns”A SubAccount instance.
TemporarilyUnavailableError
Section titled “TemporarilyUnavailableError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:49
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TemporarilyUnavailableError(
message?):TemporarilyUnavailableError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Constructor
Section titled “Constructor”new TemporarilyUnavailableError(
message?,options?):TemporarilyUnavailableError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ApproveError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ApproveError.prepareStackTrace
TooOldError
Section titled “TooOldError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:64
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TooOldError(
message?):TooOldError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Constructor
Section titled “Constructor”new TooOldError(
message?,options?):TooOldError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ApproveError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ApproveError.prepareStackTrace
TransferError
Section titled “TransferError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:6
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TransferError(
message?):TransferError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Constructor
Section titled “Constructor”new TransferError(
message?,options?):TransferError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”TxCreatedInFutureError
Section titled “TxCreatedInFutureError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:26
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TxCreatedInFutureError(
message?):TxCreatedInFutureError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Constructor
Section titled “Constructor”new TxCreatedInFutureError(
message?,options?):TxCreatedInFutureError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”TransferError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”TransferError.prepareStackTrace
TxDuplicateError
Section titled “TxDuplicateError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:28
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TxDuplicateError(
duplicateOf):TxDuplicateError
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:29
Parameters
Section titled “Parameters”duplicateOf
Section titled “duplicateOf”bigint
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”duplicateOf
Section titled “duplicateOf”
readonlyduplicateOf:bigint
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:29
message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”TransferError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”TransferError.prepareStackTrace
TxTooOldError
Section titled “TxTooOldError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:20
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TxTooOldError(
allowed_window_secs?):TxTooOldError
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:21
Parameters
Section titled “Parameters”allowed_window_secs?
Section titled “allowed_window_secs?”number
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Properties
Section titled “Properties”allowed_window_secs?
Section titled “allowed_window_secs?”
readonlyoptionalallowed_window_secs:number
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:21
cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”TransferError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”TransferError.prepareStackTrace
UnsupportedCanisterCallError
Section titled “UnsupportedCanisterCallError”Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:73
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new UnsupportedCanisterCallError(
message?):UnsupportedCanisterCallError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ConsentMessageError.constructor
Constructor
Section titled “Constructor”new UnsupportedCanisterCallError(
message?,options?):UnsupportedCanisterCallError
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1082
Parameters
Section titled “Parameters”message?
Section titled “message?”string
options?
Section titled “options?”ErrorOptions
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”ConsentMessageError.constructor
Properties
Section titled “Properties”cause?
Section titled “cause?”
optionalcause:unknown
Defined in: node_modules/typescript/lib/lib.es2022.error.d.ts:26
Inherited from
Section titled “Inherited from”message
Section titled “message”message:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1077
Inherited from
Section titled “Inherited from”name:
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1076
Inherited from
Section titled “Inherited from”stack?
Section titled “stack?”
optionalstack:string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1078
Inherited from
Section titled “Inherited from”stackTraceLimit
Section titled “stackTraceLimit”
staticstackTraceLimit:number
Defined in: node_modules/@types/node/globals.d.ts:67
The Error.stackTraceLimit property specifies the number of stack frames
collected by a stack trace (whether generated by new Error().stack or
Error.captureStackTrace(obj)).
The default value is 10 but may be set to any valid JavaScript number. Changes
will affect any stack trace captured after the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will not capture any frames.
Inherited from
Section titled “Inherited from”ConsentMessageError.stackTraceLimit
Methods
Section titled “Methods”captureStackTrace()
Section titled “captureStackTrace()”
staticcaptureStackTrace(targetObject,constructorOpt?):void
Defined in: node_modules/@types/node/globals.d.ts:51
Creates a .stack property on targetObject, which when accessed returns
a string representing the location in the code at which
Error.captureStackTrace() was called.
const myObject = {};Error.captureStackTrace(myObject);myObject.stack; // Similar to `new Error().stack`The first line of the trace will be prefixed with
${myObject.name}: ${myObject.message}.
The optional constructorOpt argument accepts a function. If given, all frames
above constructorOpt, including constructorOpt, will be omitted from the
generated stack trace.
The constructorOpt argument is useful for hiding implementation
details of error generation from the user. For instance:
function a() { b();}
function b() { c();}
function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error;}
a();Parameters
Section titled “Parameters”targetObject
Section titled “targetObject”object
constructorOpt?
Section titled “constructorOpt?”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”ConsentMessageError.captureStackTrace
isError()
Section titled “isError()”
staticisError(error):error is Error
Defined in: node_modules/typescript/lib/lib.esnext.error.d.ts:23
Indicates whether the argument provided is a built-in Error instance or not.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”error is Error
Inherited from
Section titled “Inherited from”prepareStackTrace()
Section titled “prepareStackTrace()”
staticprepareStackTrace(err,stackTraces):any
Defined in: node_modules/@types/node/globals.d.ts:55
Parameters
Section titled “Parameters”Error
stackTraces
Section titled “stackTraces”CallSite[]
Returns
Section titled “Returns”any
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
Inherited from
Section titled “Inherited from”ConsentMessageError.prepareStackTrace
Interfaces
Section titled “Interfaces”Icrc1TransferRequest
Section titled “Icrc1TransferRequest”Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:23
Properties
Section titled “Properties”amount
Section titled “amount”amount:
bigint
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:25
createdAt?
Section titled “createdAt?”
optionalcreatedAt:bigint
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:32
optionalfee:bigint
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:27
fromSubAccount?
Section titled “fromSubAccount?”
optionalfromSubAccount:SubAccount
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:28
icrc1Memo?
Section titled “icrc1Memo?”
optionalicrc1Memo:Uint8Array<ArrayBufferLike>
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:26
to:
Account
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:24
TransferRequest
Section titled “TransferRequest”Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:5
Properties
Section titled “Properties”amount
Section titled “amount”amount:
bigint
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:7
createdAt?
Section titled “createdAt?”
optionalcreatedAt:bigint
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:15
optionalfee:bigint
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:9
fromSubAccount?
Section titled “fromSubAccount?”
optionalfromSubAccount:number[]
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:11
optionalmemo:bigint
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:8
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:6
Type Aliases
Section titled “Type Aliases”AccountIdentifierHex
Section titled “AccountIdentifierHex”AccountIdentifierHex =
string
Defined in: packages/canisters/src/ledger/icp/types/common.ts:1
BlockHeight
Section titled “BlockHeight”BlockHeight =
bigint
Defined in: packages/canisters/src/ledger/icp/types/common.ts:2
E8s =
bigint
Defined in: packages/canisters/src/ledger/icp/types/common.ts:3
IcpLedgerCanisterOptions
Section titled “IcpLedgerCanisterOptions”IcpLedgerCanisterOptions =
CanisterOptions<_SERVICE>
Defined in: packages/canisters/src/ledger/icp/types/ledger.options.ts:4
Icrc2ApproveRequest
Section titled “Icrc2ApproveRequest”Icrc2ApproveRequest =
Omit<Icrc1TransferRequest,"to"> &object
Defined in: packages/canisters/src/ledger/icp/types/ledger_converters.ts:47
Params for an icrc2_approve.
Type Declaration
Section titled “Type Declaration”expected_allowance?
Section titled “expected_allowance?”
optionalexpected_allowance:Icrc1Tokens
expires_at?
Section titled “expires_at?”
optionalexpires_at:Icrc1Timestamp
spender
Section titled “spender”spender:
Account
The account of the spender.
The amount of tokens to approve.
The subaccount to transfer tokens from.
Approve memo.
nanoseconds since unix epoc to trigger deduplication and avoid other issues
The fee of the transfer when it’s not the default fee.
The optional allowance expected. If the expected_allowance field is set, the ledger MUST ensure that the current allowance for the spender from the caller’s account is equal to the given value and return the AllowanceChanged error otherwise.
When the approval expires. If the field is set, it’s greater than the current ledger time.
Functions
Section titled “Functions”checkAccountId()
Section titled “checkAccountId()”checkAccountId(
accountId):void
Defined in: packages/canisters/src/ledger/icp/utils/accounts.utils.ts:15
Checks account id check sum
Parameters
Section titled “Parameters”accountId
Section titled “accountId”string
Returns
Section titled “Returns”void
Throws
Section titled “Throws”InvalidAccountIDError
isIcpAccountIdentifier()
Section titled “isIcpAccountIdentifier()”isIcpAccountIdentifier(
address):boolean
Defined in: packages/canisters/src/ledger/icp/utils/accounts.utils.ts:41
Checks if a given string (or undefined) is a valid ICP account identifier.
It uses the checkAccountId function to validate the checksum, but it does not throw an error.
Parameters
Section titled “Parameters”address
Section titled “address”The putative ICP account identifier.
string | undefined
Returns
Section titled “Returns”boolean
mapIcrc1TransferError()
Section titled “mapIcrc1TransferError()”mapIcrc1TransferError(
rawTransferError):TransferError
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:104
Parameters
Section titled “Parameters”rawTransferError
Section titled “rawTransferError”Returns
Section titled “Returns”mapIcrc21ConsentMessageError()
Section titled “mapIcrc21ConsentMessageError()”mapIcrc21ConsentMessageError(
rawError):ConsentMessageError
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:187
Parameters
Section titled “Parameters”rawError
Section titled “rawError”Returns
Section titled “Returns”mapIcrc2ApproveError()
Section titled “mapIcrc2ApproveError()”mapIcrc2ApproveError(
rawApproveError):ApproveError
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:130
Parameters
Section titled “Parameters”rawApproveError
Section titled “rawApproveError”Returns
Section titled “Returns”mapTransferError()
Section titled “mapTransferError()”mapTransferError(
rawTransferError):TransferError
Defined in: packages/canisters/src/ledger/icp/errors/ledger.errors.ts:76
Parameters
Section titled “Parameters”rawTransferError
Section titled “rawTransferError”Returns
Section titled “Returns”toIcrc1TransferRawRequest()
Section titled “toIcrc1TransferRawRequest()”toIcrc1TransferRawRequest(
__namedParameters):TransferArg
Defined in: packages/canisters/src/ledger/icp/canisters/ledger/ledger.request.converts.ts:43
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”Returns
Section titled “Returns”toIcrc21ConsentMessageRawRequest()
Section titled “toIcrc21ConsentMessageRawRequest()”toIcrc21ConsentMessageRawRequest(
__namedParameters):icrc21_consent_message_request
Defined in: packages/canisters/src/ledger/icp/canisters/ledger/ledger.request.converts.ts:79
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”Icrc21ConsentMessageRequest
Returns
Section titled “Returns”icrc21_consent_message_request
toIcrc2ApproveRawRequest()
Section titled “toIcrc2ApproveRawRequest()”toIcrc2ApproveRawRequest(
__namedParameters):ApproveArgs
Defined in: packages/canisters/src/ledger/icp/canisters/ledger/ledger.request.converts.ts:59
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”Returns
Section titled “Returns”toTransferRawRequest()
Section titled “toTransferRawRequest()”toTransferRawRequest(
__namedParameters):TransferArgs
Defined in: packages/canisters/src/ledger/icp/canisters/ledger/ledger.request.converts.ts:17