keri-ts 1.0.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 +23 -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 +40 -7
- package/esm/keri/npm/src/acdc/regbasing.js +13 -2
- package/esm/keri/npm/src/acdc/regengine.js +71 -23
- package/esm/keri/npm/src/acdc/regeventing.js +163 -44
- package/esm/keri/npm/src/acdc/registering.js +93 -14
- 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 +94 -39
- package/esm/keri/npm/src/acdc/unblinding.js +1042 -0
- package/esm/keri/npm/src/app/{authenticating.js → bootstrap/authenticating.js} +39 -18
- package/esm/keri/npm/src/app/bootstrap/bootstrapping.js +109 -0
- package/esm/keri/npm/src/app/{oobi-replies.js → bootstrap/oobi-replies.js} +8 -6
- package/esm/keri/npm/src/app/{oobiery.js → bootstrap/oobiery.js} +161 -75
- 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} +41 -6
- 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/{reply-streams.js → delivery/reply-streams.js} +52 -7
- package/esm/keri/npm/src/app/delivery/respondant.js +159 -0
- package/esm/keri/npm/src/app/{stored-replies.js → delivery/stored-replies.js} +4 -4
- 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/{configing.js → identity/configing.js} +4 -4
- package/esm/keri/npm/src/app/{delegating.js → identity/delegating.js} +99 -29
- package/esm/keri/npm/src/app/{endpoint-roleing.js → identity/endpoint-roleing.js} +36 -36
- package/esm/keri/npm/src/app/{habbing.js → identity/habbing.js} +232 -150
- 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/ipex-building.js +162 -0
- package/esm/keri/npm/src/app/{ipex-credentialing.js → ipex/ipex-credentialing.js} +142 -31
- package/esm/keri/npm/src/app/ipex/ipex-graph.js +243 -0
- package/esm/keri/npm/src/app/ipex/ipex-grouping.js +664 -0
- package/esm/keri/npm/src/app/{ipex-node-authentication.js → ipex/ipex-node-authentication.js} +83 -6
- package/esm/keri/npm/src/app/ipex/ipex-v2.js +692 -0
- package/esm/keri/npm/src/app/{ipexing.js → ipex/ipexing.js} +58 -1
- 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} +120 -15
- 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} +118 -67
- 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/{grouping.js → multisig/grouping.js} +384 -70
- 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} +8 -14
- package/esm/keri/npm/src/app/{signaling.js → notifications/signaling.js} +1 -1
- package/esm/keri/npm/src/app/{parsering.js → protocol/parsering.js} +86 -18
- 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/{query-replies.js → queries/query-replies.js} +57 -6
- 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/{abortable.js → runtime/abortable.js} +43 -4
- 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} +36 -6
- 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} +20 -55
- 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} +39 -2
- 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 -6
- package/esm/keri/npm/src/{app/cli → cli}/common/existing.js +9 -11
- 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 +63 -36
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/ends.js +33 -28
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/loc.js +16 -11
- package/esm/keri/npm/src/cli/endpoints/oobi-clean.js +134 -0
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/oobi.js +35 -32
- package/esm/keri/npm/src/{app/cli → cli/identity}/aid.js +8 -7
- package/esm/keri/npm/src/{app/cli → cli/identity}/challenge.js +60 -49
- package/esm/keri/npm/src/{app/cli → cli/identity}/delegate.js +61 -26
- 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/{app/cli → cli/identity}/rotate.js +60 -57
- package/esm/keri/npm/src/cli/index.js +38 -0
- package/esm/keri/npm/src/{app/cli → cli/messaging}/exchange.js +24 -22
- package/esm/keri/npm/src/{app/cli → cli/messaging}/multisig.js +165 -156
- 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/{app/cli → cli/tools}/annotate.js +10 -4
- package/esm/keri/npm/src/{app/cli → cli/tools}/benchmark.js +15 -4
- package/esm/keri/npm/src/{app/cli → cli/tools}/db-dump.js +11 -10
- 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/{exchange-proofing.js → exchange/exchange-proofing.js} +32 -2
- package/esm/keri/npm/src/core/{protocol-exchanging.js → exchange/protocol-exchanging.js} +26 -4
- package/esm/keri/npm/src/core/genus-framing.js +44 -0
- package/esm/keri/npm/src/core/{eventing.js → kel/eventing.js} +57 -25
- package/esm/keri/npm/src/core/{kever-decisions.js → kel/kever-decisions.js} +24 -12
- package/esm/keri/npm/src/core/{kever.js → kel/kever.js} +4 -4
- 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} +3 -3
- package/esm/keri/npm/src/core/{kram-signatures.js → mailbox/kram-signatures.js} +1 -1
- package/esm/keri/npm/src/core/{kram-staging.js → mailbox/kram-staging.js} +6 -6
- package/esm/keri/npm/src/core/{kram-time.js → mailbox/kram-time.js} +4 -3
- package/esm/keri/npm/src/core/{kraming.js → mailbox/kraming.js} +2 -2
- package/esm/keri/npm/src/core/protocol-eventing.js +1 -1
- package/esm/keri/npm/src/core/protocol-serialization.js +9 -34
- package/esm/keri/npm/src/core/routing.js +52 -17
- package/esm/keri/npm/src/db/baser-defaults.js +11 -0
- package/esm/keri/npm/src/db/basing.js +89 -232
- package/esm/keri/npm/src/db/core/lmdber.js +102 -63
- package/esm/keri/npm/src/db/escrowing.js +73 -49
- 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 -4
- package/esm/keri/npm/src/db/keeping.js +122 -3
- package/esm/keri/npm/src/db/{kram-factors.js → mailbox/kram-factors.js} +1 -1
- package/esm/keri/npm/src/db/{mailboxing.js → mailbox/mailboxing.js} +3 -3
- package/esm/keri/npm/src/db/reger.js +38 -29
- package/esm/keri/npm/src/db/{kel-replay.js → replay/kel-replay.js} +11 -4
- package/esm/keri/npm/src/db/{tel-replay.js → replay/tel-replay.js} +34 -0
- package/esm/keri/npm/src/db/{witness-replay.js → replay/witness-replay.js} +2 -2
- package/esm/keri/npm/src/db/subing.js +2 -3
- package/esm/keri/npm/src/did/webs/artifacts.js +15 -18
- package/esm/keri/npm/src/did/webs/designated-aliases.js +5 -7
- package/esm/keri/npm/src/did/webs/resolving.js +73 -56
- 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 +79 -47
- 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 -82
- package/esm/keri/npm/src/vdr/eventing.js +592 -204
- 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/{app/version.js → version.js} +2 -2
- package/package.json +5 -3
- package/types/_dnt.polyfills.d.ts +6 -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 +18 -7
- package/types/acdc/observing.d.ts.map +1 -1
- package/types/acdc/regbasing.d.ts +3 -1
- package/types/acdc/regbasing.d.ts.map +1 -1
- package/types/acdc/regengine.d.ts +9 -4
- 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 +22 -6
- package/types/acdc/registering.d.ts.map +1 -1
- package/types/acdc/registraring.d.ts +1 -1
- 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 +1 -1
- 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/{oobi-replies.d.ts → bootstrap/oobi-replies.d.ts} +1 -1
- package/types/app/bootstrap/oobi-replies.d.ts.map +1 -0
- package/types/app/{oobiery.d.ts → bootstrap/oobiery.d.ts} +98 -25
- 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} +19 -7
- 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/{stored-replies.d.ts → delivery/stored-replies.d.ts} +1 -1
- 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} +3 -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} +52 -15
- package/types/app/identity/delegating.d.ts.map +1 -0
- package/types/app/{endpoint-roleing.d.ts → identity/endpoint-roleing.d.ts} +24 -13
- package/types/app/identity/endpoint-roleing.d.ts.map +1 -0
- package/types/app/{habbing.d.ts → identity/habbing.d.ts} +73 -32
- 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/ipex-building.d.ts +30 -0
- package/types/app/ipex/ipex-building.d.ts.map +1 -0
- package/types/app/{ipex-credentialing.d.ts → ipex/ipex-credentialing.d.ts} +33 -6
- 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-node-authentication.d.ts → ipex/ipex-node-authentication.d.ts} +10 -5
- 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 -6
- 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 -40
- 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/{grouping.d.ts → multisig/grouping.d.ts} +142 -19
- 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} +4 -5
- package/types/app/notifications/notifying.d.ts.map +1 -0
- package/types/app/notifications/signaling.d.ts.map +1 -0
- package/types/app/{parsering.d.ts → protocol/parsering.d.ts} +40 -11
- 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} +4 -27
- 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} +8 -0
- 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 -5
- package/types/cli/common/context.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/existing.d.ts +2 -4
- 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 +2 -0
- 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.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/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 +78 -21
- package/types/core/cues.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} +10 -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} +22 -10
- package/types/core/kel/eventing.d.ts.map +1 -0
- package/types/core/{kever-decisions.d.ts → kel/kever-decisions.d.ts} +21 -8
- package/types/core/kel/kever-decisions.d.ts.map +1 -0
- package/types/core/{kever.d.ts → kel/kever.d.ts} +2 -2
- 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} +1 -1
- package/types/core/mailbox/kram-pruning.d.ts.map +1 -0
- 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/{kram-staging.d.ts → mailbox/kram-staging.d.ts} +2 -2
- package/types/core/mailbox/kram-staging.d.ts.map +1 -0
- package/types/core/{kram-time.d.ts → mailbox/kram-time.d.ts} +2 -2
- package/types/core/mailbox/kram-time.d.ts.map +1 -0
- package/types/core/{kraming.d.ts → mailbox/kraming.d.ts} +5 -5
- 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.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/records.d.ts +1 -1
- package/types/core/records.d.ts.map +1 -1
- package/types/core/routing.d.ts +24 -4
- 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 +32 -44
- package/types/db/basing.d.ts.map +1 -1
- package/types/db/core/lmdber.d.ts +18 -13
- package/types/db/core/lmdber.d.ts.map +1 -1
- package/types/db/escrowing.d.ts +3 -1
- 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 -4
- 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/{kram-factors.d.ts → mailbox/kram-factors.d.ts} +2 -2
- package/types/db/mailbox/kram-factors.d.ts.map +1 -0
- package/types/db/{mailboxing.d.ts → mailbox/mailboxing.d.ts} +2 -2
- package/types/db/mailbox/mailboxing.d.ts.map +1 -0
- package/types/db/reger.d.ts +7 -6
- package/types/db/reger.d.ts.map +1 -1
- package/types/db/{kel-replay.d.ts → replay/kel-replay.d.ts} +1 -2
- package/types/db/replay/kel-replay.d.ts.map +1 -0
- package/types/db/{tel-replay.d.ts → replay/tel-replay.d.ts} +11 -1
- package/types/db/replay/tel-replay.d.ts.map +1 -0
- package/types/db/{witness-replay.d.ts → replay/witness-replay.d.ts} +1 -1
- package/types/db/replay/witness-replay.d.ts.map +1 -0
- package/types/db/subing.d.ts.map +1 -1
- package/types/did/keri/resolving.d.ts +1 -1
- 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 +1 -2
- package/types/did/webs/designated-aliases.d.ts.map +1 -1
- package/types/did/webs/documenting.d.ts +1 -1
- package/types/did/webs/documenting.d.ts.map +1 -1
- package/types/did/webs/resolving.d.ts +13 -9
- 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 +86 -51
- 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 -17
- package/types/vdr/credentialing.d.ts.map +1 -1
- package/types/vdr/eventing.d.ts +60 -18
- 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 +1 -1
- 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/agent-runtime.js +0 -544
- package/esm/keri/npm/src/app/cesr-egress.js +0 -294
- 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 -185
- package/esm/keri/npm/src/app/cli/index.js +0 -36
- package/esm/keri/npm/src/app/cli/init.js +0 -149
- package/esm/keri/npm/src/app/cli/interact.js +0 -72
- package/esm/keri/npm/src/app/cli/ipex.js +0 -519
- package/esm/keri/npm/src/app/cli/query.js +0 -142
- package/esm/keri/npm/src/app/cli/vc.js +0 -283
- package/esm/keri/npm/src/app/cli/verifier.js +0 -92
- package/esm/keri/npm/src/app/credential-workflows.js +0 -409
- package/esm/keri/npm/src/app/cue-runtime.js +0 -38
- package/esm/keri/npm/src/app/essr.js +0 -170
- package/esm/keri/npm/src/app/exchanging.js +0 -1001
- package/esm/keri/npm/src/app/forwarding.js +0 -936
- package/esm/keri/npm/src/app/group-members.js +0 -37
- package/esm/keri/npm/src/app/httping.js +0 -162
- package/esm/keri/npm/src/app/ipex-graph.js +0 -407
- package/esm/keri/npm/src/app/ipex-grouping.js +0 -276
- package/esm/keri/npm/src/app/ipex-v2.js +0 -438
- package/esm/keri/npm/src/app/mailbox-sse.js +0 -240
- package/esm/keri/npm/src/app/multisig-workflows.js +0 -457
- package/esm/keri/npm/src/app/querying.js +0 -775
- package/esm/keri/npm/src/app/reactor.js +0 -394
- package/esm/keri/npm/src/app/respondant.js +0 -358
- package/esm/keri/npm/src/app/runtime-services.js +0 -22
- package/esm/keri/npm/src/app/tcp-conversation.js +0 -85
- package/esm/keri/npm/src/app/tcp-egress.js +0 -251
- package/esm/keri/npm/src/app/verifier-agent.js +0 -443
- package/esm/keri/npm/src/app/witnessing.js +0 -914
- package/esm/keri/npm/src/core/index.js +0 -23
- package/esm/keri/npm/src/db/exchange-nests.js +0 -80
- package/esm/keri/npm/src/db/exchange-records.js +0 -7
- package/esm/keri/npm/src/db/payload-archive.js +0 -402
- package/esm/keri/npm/src/db/payload-store.js +0 -406
- 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 -230
- package/esm/keri/npm/src/vdr/registry-tsn.js +0 -217
- package/types/app/abortable.d.ts +0 -13
- package/types/app/abortable.d.ts.map +0 -1
- package/types/app/agent-runtime.d.ts +0 -221
- 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 -45
- package/types/app/cesr-egress.d.ts.map +0 -1
- package/types/app/cesr-http.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.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 -113
- package/types/app/credential-workflows.d.ts.map +0 -1
- package/types/app/cue-runtime.d.ts +0 -12
- package/types/app/cue-runtime.d.ts.map +0 -1
- package/types/app/delegating.d.ts.map +0 -1
- package/types/app/endpoint-roleing.d.ts.map +0 -1
- package/types/app/essr.d.ts +0 -58
- package/types/app/essr.d.ts.map +0 -1
- package/types/app/exchanging.d.ts +0 -233
- package/types/app/exchanging.d.ts.map +0 -1
- package/types/app/forwarding.d.ts +0 -352
- 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.map +0 -1
- package/types/app/habbing.d.ts.map +0 -1
- package/types/app/httping.d.ts +0 -49
- package/types/app/httping.d.ts.map +0 -1
- package/types/app/ipex-credentialing.d.ts.map +0 -1
- package/types/app/ipex-graph.d.ts +0 -49
- package/types/app/ipex-graph.d.ts.map +0 -1
- package/types/app/ipex-grouping.d.ts +0 -43
- package/types/app/ipex-grouping.d.ts.map +0 -1
- package/types/app/ipex-node-authentication.d.ts.map +0 -1
- package/types/app/ipex-v2.d.ts +0 -46
- 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 -140
- package/types/app/mailbox-director.d.ts.map +0 -1
- package/types/app/mailbox-sse.d.ts +0 -32
- 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 -47
- 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.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.map +0 -1
- package/types/app/protocol-host-policy.d.ts.map +0 -1
- package/types/app/query-replies.d.ts +0 -40
- package/types/app/query-replies.d.ts.map +0 -1
- package/types/app/querying.d.ts +0 -221
- package/types/app/querying.d.ts.map +0 -1
- package/types/app/reactor.d.ts +0 -138
- package/types/app/reactor.d.ts.map +0 -1
- package/types/app/reply-streams.d.ts +0 -20
- package/types/app/reply-streams.d.ts.map +0 -1
- package/types/app/respondant.d.ts +0 -63
- package/types/app/respondant.d.ts.map +0 -1
- package/types/app/runtime-services.d.ts +0 -26
- 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.map +0 -1
- package/types/app/socket-source.d.ts.map +0 -1
- package/types/app/stored-replies.d.ts.map +0 -1
- package/types/app/tcp-conversation.d.ts +0 -27
- package/types/app/tcp-conversation.d.ts.map +0 -1
- package/types/app/tcp-egress.d.ts +0 -49
- package/types/app/tcp-egress.d.ts.map +0 -1
- package/types/app/verifier-agent.d.ts +0 -92
- 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 -223
- package/types/app/witnessing.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-policy.d.ts.map +0 -1
- package/types/core/kram-pruning.d.ts.map +0 -1
- package/types/core/kram-signatures.d.ts.map +0 -1
- 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.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 -15
- package/types/db/exchange-nests.d.ts.map +0 -1
- package/types/db/exchange-records.d.ts +0 -33
- 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/mailboxing.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 -23
- package/types/vdr/credential-tsn.d.ts.map +0 -1
- package/types/vdr/registry-tsn.d.ts +0 -28
- 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/{challenging.js → identity/challenging.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/{signaling.d.ts → notifications/signaling.d.ts} +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}/delegate.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}/db-dump.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
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/** Finite credential-bundle intake; protocol owners retain and recover their own pending evidence. */
|
|
2
|
+
import { Ilks, parse, SerderACDC, SerderKERI } from "cesr-ts";
|
|
3
|
+
import { action, call, ensure, race } from "effection";
|
|
4
|
+
import { consoleLogger } from "../../core/logger.js";
|
|
5
|
+
import { rethrowCleanupFailure } from "../runtime/abortable.js";
|
|
6
|
+
import { chunkBytes } from "../transport/byte-source.js";
|
|
7
|
+
/**
|
|
8
|
+
* Dispatch each frame once, then recover local dependencies through their existing escrow owners.
|
|
9
|
+
* This operation owns its parser/Kevery and starts no network, mailbox or host workers.
|
|
10
|
+
* Later input failures preserve earlier accepted state. Receipts, replies and other messages still
|
|
11
|
+
* use normal dispatch; absence of an importer acceptance lookup is not an additional refusal policy.
|
|
12
|
+
*
|
|
13
|
+
* @param protocol Borrowed protocol dispatcher, sharing reger with its TEL/credential handlers.
|
|
14
|
+
* @param reger Borrowed credential/TEL store whose accepted records establish the result.
|
|
15
|
+
* @param bytes Borrowed finite CESR bundle; parser chunks are copied during intake.
|
|
16
|
+
* @param clock Borrowed timer implementation for the deadline and cooperative yields between sweeps.
|
|
17
|
+
* @param timeoutMs Positive finite post-EOF settlement limit in milliseconds, default 5000; floored with a one-millisecond minimum before intake.
|
|
18
|
+
* @returns Accepted-record observations after joined input/handler cleanup. Settlement stops when all observed records are accepted, or the deadline expires.
|
|
19
|
+
* @throws Parser, storage, handler and cleanup failures propagate with partial accepted state intact. Cancellation joins active work; a deadline cannot interrupt synchronous owner work mid-sweep.
|
|
20
|
+
*/
|
|
21
|
+
export function* importCredentialStream(protocol, reger, bytes, clock, timeoutMs = 5_000) {
|
|
22
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0)
|
|
23
|
+
throw new RangeError("Import timeout must be finite and positive");
|
|
24
|
+
const settlementMs = Math.max(1, Math.floor(timeoutMs));
|
|
25
|
+
if (protocol.vry?.reger !== reger || protocol.tvy?.reger !== reger) {
|
|
26
|
+
throw new TypeError("Credential import requires TEL and credential processors sharing its Reger");
|
|
27
|
+
}
|
|
28
|
+
const targets = yield* readImportTargets(protocol, reger, bytes, protocol.makeKevery());
|
|
29
|
+
/** Read current acceptance; an earlier refused duplicate cannot override a persisted accepted record. */
|
|
30
|
+
const unaccepted = () => targets.filter((target) => !importTargetAccepted(target, protocol, reger)).map(({ said }) => said);
|
|
31
|
+
let expired = false;
|
|
32
|
+
if (unaccepted().length) {
|
|
33
|
+
expired = yield* race([
|
|
34
|
+
// Register the deadline before entering the first potentially suspending escrow owner.
|
|
35
|
+
action((resolve) => {
|
|
36
|
+
const timer = clock.setTimeout(() => resolve(true), settlementMs);
|
|
37
|
+
return () => clock.clearTimeout(timer);
|
|
38
|
+
}),
|
|
39
|
+
call(function* () {
|
|
40
|
+
while (true) {
|
|
41
|
+
yield* protocol.processEscrowsOnce();
|
|
42
|
+
if (!unaccepted().length)
|
|
43
|
+
return false;
|
|
44
|
+
// Yield between ordinary sweeps; acceptance or the elapsed deadline ends settlement.
|
|
45
|
+
yield* action((resolve) => {
|
|
46
|
+
const timer = clock.setTimeout(() => resolve(), 1);
|
|
47
|
+
return () => clock.clearTimeout(timer);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}),
|
|
51
|
+
]);
|
|
52
|
+
}
|
|
53
|
+
// The losing race child has joined cleanup before these final accepted-state reads.
|
|
54
|
+
const remaining = unaccepted();
|
|
55
|
+
if (expired) {
|
|
56
|
+
consoleLogger.warn("Credential import settlement deadline expired", {
|
|
57
|
+
timeoutMs: settlementMs,
|
|
58
|
+
unaccepted: remaining,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
saved: targets.filter((target) => target.ilk === null && !target.savedBefore && reger.saved.get([target.said]) !== null)
|
|
63
|
+
.map(({ said }) => said),
|
|
64
|
+
complete: remaining.length === 0,
|
|
65
|
+
unaccepted: remaining,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Capture compact identities while dispatching each complete frame once, joining pending pulls and iterator return.
|
|
70
|
+
*
|
|
71
|
+
* @param protocol Borrowed dispatch owner; refusal diagnostics retain its actual decision detail.
|
|
72
|
+
* @param reger Borrowed store for saved markers observed before first raw credential dispatch.
|
|
73
|
+
* @param bytes Resident finite input, parsed incrementally before each dispatch.
|
|
74
|
+
* @param kvy This input's Kevery over the shared accepted-state domain.
|
|
75
|
+
* @returns Unique directly observed identities after parser EOF and joined source cleanup.
|
|
76
|
+
*/
|
|
77
|
+
function readImportTargets(protocol, reger, bytes, kvy) {
|
|
78
|
+
return call(function* () {
|
|
79
|
+
const controller = new AbortController();
|
|
80
|
+
const frames = parse(chunkBytes(bytes, { signal: controller.signal }));
|
|
81
|
+
const targets = new Map();
|
|
82
|
+
let pending;
|
|
83
|
+
// Handlers stop before this earlier resource joins reads and disposes the input iterator.
|
|
84
|
+
yield* ensure(function* () {
|
|
85
|
+
try {
|
|
86
|
+
if (pending) {
|
|
87
|
+
try {
|
|
88
|
+
yield* call(() => pending);
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
rethrowCleanupFailure(error, controller.signal);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
finally {
|
|
96
|
+
yield* call(() => frames.return());
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
try {
|
|
100
|
+
while (true) {
|
|
101
|
+
pending = frames.next();
|
|
102
|
+
let next;
|
|
103
|
+
try {
|
|
104
|
+
next = yield* call(() => pending);
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
pending = undefined;
|
|
108
|
+
throw error;
|
|
109
|
+
}
|
|
110
|
+
pending = undefined;
|
|
111
|
+
if (next.done)
|
|
112
|
+
return [...targets.values()];
|
|
113
|
+
const serder = next.value.body;
|
|
114
|
+
if (!(serder instanceof SerderACDC) && !(serder instanceof SerderKERI)) {
|
|
115
|
+
throw new TypeError("Credential import requires a KERI or ACDC message");
|
|
116
|
+
}
|
|
117
|
+
// Capture savedBefore exactly once, before dispatch can publish this credential's marker.
|
|
118
|
+
if (!targets.has(serder.said)) {
|
|
119
|
+
const target = importTarget(serder, reger);
|
|
120
|
+
if (target)
|
|
121
|
+
targets.set(target.said, target);
|
|
122
|
+
}
|
|
123
|
+
const { decision } = yield* protocol.dispatch(next.value, {}, kvy);
|
|
124
|
+
if (decision && (decision.kind === "reject" || decision.kind === "drop")) {
|
|
125
|
+
consoleLogger.warn("Credential import message refused", {
|
|
126
|
+
said: serder.said,
|
|
127
|
+
ilk: serder.ilk,
|
|
128
|
+
pre: serder instanceof SerderKERI ? serder.pre : serder.issuer,
|
|
129
|
+
reason: "reason" in decision ? decision.reason : decision.code,
|
|
130
|
+
detail: "message" in decision ? decision.message : "detail" in decision ? decision.detail : undefined,
|
|
131
|
+
cause: "cause" in decision ? decision.cause : undefined,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
finally {
|
|
137
|
+
controller.abort();
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Project only coordinates for accepted records that this credential workflow observes.
|
|
143
|
+
*
|
|
144
|
+
* @param serder One directly imported message; embedded artifacts remain under their existing workflow owners.
|
|
145
|
+
* @param reger Credential store used only to record a raw credential's pre-dispatch saved marker.
|
|
146
|
+
* @returns Compact message identity, or null for messages handled without an importer completion predicate.
|
|
147
|
+
*/
|
|
148
|
+
function importTarget(serder, reger) {
|
|
149
|
+
const said = serder.said, ilk = serder.ilk;
|
|
150
|
+
if (serder instanceof SerderACDC) {
|
|
151
|
+
return ilk === null ? { ilk, said, savedBefore: reger.saved.get([said]) !== null } : null;
|
|
152
|
+
}
|
|
153
|
+
switch (ilk) {
|
|
154
|
+
case Ilks.icp:
|
|
155
|
+
case Ilks.dip:
|
|
156
|
+
case Ilks.rot:
|
|
157
|
+
case Ilks.drt:
|
|
158
|
+
case Ilks.ixn:
|
|
159
|
+
case Ilks.vcp:
|
|
160
|
+
case Ilks.vrt:
|
|
161
|
+
case Ilks.iss:
|
|
162
|
+
case Ilks.rev:
|
|
163
|
+
case Ilks.bis:
|
|
164
|
+
case Ilks.brv:
|
|
165
|
+
return { ilk, said, pre: serder.pre, sn: serder.sn };
|
|
166
|
+
case Ilks.exn:
|
|
167
|
+
return { ilk, said };
|
|
168
|
+
default:
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Observe the normal accepted record without consulting direct-attempt decisions.
|
|
174
|
+
*
|
|
175
|
+
* @param target Input identity; raw storage and unrelated latest heads do not establish its acceptance.
|
|
176
|
+
* @param protocol Borrowed accepted KEL/exchange domain.
|
|
177
|
+
* @param reger Borrowed accepted credential/TEL domain.
|
|
178
|
+
* @returns Whether this exact message has its normal durable acceptance evidence.
|
|
179
|
+
*/
|
|
180
|
+
function importTargetAccepted(target, protocol, reger) {
|
|
181
|
+
switch (target.ilk) {
|
|
182
|
+
case null:
|
|
183
|
+
return reger.saved.get([target.said]) !== null;
|
|
184
|
+
case Ilks.icp:
|
|
185
|
+
case Ilks.dip:
|
|
186
|
+
case Ilks.rot:
|
|
187
|
+
case Ilks.drt:
|
|
188
|
+
case Ilks.ixn:
|
|
189
|
+
return target.pre !== null && target.sn !== null
|
|
190
|
+
&& protocol.kvy.db.kels.getLast(target.pre, target.sn) === target.said;
|
|
191
|
+
case Ilks.vcp:
|
|
192
|
+
case Ilks.vrt:
|
|
193
|
+
case Ilks.iss:
|
|
194
|
+
case Ilks.rev:
|
|
195
|
+
case Ilks.bis:
|
|
196
|
+
case Ilks.brv:
|
|
197
|
+
return target.pre !== null && target.sn !== null && reger.tels.getOn(target.pre, target.sn)?.qb64 === target.said;
|
|
198
|
+
case Ilks.exn:
|
|
199
|
+
return protocol.kvy.db.exns.get([target.said]) !== null;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/** Read-only legacy credential proposal checks performed before member approval/signing. */
|
|
2
|
+
import { concatBytes, Counter, Ilks, parseBytes, TraitDex, } from "cesr-ts";
|
|
3
|
+
import { ValidationError } from "../../core/errors.js";
|
|
4
|
+
import { Credentialer } from "../../vdr/credentialing.js";
|
|
5
|
+
import { validateRegistryInception } from "../../vdr/eventing.js";
|
|
6
|
+
import { validateCredentialRevocation } from "../../vdr/revoking.js";
|
|
7
|
+
import { telAnchorMatches } from "../../vdr/tel-anchor.js";
|
|
8
|
+
import { envelopeFromFrame } from "../protocol/parsering.js";
|
|
9
|
+
import { resolveCachedSchema } from "./schema-resolving.js";
|
|
10
|
+
/** Refuse a blank or conflicting local registry alias before signing its anchor. */
|
|
11
|
+
export function validateRegistryName(reger, name, regk) {
|
|
12
|
+
if (!name.trim())
|
|
13
|
+
throw new ValidationError("Registry name is required.");
|
|
14
|
+
const existing = reger.regs.get(name);
|
|
15
|
+
if (existing && existing.registryKey !== regk) {
|
|
16
|
+
throw new ValidationError(`Registry name ${name} already identifies another registry.`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Require known group KEL authority before adding a fresh anchor signature.
|
|
21
|
+
* A future predecessor stays pending. An accepted historical anchor can use the
|
|
22
|
+
* current keys only while no intervening establishment event has changed them;
|
|
23
|
+
* recorded approval instead reuses its original contribution.
|
|
24
|
+
*/
|
|
25
|
+
export function groupCredentialAnchorReady(hby, issuer, anchor) {
|
|
26
|
+
const kever = hby.db.getKever(issuer);
|
|
27
|
+
if (!kever)
|
|
28
|
+
return false;
|
|
29
|
+
if (kever.estOnly && !anchor.estive) {
|
|
30
|
+
throw new ValidationError("Establishment-only group requires an establishment anchor.");
|
|
31
|
+
}
|
|
32
|
+
const sn = anchor.sn;
|
|
33
|
+
if (sn === null || anchor.pre !== issuer)
|
|
34
|
+
throw new ValidationError("Invalid group anchor identity.");
|
|
35
|
+
if (sn > kever.sn + 1)
|
|
36
|
+
return false;
|
|
37
|
+
if (sn <= kever.sn) {
|
|
38
|
+
if (hby.db.kels.getLast(issuer, sn) !== anchor.said) {
|
|
39
|
+
throw new ValidationError("Group anchor conflicts with accepted KEL state.");
|
|
40
|
+
}
|
|
41
|
+
return kever.lastEst.s <= sn;
|
|
42
|
+
}
|
|
43
|
+
if (anchor.ked?.p !== kever.said) {
|
|
44
|
+
throw new ValidationError("Group anchor predecessor does not match accepted KEL state.");
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
/** Validate the signed VCP policy and its exact issuer anchor without accepting either event. */
|
|
49
|
+
export function validateRegistryProposal(issuer, event, anchor) {
|
|
50
|
+
const inception = validateRegistryInception(event);
|
|
51
|
+
if (!inception.noBackers)
|
|
52
|
+
throw new ValidationError("Local registry authoring requires NoBackers policy.");
|
|
53
|
+
if (inception.issuer !== issuer)
|
|
54
|
+
throw new ValidationError("Registry inception issuer does not match its group.");
|
|
55
|
+
validateProposalAnchor(issuer, event, anchor, inception.estOnly);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Validate issuer/registry/credential/TEL bindings and the cached credential schema.
|
|
59
|
+
* Missing accepted registry or schema remains pending. Malformed business evidence
|
|
60
|
+
* is refused without changing KEL, TEL, wallet or alias state; storage faults propagate.
|
|
61
|
+
*/
|
|
62
|
+
export function validateCredentialIssueProposal(rgy, issuer, creder, event, anchor) {
|
|
63
|
+
if (event.ilk !== Ilks.iss) {
|
|
64
|
+
throw new ValidationError("Local credential issuance requires iss evidence in a NoBackers registry.");
|
|
65
|
+
}
|
|
66
|
+
if (!creder.verify() || !event.verify() || event.pre !== creder.said || event.sn !== 0 || creder.issuer !== issuer) {
|
|
67
|
+
throw new ValidationError("Credential issuance does not match its credential and group issuer.");
|
|
68
|
+
}
|
|
69
|
+
const regk = creder.regid;
|
|
70
|
+
if (!regk)
|
|
71
|
+
throw new ValidationError("Credential issuance is missing its registry identifier.");
|
|
72
|
+
const state = rgy.reger.states.get(regk);
|
|
73
|
+
if (!state)
|
|
74
|
+
return false;
|
|
75
|
+
if (state.ii !== issuer)
|
|
76
|
+
throw new ValidationError("Credential registry is controlled by another issuer.");
|
|
77
|
+
if (!(state.c ?? []).includes(TraitDex.NoBackers) || event.ked?.ri !== regk) {
|
|
78
|
+
throw new ValidationError("Local credential issuance registry or NoBackers policy mismatch.");
|
|
79
|
+
}
|
|
80
|
+
if (anchor)
|
|
81
|
+
validateProposalAnchor(issuer, event, anchor, (state.c ?? []).includes(TraitDex.EstOnly));
|
|
82
|
+
const prior = rgy.reger.tels.getOn(creder.said, 0);
|
|
83
|
+
if (prior && prior.qb64 !== event.said)
|
|
84
|
+
throw new ValidationError("Credential already has another issuance event.");
|
|
85
|
+
const schema = creder.schema;
|
|
86
|
+
if (typeof schema === "string" && !resolveCachedSchema(rgy.hby, schema))
|
|
87
|
+
return false;
|
|
88
|
+
new Credentialer(rgy.hby, { reger: rgy.reger, vry: rgy.vry }).validate(creder);
|
|
89
|
+
return true;
|
|
90
|
+
}
|
|
91
|
+
/** Require saved issuer/registry/issuance authority and the exact REV anchor before approving. */
|
|
92
|
+
export function validateCredentialRevocationProposal(rgy, issuer, credentialSaid, event, anchor) {
|
|
93
|
+
if (event.pre !== credentialSaid)
|
|
94
|
+
throw new ValidationError("Revocation selector does not match its TEL event.");
|
|
95
|
+
if (!validateCredentialRevocation(rgy.reger, issuer, event))
|
|
96
|
+
return false;
|
|
97
|
+
const state = rgy.reger.states.get(rgy.reger.creds.get(credentialSaid).regid);
|
|
98
|
+
validateProposalAnchor(issuer, event, anchor, (state.c ?? []).includes(TraitDex.EstOnly));
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
/** Check the ACDC's actual CESR source triple, independently of the coordinating parent's signatures. */
|
|
102
|
+
export function validateCredentialSource(creder, issuance, attachment, genus) {
|
|
103
|
+
const frames = parseBytes(concatBytes(Counter.makeGVC(genus), creder.raw, attachment));
|
|
104
|
+
if (frames.length !== 1)
|
|
105
|
+
throw new ValidationError("Credential source evidence must contain one credential.");
|
|
106
|
+
// Match ordinary ACDC dispatch and KERIpy: the last source triple is authoritative.
|
|
107
|
+
const source = envelopeFromFrame(frames[0]).lastSst;
|
|
108
|
+
if (!source || source.i.qb64 !== issuance.pre || source.s.num !== issuance.sner?.num
|
|
109
|
+
|| source.d.qb64 !== issuance.said)
|
|
110
|
+
throw new ValidationError("Credential source seal does not match the proposed issuance.");
|
|
111
|
+
}
|
|
112
|
+
/** Compare the full TEL seal and enforce the registry's establishment-only anchor policy. */
|
|
113
|
+
function validateProposalAnchor(issuer, event, anchor, estOnly) {
|
|
114
|
+
if (!telAnchorMatches(issuer, event, anchor)) {
|
|
115
|
+
throw new ValidationError("TEL proposal anchor does not match its event.");
|
|
116
|
+
}
|
|
117
|
+
if (estOnly && !anchor.estive) {
|
|
118
|
+
throw new ValidationError("Establishment-only registry requires an establishment anchor.");
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/** Legacy NoBackers revocation, member fanout and explicit delivery of completed evidence. */
|
|
2
|
+
import { Diger, Ilks, SerderKERI, TraitDex } from "cesr-ts";
|
|
3
|
+
import { DatabaseOperationError, ValidationError } from "../../core/errors.js";
|
|
4
|
+
import { CREDENTIAL_MAILBOX_TOPIC } from "../../core/mailbox/mailbox-topics.js";
|
|
5
|
+
import { messagize } from "../../core/protocol-serialization.js";
|
|
6
|
+
import { dgKey } from "../../db/core/keys.js";
|
|
7
|
+
import { telAnchorMatches } from "../../vdr/tel-anchor.js";
|
|
8
|
+
import { Organizer } from "../identity/organizing.js";
|
|
9
|
+
import { groupMemberHasKey, isLocalGroupHab, localGroupMember } from "../multisig/group-members.js";
|
|
10
|
+
import { MULTISIG_REV_ROUTE } from "../multisig/grouping.js";
|
|
11
|
+
import { anchorGroupCredentialEvent, publishGroupVcProposal } from "./credential-workflows.js";
|
|
12
|
+
/**
|
|
13
|
+
* Revoke once or resume the original event. Group issuers author a partial anchor,
|
|
14
|
+
* retain ordinary protocol evidence, then admit/fan out the exact coordination
|
|
15
|
+
* wrapper. This operation neither waits for peer approval nor delivers pending
|
|
16
|
+
* evidence to business recipients. The caller runs the host and owns its deadline.
|
|
17
|
+
*/
|
|
18
|
+
export function* revokeCredential(rgy, input, postman, options) {
|
|
19
|
+
const { hby, reger } = rgy;
|
|
20
|
+
const registry = rgy.registryByName(options.registryName);
|
|
21
|
+
if (!registry)
|
|
22
|
+
throw new ValidationError(`Registry ${options.registryName} not found.`);
|
|
23
|
+
const [creder] = reger.cloneCred(options.credentialSaid);
|
|
24
|
+
let event;
|
|
25
|
+
let decision;
|
|
26
|
+
let group;
|
|
27
|
+
if (isLocalGroupHab(hby, registry.hab)) {
|
|
28
|
+
event = registry.prepareRevocation(options.credentialSaid);
|
|
29
|
+
const retained = retainedAnchor(rgy, registry.hab.pre, event);
|
|
30
|
+
let anchor;
|
|
31
|
+
if (retained) {
|
|
32
|
+
anchor = {
|
|
33
|
+
serder: retained,
|
|
34
|
+
message: messagize(retained, { sigers: hby.db.sigs.get(dgKey(retained.pre, retained.said)) }),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
const estOnly = registry.estOnly || (reger.states.get(registry.regk)?.c ?? []).includes(TraitDex.EstOnly);
|
|
39
|
+
anchor = anchorGroupCredentialEvent(hby, registry.hab, event, estOnly);
|
|
40
|
+
}
|
|
41
|
+
decision = rgy.tvy.processEvent({
|
|
42
|
+
serder: event,
|
|
43
|
+
seqner: anchor.serder.sner,
|
|
44
|
+
saider: new Diger({ qb64: anchor.serder.said }),
|
|
45
|
+
});
|
|
46
|
+
rgy.processEscrows();
|
|
47
|
+
rgy.publication.track(event, anchor.serder);
|
|
48
|
+
group = {
|
|
49
|
+
route: MULTISIG_REV_ROUTE,
|
|
50
|
+
...(yield* publishGroupVcProposal(hby, input, postman, registry.hab, {
|
|
51
|
+
route: MULTISIG_REV_ROUTE,
|
|
52
|
+
attrs: { gid: registry.hab.pre, said: options.credentialSaid },
|
|
53
|
+
embeds: { rev: event.raw, anc: anchor.message },
|
|
54
|
+
})),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
const revoked = registry.revoke(options.credentialSaid);
|
|
59
|
+
event = revoked.serder;
|
|
60
|
+
decision = revoked.decision;
|
|
61
|
+
}
|
|
62
|
+
const accepted = reger.tels.getOn(options.credentialSaid, 1)?.qb64 === event.said;
|
|
63
|
+
return {
|
|
64
|
+
creder,
|
|
65
|
+
said: options.credentialSaid,
|
|
66
|
+
tel: event.said,
|
|
67
|
+
status: accepted ? "accept" : decision.kind,
|
|
68
|
+
accepted,
|
|
69
|
+
publicationComplete: rgy.publication.complete(options.credentialSaid, 1),
|
|
70
|
+
deliveries: [],
|
|
71
|
+
...(group ? { group } : {}),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Send only accepted, publication-complete REV evidence. Elect the lowest verified
|
|
76
|
+
* historical anchor signer for a group; another member returns no deliveries.
|
|
77
|
+
* Poster completion means local transport, not remote protocol acknowledgement.
|
|
78
|
+
* An explicit repeat may resend; there is no durable delivery ledger or retry worker.
|
|
79
|
+
*/
|
|
80
|
+
export function* deliverCredentialRevocation(rgy, postman, credentialSaid, recipients) {
|
|
81
|
+
const { hby, reger } = rgy;
|
|
82
|
+
const [creder] = reger.cloneCred(credentialSaid);
|
|
83
|
+
const accepted = reger.tels.getOn(credentialSaid, 1);
|
|
84
|
+
if (!accepted || !rgy.publication.complete(credentialSaid, 1))
|
|
85
|
+
return [];
|
|
86
|
+
const raw = reger.tvts.get(dgKey(credentialSaid, accepted.qb64));
|
|
87
|
+
if (!raw)
|
|
88
|
+
throw new DatabaseOperationError("Accepted revocation body is missing.");
|
|
89
|
+
// retainedAnchor checks the complete original TEL/issuer source relationship.
|
|
90
|
+
const event = new SerderKERI({ raw });
|
|
91
|
+
if (event.pre !== credentialSaid || event.said !== accepted.qb64 || event.ilk !== Ilks.rev || !event.verify()) {
|
|
92
|
+
throw new DatabaseOperationError("Accepted revocation identity is inconsistent.");
|
|
93
|
+
}
|
|
94
|
+
const issuer = creder.issuer;
|
|
95
|
+
const hab = hby.habs.get(issuer);
|
|
96
|
+
if (!hab)
|
|
97
|
+
throw new ValidationError("Revocation issuer is not a local habitat.");
|
|
98
|
+
let sender = hab;
|
|
99
|
+
if (isLocalGroupHab(hby, hab)) {
|
|
100
|
+
const anchor = retainedAnchor(rgy, issuer, event);
|
|
101
|
+
if (!anchor)
|
|
102
|
+
throw new DatabaseOperationError("Accepted revocation issuer source seal is missing.");
|
|
103
|
+
if (!groupAnchorLead(hby, hab, anchor))
|
|
104
|
+
return [];
|
|
105
|
+
sender = localGroupMember(hby, issuer);
|
|
106
|
+
}
|
|
107
|
+
const deliveries = [];
|
|
108
|
+
const messages = [
|
|
109
|
+
...hby.db.clonePreIter(issuer),
|
|
110
|
+
...reger.clonePreIter(creder.regid),
|
|
111
|
+
...reger.clonePreIter(credentialSaid),
|
|
112
|
+
];
|
|
113
|
+
for (const recipient of recipients) {
|
|
114
|
+
const dest = new Organizer(hby.db, hby.signator).resolveRecipient(recipient);
|
|
115
|
+
for (const msg of messages) {
|
|
116
|
+
const evt = postman.send({ src: sender.pre, dest, msg, topic: CREDENTIAL_MAILBOX_TOPIC }, { notify: true });
|
|
117
|
+
const outcome = yield* postman.wait(evt);
|
|
118
|
+
if (outcome.kin === "failed")
|
|
119
|
+
throw outcome.error;
|
|
120
|
+
deliveries.push(...outcome.deliveries);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return deliveries;
|
|
124
|
+
}
|
|
125
|
+
/** Resolve explicit destinations and the caller's choice to notify a disclosed issuee. */
|
|
126
|
+
export function revocationRecipients(creder, explicit, includeIssuee) {
|
|
127
|
+
const recipients = includeIssuee && creder.issuee ? [creder.issuee, ...explicit] : [...explicit];
|
|
128
|
+
return [...new Set(recipients.filter(recipient => recipient.length > 0))];
|
|
129
|
+
}
|
|
130
|
+
/** Recover the original source coordinate without replacing a lost or contradictory anchor. */
|
|
131
|
+
function retainedAnchor(rgy, issuer, event) {
|
|
132
|
+
const couple = rgy.reger.ancs.get(dgKey(event.pre, event.said));
|
|
133
|
+
if (!couple)
|
|
134
|
+
return null;
|
|
135
|
+
const anchor = rgy.hby.db.getEvtSerder(issuer, couple[1].qb64);
|
|
136
|
+
if (!anchor || anchor.sner?.num !== couple[0].num || !telAnchorMatches(issuer, event, anchor)) {
|
|
137
|
+
throw new DatabaseOperationError("Stored revocation issuer anchor is missing or inconsistent.");
|
|
138
|
+
}
|
|
139
|
+
return anchor;
|
|
140
|
+
}
|
|
141
|
+
/** Use accepted historical establishment keys, not the group's current keys after a later rotation. */
|
|
142
|
+
function groupAnchorLead(hby, group, anchor) {
|
|
143
|
+
const { db } = hby;
|
|
144
|
+
if (db.kels.getLast(group.pre, anchor.sn) !== anchor.said)
|
|
145
|
+
return false;
|
|
146
|
+
let keys = [];
|
|
147
|
+
for (const [sn, said] of db.getKelItemIter(group.pre)) {
|
|
148
|
+
if (sn > anchor.sn)
|
|
149
|
+
break;
|
|
150
|
+
const event = db.getEvtSerder(group.pre, said);
|
|
151
|
+
if (!event)
|
|
152
|
+
throw new DatabaseOperationError("Accepted issuer event body is missing.");
|
|
153
|
+
if (event.estive)
|
|
154
|
+
keys = event.verfers;
|
|
155
|
+
}
|
|
156
|
+
let index = Infinity;
|
|
157
|
+
for (const signature of db.sigs.get(dgKey(group.pre, anchor.said))) {
|
|
158
|
+
if (keys[signature.index]?.verify(signature.raw, anchor.raw))
|
|
159
|
+
index = Math.min(index, signature.index);
|
|
160
|
+
}
|
|
161
|
+
const key = keys[index];
|
|
162
|
+
if (!key)
|
|
163
|
+
throw new DatabaseOperationError("Accepted revocation anchor has no verified signer.");
|
|
164
|
+
return groupMemberHasKey(db, localGroupMember(hby, group.pre).pre, key.qb64);
|
|
165
|
+
}
|