@lelantos-org/sdk / index / InsufficientBalanceError
Class: InsufficientBalanceError
Defined in: @lelantos-org/sdk/dist/errors/funds.d.ts:20
The unspent notes of asset, all of them counted, do not reach required. Top up or send less.
Distinct from NotesHeldError: nothing is being held back, so no wait helps.
Extends
WalletError<"INSUFFICIENT_BALANCE">
Constructors
Constructor
new InsufficientBalanceError(args, opts?): InsufficientBalanceError;Defined in: @lelantos-org/sdk/dist/errors/funds.d.ts:29
Parameters
| Parameter | Type |
|---|---|
args | { asset: AssetId; available: CircuitAmount; required: CircuitAmount; } |
args.asset | AssetId |
args.available? | CircuitAmount |
args.required? | CircuitAmount |
opts? | WalletErrorOptions |
Returns
InsufficientBalanceError
Overrides
Properties
asset
readonly asset: AssetId;Defined in: @lelantos-org/sdk/dist/errors/funds.d.ts:21
available
readonly available: CircuitAmount;Defined in: @lelantos-org/sdk/dist/errors/funds.d.ts:26
Value of every unspent note of asset the spend was allowed to consider, held-back notes included, in circuit units.
cause?
optional cause?: unknown;Defined in: typescript/lib/lib.es2022.error.d.ts:26
Inherited from
code
readonly code: "INSUFFICIENT_BALANCE";Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:39
Inherited from
context
readonly context: ErrorContext;Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:46
Inherited from
details?
readonly optional details?: Readonly<Record<string, string | number | boolean>>;Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:48
Extra diagnostic scalars for this failure, when any.
Inherited from
message
message: string;Defined in: typescript/lib/lib.es5.d.ts:1077
Inherited from
name
name: string;Defined in: typescript/lib/lib.es5.d.ts:1076
Inherited from
required
readonly required: CircuitAmount;Defined in: @lelantos-org/sdk/dist/errors/funds.d.ts:28
What the spend needed, same-asset fee included, in circuit units.
retryable
readonly retryable: boolean;Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:45
Whether the same call, unchanged, may succeed later without user action: a timeout, a 5xx, notes held by an earlier spend. false means retrying as-is will fail the same way.
Inherited from
stack?
optional stack?: string;Defined in: typescript/lib/lib.es5.d.ts:1078
Inherited from
Methods
withContext()
withContext(extra): this;Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:53
Merge additional context in place and return this for rethrowing.
Parameters
| Parameter | Type |
|---|---|
extra | ErrorContext |
Returns
this