Skip to content

@lelantos-org/sdk / index / NotesHeldError

Class: NotesHeldError ​

Defined in: @lelantos-org/sdk/dist/errors/funds.d.ts:60

The balance covers required, but not without notes that are held back.

retryable is true when the reserved and cooling-down notes alone make up the shortfall, so the same call succeeds once they are released (an in-flight spend settles, a reservation expires, a block arrives). It is false when only dust would close the gap: lower dustThreshold or send less.

Extends ​

Constructors ​

Constructor ​

ts
new NotesHeldError(args, opts?): NotesHeldError;

Defined in: @lelantos-org/sdk/dist/errors/funds.d.ts:72

Parameters ​

ParameterType
args{ asset: AssetId; held: HeldNotes; required: CircuitAmount; reservedUntil?: Date; spendable: CircuitAmount; }
args.assetAssetId
args.held?HeldNotes
args.required?CircuitAmount
args.reservedUntil?Date
args.spendable?CircuitAmount
opts?WalletErrorOptions

Returns ​

NotesHeldError

Overrides ​

WalletError.constructor

Properties ​

asset ​

ts
readonly asset: AssetId;

Defined in: @lelantos-org/sdk/dist/errors/funds.d.ts:61


cause? ​

ts
optional cause?: unknown;

Defined in: typescript/lib/lib.es2022.error.d.ts:26

Inherited from ​

WalletError.cause


code ​

ts
readonly code: "NOTES_HELD";

Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:39

Inherited from ​

WalletError.code


context ​

ts
readonly context: ErrorContext;

Defined in: @lelantos-org/sdk/dist/errors/base.d.ts:46

Inherited from ​

WalletError.context


details? ​

ts
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 ​

WalletError.details


held ​

ts
readonly held: HeldNotes;

Defined in: @lelantos-org/sdk/dist/errors/funds.d.ts:65


message ​

ts
message: string;

Defined in: typescript/lib/lib.es5.d.ts:1077

Inherited from ​

WalletError.message


name ​

ts
name: string;

Defined in: typescript/lib/lib.es5.d.ts:1076

Inherited from ​

WalletError.name


required ​

ts
readonly required: CircuitAmount;

Defined in: @lelantos-org/sdk/dist/errors/funds.d.ts:62


reservedUntil? ​

ts
readonly optional reservedUntil?: Date;

Defined in: @lelantos-org/sdk/dist/errors/funds.d.ts:71

When the last known reservation lapses, if any note is reserved by an earlier spend with an unknown outcome. Absent when the only reservations are spends still running in this wallet.


retryable ​

ts
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 ​

WalletError.retryable


spendable ​

ts
readonly spendable: CircuitAmount;

Defined in: @lelantos-org/sdk/dist/errors/funds.d.ts:64

Value the selector was free to use.


stack? ​

ts
optional stack?: string;

Defined in: typescript/lib/lib.es5.d.ts:1078

Inherited from ​

WalletError.stack

Methods ​

withContext() ​

ts
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 ​

ParameterType
extraErrorContext

Returns ​

this

Inherited from ​

WalletError.withContext