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,415 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outbound query selection, signing and transport, corresponding to KERIpy's
|
|
3
|
+
* `agenting.WitnessInquisitor`. Query workflows live in querying.ts; this sender
|
|
4
|
+
* neither decides that a KEL is caught up nor waits for an HTTP protocol reply.
|
|
5
|
+
*
|
|
6
|
+
* `signer` means a locally controlled AID, `pre` is the queried subject and `src`
|
|
7
|
+
* is an explicitly selected remote attester. Resolve/sign just before sending,
|
|
8
|
+
* using accepted endpoint evidence. One worker owns the unsigned request Deck
|
|
9
|
+
* and current network attempt; there is no retained signed retry backlog.
|
|
10
|
+
*/
|
|
11
|
+
import { concatBytes } from "cesr-ts";
|
|
12
|
+
import { call, resource } from "effection";
|
|
13
|
+
import { Deck } from "../../core/deck.js";
|
|
14
|
+
import { ValidationError } from "../../core/errors.js";
|
|
15
|
+
import { consoleLogger } from "../../core/logger.js";
|
|
16
|
+
import { Roles } from "../../core/roles.js";
|
|
17
|
+
import { Schemes } from "../../core/schemes.js";
|
|
18
|
+
import { introduce } from "../delivery/introducing.js";
|
|
19
|
+
import { runtimeTurn } from "../runtime/runtime-turn.js";
|
|
20
|
+
import { CesrHttpRefusal } from "../transport/cesr-egress.js";
|
|
21
|
+
import { HTTPMessenger } from "../transport/http-messenger.js";
|
|
22
|
+
import { TCPMessenger } from "../transport/tcp-messenger.js";
|
|
23
|
+
import { TransportError } from "../transport/transport-error.js";
|
|
24
|
+
/** First eligible role used by KERIpy WitnessInquisitor before random endpoint selection. */
|
|
25
|
+
const QUERY_ROLE_PRIORITY = [Roles.controller, Roles.agent, Roles.witness];
|
|
26
|
+
/**
|
|
27
|
+
* Copy only the owned query-body level without erasing its route/payload relationship.
|
|
28
|
+
*
|
|
29
|
+
* @param instruction Typed route and query body; nested values remain borrowed immutable data.
|
|
30
|
+
* @returns A copy of the route/body level preserving its discriminated shape.
|
|
31
|
+
*/
|
|
32
|
+
function copyQuery(instruction) {
|
|
33
|
+
switch (instruction.route) {
|
|
34
|
+
case "logs":
|
|
35
|
+
return { route: "logs", q: { ...instruction.q } };
|
|
36
|
+
case "ksn":
|
|
37
|
+
return { route: "ksn", q: { ...instruction.q } };
|
|
38
|
+
case "tels":
|
|
39
|
+
case "tsn":
|
|
40
|
+
return { route: instruction.route, q: { ...instruction.q } };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Return the sole local habitat when exactly one exists.
|
|
45
|
+
*
|
|
46
|
+
* Honesty rule:
|
|
47
|
+
* - one habitat means runtime may safely use it as an implicit signer
|
|
48
|
+
* - more than one habitat means runtime must not guess
|
|
49
|
+
*
|
|
50
|
+
* @param hby Borrowed local habitat collection and accepted-state database.
|
|
51
|
+
* @returns Only local habitat, or null when selection is ambiguous or absent.
|
|
52
|
+
*/
|
|
53
|
+
function soleHab(hby) {
|
|
54
|
+
const habitats = hby.habs.values();
|
|
55
|
+
const first = habitats.next();
|
|
56
|
+
return first.done || !habitats.next().done ? null : first.value;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Resolve the actual transport URL for one query destination AID.
|
|
60
|
+
*
|
|
61
|
+
* An explicit witness uses its own location records. Ordinary queries use only
|
|
62
|
+
* the selected controller, agent or witness endpoint; mailbox providers are not
|
|
63
|
+
* query attesters. Missing/unsupported locations do not promote another endpoint.
|
|
64
|
+
*
|
|
65
|
+
* @param hab Local habitat used to construct/sign this output; stores remain borrowed.
|
|
66
|
+
* @param queriedPre Subject AID whose state is requested.
|
|
67
|
+
* @param destination Remote attester AID, distinct from the local signer.
|
|
68
|
+
* @param options explicitWitness resolves directly through witness location records; default false.
|
|
69
|
+
* @returns Preferred endpoint URL, or null if no permitted route exists.
|
|
70
|
+
*/
|
|
71
|
+
function resolveQueryDestinationUrl(hab, queriedPre, destination, { explicitWitness = false, } = {}) {
|
|
72
|
+
if (explicitWitness) {
|
|
73
|
+
const urls = hab.fetchUrls(destination);
|
|
74
|
+
return urls[Schemes.https] ?? urls[Schemes.http] ?? urls[Schemes.tcp] ?? null;
|
|
75
|
+
}
|
|
76
|
+
const ends = hab.endsFor(queriedPre);
|
|
77
|
+
for (const role of [Roles.controller, Roles.agent, Roles.witness]) {
|
|
78
|
+
const urls = ends[role]?.[destination];
|
|
79
|
+
if (urls)
|
|
80
|
+
return urls[Schemes.https] ?? urls[Schemes.http] ?? urls[Schemes.tcp] ?? null;
|
|
81
|
+
}
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* KERIpy-shaped query sender, independent from semantic query completion.
|
|
86
|
+
*
|
|
87
|
+
* Responsibilities:
|
|
88
|
+
* - turn incomplete portable `query` cues into honest outbound `qry` wire
|
|
89
|
+
* packets when a local habitat and remote attester can be resolved
|
|
90
|
+
* - capture signed requests and own their concrete, joined transport attempts
|
|
91
|
+
*
|
|
92
|
+
* Unresolved signer/attester work stays unsigned for a later pass. Once a packet
|
|
93
|
+
* is prepared, the request leaves the Deck before transport: a failed attempt is
|
|
94
|
+
* reported, not automatically retried. Preparation failures leave the source
|
|
95
|
+
* head available and propagate. HTTP completion includes response EOF/cleanup;
|
|
96
|
+
* same-socket TCP completion also includes received protocol processing. Neither
|
|
97
|
+
* is a substitute for the calling workflow's accepted-state predicate.
|
|
98
|
+
*/
|
|
99
|
+
export class WitnessInquisitor {
|
|
100
|
+
/** Inspect deferred work without exposing queue mutation outside its owner. */
|
|
101
|
+
get pending() {
|
|
102
|
+
return this.requests;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Bind actual protocol and I/O collaborators; acquire no store or network lifetime.
|
|
106
|
+
*
|
|
107
|
+
* @param hby Borrowed local habitat collection and accepted-state database.
|
|
108
|
+
* @param protocol Borrowed same-database processor for incoming query replies.
|
|
109
|
+
* @param http Borrowed HTTP implementation selected by composition.
|
|
110
|
+
* @param clock Borrowed clock for transport deadlines; times are milliseconds.
|
|
111
|
+
* @param hab Optional default local signer; null requires an unambiguous sole habitat.
|
|
112
|
+
*/
|
|
113
|
+
constructor(hby, protocol, http, clock, hab = null) {
|
|
114
|
+
/** Borrowed local signers and accepted-state stores. */
|
|
115
|
+
Object.defineProperty(this, "hby", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
configurable: true,
|
|
118
|
+
writable: true,
|
|
119
|
+
value: void 0
|
|
120
|
+
});
|
|
121
|
+
/** Borrowed receive processor for same-socket TCP replies only. */
|
|
122
|
+
Object.defineProperty(this, "protocol", {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
configurable: true,
|
|
125
|
+
writable: true,
|
|
126
|
+
value: void 0
|
|
127
|
+
});
|
|
128
|
+
/** Borrowed HTTP client selected at composition. */
|
|
129
|
+
Object.defineProperty(this, "http", {
|
|
130
|
+
enumerable: true,
|
|
131
|
+
configurable: true,
|
|
132
|
+
writable: true,
|
|
133
|
+
value: void 0
|
|
134
|
+
});
|
|
135
|
+
/** Borrowed clock for this owner's actual network deadlines. */
|
|
136
|
+
Object.defineProperty(this, "clock", {
|
|
137
|
+
enumerable: true,
|
|
138
|
+
configurable: true,
|
|
139
|
+
writable: true,
|
|
140
|
+
value: void 0
|
|
141
|
+
});
|
|
142
|
+
/** One operation owns the current network attempt. */
|
|
143
|
+
Object.defineProperty(this, "delivering", {
|
|
144
|
+
enumerable: true,
|
|
145
|
+
configurable: true,
|
|
146
|
+
writable: true,
|
|
147
|
+
value: false
|
|
148
|
+
});
|
|
149
|
+
/** Aborts the active send when this sender closes. */
|
|
150
|
+
Object.defineProperty(this, "output", {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
configurable: true,
|
|
153
|
+
writable: true,
|
|
154
|
+
value: void 0
|
|
155
|
+
});
|
|
156
|
+
/** Joins active request/parser cleanup before owned queues are cleared. */
|
|
157
|
+
Object.defineProperty(this, "outputJoined", {
|
|
158
|
+
enumerable: true,
|
|
159
|
+
configurable: true,
|
|
160
|
+
writable: true,
|
|
161
|
+
value: void 0
|
|
162
|
+
});
|
|
163
|
+
/** Unsigned query instructions awaiting an available signer/endpoint. */
|
|
164
|
+
Object.defineProperty(this, "requests", {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
configurable: true,
|
|
167
|
+
writable: true,
|
|
168
|
+
value: new Deck()
|
|
169
|
+
});
|
|
170
|
+
/** Terminal admission state; closing stops production and delivery. */
|
|
171
|
+
Object.defineProperty(this, "closed", {
|
|
172
|
+
enumerable: true,
|
|
173
|
+
configurable: true,
|
|
174
|
+
writable: true,
|
|
175
|
+
value: false
|
|
176
|
+
});
|
|
177
|
+
/** Explicit default signer; null requires a unique local habitat. */
|
|
178
|
+
Object.defineProperty(this, "hab", {
|
|
179
|
+
enumerable: true,
|
|
180
|
+
configurable: true,
|
|
181
|
+
writable: true,
|
|
182
|
+
value: void 0
|
|
183
|
+
});
|
|
184
|
+
if (protocol.kvy.db !== hby.db)
|
|
185
|
+
throw new RangeError("Query protocol must use the same database");
|
|
186
|
+
this.hby = hby;
|
|
187
|
+
this.protocol = protocol;
|
|
188
|
+
this.http = http;
|
|
189
|
+
this.clock = clock;
|
|
190
|
+
this.hab = hab;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Select the local habitat used when queued requests have no explicit signer.
|
|
194
|
+
*
|
|
195
|
+
* @param options Optional default signing habitat; omission/null clears the explicit selection.
|
|
196
|
+
*/
|
|
197
|
+
configure({ hab = null } = {}) {
|
|
198
|
+
this.hab = hab;
|
|
199
|
+
}
|
|
200
|
+
/** Deferred instructions and active sends are this sender's only pending work. */
|
|
201
|
+
hasPendingWork() {
|
|
202
|
+
return !this.requests.empty || this.hasPendingDelivery;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Queue for later resolution/delivery: copy the top level/witness list only.
|
|
206
|
+
* Nested query values remain borrowed immutable data until consumption or joined close retires the record.
|
|
207
|
+
*
|
|
208
|
+
* @param request Typed request; signer names a local AID and src names a remote attester.
|
|
209
|
+
*/
|
|
210
|
+
enqueue(request) {
|
|
211
|
+
if (this.closed)
|
|
212
|
+
throw new Error("Query sender is closed");
|
|
213
|
+
this.requests.append({
|
|
214
|
+
...request,
|
|
215
|
+
...copyQuery(request),
|
|
216
|
+
wits: request.wits ? [...request.wits] : undefined,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Admit a routed query cue for sender-owned resolution and one concrete transport attempt.
|
|
221
|
+
*
|
|
222
|
+
* @param cue Typed query cue; missing route/subject produces no request.
|
|
223
|
+
* @param hab Optional local signer hint when the cue has no explicit signer.
|
|
224
|
+
*/
|
|
225
|
+
enqueueCue(cue, hab) {
|
|
226
|
+
if (this.closed)
|
|
227
|
+
throw new Error("Query sender is closed");
|
|
228
|
+
if (!cue.route || !cue.pre)
|
|
229
|
+
return;
|
|
230
|
+
const { kin: _, ...request } = cue;
|
|
231
|
+
const selected = { ...request, signer: request.signer ?? hab?.pre };
|
|
232
|
+
this.enqueue(selected);
|
|
233
|
+
}
|
|
234
|
+
/** Include actual query I/O in convergence; pending instructions have their own queue. */
|
|
235
|
+
get hasPendingDelivery() {
|
|
236
|
+
return this.delivering;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Attempt at most the work present when this pass starts, preserving new work
|
|
240
|
+
* for a later pass. Unresolved records rotate to the tail. A recognized send
|
|
241
|
+
* failure ends the pass and throws after cleanup; remaining requests stay queued.
|
|
242
|
+
* Calling during an active pass or after close performs no work.
|
|
243
|
+
*/
|
|
244
|
+
*deliverOnce() {
|
|
245
|
+
const failure = yield* this.deliveryPass();
|
|
246
|
+
if (failure)
|
|
247
|
+
throw failure;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Own one joined output scope for the pass. Catch only the actual post attempt's
|
|
251
|
+
* TransportError/CesrHttpRefusal as expected send outcomes. Resolution and
|
|
252
|
+
* signing failures stay outside that catch even when they use the same error
|
|
253
|
+
* type; joined-scope teardown failures also escape background reporting.
|
|
254
|
+
*/
|
|
255
|
+
deliveryPass() {
|
|
256
|
+
// deno-lint-ignore no-this-alias -- The operation owns one finite output pass.
|
|
257
|
+
const self = this;
|
|
258
|
+
return call(function* () {
|
|
259
|
+
if (self.delivering || self.closed)
|
|
260
|
+
return;
|
|
261
|
+
self.delivering = true;
|
|
262
|
+
const active = self.output = new AbortController();
|
|
263
|
+
let complete;
|
|
264
|
+
self.outputJoined = new Promise((resolve) => complete = resolve);
|
|
265
|
+
yield* resource(function* (provide) {
|
|
266
|
+
try {
|
|
267
|
+
yield* provide();
|
|
268
|
+
}
|
|
269
|
+
finally {
|
|
270
|
+
self.delivering = false;
|
|
271
|
+
self.output = undefined;
|
|
272
|
+
self.outputJoined = undefined;
|
|
273
|
+
complete();
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
const count = self.requests.length;
|
|
277
|
+
for (let index = 0; index < count && !self.closed; index++) {
|
|
278
|
+
const request = self.requests.peekHead();
|
|
279
|
+
if (!request)
|
|
280
|
+
break;
|
|
281
|
+
const packet = self.prepareRequest(request);
|
|
282
|
+
self.requests.pull();
|
|
283
|
+
if (!packet) {
|
|
284
|
+
self.requests.append(request);
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
active.signal.throwIfAborted();
|
|
288
|
+
try {
|
|
289
|
+
yield* call(() => self.postQueryMessage(packet, active));
|
|
290
|
+
}
|
|
291
|
+
catch (error) {
|
|
292
|
+
if (!(error instanceof TransportError || error instanceof CesrHttpRefusal))
|
|
293
|
+
throw error;
|
|
294
|
+
return error;
|
|
295
|
+
}
|
|
296
|
+
active.signal.throwIfAborted();
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Use ordinary POST delivery for HTTP, draining successful bytes without
|
|
302
|
+
* parsing them. The independent mailbox/direct receiver accepts HTTP replies.
|
|
303
|
+
* TCP explicitly enables same-connection reply processing before completion.
|
|
304
|
+
*
|
|
305
|
+
* @param delivery Retained signed packet including introduction and destination.
|
|
306
|
+
* @param controller Sender attempt cancellation; its signal covers response parsing and cleanup.
|
|
307
|
+
*/
|
|
308
|
+
*postQueryMessage(delivery, controller) {
|
|
309
|
+
// Only this attempt owns signed bytes; failed attempts are never automatically resubmitted.
|
|
310
|
+
const http = this.http, clock = this.clock;
|
|
311
|
+
if (new URL(delivery.url).protocol === "tcp:") {
|
|
312
|
+
yield* new TCPMessenger(delivery.url, clock, this.protocol).send(delivery.body, {
|
|
313
|
+
signal: controller.signal,
|
|
314
|
+
replies: true,
|
|
315
|
+
local: true,
|
|
316
|
+
});
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
const outcome = yield* new HTTPMessenger(delivery.url, http, { destination: delivery.destination })
|
|
320
|
+
.send(delivery.body, { signal: controller.signal });
|
|
321
|
+
if (outcome.kind === "refuse")
|
|
322
|
+
throw outcome.error;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Stop admission, abort/join active transport and parser cleanup, then discard
|
|
326
|
+
* unsigned pending work. Does not close borrowed collaborators or Baser.
|
|
327
|
+
* Repeating close is harmless; genuine cleanup failures remain visible.
|
|
328
|
+
*/
|
|
329
|
+
*close() {
|
|
330
|
+
this.closed = true;
|
|
331
|
+
this.output?.abort();
|
|
332
|
+
if (this.outputJoined)
|
|
333
|
+
yield* call(() => this.outputJoined);
|
|
334
|
+
this.requests.clear();
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Long-lived sender worker, run once by composition. Report an expected send
|
|
338
|
+
* failure once, then continue remaining requests on a later turn. Unexpected
|
|
339
|
+
* preparation/cleanup faults terminate the worker. Caller cancellation joins
|
|
340
|
+
* the current attempt; it does not close the borrowed state or HTTP service.
|
|
341
|
+
*/
|
|
342
|
+
*deliverDo() {
|
|
343
|
+
while (true) {
|
|
344
|
+
const failure = yield* this.deliveryPass();
|
|
345
|
+
if (failure)
|
|
346
|
+
consoleLogger.warn("Query delivery failed", failure);
|
|
347
|
+
yield* runtimeTurn();
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Resolve the habitat that is allowed to sign the outbound query.
|
|
352
|
+
*
|
|
353
|
+
* Resolution order:
|
|
354
|
+
* - explicitly selected local signer (unavailable means unresolved, never fallback)
|
|
355
|
+
* - runtime-configured habitat
|
|
356
|
+
* - sole local habitat
|
|
357
|
+
*
|
|
358
|
+
* @param signer Explicit local AID; if unavailable return null rather than falling back.
|
|
359
|
+
* @returns Explicit signer, configured habitat or sole local habitat; otherwise null.
|
|
360
|
+
*/
|
|
361
|
+
configuredHab(signer) {
|
|
362
|
+
return signer === undefined ? this.hab ?? soleHab(this.hby) : this.hby.habs.get(signer) ?? null;
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Resolve/sign one selected query and introduction immediately before its attempt.
|
|
366
|
+
*
|
|
367
|
+
* @param request Deferred unsigned request; nested query values must remain immutable.
|
|
368
|
+
* @returns Prepared packet, or null when signer/attester evidence is unresolved.
|
|
369
|
+
* @throws A selected attester with no endpoint URL throws; source removal remains with the caller.
|
|
370
|
+
*/
|
|
371
|
+
prepareRequest(request) {
|
|
372
|
+
const hab = this.configuredHab(request.signer);
|
|
373
|
+
if (!hab)
|
|
374
|
+
return null;
|
|
375
|
+
const attesters = request.src ? [] : this.attestersFor(request.pre, { signer: hab.pre, wits: request.wits });
|
|
376
|
+
const destination = request.src ?? attesters[Math.floor(Math.random() * attesters.length)];
|
|
377
|
+
if (!destination)
|
|
378
|
+
return null;
|
|
379
|
+
const url = resolveQueryDestinationUrl(hab, request.pre, destination, {
|
|
380
|
+
explicitWitness: request.wits?.includes(destination) ?? false,
|
|
381
|
+
});
|
|
382
|
+
if (!url)
|
|
383
|
+
throw new ValidationError(`No endpoint URL found for query destination ${destination}.`);
|
|
384
|
+
const message = hab.query(request.pre, destination, copyQuery(request));
|
|
385
|
+
const intro = introduce(hab, destination);
|
|
386
|
+
return { url, body: concatBytes(intro, message), destination };
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Return the first eligible role’s attester IDs; preparation chooses one randomly.
|
|
390
|
+
*
|
|
391
|
+
* @param pre Subject AID whose accepted endpoint roles are consulted.
|
|
392
|
+
* @param options Optional local signer AID and remote witness/attester overrides; neither selects a transport implementation.
|
|
393
|
+
* @returns Eligible attester AIDs, or an empty array for an unknown subject or unresolved signer/role.
|
|
394
|
+
*/
|
|
395
|
+
attestersFor(pre, { signer, wits } = {}) {
|
|
396
|
+
if (wits && wits.length > 0) {
|
|
397
|
+
// Explicit watcher/witness overrides outrank endpoint-role lookup.
|
|
398
|
+
return [...wits];
|
|
399
|
+
}
|
|
400
|
+
const hab = this.configuredHab(signer);
|
|
401
|
+
if (!hab || !this.hby.db.getKever(pre))
|
|
402
|
+
return [];
|
|
403
|
+
const ends = hab.endsFor(pre);
|
|
404
|
+
for (const role of QUERY_ROLE_PRIORITY) {
|
|
405
|
+
const roleEnds = ends[role];
|
|
406
|
+
if (!roleEnds) {
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
const eids = Object.keys(roleEnds);
|
|
410
|
+
if (eids.length > 0)
|
|
411
|
+
return eids;
|
|
412
|
+
}
|
|
413
|
+
return [];
|
|
414
|
+
}
|
|
415
|
+
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { call, ensure, useScope } from "effection";
|
|
2
|
-
/**
|
|
1
|
+
import { call, ensure, on, useScope } from "effection";
|
|
2
|
+
/**
|
|
3
|
+
* Remove only this operation's cancellation from joined I/O failures.
|
|
4
|
+
*
|
|
5
|
+
* @param error Failure observed while joining work; may contain nested AggregateErrors.
|
|
6
|
+
* @param cancellation Exact owned abort reason to remove by identity.
|
|
7
|
+
* @returns Remaining foreign failures, preserving an unchanged aggregate when possible.
|
|
8
|
+
*/
|
|
3
9
|
function remainingFailures(error, cancellation) {
|
|
4
10
|
if (error === cancellation)
|
|
5
11
|
return [];
|
|
@@ -10,9 +16,37 @@ function remainingFailures(error, cancellation) {
|
|
|
10
16
|
? [error]
|
|
11
17
|
: remaining;
|
|
12
18
|
}
|
|
13
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Identify foreign failures while joining cancelled work, without throwing as a filter.
|
|
21
|
+
*
|
|
22
|
+
* @param error Failure from joined I/O, possibly an AggregateError.
|
|
23
|
+
* @param signal Owner whose exact cancellation reason may be removed.
|
|
24
|
+
* @returns Foreign failures, preserving unchanged aggregates and error identities.
|
|
25
|
+
*/
|
|
26
|
+
export function cleanupFailures(error, signal) {
|
|
27
|
+
return remainingFailures(error, signal.reason);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Stop the containing race when an upstream signal aborts, including pre-abort.
|
|
31
|
+
*
|
|
32
|
+
* @param signal Actual caller cancellation; register before checking its current state.
|
|
33
|
+
* @throws The signal's exact reason. The operation never completes normally.
|
|
34
|
+
*/
|
|
35
|
+
export function* throwOnAbort(signal) {
|
|
36
|
+
const abort = yield* on(signal, "abort");
|
|
37
|
+
signal.throwIfAborted();
|
|
38
|
+
yield* abort.next();
|
|
39
|
+
throw signal.reason;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Preserve foreign cleanup failures, removing only this owner's exact abort reason.
|
|
43
|
+
*
|
|
44
|
+
* @param error Failure observed during joined cleanup.
|
|
45
|
+
* @param signal Owner signal whose exact reason may be suppressed.
|
|
46
|
+
* @throws The original foreign failure, or an AggregateError containing multiple remaining failures.
|
|
47
|
+
*/
|
|
14
48
|
export function rethrowCleanupFailure(error, signal) {
|
|
15
|
-
const failures =
|
|
49
|
+
const failures = cleanupFailures(error, signal);
|
|
16
50
|
if (failures.length === 1)
|
|
17
51
|
throw failures[0];
|
|
18
52
|
if (failures.length)
|
|
@@ -25,6 +59,11 @@ export function rethrowCleanupFailure(error, signal) {
|
|
|
25
59
|
* Register dependent owner resources before this leaf so reverse teardown joins it before disposal.
|
|
26
60
|
* Owned concurrent work uses the supplied leaf scope, so its signal aborts before child cleanup joins.
|
|
27
61
|
* Borrow that scope only for work joined within the leaf, never for later operations.
|
|
62
|
+
*
|
|
63
|
+
* @param start Starts the Promise leaf with an owned signal and scope; must observe abort and join any work borrowed from that scope.
|
|
64
|
+
* @param upstream Optional caller cancellation combined with the leaf's own signal.
|
|
65
|
+
* @returns The leaf result after successful completion; scope teardown joins pending work.
|
|
66
|
+
* @throws The leaf error or a foreign cleanup failure; exact owned cancellation is filtered during cleanup.
|
|
28
67
|
*/
|
|
29
68
|
export function abortable(start, upstream) {
|
|
30
69
|
return call(function* () {
|