Skip to content

@armada/sdk / index / PositionGapError

Class: PositionGapError ​

Defined in: src/errors.ts:93

An append-only merkletree received a leaf whose position isn't the tree's next slot (SPEC §4.3) — a gap that would corrupt every later proof. Typed so the quick-sync fallback classifier reports it as position-gap by code, not by matching message text.

expected/received (when set) tell the two failure shapes apart: received > expected means the local tree is MISSING leaves (it skipped part of the chain — rescan it); received < expected means a leaf arrived that the tree already holds (a re-sent or re-included commitment).

Extends ​

Constructors ​

Constructor ​

new PositionGapError(message, options?): PositionGapError

Defined in: src/errors.ts:97

Parameters ​

message ​

string

options? ​
expected? ​

number

received? ​

number

cause? ​

unknown

Returns ​

PositionGapError

Overrides ​

ArmadaError.constructor

Properties ​

code ​

readonly code: "POSITION_GAP" = 'POSITION_GAP'

Defined in: src/errors.ts:94

Overrides ​

ArmadaError.code


expected? ​

readonly optional expected?: number

Defined in: src/errors.ts:95


received? ​

readonly optional received?: number

Defined in: src/errors.ts:96