keri-ts 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/esm/keri/npm/src/acdc/chaining.js +213 -0
- package/esm/keri/npm/src/acdc/dhking.js +716 -0
- package/esm/keri/npm/src/acdc/messaging.js +2 -0
- package/esm/keri/npm/src/acdc/observing.js +40 -7
- package/esm/keri/npm/src/acdc/regbasing.js +13 -2
- package/esm/keri/npm/src/acdc/regengine.js +71 -23
- package/esm/keri/npm/src/acdc/regeventing.js +163 -44
- package/esm/keri/npm/src/acdc/registering.js +93 -14
- package/esm/keri/npm/src/acdc/relating.js +59 -0
- package/esm/keri/npm/src/acdc/salting.js +720 -0
- package/esm/keri/npm/src/acdc/scheming.js +94 -39
- package/esm/keri/npm/src/acdc/unblinding.js +1042 -0
- package/esm/keri/npm/src/app/{authenticating.js → bootstrap/authenticating.js} +39 -18
- package/esm/keri/npm/src/app/bootstrap/bootstrapping.js +109 -0
- package/esm/keri/npm/src/app/{oobi-replies.js → bootstrap/oobi-replies.js} +8 -6
- package/esm/keri/npm/src/app/{oobiery.js → bootstrap/oobiery.js} +161 -75
- package/esm/keri/npm/src/app/credentials/credential-importing.js +201 -0
- package/esm/keri/npm/src/app/credentials/credential-proposals.js +120 -0
- package/esm/keri/npm/src/app/credentials/credential-revoking.js +165 -0
- package/esm/keri/npm/src/app/credentials/credential-workflows.js +365 -0
- package/esm/keri/npm/src/app/credentials/tel-publishing.js +27 -0
- package/esm/keri/npm/src/app/{verifying.js → credentials/verifying.js} +41 -6
- package/esm/keri/npm/src/app/delivery/forwarding.js +600 -0
- package/esm/keri/npm/src/app/delivery/introducing.js +68 -0
- package/esm/keri/npm/src/app/{reply-streams.js → delivery/reply-streams.js} +52 -7
- package/esm/keri/npm/src/app/delivery/respondant.js +159 -0
- package/esm/keri/npm/src/app/{stored-replies.js → delivery/stored-replies.js} +4 -4
- package/esm/keri/npm/src/app/exchanges/essr.js +111 -0
- package/esm/keri/npm/src/app/exchanges/exchange-messaging.js +66 -0
- package/esm/keri/npm/src/app/exchanges/exchanging.js +1354 -0
- package/esm/keri/npm/src/app/{configing.js → identity/configing.js} +4 -4
- package/esm/keri/npm/src/app/{delegating.js → identity/delegating.js} +99 -29
- package/esm/keri/npm/src/app/{endpoint-roleing.js → identity/endpoint-roleing.js} +36 -36
- package/esm/keri/npm/src/app/{habbing.js → identity/habbing.js} +232 -150
- package/esm/keri/npm/src/app/{keeping.js → identity/keeping.js} +60 -56
- package/esm/keri/npm/src/app/{organizing.js → identity/organizing.js} +47 -21
- package/esm/keri/npm/src/app/ipex/ipex-building.js +162 -0
- package/esm/keri/npm/src/app/{ipex-credentialing.js → ipex/ipex-credentialing.js} +142 -31
- package/esm/keri/npm/src/app/ipex/ipex-graph.js +243 -0
- package/esm/keri/npm/src/app/ipex/ipex-grouping.js +664 -0
- package/esm/keri/npm/src/app/{ipex-node-authentication.js → ipex/ipex-node-authentication.js} +83 -6
- package/esm/keri/npm/src/app/ipex/ipex-v2.js +692 -0
- package/esm/keri/npm/src/app/{ipexing.js → ipex/ipexing.js} +58 -1
- package/esm/keri/npm/src/app/mailbox/forward-handler.js +228 -0
- package/esm/keri/npm/src/app/{mailbox-director.js → mailbox/mailbox-director.js} +120 -15
- package/esm/keri/npm/src/app/mailbox/mailbox-poller.js +305 -0
- package/esm/keri/npm/src/app/mailbox/mailbox-sse.js +254 -0
- package/esm/keri/npm/src/app/{mailboxing.js → mailbox/mailboxing.js} +118 -67
- package/esm/keri/npm/src/app/mailbox/topic-routing.js +54 -0
- package/esm/keri/npm/src/app/multisig/group-members.js +173 -0
- package/esm/keri/npm/src/app/{grouping.js → multisig/grouping.js} +384 -70
- package/esm/keri/npm/src/app/multisig/multisig-messaging.js +164 -0
- package/esm/keri/npm/src/app/multisig/multisig-workflows.js +821 -0
- package/esm/keri/npm/src/app/{notifying.js → notifications/notifying.js} +8 -14
- package/esm/keri/npm/src/app/{signaling.js → notifications/signaling.js} +1 -1
- package/esm/keri/npm/src/app/{parsering.js → protocol/parsering.js} +86 -18
- package/esm/keri/npm/src/app/protocol/protocol-processing.js +245 -0
- package/esm/keri/npm/src/app/protocol/reactor.js +55 -0
- package/esm/keri/npm/src/app/{query-replies.js → queries/query-replies.js} +57 -6
- package/esm/keri/npm/src/app/queries/querying.js +306 -0
- package/esm/keri/npm/src/app/queries/witness-inquisitor.js +415 -0
- package/esm/keri/npm/src/app/{abortable.js → runtime/abortable.js} +43 -4
- package/esm/keri/npm/src/app/runtime/agent-runtime.js +633 -0
- package/esm/keri/npm/src/app/runtime/cue-runtime.js +61 -0
- package/esm/keri/npm/src/app/runtime/runtime-clock.js +6 -0
- package/esm/keri/npm/src/app/{byte-source.js → transport/byte-source.js} +36 -6
- package/esm/keri/npm/src/app/transport/cesr-egress.js +317 -0
- package/esm/keri/npm/src/app/{cesr-http.js → transport/cesr-http.js} +20 -55
- package/esm/keri/npm/src/app/transport/http-client.js +172 -0
- package/esm/keri/npm/src/app/transport/http-messenger.js +52 -0
- package/esm/keri/npm/src/app/transport/http-stream-messenger.js +60 -0
- package/esm/keri/npm/src/app/transport/httping.js +57 -0
- package/esm/keri/npm/src/app/transport/message-source.js +77 -0
- package/esm/keri/npm/src/app/transport/messengering.js +68 -0
- package/esm/keri/npm/src/app/{socket-source.js → transport/socket-source.js} +39 -2
- package/esm/keri/npm/src/app/transport/tcp-egress.js +377 -0
- package/esm/keri/npm/src/app/transport/tcp-messenger.js +162 -0
- package/esm/keri/npm/src/app/transport/tcp-stream-messenger.js +40 -0
- package/esm/keri/npm/src/app/transport/transport-error.js +14 -0
- package/esm/keri/npm/src/app/witness/http-endpoints.js +185 -0
- package/esm/keri/npm/src/app/witness/ingress.js +148 -0
- package/esm/keri/npm/src/app/witness/receipt-client.js +248 -0
- package/esm/keri/npm/src/app/witness/receipt-messages.js +29 -0
- package/esm/keri/npm/src/app/witness/receipting.js +323 -0
- package/esm/keri/npm/src/app/witness/registration.js +50 -0
- package/esm/keri/npm/src/cli/common/bootstrap.js +12 -0
- package/esm/keri/npm/src/{app/cli → cli}/common/context.js +47 -6
- package/esm/keri/npm/src/{app/cli → cli}/common/existing.js +9 -11
- package/esm/keri/npm/src/cli/common/parsing.js +279 -0
- package/esm/keri/npm/src/cli/common/passcode.js +66 -0
- package/esm/keri/npm/src/cli/common/tel-completion.js +24 -0
- package/esm/keri/npm/src/{app/cli → cli}/common/witness-auth.js +2 -2
- package/esm/keri/npm/src/cli/credentials/ipex.js +702 -0
- package/esm/keri/npm/src/cli/credentials/vc.js +399 -0
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/did.js +63 -36
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/ends.js +33 -28
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/loc.js +16 -11
- package/esm/keri/npm/src/cli/endpoints/oobi-clean.js +134 -0
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/oobi.js +35 -32
- package/esm/keri/npm/src/{app/cli → cli/identity}/aid.js +8 -7
- package/esm/keri/npm/src/{app/cli → cli/identity}/challenge.js +60 -49
- package/esm/keri/npm/src/{app/cli → cli/identity}/delegate.js +61 -26
- package/esm/keri/npm/src/{app/cli → cli/identity}/export.js +9 -8
- package/esm/keri/npm/src/cli/identity/incept.js +181 -0
- package/esm/keri/npm/src/cli/identity/init.js +153 -0
- package/esm/keri/npm/src/cli/identity/interact.js +84 -0
- package/esm/keri/npm/src/{app/cli → cli/identity}/list.js +7 -6
- package/esm/keri/npm/src/{app/cli → cli/identity}/rotate.js +60 -57
- package/esm/keri/npm/src/cli/index.js +38 -0
- package/esm/keri/npm/src/{app/cli → cli/messaging}/exchange.js +24 -22
- package/esm/keri/npm/src/{app/cli → cli/messaging}/multisig.js +165 -156
- package/esm/keri/npm/src/{app/cli → cli/messaging}/notifications.js +26 -22
- package/esm/keri/npm/src/{app/cli → cli}/output.js +1 -1
- package/esm/keri/npm/src/{app/cli → cli/tools}/annotate.js +10 -4
- package/esm/keri/npm/src/{app/cli → cli/tools}/benchmark.js +15 -4
- package/esm/keri/npm/src/{app/cli → cli/tools}/db-dump.js +11 -10
- package/esm/keri/npm/src/{app/cli → cli/tools}/saidify.js +3 -2
- package/esm/keri/npm/src/{app/cli → cli/tools}/sign.js +16 -10
- package/esm/keri/npm/src/{app/cli → cli/tools}/verify.js +10 -10
- package/esm/keri/npm/src/core/attachment-countering.js +31 -1
- package/esm/keri/npm/src/core/{exchange-proofing.js → exchange/exchange-proofing.js} +32 -2
- package/esm/keri/npm/src/core/{protocol-exchanging.js → exchange/protocol-exchanging.js} +26 -4
- package/esm/keri/npm/src/core/genus-framing.js +44 -0
- package/esm/keri/npm/src/core/{eventing.js → kel/eventing.js} +57 -25
- package/esm/keri/npm/src/core/{kever-decisions.js → kel/kever-decisions.js} +24 -12
- package/esm/keri/npm/src/core/{kever.js → kel/kever.js} +4 -4
- package/esm/keri/npm/src/core/logger.js +3 -3
- package/esm/keri/npm/src/core/{kram-policy.js → mailbox/kram-policy.js} +14 -4
- package/esm/keri/npm/src/core/{kram-pruning.js → mailbox/kram-pruning.js} +3 -3
- package/esm/keri/npm/src/core/{kram-signatures.js → mailbox/kram-signatures.js} +1 -1
- package/esm/keri/npm/src/core/{kram-staging.js → mailbox/kram-staging.js} +6 -6
- package/esm/keri/npm/src/core/{kram-time.js → mailbox/kram-time.js} +4 -3
- package/esm/keri/npm/src/core/{kraming.js → mailbox/kraming.js} +2 -2
- package/esm/keri/npm/src/core/protocol-eventing.js +1 -1
- package/esm/keri/npm/src/core/protocol-serialization.js +9 -34
- package/esm/keri/npm/src/core/routing.js +52 -17
- package/esm/keri/npm/src/db/baser-defaults.js +11 -0
- package/esm/keri/npm/src/db/basing.js +89 -232
- package/esm/keri/npm/src/db/core/lmdber.js +102 -63
- package/esm/keri/npm/src/db/escrowing.js +73 -49
- package/esm/keri/npm/src/db/exchange/exchange-nests.js +54 -0
- package/esm/keri/npm/src/db/exchange/exchange-records.js +7 -0
- package/esm/keri/npm/src/db/index.js +5 -4
- package/esm/keri/npm/src/db/keeping.js +122 -3
- package/esm/keri/npm/src/db/{kram-factors.js → mailbox/kram-factors.js} +1 -1
- package/esm/keri/npm/src/db/{mailboxing.js → mailbox/mailboxing.js} +3 -3
- package/esm/keri/npm/src/db/reger.js +38 -29
- package/esm/keri/npm/src/db/{kel-replay.js → replay/kel-replay.js} +11 -4
- package/esm/keri/npm/src/db/{tel-replay.js → replay/tel-replay.js} +34 -0
- package/esm/keri/npm/src/db/{witness-replay.js → replay/witness-replay.js} +2 -2
- package/esm/keri/npm/src/db/subing.js +2 -3
- package/esm/keri/npm/src/did/webs/artifacts.js +15 -18
- package/esm/keri/npm/src/did/webs/designated-aliases.js +5 -7
- package/esm/keri/npm/src/did/webs/resolving.js +73 -56
- package/esm/keri/npm/src/library/index.js +1 -1
- package/esm/keri/npm/src/npm/cli.js +1 -1
- package/esm/keri/npm/src/npm/index.js +1 -1
- package/esm/keri/npm/src/runtime/index.js +79 -47
- package/esm/keri/npm/src/vdr/backer-state.js +55 -0
- package/esm/keri/npm/src/vdr/credential-tsn-record.js +59 -0
- package/esm/keri/npm/src/vdr/credentialing.js +84 -82
- package/esm/keri/npm/src/vdr/eventing.js +592 -204
- package/esm/keri/npm/src/vdr/registry-tsn-record.js +55 -0
- package/esm/keri/npm/src/vdr/revoking.js +90 -0
- package/esm/keri/npm/src/vdr/tel-anchor.js +29 -0
- package/esm/keri/npm/src/vdr/tel-publication.js +178 -0
- package/esm/keri/npm/src/{app/version.js → version.js} +2 -2
- package/package.json +5 -3
- package/types/_dnt.polyfills.d.ts +6 -0
- package/types/_dnt.polyfills.d.ts.map +1 -1
- package/types/acdc/chaining.d.ts +35 -0
- package/types/acdc/chaining.d.ts.map +1 -0
- package/types/acdc/dhking.d.ts +136 -0
- package/types/acdc/dhking.d.ts.map +1 -0
- package/types/acdc/messaging.d.ts.map +1 -1
- package/types/acdc/observing.d.ts +18 -7
- package/types/acdc/observing.d.ts.map +1 -1
- package/types/acdc/regbasing.d.ts +3 -1
- package/types/acdc/regbasing.d.ts.map +1 -1
- package/types/acdc/regengine.d.ts +9 -4
- package/types/acdc/regengine.d.ts.map +1 -1
- package/types/acdc/regeventing.d.ts +24 -7
- package/types/acdc/regeventing.d.ts.map +1 -1
- package/types/acdc/registering.d.ts +22 -6
- package/types/acdc/registering.d.ts.map +1 -1
- package/types/acdc/registraring.d.ts +1 -1
- package/types/acdc/registraring.d.ts.map +1 -1
- package/types/acdc/relating.d.ts +21 -0
- package/types/acdc/relating.d.ts.map +1 -0
- package/types/acdc/salting.d.ts +241 -0
- package/types/acdc/salting.d.ts.map +1 -0
- package/types/acdc/scheming.d.ts +1 -1
- package/types/acdc/scheming.d.ts.map +1 -1
- package/types/acdc/unblinding.d.ts +150 -0
- package/types/acdc/unblinding.d.ts.map +1 -0
- package/types/app/bootstrap/authenticating.d.ts +54 -0
- package/types/app/bootstrap/authenticating.d.ts.map +1 -0
- package/types/app/bootstrap/bootstrapping.d.ts +45 -0
- package/types/app/bootstrap/bootstrapping.d.ts.map +1 -0
- package/types/app/{oobi-replies.d.ts → bootstrap/oobi-replies.d.ts} +1 -1
- package/types/app/bootstrap/oobi-replies.d.ts.map +1 -0
- package/types/app/{oobiery.d.ts → bootstrap/oobiery.d.ts} +98 -25
- package/types/app/bootstrap/oobiery.d.ts.map +1 -0
- package/types/app/credentials/credential-importing.d.ts +29 -0
- package/types/app/credentials/credential-importing.d.ts.map +1 -0
- package/types/app/credentials/credential-proposals.d.ts +27 -0
- package/types/app/credentials/credential-proposals.d.ts.map +1 -0
- package/types/app/credentials/credential-revoking.d.ts +44 -0
- package/types/app/credentials/credential-revoking.d.ts.map +1 -0
- package/types/app/credentials/credential-workflows.d.ts +149 -0
- package/types/app/credentials/credential-workflows.d.ts.map +1 -0
- package/types/app/{schema-resolving.d.ts → credentials/schema-resolving.d.ts} +2 -2
- package/types/app/credentials/schema-resolving.d.ts.map +1 -0
- package/types/app/credentials/tel-publishing.d.ts +16 -0
- package/types/app/credentials/tel-publishing.d.ts.map +1 -0
- package/types/app/{verifying.d.ts → credentials/verifying.d.ts} +19 -7
- package/types/app/credentials/verifying.d.ts.map +1 -0
- package/types/app/delivery/forwarding.d.ts +227 -0
- package/types/app/delivery/forwarding.d.ts.map +1 -0
- package/types/app/delivery/introducing.d.ts +21 -0
- package/types/app/delivery/introducing.d.ts.map +1 -0
- package/types/app/delivery/reply-streams.d.ts +49 -0
- package/types/app/delivery/reply-streams.d.ts.map +1 -0
- package/types/app/delivery/respondant.d.ts +52 -0
- package/types/app/delivery/respondant.d.ts.map +1 -0
- package/types/app/{stored-replies.d.ts → delivery/stored-replies.d.ts} +1 -1
- package/types/app/delivery/stored-replies.d.ts.map +1 -0
- package/types/app/exchanges/essr.d.ts +53 -0
- package/types/app/exchanges/essr.d.ts.map +1 -0
- package/types/app/exchanges/exchange-messaging.d.ts +73 -0
- package/types/app/exchanges/exchange-messaging.d.ts.map +1 -0
- package/types/app/exchanges/exchanging.d.ts +379 -0
- package/types/app/exchanges/exchanging.d.ts.map +1 -0
- package/types/app/{challenging.d.ts → identity/challenging.d.ts} +3 -3
- package/types/app/identity/challenging.d.ts.map +1 -0
- package/types/app/{configing.d.ts → identity/configing.d.ts} +1 -1
- package/types/app/identity/configing.d.ts.map +1 -0
- package/types/app/{delegating.d.ts → identity/delegating.d.ts} +52 -15
- package/types/app/identity/delegating.d.ts.map +1 -0
- package/types/app/{endpoint-roleing.d.ts → identity/endpoint-roleing.d.ts} +24 -13
- package/types/app/identity/endpoint-roleing.d.ts.map +1 -0
- package/types/app/{habbing.d.ts → identity/habbing.d.ts} +73 -32
- package/types/app/identity/habbing.d.ts.map +1 -0
- package/types/app/{keeping.d.ts → identity/keeping.d.ts} +19 -5
- package/types/app/identity/keeping.d.ts.map +1 -0
- package/types/app/{organizing.d.ts → identity/organizing.d.ts} +19 -4
- package/types/app/identity/organizing.d.ts.map +1 -0
- package/types/app/ipex/ipex-building.d.ts +30 -0
- package/types/app/ipex/ipex-building.d.ts.map +1 -0
- package/types/app/{ipex-credentialing.d.ts → ipex/ipex-credentialing.d.ts} +33 -6
- package/types/app/ipex/ipex-credentialing.d.ts.map +1 -0
- package/types/app/ipex/ipex-graph.d.ts +28 -0
- package/types/app/ipex/ipex-graph.d.ts.map +1 -0
- package/types/app/ipex/ipex-grouping.d.ts +112 -0
- package/types/app/ipex/ipex-grouping.d.ts.map +1 -0
- package/types/app/{ipex-node-authentication.d.ts → ipex/ipex-node-authentication.d.ts} +10 -5
- package/types/app/ipex/ipex-node-authentication.d.ts.map +1 -0
- package/types/app/ipex/ipex-v2.d.ts +71 -0
- package/types/app/ipex/ipex-v2.d.ts.map +1 -0
- package/types/app/{ipexing.d.ts → ipex/ipexing.d.ts} +21 -6
- package/types/app/ipex/ipexing.d.ts.map +1 -0
- package/types/app/mailbox/forward-handler.d.ts +68 -0
- package/types/app/mailbox/forward-handler.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-director.d.ts +252 -0
- package/types/app/mailbox/mailbox-director.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-poller.d.ts +149 -0
- package/types/app/mailbox/mailbox-poller.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-sse.d.ts +63 -0
- package/types/app/mailbox/mailbox-sse.d.ts.map +1 -0
- package/types/app/{mailboxing.d.ts → mailbox/mailboxing.d.ts} +92 -40
- package/types/app/mailbox/mailboxing.d.ts.map +1 -0
- package/types/app/mailbox/topic-routing.d.ts +18 -0
- package/types/app/mailbox/topic-routing.d.ts.map +1 -0
- package/types/app/multisig/group-members.d.ts +60 -0
- package/types/app/multisig/group-members.d.ts.map +1 -0
- package/types/app/{grouping.d.ts → multisig/grouping.d.ts} +142 -19
- package/types/app/multisig/grouping.d.ts.map +1 -0
- package/types/app/multisig/multisig-messaging.d.ts +97 -0
- package/types/app/multisig/multisig-messaging.d.ts.map +1 -0
- package/types/app/multisig/multisig-workflows.d.ts +85 -0
- package/types/app/multisig/multisig-workflows.d.ts.map +1 -0
- package/types/app/{notifying.d.ts → notifications/notifying.d.ts} +4 -5
- package/types/app/notifications/notifying.d.ts.map +1 -0
- package/types/app/notifications/signaling.d.ts.map +1 -0
- package/types/app/{parsering.d.ts → protocol/parsering.d.ts} +40 -11
- package/types/app/protocol/parsering.d.ts.map +1 -0
- package/types/app/{protocol-host-policy.d.ts → protocol/protocol-host-policy.d.ts} +1 -10
- package/types/app/protocol/protocol-host-policy.d.ts.map +1 -0
- package/types/app/protocol/protocol-processing.d.ts +140 -0
- package/types/app/protocol/protocol-processing.d.ts.map +1 -0
- package/types/app/protocol/reactor.d.ts +43 -0
- package/types/app/protocol/reactor.d.ts.map +1 -0
- package/types/app/queries/query-replies.d.ts +78 -0
- package/types/app/queries/query-replies.d.ts.map +1 -0
- package/types/app/queries/querying.d.ts +155 -0
- package/types/app/queries/querying.d.ts.map +1 -0
- package/types/app/queries/witness-inquisitor.d.ts +150 -0
- package/types/app/queries/witness-inquisitor.d.ts.map +1 -0
- package/types/app/runtime/abortable.d.ts +39 -0
- package/types/app/runtime/abortable.d.ts.map +1 -0
- package/types/app/runtime/agent-runtime.d.ts +348 -0
- package/types/app/runtime/agent-runtime.d.ts.map +1 -0
- package/types/app/runtime/cue-runtime.d.ts +33 -0
- package/types/app/runtime/cue-runtime.d.ts.map +1 -0
- package/types/app/runtime/runtime-clock.d.ts +28 -0
- package/types/app/runtime/runtime-clock.d.ts.map +1 -0
- package/types/app/runtime/runtime-turn.d.ts.map +1 -0
- package/types/app/transport/byte-source.d.ts +41 -0
- package/types/app/transport/byte-source.d.ts.map +1 -0
- package/types/app/transport/cesr-egress.d.ts +117 -0
- package/types/app/transport/cesr-egress.d.ts.map +1 -0
- package/types/app/{cesr-http.d.ts → transport/cesr-http.d.ts} +4 -27
- package/types/app/transport/cesr-http.d.ts.map +1 -0
- package/types/app/transport/http-client.d.ts +99 -0
- package/types/app/transport/http-client.d.ts.map +1 -0
- package/types/app/transport/http-messenger.d.ts +37 -0
- package/types/app/transport/http-messenger.d.ts.map +1 -0
- package/types/app/transport/http-stream-messenger.d.ts +30 -0
- package/types/app/transport/http-stream-messenger.d.ts.map +1 -0
- package/types/app/transport/httping.d.ts +19 -0
- package/types/app/transport/httping.d.ts.map +1 -0
- package/types/app/transport/message-source.d.ts +22 -0
- package/types/app/transport/message-source.d.ts.map +1 -0
- package/types/app/transport/messengering.d.ts +41 -0
- package/types/app/transport/messengering.d.ts.map +1 -0
- package/types/app/{socket-source.d.ts → transport/socket-source.d.ts} +8 -0
- package/types/app/transport/socket-source.d.ts.map +1 -0
- package/types/app/transport/tcp-egress.d.ts +118 -0
- package/types/app/transport/tcp-egress.d.ts.map +1 -0
- package/types/app/transport/tcp-messenger.d.ts +69 -0
- package/types/app/transport/tcp-messenger.d.ts.map +1 -0
- package/types/app/transport/tcp-stream-messenger.d.ts +25 -0
- package/types/app/transport/tcp-stream-messenger.d.ts.map +1 -0
- package/types/app/transport/transport-error.d.ts +12 -0
- package/types/app/transport/transport-error.d.ts.map +1 -0
- package/types/app/witness/http-endpoints.d.ts +77 -0
- package/types/app/witness/http-endpoints.d.ts.map +1 -0
- package/types/app/witness/ingress.d.ts +65 -0
- package/types/app/witness/ingress.d.ts.map +1 -0
- package/types/app/witness/receipt-client.d.ts +82 -0
- package/types/app/witness/receipt-client.d.ts.map +1 -0
- package/types/app/witness/receipt-messages.d.ts +21 -0
- package/types/app/witness/receipt-messages.d.ts.map +1 -0
- package/types/app/witness/receipting.d.ts +117 -0
- package/types/app/witness/receipting.d.ts.map +1 -0
- package/types/app/witness/registration.d.ts +27 -0
- package/types/app/witness/registration.d.ts.map +1 -0
- package/types/cli/common/bootstrap.d.ts +5 -0
- package/types/cli/common/bootstrap.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/context.d.ts +10 -5
- package/types/cli/common/context.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/existing.d.ts +2 -4
- package/types/cli/common/existing.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/parsing.d.ts +26 -15
- package/types/cli/common/parsing.d.ts.map +1 -0
- package/types/cli/common/passcode.d.ts +9 -0
- package/types/cli/common/passcode.d.ts.map +1 -0
- package/types/cli/common/rendering.d.ts.map +1 -0
- package/types/cli/common/tel-completion.d.ts +8 -0
- package/types/cli/common/tel-completion.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/witness-auth.d.ts +1 -1
- package/types/cli/common/witness-auth.d.ts.map +1 -0
- package/types/cli/credentials/ipex.d.ts +110 -0
- package/types/cli/credentials/ipex.d.ts.map +1 -0
- package/types/cli/credentials/vc.d.ts +42 -0
- package/types/cli/credentials/vc.d.ts.map +1 -0
- package/types/{app/cli → cli/endpoints}/did.d.ts +5 -1
- package/types/cli/endpoints/did.d.ts.map +1 -0
- package/types/{app/cli → cli/endpoints}/ends.d.ts +9 -1
- package/types/cli/endpoints/ends.d.ts.map +1 -0
- package/types/cli/endpoints/loc.d.ts.map +1 -0
- package/types/cli/endpoints/oobi-clean.d.ts +8 -0
- package/types/cli/endpoints/oobi-clean.d.ts.map +1 -0
- package/types/{app/cli → cli/endpoints}/oobi.d.ts +2 -0
- package/types/cli/endpoints/oobi.d.ts.map +1 -0
- package/types/cli/identity/aid.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/challenge.d.ts +5 -1
- package/types/cli/identity/challenge.d.ts.map +1 -0
- package/types/cli/identity/delegate.d.ts.map +1 -0
- package/types/cli/identity/export.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/incept.d.ts +2 -0
- package/types/cli/identity/incept.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/init.d.ts +2 -0
- package/types/cli/identity/init.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/interact.d.ts +2 -0
- package/types/cli/identity/interact.d.ts.map +1 -0
- package/types/cli/identity/list.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/rotate.d.ts +9 -2
- package/types/cli/identity/rotate.d.ts.map +1 -0
- package/types/cli/index.d.ts +39 -0
- package/types/cli/index.d.ts.map +1 -0
- package/types/{app/cli → cli/messaging}/exchange.d.ts +3 -1
- package/types/cli/messaging/exchange.d.ts.map +1 -0
- package/types/cli/messaging/multisig.d.ts +29 -0
- package/types/cli/messaging/multisig.d.ts.map +1 -0
- package/types/cli/messaging/notifications.d.ts.map +1 -0
- package/types/cli/output.d.ts.map +1 -0
- package/types/cli/tools/annotate-color.d.ts.map +1 -0
- package/types/cli/tools/annotate.d.ts.map +1 -0
- package/types/cli/tools/benchmark.d.ts.map +1 -0
- package/types/cli/tools/db-dump.d.ts.map +1 -0
- package/types/cli/tools/saidify.d.ts.map +1 -0
- package/types/{app/cli → cli/tools}/sign.d.ts +2 -0
- package/types/cli/tools/sign.d.ts.map +1 -0
- package/types/cli/tools/verify.d.ts.map +1 -0
- package/types/core/attachment-countering.d.ts +10 -1
- package/types/core/attachment-countering.d.ts.map +1 -1
- package/types/core/cues.d.ts +78 -21
- package/types/core/cues.d.ts.map +1 -1
- package/types/core/{exchange-proofing.d.ts → exchange/exchange-proofing.d.ts} +9 -2
- package/types/core/exchange/exchange-proofing.d.ts.map +1 -0
- package/types/core/{protocol-exchanging.d.ts → exchange/protocol-exchanging.d.ts} +10 -2
- package/types/core/exchange/protocol-exchanging.d.ts.map +1 -0
- package/types/core/genus-framing.d.ts +12 -0
- package/types/core/genus-framing.d.ts.map +1 -0
- package/types/core/{eventing.d.ts → kel/eventing.d.ts} +22 -10
- package/types/core/kel/eventing.d.ts.map +1 -0
- package/types/core/{kever-decisions.d.ts → kel/kever-decisions.d.ts} +21 -8
- package/types/core/kel/kever-decisions.d.ts.map +1 -0
- package/types/core/{kever.d.ts → kel/kever.d.ts} +2 -2
- package/types/core/kel/kever.d.ts.map +1 -0
- package/types/core/kel/witnesses.d.ts.map +1 -0
- package/types/core/logger.d.ts +1 -1
- package/types/core/logger.d.ts.map +1 -1
- package/types/core/{kram-auth.d.ts → mailbox/kram-auth.d.ts} +2 -2
- package/types/core/mailbox/kram-auth.d.ts.map +1 -0
- package/types/core/{kram-policy.d.ts → mailbox/kram-policy.d.ts} +2 -2
- package/types/core/mailbox/kram-policy.d.ts.map +1 -0
- package/types/core/{kram-pruning.d.ts → mailbox/kram-pruning.d.ts} +1 -1
- package/types/core/mailbox/kram-pruning.d.ts.map +1 -0
- package/types/core/{kram-signatures.d.ts → mailbox/kram-signatures.d.ts} +3 -3
- package/types/core/mailbox/kram-signatures.d.ts.map +1 -0
- package/types/core/{kram-staging.d.ts → mailbox/kram-staging.d.ts} +2 -2
- package/types/core/mailbox/kram-staging.d.ts.map +1 -0
- package/types/core/{kram-time.d.ts → mailbox/kram-time.d.ts} +2 -2
- package/types/core/mailbox/kram-time.d.ts.map +1 -0
- package/types/core/{kraming.d.ts → mailbox/kraming.d.ts} +5 -5
- package/types/core/mailbox/kraming.d.ts.map +1 -0
- package/types/core/mailbox/mailbox-topics.d.ts.map +1 -0
- package/types/core/protocol-eventing.d.ts.map +1 -1
- package/types/core/protocol-serialization.d.ts +1 -1
- package/types/core/protocol-serialization.d.ts.map +1 -1
- package/types/core/records.d.ts +1 -1
- package/types/core/records.d.ts.map +1 -1
- package/types/core/routing.d.ts +24 -4
- package/types/core/routing.d.ts.map +1 -1
- package/types/db/baser-defaults.d.ts +5 -0
- package/types/db/baser-defaults.d.ts.map +1 -0
- package/types/db/basing.d.ts +32 -44
- package/types/db/basing.d.ts.map +1 -1
- package/types/db/core/lmdber.d.ts +18 -13
- package/types/db/core/lmdber.d.ts.map +1 -1
- package/types/db/escrowing.d.ts +3 -1
- package/types/db/escrowing.d.ts.map +1 -1
- package/types/db/exchange/exchange-nests.d.ts +12 -0
- package/types/db/exchange/exchange-nests.d.ts.map +1 -0
- package/types/db/exchange/exchange-records.d.ts +38 -0
- package/types/db/exchange/exchange-records.d.ts.map +1 -0
- package/types/db/index.d.ts +5 -4
- package/types/db/index.d.ts.map +1 -1
- package/types/db/keeping.d.ts +19 -1
- package/types/db/keeping.d.ts.map +1 -1
- package/types/db/{kram-factors.d.ts → mailbox/kram-factors.d.ts} +2 -2
- package/types/db/mailbox/kram-factors.d.ts.map +1 -0
- package/types/db/{mailboxing.d.ts → mailbox/mailboxing.d.ts} +2 -2
- package/types/db/mailbox/mailboxing.d.ts.map +1 -0
- package/types/db/reger.d.ts +7 -6
- package/types/db/reger.d.ts.map +1 -1
- package/types/db/{kel-replay.d.ts → replay/kel-replay.d.ts} +1 -2
- package/types/db/replay/kel-replay.d.ts.map +1 -0
- package/types/db/{tel-replay.d.ts → replay/tel-replay.d.ts} +11 -1
- package/types/db/replay/tel-replay.d.ts.map +1 -0
- package/types/db/{witness-replay.d.ts → replay/witness-replay.d.ts} +1 -1
- package/types/db/replay/witness-replay.d.ts.map +1 -0
- package/types/db/subing.d.ts.map +1 -1
- package/types/did/keri/resolving.d.ts +1 -1
- package/types/did/keri/resolving.d.ts.map +1 -1
- package/types/did/webs/artifacts.d.ts +5 -5
- package/types/did/webs/artifacts.d.ts.map +1 -1
- package/types/did/webs/designated-aliases.d.ts +1 -2
- package/types/did/webs/designated-aliases.d.ts.map +1 -1
- package/types/did/webs/documenting.d.ts +1 -1
- package/types/did/webs/documenting.d.ts.map +1 -1
- package/types/did/webs/resolving.d.ts +13 -9
- package/types/did/webs/resolving.d.ts.map +1 -1
- package/types/library/index.d.ts +1 -1
- package/types/library/index.d.ts.map +1 -1
- package/types/npm/cli.d.ts +1 -1
- package/types/npm/cli.d.ts.map +1 -1
- package/types/npm/index.d.ts +1 -1
- package/types/npm/index.d.ts.map +1 -1
- package/types/runtime/index.d.ts +86 -51
- package/types/runtime/index.d.ts.map +1 -1
- package/types/vdr/backer-state.d.ts +22 -0
- package/types/vdr/backer-state.d.ts.map +1 -0
- package/types/vdr/credential-tsn-record.d.ts +13 -0
- package/types/vdr/credential-tsn-record.d.ts.map +1 -0
- package/types/vdr/credentialing.d.ts +16 -17
- package/types/vdr/credentialing.d.ts.map +1 -1
- package/types/vdr/eventing.d.ts +60 -18
- package/types/vdr/eventing.d.ts.map +1 -1
- package/types/vdr/registry-tsn-record.d.ts +6 -0
- package/types/vdr/registry-tsn-record.d.ts.map +1 -0
- package/types/vdr/revoking.d.ts +18 -0
- package/types/vdr/revoking.d.ts.map +1 -0
- package/types/vdr/tel-anchor.d.ts +10 -0
- package/types/vdr/tel-anchor.d.ts.map +1 -0
- package/types/vdr/tel-publication.d.ts +49 -0
- package/types/vdr/tel-publication.d.ts.map +1 -0
- package/types/vdr/tsn-query.d.ts +1 -1
- package/types/vdr/tsn-query.d.ts.map +1 -1
- package/types/{app/version.d.ts → version.d.ts} +2 -2
- package/types/version.d.ts.map +1 -0
- package/esm/keri/npm/src/app/agent-runtime.js +0 -544
- package/esm/keri/npm/src/app/cesr-egress.js +0 -294
- package/esm/keri/npm/src/app/cli/common/displaying.js +0 -43
- package/esm/keri/npm/src/app/cli/common/parsing.js +0 -215
- package/esm/keri/npm/src/app/cli/incept.js +0 -185
- package/esm/keri/npm/src/app/cli/index.js +0 -36
- package/esm/keri/npm/src/app/cli/init.js +0 -149
- package/esm/keri/npm/src/app/cli/interact.js +0 -72
- package/esm/keri/npm/src/app/cli/ipex.js +0 -519
- package/esm/keri/npm/src/app/cli/query.js +0 -142
- package/esm/keri/npm/src/app/cli/vc.js +0 -283
- package/esm/keri/npm/src/app/cli/verifier.js +0 -92
- package/esm/keri/npm/src/app/credential-workflows.js +0 -409
- package/esm/keri/npm/src/app/cue-runtime.js +0 -38
- package/esm/keri/npm/src/app/essr.js +0 -170
- package/esm/keri/npm/src/app/exchanging.js +0 -1001
- package/esm/keri/npm/src/app/forwarding.js +0 -936
- package/esm/keri/npm/src/app/group-members.js +0 -37
- package/esm/keri/npm/src/app/httping.js +0 -162
- package/esm/keri/npm/src/app/ipex-graph.js +0 -407
- package/esm/keri/npm/src/app/ipex-grouping.js +0 -276
- package/esm/keri/npm/src/app/ipex-v2.js +0 -438
- package/esm/keri/npm/src/app/mailbox-sse.js +0 -240
- package/esm/keri/npm/src/app/multisig-workflows.js +0 -457
- package/esm/keri/npm/src/app/querying.js +0 -775
- package/esm/keri/npm/src/app/reactor.js +0 -394
- package/esm/keri/npm/src/app/respondant.js +0 -358
- package/esm/keri/npm/src/app/runtime-services.js +0 -22
- package/esm/keri/npm/src/app/tcp-conversation.js +0 -85
- package/esm/keri/npm/src/app/tcp-egress.js +0 -251
- package/esm/keri/npm/src/app/verifier-agent.js +0 -443
- package/esm/keri/npm/src/app/witnessing.js +0 -914
- package/esm/keri/npm/src/core/index.js +0 -23
- package/esm/keri/npm/src/db/exchange-nests.js +0 -80
- package/esm/keri/npm/src/db/exchange-records.js +0 -7
- package/esm/keri/npm/src/db/payload-archive.js +0 -402
- package/esm/keri/npm/src/db/payload-store.js +0 -406
- package/esm/keri/npm/src/db/payload-view.js +0 -23
- package/esm/keri/npm/src/db/verifier-cueing.js +0 -132
- package/esm/keri/npm/src/vdr/credential-tsn.js +0 -230
- package/esm/keri/npm/src/vdr/registry-tsn.js +0 -217
- package/types/app/abortable.d.ts +0 -13
- package/types/app/abortable.d.ts.map +0 -1
- package/types/app/agent-runtime.d.ts +0 -221
- package/types/app/agent-runtime.d.ts.map +0 -1
- package/types/app/authenticating.d.ts +0 -36
- package/types/app/authenticating.d.ts.map +0 -1
- package/types/app/byte-source.d.ts +0 -16
- package/types/app/byte-source.d.ts.map +0 -1
- package/types/app/cesr-egress.d.ts +0 -45
- package/types/app/cesr-egress.d.ts.map +0 -1
- package/types/app/cesr-http.d.ts.map +0 -1
- package/types/app/challenging.d.ts.map +0 -1
- package/types/app/cli/aid.d.ts.map +0 -1
- package/types/app/cli/annotate-color.d.ts.map +0 -1
- package/types/app/cli/annotate.d.ts.map +0 -1
- package/types/app/cli/benchmark.d.ts.map +0 -1
- package/types/app/cli/challenge.d.ts.map +0 -1
- package/types/app/cli/common/context.d.ts.map +0 -1
- package/types/app/cli/common/displaying.d.ts +0 -12
- package/types/app/cli/common/displaying.d.ts.map +0 -1
- package/types/app/cli/common/existing.d.ts.map +0 -1
- package/types/app/cli/common/parsing.d.ts.map +0 -1
- package/types/app/cli/common/rendering.d.ts.map +0 -1
- package/types/app/cli/common/witness-auth.d.ts.map +0 -1
- package/types/app/cli/db-dump.d.ts.map +0 -1
- package/types/app/cli/delegate.d.ts.map +0 -1
- package/types/app/cli/did.d.ts.map +0 -1
- package/types/app/cli/ends.d.ts.map +0 -1
- package/types/app/cli/exchange.d.ts.map +0 -1
- package/types/app/cli/export.d.ts.map +0 -1
- package/types/app/cli/incept.d.ts.map +0 -1
- package/types/app/cli/index.d.ts +0 -37
- package/types/app/cli/index.d.ts.map +0 -1
- package/types/app/cli/init.d.ts.map +0 -1
- package/types/app/cli/interact.d.ts.map +0 -1
- package/types/app/cli/ipex.d.ts +0 -20
- package/types/app/cli/ipex.d.ts.map +0 -1
- package/types/app/cli/list.d.ts.map +0 -1
- package/types/app/cli/loc.d.ts.map +0 -1
- package/types/app/cli/multisig.d.ts +0 -12
- package/types/app/cli/multisig.d.ts.map +0 -1
- package/types/app/cli/notifications.d.ts.map +0 -1
- package/types/app/cli/oobi.d.ts.map +0 -1
- package/types/app/cli/output.d.ts.map +0 -1
- package/types/app/cli/query.d.ts +0 -12
- package/types/app/cli/query.d.ts.map +0 -1
- package/types/app/cli/rotate.d.ts.map +0 -1
- package/types/app/cli/saidify.d.ts.map +0 -1
- package/types/app/cli/sign.d.ts.map +0 -1
- package/types/app/cli/vc.d.ts +0 -20
- package/types/app/cli/vc.d.ts.map +0 -1
- package/types/app/cli/verifier.d.ts +0 -3
- package/types/app/cli/verifier.d.ts.map +0 -1
- package/types/app/cli/verify.d.ts.map +0 -1
- package/types/app/configing.d.ts.map +0 -1
- package/types/app/credential-workflows.d.ts +0 -113
- package/types/app/credential-workflows.d.ts.map +0 -1
- package/types/app/cue-runtime.d.ts +0 -12
- package/types/app/cue-runtime.d.ts.map +0 -1
- package/types/app/delegating.d.ts.map +0 -1
- package/types/app/endpoint-roleing.d.ts.map +0 -1
- package/types/app/essr.d.ts +0 -58
- package/types/app/essr.d.ts.map +0 -1
- package/types/app/exchanging.d.ts +0 -233
- package/types/app/exchanging.d.ts.map +0 -1
- package/types/app/forwarding.d.ts +0 -352
- package/types/app/forwarding.d.ts.map +0 -1
- package/types/app/group-members.d.ts +0 -12
- package/types/app/group-members.d.ts.map +0 -1
- package/types/app/grouping.d.ts.map +0 -1
- package/types/app/habbing.d.ts.map +0 -1
- package/types/app/httping.d.ts +0 -49
- package/types/app/httping.d.ts.map +0 -1
- package/types/app/ipex-credentialing.d.ts.map +0 -1
- package/types/app/ipex-graph.d.ts +0 -49
- package/types/app/ipex-graph.d.ts.map +0 -1
- package/types/app/ipex-grouping.d.ts +0 -43
- package/types/app/ipex-grouping.d.ts.map +0 -1
- package/types/app/ipex-node-authentication.d.ts.map +0 -1
- package/types/app/ipex-v2.d.ts +0 -46
- package/types/app/ipex-v2.d.ts.map +0 -1
- package/types/app/ipexing.d.ts.map +0 -1
- package/types/app/keeping.d.ts.map +0 -1
- package/types/app/mailbox-director.d.ts +0 -140
- package/types/app/mailbox-director.d.ts.map +0 -1
- package/types/app/mailbox-sse.d.ts +0 -32
- package/types/app/mailbox-sse.d.ts.map +0 -1
- package/types/app/mailboxing.d.ts.map +0 -1
- package/types/app/multisig-workflows.d.ts +0 -47
- package/types/app/multisig-workflows.d.ts.map +0 -1
- package/types/app/notifying.d.ts.map +0 -1
- package/types/app/oobi-replies.d.ts.map +0 -1
- package/types/app/oobiery.d.ts.map +0 -1
- package/types/app/organizing.d.ts.map +0 -1
- package/types/app/parsering.d.ts.map +0 -1
- package/types/app/protocol-host-policy.d.ts.map +0 -1
- package/types/app/query-replies.d.ts +0 -40
- package/types/app/query-replies.d.ts.map +0 -1
- package/types/app/querying.d.ts +0 -221
- package/types/app/querying.d.ts.map +0 -1
- package/types/app/reactor.d.ts +0 -138
- package/types/app/reactor.d.ts.map +0 -1
- package/types/app/reply-streams.d.ts +0 -20
- package/types/app/reply-streams.d.ts.map +0 -1
- package/types/app/respondant.d.ts +0 -63
- package/types/app/respondant.d.ts.map +0 -1
- package/types/app/runtime-services.d.ts +0 -26
- package/types/app/runtime-services.d.ts.map +0 -1
- package/types/app/runtime-turn.d.ts.map +0 -1
- package/types/app/schema-resolving.d.ts.map +0 -1
- package/types/app/signaling.d.ts.map +0 -1
- package/types/app/socket-source.d.ts.map +0 -1
- package/types/app/stored-replies.d.ts.map +0 -1
- package/types/app/tcp-conversation.d.ts +0 -27
- package/types/app/tcp-conversation.d.ts.map +0 -1
- package/types/app/tcp-egress.d.ts +0 -49
- package/types/app/tcp-egress.d.ts.map +0 -1
- package/types/app/verifier-agent.d.ts +0 -92
- package/types/app/verifier-agent.d.ts.map +0 -1
- package/types/app/verifying.d.ts.map +0 -1
- package/types/app/version.d.ts.map +0 -1
- package/types/app/witnessing.d.ts +0 -223
- package/types/app/witnessing.d.ts.map +0 -1
- package/types/core/eventing.d.ts.map +0 -1
- package/types/core/exchange-proofing.d.ts.map +0 -1
- package/types/core/index.d.ts +0 -24
- package/types/core/index.d.ts.map +0 -1
- package/types/core/kever-decisions.d.ts.map +0 -1
- package/types/core/kever.d.ts.map +0 -1
- package/types/core/kram-auth.d.ts.map +0 -1
- package/types/core/kram-policy.d.ts.map +0 -1
- package/types/core/kram-pruning.d.ts.map +0 -1
- package/types/core/kram-signatures.d.ts.map +0 -1
- package/types/core/kram-staging.d.ts.map +0 -1
- package/types/core/kram-time.d.ts.map +0 -1
- package/types/core/kraming.d.ts.map +0 -1
- package/types/core/mailbox-topics.d.ts.map +0 -1
- package/types/core/protocol-exchanging.d.ts.map +0 -1
- package/types/core/witnesses.d.ts.map +0 -1
- package/types/db/exchange-nests.d.ts +0 -15
- package/types/db/exchange-nests.d.ts.map +0 -1
- package/types/db/exchange-records.d.ts +0 -33
- package/types/db/exchange-records.d.ts.map +0 -1
- package/types/db/kel-replay.d.ts.map +0 -1
- package/types/db/kram-factors.d.ts.map +0 -1
- package/types/db/mailboxing.d.ts.map +0 -1
- package/types/db/payload-archive.d.ts +0 -70
- package/types/db/payload-archive.d.ts.map +0 -1
- package/types/db/payload-store.d.ts +0 -40
- package/types/db/payload-store.d.ts.map +0 -1
- package/types/db/payload-view.d.ts +0 -4
- package/types/db/payload-view.d.ts.map +0 -1
- package/types/db/tel-replay.d.ts.map +0 -1
- package/types/db/verifier-cueing.d.ts +0 -46
- package/types/db/verifier-cueing.d.ts.map +0 -1
- package/types/db/witness-replay.d.ts.map +0 -1
- package/types/vdr/credential-tsn.d.ts +0 -23
- package/types/vdr/credential-tsn.d.ts.map +0 -1
- package/types/vdr/registry-tsn.d.ts +0 -28
- package/types/vdr/registry-tsn.d.ts.map +0 -1
- /package/esm/keri/npm/src/app/{schema-resolving.js → credentials/schema-resolving.js} +0 -0
- /package/esm/keri/npm/src/app/{challenging.js → identity/challenging.js} +0 -0
- /package/esm/keri/npm/src/app/{protocol-host-policy.js → protocol/protocol-host-policy.js} +0 -0
- /package/esm/keri/npm/src/app/{runtime-turn.js → runtime/runtime-turn.js} +0 -0
- /package/esm/keri/npm/src/{app/cli → cli}/common/rendering.js +0 -0
- /package/esm/keri/npm/src/{app/cli → cli/tools}/annotate-color.js +0 -0
- /package/esm/keri/npm/src/core/{witnesses.js → kel/witnesses.js} +0 -0
- /package/esm/keri/npm/src/core/{kram-auth.js → mailbox/kram-auth.js} +0 -0
- /package/esm/keri/npm/src/core/{mailbox-topics.js → mailbox/mailbox-topics.js} +0 -0
- /package/types/app/{signaling.d.ts → notifications/signaling.d.ts} +0 -0
- /package/types/app/{runtime-turn.d.ts → runtime/runtime-turn.d.ts} +0 -0
- /package/types/{app/cli → cli}/common/rendering.d.ts +0 -0
- /package/types/{app/cli → cli/endpoints}/loc.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/aid.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/delegate.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/export.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/list.d.ts +0 -0
- /package/types/{app/cli → cli/messaging}/notifications.d.ts +0 -0
- /package/types/{app/cli → cli}/output.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/annotate-color.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/annotate.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/benchmark.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/db-dump.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/saidify.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/verify.d.ts +0 -0
- /package/types/core/{witnesses.d.ts → kel/witnesses.d.ts} +0 -0
- /package/types/core/{mailbox-topics.d.ts → mailbox/mailbox-topics.d.ts} +0 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/** Native HTTP request construction, byte I/O and joined attempt cleanup. */
|
|
2
|
+
import { call, resource, scoped } from "effection";
|
|
3
|
+
import { ValidationError } from "../../core/errors.js";
|
|
4
|
+
import { abortable } from "../runtime/abortable.js";
|
|
5
|
+
import { collectBytes } from "./byte-source.js";
|
|
6
|
+
import { TransportError } from "./transport-error.js";
|
|
7
|
+
/**
|
|
8
|
+
* Own the native Request, fetch and response reader for one attempt.
|
|
9
|
+
* Construction errors remain outside network classification. Native fetch/read
|
|
10
|
+
* errors retain their causes as TransportError. Consumer execution remains outside
|
|
11
|
+
* those catches; scope exit aborts and joins I/O before releasing its reader.
|
|
12
|
+
* Protocol consumers never receive the native Response.
|
|
13
|
+
*/
|
|
14
|
+
export class FetchHttpClient {
|
|
15
|
+
/**
|
|
16
|
+
* Consume finite bytes and finish the request scope before returning a completed response.
|
|
17
|
+
*
|
|
18
|
+
* @param url Absolute HTTP(S) URL; invalid URL/request construction fails before fetch.
|
|
19
|
+
* @param init Prepared method, headers, finite body and cancellation; omitted values use native Request defaults.
|
|
20
|
+
* @returns Status, headers and complete owned bytes after request cleanup.
|
|
21
|
+
* @throws Validation/construction errors remain caller errors; native fetch/body failures are TransportError with cause. Cancellation and cleanup failures remain visible.
|
|
22
|
+
*/
|
|
23
|
+
request(url, init = {}) {
|
|
24
|
+
const open = this.open.bind(this);
|
|
25
|
+
return scoped(function* () {
|
|
26
|
+
const response = yield* open(url, init);
|
|
27
|
+
const body = yield* abortable((signal) => collectBytes(response.body(signal)), init.signal ?? undefined);
|
|
28
|
+
return { status: response.status, ok: response.ok, headers: response.headers, body };
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Acquire headers and lend response bytes until the enclosing Effection scope ends.
|
|
33
|
+
* Validate Request before fetch; scope exit aborts unread I/O, joins pending
|
|
34
|
+
* fetch/read work and releases the reader. Consumer failures stay outside the
|
|
35
|
+
* transport catches. The response must not escape this scope.
|
|
36
|
+
*
|
|
37
|
+
* @param url Absolute HTTP(S) endpoint without embedded credentials.
|
|
38
|
+
* @param init Prepared method, headers, finite body and optional upstream cancellation; native Request defaults apply.
|
|
39
|
+
* @returns Metadata and one borrowed body source; status success does not prove body completion.
|
|
40
|
+
* @throws Validation errors precede network execution. Native fetch/read failures retain their cause in TransportError; cancellation and distinct cleanup failures propagate.
|
|
41
|
+
*/
|
|
42
|
+
open(url, init = {}) {
|
|
43
|
+
return resource(function* (provide) {
|
|
44
|
+
const controller = new AbortController();
|
|
45
|
+
const signal = init.signal ? AbortSignal.any([controller.signal, init.signal]) : controller.signal;
|
|
46
|
+
// These handles let scope teardown join native work before releasing the reader.
|
|
47
|
+
let fetching;
|
|
48
|
+
let reader;
|
|
49
|
+
let reading;
|
|
50
|
+
let failure;
|
|
51
|
+
let bodySignal;
|
|
52
|
+
/** A borrowing parser must interrupt its read before child teardown tries to join it. */
|
|
53
|
+
const abortBody = () => controller.abort(bodySignal.reason);
|
|
54
|
+
/**
|
|
55
|
+
* Classify only native fetch/read failures, preserving exact caller cancellation.
|
|
56
|
+
* @param cause Native rejection; consumer/parser exceptions never enter this helper.
|
|
57
|
+
* @param message Operation detail to combine with the endpoint URL.
|
|
58
|
+
* @returns Original cancellation reason or a TransportError retaining cause.
|
|
59
|
+
*/
|
|
60
|
+
const transportFailure = (cause, message) => signal.aborted && cause === signal.reason ? cause : new TransportError(`${message} for ${url}`, { cause });
|
|
61
|
+
try {
|
|
62
|
+
signal.throwIfAborted();
|
|
63
|
+
const endpoint = new URL(url);
|
|
64
|
+
if (!["http:", "https:"].includes(endpoint.protocol) || endpoint.username || endpoint.password) {
|
|
65
|
+
throw new ValidationError("HTTP output requires an HTTP(S) URL without credentials");
|
|
66
|
+
}
|
|
67
|
+
// Construction errors are caller errors, before native network classification.
|
|
68
|
+
const request = new Request(url, { ...init, signal, body: init.body });
|
|
69
|
+
fetching = fetch(request).catch((cause) => {
|
|
70
|
+
throw transportFailure(cause, "HTTP request failed");
|
|
71
|
+
});
|
|
72
|
+
const response = yield* call(() => fetching);
|
|
73
|
+
signal.throwIfAborted();
|
|
74
|
+
yield* provide({
|
|
75
|
+
status: response.status,
|
|
76
|
+
ok: response.ok,
|
|
77
|
+
headers: response.headers,
|
|
78
|
+
/**
|
|
79
|
+
* Borrow the native response reader for this request scope.
|
|
80
|
+
* Early iterator return aborts the request; the enclosing owner joins cleanup.
|
|
81
|
+
*
|
|
82
|
+
* @param consumerSignal Optional consumer cancellation; abort interrupts this request and any pending read.
|
|
83
|
+
* @returns A single-consumer iterable of byte chunks, valid only while the request scope remains open.
|
|
84
|
+
*/
|
|
85
|
+
body(consumerSignal) {
|
|
86
|
+
if (reader)
|
|
87
|
+
throw new Error("HTTP response body already acquired");
|
|
88
|
+
bodySignal = consumerSignal;
|
|
89
|
+
bodySignal?.addEventListener("abort", abortBody, { once: true });
|
|
90
|
+
if (bodySignal?.aborted)
|
|
91
|
+
abortBody();
|
|
92
|
+
reader = response.body?.getReader();
|
|
93
|
+
return {
|
|
94
|
+
/** Pull ordinary chunks; consumer execution stays outside the transport catch. */
|
|
95
|
+
async *[Symbol.asyncIterator]() {
|
|
96
|
+
try {
|
|
97
|
+
signal.throwIfAborted();
|
|
98
|
+
while (reader) {
|
|
99
|
+
signal.throwIfAborted();
|
|
100
|
+
reading = reader.read().catch((cause) => {
|
|
101
|
+
// Node 20 Fetch replaces the supplied reason with a native AbortError during body reads.
|
|
102
|
+
if (signal.aborted && cause instanceof DOMException && cause.name === "AbortError") {
|
|
103
|
+
throw signal.reason;
|
|
104
|
+
}
|
|
105
|
+
throw transportFailure(cause, "HTTP response body failed");
|
|
106
|
+
});
|
|
107
|
+
let result;
|
|
108
|
+
try {
|
|
109
|
+
result = await reading;
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
failure = { error };
|
|
113
|
+
throw error;
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
reading = undefined;
|
|
117
|
+
}
|
|
118
|
+
signal.throwIfAborted();
|
|
119
|
+
if (result.done)
|
|
120
|
+
return;
|
|
121
|
+
yield result.value;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
finally {
|
|
125
|
+
// Early iterator return stops the native response; the request scope joins it.
|
|
126
|
+
controller.abort();
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
catch (error) {
|
|
134
|
+
failure = { error };
|
|
135
|
+
throw error;
|
|
136
|
+
}
|
|
137
|
+
finally {
|
|
138
|
+
// Fetch abort also stops unread bodies. Do not create a second cancellation path.
|
|
139
|
+
controller.abort();
|
|
140
|
+
const cleanup = [];
|
|
141
|
+
yield* call(async () => {
|
|
142
|
+
for (const pending of [fetching, reading]) {
|
|
143
|
+
try {
|
|
144
|
+
await pending;
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
if (error !== signal.reason && error !== failure?.error)
|
|
148
|
+
cleanup.push(error);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
try {
|
|
152
|
+
reader?.releaseLock();
|
|
153
|
+
}
|
|
154
|
+
catch (error) {
|
|
155
|
+
cleanup.push(error);
|
|
156
|
+
}
|
|
157
|
+
bodySignal?.removeEventListener("abort", abortBody);
|
|
158
|
+
});
|
|
159
|
+
// Throw outside the Promise leaf so Effection teardown preserves genuine cleanup failures.
|
|
160
|
+
if (cleanup.length) {
|
|
161
|
+
if (failure && failure.error !== signal.reason)
|
|
162
|
+
cleanup.unshift(failure.error);
|
|
163
|
+
// deno-lint-ignore no-unsafe-finally -- A joined cleanup failure must remain visible during halt.
|
|
164
|
+
if (cleanup.length === 1)
|
|
165
|
+
throw cleanup[0];
|
|
166
|
+
// deno-lint-ignore no-unsafe-finally -- Preserve the primary failure alongside distinct cleanup failure.
|
|
167
|
+
throw new AggregateError(cleanup, "HTTP request and cleanup failed", { cause: cleanup[0] });
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { chunkBytes } from "./byte-source.js";
|
|
2
|
+
import { attemptPostCesr } from "./cesr-egress.js";
|
|
3
|
+
/**
|
|
4
|
+
* Send ordinary signed messages as ordered HTTP POSTs and finish response cleanup.
|
|
5
|
+
* Producers own preparation and Poster owns queued work. This component needs no
|
|
6
|
+
* Habery, protocol processor, parser state, timer or response history.
|
|
7
|
+
*
|
|
8
|
+
* Corresponds to the ordinary POST role of KERIpy HTTPMessenger. Complete CESR
|
|
9
|
+
* frames become separate POSTs: original signed body in the request body, text
|
|
10
|
+
* attachments in CESR-ATTACHMENT. Only the recognized pre-intake media refusal
|
|
11
|
+
* permits a second attempt with legacy media metadata. Successful response bytes
|
|
12
|
+
* are drained and discarded; protocol receiving belongs to independent intake.
|
|
13
|
+
*/
|
|
14
|
+
export class HTTPMessenger {
|
|
15
|
+
/** Bind one endpoint and request metadata; construction performs no I/O. */
|
|
16
|
+
constructor(url, http, options = {}) {
|
|
17
|
+
Object.defineProperty(this, "url", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true,
|
|
21
|
+
value: url
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(this, "http", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: http
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(this, "options", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: options
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Send resident signed bytes through the same parser/request path as sendSource.
|
|
38
|
+
* Keep the input unchanged until completion. A complete result proves transport
|
|
39
|
+
* completion, not remote verification, storage, approval or a processed reply.
|
|
40
|
+
*/
|
|
41
|
+
send(msg, options = {}) {
|
|
42
|
+
return this.sendSource((signal) => chunkBytes(msg, { signal }), options);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Iterate ordinary messages into POSTs; this is not whole-stream PUT delivery.
|
|
46
|
+
* A later malformed message cannot prevent an earlier valid POST. Parser,
|
|
47
|
+
* transport, source and cleanup failures propagate; HTTP refusal is typed data.
|
|
48
|
+
*/
|
|
49
|
+
sendSource(source, options = {}) {
|
|
50
|
+
return attemptPostCesr(this.url, source, this.http, { ...this.options, ...options });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { buildCesrStreamRequest, CESR_ATTACHMENT_HEADER, CESR_DESTINATION_HEADER } from "./cesr-http.js";
|
|
2
|
+
/**
|
|
3
|
+
* Bind one complete prepared payload to KERIpy-style HTTPStreamMessenger PUT.
|
|
4
|
+
* This component does not inspect CESR frames or own a producer queue. The
|
|
5
|
+
* producer prepares introductions, genus transitions and any sealing before
|
|
6
|
+
* construction; send owns only the actual request and joined response cleanup.
|
|
7
|
+
*/
|
|
8
|
+
export class HTTPStreamMessenger {
|
|
9
|
+
/** Construction borrows a finite payload; its producer must not mutate it during delivery. */
|
|
10
|
+
constructor(url, http, payload, options = {}) {
|
|
11
|
+
Object.defineProperty(this, "url", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
configurable: true,
|
|
14
|
+
writable: true,
|
|
15
|
+
value: url
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(this, "http", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
configurable: true,
|
|
20
|
+
writable: true,
|
|
21
|
+
value: http
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(this, "payload", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: payload
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(this, "options", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
configurable: true,
|
|
32
|
+
writable: true,
|
|
33
|
+
value: options
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Send exactly one PUT without parsing, re-encoding or fallback to POST.
|
|
38
|
+
* Return ordinary owned response bytes after request cleanup; HTTP success
|
|
39
|
+
* alone does not establish protocol acceptance. Cancellation/failures propagate.
|
|
40
|
+
* Non-success status is returned to the caller as HttpResponse for interpretation.
|
|
41
|
+
* The complete payload is the body with explicit length; CESR-ATTACHMENT is
|
|
42
|
+
* removed because this is not ordinary detached-attachment POST framing.
|
|
43
|
+
*/
|
|
44
|
+
send(options = {}) {
|
|
45
|
+
const prepared = buildCesrStreamRequest(this.payload, this.options);
|
|
46
|
+
const headers = new Headers(this.options.headers);
|
|
47
|
+
headers.delete(CESR_DESTINATION_HEADER);
|
|
48
|
+
for (const [key, value] of Object.entries(prepared.headers))
|
|
49
|
+
headers.set(key, value);
|
|
50
|
+
headers.delete(CESR_ATTACHMENT_HEADER);
|
|
51
|
+
headers.set("Content-Length", String(this.payload.byteLength));
|
|
52
|
+
return this.http.request(this.url, {
|
|
53
|
+
method: "PUT",
|
|
54
|
+
headers,
|
|
55
|
+
body: prepared.body,
|
|
56
|
+
redirect: "manual",
|
|
57
|
+
signal: options.signal,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** HTTP caller policies; the composed client owns native requests, readers and cleanup. */
|
|
2
|
+
import { call, resource } from "effection";
|
|
3
|
+
/**
|
|
4
|
+
* Acquire headers under the mailbox's existing timeout-as-no-response policy.
|
|
5
|
+
* The timer ends at headers, while the client resource remains live in this
|
|
6
|
+
* caller scope for body consumption. Only this timer's exact abort becomes null;
|
|
7
|
+
* external abort, native I/O and cleanup failures remain visible.
|
|
8
|
+
*
|
|
9
|
+
* @param http Borrowed HTTP implementation selected by composition.
|
|
10
|
+
* @param clock Borrowed clock with epoch-millisecond now and millisecond timer delays.
|
|
11
|
+
* @param url Absolute HTTP(S) endpoint.
|
|
12
|
+
* @param init Prepared request fields and optional upstream cancellation.
|
|
13
|
+
* @param timeoutMs Header-acquisition window in milliseconds; body consumption has its own caller policy.
|
|
14
|
+
* @returns Scoped response after headers, or null only for this owner's header timeout.
|
|
15
|
+
*/
|
|
16
|
+
export function requestWithHeaderTimeout(http, clock, url, init, timeoutMs) {
|
|
17
|
+
return resource(function* (provide) {
|
|
18
|
+
const controller = new AbortController();
|
|
19
|
+
const signal = init.signal ? AbortSignal.any([controller.signal, init.signal]) : controller.signal;
|
|
20
|
+
let timer;
|
|
21
|
+
let timedOut = false;
|
|
22
|
+
/** Header acquisition clears its timer without ending the owning request scope. */
|
|
23
|
+
const clearTimer = () => {
|
|
24
|
+
if (timer !== undefined)
|
|
25
|
+
clock.clearTimeout(timer);
|
|
26
|
+
timer = undefined;
|
|
27
|
+
};
|
|
28
|
+
try {
|
|
29
|
+
signal.throwIfAborted();
|
|
30
|
+
timer = clock.setTimeout(() => {
|
|
31
|
+
if (!signal.aborted) {
|
|
32
|
+
timedOut = true;
|
|
33
|
+
controller.abort();
|
|
34
|
+
}
|
|
35
|
+
}, timeoutMs);
|
|
36
|
+
try {
|
|
37
|
+
// Keep acquisition failure inside an error boundary without closing a successful body early.
|
|
38
|
+
yield* call(function* () {
|
|
39
|
+
const response = yield* http.open(url, { ...init, signal });
|
|
40
|
+
clearTimer();
|
|
41
|
+
yield* provide(response);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
if (!timedOut || error !== controller.signal.reason)
|
|
46
|
+
throw error;
|
|
47
|
+
clearTimer();
|
|
48
|
+
yield* provide(null);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
finally {
|
|
53
|
+
clearTimer();
|
|
54
|
+
controller.abort();
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/** Buffered input iteration and joined parser/source cleanup shared by concrete input owners. */
|
|
2
|
+
import { parse } from "cesr-ts";
|
|
3
|
+
import { call, ensure, on, race } from "effection";
|
|
4
|
+
import { rethrowCleanupFailure } from "../runtime/abortable.js";
|
|
5
|
+
/**
|
|
6
|
+
* Consume complete frames through the supplied input-owned Kevery and shared protocol owner.
|
|
7
|
+
* A pending read is joined before iterator return; cancellation cannot resume the
|
|
8
|
+
* caller after disposal. The owning input operation borrows processors and acquires
|
|
9
|
+
* no stores, queues, transport services or background workers here.
|
|
10
|
+
*
|
|
11
|
+
* @param source Creates the input byte source with this operation's abort signal; each source must honor cancellation.
|
|
12
|
+
* @param protocol Borrowed dispatcher over synchronous domain commits and correlated cue publication.
|
|
13
|
+
* @param kvy Input-owned KEL processor bound to the same store, reply verifier and cue flow.
|
|
14
|
+
* @param options Dispatch policy and optional upstream cancellation; defaults follow the shared processor.
|
|
15
|
+
* @throws Parsing, dispatch and cleanup failures propagate after the pending pull and iterator cleanup join.
|
|
16
|
+
*/
|
|
17
|
+
export function* processMessages(source, protocol, kvy, options = {}) {
|
|
18
|
+
const input = call(function* () {
|
|
19
|
+
const controller = new AbortController();
|
|
20
|
+
const signal = options.signal ? AbortSignal.any([controller.signal, options.signal]) : controller.signal;
|
|
21
|
+
try {
|
|
22
|
+
signal.throwIfAborted();
|
|
23
|
+
const frames = parse(source(signal));
|
|
24
|
+
let pending;
|
|
25
|
+
// This earlier resource joins I/O after dispatch/read children have stopped.
|
|
26
|
+
yield* ensure(function* () {
|
|
27
|
+
try {
|
|
28
|
+
if (pending) {
|
|
29
|
+
try {
|
|
30
|
+
yield* call(() => pending);
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
rethrowCleanupFailure(error, signal);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
finally {
|
|
38
|
+
yield* call(() => frames.return());
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
while (true) {
|
|
42
|
+
signal.throwIfAborted();
|
|
43
|
+
pending = frames.next();
|
|
44
|
+
let result;
|
|
45
|
+
try {
|
|
46
|
+
result = yield* call(() => pending);
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
pending = undefined; // Already reported; the parser has joined its source cleanup.
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
pending = undefined;
|
|
53
|
+
signal.throwIfAborted();
|
|
54
|
+
if (result.done)
|
|
55
|
+
return;
|
|
56
|
+
yield* protocol.dispatch(result.value, options, kvy);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
controller.abort();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
if (options.signal) {
|
|
64
|
+
const signal = options.signal;
|
|
65
|
+
yield* race([
|
|
66
|
+
input,
|
|
67
|
+
call(function* () {
|
|
68
|
+
const abort = yield* on(signal, "abort");
|
|
69
|
+
signal.throwIfAborted();
|
|
70
|
+
yield* abort.next();
|
|
71
|
+
throw signal.reason;
|
|
72
|
+
}),
|
|
73
|
+
]);
|
|
74
|
+
}
|
|
75
|
+
else
|
|
76
|
+
yield* input;
|
|
77
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Concrete messenger factories corresponding to KERIpy agenting.messengerFrom
|
|
3
|
+
* and streamMessengerFrom. Callers resolve identity roles/relay policy first;
|
|
4
|
+
* these functions choose only among the supplied transport URLs and open no I/O.
|
|
5
|
+
*
|
|
6
|
+
* Ordinary messages and opaque streams are different producer operations. They
|
|
7
|
+
* do not select a stored framing preference or acquire workers, stores or queues.
|
|
8
|
+
*/
|
|
9
|
+
import { ValidationError } from "../../core/errors.js";
|
|
10
|
+
import { HTTPMessenger } from "./http-messenger.js";
|
|
11
|
+
import { HTTPStreamMessenger } from "./http-stream-messenger.js";
|
|
12
|
+
import { TCPMessenger } from "./tcp-messenger.js";
|
|
13
|
+
import { TCPStreamMessenger } from "./tcp-stream-messenger.js";
|
|
14
|
+
/** Choose HTTPS, HTTP, then TCP and reject a mismatched advertised scheme before I/O. */
|
|
15
|
+
function endpointFrom(urls) {
|
|
16
|
+
for (const scheme of ["https", "http", "tcp"]) {
|
|
17
|
+
const value = urls[scheme];
|
|
18
|
+
if (value === undefined)
|
|
19
|
+
continue;
|
|
20
|
+
const endpoint = new URL(value);
|
|
21
|
+
if (endpoint.protocol !== `${scheme}:` || endpoint.username || endpoint.password) {
|
|
22
|
+
throw new ValidationError(`Invalid ${scheme} messenger endpoint: ${value}`);
|
|
23
|
+
}
|
|
24
|
+
if (scheme === "tcp" && (!endpoint.port || Number(endpoint.port) < 1 || Number(endpoint.port) > 65535)) {
|
|
25
|
+
throw new ValidationError(`TCP messenger endpoint requires a valid port: ${value}`);
|
|
26
|
+
}
|
|
27
|
+
return endpoint;
|
|
28
|
+
}
|
|
29
|
+
throw new ValidationError("No supported messenger endpoint is available.");
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Bind ordinary signed-message delivery to the first present HTTPS/HTTP/TCP URL.
|
|
33
|
+
* A malformed higher-priority URL fails rather than falling through to another
|
|
34
|
+
* transport. There is no network retry or endpoint discovery at this boundary.
|
|
35
|
+
*
|
|
36
|
+
* @param destination Remote AID carried in the HTTP CESR-DESTINATION header.
|
|
37
|
+
* @param urls Already resolved endpoints, keyed by their actual scheme.
|
|
38
|
+
* @param http Borrowed HTTP implementation, used only for an HTTP(S) selection.
|
|
39
|
+
* @param clock Borrowed deadline clock, used only for a TCP selection.
|
|
40
|
+
* @param headers Additional HTTP headers, such as Authorization; ignored by TCP.
|
|
41
|
+
* @returns A transmit-only messenger; caller runs send and owns its lifetime.
|
|
42
|
+
*/
|
|
43
|
+
export function messengerFrom(destination, urls, http, clock, headers) {
|
|
44
|
+
const endpoint = endpointFrom(urls);
|
|
45
|
+
if (endpoint.protocol === "tcp:")
|
|
46
|
+
return new TCPMessenger(endpoint.href, clock);
|
|
47
|
+
return new HTTPMessenger(endpoint.href, http, { destination, headers });
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Bind one prepared opaque payload to HTTP PUT or raw TCP delivery.
|
|
51
|
+
* No parser, re-signing or fallback to ordinary POST is introduced. This follows
|
|
52
|
+
* KERIpy's separate stream factory; "stream" describes the transport operation,
|
|
53
|
+
* while this API borrows finite resident bytes.
|
|
54
|
+
*
|
|
55
|
+
* @param destination Remote AID carried in HTTP framing; not a receipt/acceptance claim.
|
|
56
|
+
* @param urls Resolved endpoints, with the same fail-fast preference as messengerFrom.
|
|
57
|
+
* @param payload Complete prepared wire; caller must keep it unchanged until send finishes.
|
|
58
|
+
* @param http Borrowed HTTP service for a possible PUT.
|
|
59
|
+
* @param clock Borrowed clock for possible TCP connection/drain deadlines.
|
|
60
|
+
* @param headers Additional HTTP headers; ignored by TCP.
|
|
61
|
+
* @returns An unstarted messenger with no receive loop or scheduling ownership.
|
|
62
|
+
*/
|
|
63
|
+
export function streamMessengerFrom(destination, urls, payload, http, clock, headers) {
|
|
64
|
+
const endpoint = endpointFrom(urls);
|
|
65
|
+
if (endpoint.protocol === "tcp:")
|
|
66
|
+
return new TCPStreamMessenger(endpoint.href, clock, payload);
|
|
67
|
+
return new HTTPStreamMessenger(endpoint.href, http, payload, { destination, headers });
|
|
68
|
+
}
|
|
@@ -5,6 +5,11 @@ const readers = new WeakSet();
|
|
|
5
5
|
* Socket/OS buffers and a returned native view can have larger backing; copied output is independent.
|
|
6
6
|
* Abort, failure or early return destroys and joins the socket. Genuine receive EOF leaves its writable
|
|
7
7
|
* half intact; the caller must own later socket errors, output drain and final close (allowHalfOpen).
|
|
8
|
+
*
|
|
9
|
+
* @param socket Borrowed binary socket with no competing readable/data consumer; receive ownership is acquired on first pull.
|
|
10
|
+
* @param options Required abort signal and optional positive chunk size in bytes; default 65536.
|
|
11
|
+
* @returns An exclusive iterator allowing one pending next call; each chunk owns its backing buffer.
|
|
12
|
+
* @throws Competing readers, text/object-mode sockets, invalid chunk sizes, I/O and cleanup failures.
|
|
8
13
|
*/
|
|
9
14
|
export function socketBytes(socket, { signal, maxChunkBytes = 64 * 1024 }) {
|
|
10
15
|
if (!Number.isSafeInteger(maxChunkBytes) || maxChunkBytes < 1) {
|
|
@@ -17,6 +22,10 @@ export function socketBytes(socket, { signal, maxChunkBytes = 64 * 1024 }) {
|
|
|
17
22
|
let pending;
|
|
18
23
|
/** Wake the sole pending pull without starting another socket read. */
|
|
19
24
|
const readable = () => wake?.();
|
|
25
|
+
/**
|
|
26
|
+
* Preserve the first read failure and wake the pending pull to report it.
|
|
27
|
+
* @param error Socket error or exact owner cancellation reason.
|
|
28
|
+
*/
|
|
20
29
|
const fail = (error) => {
|
|
21
30
|
if (!failed) {
|
|
22
31
|
failed = true;
|
|
@@ -24,10 +33,12 @@ export function socketBytes(socket, { signal, maxChunkBytes = 64 * 1024 }) {
|
|
|
24
33
|
}
|
|
25
34
|
readable();
|
|
26
35
|
};
|
|
36
|
+
/** Mark genuine receive EOF without closing the writable half. */
|
|
27
37
|
const end = () => {
|
|
28
38
|
ended = true;
|
|
29
39
|
readable();
|
|
30
40
|
};
|
|
41
|
+
/** Settle native close and report premature closure to any pending pull. */
|
|
31
42
|
const close = () => {
|
|
32
43
|
closed = true;
|
|
33
44
|
if (!ended && !socket.readableEnded)
|
|
@@ -35,7 +46,11 @@ export function socketBytes(socket, { signal, maxChunkBytes = 64 * 1024 }) {
|
|
|
35
46
|
finishClose?.();
|
|
36
47
|
readable();
|
|
37
48
|
};
|
|
38
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Keep error/close listeners until destruction joins; EOF only releases read ownership.
|
|
51
|
+
* @param eof True only after genuine receive EOF, preserving the writable half.
|
|
52
|
+
* @returns Shared cleanup promise; repeated calls join the same cleanup.
|
|
53
|
+
*/
|
|
39
54
|
const cleanup = (eof = false) => closing ??= (async () => {
|
|
40
55
|
if (!started)
|
|
41
56
|
return;
|
|
@@ -55,6 +70,7 @@ export function socketBytes(socket, { signal, maxChunkBytes = 64 * 1024 }) {
|
|
|
55
70
|
readers.delete(socket);
|
|
56
71
|
}
|
|
57
72
|
})();
|
|
73
|
+
/** Interrupt the blocked pull now; its next/return owner joins the cleanup promise. */
|
|
58
74
|
const abort = () => {
|
|
59
75
|
fail(signal.reason);
|
|
60
76
|
// The original Promise stays owned by next()/return(), which join and propagate cleanup errors.
|
|
@@ -91,7 +107,11 @@ export function socketBytes(socket, { signal, maxChunkBytes = 64 * 1024 }) {
|
|
|
91
107
|
else
|
|
92
108
|
socket.resume();
|
|
93
109
|
};
|
|
94
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
* Read only available bytes, so a short fragment does not wait for a full chunk or EOF.
|
|
112
|
+
* @returns One copied binary chunk or EOF after releasing read ownership.
|
|
113
|
+
* @throws Original read failure after cleanup, or an aggregate retaining distinct cleanup failure.
|
|
114
|
+
*/
|
|
95
115
|
const pull = async () => {
|
|
96
116
|
try {
|
|
97
117
|
if (!started)
|
|
@@ -139,6 +159,11 @@ export function socketBytes(socket, { signal, maxChunkBytes = 64 * 1024 }) {
|
|
|
139
159
|
}
|
|
140
160
|
};
|
|
141
161
|
return {
|
|
162
|
+
/**
|
|
163
|
+
* Perform the sole pending pull, acquiring readable ownership lazily.
|
|
164
|
+
*
|
|
165
|
+
* @returns The next copied chunk or EOF; overlapping calls reject.
|
|
166
|
+
*/
|
|
142
167
|
next() {
|
|
143
168
|
if (busy)
|
|
144
169
|
return Promise.reject(new Error("Concurrent socket pull"));
|
|
@@ -147,6 +172,13 @@ export function socketBytes(socket, { signal, maxChunkBytes = 64 * 1024 }) {
|
|
|
147
172
|
busy = true;
|
|
148
173
|
return pending = pull();
|
|
149
174
|
},
|
|
175
|
+
/**
|
|
176
|
+
* Stop iteration early and join socket destruction.
|
|
177
|
+
* A source never pulled owns no socket resources; genuine EOF has already
|
|
178
|
+
* released readable ownership while preserving the writable half.
|
|
179
|
+
*
|
|
180
|
+
* @returns EOF after any acquired socket cleanup and outstanding pull join.
|
|
181
|
+
*/
|
|
150
182
|
async return() {
|
|
151
183
|
done = true;
|
|
152
184
|
if (started) {
|
|
@@ -156,6 +188,11 @@ export function socketBytes(socket, { signal, maxChunkBytes = 64 * 1024 }) {
|
|
|
156
188
|
}
|
|
157
189
|
return { done: true, value: undefined };
|
|
158
190
|
},
|
|
191
|
+
/**
|
|
192
|
+
* Expose the same reader to for-await iteration; do not create a second consumer.
|
|
193
|
+
*
|
|
194
|
+
* @returns This single-consumer iterator.
|
|
195
|
+
*/
|
|
159
196
|
[Symbol.asyncIterator]() {
|
|
160
197
|
return this;
|
|
161
198
|
},
|