API reference · Browser and Node

# @toip-tools/eventlog

133 public exports.

Module import:

```ts
import { aidDid, aidOfDid, aidOfDidKey } from "@toip-tools/eventlog";
```

## Functions

- [`aidDid`](https://toip.tools/toolkit/eventlog/api/aidDid/)

  The DID we use for an AID.

- [`aidOfDid`](https://toip.tools/toolkit/eventlog/api/aidOfDid/)

- [`aidOfDidKey`](https://toip.tools/toolkit/eventlog/api/aidOfDidKey/)

- [`anchoredIn`](https://toip.tools/toolkit/eventlog/api/anchoredIn/)

  Where a digest is anchored: KEL seals {d}, and trail entries' \`a\` or \`x\`.

- [`attachmentsOf`](https://toip.tools/toolkit/eventlog/api/attachmentsOf/)

  The CESR text of a message's attachments.

- [`bindingDigest`](https://toip.tools/toolkit/eventlog/api/bindingDigest/)

  The binding's digest: Blake3-256 of JCS of the document with its proof.

- [`bindingSeal`](https://toip.tools/toolkit/eventlog/api/bindingSeal/)

- [`buildIcp`](https://toip.tools/toolkit/eventlog/api/buildIcp/)

- [`buildIxn`](https://toip.tools/toolkit/eventlog/api/buildIxn/)

- [`buildRct`](https://toip.tools/toolkit/eventlog/api/buildRct/)

- [`buildRot`](https://toip.tools/toolkit/eventlog/api/buildRot/)

- [`buildTcl`](https://toip.tools/toolkit/eventlog/api/buildTcl/)

- [`buildTen`](https://toip.tools/toolkit/eventlog/api/buildTen/)

- [`buildTin`](https://toip.tools/toolkit/eventlog/api/buildTin/)

- [`buildTrc`](https://toip.tools/toolkit/eventlog/api/buildTrc/)

  A receipt or endorsement of a trail message.

- [`checkBody`](https://toip.tools/toolkit/eventlog/api/checkBody/)

- [`checkTrailRef`](https://toip.tools/toolkit/eventlog/api/checkTrailRef/)

  Checks a trailRef {i, s, d} against a witness: fetches the entry, its receipts and the controller's KEL, and verifies them.

- [`coldKeysFromSeed`](https://toip.tools/toolkit/eventlog/api/coldKeysFromSeed/)

  Key set j is HKDF-SHA256(seed, salt "zk-toip/eventlog", info "\<label>/\<j>/\<n>").

- [`decode`](https://toip.tools/toolkit/eventlog/api/decode/)

- [`decodeIndexedSig`](https://toip.tools/toolkit/eventlog/api/decodeIndexedSig/)

- [`decodeKeyRefSig`](https://toip.tools/toolkit/eventlog/api/decodeKeyRefSig/)

- [`didKeyOf`](https://toip.tools/toolkit/eventlog/api/didKeyOf/)

- [`digest`](https://toip.tools/toolkit/eventlog/api/digest/)

  Blake3-256 digest, code E.

- [`digestSeal`](https://toip.tools/toolkit/eventlog/api/digestSeal/)

  A digest seal {d} for 32 raw digest bytes: SHA-256 (code I, the default, as capture's Merkle roots) or Blake3 (code E).

- [`disclose`](https://toip.tools/toolkit/eventlog/api/disclose/)

  Sends a bundle (with the bodies chosen for this reader) over TSP: \`trail/disclose\`.

- [`ed25519Signer`](https://toip.tools/toolkit/eventlog/api/ed25519Signer/)

- [`encode`](https://toip.tools/toolkit/eventlog/api/encode/)

- [`encodeIndexedSig`](https://toip.tools/toolkit/eventlog/api/encodeIndexedSig/)

- [`encodeKeyRefSig`](https://toip.tools/toolkit/eventlog/api/encodeKeyRefSig/)

- [`endorse`](https://toip.tools/toolkit/eventlog/api/endorse/)

  An endorsement of a trail entry by a did:key identity (a counterparty, a principal).

- [`evidenceFromJson`](https://toip.tools/toolkit/eventlog/api/evidenceFromJson/)

- [`evidenceToJson`](https://toip.tools/toolkit/eventlog/api/evidenceToJson/)

- [`exportBundle`](https://toip.tools/toolkit/eventlog/api/exportBundle/)

  Everything needed to verify an AID's logs offline: KEL (all versions, so recoveries show), trails with receipts and endorsements,

- [`fetchTrail`](https://toip.tools/toolkit/eventlog/api/fetchTrail/)

  For a watcher or explorer: a trail's stream, and the KEL, from one source.

- [`fromCompact`](https://toip.tools/toolkit/eventlog/api/fromCompact/)

  Rebuilds the exact JSON and checks the SAID.

- [`fromCompactLog`](https://toip.tools/toolkit/eventlog/api/fromCompactLog/)

- [`fromStream`](https://toip.tools/toolkit/eventlog/api/fromStream/)

  Parses a stream.

- [`httpWitnessClient`](https://toip.tools/toolkit/eventlog/api/httpWitnessClient/)

- [`isCurrentAt`](https://toip.tools/toolkit/eventlog/api/isCurrentAt/)

  Whether the keys made current at \`estSn\` were current at event \`atSn\`.

- [`isQb64`](https://toip.tools/toolkit/eventlog/api/isQb64/)

- [`keyAt`](https://toip.tools/toolkit/eventlog/api/keyAt/)

  Keys made current by the establishment event at \`estSn\`.

- [`keyQb64`](https://toip.tools/toolkit/eventlog/api/keyQb64/)

  The signer's public key as a transferable KERI key: D (Ed25519) or 1AAJ (P-256).

- [`localWitnessClient`](https://toip.tools/toolkit/eventlog/api/localWitnessClient/)

  A client for a witness in the same process.

- [`makeBinding`](https://toip.tools/toolkit/eventlog/api/makeBinding/)

- [`makeBody`](https://toip.tools/toolkit/eventlog/api/makeBody/)

  Makes a body: adds a random salt \`u\` and its SAID \`d\`.

- [`makeReceipt`](https://toip.tools/toolkit/eventlog/api/makeReceipt/)

  A witness receipt.

- [`nextKeyDigest`](https://toip.tools/toolkit/eventlog/api/nextKeyDigest/)

  Digest of a public key's qb64 text, as KERIpy and signify-ts compute next-key digests.

- [`nonTransferableAid`](https://toip.tools/toolkit/eventlog/api/nonTransferableAid/)

- [`onDisclose`](https://toip.tools/toolkit/eventlog/api/onDisclose/)

- [`onDuplicity`](https://toip.tools/toolkit/eventlog/api/onDuplicity/)

- [`p256Signer`](https://toip.tools/toolkit/eventlog/api/p256Signer/)

- [`parseMessage`](https://toip.tools/toolkit/eventlog/api/parseMessage/)

  Parses raw message text: version, size, type, exact field order, canonical form, and SAID.

- [`problem`](https://toip.tools/toolkit/eventlog/api/problem/)

- [`reportDuplicity`](https://toip.tools/toolkit/eventlog/api/reportDuplicity/)

  Sends duplicity evidence to someone who relies on the log: \`trail/duplicity\`.

- [`retiredAt`](https://toip.tools/toolkit/eventlog/api/retiredAt/)

  The sn of the rotation that retired the keys of \`estSn\`, or null if they are current.

- [`saidify`](https://toip.tools/toolkit/eventlog/api/saidify/)

  Fills the version string and SAID fields.

- [`serveWitnessTasks`](https://toip.tools/toolkit/eventlog/api/serveWitnessTasks/)

  Serves a witness on an endpoint whose identity is the witness's own key (its did:key).

- [`signerFromIdentity`](https://toip.tools/toolkit/eventlog/api/signerFromIdentity/)

  Reuses a did:key identity's Ed25519 key.

- [`stateOf`](https://toip.tools/toolkit/eventlog/api/stateOf/)

  The establishment state made current by the event at \`estSn\`.

- [`taskWitnessClient`](https://toip.tools/toolkit/eventlog/api/taskWitnessClient/)

  A witness reached over TSP at its did:key.

- [`toCompact`](https://toip.tools/toolkit/eventlog/api/toCompact/)

- [`toCompactLog`](https://toip.tools/toolkit/eventlog/api/toCompactLog/)

  A whole log in compact form: its trunk messages in order, with their witness signatures,

- [`toStream`](https://toip.tools/toolkit/eventlog/api/toStream/)

- [`verifyBinding`](https://toip.tools/toolkit/eventlog/api/verifyBinding/)

- [`verifyBundle`](https://toip.tools/toolkit/eventlog/api/verifyBundle/)

- [`verifyEvidence`](https://toip.tools/toolkit/eventlog/api/verifyEvidence/)

  Checks evidence with only the evidence and the controller's KEL.

- [`verifyKel`](https://toip.tools/toolkit/eventlog/api/verifyKel/)

  Verifies a KEL stream or message list.

- [`verifyKeySig`](https://toip.tools/toolkit/eventlog/api/verifyKeySig/)

  Verifies one indexed signature by a transferable key over \`message\`.

- [`verifySignature`](https://toip.tools/toolkit/eventlog/api/verifySignature/)

  Checks a signature made outside the log against the key state it names, and whether it was anchored while that key was current.

- [`verifyTrail`](https://toip.tools/toolkit/eventlog/api/verifyTrail/)

- [`versionString`](https://toip.tools/toolkit/eventlog/api/versionString/)

- [`webAuthnSigner`](https://toip.tools/toolkit/eventlog/api/webAuthnSigner/)

  A hook for passkeys.

- [`webCryptoSigner`](https://toip.tools/toolkit/eventlog/api/webCryptoSigner/)

  A WebCrypto key pair (Ed25519 or ECDSA P-256).

- [`witnessHttpHandler`](https://toip.tools/toolkit/eventlog/api/witnessHttpHandler/)

  Routes, relative to wherever the handler is mounted:

## Classes

- [`Controller`](https://toip.tools/toolkit/eventlog/api/Controller/)

- [`KelProcessor`](https://toip.tools/toolkit/eventlog/api/KelProcessor/)

  Processes KEL events and receipts one at a time.

- [`MemoryStore`](https://toip.tools/toolkit/eventlog/api/MemoryStore/)

- [`Trail`](https://toip.tools/toolkit/eventlog/api/Trail/)

- [`TrailProcessor`](https://toip.tools/toolkit/eventlog/api/TrailProcessor/)

  Processes a trail's messages against a verified KEL.

- [`Watcher`](https://toip.tools/toolkit/eventlog/api/Watcher/)

- [`Witness`](https://toip.tools/toolkit/eventlog/api/Witness/)

- [`WitnessError`](https://toip.tools/toolkit/eventlog/api/WitnessError/)

## Interfaces

- [`Anchor`](https://toip.tools/toolkit/eventlog/api/Anchor/)

- [`Body`](https://toip.tools/toolkit/eventlog/api/Body/)

  A body: JSON with its SAID \`d\` and a random salt \`u\`.

- [`Bundle`](https://toip.tools/toolkit/eventlog/api/Bundle/)

- [`BundleResult`](https://toip.tools/toolkit/eventlog/api/BundleResult/)

- [`ColdKeys`](https://toip.tools/toolkit/eventlog/api/ColdKeys/)

- [`Couple`](https://toip.tools/toolkit/eventlog/api/Couple/)

- [`DidBinding`](https://toip.tools/toolkit/eventlog/api/DidBinding/)

- [`DuplicityEvidence`](https://toip.tools/toolkit/eventlog/api/DuplicityEvidence/)

- [`InceptOptions`](https://toip.tools/toolkit/eventlog/api/InceptOptions/)

- [`IndexedSig`](https://toip.tools/toolkit/eventlog/api/IndexedSig/)

- [`KelEvent`](https://toip.tools/toolkit/eventlog/api/KelEvent/)

- [`KelResult`](https://toip.tools/toolkit/eventlog/api/KelResult/)

- [`KeyRef`](https://toip.tools/toolkit/eventlog/api/KeyRef/)

- [`KeyRefSig`](https://toip.tools/toolkit/eventlog/api/KeyRefSig/)

  A \`-F\` group: the key state that signed, and its indexed signatures.

- [`KeyState`](https://toip.tools/toolkit/eventlog/api/KeyState/)

- [`LogStore`](https://toip.tools/toolkit/eventlog/api/LogStore/)

- [`Problem`](https://toip.tools/toolkit/eventlog/api/Problem/)

- [`PublishReport`](https://toip.tools/toolkit/eventlog/api/PublishReport/)

- [`RotateOptions`](https://toip.tools/toolkit/eventlog/api/RotateOptions/)

- [`SignatureCheck`](https://toip.tools/toolkit/eventlog/api/SignatureCheck/)

- [`SignedMessage`](https://toip.tools/toolkit/eventlog/api/SignedMessage/)

- [`Signer`](https://toip.tools/toolkit/eventlog/api/Signer/)

- [`SigOptions`](https://toip.tools/toolkit/eventlog/api/SigOptions/)

- [`StoreData`](https://toip.tools/toolkit/eventlog/api/StoreData/)

- [`StoredMessage`](https://toip.tools/toolkit/eventlog/api/StoredMessage/)

- [`StoredReceipt`](https://toip.tools/toolkit/eventlog/api/StoredReceipt/)

- [`TrailEntry`](https://toip.tools/toolkit/eventlog/api/TrailEntry/)

- [`TrailRefCheck`](https://toip.tools/toolkit/eventlog/api/TrailRefCheck/)

- [`TrailResult`](https://toip.tools/toolkit/eventlog/api/TrailResult/)

- [`TrailVerifyOptions`](https://toip.tools/toolkit/eventlog/api/TrailVerifyOptions/)

- [`VerifyOptions`](https://toip.tools/toolkit/eventlog/api/VerifyOptions/)

- [`WebAuthnAssertion`](https://toip.tools/toolkit/eventlog/api/WebAuthnAssertion/)

- [`WebAuthnPolicy`](https://toip.tools/toolkit/eventlog/api/WebAuthnPolicy/)

- [`WebAuthnWrap`](https://toip.tools/toolkit/eventlog/api/WebAuthnWrap/)

  A WebAuthn assertion that wraps a P-256 signature.

- [`WitnessClient`](https://toip.tools/toolkit/eventlog/api/WitnessClient/)

- [`WrappedSignature`](https://toip.tools/toolkit/eventlog/api/WrappedSignature/)

  What a signer returns: a 64-byte signature, or one wrapped in a WebAuthn assertion.

## Types

- [`Curve`](https://toip.tools/toolkit/eventlog/api/Curve/)

- [`EntryStatus`](https://toip.tools/toolkit/eventlog/api/EntryStatus/)

- [`EventStatus`](https://toip.tools/toolkit/eventlog/api/EventStatus/)

- [`IndexedSigCode`](https://toip.tools/toolkit/eventlog/api/IndexedSigCode/)

  Indexed signature codes: A/B/2A/2B for Ed25519, E/F/2E/2F for ECDSA P-256.

- [`MessageType`](https://toip.tools/toolkit/eventlog/api/MessageType/)

- [`ProblemCode`](https://toip.tools/toolkit/eventlog/api/ProblemCode/)

- [`Protocol`](https://toip.tools/toolkit/eventlog/api/Protocol/)

- [`Qb64`](https://toip.tools/toolkit/eventlog/api/Qb64/)

  Shared types.

- [`Refusal`](https://toip.tools/toolkit/eventlog/api/Refusal/)

- [`Seal`](https://toip.tools/toolkit/eventlog/api/Seal/)

- [`SubmitResult`](https://toip.tools/toolkit/eventlog/api/SubmitResult/)

## Constants

- [`Code`](https://toip.tools/toolkit/eventlog/api/Code/)
- [`KEL_TYPES`](https://toip.tools/toolkit/eventlog/api/KEL_TYPES/)
- [`TRAIL_TASKS`](https://toip.tools/toolkit/eventlog/api/TRAIL_TASKS/)
- [`TRAIL_TYPES`](https://toip.tools/toolkit/eventlog/api/TRAIL_TYPES/)

Signatures and source documentation are generated from [`packages/eventlog/src/index.ts`](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/eventlog/src/index.ts).

---

This is the Markdown version of https://toip.tools/toolkit/eventlog/api/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
