PreparedKeychainMerge
Defined in: packages/core/src/keychain.ts:320
Type Parameters
Section titled “Type Parameters”KeychainChange
Section titled “KeychainChange”KeychainChange
DocumentKey
Section titled “DocumentKey”DocumentKey
Properties
Section titled “Properties”changes
Section titled “changes”
readonlychanges:KeychainChange
Defined in: packages/core/src/keychain.ts:322
Detached staged state, retained for diagnostics/tests.
currentKeyId
Section titled “currentKeyId”
readonlycurrentKeyId: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.
keyIds
Section titled “keyIds”
readonlykeyIds: readonlyUint8Array<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.
Methods
Section titled “Methods”claimCommit()
Section titled “claimCommit()”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.
Returns
Section titled “Returns”commit()
Section titled “commit()”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.
Returns
Section titled “Returns”void
getKey()
Section titled “getKey()”getKey(
keyID):DocumentKey|undefined
Defined in: packages/core/src/keychain.ts:351
Look up a key hydrated by hydrateKeys() without mutating live state.
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”DocumentKey | undefined
hydrateKeys()
Section titled “hydrateKeys()”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.
Returns
Section titled “Returns”Promise<[Uint8Array<ArrayBufferLike>, DocumentKey][]>
stateCommitment()
Section titled “stateCommitment()”stateCommitment():
Promise<Uint8Array<ArrayBufferLike>>
Defined in: packages/core/src/keychain.ts:356
Commit to the detached staged logical key sequence with
computeKeychainStateCommitment.
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>