keri-ts 0.11.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -2
- package/esm/keri/npm/src/_dnt.polyfills.js +36 -0
- package/esm/keri/npm/src/acdc/chaining.js +213 -0
- package/esm/keri/npm/src/acdc/dhking.js +716 -0
- package/esm/keri/npm/src/acdc/messaging.js +2 -0
- package/esm/keri/npm/src/acdc/observing.js +47 -40
- package/esm/keri/npm/src/acdc/regbasing.js +22 -22
- package/esm/keri/npm/src/acdc/regengine.js +88 -119
- package/esm/keri/npm/src/acdc/regeventing.js +163 -44
- package/esm/keri/npm/src/acdc/registering.js +99 -23
- package/esm/keri/npm/src/acdc/registraring.js +82 -46
- package/esm/keri/npm/src/acdc/relating.js +59 -0
- package/esm/keri/npm/src/acdc/salting.js +720 -0
- package/esm/keri/npm/src/acdc/scheming.js +103 -105
- package/esm/keri/npm/src/acdc/unblinding.js +1042 -0
- package/esm/keri/npm/src/app/{authenticating.js → bootstrap/authenticating.js} +40 -39
- package/esm/keri/npm/src/app/bootstrap/bootstrapping.js +109 -0
- package/esm/keri/npm/src/app/bootstrap/oobi-replies.js +113 -0
- package/esm/keri/npm/src/app/{oobiery.js → bootstrap/oobiery.js} +211 -267
- package/esm/keri/npm/src/app/credentials/credential-importing.js +201 -0
- package/esm/keri/npm/src/app/credentials/credential-proposals.js +120 -0
- package/esm/keri/npm/src/app/credentials/credential-revoking.js +165 -0
- package/esm/keri/npm/src/app/credentials/credential-workflows.js +365 -0
- package/esm/keri/npm/src/app/credentials/tel-publishing.js +27 -0
- package/esm/keri/npm/src/app/{verifying.js → credentials/verifying.js} +50 -45
- package/esm/keri/npm/src/app/delivery/forwarding.js +600 -0
- package/esm/keri/npm/src/app/delivery/introducing.js +68 -0
- package/esm/keri/npm/src/app/delivery/reply-streams.js +230 -0
- package/esm/keri/npm/src/app/delivery/respondant.js +159 -0
- package/esm/keri/npm/src/app/delivery/stored-replies.js +53 -0
- package/esm/keri/npm/src/app/exchanges/essr.js +111 -0
- package/esm/keri/npm/src/app/exchanges/exchange-messaging.js +66 -0
- package/esm/keri/npm/src/app/exchanges/exchanging.js +1354 -0
- package/esm/keri/npm/src/app/{challenging.js → identity/challenging.js} +13 -8
- package/esm/keri/npm/src/app/{configing.js → identity/configing.js} +4 -4
- package/esm/keri/npm/src/app/{delegating.js → identity/delegating.js} +118 -40
- package/esm/keri/npm/src/app/{endpoint-roleing.js → identity/endpoint-roleing.js} +43 -39
- package/esm/keri/npm/src/app/{habbing.js → identity/habbing.js} +258 -226
- package/esm/keri/npm/src/app/{keeping.js → identity/keeping.js} +60 -56
- package/esm/keri/npm/src/app/{organizing.js → identity/organizing.js} +47 -21
- package/esm/keri/npm/src/app/{ipex-building.js → ipex/ipex-building.js} +53 -55
- package/esm/keri/npm/src/app/ipex/ipex-credentialing.js +359 -0
- package/esm/keri/npm/src/app/{ipex-graph.js → ipex/ipex-graph.js} +70 -124
- package/esm/keri/npm/src/app/ipex/ipex-grouping.js +664 -0
- package/esm/keri/npm/src/app/ipex/ipex-node-authentication.js +185 -0
- package/esm/keri/npm/src/app/ipex/ipex-v2.js +692 -0
- package/esm/keri/npm/src/app/{ipexing.js → ipex/ipexing.js} +59 -10
- package/esm/keri/npm/src/app/mailbox/forward-handler.js +228 -0
- package/esm/keri/npm/src/app/{mailbox-director.js → mailbox/mailbox-director.js} +146 -139
- package/esm/keri/npm/src/app/mailbox/mailbox-poller.js +305 -0
- package/esm/keri/npm/src/app/mailbox/mailbox-sse.js +254 -0
- package/esm/keri/npm/src/app/{mailboxing.js → mailbox/mailboxing.js} +117 -70
- package/esm/keri/npm/src/app/mailbox/topic-routing.js +54 -0
- package/esm/keri/npm/src/app/multisig/group-members.js +173 -0
- package/esm/keri/npm/src/app/multisig/grouping.js +932 -0
- package/esm/keri/npm/src/app/multisig/multisig-messaging.js +164 -0
- package/esm/keri/npm/src/app/multisig/multisig-workflows.js +821 -0
- package/esm/keri/npm/src/app/{notifying.js → notifications/notifying.js} +23 -50
- package/esm/keri/npm/src/app/notifications/signaling.js +177 -0
- package/esm/keri/npm/src/app/{parsering.js → protocol/parsering.js} +123 -53
- package/esm/keri/npm/src/app/protocol/protocol-processing.js +245 -0
- package/esm/keri/npm/src/app/protocol/reactor.js +55 -0
- package/esm/keri/npm/src/app/queries/query-replies.js +151 -0
- package/esm/keri/npm/src/app/queries/querying.js +306 -0
- package/esm/keri/npm/src/app/queries/witness-inquisitor.js +415 -0
- package/esm/keri/npm/src/app/runtime/abortable.js +103 -0
- package/esm/keri/npm/src/app/runtime/agent-runtime.js +633 -0
- package/esm/keri/npm/src/app/runtime/cue-runtime.js +61 -0
- package/esm/keri/npm/src/app/runtime/runtime-clock.js +6 -0
- package/esm/keri/npm/src/app/{byte-source.js → transport/byte-source.js} +43 -21
- package/esm/keri/npm/src/app/transport/cesr-egress.js +317 -0
- package/esm/keri/npm/src/app/{cesr-http.js → transport/cesr-http.js} +28 -78
- package/esm/keri/npm/src/app/transport/http-client.js +172 -0
- package/esm/keri/npm/src/app/transport/http-messenger.js +52 -0
- package/esm/keri/npm/src/app/transport/http-stream-messenger.js +60 -0
- package/esm/keri/npm/src/app/transport/httping.js +57 -0
- package/esm/keri/npm/src/app/transport/message-source.js +77 -0
- package/esm/keri/npm/src/app/transport/messengering.js +68 -0
- package/esm/keri/npm/src/app/{socket-source.js → transport/socket-source.js} +41 -5
- package/esm/keri/npm/src/app/transport/tcp-egress.js +377 -0
- package/esm/keri/npm/src/app/transport/tcp-messenger.js +162 -0
- package/esm/keri/npm/src/app/transport/tcp-stream-messenger.js +40 -0
- package/esm/keri/npm/src/app/transport/transport-error.js +14 -0
- package/esm/keri/npm/src/app/witness/http-endpoints.js +185 -0
- package/esm/keri/npm/src/app/witness/ingress.js +148 -0
- package/esm/keri/npm/src/app/witness/receipt-client.js +248 -0
- package/esm/keri/npm/src/app/witness/receipt-messages.js +29 -0
- package/esm/keri/npm/src/app/witness/receipting.js +323 -0
- package/esm/keri/npm/src/app/witness/registration.js +50 -0
- package/esm/keri/npm/src/cli/common/bootstrap.js +12 -0
- package/esm/keri/npm/src/{app/cli → cli}/common/context.js +47 -9
- package/esm/keri/npm/src/{app/cli → cli}/common/existing.js +9 -29
- package/esm/keri/npm/src/cli/common/parsing.js +279 -0
- package/esm/keri/npm/src/cli/common/passcode.js +66 -0
- package/esm/keri/npm/src/cli/common/tel-completion.js +24 -0
- package/esm/keri/npm/src/{app/cli → cli}/common/witness-auth.js +2 -2
- package/esm/keri/npm/src/cli/credentials/ipex.js +702 -0
- package/esm/keri/npm/src/cli/credentials/vc.js +399 -0
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/did.js +71 -53
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/ends.js +34 -31
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/loc.js +22 -20
- package/esm/keri/npm/src/cli/endpoints/oobi-clean.js +134 -0
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/oobi.js +37 -36
- package/esm/keri/npm/src/{app/cli → cli/identity}/aid.js +8 -7
- package/esm/keri/npm/src/cli/identity/challenge.js +181 -0
- package/esm/keri/npm/src/{app/cli → cli/identity}/delegate.js +88 -73
- package/esm/keri/npm/src/{app/cli → cli/identity}/export.js +9 -8
- package/esm/keri/npm/src/cli/identity/incept.js +181 -0
- package/esm/keri/npm/src/cli/identity/init.js +153 -0
- package/esm/keri/npm/src/cli/identity/interact.js +84 -0
- package/esm/keri/npm/src/{app/cli → cli/identity}/list.js +7 -6
- package/esm/keri/npm/src/cli/identity/rotate.js +172 -0
- package/esm/keri/npm/src/cli/index.js +38 -0
- package/esm/keri/npm/src/{app/cli → cli/messaging}/exchange.js +24 -24
- package/esm/keri/npm/src/cli/messaging/multisig.js +569 -0
- package/esm/keri/npm/src/{app/cli → cli/messaging}/notifications.js +26 -22
- package/esm/keri/npm/src/{app/cli → cli}/output.js +1 -1
- package/esm/keri/npm/src/cli/tools/annotate.js +25 -0
- package/esm/keri/npm/src/{app/cli → cli/tools}/benchmark.js +18 -9
- package/esm/keri/npm/src/{app/cli → cli/tools}/db-dump.js +14 -27
- package/esm/keri/npm/src/{app/cli → cli/tools}/saidify.js +3 -2
- package/esm/keri/npm/src/{app/cli → cli/tools}/sign.js +16 -10
- package/esm/keri/npm/src/{app/cli → cli/tools}/verify.js +10 -10
- package/esm/keri/npm/src/core/attachment-countering.js +31 -1
- package/esm/keri/npm/src/core/deck.js +5 -44
- package/esm/keri/npm/src/core/dispatch.js +10 -2
- package/esm/keri/npm/src/core/errors.js +5 -10
- package/esm/keri/npm/src/core/{exchange-proofing.js → exchange/exchange-proofing.js} +32 -2
- package/esm/keri/npm/src/core/{protocol-exchanging.js → exchange/protocol-exchanging.js} +47 -4
- package/esm/keri/npm/src/core/genus-framing.js +44 -0
- package/esm/keri/npm/src/core/{eventing.js → kel/eventing.js} +209 -390
- package/esm/keri/npm/src/core/kel/kever-decisions.js +70 -0
- package/esm/keri/npm/src/core/{kever.js → kel/kever.js} +84 -167
- package/esm/keri/npm/src/core/logger.js +3 -3
- package/esm/keri/npm/src/core/{kram-policy.js → mailbox/kram-policy.js} +14 -4
- package/esm/keri/npm/src/core/{kram-pruning.js → mailbox/kram-pruning.js} +5 -15
- package/esm/keri/npm/src/core/{kram-signatures.js → mailbox/kram-signatures.js} +1 -1
- package/esm/keri/npm/src/core/mailbox/kram-staging.js +149 -0
- package/esm/keri/npm/src/core/{kram-time.js → mailbox/kram-time.js} +9 -15
- package/esm/keri/npm/src/core/mailbox/kraming.js +78 -0
- package/esm/keri/npm/src/core/protocol-eventing.js +6 -1
- package/esm/keri/npm/src/core/protocol-serialization.js +9 -34
- package/esm/keri/npm/src/core/protocol-vdr-eventing.js +10 -11
- package/esm/keri/npm/src/core/records.js +0 -19
- package/esm/keri/npm/src/core/routing.js +187 -199
- package/esm/keri/npm/src/db/baser-defaults.js +11 -0
- package/esm/keri/npm/src/db/basing.js +224 -401
- package/esm/keri/npm/src/db/core/keys.js +2 -2
- package/esm/keri/npm/src/db/core/lmdber.js +123 -149
- package/esm/keri/npm/src/db/core/path-manager.js +2 -4
- package/esm/keri/npm/src/db/escrowing.js +82 -200
- package/esm/keri/npm/src/db/exchange/exchange-nests.js +54 -0
- package/esm/keri/npm/src/db/exchange/exchange-records.js +7 -0
- package/esm/keri/npm/src/db/index.js +5 -6
- package/esm/keri/npm/src/db/keeping.js +123 -6
- package/esm/keri/npm/src/db/{kram-factors.js → mailbox/kram-factors.js} +17 -50
- package/esm/keri/npm/src/db/{mailboxing.js → mailbox/mailboxing.js} +5 -8
- package/esm/keri/npm/src/db/reger.js +48 -69
- package/esm/keri/npm/src/db/{kel-replay.js → replay/kel-replay.js} +12 -24
- package/esm/keri/npm/src/db/{tel-replay.js → replay/tel-replay.js} +38 -36
- package/esm/keri/npm/src/db/{witness-replay.js → replay/witness-replay.js} +8 -14
- package/esm/keri/npm/src/db/subing.js +2 -11
- package/esm/keri/npm/src/did/keri/resolving.js +4 -18
- package/esm/keri/npm/src/did/webs/artifacts.js +21 -24
- package/esm/keri/npm/src/did/webs/designated-aliases.js +18 -48
- package/esm/keri/npm/src/did/webs/documenting.js +8 -8
- package/esm/keri/npm/src/did/webs/resolving.js +73 -74
- package/esm/keri/npm/src/library/index.js +1 -1
- package/esm/keri/npm/src/npm/cli.js +1 -1
- package/esm/keri/npm/src/npm/index.js +1 -1
- package/esm/keri/npm/src/runtime/index.js +105 -74
- package/esm/keri/npm/src/vdr/backer-state.js +55 -0
- package/esm/keri/npm/src/vdr/credential-tsn-record.js +59 -0
- package/esm/keri/npm/src/vdr/credentialing.js +84 -109
- package/esm/keri/npm/src/vdr/eventing.js +633 -251
- package/esm/keri/npm/src/vdr/registry-tsn-record.js +55 -0
- package/esm/keri/npm/src/vdr/revoking.js +90 -0
- package/esm/keri/npm/src/vdr/tel-anchor.js +29 -0
- package/esm/keri/npm/src/vdr/tel-publication.js +178 -0
- package/esm/keri/npm/src/vdr/tsn-query.js +15 -10
- package/esm/keri/npm/src/{app/version.js → version.js} +2 -2
- package/package.json +7 -21
- package/types/_dnt.polyfills.d.ts +55 -0
- package/types/_dnt.polyfills.d.ts.map +1 -1
- package/types/acdc/chaining.d.ts +35 -0
- package/types/acdc/chaining.d.ts.map +1 -0
- package/types/acdc/dhking.d.ts +136 -0
- package/types/acdc/dhking.d.ts.map +1 -0
- package/types/acdc/messaging.d.ts.map +1 -1
- package/types/acdc/observing.d.ts +19 -15
- package/types/acdc/observing.d.ts.map +1 -1
- package/types/acdc/regbasing.d.ts +8 -9
- package/types/acdc/regbasing.d.ts.map +1 -1
- package/types/acdc/regengine.d.ts +14 -28
- package/types/acdc/regengine.d.ts.map +1 -1
- package/types/acdc/regeventing.d.ts +24 -7
- package/types/acdc/regeventing.d.ts.map +1 -1
- package/types/acdc/registering.d.ts +27 -11
- package/types/acdc/registering.d.ts.map +1 -1
- package/types/acdc/registraring.d.ts +22 -22
- package/types/acdc/registraring.d.ts.map +1 -1
- package/types/acdc/relating.d.ts +21 -0
- package/types/acdc/relating.d.ts.map +1 -0
- package/types/acdc/salting.d.ts +241 -0
- package/types/acdc/salting.d.ts.map +1 -0
- package/types/acdc/scheming.d.ts +3 -2
- package/types/acdc/scheming.d.ts.map +1 -1
- package/types/acdc/unblinding.d.ts +150 -0
- package/types/acdc/unblinding.d.ts.map +1 -0
- package/types/app/bootstrap/authenticating.d.ts +54 -0
- package/types/app/bootstrap/authenticating.d.ts.map +1 -0
- package/types/app/bootstrap/bootstrapping.d.ts +45 -0
- package/types/app/bootstrap/bootstrapping.d.ts.map +1 -0
- package/types/app/bootstrap/oobi-replies.d.ts +8 -0
- package/types/app/bootstrap/oobi-replies.d.ts.map +1 -0
- package/types/app/{oobiery.d.ts → bootstrap/oobiery.d.ts} +98 -27
- package/types/app/bootstrap/oobiery.d.ts.map +1 -0
- package/types/app/credentials/credential-importing.d.ts +29 -0
- package/types/app/credentials/credential-importing.d.ts.map +1 -0
- package/types/app/credentials/credential-proposals.d.ts +27 -0
- package/types/app/credentials/credential-proposals.d.ts.map +1 -0
- package/types/app/credentials/credential-revoking.d.ts +44 -0
- package/types/app/credentials/credential-revoking.d.ts.map +1 -0
- package/types/app/credentials/credential-workflows.d.ts +149 -0
- package/types/app/credentials/credential-workflows.d.ts.map +1 -0
- package/types/app/{schema-resolving.d.ts → credentials/schema-resolving.d.ts} +2 -2
- package/types/app/credentials/schema-resolving.d.ts.map +1 -0
- package/types/app/credentials/tel-publishing.d.ts +16 -0
- package/types/app/credentials/tel-publishing.d.ts.map +1 -0
- package/types/app/{verifying.d.ts → credentials/verifying.d.ts} +20 -9
- package/types/app/credentials/verifying.d.ts.map +1 -0
- package/types/app/delivery/forwarding.d.ts +227 -0
- package/types/app/delivery/forwarding.d.ts.map +1 -0
- package/types/app/delivery/introducing.d.ts +21 -0
- package/types/app/delivery/introducing.d.ts.map +1 -0
- package/types/app/delivery/reply-streams.d.ts +49 -0
- package/types/app/delivery/reply-streams.d.ts.map +1 -0
- package/types/app/delivery/respondant.d.ts +52 -0
- package/types/app/delivery/respondant.d.ts.map +1 -0
- package/types/app/delivery/stored-replies.d.ts +11 -0
- package/types/app/delivery/stored-replies.d.ts.map +1 -0
- package/types/app/exchanges/essr.d.ts +53 -0
- package/types/app/exchanges/essr.d.ts.map +1 -0
- package/types/app/exchanges/exchange-messaging.d.ts +73 -0
- package/types/app/exchanges/exchange-messaging.d.ts.map +1 -0
- package/types/app/exchanges/exchanging.d.ts +379 -0
- package/types/app/exchanges/exchanging.d.ts.map +1 -0
- package/types/app/{challenging.d.ts → identity/challenging.d.ts} +9 -3
- package/types/app/identity/challenging.d.ts.map +1 -0
- package/types/app/{configing.d.ts → identity/configing.d.ts} +1 -1
- package/types/app/identity/configing.d.ts.map +1 -0
- package/types/app/{delegating.d.ts → identity/delegating.d.ts} +59 -17
- package/types/app/identity/delegating.d.ts.map +1 -0
- package/types/app/identity/endpoint-roleing.d.ts +54 -0
- package/types/app/identity/endpoint-roleing.d.ts.map +1 -0
- package/types/app/{habbing.d.ts → identity/habbing.d.ts} +86 -54
- package/types/app/identity/habbing.d.ts.map +1 -0
- package/types/app/{keeping.d.ts → identity/keeping.d.ts} +19 -5
- package/types/app/identity/keeping.d.ts.map +1 -0
- package/types/app/{organizing.d.ts → identity/organizing.d.ts} +19 -4
- package/types/app/identity/organizing.d.ts.map +1 -0
- package/types/app/{ipex-building.d.ts → ipex/ipex-building.d.ts} +5 -5
- package/types/app/ipex/ipex-building.d.ts.map +1 -0
- package/types/app/{ipex-credentialing.d.ts → ipex/ipex-credentialing.d.ts} +42 -10
- package/types/app/ipex/ipex-credentialing.d.ts.map +1 -0
- package/types/app/ipex/ipex-graph.d.ts +28 -0
- package/types/app/ipex/ipex-graph.d.ts.map +1 -0
- package/types/app/ipex/ipex-grouping.d.ts +112 -0
- package/types/app/ipex/ipex-grouping.d.ts.map +1 -0
- package/types/app/ipex/ipex-node-authentication.d.ts +32 -0
- package/types/app/ipex/ipex-node-authentication.d.ts.map +1 -0
- package/types/app/ipex/ipex-v2.d.ts +71 -0
- package/types/app/ipex/ipex-v2.d.ts.map +1 -0
- package/types/app/{ipexing.d.ts → ipex/ipexing.d.ts} +21 -8
- package/types/app/ipex/ipexing.d.ts.map +1 -0
- package/types/app/mailbox/forward-handler.d.ts +68 -0
- package/types/app/mailbox/forward-handler.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-director.d.ts +252 -0
- package/types/app/mailbox/mailbox-director.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-poller.d.ts +149 -0
- package/types/app/mailbox/mailbox-poller.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-sse.d.ts +63 -0
- package/types/app/mailbox/mailbox-sse.d.ts.map +1 -0
- package/types/app/{mailboxing.d.ts → mailbox/mailboxing.d.ts} +92 -43
- package/types/app/mailbox/mailboxing.d.ts.map +1 -0
- package/types/app/mailbox/topic-routing.d.ts +18 -0
- package/types/app/mailbox/topic-routing.d.ts.map +1 -0
- package/types/app/multisig/group-members.d.ts +60 -0
- package/types/app/multisig/group-members.d.ts.map +1 -0
- package/types/app/multisig/grouping.d.ts +317 -0
- package/types/app/multisig/grouping.d.ts.map +1 -0
- package/types/app/multisig/multisig-messaging.d.ts +97 -0
- package/types/app/multisig/multisig-messaging.d.ts.map +1 -0
- package/types/app/multisig/multisig-workflows.d.ts +85 -0
- package/types/app/multisig/multisig-workflows.d.ts.map +1 -0
- package/types/app/{notifying.d.ts → notifications/notifying.d.ts} +5 -6
- package/types/app/notifications/notifying.d.ts.map +1 -0
- package/types/app/notifications/signaling.d.ts +68 -0
- package/types/app/notifications/signaling.d.ts.map +1 -0
- package/types/app/protocol/parsering.d.ts +128 -0
- package/types/app/protocol/parsering.d.ts.map +1 -0
- package/types/app/{protocol-host-policy.d.ts → protocol/protocol-host-policy.d.ts} +1 -10
- package/types/app/protocol/protocol-host-policy.d.ts.map +1 -0
- package/types/app/protocol/protocol-processing.d.ts +140 -0
- package/types/app/protocol/protocol-processing.d.ts.map +1 -0
- package/types/app/protocol/reactor.d.ts +43 -0
- package/types/app/protocol/reactor.d.ts.map +1 -0
- package/types/app/queries/query-replies.d.ts +78 -0
- package/types/app/queries/query-replies.d.ts.map +1 -0
- package/types/app/queries/querying.d.ts +155 -0
- package/types/app/queries/querying.d.ts.map +1 -0
- package/types/app/queries/witness-inquisitor.d.ts +150 -0
- package/types/app/queries/witness-inquisitor.d.ts.map +1 -0
- package/types/app/runtime/abortable.d.ts +39 -0
- package/types/app/runtime/abortable.d.ts.map +1 -0
- package/types/app/runtime/agent-runtime.d.ts +348 -0
- package/types/app/runtime/agent-runtime.d.ts.map +1 -0
- package/types/app/runtime/cue-runtime.d.ts +33 -0
- package/types/app/runtime/cue-runtime.d.ts.map +1 -0
- package/types/app/runtime/runtime-clock.d.ts +28 -0
- package/types/app/runtime/runtime-clock.d.ts.map +1 -0
- package/types/app/runtime/runtime-turn.d.ts.map +1 -0
- package/types/app/transport/byte-source.d.ts +41 -0
- package/types/app/transport/byte-source.d.ts.map +1 -0
- package/types/app/transport/cesr-egress.d.ts +117 -0
- package/types/app/transport/cesr-egress.d.ts.map +1 -0
- package/types/app/{cesr-http.d.ts → transport/cesr-http.d.ts} +9 -33
- package/types/app/transport/cesr-http.d.ts.map +1 -0
- package/types/app/transport/http-client.d.ts +99 -0
- package/types/app/transport/http-client.d.ts.map +1 -0
- package/types/app/transport/http-messenger.d.ts +37 -0
- package/types/app/transport/http-messenger.d.ts.map +1 -0
- package/types/app/transport/http-stream-messenger.d.ts +30 -0
- package/types/app/transport/http-stream-messenger.d.ts.map +1 -0
- package/types/app/transport/httping.d.ts +19 -0
- package/types/app/transport/httping.d.ts.map +1 -0
- package/types/app/transport/message-source.d.ts +22 -0
- package/types/app/transport/message-source.d.ts.map +1 -0
- package/types/app/transport/messengering.d.ts +41 -0
- package/types/app/transport/messengering.d.ts.map +1 -0
- package/types/app/{socket-source.d.ts → transport/socket-source.d.ts} +10 -3
- package/types/app/transport/socket-source.d.ts.map +1 -0
- package/types/app/transport/tcp-egress.d.ts +118 -0
- package/types/app/transport/tcp-egress.d.ts.map +1 -0
- package/types/app/transport/tcp-messenger.d.ts +69 -0
- package/types/app/transport/tcp-messenger.d.ts.map +1 -0
- package/types/app/transport/tcp-stream-messenger.d.ts +25 -0
- package/types/app/transport/tcp-stream-messenger.d.ts.map +1 -0
- package/types/app/transport/transport-error.d.ts +12 -0
- package/types/app/transport/transport-error.d.ts.map +1 -0
- package/types/app/witness/http-endpoints.d.ts +77 -0
- package/types/app/witness/http-endpoints.d.ts.map +1 -0
- package/types/app/witness/ingress.d.ts +65 -0
- package/types/app/witness/ingress.d.ts.map +1 -0
- package/types/app/witness/receipt-client.d.ts +82 -0
- package/types/app/witness/receipt-client.d.ts.map +1 -0
- package/types/app/witness/receipt-messages.d.ts +21 -0
- package/types/app/witness/receipt-messages.d.ts.map +1 -0
- package/types/app/witness/receipting.d.ts +117 -0
- package/types/app/witness/receipting.d.ts.map +1 -0
- package/types/app/witness/registration.d.ts +27 -0
- package/types/app/witness/registration.d.ts.map +1 -0
- package/types/cli/common/bootstrap.d.ts +5 -0
- package/types/cli/common/bootstrap.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/context.d.ts +10 -9
- package/types/cli/common/context.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/existing.d.ts +2 -8
- package/types/cli/common/existing.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/parsing.d.ts +26 -15
- package/types/cli/common/parsing.d.ts.map +1 -0
- package/types/cli/common/passcode.d.ts +9 -0
- package/types/cli/common/passcode.d.ts.map +1 -0
- package/types/cli/common/rendering.d.ts.map +1 -0
- package/types/cli/common/tel-completion.d.ts +8 -0
- package/types/cli/common/tel-completion.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/witness-auth.d.ts +1 -1
- package/types/cli/common/witness-auth.d.ts.map +1 -0
- package/types/cli/credentials/ipex.d.ts +110 -0
- package/types/cli/credentials/ipex.d.ts.map +1 -0
- package/types/cli/credentials/vc.d.ts +42 -0
- package/types/cli/credentials/vc.d.ts.map +1 -0
- package/types/{app/cli → cli/endpoints}/did.d.ts +5 -1
- package/types/cli/endpoints/did.d.ts.map +1 -0
- package/types/{app/cli → cli/endpoints}/ends.d.ts +9 -1
- package/types/cli/endpoints/ends.d.ts.map +1 -0
- package/types/cli/endpoints/loc.d.ts.map +1 -0
- package/types/cli/endpoints/oobi-clean.d.ts +8 -0
- package/types/cli/endpoints/oobi-clean.d.ts.map +1 -0
- package/types/{app/cli → cli/endpoints}/oobi.d.ts +3 -1
- package/types/cli/endpoints/oobi.d.ts.map +1 -0
- package/types/cli/identity/aid.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/challenge.d.ts +5 -1
- package/types/cli/identity/challenge.d.ts.map +1 -0
- package/types/cli/identity/delegate.d.ts +4 -0
- package/types/cli/identity/delegate.d.ts.map +1 -0
- package/types/cli/identity/export.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/incept.d.ts +2 -0
- package/types/cli/identity/incept.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/init.d.ts +2 -0
- package/types/cli/identity/init.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/interact.d.ts +2 -0
- package/types/cli/identity/interact.d.ts.map +1 -0
- package/types/cli/identity/list.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/rotate.d.ts +9 -2
- package/types/cli/identity/rotate.d.ts.map +1 -0
- package/types/cli/index.d.ts +39 -0
- package/types/cli/index.d.ts.map +1 -0
- package/types/{app/cli → cli/messaging}/exchange.d.ts +3 -1
- package/types/cli/messaging/exchange.d.ts.map +1 -0
- package/types/cli/messaging/multisig.d.ts +29 -0
- package/types/cli/messaging/multisig.d.ts.map +1 -0
- package/types/cli/messaging/notifications.d.ts.map +1 -0
- package/types/cli/output.d.ts.map +1 -0
- package/types/cli/tools/annotate-color.d.ts.map +1 -0
- package/types/cli/tools/annotate.d.ts.map +1 -0
- package/types/cli/tools/benchmark.d.ts.map +1 -0
- package/types/{app/cli → cli/tools}/db-dump.d.ts +0 -2
- package/types/cli/tools/db-dump.d.ts.map +1 -0
- package/types/cli/tools/saidify.d.ts.map +1 -0
- package/types/{app/cli → cli/tools}/sign.d.ts +2 -0
- package/types/cli/tools/sign.d.ts.map +1 -0
- package/types/cli/tools/verify.d.ts.map +1 -0
- package/types/core/attachment-countering.d.ts +10 -1
- package/types/core/attachment-countering.d.ts.map +1 -1
- package/types/core/cues.d.ts +146 -57
- package/types/core/cues.d.ts.map +1 -1
- package/types/core/deck.d.ts +2 -12
- package/types/core/deck.d.ts.map +1 -1
- package/types/core/dispatch.d.ts +7 -3
- package/types/core/dispatch.d.ts.map +1 -1
- package/types/core/errors.d.ts +4 -4
- package/types/core/errors.d.ts.map +1 -1
- package/types/core/{exchange-proofing.d.ts → exchange/exchange-proofing.d.ts} +9 -2
- package/types/core/exchange/exchange-proofing.d.ts.map +1 -0
- package/types/core/{protocol-exchanging.d.ts → exchange/protocol-exchanging.d.ts} +18 -2
- package/types/core/exchange/protocol-exchanging.d.ts.map +1 -0
- package/types/core/genus-framing.d.ts +12 -0
- package/types/core/genus-framing.d.ts.map +1 -0
- package/types/core/{eventing.d.ts → kel/eventing.d.ts} +37 -48
- package/types/core/kel/eventing.d.ts.map +1 -0
- package/types/core/{kever-decisions.d.ts → kel/kever-decisions.d.ts} +36 -22
- package/types/core/kel/kever-decisions.d.ts.map +1 -0
- package/types/core/{kever.d.ts → kel/kever.d.ts} +13 -47
- package/types/core/kel/kever.d.ts.map +1 -0
- package/types/core/kel/witnesses.d.ts.map +1 -0
- package/types/core/logger.d.ts +1 -1
- package/types/core/logger.d.ts.map +1 -1
- package/types/core/{kram-auth.d.ts → mailbox/kram-auth.d.ts} +2 -2
- package/types/core/mailbox/kram-auth.d.ts.map +1 -0
- package/types/core/{kram-policy.d.ts → mailbox/kram-policy.d.ts} +2 -2
- package/types/core/mailbox/kram-policy.d.ts.map +1 -0
- package/types/core/{kram-pruning.d.ts → mailbox/kram-pruning.d.ts} +3 -3
- package/types/core/{kram-pruning.d.ts.map → mailbox/kram-pruning.d.ts.map} +1 -1
- package/types/core/{kram-signatures.d.ts → mailbox/kram-signatures.d.ts} +3 -3
- package/types/core/mailbox/kram-signatures.d.ts.map +1 -0
- package/types/core/mailbox/kram-staging.d.ts +30 -0
- package/types/core/mailbox/kram-staging.d.ts.map +1 -0
- package/types/core/{kram-time.d.ts → mailbox/kram-time.d.ts} +5 -11
- package/types/core/mailbox/kram-time.d.ts.map +1 -0
- package/types/core/mailbox/kraming.d.ts +42 -0
- package/types/core/mailbox/kraming.d.ts.map +1 -0
- package/types/core/mailbox/mailbox-topics.d.ts.map +1 -0
- package/types/core/protocol-eventing.d.ts +5 -0
- package/types/core/protocol-eventing.d.ts.map +1 -1
- package/types/core/protocol-serialization.d.ts +1 -1
- package/types/core/protocol-serialization.d.ts.map +1 -1
- package/types/core/protocol-vdr-eventing.d.ts +7 -5
- package/types/core/protocol-vdr-eventing.d.ts.map +1 -1
- package/types/core/records.d.ts +15 -50
- package/types/core/records.d.ts.map +1 -1
- package/types/core/routing.d.ts +76 -46
- package/types/core/routing.d.ts.map +1 -1
- package/types/db/baser-defaults.d.ts +5 -0
- package/types/db/baser-defaults.d.ts.map +1 -0
- package/types/db/basing.d.ts +70 -75
- package/types/db/basing.d.ts.map +1 -1
- package/types/db/core/keys.d.ts.map +1 -1
- package/types/db/core/lmdber.d.ts +21 -23
- package/types/db/core/lmdber.d.ts.map +1 -1
- package/types/db/core/path-manager.d.ts.map +1 -1
- package/types/db/escrowing.d.ts +12 -49
- package/types/db/escrowing.d.ts.map +1 -1
- package/types/db/exchange/exchange-nests.d.ts +12 -0
- package/types/db/exchange/exchange-nests.d.ts.map +1 -0
- package/types/db/exchange/exchange-records.d.ts +38 -0
- package/types/db/exchange/exchange-records.d.ts.map +1 -0
- package/types/db/index.d.ts +5 -6
- package/types/db/index.d.ts.map +1 -1
- package/types/db/keeping.d.ts +19 -1
- package/types/db/keeping.d.ts.map +1 -1
- package/types/db/koming.d.ts +1 -1
- package/types/db/koming.d.ts.map +1 -1
- package/types/db/{kram-factors.d.ts → mailbox/kram-factors.d.ts} +3 -5
- package/types/db/mailbox/kram-factors.d.ts.map +1 -0
- package/types/db/{mailboxing.d.ts → mailbox/mailboxing.d.ts} +3 -4
- package/types/db/mailbox/mailboxing.d.ts.map +1 -0
- package/types/db/reger.d.ts +10 -12
- package/types/db/reger.d.ts.map +1 -1
- package/types/db/{kel-replay.d.ts → replay/kel-replay.d.ts} +2 -6
- package/types/db/replay/kel-replay.d.ts.map +1 -0
- package/types/db/{tel-replay.d.ts → replay/tel-replay.d.ts} +13 -8
- package/types/db/replay/tel-replay.d.ts.map +1 -0
- package/types/db/{witness-replay.d.ts → replay/witness-replay.d.ts} +2 -3
- package/types/db/replay/witness-replay.d.ts.map +1 -0
- package/types/db/subing.d.ts +1 -5
- package/types/db/subing.d.ts.map +1 -1
- package/types/did/keri/resolving.d.ts +5 -10
- package/types/did/keri/resolving.d.ts.map +1 -1
- package/types/did/webs/artifacts.d.ts +5 -5
- package/types/did/webs/artifacts.d.ts.map +1 -1
- package/types/did/webs/designated-aliases.d.ts +6 -5
- package/types/did/webs/designated-aliases.d.ts.map +1 -1
- package/types/did/webs/documenting.d.ts +6 -5
- package/types/did/webs/documenting.d.ts.map +1 -1
- package/types/did/webs/resolving.d.ts +13 -3
- package/types/did/webs/resolving.d.ts.map +1 -1
- package/types/library/index.d.ts +1 -1
- package/types/library/index.d.ts.map +1 -1
- package/types/npm/cli.d.ts +1 -1
- package/types/npm/cli.d.ts.map +1 -1
- package/types/npm/index.d.ts +1 -1
- package/types/npm/index.d.ts.map +1 -1
- package/types/runtime/index.d.ts +109 -76
- package/types/runtime/index.d.ts.map +1 -1
- package/types/vdr/backer-state.d.ts +22 -0
- package/types/vdr/backer-state.d.ts.map +1 -0
- package/types/vdr/credential-tsn-record.d.ts +13 -0
- package/types/vdr/credential-tsn-record.d.ts.map +1 -0
- package/types/vdr/credentialing.d.ts +16 -27
- package/types/vdr/credentialing.d.ts.map +1 -1
- package/types/vdr/eventing.d.ts +66 -23
- package/types/vdr/eventing.d.ts.map +1 -1
- package/types/vdr/registry-tsn-record.d.ts +6 -0
- package/types/vdr/registry-tsn-record.d.ts.map +1 -0
- package/types/vdr/revoking.d.ts +18 -0
- package/types/vdr/revoking.d.ts.map +1 -0
- package/types/vdr/tel-anchor.d.ts +10 -0
- package/types/vdr/tel-anchor.d.ts.map +1 -0
- package/types/vdr/tel-publication.d.ts +49 -0
- package/types/vdr/tel-publication.d.ts.map +1 -0
- package/types/vdr/tsn-query.d.ts +9 -4
- package/types/vdr/tsn-query.d.ts.map +1 -1
- package/types/{app/version.d.ts → version.d.ts} +2 -2
- package/types/version.d.ts.map +1 -0
- package/esm/keri/npm/src/app/abortable.js +0 -27
- package/esm/keri/npm/src/app/agent-runtime.js +0 -638
- package/esm/keri/npm/src/app/cesr-egress.js +0 -308
- package/esm/keri/npm/src/app/cesr-output.js +0 -12
- package/esm/keri/npm/src/app/cli/annotate.js +0 -24
- package/esm/keri/npm/src/app/cli/challenge.js +0 -168
- package/esm/keri/npm/src/app/cli/common/displaying.js +0 -43
- package/esm/keri/npm/src/app/cli/common/parsing.js +0 -215
- package/esm/keri/npm/src/app/cli/incept.js +0 -187
- package/esm/keri/npm/src/app/cli/index.js +0 -36
- package/esm/keri/npm/src/app/cli/init.js +0 -155
- package/esm/keri/npm/src/app/cli/interact.js +0 -72
- package/esm/keri/npm/src/app/cli/ipex.js +0 -453
- package/esm/keri/npm/src/app/cli/multisig.js +0 -474
- package/esm/keri/npm/src/app/cli/query.js +0 -143
- package/esm/keri/npm/src/app/cli/rotate.js +0 -171
- package/esm/keri/npm/src/app/cli/vc.js +0 -284
- package/esm/keri/npm/src/app/cli/verifier.js +0 -96
- package/esm/keri/npm/src/app/credential-workflows.js +0 -431
- package/esm/keri/npm/src/app/cue-delivery.js +0 -171
- package/esm/keri/npm/src/app/cue-preparation.js +0 -124
- package/esm/keri/npm/src/app/cue-route.js +0 -64
- package/esm/keri/npm/src/app/cue-runtime.js +0 -104
- package/esm/keri/npm/src/app/direct-reply-delivery.js +0 -282
- package/esm/keri/npm/src/app/essr.js +0 -235
- package/esm/keri/npm/src/app/exchanging.js +0 -1219
- package/esm/keri/npm/src/app/forwarding.js +0 -1346
- package/esm/keri/npm/src/app/group-members.js +0 -37
- package/esm/keri/npm/src/app/grouping.js +0 -534
- package/esm/keri/npm/src/app/httping.js +0 -130
- package/esm/keri/npm/src/app/ipex-credentialing.js +0 -245
- package/esm/keri/npm/src/app/ipex-grouping.js +0 -317
- package/esm/keri/npm/src/app/ipex-v2.js +0 -542
- package/esm/keri/npm/src/app/mailbox-sse.js +0 -257
- package/esm/keri/npm/src/app/multisig-workflows.js +0 -537
- package/esm/keri/npm/src/app/oobi-replies.js +0 -194
- package/esm/keri/npm/src/app/query-replies.js +0 -181
- package/esm/keri/npm/src/app/querying.js +0 -1040
- package/esm/keri/npm/src/app/reactor.js +0 -517
- package/esm/keri/npm/src/app/reply-streams.js +0 -304
- package/esm/keri/npm/src/app/respondant.js +0 -173
- package/esm/keri/npm/src/app/runtime-deliveries.js +0 -510
- package/esm/keri/npm/src/app/runtime-services.js +0 -25
- package/esm/keri/npm/src/app/signaling.js +0 -388
- package/esm/keri/npm/src/app/stored-replies.js +0 -85
- package/esm/keri/npm/src/app/tcp-egress.js +0 -334
- package/esm/keri/npm/src/app/verifier-agent.js +0 -461
- package/esm/keri/npm/src/app/witnessing.js +0 -956
- package/esm/keri/npm/src/core/cue-admission.js +0 -419
- package/esm/keri/npm/src/core/index.js +0 -23
- package/esm/keri/npm/src/core/kever-decisions.js +0 -63
- package/esm/keri/npm/src/core/kram-handoff.js +0 -148
- package/esm/keri/npm/src/core/kram-staging.js +0 -211
- package/esm/keri/npm/src/core/kraming.js +0 -99
- package/esm/keri/npm/src/db/exchange-nests.js +0 -175
- package/esm/keri/npm/src/db/exchange-records.js +0 -7
- package/esm/keri/npm/src/db/kram-snapshots.js +0 -216
- package/esm/keri/npm/src/db/mailbox-inbox.js +0 -206
- package/esm/keri/npm/src/db/outboxing.js +0 -371
- package/esm/keri/npm/src/db/payload-archive.js +0 -402
- package/esm/keri/npm/src/db/payload-store.js +0 -416
- package/esm/keri/npm/src/db/payload-view.js +0 -23
- package/esm/keri/npm/src/db/verifier-cueing.js +0 -132
- package/esm/keri/npm/src/vdr/credential-tsn.js +0 -218
- package/esm/keri/npm/src/vdr/registry-tsn.js +0 -218
- package/types/app/abortable.d.ts +0 -11
- package/types/app/abortable.d.ts.map +0 -1
- package/types/app/agent-runtime.d.ts +0 -284
- package/types/app/agent-runtime.d.ts.map +0 -1
- package/types/app/authenticating.d.ts +0 -36
- package/types/app/authenticating.d.ts.map +0 -1
- package/types/app/byte-source.d.ts +0 -16
- package/types/app/byte-source.d.ts.map +0 -1
- package/types/app/cesr-egress.d.ts +0 -48
- package/types/app/cesr-egress.d.ts.map +0 -1
- package/types/app/cesr-http.d.ts.map +0 -1
- package/types/app/cesr-output.d.ts +0 -5
- package/types/app/cesr-output.d.ts.map +0 -1
- package/types/app/challenging.d.ts.map +0 -1
- package/types/app/cli/aid.d.ts.map +0 -1
- package/types/app/cli/annotate-color.d.ts.map +0 -1
- package/types/app/cli/annotate.d.ts.map +0 -1
- package/types/app/cli/benchmark.d.ts.map +0 -1
- package/types/app/cli/challenge.d.ts.map +0 -1
- package/types/app/cli/common/context.d.ts.map +0 -1
- package/types/app/cli/common/displaying.d.ts +0 -12
- package/types/app/cli/common/displaying.d.ts.map +0 -1
- package/types/app/cli/common/existing.d.ts.map +0 -1
- package/types/app/cli/common/parsing.d.ts.map +0 -1
- package/types/app/cli/common/rendering.d.ts.map +0 -1
- package/types/app/cli/common/witness-auth.d.ts.map +0 -1
- package/types/app/cli/db-dump.d.ts.map +0 -1
- package/types/app/cli/delegate.d.ts +0 -26
- package/types/app/cli/delegate.d.ts.map +0 -1
- package/types/app/cli/did.d.ts.map +0 -1
- package/types/app/cli/ends.d.ts.map +0 -1
- package/types/app/cli/exchange.d.ts.map +0 -1
- package/types/app/cli/export.d.ts.map +0 -1
- package/types/app/cli/incept.d.ts.map +0 -1
- package/types/app/cli/index.d.ts +0 -37
- package/types/app/cli/index.d.ts.map +0 -1
- package/types/app/cli/init.d.ts.map +0 -1
- package/types/app/cli/interact.d.ts.map +0 -1
- package/types/app/cli/ipex.d.ts +0 -20
- package/types/app/cli/ipex.d.ts.map +0 -1
- package/types/app/cli/list.d.ts.map +0 -1
- package/types/app/cli/loc.d.ts.map +0 -1
- package/types/app/cli/multisig.d.ts +0 -12
- package/types/app/cli/multisig.d.ts.map +0 -1
- package/types/app/cli/notifications.d.ts.map +0 -1
- package/types/app/cli/oobi.d.ts.map +0 -1
- package/types/app/cli/output.d.ts.map +0 -1
- package/types/app/cli/query.d.ts +0 -12
- package/types/app/cli/query.d.ts.map +0 -1
- package/types/app/cli/rotate.d.ts.map +0 -1
- package/types/app/cli/saidify.d.ts.map +0 -1
- package/types/app/cli/sign.d.ts.map +0 -1
- package/types/app/cli/vc.d.ts +0 -20
- package/types/app/cli/vc.d.ts.map +0 -1
- package/types/app/cli/verifier.d.ts +0 -3
- package/types/app/cli/verifier.d.ts.map +0 -1
- package/types/app/cli/verify.d.ts.map +0 -1
- package/types/app/configing.d.ts.map +0 -1
- package/types/app/credential-workflows.d.ts +0 -118
- package/types/app/credential-workflows.d.ts.map +0 -1
- package/types/app/cue-delivery.d.ts +0 -30
- package/types/app/cue-delivery.d.ts.map +0 -1
- package/types/app/cue-preparation.d.ts +0 -25
- package/types/app/cue-preparation.d.ts.map +0 -1
- package/types/app/cue-route.d.ts +0 -19
- package/types/app/cue-route.d.ts.map +0 -1
- package/types/app/cue-runtime.d.ts +0 -46
- package/types/app/cue-runtime.d.ts.map +0 -1
- package/types/app/delegating.d.ts.map +0 -1
- package/types/app/direct-reply-delivery.d.ts +0 -38
- package/types/app/direct-reply-delivery.d.ts.map +0 -1
- package/types/app/endpoint-roleing.d.ts +0 -41
- package/types/app/endpoint-roleing.d.ts.map +0 -1
- package/types/app/essr.d.ts +0 -72
- package/types/app/essr.d.ts.map +0 -1
- package/types/app/exchanging.d.ts +0 -245
- package/types/app/exchanging.d.ts.map +0 -1
- package/types/app/forwarding.d.ts +0 -411
- package/types/app/forwarding.d.ts.map +0 -1
- package/types/app/group-members.d.ts +0 -12
- package/types/app/group-members.d.ts.map +0 -1
- package/types/app/grouping.d.ts +0 -150
- package/types/app/grouping.d.ts.map +0 -1
- package/types/app/habbing.d.ts.map +0 -1
- package/types/app/httping.d.ts +0 -42
- package/types/app/httping.d.ts.map +0 -1
- package/types/app/ipex-building.d.ts.map +0 -1
- package/types/app/ipex-credentialing.d.ts.map +0 -1
- package/types/app/ipex-graph.d.ts +0 -30
- package/types/app/ipex-graph.d.ts.map +0 -1
- package/types/app/ipex-grouping.d.ts +0 -51
- package/types/app/ipex-grouping.d.ts.map +0 -1
- package/types/app/ipex-v2.d.ts +0 -51
- package/types/app/ipex-v2.d.ts.map +0 -1
- package/types/app/ipexing.d.ts.map +0 -1
- package/types/app/keeping.d.ts.map +0 -1
- package/types/app/mailbox-director.d.ts +0 -159
- package/types/app/mailbox-director.d.ts.map +0 -1
- package/types/app/mailbox-sse.d.ts +0 -38
- package/types/app/mailbox-sse.d.ts.map +0 -1
- package/types/app/mailboxing.d.ts.map +0 -1
- package/types/app/multisig-workflows.d.ts +0 -59
- package/types/app/multisig-workflows.d.ts.map +0 -1
- package/types/app/notifying.d.ts.map +0 -1
- package/types/app/oobi-replies.d.ts +0 -18
- package/types/app/oobi-replies.d.ts.map +0 -1
- package/types/app/oobiery.d.ts.map +0 -1
- package/types/app/organizing.d.ts.map +0 -1
- package/types/app/parsering.d.ts +0 -106
- package/types/app/parsering.d.ts.map +0 -1
- package/types/app/protocol-host-policy.d.ts.map +0 -1
- package/types/app/query-replies.d.ts +0 -45
- package/types/app/query-replies.d.ts.map +0 -1
- package/types/app/querying.d.ts +0 -294
- package/types/app/querying.d.ts.map +0 -1
- package/types/app/reactor.d.ts +0 -171
- package/types/app/reactor.d.ts.map +0 -1
- package/types/app/reply-streams.d.ts +0 -51
- package/types/app/reply-streams.d.ts.map +0 -1
- package/types/app/respondant.d.ts +0 -48
- package/types/app/respondant.d.ts.map +0 -1
- package/types/app/runtime-deliveries.d.ts +0 -67
- package/types/app/runtime-deliveries.d.ts.map +0 -1
- package/types/app/runtime-services.d.ts +0 -29
- package/types/app/runtime-services.d.ts.map +0 -1
- package/types/app/runtime-turn.d.ts.map +0 -1
- package/types/app/schema-resolving.d.ts.map +0 -1
- package/types/app/signaling.d.ts +0 -96
- package/types/app/signaling.d.ts.map +0 -1
- package/types/app/socket-source.d.ts.map +0 -1
- package/types/app/stored-replies.d.ts +0 -18
- package/types/app/stored-replies.d.ts.map +0 -1
- package/types/app/tcp-egress.d.ts +0 -87
- package/types/app/tcp-egress.d.ts.map +0 -1
- package/types/app/verifier-agent.d.ts +0 -91
- package/types/app/verifier-agent.d.ts.map +0 -1
- package/types/app/verifying.d.ts.map +0 -1
- package/types/app/version.d.ts.map +0 -1
- package/types/app/witnessing.d.ts +0 -227
- package/types/app/witnessing.d.ts.map +0 -1
- package/types/core/cue-admission.d.ts +0 -74
- package/types/core/cue-admission.d.ts.map +0 -1
- package/types/core/eventing.d.ts.map +0 -1
- package/types/core/exchange-proofing.d.ts.map +0 -1
- package/types/core/index.d.ts +0 -24
- package/types/core/index.d.ts.map +0 -1
- package/types/core/kever-decisions.d.ts.map +0 -1
- package/types/core/kever.d.ts.map +0 -1
- package/types/core/kram-auth.d.ts.map +0 -1
- package/types/core/kram-handoff.d.ts +0 -45
- package/types/core/kram-handoff.d.ts.map +0 -1
- package/types/core/kram-policy.d.ts.map +0 -1
- package/types/core/kram-signatures.d.ts.map +0 -1
- package/types/core/kram-staging.d.ts +0 -36
- package/types/core/kram-staging.d.ts.map +0 -1
- package/types/core/kram-time.d.ts.map +0 -1
- package/types/core/kraming.d.ts +0 -46
- package/types/core/kraming.d.ts.map +0 -1
- package/types/core/mailbox-topics.d.ts.map +0 -1
- package/types/core/protocol-exchanging.d.ts.map +0 -1
- package/types/core/witnesses.d.ts.map +0 -1
- package/types/db/exchange-nests.d.ts +0 -39
- package/types/db/exchange-nests.d.ts.map +0 -1
- package/types/db/exchange-records.d.ts +0 -35
- package/types/db/exchange-records.d.ts.map +0 -1
- package/types/db/kel-replay.d.ts.map +0 -1
- package/types/db/kram-factors.d.ts.map +0 -1
- package/types/db/kram-snapshots.d.ts +0 -23
- package/types/db/kram-snapshots.d.ts.map +0 -1
- package/types/db/mailbox-inbox.d.ts +0 -72
- package/types/db/mailbox-inbox.d.ts.map +0 -1
- package/types/db/mailboxing.d.ts.map +0 -1
- package/types/db/outboxing.d.ts +0 -182
- package/types/db/outboxing.d.ts.map +0 -1
- package/types/db/payload-archive.d.ts +0 -70
- package/types/db/payload-archive.d.ts.map +0 -1
- package/types/db/payload-store.d.ts +0 -40
- package/types/db/payload-store.d.ts.map +0 -1
- package/types/db/payload-view.d.ts +0 -4
- package/types/db/payload-view.d.ts.map +0 -1
- package/types/db/tel-replay.d.ts.map +0 -1
- package/types/db/verifier-cueing.d.ts +0 -46
- package/types/db/verifier-cueing.d.ts.map +0 -1
- package/types/db/witness-replay.d.ts.map +0 -1
- package/types/vdr/credential-tsn.d.ts +0 -18
- package/types/vdr/credential-tsn.d.ts.map +0 -1
- package/types/vdr/registry-tsn.d.ts +0 -23
- package/types/vdr/registry-tsn.d.ts.map +0 -1
- /package/esm/keri/npm/src/app/{schema-resolving.js → credentials/schema-resolving.js} +0 -0
- /package/esm/keri/npm/src/app/{protocol-host-policy.js → protocol/protocol-host-policy.js} +0 -0
- /package/esm/keri/npm/src/app/{runtime-turn.js → runtime/runtime-turn.js} +0 -0
- /package/esm/keri/npm/src/{app/cli → cli}/common/rendering.js +0 -0
- /package/esm/keri/npm/src/{app/cli → cli/tools}/annotate-color.js +0 -0
- /package/esm/keri/npm/src/core/{witnesses.js → kel/witnesses.js} +0 -0
- /package/esm/keri/npm/src/core/{kram-auth.js → mailbox/kram-auth.js} +0 -0
- /package/esm/keri/npm/src/core/{mailbox-topics.js → mailbox/mailbox-topics.js} +0 -0
- /package/types/app/{runtime-turn.d.ts → runtime/runtime-turn.d.ts} +0 -0
- /package/types/{app/cli → cli}/common/rendering.d.ts +0 -0
- /package/types/{app/cli → cli/endpoints}/loc.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/aid.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/export.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/list.d.ts +0 -0
- /package/types/{app/cli → cli/messaging}/notifications.d.ts +0 -0
- /package/types/{app/cli → cli}/output.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/annotate-color.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/annotate.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/benchmark.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/saidify.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/verify.d.ts +0 -0
- /package/types/core/{witnesses.d.ts → kel/witnesses.d.ts} +0 -0
- /package/types/core/{mailbox-topics.d.ts → mailbox/mailbox-topics.d.ts} +0 -0
|
@@ -100,6 +100,8 @@ export function regcept(issuer, options = {}) {
|
|
|
100
100
|
/** Create an ACDC v2 blindable registry update (`bup`) message. */
|
|
101
101
|
export function blindate(regid, prior, blid, options = {}) {
|
|
102
102
|
const { sn = 1, stamp, pvrsn = Vrsn_2_0, gvrsn = Vrsn_2_0, kind = Kinds.json } = options;
|
|
103
|
+
if (BigInt(sn) < 1n)
|
|
104
|
+
throw new ValidationError(`ACDC blindable update sequence number must be positive: ${sn}`);
|
|
103
105
|
return new SerderACDC({
|
|
104
106
|
sad: {
|
|
105
107
|
v: versionString({ pvrsn, gvrsn, kind }),
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
/**
|
|
2
|
-
import { Diger, Ilks, ParserError
|
|
3
|
-
import { DatabaseNotOpenError } from "../core/errors.js";
|
|
1
|
+
/** Public v2 registry intake with event-local opening preflight and durable retention. */
|
|
2
|
+
import { bytesEqual, Diger, Ilks, ParserError } from "cesr-ts";
|
|
3
|
+
import { DatabaseNotOpenError, DatabaseOperationError } from "../core/errors.js";
|
|
4
4
|
import { RegistryEventer } from "./regengine.js";
|
|
5
|
-
import { validateRip, validateUpdate } from "./regeventing.js";
|
|
5
|
+
import { validateRegistrySourceLocators, validateRip, validateUpdate, vetBlind, } from "./regeventing.js";
|
|
6
|
+
import { publicOpeningAttachment } from "./registering.js";
|
|
6
7
|
/**
|
|
7
8
|
* Borrow accepted public KEL state and one registry store without habitats, aliases or handles.
|
|
8
9
|
* Reconstruct the engine's issuer from stored inception after reopen. Intake uses the engine's
|
|
9
|
-
*
|
|
10
|
+
* exact registry-seal and historical witness policy shared with observer vetting. Each accepted
|
|
10
11
|
* event commits independently; a later failure preserves the already accepted prefix.
|
|
11
|
-
* Parsed evidence stays borrowed.
|
|
12
|
+
* Parsed evidence stays borrowed. Composition supplies this owner to v2 protocol dispatch;
|
|
13
|
+
* no local habitat, alias or application disclosure custody is created by public intake.
|
|
12
14
|
*/
|
|
13
15
|
export class RegistryObserver {
|
|
14
|
-
constructor(db, store
|
|
16
|
+
constructor(db, store) {
|
|
15
17
|
Object.defineProperty(this, "db", {
|
|
16
18
|
enumerable: true,
|
|
17
19
|
configurable: true,
|
|
@@ -24,34 +26,36 @@ export class RegistryObserver {
|
|
|
24
26
|
writable: true,
|
|
25
27
|
value: store
|
|
26
28
|
});
|
|
27
|
-
Object.defineProperty(this, "maxEvents", {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
configurable: true,
|
|
30
|
-
writable: true,
|
|
31
|
-
value: void 0
|
|
32
|
-
});
|
|
33
|
-
if (!Number.isSafeInteger(maxEvents) || maxEvents < 1) {
|
|
34
|
-
throw new RangeError("Registry maxEvents must be positive and safe.");
|
|
35
|
-
}
|
|
36
|
-
this.maxEvents = maxEvents;
|
|
37
29
|
}
|
|
38
30
|
/** Stage parsed events before inception, otherwise delegate ordinary validation and acceptance. */
|
|
39
|
-
processEvent(serder) {
|
|
31
|
+
processEvent(serder, locators = {}) {
|
|
40
32
|
const result = serder.ilk === Ilks.rip ? validateRip(serder) : validateUpdate(serder, serder.regid ?? "");
|
|
41
33
|
if (result.kind === "reject")
|
|
42
34
|
return result;
|
|
43
35
|
const event = result.event;
|
|
36
|
+
const openings = [...locators.bsqs ?? [], ...locators.bsss ?? []], opening = openings[0];
|
|
37
|
+
if (openings.length > 1 || (opening && event.ilk !== Ilks.bup))
|
|
38
|
+
return { kind: "reject", reason: "disclosure" };
|
|
39
|
+
if (opening) {
|
|
40
|
+
if (!vetBlind(opening, serder.sad.b))
|
|
41
|
+
return { kind: "reject", reason: "disclosure" };
|
|
42
|
+
const old = this.store.opening(event.said), stored = this.store.event(event.said);
|
|
43
|
+
if ((old && !bytesEqual(old, publicOpeningAttachment(opening)))
|
|
44
|
+
|| (stored && !bytesEqual(stored.raw, serder.raw)))
|
|
45
|
+
return { kind: "reject", reason: "disclosure" };
|
|
46
|
+
}
|
|
44
47
|
// Unknown registry routing cannot rely on a stored RIP to validate its qualified SAID.
|
|
45
48
|
try {
|
|
46
49
|
if (new Diger({ qb64: event.regid }).qb64 !== event.regid)
|
|
47
50
|
return { kind: "reject", reason: "registry" };
|
|
48
51
|
}
|
|
49
52
|
catch (error) {
|
|
50
|
-
if (!(error instanceof ParserError)
|
|
53
|
+
if (!(error instanceof ParserError))
|
|
51
54
|
throw error;
|
|
52
55
|
return { kind: "reject", reason: "registry" };
|
|
53
56
|
}
|
|
54
|
-
|
|
57
|
+
if (event.sn > BigInt(Number.MAX_SAFE_INTEGER))
|
|
58
|
+
return { kind: "reject", reason: "ordinalRange" };
|
|
55
59
|
let engine = this.engine(event.regid);
|
|
56
60
|
if (engine && !(engine instanceof RegistryEventer))
|
|
57
61
|
return engine;
|
|
@@ -61,15 +65,22 @@ export class RegistryObserver {
|
|
|
61
65
|
engine ??= new RegistryEventer(this.db, event.issuer, this.store, event.regid);
|
|
62
66
|
}
|
|
63
67
|
if (engine) {
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
const decision = engine.processEvent(serder, locators);
|
|
69
|
+
if (decision.kind !== "reject" && opening)
|
|
70
|
+
this.store.retainOpening(serder, opening);
|
|
71
|
+
return decision;
|
|
66
72
|
}
|
|
73
|
+
if (!validateRegistrySourceLocators(serder, this.db, null, locators))
|
|
74
|
+
return { kind: "reject", reason: "anchor" };
|
|
67
75
|
// Issuer/anchor discovery is impossible until RIP arrives; the existing anchor escrow owns this body.
|
|
68
76
|
const baser = this.store.baser;
|
|
69
|
-
baser.
|
|
77
|
+
if (baser.readonly)
|
|
78
|
+
throw new DatabaseOperationError("Cannot write readonly registry storage.");
|
|
70
79
|
return baser.env.transactionSync(() => {
|
|
71
80
|
this.store.putEvent(serder);
|
|
72
81
|
this.store.escrowMissingAnchor(event.regid, Number(event.sn), event.said);
|
|
82
|
+
if (opening)
|
|
83
|
+
this.store.retainOpening(serder, opening);
|
|
73
84
|
return { kind: "escrow", reason: "inception", event };
|
|
74
85
|
});
|
|
75
86
|
}
|
|
@@ -78,9 +89,21 @@ export class RegistryObserver {
|
|
|
78
89
|
const engine = this.engine(regid);
|
|
79
90
|
if (!(engine instanceof RegistryEventer))
|
|
80
91
|
return;
|
|
81
|
-
this.checkStored(regid, engine);
|
|
82
92
|
engine.processEscrows();
|
|
83
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Retry registries named by durable dependency escrows, including foreign registries after reopen.
|
|
96
|
+
* Finish both table cursors before acceptance writes; local aliases do not determine pending work.
|
|
97
|
+
*/
|
|
98
|
+
processAllEscrows() {
|
|
99
|
+
const registries = new Set();
|
|
100
|
+
for (const table of [this.store.baser.maes, this.store.baser.ooes]) {
|
|
101
|
+
for (const [keys] of table.getAllItemIter())
|
|
102
|
+
registries.add(keys[0]);
|
|
103
|
+
}
|
|
104
|
+
for (const regid of registries)
|
|
105
|
+
this.processEscrows(regid);
|
|
106
|
+
}
|
|
84
107
|
/** Stored inception is durable issuer identity, including while its anchor is still absent. */
|
|
85
108
|
engine(regid) {
|
|
86
109
|
if (!this.store.baser.env)
|
|
@@ -103,20 +126,4 @@ export class RegistryObserver {
|
|
|
103
126
|
}
|
|
104
127
|
return new RegistryEventer(this.db, result.event.issuer, this.store, regid);
|
|
105
128
|
}
|
|
106
|
-
/** Bound chain length before processing; this does not bound queued rows, scans or native allocation. */
|
|
107
|
-
checkOrdinal(sn) {
|
|
108
|
-
if (sn >= BigInt(this.maxEvents))
|
|
109
|
-
throw new ResourceLimitError("Registry evidence exceeds configured event limit.");
|
|
110
|
-
}
|
|
111
|
-
/** A tighter observer must not advance previously staged rows beyond its own finite ceiling. */
|
|
112
|
-
checkStored(regid, engine) {
|
|
113
|
-
this.checkOrdinal(engine.sn);
|
|
114
|
-
for (const escrow of [this.store.baser.maes, this.store.baser.ooes]) {
|
|
115
|
-
for (const [, sn] of escrow?.getTopItemIter(regid) ?? []) {
|
|
116
|
-
if (!Number.isSafeInteger(sn) || sn < 0)
|
|
117
|
-
throw new RangeError("Unsafe observer escrow ordinal.");
|
|
118
|
-
this.checkOrdinal(BigInt(sn));
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
129
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/** Public ACDC registry database layout and joined LMDB lifecycle. */
|
|
2
2
|
import { b, Diger, NumberPrimitive, Saider, SerderACDC } from "cesr-ts";
|
|
3
|
-
import { DatabaseNotOpenError
|
|
3
|
+
import { DatabaseNotOpenError } from "../core/errors.js";
|
|
4
4
|
import { LMDBer } from "../db/core/lmdber.js";
|
|
5
|
-
import { B64OnIoSetSuber, CatCesrSuber, CesrOnSuber, CesrSuber, SerderSuber } from "../db/subing.js";
|
|
5
|
+
import { B64OnIoSetSuber, BytesSuber, CatCesrSuber, CesrOnSuber, CesrSuber, SerderSuber } from "../db/subing.js";
|
|
6
6
|
/**
|
|
7
7
|
* Own one environment for public registry TEL bodies, accepted ordinals and heads.
|
|
8
8
|
* Mirrors frozen KERIpy RegBaser's typed tables; opening neither verifies
|
|
9
|
-
* evidence nor migrates rows.
|
|
10
|
-
* explicit storage write initializes them, preserving readonly old layouts.
|
|
9
|
+
* evidence nor migrates rows. Every current store has anchor and escrow tables.
|
|
11
10
|
* Construction stays closed; callers own reopen and joined close.
|
|
12
11
|
*/
|
|
13
12
|
export class RegBaser extends LMDBer {
|
|
@@ -15,15 +14,10 @@ export class RegBaser extends LMDBer {
|
|
|
15
14
|
hasTable(name) {
|
|
16
15
|
if (!this.env)
|
|
17
16
|
throw new DatabaseNotOpenError("Registry environment is closed.");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (this.readonly)
|
|
23
|
-
throw new DatabaseOperationError("Cannot initialize readonly registry storage.");
|
|
24
|
-
this.ancs ??= new CatCesrSuber(this, { subkey: "ancs.", ctor: [NumberPrimitive, Diger] });
|
|
25
|
-
this.maes ??= new B64OnIoSetSuber(this, { subkey: "maes." });
|
|
26
|
-
this.ooes ??= new B64OnIoSetSuber(this, { subkey: "ooes." });
|
|
17
|
+
// Native lmdb-js exposes its C-string terminator in root metadata keys;
|
|
18
|
+
// the Deno backend also supports the unterminated representation.
|
|
19
|
+
return this.env.getBinary(b(name)) !== undefined
|
|
20
|
+
|| this.env.getBinary(b(`${name}\0`)) !== undefined;
|
|
27
21
|
}
|
|
28
22
|
constructor(options = {}) {
|
|
29
23
|
super(options, {
|
|
@@ -54,26 +48,33 @@ export class RegBaser extends LMDBer {
|
|
|
54
48
|
writable: true,
|
|
55
49
|
value: void 0
|
|
56
50
|
});
|
|
57
|
-
/** Event-SAID ->
|
|
51
|
+
/** Event-SAID -> one deliberately published counted BSQ/BSS opening; never private custody. */
|
|
52
|
+
Object.defineProperty(this, "openings", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
configurable: true,
|
|
55
|
+
writable: true,
|
|
56
|
+
value: void 0
|
|
57
|
+
});
|
|
58
|
+
/** Event-SAID -> earliest verified KEL source couple, in the current store. */
|
|
58
59
|
Object.defineProperty(this, "ancs", {
|
|
59
60
|
enumerable: true,
|
|
60
61
|
configurable: true,
|
|
61
62
|
writable: true,
|
|
62
|
-
value:
|
|
63
|
+
value: void 0
|
|
63
64
|
});
|
|
64
65
|
/** Insertion-ordered missing-anchor event-SAID tuples by registry and ordinal. */
|
|
65
66
|
Object.defineProperty(this, "maes", {
|
|
66
67
|
enumerable: true,
|
|
67
68
|
configurable: true,
|
|
68
69
|
writable: true,
|
|
69
|
-
value:
|
|
70
|
+
value: void 0
|
|
70
71
|
});
|
|
71
72
|
/** Insertion-ordered out-of-order event-SAID tuples by registry and ordinal. */
|
|
72
73
|
Object.defineProperty(this, "ooes", {
|
|
73
74
|
enumerable: true,
|
|
74
75
|
configurable: true,
|
|
75
76
|
writable: true,
|
|
76
|
-
value:
|
|
77
|
+
value: void 0
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
80
|
/** Rebind the same environment's typed tables after every joined reopen. */
|
|
@@ -85,11 +86,10 @@ export class RegBaser extends LMDBer {
|
|
|
85
86
|
this.evts = new SerderSuber(this, { subkey: "evts.", ctor: SerderACDC });
|
|
86
87
|
this.tels = new CesrOnSuber(this, { subkey: "tels.", ctor: Saider });
|
|
87
88
|
this.heads = new CesrSuber(this, { subkey: "heds.", ctor: Saider });
|
|
88
|
-
this.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
this.
|
|
92
|
-
this.ooes = this.hasTable("ooes.") ? new B64OnIoSetSuber(this, { subkey: "ooes." }) : null;
|
|
89
|
+
this.openings = new BytesSuber(this, { subkey: "openings." });
|
|
90
|
+
this.ancs = new CatCesrSuber(this, { subkey: "ancs.", ctor: [NumberPrimitive, Diger] });
|
|
91
|
+
this.maes = new B64OnIoSetSuber(this, { subkey: "maes." });
|
|
92
|
+
this.ooes = new B64OnIoSetSuber(this, { subkey: "ooes." });
|
|
93
93
|
return true;
|
|
94
94
|
}
|
|
95
95
|
catch (error) {
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
import { Diger, Ilks,
|
|
3
|
-
import { DatabaseNotOpenError,
|
|
4
|
-
import {
|
|
5
|
-
import { validateRip, validateUpdate, verifyRegistryAnchor, } from "./regeventing.js";
|
|
6
|
-
import { FailedSchemaValidationError, MissingSchemaError, validateSchema } from "./scheming.js";
|
|
1
|
+
/** Shared TEL validation, accepted-state publication, anchoring and retry for local and foreign registries. */
|
|
2
|
+
import { Diger, Ilks, NumberPrimitive, } from "cesr-ts";
|
|
3
|
+
import { DatabaseNotOpenError, DatabaseOperationError } from "../core/errors.js";
|
|
4
|
+
import { consoleLogger } from "../core/logger.js";
|
|
5
|
+
import { findRegistryAnchor, validateRegistrySourceLocators, validateRip, validateUpdate, verifyRegistryAnchor, } from "./regeventing.js";
|
|
7
6
|
/**
|
|
8
7
|
* Borrow the issuer's accepted KEL and registry store; no keys or handles are acquired.
|
|
9
|
-
*
|
|
8
|
+
* The local facade and foreign observer share this accepted-state engine.
|
|
10
9
|
* Publication is atomic; binding this instance happens only after successful commit.
|
|
11
10
|
*/
|
|
12
11
|
export class RegistryEventer {
|
|
@@ -36,101 +35,23 @@ export class RegistryEventer {
|
|
|
36
35
|
value: regk
|
|
37
36
|
});
|
|
38
37
|
}
|
|
38
|
+
/** Validated accepted head metadata; local construction may inspect it without duplicating acceptance checks. */
|
|
39
|
+
get acceptedHeadEvent() {
|
|
40
|
+
return this.regk ? this.acceptedHead(this.regk) : null;
|
|
41
|
+
}
|
|
39
42
|
/** Read the accepted head only after validating its body and ordinal marker. */
|
|
40
43
|
get head() {
|
|
41
|
-
const event = this.
|
|
44
|
+
const event = this.acceptedHeadEvent;
|
|
42
45
|
return event ? this.store.head(event.regid) : null;
|
|
43
46
|
}
|
|
44
47
|
/** Accepted TEL ordinal, retaining -1n for a staged but unaccepted inception. */
|
|
45
48
|
get sn() {
|
|
46
|
-
return this.
|
|
49
|
+
return this.acceptedHeadEvent?.sn ?? -1n;
|
|
47
50
|
}
|
|
48
51
|
/** Return an accepted inception; a corrupt marker/body pair throws. */
|
|
49
52
|
get regser() {
|
|
50
53
|
return this.regk ? this.acceptedAt(this.regk, 0) : null;
|
|
51
54
|
}
|
|
52
|
-
/** Validate credential membership and issuer before deriving its next blinded registry update. */
|
|
53
|
-
blind(acdc, state, options = {}) {
|
|
54
|
-
if (!(acdc instanceof SerderACDC) || !acdc.verify()) {
|
|
55
|
-
throw new ValidationError("Registry blinding requires a self-verifying ACDC.");
|
|
56
|
-
}
|
|
57
|
-
if (acdc.regid !== this.regk)
|
|
58
|
-
throw new ValidationError("Credential belongs to another registry.");
|
|
59
|
-
if (acdc.issuer !== this.issuer)
|
|
60
|
-
throw new ValidationError("Credential belongs to another issuer.");
|
|
61
|
-
const schema = validateSchema(acdc, this.db);
|
|
62
|
-
if (schema.kind === "missing")
|
|
63
|
-
throw new MissingSchemaError(schema.said);
|
|
64
|
-
if (schema.kind === "invalid")
|
|
65
|
-
throw new FailedSchemaValidationError(schema.reason);
|
|
66
|
-
return this.blindTarget(acdc.said, state, options);
|
|
67
|
-
}
|
|
68
|
-
/** Commit a grant SAID without requiring the grant's issuer to control this presentation registry. */
|
|
69
|
-
present(grant, state = "presented", options = {}) {
|
|
70
|
-
const target = typeof grant === "string" ? grant : grant.said;
|
|
71
|
-
try {
|
|
72
|
-
new Diger({ qb64: target ?? "" });
|
|
73
|
-
}
|
|
74
|
-
catch (cause) {
|
|
75
|
-
throw new ValidationError("Presentation target must be a valid grant SAID.", { cause });
|
|
76
|
-
}
|
|
77
|
-
return this.blindTarget(target, state, options);
|
|
78
|
-
}
|
|
79
|
-
/** Empty target/state disclose a vacuous step; downstream verification retains the preceding binding. */
|
|
80
|
-
vacate(options = {}) {
|
|
81
|
-
return this.blindTarget("", "", options);
|
|
82
|
-
}
|
|
83
|
-
/** Derive and stage a validated target; presentation/vacuous callers own their target checks. */
|
|
84
|
-
blindTarget(target, state, options) {
|
|
85
|
-
const tip = this.effectiveFrontier();
|
|
86
|
-
if (!tip)
|
|
87
|
-
throw new ValidationError("Registry must be anchored before updates.");
|
|
88
|
-
if ("blinder" in options)
|
|
89
|
-
throw new ValidationError("Caller-supplied blinder overrides are unsupported.");
|
|
90
|
-
const sn = tip.sn + 1n;
|
|
91
|
-
if (sn > BigInt(Number.MAX_SAFE_INTEGER))
|
|
92
|
-
throw new RangeError("Unsafe registry update ordinal.");
|
|
93
|
-
const { raw, salt, tier, bound, bsn, bd, ...wire } = options;
|
|
94
|
-
const inputs = { raw, salt, tier, sn, acdc: target, state };
|
|
95
|
-
const blinder = bound ? makeBoundState({ ...inputs, bsn, bd }) : makeBlindState(inputs);
|
|
96
|
-
const serder = blindate(tip.regid, tip.said, blinder.d.nonce, { ...wire, sn });
|
|
97
|
-
const decision = this.processEvent(serder);
|
|
98
|
-
if (decision.kind === "reject")
|
|
99
|
-
throw new ValidationError(`Registry update rejected: ${decision.reason}`);
|
|
100
|
-
return [blinder, serder];
|
|
101
|
-
}
|
|
102
|
-
/** Extend an accepted head through exactly one staged successor at each ordinal, without mutation. */
|
|
103
|
-
effectiveFrontier() {
|
|
104
|
-
let tip = this.regk ? this.acceptedHead(this.regk) : null;
|
|
105
|
-
while (tip) {
|
|
106
|
-
const sn = tip.sn + 1n;
|
|
107
|
-
if (sn > BigInt(Number.MAX_SAFE_INTEGER))
|
|
108
|
-
return tip;
|
|
109
|
-
const saids = new Set();
|
|
110
|
-
for (const escrow of [this.store.baser.maes, this.store.baser.ooes]) {
|
|
111
|
-
for (const [said] of escrow?.get(tip.regid, Number(sn)) ?? [])
|
|
112
|
-
saids.add(said);
|
|
113
|
-
}
|
|
114
|
-
let successor = null;
|
|
115
|
-
for (const said of saids) {
|
|
116
|
-
const body = this.store.event(said);
|
|
117
|
-
if (!body)
|
|
118
|
-
continue;
|
|
119
|
-
if (body.said !== said)
|
|
120
|
-
throw new Error("Corrupt staged registry event.");
|
|
121
|
-
const result = validateUpdate(body, tip.regid);
|
|
122
|
-
if (result.kind !== "valid" || result.event.sn !== sn || result.event.prior !== tip.said)
|
|
123
|
-
continue;
|
|
124
|
-
if (successor)
|
|
125
|
-
throw new ValidationError("Registry has conflicting staged successors.");
|
|
126
|
-
successor = result.event;
|
|
127
|
-
}
|
|
128
|
-
if (!successor)
|
|
129
|
-
return tip;
|
|
130
|
-
tip = successor;
|
|
131
|
-
}
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
134
55
|
/** Retry newly visible anchors, then advance the contiguous accepted chain. */
|
|
135
56
|
processEscrows() {
|
|
136
57
|
this.processMissingAnchors();
|
|
@@ -161,10 +82,13 @@ export class RegistryEventer {
|
|
|
161
82
|
return { kind: "reject", reason: "prior" };
|
|
162
83
|
if ((number === undefined) !== (diger === undefined))
|
|
163
84
|
return { kind: "reject", reason: "anchor" };
|
|
85
|
+
if (number && diger && !verifyRegistryAnchor(event, { db: this.db, issuer: this.issuer, number, diger })) {
|
|
86
|
+
return { kind: "reject", reason: "anchor" };
|
|
87
|
+
}
|
|
88
|
+
// Already accepted TEL history is immutable; explicit claims still verify before duplicate success.
|
|
89
|
+
if (occupied?.kind === "duplicate")
|
|
90
|
+
return this.processEvent(serder);
|
|
164
91
|
if (number && diger) {
|
|
165
|
-
if (!verifyRegistryAnchor(event, { db: this.db, issuer: this.issuer, number, diger })) {
|
|
166
|
-
return { kind: "reject", reason: "anchor" };
|
|
167
|
-
}
|
|
168
92
|
this.store.putAnchor(said, number, diger);
|
|
169
93
|
}
|
|
170
94
|
else {
|
|
@@ -185,7 +109,7 @@ export class RegistryEventer {
|
|
|
185
109
|
const sn = head.sn + 1n;
|
|
186
110
|
if (sn > BigInt(Number.MAX_SAFE_INTEGER))
|
|
187
111
|
return;
|
|
188
|
-
const candidates = this.store.baser.ooes
|
|
112
|
+
const candidates = this.store.baser.ooes.get(this.regk, Number(sn)).map(([said]) => said);
|
|
189
113
|
candidates.sort((a, b) => this.compareAnchors(a, b));
|
|
190
114
|
let advanced = false;
|
|
191
115
|
for (const said of candidates) {
|
|
@@ -207,8 +131,8 @@ export class RegistryEventer {
|
|
|
207
131
|
if (this.regk === null)
|
|
208
132
|
return;
|
|
209
133
|
const slots = new Map();
|
|
210
|
-
// Finish the read cursor before writes.
|
|
211
|
-
for (const [, sn, [said]] of this.store.baser.maes
|
|
134
|
+
// Finish the read cursor before writes.
|
|
135
|
+
for (const [, sn, [said]] of this.store.baser.maes.getTopItemIter(this.regk)) {
|
|
212
136
|
if (!Number.isSafeInteger(sn) || sn < 0)
|
|
213
137
|
throw new RangeError("Unsafe registry escrow ordinal.");
|
|
214
138
|
const candidates = slots.get(sn) ?? [];
|
|
@@ -228,16 +152,38 @@ export class RegistryEventer {
|
|
|
228
152
|
for (const event of candidates) {
|
|
229
153
|
const result = this.processEvent(event.serder);
|
|
230
154
|
if (result.kind === "reject" || result.kind === "duplicate") {
|
|
231
|
-
this.store.clearEscrows(this.regk, sn, event.said);
|
|
155
|
+
const removed = this.store.clearEscrows(this.regk, sn, event.said);
|
|
156
|
+
if (removed && result.kind === "reject") {
|
|
157
|
+
consoleLogger.warn("RegistryEventer ejected registry candidate from escrow", {
|
|
158
|
+
family: "registry",
|
|
159
|
+
said: event.said,
|
|
160
|
+
regk: this.regk,
|
|
161
|
+
sn,
|
|
162
|
+
reason: result.reason,
|
|
163
|
+
});
|
|
164
|
+
}
|
|
232
165
|
}
|
|
233
166
|
}
|
|
234
167
|
}
|
|
235
168
|
}
|
|
236
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Prune unrecoverable candidates and report completed removals; accepted duplicates stay quiet.
|
|
171
|
+
* @param said Candidate event SAID loaded from the current escrow snapshot.
|
|
172
|
+
* @param sn TEL ordinal under which the candidate was indexed.
|
|
173
|
+
* @returns The validated candidate, or null after obsolete or invalid membership cleanup.
|
|
174
|
+
*/
|
|
237
175
|
replayCandidate(said, sn) {
|
|
238
176
|
const serder = this.store.event(said);
|
|
239
177
|
if (!serder) {
|
|
240
|
-
this.store.clearEscrows(this.regk, sn, said)
|
|
178
|
+
if (this.store.clearEscrows(this.regk, sn, said)) {
|
|
179
|
+
consoleLogger.warn("RegistryEventer ejected registry candidate from escrow", {
|
|
180
|
+
family: "registry",
|
|
181
|
+
said,
|
|
182
|
+
regk: this.regk,
|
|
183
|
+
sn,
|
|
184
|
+
reason: "missingEvent",
|
|
185
|
+
});
|
|
186
|
+
}
|
|
241
187
|
return null;
|
|
242
188
|
}
|
|
243
189
|
if (serder.said !== said)
|
|
@@ -245,6 +191,7 @@ export class RegistryEventer {
|
|
|
245
191
|
const result = serder.ilk === Ilks.rip
|
|
246
192
|
? validateRip(serder, this.issuer)
|
|
247
193
|
: validateUpdate(serder, this.regk);
|
|
194
|
+
let reason = result.kind === "reject" ? result.reason : "registryOrOrdinal";
|
|
248
195
|
if (result.kind === "valid") {
|
|
249
196
|
const event = result.event;
|
|
250
197
|
if (event.regid === this.regk && event.sn === BigInt(sn)) {
|
|
@@ -252,9 +199,19 @@ export class RegistryEventer {
|
|
|
252
199
|
const prior = sn > 0 ? this.acceptedAt(event.regid, sn - 1) : null;
|
|
253
200
|
if (!existing && (!prior || prior.said === event.prior))
|
|
254
201
|
return event;
|
|
202
|
+
reason = existing?.kind === "duplicate" ? null : existing?.kind === "reject" ? existing.reason : "prior";
|
|
255
203
|
}
|
|
256
204
|
}
|
|
257
|
-
this.store.clearEscrows(this.regk, sn, said);
|
|
205
|
+
const removed = this.store.clearEscrows(this.regk, sn, said);
|
|
206
|
+
if (removed && reason !== null) {
|
|
207
|
+
consoleLogger.warn("RegistryEventer ejected registry candidate from escrow", {
|
|
208
|
+
family: "registry",
|
|
209
|
+
said,
|
|
210
|
+
regk: this.regk,
|
|
211
|
+
sn,
|
|
212
|
+
reason,
|
|
213
|
+
});
|
|
214
|
+
}
|
|
258
215
|
return null;
|
|
259
216
|
}
|
|
260
217
|
/** Earliest verified anchor wins; digest then event SAID break ties using code-point order. */
|
|
@@ -273,20 +230,23 @@ export class RegistryEventer {
|
|
|
273
230
|
return left < right ? -1 : left > right ? 1 : 0;
|
|
274
231
|
}
|
|
275
232
|
/** Accept one parsed event, then advance ready successors without recursive replay. */
|
|
276
|
-
processEvent(serder) {
|
|
277
|
-
const decision = this.processOne(serder);
|
|
233
|
+
processEvent(serder, locators = {}) {
|
|
234
|
+
const decision = this.processOne(serder, locators);
|
|
278
235
|
if (decision.kind === "accept")
|
|
279
236
|
this.processQueued();
|
|
280
237
|
return decision;
|
|
281
238
|
}
|
|
282
239
|
/** Decide and persist one event; callers own subsequent chain progression. */
|
|
283
|
-
processOne(serder) {
|
|
240
|
+
processOne(serder, locators = {}) {
|
|
284
241
|
if (this.regk === null || serder.ilk === Ilks.rip)
|
|
285
|
-
return this.processInception(serder);
|
|
242
|
+
return this.processInception(serder, locators);
|
|
286
243
|
const result = validateUpdate(serder, this.regk);
|
|
287
244
|
if (result.kind === "reject")
|
|
288
245
|
return result;
|
|
289
246
|
const event = result.event;
|
|
247
|
+
if (!validateRegistrySourceLocators(serder, this.db, this.issuer, locators)) {
|
|
248
|
+
return { kind: "reject", reason: "anchor" };
|
|
249
|
+
}
|
|
290
250
|
// Preserve protocol precision until the existing ordinal storage seam can represent it.
|
|
291
251
|
if (event.sn > BigInt(Number.MAX_SAFE_INTEGER))
|
|
292
252
|
return { kind: "reject", reason: "ordinalRange" };
|
|
@@ -299,7 +259,8 @@ export class RegistryEventer {
|
|
|
299
259
|
const env = this.store.baser.env;
|
|
300
260
|
if (!env)
|
|
301
261
|
throw new DatabaseNotOpenError("Registry acceptance requires an open backing store.");
|
|
302
|
-
this.store.baser.
|
|
262
|
+
if (this.store.baser.readonly)
|
|
263
|
+
throw new DatabaseOperationError("Cannot write readonly registry storage.");
|
|
303
264
|
return env.transactionSync(() => {
|
|
304
265
|
const prior = this.acceptedAt(event.regid, Number(event.sn) - 1);
|
|
305
266
|
if (prior && prior.said !== event.prior)
|
|
@@ -326,11 +287,14 @@ export class RegistryEventer {
|
|
|
326
287
|
});
|
|
327
288
|
}
|
|
328
289
|
/** Validate, anchor and accept one inception, or retain its body in anchor escrow. */
|
|
329
|
-
processInception(serder) {
|
|
290
|
+
processInception(serder, locators) {
|
|
330
291
|
const result = validateRip(serder, this.issuer);
|
|
331
292
|
if (result.kind === "reject")
|
|
332
293
|
return result;
|
|
333
294
|
const event = result.event;
|
|
295
|
+
if (!validateRegistrySourceLocators(serder, this.db, this.issuer, locators)) {
|
|
296
|
+
return { kind: "reject", reason: "anchor" };
|
|
297
|
+
}
|
|
334
298
|
if (this.regk !== null && this.regk !== event.regid)
|
|
335
299
|
return { kind: "reject", reason: "registry" };
|
|
336
300
|
const previous = this.acceptedEvent(event);
|
|
@@ -342,8 +306,8 @@ export class RegistryEventer {
|
|
|
342
306
|
const env = this.store.baser.env;
|
|
343
307
|
if (!env)
|
|
344
308
|
throw new DatabaseNotOpenError("Registry acceptance requires an open backing store.");
|
|
345
|
-
|
|
346
|
-
|
|
309
|
+
if (this.store.baser.readonly)
|
|
310
|
+
throw new DatabaseOperationError("Cannot write readonly registry storage.");
|
|
347
311
|
const decision = env.transactionSync(() => {
|
|
348
312
|
const previous = this.acceptedEvent(event);
|
|
349
313
|
if (previous)
|
|
@@ -414,19 +378,24 @@ export class RegistryEventer {
|
|
|
414
378
|
this.store.baser.maes.rem(event.regid, Number(event.sn));
|
|
415
379
|
this.store.baser.ooes.rem(event.regid, Number(event.sn));
|
|
416
380
|
}
|
|
417
|
-
/** Keep
|
|
381
|
+
/** Keep a valid first pair; recovery-invalidated pending anchors must rediscover current-branch authority. */
|
|
418
382
|
discoverAnchor(event) {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
383
|
+
const current = this.store.anchor(event.said);
|
|
384
|
+
if (current) {
|
|
385
|
+
if (verifyRegistryAnchor(event, {
|
|
386
|
+
db: this.db,
|
|
387
|
+
issuer: this.issuer,
|
|
388
|
+
number: current[0],
|
|
389
|
+
diger: current[1],
|
|
390
|
+
}))
|
|
391
|
+
return;
|
|
392
|
+
this.store.baser.ancs.rem(event.said);
|
|
393
|
+
}
|
|
394
|
+
const anchor = findRegistryAnchor(this.db, this.issuer, event.serder);
|
|
426
395
|
if (!anchor)
|
|
427
396
|
return;
|
|
428
|
-
const number = NumberPrimitive.fromNum(BigInt(anchor
|
|
429
|
-
const diger = new Diger({ qb64: anchor
|
|
397
|
+
const number = NumberPrimitive.fromNum(BigInt(anchor[0]));
|
|
398
|
+
const diger = new Diger({ qb64: anchor[1] });
|
|
430
399
|
if (verifyRegistryAnchor(event, { db: this.db, issuer: this.issuer, number, diger })) {
|
|
431
400
|
this.store.putAnchor(event.said, number, diger);
|
|
432
401
|
}
|