Skip to content

PreparedKeychainMerge

Defined in: packages/core/src/keychain.ts:320

KeychainChange

DocumentKey

readonly changes: KeychainChange

Defined in: packages/core/src/keychain.ts:322

Detached staged state, retained for diagnostics/tests.


readonly currentKeyId: Uint8Array<ArrayBufferLike> | undefined

Defined in: packages/core/src/keychain.ts:336

Detached ID of the staged current/final key, or undefined when empty. Security-sensitive core consumers require this to be a data property and require a genuine unshared 32-byte value for inbound BeeKEM transitions and a non-empty projection’s value to match its final keyIds entry.


readonly keyIds: readonly Uint8Array<ArrayBufferLike>[]

Defined in: packages/core/src/keychain.ts:329

Detached key IDs in the staged provider’s canonical history order. Security-sensitive core consumers require a dense ordinary array of at most MAX_KEYCHAIN_EPOCHS own data elements containing genuine unshared 32-byte IDs; accessor-backed IDs are not invoked.

claimCommit(): PreparedCommitClaim

Defined in: packages/core/src/keychain.ts:367

Claim the staged base identity and revision without changing the live keychain. Both claimCommit() and commit() must reject a replaced base, including a replacement with the same numeric revision, before publishing any state.

The method and returned finalizer have the same composed-commit contract as PreparedACLChange.claimCommit(). Workflows that compose this merge with another provider transition must compose claims instead of sequencing independently fallible commit() calls.

PreparedCommitClaim


commit(): void

Defined in: packages/core/src/keychain.ts:373

Synchronous, single-use, atomic live-state commit. Keys already hydrated through this staged view MUST become immediately available from the live keychain’s getKey() when commit returns.

void


getKey(keyID): DocumentKey | undefined

Defined in: packages/core/src/keychain.ts:351

Look up a key hydrated by hydrateKeys() without mutating live state.

Uint8Array

DocumentKey | undefined


hydrateKeys(): Promise<[Uint8Array<ArrayBufferLike>, DocumentKey][]>

Defined in: packages/core/src/keychain.ts:349

Validate, import, and hydrate the detached staged keychain. If hydration is started, it must complete before claiming. Hydration started after a successful claim must reject. Prepared methods consumed by core transaction wrappers must resolve through data-property function descriptors rather than accessors. The resolved list must be a dense ordinary array of own-data two-element arrays [keyId, key], bounded by MAX_KEYCHAIN_EPOCHS. It must contain every detached keyIds entry exactly once in the same canonical history order, with a genuine unshared 32-byte ID and a non-undefined key. Each ID must also resolve through the captured getKey() method before the merge is claimed.

Promise<[Uint8Array<ArrayBufferLike>, DocumentKey][]>


stateCommitment(): Promise<Uint8Array<ArrayBufferLike>>

Defined in: packages/core/src/keychain.ts:356

Commit to the detached staged logical key sequence with computeKeychainStateCommitment.

Promise<Uint8Array<ArrayBufferLike>>