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
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/** Transport readers. Each operation owns its reader and joins cancellation. */
|
|
2
2
|
/** Cancellation and chunk size for byte-array and file sources. */
|
|
3
|
-
import * as dntShim from "
|
|
4
|
-
/**
|
|
3
|
+
import * as dntShim from "../../_dnt.shims.js";
|
|
4
|
+
/**
|
|
5
|
+
* Adapt an already resident finite value into independent bounded parser chunks.
|
|
6
|
+
*
|
|
7
|
+
* @param bytes Borrowed resident input; each yielded chunk is a copy independent of subsequent producer mutation.
|
|
8
|
+
* @param options Optional signal and positive integer chunk size in bytes; defaults to 65536.
|
|
9
|
+
* @yields Copied byte chunks in input order; this does not parse message boundaries.
|
|
10
|
+
*/
|
|
5
11
|
export async function* chunkBytes(bytes, { signal, maxChunkBytes = 64 * 1024 } = {}) {
|
|
6
12
|
checkLimit(maxChunkBytes);
|
|
7
13
|
signal?.throwIfAborted();
|
|
@@ -11,7 +17,14 @@ export async function* chunkBytes(bytes, { signal, maxChunkBytes = 64 * 1024 } =
|
|
|
11
17
|
yield bytes.slice(offset, offset + maxChunkBytes);
|
|
12
18
|
}
|
|
13
19
|
}
|
|
14
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Read a Fetch stream on demand and cancel its reader when parsing stops.
|
|
22
|
+
*
|
|
23
|
+
* @param stream Borrowed Web stream to read exclusively; null yields no bytes.
|
|
24
|
+
* @param options Optional signal that cancels the pending read.
|
|
25
|
+
* @yields Nonempty chunks supplied by the underlying stream.
|
|
26
|
+
* @throws Read/cancel/unlock failures, combined when distinct failures occur.
|
|
27
|
+
*/
|
|
15
28
|
export async function* streamBytes(stream, { signal } = {}) {
|
|
16
29
|
signal?.throwIfAborted();
|
|
17
30
|
if (!stream)
|
|
@@ -68,7 +81,14 @@ export async function* streamBytes(stream, { signal } = {}) {
|
|
|
68
81
|
throw errors[0];
|
|
69
82
|
}
|
|
70
83
|
}
|
|
71
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Stream a local file with fixed-size owned buffers and close it on break or abort.
|
|
86
|
+
*
|
|
87
|
+
* @param path Local filesystem path opened read-only for this iteration.
|
|
88
|
+
* @param options Optional cancellation and positive read buffer size in bytes; defaults to 65536.
|
|
89
|
+
* @yields Owned buffers up to the selected chunk size until file EOF.
|
|
90
|
+
* @throws Open/read failures or cancellation; the file closes on EOF, break or failure.
|
|
91
|
+
*/
|
|
72
92
|
export async function* fileBytes(path, { signal, maxChunkBytes = 64 * 1024 } = {}) {
|
|
73
93
|
checkLimit(maxChunkBytes);
|
|
74
94
|
signal?.throwIfAborted();
|
|
@@ -99,7 +119,12 @@ export async function* fileBytes(path, { signal, maxChunkBytes = 64 * 1024 } = {
|
|
|
99
119
|
close();
|
|
100
120
|
}
|
|
101
121
|
}
|
|
102
|
-
/**
|
|
122
|
+
/**
|
|
123
|
+
* Collect an explicitly finite operation; bulk ingress should consume its source directly.
|
|
124
|
+
*
|
|
125
|
+
* @param source Finite byte source whose iteration errors propagate; do not pass an unbounded mailbox stream.
|
|
126
|
+
* @returns A contiguous owned array containing all chunks in order.
|
|
127
|
+
*/
|
|
103
128
|
export async function collectBytes(source) {
|
|
104
129
|
let bytes = new Uint8Array(0);
|
|
105
130
|
let size = 0;
|
|
@@ -116,7 +141,12 @@ export async function collectBytes(source) {
|
|
|
116
141
|
}
|
|
117
142
|
return bytes.subarray(0, size);
|
|
118
143
|
}
|
|
119
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* Reject invalid chunk sizes before allocation or opening a file.
|
|
146
|
+
*
|
|
147
|
+
* @param limit Requested per-chunk byte count.
|
|
148
|
+
* @throws RangeError unless the count is a positive safe integer.
|
|
149
|
+
*/
|
|
120
150
|
function checkLimit(limit) {
|
|
121
151
|
if (!Number.isSafeInteger(limit) || limit < 1)
|
|
122
152
|
throw new RangeError("Chunk size must be a positive safe integer");
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CESR framing and bounded media negotiation over explicitly owned HTTP attempts.
|
|
3
|
+
* Ordinary send helpers finish response EOF/cleanup and return delivery facts.
|
|
4
|
+
* requestFrame instead lends a live response from an Effection resource: its
|
|
5
|
+
* caller consumes that body before leaving the enclosing scope. Neither path
|
|
6
|
+
* implicitly feeds successful response bytes into protocol processing.
|
|
7
|
+
*
|
|
8
|
+
* Match KERIpy's detached-attachment POST contract while retaining the exact
|
|
9
|
+
* signed body. Only the known pre-intake Falcon media refusal permits a second
|
|
10
|
+
* request; authentication/application failures and network errors are not retries.
|
|
11
|
+
*/
|
|
12
|
+
import { attachmentPayload, byteString, collectPayload, parse, } from "cesr-ts";
|
|
13
|
+
import { call, ensure, race, resource, scoped } from "effection";
|
|
14
|
+
import { ValidationError } from "../../core/errors.js";
|
|
15
|
+
import { abortable, cleanupFailures, throwOnAbort } from "../runtime/abortable.js";
|
|
16
|
+
import { CESR_ATTACHMENT_HEADER, CESR_CONTENT_TYPE, CESR_DESTINATION_HEADER, KERIPY_CESR_JSON_CONTENT_TYPE, } from "./cesr-http.js";
|
|
17
|
+
/** Positive remote HTTP refusal, distinct from source, transport, storage and cleanup failure. */
|
|
18
|
+
export class CesrHttpRefusal extends ValidationError {
|
|
19
|
+
/**
|
|
20
|
+
* Describe a completed HTTP refusal without classifying it as a network failure.
|
|
21
|
+
*
|
|
22
|
+
* @param message Endpoint/status detail for the observed peer refusal.
|
|
23
|
+
* @param status Actual non-success HTTP status returned by the peer.
|
|
24
|
+
*/
|
|
25
|
+
constructor(message, status) {
|
|
26
|
+
super(message);
|
|
27
|
+
Object.defineProperty(this, "status", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
configurable: true,
|
|
30
|
+
writable: true,
|
|
31
|
+
value: status
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Drain successful response bytes; retain refusal text for reporting and media negotiation.
|
|
37
|
+
*
|
|
38
|
+
* @param response Borrowed response; this function consumes its body once to EOF.
|
|
39
|
+
* @param signal Cancels the pending body read through its HTTP owner.
|
|
40
|
+
* @returns Decoded refusal text, or an empty string after draining a successful body.
|
|
41
|
+
* @throws Body-read or cancellation errors propagate; an HTTP status alone does not throw.
|
|
42
|
+
*/
|
|
43
|
+
export async function readResponseDetail(response, signal) {
|
|
44
|
+
const decoder = response.ok ? undefined : new TextDecoder();
|
|
45
|
+
const text = [];
|
|
46
|
+
for await (const chunk of response.body(signal)) {
|
|
47
|
+
if (decoder)
|
|
48
|
+
text.push(decoder.decode(chunk, { stream: true }));
|
|
49
|
+
}
|
|
50
|
+
if (decoder)
|
|
51
|
+
text.push(decoder.decode());
|
|
52
|
+
return text.join("");
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Open one frame response for a caller that needs to consume its bytes.
|
|
56
|
+
* The caller must keep its scope alive while reading; returning this handle from
|
|
57
|
+
* a closing scope does not transfer response ownership. Media fallback closes the
|
|
58
|
+
* rejected attempt before opening the legacy header-media attempt.
|
|
59
|
+
* The handle travels directly as this generator's return value: yield* requestFrame
|
|
60
|
+
* resumes with HttpStreamResponse while its resource remains provided to the
|
|
61
|
+
* enclosing scope. This is borrowing, not a detached response or a consume callback.
|
|
62
|
+
*
|
|
63
|
+
* @param url HTTP(S) endpoint to receive the framed POST; redirect handling is manual.
|
|
64
|
+
* @param frame Parsed signed body and attachments; framing preserves the signed body bytes.
|
|
65
|
+
* @param http Borrowed HTTP implementation supplied by composition; owns native request/body I/O.
|
|
66
|
+
* @param options Destination, extra headers and optional cancellation for ordinary signed-message POSTs.
|
|
67
|
+
* @returns A successful response borrowed until the enclosing Effection scope ends.
|
|
68
|
+
* @throws CesrHttpRefusal for a completed refusal; request, transport and cleanup failures propagate.
|
|
69
|
+
*/
|
|
70
|
+
export function* requestFrame(url, frame, http, options = {}) {
|
|
71
|
+
const result = yield* openFrameResponse(url, frame, http, options);
|
|
72
|
+
if (result.kind === "refuse")
|
|
73
|
+
throw result.error;
|
|
74
|
+
return result.response;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Own the response scope for one frame and the existing header-media fallback.
|
|
78
|
+
* A successful response stays live while the borrowing consumer runs. A refused
|
|
79
|
+
* response is drained for its detail, and its scope closes before another attempt.
|
|
80
|
+
*
|
|
81
|
+
* @param url HTTP(S) endpoint to receive the framed POST; redirect handling is manual.
|
|
82
|
+
* @param frame Parsed signed body and attachments; framing preserves the signed body bytes.
|
|
83
|
+
* @param http Borrowed HTTP implementation supplied by composition; owns native request/body I/O.
|
|
84
|
+
* @param options Destination, extra headers and optional cancellation for ordinary signed-message POSTs.
|
|
85
|
+
* @returns A scoped successful response or completed refusal, after any permitted media fallback.
|
|
86
|
+
*/
|
|
87
|
+
function openFrameResponse(url, frame, http, options) {
|
|
88
|
+
return resource(function* (provide) {
|
|
89
|
+
for (const request of yield* frameRequests(frame, options)) {
|
|
90
|
+
const retry = yield* scoped(function* () {
|
|
91
|
+
const response = yield* http.open(url, request);
|
|
92
|
+
if (response.ok) {
|
|
93
|
+
// Keep this request scope live throughout the borrowing consumer's response processing.
|
|
94
|
+
yield* provide({ kind: "response", response });
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
const detail = yield* abortable((signal) => readResponseDetail(response, signal), options.signal);
|
|
98
|
+
if (isLegacyCesrMediaRejection(request, response.status, detail))
|
|
99
|
+
return true;
|
|
100
|
+
yield* provide({
|
|
101
|
+
kind: "refuse",
|
|
102
|
+
error: new CesrHttpRefusal(`CESR delivery to ${url} failed with HTTP ${response.status}: ${detail}`, response.status),
|
|
103
|
+
});
|
|
104
|
+
return false;
|
|
105
|
+
});
|
|
106
|
+
if (!retry)
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Prepare finite request bytes before opening any network attempt.
|
|
113
|
+
* Ordinary POSTs put normalized text attachments in CESR-ATTACHMENT and send the
|
|
114
|
+
* original body. CESR-Genus retains the observed counter context when stream framing is removed.
|
|
115
|
+
* Requests retain
|
|
116
|
+
* caller authentication headers; sender-owned framing/destination headers replace
|
|
117
|
+
* conflicting caller values. The fallback shares the prepared bytes.
|
|
118
|
+
*
|
|
119
|
+
* @param frame Parsed signed body and attachments; framing preserves the signed body bytes.
|
|
120
|
+
* @param options Destination, extra headers and optional cancellation for ordinary signed-message POSTs.
|
|
121
|
+
* @returns Current and legacy media choices sharing the same signed body.
|
|
122
|
+
*/
|
|
123
|
+
function* frameRequests(frame, options) {
|
|
124
|
+
const header = byteString(yield* abortable((signal) => collectPayload(attachmentPayload(frame, { domain: "txt" }), signal), options.signal));
|
|
125
|
+
const body = frame.body.raw;
|
|
126
|
+
const types = [CESR_CONTENT_TYPE, KERIPY_CESR_JSON_CONTENT_TYPE];
|
|
127
|
+
const prepared = body.slice().buffer;
|
|
128
|
+
return types.map((contentType) => {
|
|
129
|
+
const headers = new Headers(options.headers);
|
|
130
|
+
headers.set("Content-Type", contentType);
|
|
131
|
+
headers.delete(CESR_DESTINATION_HEADER);
|
|
132
|
+
headers.delete(CESR_ATTACHMENT_HEADER);
|
|
133
|
+
headers.delete("CESR-Genus");
|
|
134
|
+
if (frame.gvrsn)
|
|
135
|
+
headers.set("CESR-Genus", String(frame.gvrsn.major));
|
|
136
|
+
if (options.destination)
|
|
137
|
+
headers.set(CESR_DESTINATION_HEADER, options.destination);
|
|
138
|
+
headers.set(CESR_ATTACHMENT_HEADER, header);
|
|
139
|
+
return {
|
|
140
|
+
method: "POST",
|
|
141
|
+
redirect: "manual",
|
|
142
|
+
headers,
|
|
143
|
+
signal: options.signal,
|
|
144
|
+
body: prepared,
|
|
145
|
+
};
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Recognize KERIpy v1's exact preprocessing media refusal, before protocol intake.
|
|
150
|
+
* Attachment framing and the current media type are required. Authentication,
|
|
151
|
+
* KRAM and application refusals cannot trigger a second submission merely by
|
|
152
|
+
* mentioning content type in their diagnostic text.
|
|
153
|
+
*
|
|
154
|
+
* @param request Exact prepared request whose response is being classified.
|
|
155
|
+
* @param status Observed peer HTTP status.
|
|
156
|
+
* @param detail Fully consumed refusal body decoded as text.
|
|
157
|
+
* @returns True only for the pinned Falcon content-type error representation.
|
|
158
|
+
*/
|
|
159
|
+
export function isLegacyCesrMediaRejection(request, status, detail) {
|
|
160
|
+
const headers = new Headers(request.headers);
|
|
161
|
+
if (!headers.has(CESR_ATTACHMENT_HEADER) || status !== 406 || headers.get("Content-Type") !== CESR_CONTENT_TYPE) {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
let refusal;
|
|
165
|
+
try {
|
|
166
|
+
refusal = JSON.parse(detail);
|
|
167
|
+
}
|
|
168
|
+
catch {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
return typeof refusal === "object" && refusal !== null
|
|
172
|
+
&& "title" in refusal && refusal.title === "Content type error"
|
|
173
|
+
&& "description" in refusal && refusal.description === "Unacceptable content type.";
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Send a frame whose caller needs delivery status rather than response content.
|
|
177
|
+
* HttpClient.request has consumed the entire response before returning. Successful
|
|
178
|
+
* bytes are intentionally discarded here; callers needing protocol intake use the
|
|
179
|
+
* scoped response path. Completion proves HTTP delivery, not protocol acceptance.
|
|
180
|
+
*
|
|
181
|
+
* @param url HTTP(S) endpoint to receive the framed POST; redirect handling is manual.
|
|
182
|
+
* @param frame Parsed signed body and attachments; framing preserves the signed body bytes.
|
|
183
|
+
* @param http Borrowed HTTP implementation supplied by composition; owns native request/body I/O.
|
|
184
|
+
* @param options Destination, extra headers and optional cancellation for ordinary signed-message POSTs.
|
|
185
|
+
* @returns Complete after finite response consumption/cleanup, or a typed peer refusal.
|
|
186
|
+
* @throws Construction, native transport and cleanup failures propagate.
|
|
187
|
+
*/
|
|
188
|
+
function* sendFrame(url, frame, http, options) {
|
|
189
|
+
for (const request of yield* frameRequests(frame, options)) {
|
|
190
|
+
const response = yield* http.request(url, request);
|
|
191
|
+
if (response.ok)
|
|
192
|
+
return { kind: "complete" };
|
|
193
|
+
const detail = new TextDecoder().decode(response.body);
|
|
194
|
+
if (isLegacyCesrMediaRejection(request, response.status, detail))
|
|
195
|
+
continue;
|
|
196
|
+
return {
|
|
197
|
+
kind: "refuse",
|
|
198
|
+
error: new CesrHttpRefusal(`CESR delivery to ${url} failed with HTTP ${response.status}: ${detail}`, response.status),
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
throw new Error("CESR media negotiation exhausted its request choices");
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Send a CESR source and throw on a completed peer refusal.
|
|
205
|
+
* One parsed frame becomes one POST, and its request scope closes before the next
|
|
206
|
+
* source pull. A refusal stops the sequence; prior frames may already be delivered.
|
|
207
|
+
* Cancellation aborts active work, joins any pending source pull and returns the
|
|
208
|
+
* parser iterator before leaving. There is no automatic retry beyond media fallback.
|
|
209
|
+
* A pending asynchronous source pull can finish after cancellation is requested;
|
|
210
|
+
* abort it first, then join that pull and return the iterator. Genuine late
|
|
211
|
+
* cleanup failures are retained alongside the primary failure rather than
|
|
212
|
+
* misreported as harmless cancellation.
|
|
213
|
+
*
|
|
214
|
+
* @param url HTTP(S) endpoint to receive the framed POST; redirect handling is manual.
|
|
215
|
+
* @param source Creates the CESR byte source for this invocation; it must observe the supplied abort signal.
|
|
216
|
+
* @param http Borrowed HTTP implementation supplied by composition; owns native request/body I/O.
|
|
217
|
+
* @param options Destination, extra headers and optional cancellation for ordinary signed-message POSTs.
|
|
218
|
+
* @throws Source/parser, transport and cleanup failures propagate without becoming peer refusals. A completed refusal throws CesrHttpRefusal.
|
|
219
|
+
*/
|
|
220
|
+
export function* postCesr(url, source, http, options = {}) {
|
|
221
|
+
const result = yield* attemptPostCesr(url, source, http, options);
|
|
222
|
+
if (result.kind === "refuse")
|
|
223
|
+
throw result.error;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Send frames sequentially and return a completed peer refusal as data.
|
|
227
|
+
* One parsed frame becomes one POST, and its request scope closes before the next
|
|
228
|
+
* source pull. A refusal stops the sequence; prior frames may already be delivered.
|
|
229
|
+
* Cancellation aborts active work, joins any pending source pull and returns the
|
|
230
|
+
* parser iterator before leaving. There is no automatic retry beyond media fallback.
|
|
231
|
+
*
|
|
232
|
+
* @param url HTTP(S) endpoint to receive the framed POST; redirect handling is manual.
|
|
233
|
+
* @param source Creates the CESR byte source for this invocation; it must observe the supplied abort signal.
|
|
234
|
+
* @param http Borrowed HTTP implementation supplied by composition; owns native request/body I/O.
|
|
235
|
+
* @param options Destination, extra headers and optional cancellation for ordinary signed-message POSTs.
|
|
236
|
+
* @returns The attempt result after all frames or the first refusal, with source/request cleanup joined.
|
|
237
|
+
* @throws Source/parser, transport and cleanup failures propagate without becoming peer refusals.
|
|
238
|
+
*/
|
|
239
|
+
export function attemptPostCesr(url, source, http, options = {}) {
|
|
240
|
+
// Isolate joining cleanup so a halt cannot resume a delegated caller after payload disposal.
|
|
241
|
+
const posting = call(function* () {
|
|
242
|
+
const controller = new AbortController();
|
|
243
|
+
const signal = options.signal ? AbortSignal.any([controller.signal, options.signal]) : controller.signal;
|
|
244
|
+
let failure;
|
|
245
|
+
try {
|
|
246
|
+
signal.throwIfAborted();
|
|
247
|
+
const frames = parse(source(signal));
|
|
248
|
+
let pending;
|
|
249
|
+
// The earlier resource joins the read after processing children stop.
|
|
250
|
+
yield* ensure(function* () {
|
|
251
|
+
const cleanup = [];
|
|
252
|
+
/**
|
|
253
|
+
* Retain distinct late failures without duplicating the primary rejection.
|
|
254
|
+
* @param error Rejection from joining a pending pull or returning the parser.
|
|
255
|
+
*/
|
|
256
|
+
const noteCleanup = (error) => {
|
|
257
|
+
for (const remaining of cleanupFailures(error, signal)) {
|
|
258
|
+
if (!(failure && remaining === failure.error) && !cleanup.includes(remaining))
|
|
259
|
+
cleanup.push(remaining);
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
if (pending) {
|
|
263
|
+
try {
|
|
264
|
+
yield* call(() => pending);
|
|
265
|
+
}
|
|
266
|
+
catch (error) {
|
|
267
|
+
noteCleanup(error);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
try {
|
|
271
|
+
yield* call(() => frames.return());
|
|
272
|
+
}
|
|
273
|
+
catch (error) {
|
|
274
|
+
noteCleanup(error);
|
|
275
|
+
}
|
|
276
|
+
if (cleanup.length) {
|
|
277
|
+
const errors = failure && failure.error !== signal.reason ? [failure.error, ...cleanup] : cleanup;
|
|
278
|
+
if (errors.length === 1)
|
|
279
|
+
throw errors[0];
|
|
280
|
+
throw new AggregateError(errors, "CESR delivery and source cleanup failed", { cause: errors[0] });
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
while (true) {
|
|
284
|
+
signal.throwIfAborted();
|
|
285
|
+
pending = frames.next();
|
|
286
|
+
let result;
|
|
287
|
+
try {
|
|
288
|
+
result = yield* call(() => pending);
|
|
289
|
+
}
|
|
290
|
+
catch (error) {
|
|
291
|
+
pending = undefined;
|
|
292
|
+
throw error;
|
|
293
|
+
}
|
|
294
|
+
pending = undefined;
|
|
295
|
+
signal.throwIfAborted();
|
|
296
|
+
if (result.done)
|
|
297
|
+
break;
|
|
298
|
+
const frame = result.value;
|
|
299
|
+
// Each request closes before the next input frame; it owns its separate HTTP cancellation.
|
|
300
|
+
const posted = yield* sendFrame(url, frame, http, { ...options, signal });
|
|
301
|
+
if (posted.kind === "refuse")
|
|
302
|
+
return posted;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
catch (error) {
|
|
306
|
+
failure = { error };
|
|
307
|
+
throw error;
|
|
308
|
+
}
|
|
309
|
+
finally {
|
|
310
|
+
controller.abort();
|
|
311
|
+
}
|
|
312
|
+
return { kind: "complete" };
|
|
313
|
+
});
|
|
314
|
+
if (!options.signal)
|
|
315
|
+
return posting;
|
|
316
|
+
return race([posting, throwOnAbort(options.signal)]);
|
|
317
|
+
}
|
|
@@ -6,17 +6,10 @@
|
|
|
6
6
|
* KERIpy correspondence:
|
|
7
7
|
* - default behavior is one CESR message per HTTP request with the message body
|
|
8
8
|
* in the request body and attachments in `CESR-ATTACHMENT`
|
|
9
|
-
*
|
|
10
|
-
* Current `keri-ts` difference:
|
|
11
|
-
* - `keri-ts` supports an optional `"body"` mode for mailbox operations where the
|
|
12
|
-
* full CESR payload is sent in the body instead of splitting attachments into
|
|
13
|
-
* the header
|
|
14
9
|
*/
|
|
15
|
-
import { parseBytes, parseSerder, requireFlatFrame, SerderKERI, smell } from "cesr-ts";
|
|
16
|
-
import { ValidationError } from "
|
|
10
|
+
import { Counter, parseBytes, parseSerder, requireFlatFrame, SerderKERI, smell } from "cesr-ts";
|
|
11
|
+
import { ValidationError } from "../../core/errors.js";
|
|
17
12
|
import { collectBytes, streamBytes } from "./byte-source.js";
|
|
18
|
-
/** Default interop mode matching KERIpy mailbox behavior. */
|
|
19
|
-
export const DEFAULT_CESR_BODY_MODE = "header";
|
|
20
13
|
/** CESR HTTP content type used by mailbox and exchange endpoints. */
|
|
21
14
|
export const CESR_CONTENT_TYPE = "application/cesr";
|
|
22
15
|
/** KERIpy's legacy-but-authoritative CESR HTTP media type. */
|
|
@@ -39,51 +32,15 @@ export function isCesrContentType(value) {
|
|
|
39
32
|
export function isMultipartFormContentType(value) {
|
|
40
33
|
return value?.split(";")[0]?.trim()?.toLowerCase() === MULTIPART_CONTENT_TYPE;
|
|
41
34
|
}
|
|
42
|
-
/**
|
|
43
|
-
export function
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
if (value === "header" || value === "body") {
|
|
48
|
-
return value;
|
|
49
|
-
}
|
|
50
|
-
throw new ValidationError(`Invalid cesr body mode "${String(value)}". Expected "header" or "body".`);
|
|
51
|
-
}
|
|
52
|
-
/** Normalize a global config string into one supported CESR body mode. */
|
|
53
|
-
export function cesrBodyModeFromGlobal(value) {
|
|
54
|
-
return normalizeCesrBodyMode(value ?? undefined);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Build one HTTP request payload for a CESR message.
|
|
58
|
-
*
|
|
59
|
-
* Header mode:
|
|
60
|
-
* - HTTP body carries the message body only
|
|
61
|
-
* - `CESR-ATTACHMENT` carries the detached attachments
|
|
62
|
-
*
|
|
63
|
-
* Body mode:
|
|
64
|
-
* - the full payload is sent in the HTTP body
|
|
65
|
-
*/
|
|
66
|
-
export function buildCesrRequest(message, { bodyMode = DEFAULT_CESR_BODY_MODE, contentType = CESR_CONTENT_TYPE, destination } = {}) {
|
|
67
|
-
const mode = normalizeCesrBodyMode(bodyMode);
|
|
68
|
-
const headers = {
|
|
69
|
-
"Content-Type": contentType,
|
|
70
|
-
};
|
|
71
|
-
if (destination) {
|
|
35
|
+
/** Build ordinary signed-message POST framing, preserving the signed body bytes. */
|
|
36
|
+
export function buildCesrRequest(message, { contentType = CESR_CONTENT_TYPE, destination } = {}) {
|
|
37
|
+
const headers = { "Content-Type": contentType };
|
|
38
|
+
if (destination)
|
|
72
39
|
headers[CESR_DESTINATION_HEADER] = destination;
|
|
73
|
-
}
|
|
74
|
-
if (mode === "body") {
|
|
75
|
-
return {
|
|
76
|
-
headers,
|
|
77
|
-
body: arrayBufferFromBytes(message),
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
40
|
const { smellage } = smell(message);
|
|
81
41
|
const serder = parseSerder(message.slice(0, smellage.size), smellage);
|
|
82
42
|
headers[CESR_ATTACHMENT_HEADER] = textDecoder.decode(message.slice(serder.size));
|
|
83
|
-
return {
|
|
84
|
-
headers,
|
|
85
|
-
body: arrayBufferFromBytes(message.slice(0, serder.size)),
|
|
86
|
-
};
|
|
43
|
+
return { headers, body: arrayBufferFromBytes(message.slice(0, serder.size)) };
|
|
87
44
|
}
|
|
88
45
|
/**
|
|
89
46
|
* Build one raw CESR-body HTTP request.
|
|
@@ -106,15 +63,24 @@ export function buildCesrStreamRequest(bytes, { destination } = {}) {
|
|
|
106
63
|
/**
|
|
107
64
|
* Reconstruct one logical CESR payload from an incoming HTTP request.
|
|
108
65
|
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
66
|
+
* Header mode restores the declared `CESR-Genus` before the unchanged body and
|
|
67
|
+
* appends `CESR-ATTACHMENT`; body protocol version does not select that context.
|
|
111
68
|
*/
|
|
112
69
|
export function requestBytes(req, options = {}) {
|
|
113
70
|
return read();
|
|
114
71
|
/** Acquire the body lazily, then append detached attachments in their original order. */
|
|
115
72
|
async function* read() {
|
|
73
|
+
const cesr = isCesrContentType(req.headers.get("content-type"));
|
|
74
|
+
const genus = cesr ? req.headers.get("CESR-Genus") : null;
|
|
75
|
+
if (genus !== null) {
|
|
76
|
+
if (genus !== "1" && genus !== "2") {
|
|
77
|
+
throw new ValidationError("CESR-Genus must be 1 or 2");
|
|
78
|
+
}
|
|
79
|
+
(options.signal ?? req.signal).throwIfAborted();
|
|
80
|
+
yield Counter.makeGVC({ major: genus === "1" ? 1 : 2, minor: 0 });
|
|
81
|
+
}
|
|
116
82
|
const attachment = req.headers.get(CESR_ATTACHMENT_HEADER);
|
|
117
|
-
const tail = attachment &&
|
|
83
|
+
const tail = attachment && cesr
|
|
118
84
|
? textEncoder.encode(attachment)
|
|
119
85
|
: null;
|
|
120
86
|
yield* streamBytes(req.body, { signal: req.signal, ...options });
|
|
@@ -196,8 +162,7 @@ export async function readMailboxAdminRequest(req) {
|
|
|
196
162
|
/** Parse and return the first CESR message in one request body. */
|
|
197
163
|
export function inspectCesrRequest(bytes) {
|
|
198
164
|
try {
|
|
199
|
-
const
|
|
200
|
-
const serder = parseSerder(bytes.slice(0, smellage.size), smellage);
|
|
165
|
+
const serder = parseBytes(bytes)[0]?.body;
|
|
201
166
|
return serder instanceof SerderKERI ? serder : null;
|
|
202
167
|
}
|
|
203
168
|
catch {
|