keri-ts 0.11.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -2
- package/esm/keri/npm/src/_dnt.polyfills.js +36 -0
- package/esm/keri/npm/src/acdc/chaining.js +213 -0
- package/esm/keri/npm/src/acdc/dhking.js +716 -0
- package/esm/keri/npm/src/acdc/messaging.js +2 -0
- package/esm/keri/npm/src/acdc/observing.js +47 -40
- package/esm/keri/npm/src/acdc/regbasing.js +22 -22
- package/esm/keri/npm/src/acdc/regengine.js +88 -119
- package/esm/keri/npm/src/acdc/regeventing.js +163 -44
- package/esm/keri/npm/src/acdc/registering.js +99 -23
- package/esm/keri/npm/src/acdc/registraring.js +82 -46
- package/esm/keri/npm/src/acdc/relating.js +59 -0
- package/esm/keri/npm/src/acdc/salting.js +720 -0
- package/esm/keri/npm/src/acdc/scheming.js +103 -105
- package/esm/keri/npm/src/acdc/unblinding.js +1042 -0
- package/esm/keri/npm/src/app/{authenticating.js → bootstrap/authenticating.js} +40 -39
- package/esm/keri/npm/src/app/bootstrap/bootstrapping.js +109 -0
- package/esm/keri/npm/src/app/bootstrap/oobi-replies.js +113 -0
- package/esm/keri/npm/src/app/{oobiery.js → bootstrap/oobiery.js} +211 -267
- package/esm/keri/npm/src/app/credentials/credential-importing.js +201 -0
- package/esm/keri/npm/src/app/credentials/credential-proposals.js +120 -0
- package/esm/keri/npm/src/app/credentials/credential-revoking.js +165 -0
- package/esm/keri/npm/src/app/credentials/credential-workflows.js +365 -0
- package/esm/keri/npm/src/app/credentials/tel-publishing.js +27 -0
- package/esm/keri/npm/src/app/{verifying.js → credentials/verifying.js} +50 -45
- package/esm/keri/npm/src/app/delivery/forwarding.js +600 -0
- package/esm/keri/npm/src/app/delivery/introducing.js +68 -0
- package/esm/keri/npm/src/app/delivery/reply-streams.js +230 -0
- package/esm/keri/npm/src/app/delivery/respondant.js +159 -0
- package/esm/keri/npm/src/app/delivery/stored-replies.js +53 -0
- package/esm/keri/npm/src/app/exchanges/essr.js +111 -0
- package/esm/keri/npm/src/app/exchanges/exchange-messaging.js +66 -0
- package/esm/keri/npm/src/app/exchanges/exchanging.js +1354 -0
- package/esm/keri/npm/src/app/{challenging.js → identity/challenging.js} +13 -8
- package/esm/keri/npm/src/app/{configing.js → identity/configing.js} +4 -4
- package/esm/keri/npm/src/app/{delegating.js → identity/delegating.js} +118 -40
- package/esm/keri/npm/src/app/{endpoint-roleing.js → identity/endpoint-roleing.js} +43 -39
- package/esm/keri/npm/src/app/{habbing.js → identity/habbing.js} +258 -226
- package/esm/keri/npm/src/app/{keeping.js → identity/keeping.js} +60 -56
- package/esm/keri/npm/src/app/{organizing.js → identity/organizing.js} +47 -21
- package/esm/keri/npm/src/app/{ipex-building.js → ipex/ipex-building.js} +53 -55
- package/esm/keri/npm/src/app/ipex/ipex-credentialing.js +359 -0
- package/esm/keri/npm/src/app/{ipex-graph.js → ipex/ipex-graph.js} +70 -124
- package/esm/keri/npm/src/app/ipex/ipex-grouping.js +664 -0
- package/esm/keri/npm/src/app/ipex/ipex-node-authentication.js +185 -0
- package/esm/keri/npm/src/app/ipex/ipex-v2.js +692 -0
- package/esm/keri/npm/src/app/{ipexing.js → ipex/ipexing.js} +59 -10
- package/esm/keri/npm/src/app/mailbox/forward-handler.js +228 -0
- package/esm/keri/npm/src/app/{mailbox-director.js → mailbox/mailbox-director.js} +146 -139
- package/esm/keri/npm/src/app/mailbox/mailbox-poller.js +305 -0
- package/esm/keri/npm/src/app/mailbox/mailbox-sse.js +254 -0
- package/esm/keri/npm/src/app/{mailboxing.js → mailbox/mailboxing.js} +117 -70
- package/esm/keri/npm/src/app/mailbox/topic-routing.js +54 -0
- package/esm/keri/npm/src/app/multisig/group-members.js +173 -0
- package/esm/keri/npm/src/app/multisig/grouping.js +932 -0
- package/esm/keri/npm/src/app/multisig/multisig-messaging.js +164 -0
- package/esm/keri/npm/src/app/multisig/multisig-workflows.js +821 -0
- package/esm/keri/npm/src/app/{notifying.js → notifications/notifying.js} +23 -50
- package/esm/keri/npm/src/app/notifications/signaling.js +177 -0
- package/esm/keri/npm/src/app/{parsering.js → protocol/parsering.js} +123 -53
- package/esm/keri/npm/src/app/protocol/protocol-processing.js +245 -0
- package/esm/keri/npm/src/app/protocol/reactor.js +55 -0
- package/esm/keri/npm/src/app/queries/query-replies.js +151 -0
- package/esm/keri/npm/src/app/queries/querying.js +306 -0
- package/esm/keri/npm/src/app/queries/witness-inquisitor.js +415 -0
- package/esm/keri/npm/src/app/runtime/abortable.js +103 -0
- package/esm/keri/npm/src/app/runtime/agent-runtime.js +633 -0
- package/esm/keri/npm/src/app/runtime/cue-runtime.js +61 -0
- package/esm/keri/npm/src/app/runtime/runtime-clock.js +6 -0
- package/esm/keri/npm/src/app/{byte-source.js → transport/byte-source.js} +43 -21
- package/esm/keri/npm/src/app/transport/cesr-egress.js +317 -0
- package/esm/keri/npm/src/app/{cesr-http.js → transport/cesr-http.js} +28 -78
- package/esm/keri/npm/src/app/transport/http-client.js +172 -0
- package/esm/keri/npm/src/app/transport/http-messenger.js +52 -0
- package/esm/keri/npm/src/app/transport/http-stream-messenger.js +60 -0
- package/esm/keri/npm/src/app/transport/httping.js +57 -0
- package/esm/keri/npm/src/app/transport/message-source.js +77 -0
- package/esm/keri/npm/src/app/transport/messengering.js +68 -0
- package/esm/keri/npm/src/app/{socket-source.js → transport/socket-source.js} +41 -5
- package/esm/keri/npm/src/app/transport/tcp-egress.js +377 -0
- package/esm/keri/npm/src/app/transport/tcp-messenger.js +162 -0
- package/esm/keri/npm/src/app/transport/tcp-stream-messenger.js +40 -0
- package/esm/keri/npm/src/app/transport/transport-error.js +14 -0
- package/esm/keri/npm/src/app/witness/http-endpoints.js +185 -0
- package/esm/keri/npm/src/app/witness/ingress.js +148 -0
- package/esm/keri/npm/src/app/witness/receipt-client.js +248 -0
- package/esm/keri/npm/src/app/witness/receipt-messages.js +29 -0
- package/esm/keri/npm/src/app/witness/receipting.js +323 -0
- package/esm/keri/npm/src/app/witness/registration.js +50 -0
- package/esm/keri/npm/src/cli/common/bootstrap.js +12 -0
- package/esm/keri/npm/src/{app/cli → cli}/common/context.js +47 -9
- package/esm/keri/npm/src/{app/cli → cli}/common/existing.js +9 -29
- package/esm/keri/npm/src/cli/common/parsing.js +279 -0
- package/esm/keri/npm/src/cli/common/passcode.js +66 -0
- package/esm/keri/npm/src/cli/common/tel-completion.js +24 -0
- package/esm/keri/npm/src/{app/cli → cli}/common/witness-auth.js +2 -2
- package/esm/keri/npm/src/cli/credentials/ipex.js +702 -0
- package/esm/keri/npm/src/cli/credentials/vc.js +399 -0
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/did.js +71 -53
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/ends.js +34 -31
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/loc.js +22 -20
- package/esm/keri/npm/src/cli/endpoints/oobi-clean.js +134 -0
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/oobi.js +37 -36
- package/esm/keri/npm/src/{app/cli → cli/identity}/aid.js +8 -7
- package/esm/keri/npm/src/cli/identity/challenge.js +181 -0
- package/esm/keri/npm/src/{app/cli → cli/identity}/delegate.js +88 -73
- package/esm/keri/npm/src/{app/cli → cli/identity}/export.js +9 -8
- package/esm/keri/npm/src/cli/identity/incept.js +181 -0
- package/esm/keri/npm/src/cli/identity/init.js +153 -0
- package/esm/keri/npm/src/cli/identity/interact.js +84 -0
- package/esm/keri/npm/src/{app/cli → cli/identity}/list.js +7 -6
- package/esm/keri/npm/src/cli/identity/rotate.js +172 -0
- package/esm/keri/npm/src/cli/index.js +38 -0
- package/esm/keri/npm/src/{app/cli → cli/messaging}/exchange.js +24 -24
- package/esm/keri/npm/src/cli/messaging/multisig.js +569 -0
- package/esm/keri/npm/src/{app/cli → cli/messaging}/notifications.js +26 -22
- package/esm/keri/npm/src/{app/cli → cli}/output.js +1 -1
- package/esm/keri/npm/src/cli/tools/annotate.js +25 -0
- package/esm/keri/npm/src/{app/cli → cli/tools}/benchmark.js +18 -9
- package/esm/keri/npm/src/{app/cli → cli/tools}/db-dump.js +14 -27
- package/esm/keri/npm/src/{app/cli → cli/tools}/saidify.js +3 -2
- package/esm/keri/npm/src/{app/cli → cli/tools}/sign.js +16 -10
- package/esm/keri/npm/src/{app/cli → cli/tools}/verify.js +10 -10
- package/esm/keri/npm/src/core/attachment-countering.js +31 -1
- package/esm/keri/npm/src/core/deck.js +5 -44
- package/esm/keri/npm/src/core/dispatch.js +10 -2
- package/esm/keri/npm/src/core/errors.js +5 -10
- package/esm/keri/npm/src/core/{exchange-proofing.js → exchange/exchange-proofing.js} +32 -2
- package/esm/keri/npm/src/core/{protocol-exchanging.js → exchange/protocol-exchanging.js} +47 -4
- package/esm/keri/npm/src/core/genus-framing.js +44 -0
- package/esm/keri/npm/src/core/{eventing.js → kel/eventing.js} +209 -390
- package/esm/keri/npm/src/core/kel/kever-decisions.js +70 -0
- package/esm/keri/npm/src/core/{kever.js → kel/kever.js} +84 -167
- package/esm/keri/npm/src/core/logger.js +3 -3
- package/esm/keri/npm/src/core/{kram-policy.js → mailbox/kram-policy.js} +14 -4
- package/esm/keri/npm/src/core/{kram-pruning.js → mailbox/kram-pruning.js} +5 -15
- package/esm/keri/npm/src/core/{kram-signatures.js → mailbox/kram-signatures.js} +1 -1
- package/esm/keri/npm/src/core/mailbox/kram-staging.js +149 -0
- package/esm/keri/npm/src/core/{kram-time.js → mailbox/kram-time.js} +9 -15
- package/esm/keri/npm/src/core/mailbox/kraming.js +78 -0
- package/esm/keri/npm/src/core/protocol-eventing.js +6 -1
- package/esm/keri/npm/src/core/protocol-serialization.js +9 -34
- package/esm/keri/npm/src/core/protocol-vdr-eventing.js +10 -11
- package/esm/keri/npm/src/core/records.js +0 -19
- package/esm/keri/npm/src/core/routing.js +187 -199
- package/esm/keri/npm/src/db/baser-defaults.js +11 -0
- package/esm/keri/npm/src/db/basing.js +224 -401
- package/esm/keri/npm/src/db/core/keys.js +2 -2
- package/esm/keri/npm/src/db/core/lmdber.js +123 -149
- package/esm/keri/npm/src/db/core/path-manager.js +2 -4
- package/esm/keri/npm/src/db/escrowing.js +82 -200
- package/esm/keri/npm/src/db/exchange/exchange-nests.js +54 -0
- package/esm/keri/npm/src/db/exchange/exchange-records.js +7 -0
- package/esm/keri/npm/src/db/index.js +5 -6
- package/esm/keri/npm/src/db/keeping.js +123 -6
- package/esm/keri/npm/src/db/{kram-factors.js → mailbox/kram-factors.js} +17 -50
- package/esm/keri/npm/src/db/{mailboxing.js → mailbox/mailboxing.js} +5 -8
- package/esm/keri/npm/src/db/reger.js +48 -69
- package/esm/keri/npm/src/db/{kel-replay.js → replay/kel-replay.js} +12 -24
- package/esm/keri/npm/src/db/{tel-replay.js → replay/tel-replay.js} +38 -36
- package/esm/keri/npm/src/db/{witness-replay.js → replay/witness-replay.js} +8 -14
- package/esm/keri/npm/src/db/subing.js +2 -11
- package/esm/keri/npm/src/did/keri/resolving.js +4 -18
- package/esm/keri/npm/src/did/webs/artifacts.js +21 -24
- package/esm/keri/npm/src/did/webs/designated-aliases.js +18 -48
- package/esm/keri/npm/src/did/webs/documenting.js +8 -8
- package/esm/keri/npm/src/did/webs/resolving.js +73 -74
- package/esm/keri/npm/src/library/index.js +1 -1
- package/esm/keri/npm/src/npm/cli.js +1 -1
- package/esm/keri/npm/src/npm/index.js +1 -1
- package/esm/keri/npm/src/runtime/index.js +105 -74
- package/esm/keri/npm/src/vdr/backer-state.js +55 -0
- package/esm/keri/npm/src/vdr/credential-tsn-record.js +59 -0
- package/esm/keri/npm/src/vdr/credentialing.js +84 -109
- package/esm/keri/npm/src/vdr/eventing.js +633 -251
- package/esm/keri/npm/src/vdr/registry-tsn-record.js +55 -0
- package/esm/keri/npm/src/vdr/revoking.js +90 -0
- package/esm/keri/npm/src/vdr/tel-anchor.js +29 -0
- package/esm/keri/npm/src/vdr/tel-publication.js +178 -0
- package/esm/keri/npm/src/vdr/tsn-query.js +15 -10
- package/esm/keri/npm/src/{app/version.js → version.js} +2 -2
- package/package.json +7 -21
- package/types/_dnt.polyfills.d.ts +55 -0
- package/types/_dnt.polyfills.d.ts.map +1 -1
- package/types/acdc/chaining.d.ts +35 -0
- package/types/acdc/chaining.d.ts.map +1 -0
- package/types/acdc/dhking.d.ts +136 -0
- package/types/acdc/dhking.d.ts.map +1 -0
- package/types/acdc/messaging.d.ts.map +1 -1
- package/types/acdc/observing.d.ts +19 -15
- package/types/acdc/observing.d.ts.map +1 -1
- package/types/acdc/regbasing.d.ts +8 -9
- package/types/acdc/regbasing.d.ts.map +1 -1
- package/types/acdc/regengine.d.ts +14 -28
- package/types/acdc/regengine.d.ts.map +1 -1
- package/types/acdc/regeventing.d.ts +24 -7
- package/types/acdc/regeventing.d.ts.map +1 -1
- package/types/acdc/registering.d.ts +27 -11
- package/types/acdc/registering.d.ts.map +1 -1
- package/types/acdc/registraring.d.ts +22 -22
- package/types/acdc/registraring.d.ts.map +1 -1
- package/types/acdc/relating.d.ts +21 -0
- package/types/acdc/relating.d.ts.map +1 -0
- package/types/acdc/salting.d.ts +241 -0
- package/types/acdc/salting.d.ts.map +1 -0
- package/types/acdc/scheming.d.ts +3 -2
- package/types/acdc/scheming.d.ts.map +1 -1
- package/types/acdc/unblinding.d.ts +150 -0
- package/types/acdc/unblinding.d.ts.map +1 -0
- package/types/app/bootstrap/authenticating.d.ts +54 -0
- package/types/app/bootstrap/authenticating.d.ts.map +1 -0
- package/types/app/bootstrap/bootstrapping.d.ts +45 -0
- package/types/app/bootstrap/bootstrapping.d.ts.map +1 -0
- package/types/app/bootstrap/oobi-replies.d.ts +8 -0
- package/types/app/bootstrap/oobi-replies.d.ts.map +1 -0
- package/types/app/{oobiery.d.ts → bootstrap/oobiery.d.ts} +98 -27
- package/types/app/bootstrap/oobiery.d.ts.map +1 -0
- package/types/app/credentials/credential-importing.d.ts +29 -0
- package/types/app/credentials/credential-importing.d.ts.map +1 -0
- package/types/app/credentials/credential-proposals.d.ts +27 -0
- package/types/app/credentials/credential-proposals.d.ts.map +1 -0
- package/types/app/credentials/credential-revoking.d.ts +44 -0
- package/types/app/credentials/credential-revoking.d.ts.map +1 -0
- package/types/app/credentials/credential-workflows.d.ts +149 -0
- package/types/app/credentials/credential-workflows.d.ts.map +1 -0
- package/types/app/{schema-resolving.d.ts → credentials/schema-resolving.d.ts} +2 -2
- package/types/app/credentials/schema-resolving.d.ts.map +1 -0
- package/types/app/credentials/tel-publishing.d.ts +16 -0
- package/types/app/credentials/tel-publishing.d.ts.map +1 -0
- package/types/app/{verifying.d.ts → credentials/verifying.d.ts} +20 -9
- package/types/app/credentials/verifying.d.ts.map +1 -0
- package/types/app/delivery/forwarding.d.ts +227 -0
- package/types/app/delivery/forwarding.d.ts.map +1 -0
- package/types/app/delivery/introducing.d.ts +21 -0
- package/types/app/delivery/introducing.d.ts.map +1 -0
- package/types/app/delivery/reply-streams.d.ts +49 -0
- package/types/app/delivery/reply-streams.d.ts.map +1 -0
- package/types/app/delivery/respondant.d.ts +52 -0
- package/types/app/delivery/respondant.d.ts.map +1 -0
- package/types/app/delivery/stored-replies.d.ts +11 -0
- package/types/app/delivery/stored-replies.d.ts.map +1 -0
- package/types/app/exchanges/essr.d.ts +53 -0
- package/types/app/exchanges/essr.d.ts.map +1 -0
- package/types/app/exchanges/exchange-messaging.d.ts +73 -0
- package/types/app/exchanges/exchange-messaging.d.ts.map +1 -0
- package/types/app/exchanges/exchanging.d.ts +379 -0
- package/types/app/exchanges/exchanging.d.ts.map +1 -0
- package/types/app/{challenging.d.ts → identity/challenging.d.ts} +9 -3
- package/types/app/identity/challenging.d.ts.map +1 -0
- package/types/app/{configing.d.ts → identity/configing.d.ts} +1 -1
- package/types/app/identity/configing.d.ts.map +1 -0
- package/types/app/{delegating.d.ts → identity/delegating.d.ts} +59 -17
- package/types/app/identity/delegating.d.ts.map +1 -0
- package/types/app/identity/endpoint-roleing.d.ts +54 -0
- package/types/app/identity/endpoint-roleing.d.ts.map +1 -0
- package/types/app/{habbing.d.ts → identity/habbing.d.ts} +86 -54
- package/types/app/identity/habbing.d.ts.map +1 -0
- package/types/app/{keeping.d.ts → identity/keeping.d.ts} +19 -5
- package/types/app/identity/keeping.d.ts.map +1 -0
- package/types/app/{organizing.d.ts → identity/organizing.d.ts} +19 -4
- package/types/app/identity/organizing.d.ts.map +1 -0
- package/types/app/{ipex-building.d.ts → ipex/ipex-building.d.ts} +5 -5
- package/types/app/ipex/ipex-building.d.ts.map +1 -0
- package/types/app/{ipex-credentialing.d.ts → ipex/ipex-credentialing.d.ts} +42 -10
- package/types/app/ipex/ipex-credentialing.d.ts.map +1 -0
- package/types/app/ipex/ipex-graph.d.ts +28 -0
- package/types/app/ipex/ipex-graph.d.ts.map +1 -0
- package/types/app/ipex/ipex-grouping.d.ts +112 -0
- package/types/app/ipex/ipex-grouping.d.ts.map +1 -0
- package/types/app/ipex/ipex-node-authentication.d.ts +32 -0
- package/types/app/ipex/ipex-node-authentication.d.ts.map +1 -0
- package/types/app/ipex/ipex-v2.d.ts +71 -0
- package/types/app/ipex/ipex-v2.d.ts.map +1 -0
- package/types/app/{ipexing.d.ts → ipex/ipexing.d.ts} +21 -8
- package/types/app/ipex/ipexing.d.ts.map +1 -0
- package/types/app/mailbox/forward-handler.d.ts +68 -0
- package/types/app/mailbox/forward-handler.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-director.d.ts +252 -0
- package/types/app/mailbox/mailbox-director.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-poller.d.ts +149 -0
- package/types/app/mailbox/mailbox-poller.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-sse.d.ts +63 -0
- package/types/app/mailbox/mailbox-sse.d.ts.map +1 -0
- package/types/app/{mailboxing.d.ts → mailbox/mailboxing.d.ts} +92 -43
- package/types/app/mailbox/mailboxing.d.ts.map +1 -0
- package/types/app/mailbox/topic-routing.d.ts +18 -0
- package/types/app/mailbox/topic-routing.d.ts.map +1 -0
- package/types/app/multisig/group-members.d.ts +60 -0
- package/types/app/multisig/group-members.d.ts.map +1 -0
- package/types/app/multisig/grouping.d.ts +317 -0
- package/types/app/multisig/grouping.d.ts.map +1 -0
- package/types/app/multisig/multisig-messaging.d.ts +97 -0
- package/types/app/multisig/multisig-messaging.d.ts.map +1 -0
- package/types/app/multisig/multisig-workflows.d.ts +85 -0
- package/types/app/multisig/multisig-workflows.d.ts.map +1 -0
- package/types/app/{notifying.d.ts → notifications/notifying.d.ts} +5 -6
- package/types/app/notifications/notifying.d.ts.map +1 -0
- package/types/app/notifications/signaling.d.ts +68 -0
- package/types/app/notifications/signaling.d.ts.map +1 -0
- package/types/app/protocol/parsering.d.ts +128 -0
- package/types/app/protocol/parsering.d.ts.map +1 -0
- package/types/app/{protocol-host-policy.d.ts → protocol/protocol-host-policy.d.ts} +1 -10
- package/types/app/protocol/protocol-host-policy.d.ts.map +1 -0
- package/types/app/protocol/protocol-processing.d.ts +140 -0
- package/types/app/protocol/protocol-processing.d.ts.map +1 -0
- package/types/app/protocol/reactor.d.ts +43 -0
- package/types/app/protocol/reactor.d.ts.map +1 -0
- package/types/app/queries/query-replies.d.ts +78 -0
- package/types/app/queries/query-replies.d.ts.map +1 -0
- package/types/app/queries/querying.d.ts +155 -0
- package/types/app/queries/querying.d.ts.map +1 -0
- package/types/app/queries/witness-inquisitor.d.ts +150 -0
- package/types/app/queries/witness-inquisitor.d.ts.map +1 -0
- package/types/app/runtime/abortable.d.ts +39 -0
- package/types/app/runtime/abortable.d.ts.map +1 -0
- package/types/app/runtime/agent-runtime.d.ts +348 -0
- package/types/app/runtime/agent-runtime.d.ts.map +1 -0
- package/types/app/runtime/cue-runtime.d.ts +33 -0
- package/types/app/runtime/cue-runtime.d.ts.map +1 -0
- package/types/app/runtime/runtime-clock.d.ts +28 -0
- package/types/app/runtime/runtime-clock.d.ts.map +1 -0
- package/types/app/runtime/runtime-turn.d.ts.map +1 -0
- package/types/app/transport/byte-source.d.ts +41 -0
- package/types/app/transport/byte-source.d.ts.map +1 -0
- package/types/app/transport/cesr-egress.d.ts +117 -0
- package/types/app/transport/cesr-egress.d.ts.map +1 -0
- package/types/app/{cesr-http.d.ts → transport/cesr-http.d.ts} +9 -33
- package/types/app/transport/cesr-http.d.ts.map +1 -0
- package/types/app/transport/http-client.d.ts +99 -0
- package/types/app/transport/http-client.d.ts.map +1 -0
- package/types/app/transport/http-messenger.d.ts +37 -0
- package/types/app/transport/http-messenger.d.ts.map +1 -0
- package/types/app/transport/http-stream-messenger.d.ts +30 -0
- package/types/app/transport/http-stream-messenger.d.ts.map +1 -0
- package/types/app/transport/httping.d.ts +19 -0
- package/types/app/transport/httping.d.ts.map +1 -0
- package/types/app/transport/message-source.d.ts +22 -0
- package/types/app/transport/message-source.d.ts.map +1 -0
- package/types/app/transport/messengering.d.ts +41 -0
- package/types/app/transport/messengering.d.ts.map +1 -0
- package/types/app/{socket-source.d.ts → transport/socket-source.d.ts} +10 -3
- package/types/app/transport/socket-source.d.ts.map +1 -0
- package/types/app/transport/tcp-egress.d.ts +118 -0
- package/types/app/transport/tcp-egress.d.ts.map +1 -0
- package/types/app/transport/tcp-messenger.d.ts +69 -0
- package/types/app/transport/tcp-messenger.d.ts.map +1 -0
- package/types/app/transport/tcp-stream-messenger.d.ts +25 -0
- package/types/app/transport/tcp-stream-messenger.d.ts.map +1 -0
- package/types/app/transport/transport-error.d.ts +12 -0
- package/types/app/transport/transport-error.d.ts.map +1 -0
- package/types/app/witness/http-endpoints.d.ts +77 -0
- package/types/app/witness/http-endpoints.d.ts.map +1 -0
- package/types/app/witness/ingress.d.ts +65 -0
- package/types/app/witness/ingress.d.ts.map +1 -0
- package/types/app/witness/receipt-client.d.ts +82 -0
- package/types/app/witness/receipt-client.d.ts.map +1 -0
- package/types/app/witness/receipt-messages.d.ts +21 -0
- package/types/app/witness/receipt-messages.d.ts.map +1 -0
- package/types/app/witness/receipting.d.ts +117 -0
- package/types/app/witness/receipting.d.ts.map +1 -0
- package/types/app/witness/registration.d.ts +27 -0
- package/types/app/witness/registration.d.ts.map +1 -0
- package/types/cli/common/bootstrap.d.ts +5 -0
- package/types/cli/common/bootstrap.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/context.d.ts +10 -9
- package/types/cli/common/context.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/existing.d.ts +2 -8
- package/types/cli/common/existing.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/parsing.d.ts +26 -15
- package/types/cli/common/parsing.d.ts.map +1 -0
- package/types/cli/common/passcode.d.ts +9 -0
- package/types/cli/common/passcode.d.ts.map +1 -0
- package/types/cli/common/rendering.d.ts.map +1 -0
- package/types/cli/common/tel-completion.d.ts +8 -0
- package/types/cli/common/tel-completion.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/witness-auth.d.ts +1 -1
- package/types/cli/common/witness-auth.d.ts.map +1 -0
- package/types/cli/credentials/ipex.d.ts +110 -0
- package/types/cli/credentials/ipex.d.ts.map +1 -0
- package/types/cli/credentials/vc.d.ts +42 -0
- package/types/cli/credentials/vc.d.ts.map +1 -0
- package/types/{app/cli → cli/endpoints}/did.d.ts +5 -1
- package/types/cli/endpoints/did.d.ts.map +1 -0
- package/types/{app/cli → cli/endpoints}/ends.d.ts +9 -1
- package/types/cli/endpoints/ends.d.ts.map +1 -0
- package/types/cli/endpoints/loc.d.ts.map +1 -0
- package/types/cli/endpoints/oobi-clean.d.ts +8 -0
- package/types/cli/endpoints/oobi-clean.d.ts.map +1 -0
- package/types/{app/cli → cli/endpoints}/oobi.d.ts +3 -1
- package/types/cli/endpoints/oobi.d.ts.map +1 -0
- package/types/cli/identity/aid.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/challenge.d.ts +5 -1
- package/types/cli/identity/challenge.d.ts.map +1 -0
- package/types/cli/identity/delegate.d.ts +4 -0
- package/types/cli/identity/delegate.d.ts.map +1 -0
- package/types/cli/identity/export.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/incept.d.ts +2 -0
- package/types/cli/identity/incept.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/init.d.ts +2 -0
- package/types/cli/identity/init.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/interact.d.ts +2 -0
- package/types/cli/identity/interact.d.ts.map +1 -0
- package/types/cli/identity/list.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/rotate.d.ts +9 -2
- package/types/cli/identity/rotate.d.ts.map +1 -0
- package/types/cli/index.d.ts +39 -0
- package/types/cli/index.d.ts.map +1 -0
- package/types/{app/cli → cli/messaging}/exchange.d.ts +3 -1
- package/types/cli/messaging/exchange.d.ts.map +1 -0
- package/types/cli/messaging/multisig.d.ts +29 -0
- package/types/cli/messaging/multisig.d.ts.map +1 -0
- package/types/cli/messaging/notifications.d.ts.map +1 -0
- package/types/cli/output.d.ts.map +1 -0
- package/types/cli/tools/annotate-color.d.ts.map +1 -0
- package/types/cli/tools/annotate.d.ts.map +1 -0
- package/types/cli/tools/benchmark.d.ts.map +1 -0
- package/types/{app/cli → cli/tools}/db-dump.d.ts +0 -2
- package/types/cli/tools/db-dump.d.ts.map +1 -0
- package/types/cli/tools/saidify.d.ts.map +1 -0
- package/types/{app/cli → cli/tools}/sign.d.ts +2 -0
- package/types/cli/tools/sign.d.ts.map +1 -0
- package/types/cli/tools/verify.d.ts.map +1 -0
- package/types/core/attachment-countering.d.ts +10 -1
- package/types/core/attachment-countering.d.ts.map +1 -1
- package/types/core/cues.d.ts +146 -57
- package/types/core/cues.d.ts.map +1 -1
- package/types/core/deck.d.ts +2 -12
- package/types/core/deck.d.ts.map +1 -1
- package/types/core/dispatch.d.ts +7 -3
- package/types/core/dispatch.d.ts.map +1 -1
- package/types/core/errors.d.ts +4 -4
- package/types/core/errors.d.ts.map +1 -1
- package/types/core/{exchange-proofing.d.ts → exchange/exchange-proofing.d.ts} +9 -2
- package/types/core/exchange/exchange-proofing.d.ts.map +1 -0
- package/types/core/{protocol-exchanging.d.ts → exchange/protocol-exchanging.d.ts} +18 -2
- package/types/core/exchange/protocol-exchanging.d.ts.map +1 -0
- package/types/core/genus-framing.d.ts +12 -0
- package/types/core/genus-framing.d.ts.map +1 -0
- package/types/core/{eventing.d.ts → kel/eventing.d.ts} +37 -48
- package/types/core/kel/eventing.d.ts.map +1 -0
- package/types/core/{kever-decisions.d.ts → kel/kever-decisions.d.ts} +36 -22
- package/types/core/kel/kever-decisions.d.ts.map +1 -0
- package/types/core/{kever.d.ts → kel/kever.d.ts} +13 -47
- package/types/core/kel/kever.d.ts.map +1 -0
- package/types/core/kel/witnesses.d.ts.map +1 -0
- package/types/core/logger.d.ts +1 -1
- package/types/core/logger.d.ts.map +1 -1
- package/types/core/{kram-auth.d.ts → mailbox/kram-auth.d.ts} +2 -2
- package/types/core/mailbox/kram-auth.d.ts.map +1 -0
- package/types/core/{kram-policy.d.ts → mailbox/kram-policy.d.ts} +2 -2
- package/types/core/mailbox/kram-policy.d.ts.map +1 -0
- package/types/core/{kram-pruning.d.ts → mailbox/kram-pruning.d.ts} +3 -3
- package/types/core/{kram-pruning.d.ts.map → mailbox/kram-pruning.d.ts.map} +1 -1
- package/types/core/{kram-signatures.d.ts → mailbox/kram-signatures.d.ts} +3 -3
- package/types/core/mailbox/kram-signatures.d.ts.map +1 -0
- package/types/core/mailbox/kram-staging.d.ts +30 -0
- package/types/core/mailbox/kram-staging.d.ts.map +1 -0
- package/types/core/{kram-time.d.ts → mailbox/kram-time.d.ts} +5 -11
- package/types/core/mailbox/kram-time.d.ts.map +1 -0
- package/types/core/mailbox/kraming.d.ts +42 -0
- package/types/core/mailbox/kraming.d.ts.map +1 -0
- package/types/core/mailbox/mailbox-topics.d.ts.map +1 -0
- package/types/core/protocol-eventing.d.ts +5 -0
- package/types/core/protocol-eventing.d.ts.map +1 -1
- package/types/core/protocol-serialization.d.ts +1 -1
- package/types/core/protocol-serialization.d.ts.map +1 -1
- package/types/core/protocol-vdr-eventing.d.ts +7 -5
- package/types/core/protocol-vdr-eventing.d.ts.map +1 -1
- package/types/core/records.d.ts +15 -50
- package/types/core/records.d.ts.map +1 -1
- package/types/core/routing.d.ts +76 -46
- package/types/core/routing.d.ts.map +1 -1
- package/types/db/baser-defaults.d.ts +5 -0
- package/types/db/baser-defaults.d.ts.map +1 -0
- package/types/db/basing.d.ts +70 -75
- package/types/db/basing.d.ts.map +1 -1
- package/types/db/core/keys.d.ts.map +1 -1
- package/types/db/core/lmdber.d.ts +21 -23
- package/types/db/core/lmdber.d.ts.map +1 -1
- package/types/db/core/path-manager.d.ts.map +1 -1
- package/types/db/escrowing.d.ts +12 -49
- package/types/db/escrowing.d.ts.map +1 -1
- package/types/db/exchange/exchange-nests.d.ts +12 -0
- package/types/db/exchange/exchange-nests.d.ts.map +1 -0
- package/types/db/exchange/exchange-records.d.ts +38 -0
- package/types/db/exchange/exchange-records.d.ts.map +1 -0
- package/types/db/index.d.ts +5 -6
- package/types/db/index.d.ts.map +1 -1
- package/types/db/keeping.d.ts +19 -1
- package/types/db/keeping.d.ts.map +1 -1
- package/types/db/koming.d.ts +1 -1
- package/types/db/koming.d.ts.map +1 -1
- package/types/db/{kram-factors.d.ts → mailbox/kram-factors.d.ts} +3 -5
- package/types/db/mailbox/kram-factors.d.ts.map +1 -0
- package/types/db/{mailboxing.d.ts → mailbox/mailboxing.d.ts} +3 -4
- package/types/db/mailbox/mailboxing.d.ts.map +1 -0
- package/types/db/reger.d.ts +10 -12
- package/types/db/reger.d.ts.map +1 -1
- package/types/db/{kel-replay.d.ts → replay/kel-replay.d.ts} +2 -6
- package/types/db/replay/kel-replay.d.ts.map +1 -0
- package/types/db/{tel-replay.d.ts → replay/tel-replay.d.ts} +13 -8
- package/types/db/replay/tel-replay.d.ts.map +1 -0
- package/types/db/{witness-replay.d.ts → replay/witness-replay.d.ts} +2 -3
- package/types/db/replay/witness-replay.d.ts.map +1 -0
- package/types/db/subing.d.ts +1 -5
- package/types/db/subing.d.ts.map +1 -1
- package/types/did/keri/resolving.d.ts +5 -10
- package/types/did/keri/resolving.d.ts.map +1 -1
- package/types/did/webs/artifacts.d.ts +5 -5
- package/types/did/webs/artifacts.d.ts.map +1 -1
- package/types/did/webs/designated-aliases.d.ts +6 -5
- package/types/did/webs/designated-aliases.d.ts.map +1 -1
- package/types/did/webs/documenting.d.ts +6 -5
- package/types/did/webs/documenting.d.ts.map +1 -1
- package/types/did/webs/resolving.d.ts +13 -3
- package/types/did/webs/resolving.d.ts.map +1 -1
- package/types/library/index.d.ts +1 -1
- package/types/library/index.d.ts.map +1 -1
- package/types/npm/cli.d.ts +1 -1
- package/types/npm/cli.d.ts.map +1 -1
- package/types/npm/index.d.ts +1 -1
- package/types/npm/index.d.ts.map +1 -1
- package/types/runtime/index.d.ts +109 -76
- package/types/runtime/index.d.ts.map +1 -1
- package/types/vdr/backer-state.d.ts +22 -0
- package/types/vdr/backer-state.d.ts.map +1 -0
- package/types/vdr/credential-tsn-record.d.ts +13 -0
- package/types/vdr/credential-tsn-record.d.ts.map +1 -0
- package/types/vdr/credentialing.d.ts +16 -27
- package/types/vdr/credentialing.d.ts.map +1 -1
- package/types/vdr/eventing.d.ts +66 -23
- package/types/vdr/eventing.d.ts.map +1 -1
- package/types/vdr/registry-tsn-record.d.ts +6 -0
- package/types/vdr/registry-tsn-record.d.ts.map +1 -0
- package/types/vdr/revoking.d.ts +18 -0
- package/types/vdr/revoking.d.ts.map +1 -0
- package/types/vdr/tel-anchor.d.ts +10 -0
- package/types/vdr/tel-anchor.d.ts.map +1 -0
- package/types/vdr/tel-publication.d.ts +49 -0
- package/types/vdr/tel-publication.d.ts.map +1 -0
- package/types/vdr/tsn-query.d.ts +9 -4
- package/types/vdr/tsn-query.d.ts.map +1 -1
- package/types/{app/version.d.ts → version.d.ts} +2 -2
- package/types/version.d.ts.map +1 -0
- package/esm/keri/npm/src/app/abortable.js +0 -27
- package/esm/keri/npm/src/app/agent-runtime.js +0 -638
- package/esm/keri/npm/src/app/cesr-egress.js +0 -308
- package/esm/keri/npm/src/app/cesr-output.js +0 -12
- package/esm/keri/npm/src/app/cli/annotate.js +0 -24
- package/esm/keri/npm/src/app/cli/challenge.js +0 -168
- package/esm/keri/npm/src/app/cli/common/displaying.js +0 -43
- package/esm/keri/npm/src/app/cli/common/parsing.js +0 -215
- package/esm/keri/npm/src/app/cli/incept.js +0 -187
- package/esm/keri/npm/src/app/cli/index.js +0 -36
- package/esm/keri/npm/src/app/cli/init.js +0 -155
- package/esm/keri/npm/src/app/cli/interact.js +0 -72
- package/esm/keri/npm/src/app/cli/ipex.js +0 -453
- package/esm/keri/npm/src/app/cli/multisig.js +0 -474
- package/esm/keri/npm/src/app/cli/query.js +0 -143
- package/esm/keri/npm/src/app/cli/rotate.js +0 -171
- package/esm/keri/npm/src/app/cli/vc.js +0 -284
- package/esm/keri/npm/src/app/cli/verifier.js +0 -96
- package/esm/keri/npm/src/app/credential-workflows.js +0 -431
- package/esm/keri/npm/src/app/cue-delivery.js +0 -171
- package/esm/keri/npm/src/app/cue-preparation.js +0 -124
- package/esm/keri/npm/src/app/cue-route.js +0 -64
- package/esm/keri/npm/src/app/cue-runtime.js +0 -104
- package/esm/keri/npm/src/app/direct-reply-delivery.js +0 -282
- package/esm/keri/npm/src/app/essr.js +0 -235
- package/esm/keri/npm/src/app/exchanging.js +0 -1219
- package/esm/keri/npm/src/app/forwarding.js +0 -1346
- package/esm/keri/npm/src/app/group-members.js +0 -37
- package/esm/keri/npm/src/app/grouping.js +0 -534
- package/esm/keri/npm/src/app/httping.js +0 -130
- package/esm/keri/npm/src/app/ipex-credentialing.js +0 -245
- package/esm/keri/npm/src/app/ipex-grouping.js +0 -317
- package/esm/keri/npm/src/app/ipex-v2.js +0 -542
- package/esm/keri/npm/src/app/mailbox-sse.js +0 -257
- package/esm/keri/npm/src/app/multisig-workflows.js +0 -537
- package/esm/keri/npm/src/app/oobi-replies.js +0 -194
- package/esm/keri/npm/src/app/query-replies.js +0 -181
- package/esm/keri/npm/src/app/querying.js +0 -1040
- package/esm/keri/npm/src/app/reactor.js +0 -517
- package/esm/keri/npm/src/app/reply-streams.js +0 -304
- package/esm/keri/npm/src/app/respondant.js +0 -173
- package/esm/keri/npm/src/app/runtime-deliveries.js +0 -510
- package/esm/keri/npm/src/app/runtime-services.js +0 -25
- package/esm/keri/npm/src/app/signaling.js +0 -388
- package/esm/keri/npm/src/app/stored-replies.js +0 -85
- package/esm/keri/npm/src/app/tcp-egress.js +0 -334
- package/esm/keri/npm/src/app/verifier-agent.js +0 -461
- package/esm/keri/npm/src/app/witnessing.js +0 -956
- package/esm/keri/npm/src/core/cue-admission.js +0 -419
- package/esm/keri/npm/src/core/index.js +0 -23
- package/esm/keri/npm/src/core/kever-decisions.js +0 -63
- package/esm/keri/npm/src/core/kram-handoff.js +0 -148
- package/esm/keri/npm/src/core/kram-staging.js +0 -211
- package/esm/keri/npm/src/core/kraming.js +0 -99
- package/esm/keri/npm/src/db/exchange-nests.js +0 -175
- package/esm/keri/npm/src/db/exchange-records.js +0 -7
- package/esm/keri/npm/src/db/kram-snapshots.js +0 -216
- package/esm/keri/npm/src/db/mailbox-inbox.js +0 -206
- package/esm/keri/npm/src/db/outboxing.js +0 -371
- package/esm/keri/npm/src/db/payload-archive.js +0 -402
- package/esm/keri/npm/src/db/payload-store.js +0 -416
- package/esm/keri/npm/src/db/payload-view.js +0 -23
- package/esm/keri/npm/src/db/verifier-cueing.js +0 -132
- package/esm/keri/npm/src/vdr/credential-tsn.js +0 -218
- package/esm/keri/npm/src/vdr/registry-tsn.js +0 -218
- package/types/app/abortable.d.ts +0 -11
- package/types/app/abortable.d.ts.map +0 -1
- package/types/app/agent-runtime.d.ts +0 -284
- package/types/app/agent-runtime.d.ts.map +0 -1
- package/types/app/authenticating.d.ts +0 -36
- package/types/app/authenticating.d.ts.map +0 -1
- package/types/app/byte-source.d.ts +0 -16
- package/types/app/byte-source.d.ts.map +0 -1
- package/types/app/cesr-egress.d.ts +0 -48
- package/types/app/cesr-egress.d.ts.map +0 -1
- package/types/app/cesr-http.d.ts.map +0 -1
- package/types/app/cesr-output.d.ts +0 -5
- package/types/app/cesr-output.d.ts.map +0 -1
- package/types/app/challenging.d.ts.map +0 -1
- package/types/app/cli/aid.d.ts.map +0 -1
- package/types/app/cli/annotate-color.d.ts.map +0 -1
- package/types/app/cli/annotate.d.ts.map +0 -1
- package/types/app/cli/benchmark.d.ts.map +0 -1
- package/types/app/cli/challenge.d.ts.map +0 -1
- package/types/app/cli/common/context.d.ts.map +0 -1
- package/types/app/cli/common/displaying.d.ts +0 -12
- package/types/app/cli/common/displaying.d.ts.map +0 -1
- package/types/app/cli/common/existing.d.ts.map +0 -1
- package/types/app/cli/common/parsing.d.ts.map +0 -1
- package/types/app/cli/common/rendering.d.ts.map +0 -1
- package/types/app/cli/common/witness-auth.d.ts.map +0 -1
- package/types/app/cli/db-dump.d.ts.map +0 -1
- package/types/app/cli/delegate.d.ts +0 -26
- package/types/app/cli/delegate.d.ts.map +0 -1
- package/types/app/cli/did.d.ts.map +0 -1
- package/types/app/cli/ends.d.ts.map +0 -1
- package/types/app/cli/exchange.d.ts.map +0 -1
- package/types/app/cli/export.d.ts.map +0 -1
- package/types/app/cli/incept.d.ts.map +0 -1
- package/types/app/cli/index.d.ts +0 -37
- package/types/app/cli/index.d.ts.map +0 -1
- package/types/app/cli/init.d.ts.map +0 -1
- package/types/app/cli/interact.d.ts.map +0 -1
- package/types/app/cli/ipex.d.ts +0 -20
- package/types/app/cli/ipex.d.ts.map +0 -1
- package/types/app/cli/list.d.ts.map +0 -1
- package/types/app/cli/loc.d.ts.map +0 -1
- package/types/app/cli/multisig.d.ts +0 -12
- package/types/app/cli/multisig.d.ts.map +0 -1
- package/types/app/cli/notifications.d.ts.map +0 -1
- package/types/app/cli/oobi.d.ts.map +0 -1
- package/types/app/cli/output.d.ts.map +0 -1
- package/types/app/cli/query.d.ts +0 -12
- package/types/app/cli/query.d.ts.map +0 -1
- package/types/app/cli/rotate.d.ts.map +0 -1
- package/types/app/cli/saidify.d.ts.map +0 -1
- package/types/app/cli/sign.d.ts.map +0 -1
- package/types/app/cli/vc.d.ts +0 -20
- package/types/app/cli/vc.d.ts.map +0 -1
- package/types/app/cli/verifier.d.ts +0 -3
- package/types/app/cli/verifier.d.ts.map +0 -1
- package/types/app/cli/verify.d.ts.map +0 -1
- package/types/app/configing.d.ts.map +0 -1
- package/types/app/credential-workflows.d.ts +0 -118
- package/types/app/credential-workflows.d.ts.map +0 -1
- package/types/app/cue-delivery.d.ts +0 -30
- package/types/app/cue-delivery.d.ts.map +0 -1
- package/types/app/cue-preparation.d.ts +0 -25
- package/types/app/cue-preparation.d.ts.map +0 -1
- package/types/app/cue-route.d.ts +0 -19
- package/types/app/cue-route.d.ts.map +0 -1
- package/types/app/cue-runtime.d.ts +0 -46
- package/types/app/cue-runtime.d.ts.map +0 -1
- package/types/app/delegating.d.ts.map +0 -1
- package/types/app/direct-reply-delivery.d.ts +0 -38
- package/types/app/direct-reply-delivery.d.ts.map +0 -1
- package/types/app/endpoint-roleing.d.ts +0 -41
- package/types/app/endpoint-roleing.d.ts.map +0 -1
- package/types/app/essr.d.ts +0 -72
- package/types/app/essr.d.ts.map +0 -1
- package/types/app/exchanging.d.ts +0 -245
- package/types/app/exchanging.d.ts.map +0 -1
- package/types/app/forwarding.d.ts +0 -411
- package/types/app/forwarding.d.ts.map +0 -1
- package/types/app/group-members.d.ts +0 -12
- package/types/app/group-members.d.ts.map +0 -1
- package/types/app/grouping.d.ts +0 -150
- package/types/app/grouping.d.ts.map +0 -1
- package/types/app/habbing.d.ts.map +0 -1
- package/types/app/httping.d.ts +0 -42
- package/types/app/httping.d.ts.map +0 -1
- package/types/app/ipex-building.d.ts.map +0 -1
- package/types/app/ipex-credentialing.d.ts.map +0 -1
- package/types/app/ipex-graph.d.ts +0 -30
- package/types/app/ipex-graph.d.ts.map +0 -1
- package/types/app/ipex-grouping.d.ts +0 -51
- package/types/app/ipex-grouping.d.ts.map +0 -1
- package/types/app/ipex-v2.d.ts +0 -51
- package/types/app/ipex-v2.d.ts.map +0 -1
- package/types/app/ipexing.d.ts.map +0 -1
- package/types/app/keeping.d.ts.map +0 -1
- package/types/app/mailbox-director.d.ts +0 -159
- package/types/app/mailbox-director.d.ts.map +0 -1
- package/types/app/mailbox-sse.d.ts +0 -38
- package/types/app/mailbox-sse.d.ts.map +0 -1
- package/types/app/mailboxing.d.ts.map +0 -1
- package/types/app/multisig-workflows.d.ts +0 -59
- package/types/app/multisig-workflows.d.ts.map +0 -1
- package/types/app/notifying.d.ts.map +0 -1
- package/types/app/oobi-replies.d.ts +0 -18
- package/types/app/oobi-replies.d.ts.map +0 -1
- package/types/app/oobiery.d.ts.map +0 -1
- package/types/app/organizing.d.ts.map +0 -1
- package/types/app/parsering.d.ts +0 -106
- package/types/app/parsering.d.ts.map +0 -1
- package/types/app/protocol-host-policy.d.ts.map +0 -1
- package/types/app/query-replies.d.ts +0 -45
- package/types/app/query-replies.d.ts.map +0 -1
- package/types/app/querying.d.ts +0 -294
- package/types/app/querying.d.ts.map +0 -1
- package/types/app/reactor.d.ts +0 -171
- package/types/app/reactor.d.ts.map +0 -1
- package/types/app/reply-streams.d.ts +0 -51
- package/types/app/reply-streams.d.ts.map +0 -1
- package/types/app/respondant.d.ts +0 -48
- package/types/app/respondant.d.ts.map +0 -1
- package/types/app/runtime-deliveries.d.ts +0 -67
- package/types/app/runtime-deliveries.d.ts.map +0 -1
- package/types/app/runtime-services.d.ts +0 -29
- package/types/app/runtime-services.d.ts.map +0 -1
- package/types/app/runtime-turn.d.ts.map +0 -1
- package/types/app/schema-resolving.d.ts.map +0 -1
- package/types/app/signaling.d.ts +0 -96
- package/types/app/signaling.d.ts.map +0 -1
- package/types/app/socket-source.d.ts.map +0 -1
- package/types/app/stored-replies.d.ts +0 -18
- package/types/app/stored-replies.d.ts.map +0 -1
- package/types/app/tcp-egress.d.ts +0 -87
- package/types/app/tcp-egress.d.ts.map +0 -1
- package/types/app/verifier-agent.d.ts +0 -91
- package/types/app/verifier-agent.d.ts.map +0 -1
- package/types/app/verifying.d.ts.map +0 -1
- package/types/app/version.d.ts.map +0 -1
- package/types/app/witnessing.d.ts +0 -227
- package/types/app/witnessing.d.ts.map +0 -1
- package/types/core/cue-admission.d.ts +0 -74
- package/types/core/cue-admission.d.ts.map +0 -1
- package/types/core/eventing.d.ts.map +0 -1
- package/types/core/exchange-proofing.d.ts.map +0 -1
- package/types/core/index.d.ts +0 -24
- package/types/core/index.d.ts.map +0 -1
- package/types/core/kever-decisions.d.ts.map +0 -1
- package/types/core/kever.d.ts.map +0 -1
- package/types/core/kram-auth.d.ts.map +0 -1
- package/types/core/kram-handoff.d.ts +0 -45
- package/types/core/kram-handoff.d.ts.map +0 -1
- package/types/core/kram-policy.d.ts.map +0 -1
- package/types/core/kram-signatures.d.ts.map +0 -1
- package/types/core/kram-staging.d.ts +0 -36
- package/types/core/kram-staging.d.ts.map +0 -1
- package/types/core/kram-time.d.ts.map +0 -1
- package/types/core/kraming.d.ts +0 -46
- package/types/core/kraming.d.ts.map +0 -1
- package/types/core/mailbox-topics.d.ts.map +0 -1
- package/types/core/protocol-exchanging.d.ts.map +0 -1
- package/types/core/witnesses.d.ts.map +0 -1
- package/types/db/exchange-nests.d.ts +0 -39
- package/types/db/exchange-nests.d.ts.map +0 -1
- package/types/db/exchange-records.d.ts +0 -35
- package/types/db/exchange-records.d.ts.map +0 -1
- package/types/db/kel-replay.d.ts.map +0 -1
- package/types/db/kram-factors.d.ts.map +0 -1
- package/types/db/kram-snapshots.d.ts +0 -23
- package/types/db/kram-snapshots.d.ts.map +0 -1
- package/types/db/mailbox-inbox.d.ts +0 -72
- package/types/db/mailbox-inbox.d.ts.map +0 -1
- package/types/db/mailboxing.d.ts.map +0 -1
- package/types/db/outboxing.d.ts +0 -182
- package/types/db/outboxing.d.ts.map +0 -1
- package/types/db/payload-archive.d.ts +0 -70
- package/types/db/payload-archive.d.ts.map +0 -1
- package/types/db/payload-store.d.ts +0 -40
- package/types/db/payload-store.d.ts.map +0 -1
- package/types/db/payload-view.d.ts +0 -4
- package/types/db/payload-view.d.ts.map +0 -1
- package/types/db/tel-replay.d.ts.map +0 -1
- package/types/db/verifier-cueing.d.ts +0 -46
- package/types/db/verifier-cueing.d.ts.map +0 -1
- package/types/db/witness-replay.d.ts.map +0 -1
- package/types/vdr/credential-tsn.d.ts +0 -18
- package/types/vdr/credential-tsn.d.ts.map +0 -1
- package/types/vdr/registry-tsn.d.ts +0 -23
- package/types/vdr/registry-tsn.d.ts.map +0 -1
- /package/esm/keri/npm/src/app/{schema-resolving.js → credentials/schema-resolving.js} +0 -0
- /package/esm/keri/npm/src/app/{protocol-host-policy.js → protocol/protocol-host-policy.js} +0 -0
- /package/esm/keri/npm/src/app/{runtime-turn.js → runtime/runtime-turn.js} +0 -0
- /package/esm/keri/npm/src/{app/cli → cli}/common/rendering.js +0 -0
- /package/esm/keri/npm/src/{app/cli → cli/tools}/annotate-color.js +0 -0
- /package/esm/keri/npm/src/core/{witnesses.js → kel/witnesses.js} +0 -0
- /package/esm/keri/npm/src/core/{kram-auth.js → mailbox/kram-auth.js} +0 -0
- /package/esm/keri/npm/src/core/{mailbox-topics.js → mailbox/mailbox-topics.js} +0 -0
- /package/types/app/{runtime-turn.d.ts → runtime/runtime-turn.d.ts} +0 -0
- /package/types/{app/cli → cli}/common/rendering.d.ts +0 -0
- /package/types/{app/cli → cli/endpoints}/loc.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/aid.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/export.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/list.d.ts +0 -0
- /package/types/{app/cli → cli/messaging}/notifications.d.ts +0 -0
- /package/types/{app/cli → cli}/output.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/annotate-color.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/annotate.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/benchmark.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/saidify.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/verify.d.ts +0 -0
- /package/types/core/{witnesses.d.ts → kel/witnesses.d.ts} +0 -0
- /package/types/core/{mailbox-topics.d.ts → mailbox/mailbox-topics.d.ts} +0 -0
|
@@ -1,19 +1,31 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
/**
|
|
1
|
+
/** Transport readers. Each operation owns its reader and joins cancellation. */
|
|
2
|
+
/** Cancellation and chunk size for byte-array and file sources. */
|
|
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();
|
|
8
14
|
for (let offset = 0; offset < bytes.byteLength; offset += maxChunkBytes) {
|
|
9
15
|
signal?.throwIfAborted();
|
|
10
|
-
//
|
|
16
|
+
// Give the consumer an independent chunk of the resident value.
|
|
11
17
|
yield bytes.slice(offset, offset + maxChunkBytes);
|
|
12
18
|
}
|
|
13
19
|
}
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
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
|
+
*/
|
|
28
|
+
export async function* streamBytes(stream, { signal } = {}) {
|
|
17
29
|
signal?.throwIfAborted();
|
|
18
30
|
if (!stream)
|
|
19
31
|
return;
|
|
@@ -34,10 +46,6 @@ export async function* streamBytes(stream, { signal, maxChunkBytes = 1024 * 1024
|
|
|
34
46
|
signal?.throwIfAborted();
|
|
35
47
|
if (done)
|
|
36
48
|
return;
|
|
37
|
-
// Counting the backing allocation prevents a tiny view from retaining a huge input buffer.
|
|
38
|
-
if (value.buffer.byteLength > maxChunkBytes) {
|
|
39
|
-
throw new ResourceLimitError(`Transport chunk exceeds ${maxChunkBytes} bytes`);
|
|
40
|
-
}
|
|
41
49
|
if (value.length > 0)
|
|
42
50
|
yield value;
|
|
43
51
|
}
|
|
@@ -73,7 +81,14 @@ export async function* streamBytes(stream, { signal, maxChunkBytes = 1024 * 1024
|
|
|
73
81
|
throw errors[0];
|
|
74
82
|
}
|
|
75
83
|
}
|
|
76
|
-
/**
|
|
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
|
+
*/
|
|
77
92
|
export async function* fileBytes(path, { signal, maxChunkBytes = 64 * 1024 } = {}) {
|
|
78
93
|
checkLimit(maxChunkBytes);
|
|
79
94
|
signal?.throwIfAborted();
|
|
@@ -104,18 +119,20 @@ export async function* fileBytes(path, { signal, maxChunkBytes = 64 * 1024 } = {
|
|
|
104
119
|
close();
|
|
105
120
|
}
|
|
106
121
|
}
|
|
107
|
-
/**
|
|
108
|
-
|
|
109
|
-
|
|
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
|
+
*/
|
|
128
|
+
export async function collectBytes(source) {
|
|
110
129
|
let bytes = new Uint8Array(0);
|
|
111
130
|
let size = 0;
|
|
112
131
|
for await (const chunk of source) {
|
|
113
|
-
if (chunk.length > limit - size)
|
|
114
|
-
throw new ResourceLimitError(`Input exceeds ${limit} bytes`);
|
|
115
132
|
const end = size + chunk.length;
|
|
116
133
|
if (end > bytes.length) {
|
|
117
134
|
// Geometric growth bounds copies without retaining one metadata entry per transport chunk.
|
|
118
|
-
const grown = new Uint8Array(Math.
|
|
135
|
+
const grown = new Uint8Array(Math.max(end, 64 * 1024, bytes.length * 2));
|
|
119
136
|
grown.set(bytes.subarray(0, size));
|
|
120
137
|
bytes = grown;
|
|
121
138
|
}
|
|
@@ -124,8 +141,13 @@ export async function collectBytes(source, limit) {
|
|
|
124
141
|
}
|
|
125
142
|
return bytes.subarray(0, size);
|
|
126
143
|
}
|
|
127
|
-
/**
|
|
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
|
+
*/
|
|
128
150
|
function checkLimit(limit) {
|
|
129
151
|
if (!Number.isSafeInteger(limit) || limit < 1)
|
|
130
|
-
throw new RangeError("
|
|
152
|
+
throw new RangeError("Chunk size must be a positive safe integer");
|
|
131
153
|
}
|
|
@@ -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 {
|
|
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.
|
|
@@ -91,7 +48,7 @@ export function buildCesrRequest(message, { bodyMode = DEFAULT_CESR_BODY_MODE, c
|
|
|
91
48
|
* This is the right helper for endpoints that accept an already assembled CESR
|
|
92
49
|
* payload or a multi-message CESR stream in the body.
|
|
93
50
|
*/
|
|
94
|
-
export function buildCesrStreamRequest(bytes, { destination
|
|
51
|
+
export function buildCesrStreamRequest(bytes, { destination } = {}) {
|
|
95
52
|
const headers = {
|
|
96
53
|
"Content-Type": CESR_CONTENT_TYPE,
|
|
97
54
|
};
|
|
@@ -106,38 +63,37 @@ 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
|
-
export function requestBytes(req,
|
|
69
|
+
export function requestBytes(req, options = {}) {
|
|
113
70
|
return read();
|
|
114
|
-
/** Acquire the body lazily,
|
|
71
|
+
/** Acquire the body lazily, then append detached attachments in their original order. */
|
|
115
72
|
async function* read() {
|
|
116
|
-
const
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
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 });
|
|
123
81
|
}
|
|
124
|
-
const
|
|
82
|
+
const attachment = req.headers.get(CESR_ATTACHMENT_HEADER);
|
|
83
|
+
const tail = attachment && cesr
|
|
125
84
|
? textEncoder.encode(attachment)
|
|
126
85
|
: null;
|
|
127
|
-
if (tail && tail.length > maxHeaderBytes) {
|
|
128
|
-
throw new ResourceLimitError(`CESR attachment header exceeds ${maxHeaderBytes} bytes`);
|
|
129
|
-
}
|
|
130
86
|
yield* streamBytes(req.body, { signal: req.signal, ...options });
|
|
131
87
|
(options.signal ?? req.signal).throwIfAborted();
|
|
132
88
|
if (tail?.length)
|
|
133
89
|
yield tail;
|
|
134
90
|
}
|
|
135
91
|
}
|
|
136
|
-
/** Collect a
|
|
137
|
-
export async function readCesrRequestBytes(req
|
|
92
|
+
/** Collect a finite administrative/receipt request; generic ingress uses requestBytes directly. */
|
|
93
|
+
export async function readCesrRequestBytes(req) {
|
|
138
94
|
let failed = false, failure;
|
|
139
95
|
try {
|
|
140
|
-
return await collectBytes(requestBytes(req)
|
|
96
|
+
return await collectBytes(requestBytes(req));
|
|
141
97
|
}
|
|
142
98
|
catch (error) {
|
|
143
99
|
failed = true;
|
|
@@ -190,7 +146,7 @@ export async function readMailboxAdminRequest(req) {
|
|
|
190
146
|
};
|
|
191
147
|
}
|
|
192
148
|
if (isMultipartFormContentType(contentType)) {
|
|
193
|
-
const bytes = await collectBytes(streamBytes(req.body, { signal: req.signal })
|
|
149
|
+
const bytes = await collectBytes(streamBytes(req.body, { signal: req.signal }));
|
|
194
150
|
const form = await new Response(bytes, { headers: { "content-type": contentType } }).formData();
|
|
195
151
|
const kel = readRequiredMailboxAdminField(form, "kel");
|
|
196
152
|
const rpy = readRequiredMailboxAdminField(form, "rpy");
|
|
@@ -206,8 +162,7 @@ export async function readMailboxAdminRequest(req) {
|
|
|
206
162
|
/** Parse and return the first CESR message in one request body. */
|
|
207
163
|
export function inspectCesrRequest(bytes) {
|
|
208
164
|
try {
|
|
209
|
-
const
|
|
210
|
-
const serder = parseSerder(bytes.slice(0, smellage.size), smellage);
|
|
165
|
+
const serder = parseBytes(bytes)[0]?.body;
|
|
211
166
|
return serder instanceof SerderKERI ? serder : null;
|
|
212
167
|
}
|
|
213
168
|
catch {
|
|
@@ -221,7 +176,7 @@ export async function inspectCesrTerminalMessage(bytes) {
|
|
|
221
176
|
/** Parse one entire CESR request body and return every message plus the last. */
|
|
222
177
|
export async function inspectCesrStream(bytes) {
|
|
223
178
|
const frames = await parseBytes(bytes);
|
|
224
|
-
|
|
179
|
+
{
|
|
225
180
|
const messages = frames.map((frame) => {
|
|
226
181
|
requireFlatFrame(frame, "HTTP message inspection");
|
|
227
182
|
const { body } = frame;
|
|
@@ -231,11 +186,6 @@ export async function inspectCesrStream(bytes) {
|
|
|
231
186
|
});
|
|
232
187
|
return { messages, terminal: messages.at(-1) ?? null };
|
|
233
188
|
}
|
|
234
|
-
finally {
|
|
235
|
-
// Inspection returns body metadata only; it must not retain discarded attachment payloads.
|
|
236
|
-
for (const frame of frames)
|
|
237
|
-
await discardFrame(frame);
|
|
238
|
-
}
|
|
239
189
|
}
|
|
240
190
|
/** Copy a byte view into a standalone `ArrayBuffer` for Fetch request bodies. */
|
|
241
191
|
function arrayBufferFromBytes(bytes) {
|