@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-spendconsolidate, 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; suggestingautoConsolidatehere is what the old single-message version wrongly did.
Extends โ
WalletError<"INSUFFICIENT_COVER">
Constructors โ
Constructor โ
new InsufficientCoverError(args, opts?): InsufficientCoverError;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:167
Parameters โ
| Parameter | Type |
|---|---|
args | { asset: bigint; consolidate: ConsolidateHint[]; consolidateSum: bigint; consolidationAttempted?: boolean; target: bigint; } |
args.asset | bigint |
args.consolidate? | ConsolidateHint[] |
args.consolidateSum? | bigint |
args.consolidationAttempted? | boolean |
args.target? | bigint |
opts? | WalletErrorOptions |
Returns โ
InsufficientCoverError
Overrides โ
Properties โ
asset โ
readonly asset: bigint;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:162
cause? โ
optional cause?: unknown;Defined in: typescript/lib/lib.es2022.error.d.ts:26
Inherited from โ
code โ
readonly code: "INSUFFICIENT_COVER";Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:42
Inherited from โ
consolidate โ
readonly consolidate: ConsolidateHint[];Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:163
consolidateSum โ
readonly consolidateSum: bigint;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:164
consolidationAttempted โ
readonly consolidationAttempted: boolean;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:166
Whether consolidation ran before this was thrown.
context โ
readonly context: ErrorContext;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:43
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 โ
stack? โ
optional stack?: string;Defined in: typescript/lib/lib.es5.d.ts:1078
Inherited from โ
target โ
readonly target: bigint;Defined in: @lelantos-org/sdk/dist/core/errors.d.ts:161
Methods โ
withContext() โ
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 โ
| Parameter | Type |
|---|---|
extra | ErrorContext |
Returns โ
this