Skip to content

InMemoryGroupSecurityRollbackAnchor

Defined in: packages/core/src/group-security-rollback-anchor.ts:141

Reference implementation for tests and same-process development only. Keeping this object beside an in-memory store is not rollback-resistant.

new InMemoryGroupSecurityRollbackAnchor(): InMemoryGroupSecurityRollbackAnchor

InMemoryGroupSecurityRollbackAnchor

advance(keyValue, expectedValue, nextValue): Promise<boolean>

Defined in: packages/core/src/group-security-rollback-anchor.ts:198

Install next while expected is current and clear every intent.

GroupStateStoreKey

GroupSecurityRollbackAnchorValue | undefined

GroupSecurityRollbackAnchorValue

Promise<boolean>

DurableGroupSecurityRollbackAnchor.advance


load(keyValue): Promise<GroupSecurityRollbackAnchorValue | undefined>

Defined in: packages/core/src/group-security-rollback-anchor.ts:148

GroupStateStoreKey

Promise<GroupSecurityRollbackAnchorValue | undefined>

DurableGroupSecurityRollbackAnchor.load


loadIntents(keyValue): Promise<readonly GroupSecurityRollbackIntent[]>

Defined in: packages/core/src/group-security-rollback-anchor.ts:158

Return the intents recorded beside the current value, oldest first.

GroupStateStoreKey

Promise<readonly GroupSecurityRollbackIntent[]>

DurableGroupSecurityRollbackAnchor.loadIntents


poison(keyValue, forkPoisonValue, initialValue?): Promise<GroupSecurityRollbackAnchorValue>

Defined in: packages/core/src/group-security-rollback-anchor.ts:222

Atomically and irreversibly poison whichever active value is current and clear every intent.

GroupStateStoreKey

GroupSecurityRollbackForkPoison

GroupSecurityRollbackAnchorValue

Promise<GroupSecurityRollbackAnchorValue>

DurableGroupSecurityRollbackAnchor.poison


prepare(keyValue, expectedValue, intentValue): Promise<boolean>

Defined in: packages/core/src/group-security-rollback-anchor.ts:167

Add intent beside the current value while expected is current (undefined before the first anchor). The intent must extend expected. An identical intent is kept once. Beyond MAX_GROUP_SECURITY_ROLLBACK_INTENTS, the oldest is dropped. Return false when expected is not current.

GroupStateStoreKey

GroupSecurityRollbackAnchorValue | undefined

GroupSecurityRollbackIntent

Promise<boolean>

DurableGroupSecurityRollbackAnchor.prepare


retire(keyValue, expectedValue, removalValue): Promise<boolean>

Defined in: packages/core/src/group-security-rollback-anchor.ts:262

Durably and atomically retire the exact active position after a verified removal. The caller authenticates the control and protocol Commit first. Retrying the identical expected position and marker is idempotent. A different current position returns false without changing state. Once written, the marker prevents every later active advance, including after store rollback, and every intent is cleared. Return true only after the exact terminal marker is durably retained.

GroupStateStoreKey

GroupSecurityRollbackAnchorValue

GroupSecurityRollbackRemoval

Promise<boolean>

DurableGroupSecurityRollbackAnchor.retire