Skip to content

@lelantos-org/sdk / index / InsufficientCoverError

Class: InsufficientCoverError ​

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

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

When consolidationAttempted is false, self-spend consolidate, re-sync and retry, or pass { autoConsolidate: true }. When it is true, consolidation ran and the cover still did not appear, so repeating the same call will not help.

Extends ​

Constructors ​

Constructor ​

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

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

Parameters ​

ParameterType
args{ asset: AssetId; consolidate: ConsolidateHint[]; consolidateSum: CircuitAmount; consolidationAttempted?: boolean; reason?: InsufficientCoverReason; target: CircuitAmount; }
args.assetAssetId
args.consolidate?ConsolidateHint[]
args.consolidateSum?CircuitAmount
args.consolidationAttempted?boolean
args.reason?InsufficientCoverReason
args.target?CircuitAmount
opts?WalletErrorOptions

Returns ​

InsufficientCoverError

Overrides ​

WalletError.constructor

Properties ​

asset ​

ts
readonly asset: AssetId;

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


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/errors/base.d.ts:39

Inherited from ​

WalletError.code


consolidate ​

ts
readonly consolidate: ConsolidateHint[];

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


consolidateSum ​

ts
readonly consolidateSum: CircuitAmount;

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


consolidationAttempted ​

ts
readonly consolidationAttempted: boolean;

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

Whether consolidation ran before this was thrown.


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


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


reason ​

ts
readonly reason: InsufficientCoverReason;

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


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


stack? ​

ts
optional stack?: string;

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

Inherited from ​

WalletError.stack


target ​

ts
readonly target: CircuitAmount;

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

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