DocumentAuthorityLog
Defined in: packages/core/src/document-authority-log.ts:219
Signed role history, rooted in a genesis hash pinned outside the document transport.
Type Parameters
Section titled “Type Parameters”PrivateKey
Section titled “PrivateKey”PrivateKey
PublicKey
Section titled “PublicKey”PublicKey
DocumentKey
Section titled “DocumentKey”DocumentKey
Implements
Section titled “Implements”Accessors
Section titled “Accessors”documentId
Section titled “documentId”Get Signature
Section titled “Get Signature”get documentId():
string
Defined in: packages/core/src/document-authority-log.ts:255
Returns
Section titled “Returns”string
Implementation of
Section titled “Implementation of”genesisId
Section titled “genesisId”Get Signature
Section titled “Get Signature”get genesisId():
Uint8Array
Defined in: packages/core/src/document-authority-log.ts:258
Returns
Section titled “Returns”Uint8Array
Implementation of
Section titled “Implementation of”headId
Section titled “headId”Get Signature
Section titled “Get Signature”get headId():
Uint8Array
Defined in: packages/core/src/document-authority-log.ts:269
Returns
Section titled “Returns”Uint8Array
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”applyUpdate()
Section titled “applyUpdate()”applyUpdate(
coordinator,encoded):Promise<void>
Defined in: packages/core/src/document-authority-log.ts:420
Parameters
Section titled “Parameters”coordinator
Section titled “coordinator”encoded
Section titled “encoded”Uint8Array
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”assertCoordinator()
Section titled “assertCoordinator()”assertCoordinator(
coordinator):void
Defined in: packages/core/src/document-authority-log.ts:364
Parameters
Section titled “Parameters”coordinator
Section titled “coordinator”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”DocumentAuthority.assertCoordinator
capture()
Section titled “capture()”capture(
context):object
Defined in: packages/core/src/document-authority-log.ts:378
Own data fields and a synchronous guard that invalidates when this captured authority changes.
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”object
headId
Section titled “headId”headId:
Uint8Array<ArrayBuffer>
isCurrent
Section titled “isCurrent”isCurrent: () =>
boolean
Returns
Section titled “Returns”boolean
members
Section titled “members”members:
object[]
Implementation of
Section titled “Implementation of”controllerAtHead()
Section titled “controllerAtHead()”controllerAtHead(
head):Uint8Array<ArrayBufferLike> |undefined
Defined in: packages/core/src/document-authority-log.ts:374
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”Uint8Array<ArrayBufferLike> | undefined
exportRecords()
Section titled “exportRecords()”exportRecords():
Uint8Array<ArrayBufferLike>[]
Defined in: packages/core/src/document-authority-log.ts:272
Returns
Section titled “Returns”Uint8Array<ArrayBufferLike>[]
Implementation of
Section titled “Implementation of”DocumentAuthority.exportRecords
extendsHead()
Section titled “extendsHead()”extendsHead(
head):boolean
Defined in: packages/core/src/document-authority-log.ts:261
True only when this authenticated history contains the accepted head as a prefix.
Parameters
Section titled “Parameters”Uint8Array
Returns
Section titled “Returns”boolean
Implementation of
Section titled “Implementation of”prepareRosterUpdate()
Section titled “prepareRosterUpdate()”prepareRosterUpdate(
coordinator,encoded,admission):Promise<PreparedDocumentRosterUpdate>
Defined in: packages/core/src/document-authority-log.ts:428
Internal
Validate an exact roster and reserve its detached role update.
Parameters
Section titled “Parameters”coordinator
Section titled “coordinator”encoded
Section titled “encoded”Uint8Array
admission
Section titled “admission”DocumentRosterUpdateAdmission
Returns
Section titled “Returns”Promise<PreparedDocumentRosterUpdate>
signUpdate()
Section titled “signUpdate()”signUpdate(
context,members,controllerKey):Promise<Uint8Array<ArrayBufferLike>>
Defined in: packages/core/src/document-authority-log.ts:394
Parameters
Section titled “Parameters”context
Section titled “context”members
Section titled “members”readonly DocumentMemberAuthority[]
controllerKey
Section titled “controllerKey”PrivateKey
Returns
Section titled “Returns”Promise<Uint8Array<ArrayBufferLike>>
create()
Section titled “create()”
staticcreate<PrivateKey,PublicKey,DocumentKey>(documentId,context,members,controllerKey,auth,controlAuthority):Promise<DocumentAuthorityLog<PrivateKey,PublicKey,DocumentKey>>
Defined in: packages/core/src/document-authority-log.ts:276
Type Parameters
Section titled “Type Parameters”PrivateKey
Section titled “PrivateKey”PrivateKey
PublicKey
Section titled “PublicKey”PublicKey
DocumentKey
Section titled “DocumentKey”DocumentKey
Parameters
Section titled “Parameters”documentId
Section titled “documentId”string
context
Section titled “context”members
Section titled “members”readonly DocumentMemberAuthority[]
controllerKey
Section titled “controllerKey”PrivateKey
AuthProvider<PrivateKey, PublicKey, DocumentKey>
controlAuthority
Section titled “controlAuthority”Returns
Section titled “Returns”Promise<DocumentAuthorityLog<PrivateKey, PublicKey, DocumentKey>>
restore()
Section titled “restore()”
staticrestore<PrivateKey,PublicKey,DocumentKey>(records,pinnedGenesis,auth,controlAuthority):Promise<DocumentAuthorityLog<PrivateKey,PublicKey,DocumentKey>>
Defined in: packages/core/src/document-authority-log.ts:307
Type Parameters
Section titled “Type Parameters”PrivateKey
Section titled “PrivateKey”PrivateKey
PublicKey
Section titled “PublicKey”PublicKey
DocumentKey
Section titled “DocumentKey”DocumentKey
Parameters
Section titled “Parameters”records
Section titled “records”readonly Uint8Array<ArrayBufferLike>[]
pinnedGenesis
Section titled “pinnedGenesis”Uint8Array
AuthProvider<PrivateKey, PublicKey, DocumentKey>
controlAuthority
Section titled “controlAuthority”Returns
Section titled “Returns”Promise<DocumentAuthorityLog<PrivateKey, PublicKey, DocumentKey>>