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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Mirrors frozen KERIpy acdc.regeventing.vet/vetBinds. Parsing, KEL acceptance,
|
|
4
4
|
* fetching, escrow persistence, and issuer-side TEL processing belong to callers.
|
|
5
5
|
*/
|
|
6
|
-
import { commitBlindState, commitBoundState, Ilks, } from "cesr-ts";
|
|
6
|
+
import { commitBlindState, commitBoundState, Diger, Ilks, ParserError, } from "cesr-ts";
|
|
7
7
|
import { timestampMicros } from "../time/mod.js";
|
|
8
8
|
/** Sequence numbers retain protocol precision; database KEL lookups remain safe integers. */
|
|
9
9
|
function ordinal(event) {
|
|
@@ -14,9 +14,14 @@ function normalizeEvent(event) {
|
|
|
14
14
|
if (!event.verify() || (event.ilk !== Ilks.rip && event.ilk !== Ilks.bup))
|
|
15
15
|
return { kind: "reject", reason: "event" };
|
|
16
16
|
const sequence = event.sad?.n;
|
|
17
|
-
if (typeof sequence !== "string" || !/^[0-9a-
|
|
17
|
+
if (typeof sequence !== "string" || !/^(0|[1-9a-f][0-9a-f]*)$/.test(sequence) || ordinal(event) >= 2n ** 128n) {
|
|
18
18
|
return { kind: "reject", reason: "sequence" };
|
|
19
19
|
}
|
|
20
|
+
const stamp = event.sad?.dt;
|
|
21
|
+
if (typeof stamp !== "string" || !/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}[+-]\d{2}:\d{2}$/.test(stamp)
|
|
22
|
+
|| stamp.startsWith("0000-")
|
|
23
|
+
|| timestampMicros(stamp) === null)
|
|
24
|
+
return { kind: "reject", reason: "timestamp" };
|
|
20
25
|
return {
|
|
21
26
|
kind: "valid",
|
|
22
27
|
event: {
|
|
@@ -61,8 +66,8 @@ export function validateUpdate(serder, regid, prior) {
|
|
|
61
66
|
return result;
|
|
62
67
|
}
|
|
63
68
|
/**
|
|
64
|
-
* Check a local TEL anchor against the
|
|
65
|
-
*
|
|
69
|
+
* Check a local TEL anchor against the current accepted KEL branch and its witness quorum.
|
|
70
|
+
* V2 TEL admission requires the full registry/ordinal/event-SAID seal.
|
|
66
71
|
* Missing or mismatched evidence returns false; database failures propagate.
|
|
67
72
|
*/
|
|
68
73
|
export function verifyRegistryAnchor(event, { db, issuer, number, diger }) {
|
|
@@ -70,13 +75,68 @@ export function verifyRegistryAnchor(event, { db, issuer, number, diger }) {
|
|
|
70
75
|
return false;
|
|
71
76
|
const said = db.kels.getLast(issuer, Number(number.num));
|
|
72
77
|
const anchor = said ? db.getEvtSerder(issuer, said) : null;
|
|
73
|
-
if (!anchor || anchor.said !== diger.qb64 || !db
|
|
78
|
+
if (!anchor || anchor.said !== diger.qb64 || !onCurrentRegistryBranch(db, issuer, anchor)
|
|
79
|
+
|| !db.fullyWitnessed(anchor))
|
|
74
80
|
return false;
|
|
75
|
-
return anchor.seals.some((seal) =>
|
|
76
|
-
&& "i" in seal && "s" in seal && "d" in seal
|
|
77
|
-
&& seal.i === event.regid && seal.s === event.serder.sad.n && seal.d === event.said);
|
|
81
|
+
return anchor.seals.some((seal) => matchesRegistrySeal(seal, event.serder));
|
|
78
82
|
}
|
|
79
|
-
/**
|
|
83
|
+
/** Descend the current head's exact prior digests, stopping at missing or noncontiguous ancestry. */
|
|
84
|
+
function* currentRegistryBranch(db, issuer) {
|
|
85
|
+
let current = db.getKever(issuer)?.serder ?? null;
|
|
86
|
+
while (current) {
|
|
87
|
+
yield current;
|
|
88
|
+
const prior = current.prior ? db.getEvtSerder(issuer, current.prior) : null;
|
|
89
|
+
if (!prior || prior.sn !== current.sn - 1)
|
|
90
|
+
return;
|
|
91
|
+
current = prior;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/** Recovery preserves disputed buckets; new TEL authority comes only from the current branch. */
|
|
95
|
+
function onCurrentRegistryBranch(db, issuer, anchor) {
|
|
96
|
+
for (const current of currentRegistryBranch(db, issuer)) {
|
|
97
|
+
if (current.sn < anchor.sn)
|
|
98
|
+
return false;
|
|
99
|
+
if (current.said === anchor.said)
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
/** Match the full registry/ordinal/event-SAID tuple required for v2 TEL authority. */
|
|
105
|
+
export function matchesRegistrySeal(candidate, event) {
|
|
106
|
+
if (!candidate || typeof candidate !== "object" || Array.isArray(candidate))
|
|
107
|
+
return false;
|
|
108
|
+
const seal = candidate;
|
|
109
|
+
const fields = Object.keys(seal).sort().join(",");
|
|
110
|
+
if (fields !== "d,i,s")
|
|
111
|
+
return false;
|
|
112
|
+
return seal.d === event.said
|
|
113
|
+
&& seal.s === event.sad.n
|
|
114
|
+
&& seal.i === (event.ilk === Ilks.rip ? event.said : event.regid);
|
|
115
|
+
}
|
|
116
|
+
/** Refuse resolvable false locators before publication, without persisting unsigned requirements. */
|
|
117
|
+
export function validateRegistrySourceLocators(event, db, issuer, { sscs = [], ssts = [] }) {
|
|
118
|
+
const locators = [
|
|
119
|
+
...sscs.map((seal) => ({ controller: issuer, number: seal.s, diger: seal.d })),
|
|
120
|
+
...ssts.map((seal) => ({ controller: seal.i.qb64, number: seal.s, diger: seal.d })),
|
|
121
|
+
];
|
|
122
|
+
for (const { controller, number, diger } of locators) {
|
|
123
|
+
if (issuer !== null && controller !== issuer)
|
|
124
|
+
return false;
|
|
125
|
+
if (controller === null || number.num > BigInt(Number.MAX_SAFE_INTEGER))
|
|
126
|
+
continue;
|
|
127
|
+
const accepted = db.kels.getLast(controller, Number(number.num));
|
|
128
|
+
if (!accepted)
|
|
129
|
+
continue;
|
|
130
|
+
if (accepted !== diger.qb64)
|
|
131
|
+
return false;
|
|
132
|
+
const anchor = db.getEvtSerder(controller, accepted);
|
|
133
|
+
if (anchor && (!onCurrentRegistryBranch(db, controller, anchor)
|
|
134
|
+
|| !anchor.seals.some((seal) => matchesRegistrySeal(seal, event))))
|
|
135
|
+
return false;
|
|
136
|
+
}
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
/** Public stateless vetting authenticates digest commitments; other seal fields are nonbinding hints. */
|
|
80
140
|
function sealDigests(event) {
|
|
81
141
|
return event.seals.flatMap((seal) => {
|
|
82
142
|
if (typeof seal === "string")
|
|
@@ -86,19 +146,26 @@ function sealDigests(event) {
|
|
|
86
146
|
return [];
|
|
87
147
|
});
|
|
88
148
|
}
|
|
89
|
-
/**
|
|
90
|
-
function
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
149
|
+
/** Find an accepted controller event carrying an exact registry seal and its historical witness quorum. */
|
|
150
|
+
export function findRegistryAnchor(db, issuer, registry) {
|
|
151
|
+
let earliest = null;
|
|
152
|
+
for (const event of currentRegistryBranch(db, issuer)) {
|
|
153
|
+
if (db.fullyWitnessed(event)
|
|
154
|
+
&& event.seals.some((seal) => matchesRegistrySeal(seal, registry))) {
|
|
155
|
+
earliest = [event.sn, event.said];
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return earliest;
|
|
159
|
+
}
|
|
160
|
+
/** Find a public digest commitment without granting v2 registry admission authority. */
|
|
161
|
+
function findDigestAnchor(db, issuer, digest) {
|
|
162
|
+
let earliest = null;
|
|
163
|
+
for (const event of currentRegistryBranch(db, issuer)) {
|
|
164
|
+
if (db.fullyWitnessed(event) && sealDigests(event).includes(digest)) {
|
|
165
|
+
earliest = [event.sn, event.said];
|
|
166
|
+
}
|
|
100
167
|
}
|
|
101
|
-
return
|
|
168
|
+
return earliest;
|
|
102
169
|
}
|
|
103
170
|
/** Match the reference's source-hint fallback and named aggregate-seal refusal. */
|
|
104
171
|
function vetAnchor(event, issuer, db, told, source) {
|
|
@@ -111,29 +178,66 @@ function vetAnchor(event, issuer, db, told, source) {
|
|
|
111
178
|
if (source !== undefined) {
|
|
112
179
|
const said = typeof source === "string" ? source : db.kels.getLast(issuer, source);
|
|
113
180
|
const anchor = said ? db.getEvtSerder(issuer, said) : null;
|
|
114
|
-
if (anchor)
|
|
181
|
+
if (anchor && db.kels.getLast(issuer, anchor.sn) === anchor.said
|
|
182
|
+
&& onCurrentRegistryBranch(db, issuer, anchor)) {
|
|
115
183
|
const digests = sealDigests(anchor);
|
|
116
|
-
if (digests.includes(event.said))
|
|
184
|
+
if (db.fullyWitnessed(anchor) && digests.includes(event.said)) {
|
|
117
185
|
return { kind: "verified", anchor: [anchor.sn, anchor.said] };
|
|
186
|
+
}
|
|
118
187
|
if (digests.length && !digests.some((digest) => typeof digest === "string" && told.has(digest))) {
|
|
119
188
|
return { kind: "reject", reason: "rootSeal" };
|
|
120
189
|
}
|
|
121
190
|
}
|
|
122
191
|
}
|
|
123
|
-
const anchor =
|
|
192
|
+
const anchor = findDigestAnchor(db, issuer, event.said);
|
|
124
193
|
if (anchor)
|
|
125
194
|
return { kind: "verified", anchor };
|
|
126
195
|
for (const pre of db.kevers.keys()) {
|
|
127
|
-
if (pre !== issuer &&
|
|
196
|
+
if (pre !== issuer && findDigestAnchor(db, pre, event.said))
|
|
128
197
|
return { kind: "reject", reason: "anchor" };
|
|
129
198
|
}
|
|
130
199
|
return missing;
|
|
131
200
|
}
|
|
132
|
-
/**
|
|
133
|
-
function vetBlind(blinder, blid) {
|
|
134
|
-
|
|
201
|
+
/** Authenticate the declared native BLID against the exact carried primitive tuple. */
|
|
202
|
+
export function vetBlind(blinder, blid) {
|
|
203
|
+
if (!/^[E-I][A-Za-z0-9_-]{43}$/.test(blid) || blinder.d.nonce !== blid)
|
|
204
|
+
return false;
|
|
205
|
+
let digest;
|
|
206
|
+
try {
|
|
207
|
+
digest = new Diger({ qb64: blid });
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
if (error instanceof ParserError)
|
|
211
|
+
return false;
|
|
212
|
+
throw error;
|
|
213
|
+
}
|
|
214
|
+
if (new Diger({ code: digest.code, raw: digest.raw }).qb64 !== blid)
|
|
215
|
+
return false;
|
|
216
|
+
const redone = "bn" in blinder ? commitBoundState(blinder, digest.code) : commitBlindState(blinder, digest.code);
|
|
135
217
|
return redone.d.nonce === blid;
|
|
136
218
|
}
|
|
219
|
+
/** A bound opening names an exact accepted Issuee event, including historical interactions. */
|
|
220
|
+
export function vetBound(blinder, acdc, db) {
|
|
221
|
+
if (!("bn" in blinder))
|
|
222
|
+
return null;
|
|
223
|
+
const number = blinder.bn.num, digest = blinder.bd.nonce;
|
|
224
|
+
if (!blinder.td.nonce && !blinder.ts.text) {
|
|
225
|
+
return number === 0n && !digest ? null : { kind: "reject", reason: "binding" };
|
|
226
|
+
}
|
|
227
|
+
if (!digest || !acdc || blinder.td.nonce !== acdc.said || !acdc.issuee)
|
|
228
|
+
return { kind: "reject", reason: "binding" };
|
|
229
|
+
const issuer = acdc.issuee;
|
|
230
|
+
const missing = { kind: "missing", reason: "anchor", issuer, said: digest };
|
|
231
|
+
if (number > BigInt(Number.MAX_SAFE_INTEGER))
|
|
232
|
+
return missing;
|
|
233
|
+
const accepted = db.kels.getLast(issuer, Number(number));
|
|
234
|
+
if (!accepted)
|
|
235
|
+
return missing;
|
|
236
|
+
if (accepted !== digest)
|
|
237
|
+
return { kind: "reject", reason: "anchor" };
|
|
238
|
+
const event = db.getEvtSerder(issuer, accepted);
|
|
239
|
+
return event && db.fullyWitnessed(event) ? null : missing;
|
|
240
|
+
}
|
|
137
241
|
/** A registry must bind both the exact credential and its issuer, plus rd when present. */
|
|
138
242
|
function binding(acdc, state) {
|
|
139
243
|
if (!acdc.verify() || state.acdc !== acdc.said || acdc.issuer !== state.issuer)
|
|
@@ -200,6 +304,9 @@ export function vet({ rip, updates = [], db, sources = new Map(), acdc, blinder
|
|
|
200
304
|
if (head.ilk === Ilks.bup && blinder) {
|
|
201
305
|
if (!vetBlind(blinder, head.sad.b))
|
|
202
306
|
return { kind: "reject", reason: "disclosure" };
|
|
307
|
+
const refusal = vetBound(blinder, acdc, db);
|
|
308
|
+
if (refusal)
|
|
309
|
+
return refusal;
|
|
203
310
|
state.acdc = blinder.td.nonce || null;
|
|
204
311
|
state.state = blinder.ts.text || null;
|
|
205
312
|
}
|
|
@@ -215,25 +322,28 @@ export function vet({ rip, updates = [], db, sources = new Map(), acdc, blinder
|
|
|
215
322
|
/**
|
|
216
323
|
* Resolve the latest non-vacuous binding behind a verified (possibly historical)
|
|
217
324
|
* head. Every intervening vacuous update needs exactly one authentic disclosure.
|
|
218
|
-
* The
|
|
325
|
+
* The selected SAID fixes the TEL prefix; neither timestamps nor source hints select it.
|
|
219
326
|
*/
|
|
220
|
-
export function vetBinds({ rip, updates = [], db, sources = new Map(), acdc, blinders, target, controller, cutoff, requireSource = false }) {
|
|
221
|
-
if (cutoff !== undefined)
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
327
|
+
export function vetBinds({ rip, updates = [], db, sources = new Map(), acdc, blinders, target, controller, cutoff, at, requireSource = false }) {
|
|
328
|
+
if (cutoff !== undefined)
|
|
329
|
+
return { kind: "reject", reason: "event" };
|
|
330
|
+
if (at !== undefined) {
|
|
331
|
+
const selected = [rip, ...updates].filter((event) => event.said === at);
|
|
332
|
+
if (selected.length !== 1)
|
|
333
|
+
return { kind: "missing", reason: "anchor", issuer: rip.issuer, said: at };
|
|
334
|
+
const checked = selected[0].ilk === Ilks.rip ? validateRip(selected[0]) : validateUpdate(selected[0], rip.said);
|
|
335
|
+
if (checked.kind === "reject")
|
|
336
|
+
return checked;
|
|
337
|
+
const prefix = [];
|
|
229
338
|
for (const update of updates) {
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
return { kind: "reject", reason: "
|
|
233
|
-
|
|
234
|
-
|
|
339
|
+
const sequence = update.sad?.n;
|
|
340
|
+
if (typeof sequence !== "string" || !/^(0|[1-9a-f][0-9a-f]*)$/.test(sequence) || ordinal(update) >= 2n ** 128n) {
|
|
341
|
+
return { kind: "reject", reason: "sequence" };
|
|
342
|
+
}
|
|
343
|
+
if (ordinal(update) <= checked.event.sn)
|
|
344
|
+
prefix.push(update);
|
|
235
345
|
}
|
|
236
|
-
updates =
|
|
346
|
+
updates = prefix;
|
|
237
347
|
}
|
|
238
348
|
const result = vet({ rip, updates, db, sources });
|
|
239
349
|
if (result.kind !== "verified")
|
|
@@ -243,10 +353,19 @@ export function vetBinds({ rip, updates = [], db, sources = new Map(), acdc, bli
|
|
|
243
353
|
const newest = [...updates].sort((a, b) => ordinal(a) > ordinal(b) ? -1 : ordinal(a) < ordinal(b) ? 1 : 0);
|
|
244
354
|
for (const update of newest) {
|
|
245
355
|
const matches = blinders.filter((blinder) => blinder.d.nonce === update.sad.b);
|
|
356
|
+
if (!matches.length) {
|
|
357
|
+
if (blinders.some((blinder) => !vetBlind(blinder, blinder.d.nonce))
|
|
358
|
+
|| new Set(blinders.map((blinder) => blinder.d.nonce)).size !== blinders.length)
|
|
359
|
+
return { kind: "reject", reason: "disclosure" };
|
|
360
|
+
return { kind: "missing", reason: "disclosure", issuer: result.state.issuer, said: update.said };
|
|
361
|
+
}
|
|
246
362
|
if (matches.length !== 1 || !vetBlind(matches[0], update.sad.b)) {
|
|
247
363
|
return { kind: "reject", reason: "disclosure" };
|
|
248
364
|
}
|
|
249
365
|
const blinder = matches[0];
|
|
366
|
+
const refusal = vetBound(blinder, acdc, db);
|
|
367
|
+
if (refusal)
|
|
368
|
+
return refusal;
|
|
250
369
|
const td = blinder.td.nonce;
|
|
251
370
|
const state = blinder.ts.text;
|
|
252
371
|
if (!td && !state)
|
|
@@ -1,9 +1,38 @@
|
|
|
1
|
-
/**
|
|
2
|
-
import { Saider } from "cesr-ts";
|
|
1
|
+
/** Public registry evidence storage, exact opening verification and accepted replay. */
|
|
2
|
+
import { BlindState, BoundState, bytesEqual, Counter, Ilks, isGroupTuple, parseBlinder, Saider, Vrsn_2_0, } from "cesr-ts";
|
|
3
3
|
import { DatabaseNotOpenError, DatabaseOperationError, ValidationError } from "../core/errors.js";
|
|
4
|
+
import { messagize } from "../core/protocol-serialization.js";
|
|
4
5
|
import { RawRecord } from "../core/records.js";
|
|
5
6
|
import { Komer } from "../db/koming.js";
|
|
6
7
|
import { RegBaser } from "./regbasing.js";
|
|
8
|
+
import { vetBlind } from "./regeventing.js";
|
|
9
|
+
/** Encode one deliberately public opening using its exact primitive representations. */
|
|
10
|
+
export function publicOpeningAttachment(opening) {
|
|
11
|
+
return Counter.enclose({
|
|
12
|
+
code: "bn" in opening ? "BoundStateSextuples" : "BlindedStateQuadruples",
|
|
13
|
+
version: Vrsn_2_0,
|
|
14
|
+
qb64: "bn" in opening ? BoundState.qb64b(opening) : BlindState.qb64b(opening),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/** Decode one retained counted tuple through the existing CESR codec and semantic descriptors. */
|
|
18
|
+
function retainedOpening(raw) {
|
|
19
|
+
const parsed = parseBlinder(raw, Vrsn_2_0, "txt"), tuple = parsed.items[0];
|
|
20
|
+
if (parsed.consumed !== raw.length || parsed.items.length !== 1 || !tuple || !isGroupTuple(tuple)) {
|
|
21
|
+
throw new DatabaseOperationError("Corrupt retained public opening.");
|
|
22
|
+
}
|
|
23
|
+
const fields = tuple.map((field) => {
|
|
24
|
+
if (isGroupTuple(field) || !("qb64b" in field))
|
|
25
|
+
throw new DatabaseOperationError("Corrupt retained opening tuple.");
|
|
26
|
+
return field.qb64b;
|
|
27
|
+
});
|
|
28
|
+
if ((parsed.name === "BlindedStateQuadruples" || parsed.name === "BigBlindedStateQuadruples") && fields.length === 4) {
|
|
29
|
+
return BlindState.fromQb64bTuple([fields[0], fields[1], fields[2], fields[3]]);
|
|
30
|
+
}
|
|
31
|
+
if ((parsed.name === "BoundStateSextuples" || parsed.name === "BigBoundStateSextuples") && fields.length === 6) {
|
|
32
|
+
return BoundState.fromQb64bTuple([fields[0], fields[1], fields[2], fields[3], fields[4], fields[5]]);
|
|
33
|
+
}
|
|
34
|
+
throw new DatabaseOperationError("Corrupt retained public opening family.");
|
|
35
|
+
}
|
|
7
36
|
/** Persisted local registry alias, matching frozen registering.RegistryRecord. */
|
|
8
37
|
export class RegistryRecord extends RawRecord {
|
|
9
38
|
}
|
|
@@ -33,9 +62,10 @@ function registryOrdinal(sn) {
|
|
|
33
62
|
}
|
|
34
63
|
/**
|
|
35
64
|
* Wrap a supplied RegBaser without opening another environment. Reads and writes
|
|
36
|
-
*
|
|
65
|
+
* retain public bytes; retainOpening checks the exact body and BLID. Callers
|
|
66
|
+
* authenticate KEL anchors and decide TEL acceptance.
|
|
37
67
|
* Explicit close delegates to the supplied owner; construction adds no lifetime scope.
|
|
38
|
-
*
|
|
68
|
+
* Local aliases are optional; public observer stores need only evidence tables.
|
|
39
69
|
*/
|
|
40
70
|
export class RegistryStore {
|
|
41
71
|
constructor(baser) {
|
|
@@ -58,7 +88,7 @@ export class RegistryStore {
|
|
|
58
88
|
value: null
|
|
59
89
|
});
|
|
60
90
|
}
|
|
61
|
-
/**
|
|
91
|
+
/** Local alias mapper is optional; refresh it after the owner's reopen. */
|
|
62
92
|
get records() {
|
|
63
93
|
if (!this.baser.env)
|
|
64
94
|
throw new DatabaseNotOpenError("Registry backing store is closed.");
|
|
@@ -70,7 +100,7 @@ export class RegistryStore {
|
|
|
70
100
|
}
|
|
71
101
|
return this.aliases;
|
|
72
102
|
}
|
|
73
|
-
/** Explicit alias write creates regs. only when needed,
|
|
103
|
+
/** Explicit alias write creates regs. only when needed, for local registry management. */
|
|
74
104
|
putRecord(name, record) {
|
|
75
105
|
return this.initializeRecords().pin(name, record);
|
|
76
106
|
}
|
|
@@ -100,19 +130,56 @@ export class RegistryStore {
|
|
|
100
130
|
putEvent(serder) {
|
|
101
131
|
return this.baser.evts.pin(serder.said, serder);
|
|
102
132
|
}
|
|
103
|
-
/** Read
|
|
133
|
+
/** Read deliberately published opening bytes for this exact event, without creating evidence. */
|
|
134
|
+
opening(said) {
|
|
135
|
+
return this.baser.openings.get(said);
|
|
136
|
+
}
|
|
137
|
+
/** Decode and authenticate one deliberately public stored opening, including pending events. */
|
|
138
|
+
publicOpening(said) {
|
|
139
|
+
const raw = this.opening(said);
|
|
140
|
+
if (!raw)
|
|
141
|
+
return null;
|
|
142
|
+
const event = this.event(said), opening = retainedOpening(raw);
|
|
143
|
+
if (!event || event.said !== said || event.ilk !== Ilks.bup || !event.verify()
|
|
144
|
+
|| !vetBlind(opening, event.sad.b)) {
|
|
145
|
+
throw new DatabaseOperationError("Retained public opening does not authenticate its stored event.");
|
|
146
|
+
}
|
|
147
|
+
return opening;
|
|
148
|
+
}
|
|
149
|
+
/** Retain one authentic public BUP opening only against its exact already-stored body. */
|
|
150
|
+
retainOpening(event, opening) {
|
|
151
|
+
if (event.ilk !== Ilks.bup || !event.verify())
|
|
152
|
+
throw new ValidationError("Public opening requires a verified BUP.");
|
|
153
|
+
const stored = this.event(event.said);
|
|
154
|
+
if (!stored || !bytesEqual(stored.raw, event.raw)) {
|
|
155
|
+
throw new ValidationError("Public opening requires the exact stored event body.");
|
|
156
|
+
}
|
|
157
|
+
if (!vetBlind(opening, event.sad.b)) {
|
|
158
|
+
throw new ValidationError("Public opening does not match the event commitment.");
|
|
159
|
+
}
|
|
160
|
+
const raw = publicOpeningAttachment(opening), old = this.opening(event.said);
|
|
161
|
+
if (old) {
|
|
162
|
+
if (!bytesEqual(old, raw)) {
|
|
163
|
+
throw new ValidationError("A different public opening is already retained for this event.");
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
else if (!this.baser.openings.put(event.said, raw)) {
|
|
167
|
+
const retained = this.opening(event.said);
|
|
168
|
+
if (!retained || !bytesEqual(retained, raw)) {
|
|
169
|
+
throw new ValidationError("A different public opening is already retained for this event.");
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return opening;
|
|
173
|
+
}
|
|
174
|
+
/** Read a stored source couple. */
|
|
104
175
|
anchor(said) {
|
|
105
176
|
if (!this.baser.opened)
|
|
106
177
|
throw new DatabaseNotOpenError("Registry backing store is closed.");
|
|
107
|
-
return this.baser.ancs
|
|
178
|
+
return this.baser.ancs.get(said);
|
|
108
179
|
}
|
|
109
|
-
/** Retain the
|
|
180
|
+
/** Retain the first caller-verified anchor pair; later presentations cannot replace it. */
|
|
110
181
|
putAnchor(said, number, diger) {
|
|
111
|
-
|
|
112
|
-
if (current && current[0].num <= number.num)
|
|
113
|
-
return false;
|
|
114
|
-
this.baser.initializeStorage();
|
|
115
|
-
return this.baser.ancs.pin(said, [number, diger]);
|
|
182
|
+
return this.baser.ancs.put(said, [number, diger]);
|
|
116
183
|
}
|
|
117
184
|
/** Read the accepted-head cache without verifying the event. */
|
|
118
185
|
head(regk) {
|
|
@@ -140,15 +207,19 @@ export class RegistryStore {
|
|
|
140
207
|
this.baser.tels.putOn(regk, sn, said);
|
|
141
208
|
this.baser.heads.pin(regk, said);
|
|
142
209
|
}
|
|
143
|
-
/** Yield
|
|
210
|
+
/** Yield accepted public TEL frames, with a retained opening or an explicit empty attachment foot. */
|
|
144
211
|
*cloneTelIter(regk, sn = 0) {
|
|
145
212
|
for (const [, , said] of this.baser.tels.getAllItemIter(regk, registryOrdinal(sn))) {
|
|
146
213
|
const event = this.event(said.qb64);
|
|
147
|
-
if (event)
|
|
148
|
-
|
|
214
|
+
if (!event)
|
|
215
|
+
continue;
|
|
216
|
+
const raw = this.opening(event.said);
|
|
217
|
+
if (raw)
|
|
218
|
+
this.publicOpening(event.said);
|
|
219
|
+
yield messagize(event, raw ?? new Uint8Array(), { gvrsn: Vrsn_2_0 });
|
|
149
220
|
}
|
|
150
221
|
}
|
|
151
|
-
/** Eagerly collect accepted TEL bytes
|
|
222
|
+
/** Eagerly collect accepted TEL bytes in ordinal order. */
|
|
152
223
|
cloneTel(regk, sn = 0) {
|
|
153
224
|
const chunks = [...this.cloneTelIter(regk, sn)];
|
|
154
225
|
const stream = new Uint8Array(chunks.reduce((size, raw) => size + raw.length, 0));
|
|
@@ -162,19 +233,24 @@ export class RegistryStore {
|
|
|
162
233
|
/** Add one missing-anchor candidate in insertion order, deduplicating its SAID. */
|
|
163
234
|
escrowMissingAnchor(regk, sn, said) {
|
|
164
235
|
sn = registryOrdinal(sn);
|
|
165
|
-
this.baser.initializeStorage();
|
|
166
236
|
return this.baser.maes.add(regk, sn, [said]);
|
|
167
237
|
}
|
|
168
238
|
/** Add one out-of-order candidate in insertion order, deduplicating its SAID. */
|
|
169
239
|
escrowOutOfOrder(regk, sn, said) {
|
|
170
240
|
sn = registryOrdinal(sn);
|
|
171
|
-
this.baser.initializeStorage();
|
|
172
241
|
return this.baser.ooes.add(regk, sn, [said]);
|
|
173
242
|
}
|
|
174
|
-
/**
|
|
243
|
+
/**
|
|
244
|
+
* Remove this candidate from both escrow families.
|
|
245
|
+
* @param regk Registry identifier whose candidate slots are being cleared.
|
|
246
|
+
* @param sn TEL ordinal shared by the candidate's escrow memberships.
|
|
247
|
+
* @param said Candidate event SAID; other candidates in the slot remain.
|
|
248
|
+
* @returns Whether either family contained a removed membership.
|
|
249
|
+
*/
|
|
175
250
|
clearEscrows(regk, sn, said) {
|
|
176
251
|
sn = registryOrdinal(sn);
|
|
177
|
-
this.baser.maes
|
|
178
|
-
this.baser.ooes
|
|
252
|
+
const missingAnchor = this.baser.maes.rem(regk, sn, [said]);
|
|
253
|
+
const outOfOrder = this.baser.ooes.rem(regk, sn, [said]);
|
|
254
|
+
return missingAnchor || outOfOrder;
|
|
179
255
|
}
|
|
180
256
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
/** Named local v2 registry services; legacy VDR services retain their separate module and owner. */
|
|
2
|
+
import { Diger, makeBlindState, makeBoundState, SerderACDC, } from "cesr-ts";
|
|
1
3
|
import { DatabaseNotOpenError, ValidationError } from "../core/errors.js";
|
|
2
|
-
import { regcept } from "./messaging.js";
|
|
3
|
-
import { RegistryEventer
|
|
4
|
-
import { validateRip } from "./regeventing.js";
|
|
4
|
+
import { blindate, regcept } from "./messaging.js";
|
|
5
|
+
import { RegistryEventer } from "./regengine.js";
|
|
6
|
+
import { validateRip, validateUpdate } from "./regeventing.js";
|
|
5
7
|
import { openRegistry, RegistryStore } from "./registering.js";
|
|
8
|
+
import { FailedSchemaValidationError, MissingSchemaError, validateSchema } from "./scheming.js";
|
|
6
9
|
/** Acquire a named manager, joining owned-store cleanup if opening or alias loading fails. */
|
|
7
10
|
export function* createRegery({ hby, baser, ...options }) {
|
|
8
11
|
const ownsBaser = baser === undefined;
|
|
@@ -90,7 +93,6 @@ export class Regery {
|
|
|
90
93
|
const env = this.baser.env;
|
|
91
94
|
if (!env)
|
|
92
95
|
throw new DatabaseNotOpenError("Registry backing store is closed.");
|
|
93
|
-
this.baser.initializeStorage();
|
|
94
96
|
const records = this.store.initializeRecords();
|
|
95
97
|
const registry = new Registry(hab, this.store, name);
|
|
96
98
|
env.transactionSync(() => {
|
|
@@ -201,9 +203,21 @@ export class Registry {
|
|
|
201
203
|
throw new ValidationError(`Registry inception rejected: ${result.reason}`);
|
|
202
204
|
return rip;
|
|
203
205
|
}
|
|
204
|
-
/**
|
|
206
|
+
/** Validate credential membership and issuer before deriving its next blinded registry update. */
|
|
205
207
|
blind(acdc, state, options = {}) {
|
|
206
|
-
|
|
208
|
+
if (!(acdc instanceof SerderACDC) || !acdc.verify()) {
|
|
209
|
+
throw new ValidationError("Registry blinding requires a self-verifying ACDC.");
|
|
210
|
+
}
|
|
211
|
+
if (acdc.regid !== this.regk)
|
|
212
|
+
throw new ValidationError("Credential belongs to another registry.");
|
|
213
|
+
if (acdc.issuer !== this.hab.pre)
|
|
214
|
+
throw new ValidationError("Credential belongs to another issuer.");
|
|
215
|
+
const schema = validateSchema(acdc, this.hab.db);
|
|
216
|
+
if (schema.kind === "missing")
|
|
217
|
+
throw new MissingSchemaError(schema.said);
|
|
218
|
+
if (schema.kind === "invalid")
|
|
219
|
+
throw new FailedSchemaValidationError(schema.reason);
|
|
220
|
+
return this.blindTarget(acdc.said, state, options);
|
|
207
221
|
}
|
|
208
222
|
/** Process parsed TEL evidence through the shared typed engine. */
|
|
209
223
|
processEvent(serder) {
|
|
@@ -213,52 +227,74 @@ export class Registry {
|
|
|
213
227
|
anchorMsg(said, number, diger) {
|
|
214
228
|
return this.eventer.anchorMsg(said, number, diger);
|
|
215
229
|
}
|
|
216
|
-
/**
|
|
230
|
+
/** Commit a grant SAID without requiring the grant's issuer to control this presentation registry. */
|
|
217
231
|
present(grant, state = "presented", options = {}) {
|
|
218
|
-
|
|
232
|
+
const target = typeof grant === "string" ? grant : grant.said;
|
|
233
|
+
try {
|
|
234
|
+
new Diger({ qb64: target ?? "" });
|
|
235
|
+
}
|
|
236
|
+
catch (cause) {
|
|
237
|
+
throw new ValidationError("Presentation target must be a valid grant SAID.", { cause });
|
|
238
|
+
}
|
|
239
|
+
return this.blindTarget(target, state, options);
|
|
219
240
|
}
|
|
220
|
-
/**
|
|
241
|
+
/** Empty target/state disclose a vacuous step; downstream verification retains the preceding binding. */
|
|
221
242
|
vacate(options = {}) {
|
|
222
|
-
return this.
|
|
243
|
+
return this.blindTarget("", "", options);
|
|
244
|
+
}
|
|
245
|
+
/** Derive and stage a validated target; presentation/vacuous callers own their target checks. */
|
|
246
|
+
blindTarget(target, state, options) {
|
|
247
|
+
const tip = this.effectiveFrontier();
|
|
248
|
+
if (!tip)
|
|
249
|
+
throw new ValidationError("Registry must be anchored before updates.");
|
|
250
|
+
if ("blinder" in options)
|
|
251
|
+
throw new ValidationError("Caller-supplied blinder overrides are unsupported.");
|
|
252
|
+
const sn = tip.sn + 1n;
|
|
253
|
+
if (sn > BigInt(Number.MAX_SAFE_INTEGER))
|
|
254
|
+
throw new RangeError("Unsafe registry update ordinal.");
|
|
255
|
+
const { raw, salt, tier, bound, bsn, bd, ...wire } = options;
|
|
256
|
+
const inputs = { raw, salt, tier, sn, acdc: target, state };
|
|
257
|
+
const blinder = bound ? makeBoundState({ ...inputs, bsn, bd }) : makeBlindState(inputs);
|
|
258
|
+
const serder = blindate(tip.regid, tip.said, blinder.d.nonce, { ...wire, sn });
|
|
259
|
+
const decision = this.processEvent(serder);
|
|
260
|
+
if (decision.kind === "reject")
|
|
261
|
+
throw new ValidationError(`Registry update rejected: ${decision.reason}`);
|
|
262
|
+
return [blinder, serder];
|
|
263
|
+
}
|
|
264
|
+
/** Extend an accepted head through exactly one staged successor at each ordinal, without mutation. */
|
|
265
|
+
effectiveFrontier() {
|
|
266
|
+
let tip = this.eventer.acceptedHeadEvent;
|
|
267
|
+
while (tip) {
|
|
268
|
+
const sn = tip.sn + 1n;
|
|
269
|
+
if (sn > BigInt(Number.MAX_SAFE_INTEGER))
|
|
270
|
+
return tip;
|
|
271
|
+
const saids = new Set();
|
|
272
|
+
for (const escrow of [this.store.baser.maes, this.store.baser.ooes]) {
|
|
273
|
+
for (const [said] of escrow?.get(tip.regid, Number(sn)) ?? [])
|
|
274
|
+
saids.add(said);
|
|
275
|
+
}
|
|
276
|
+
let successor = null;
|
|
277
|
+
for (const said of saids) {
|
|
278
|
+
const body = this.store.event(said);
|
|
279
|
+
if (!body)
|
|
280
|
+
continue;
|
|
281
|
+
if (body.said !== said)
|
|
282
|
+
throw new Error("Corrupt staged registry event.");
|
|
283
|
+
const result = validateUpdate(body, tip.regid);
|
|
284
|
+
if (result.kind !== "valid" || result.event.sn !== sn || result.event.prior !== tip.said)
|
|
285
|
+
continue;
|
|
286
|
+
if (successor)
|
|
287
|
+
throw new ValidationError("Registry has conflicting staged successors.");
|
|
288
|
+
successor = result.event;
|
|
289
|
+
}
|
|
290
|
+
if (!successor)
|
|
291
|
+
return tip;
|
|
292
|
+
tip = successor;
|
|
293
|
+
}
|
|
294
|
+
return null;
|
|
223
295
|
}
|
|
224
296
|
/** Retry both missing-anchor and ordering prerequisites. */
|
|
225
297
|
processEscrows() {
|
|
226
298
|
this.eventer.processEscrows();
|
|
227
299
|
}
|
|
228
300
|
}
|
|
229
|
-
/** Caller-facing v2 operations over a borrowed Regery; this facade acquires no keys, stores or runtime service. */
|
|
230
|
-
export class Registrar {
|
|
231
|
-
constructor(rgy) {
|
|
232
|
-
Object.defineProperty(this, "rgy", {
|
|
233
|
-
enumerable: true,
|
|
234
|
-
configurable: true,
|
|
235
|
-
writable: true,
|
|
236
|
-
value: rgy
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
/** Accept instances directly; registry keys take precedence over local aliases, as in frozen KERIpy. */
|
|
240
|
-
registry(reference) {
|
|
241
|
-
if (reference instanceof Registry)
|
|
242
|
-
return reference;
|
|
243
|
-
const registry = this.rgy.regs.get(reference) ?? this.rgy.registryByName(reference);
|
|
244
|
-
if (!registry)
|
|
245
|
-
throw new ValidationError(`Unknown registry: ${reference}`);
|
|
246
|
-
return registry;
|
|
247
|
-
}
|
|
248
|
-
/** Create one named registry through the manager's existing atomic inception/alias workflow. */
|
|
249
|
-
makeRegistry(name, prefix, options = {}) {
|
|
250
|
-
return this.rgy.makeRegistry(name, prefix, options);
|
|
251
|
-
}
|
|
252
|
-
/** Stage a credential binding, requiring its issuer and registry to match the resolved Registry. */
|
|
253
|
-
issue(reference, acdc, state = "issued", options = {}) {
|
|
254
|
-
return this.registry(reference).blind(acdc, state, options);
|
|
255
|
-
}
|
|
256
|
-
/** Bind a grant SAID through a registry instance, key or alias. */
|
|
257
|
-
present(reference, grant, state = "presented", options = {}) {
|
|
258
|
-
return this.registry(reference).present(grant, state, options);
|
|
259
|
-
}
|
|
260
|
-
/** Append a vacuous state disclosure through the resolved registry. */
|
|
261
|
-
vacate(reference, options = {}) {
|
|
262
|
-
return this.registry(reference).vacate(options);
|
|
263
|
-
}
|
|
264
|
-
}
|