Skip to content

@lelantos-org/sdk / core/errors / InsufficientCoverError

Class: InsufficientCoverError โ€‹

Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:160

The balance covers target, but no combination within the circuit's input arity does. Merging the notes in consolidate into one fixes it.

consolidationAttempted distinguishes the two ways this is reached, which a caller has to tell apart to say anything useful:

  • false โ€” the caller did not ask for consolidation. Self-spend consolidate, re-sync, and retry, or pass { autoConsolidate: true }.
  • true โ€” consolidation ran and the cover still did not appear. Repeating the same call will not help; suggesting autoConsolidate here is what the old single-message version wrongly did.

Extends โ€‹

Constructors โ€‹

Constructor โ€‹

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

Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:167

Parameters โ€‹

ParameterType
args{ asset: bigint; consolidate: ConsolidateHint[]; consolidateSum: bigint; consolidationAttempted?: boolean; target: bigint; }
args.assetbigint
args.consolidate?ConsolidateHint[]
args.consolidateSum?bigint
args.consolidationAttempted?boolean
args.target?bigint
opts?WalletErrorOptions

Returns โ€‹

InsufficientCoverError

Overrides โ€‹

WalletError.constructor

Properties โ€‹

asset โ€‹

ts
readonly asset: bigint;

Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:162


cause? โ€‹

ts
optional cause?: unknown;

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

Inherited from โ€‹

WalletError.cause


code โ€‹

ts
readonly code: "INSUFFICIENT_COVER";

Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:42

Inherited from โ€‹

WalletError.code


consolidate โ€‹

ts
readonly consolidate: ConsolidateHint[];

Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:163


consolidateSum โ€‹

ts
readonly consolidateSum: bigint;

Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:164


consolidationAttempted โ€‹

ts
readonly consolidationAttempted: boolean;

Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:166

Whether consolidation ran before this was thrown.


context โ€‹

ts
readonly context: ErrorContext;

Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:43

Inherited from โ€‹

WalletError.context


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


stack? โ€‹

ts
optional stack?: string;

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

Inherited from โ€‹

WalletError.stack


target โ€‹

ts
readonly target: bigint;

Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:161

Methods โ€‹

withContext() โ€‹

ts
withContext(extra): this;

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

Merge additional context in place and return this for rethrowing.

Parameters โ€‹

ParameterType
extraErrorContext

Returns โ€‹

this

Inherited from โ€‹

WalletError.withContext

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub