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
|
@@ -12,15 +12,19 @@
|
|
|
12
12
|
* and the delegator's own KEL state
|
|
13
13
|
*/
|
|
14
14
|
import { Diger } from "cesr-ts";
|
|
15
|
+
import { call, race, sleep, spawn } from "effection";
|
|
16
|
+
import { runAgentRuntime } from "../../app/runtime/agent-runtime.js";
|
|
15
17
|
import { ValidationError } from "../../core/errors.js";
|
|
16
18
|
import { dgKey } from "../../db/core/keys.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
19
|
+
import { parseBooleanOption, parseStringListOption, parseStringOption } from "../common/parsing.js";
|
|
20
|
+
import { createExchangeMessage } from "../../app/exchanges/exchange-messaging.js";
|
|
21
|
+
import { groupSigningMembers, isLocalGroupHab, localGroupMember } from "../../app/identity/endpoint-roleing.js";
|
|
22
|
+
import { MULTISIG_IXN_ROUTE } from "../../app/multisig/grouping.js";
|
|
23
|
+
import { SeqNoQuerier } from "../../app/queries/querying.js";
|
|
24
|
+
import { runtimeTurn } from "../../app/runtime/runtime-turn.js";
|
|
25
|
+
import { WitnessReceiptor } from "../../app/witness/receipting.js";
|
|
26
|
+
import { withHabAndAgentRuntime } from "../common/context.js";
|
|
27
|
+
import { resolveWitnessAuths } from "../common/witness-auth.js";
|
|
24
28
|
/** Return pending delegated events for one local delegator, oldest first. */
|
|
25
29
|
function pendingDelegations(hby, delegatorPre) {
|
|
26
30
|
const pending = [];
|
|
@@ -86,20 +90,24 @@ function delegateWitnessLogsQuery(hab, serder, witness) {
|
|
|
86
90
|
if (!serder.pre || !serder.snh) {
|
|
87
91
|
throw new ValidationError("Delegated event is missing pre or sn for query.");
|
|
88
92
|
}
|
|
89
|
-
const query = { fn: "0", s: serder.snh };
|
|
90
93
|
return {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
query,
|
|
98
|
-
wits: [witness],
|
|
99
|
-
},
|
|
100
|
-
messages: [hab.query(serder.pre, witness, query, "logs")],
|
|
94
|
+
pre: serder.pre,
|
|
95
|
+
signer: hab.pre,
|
|
96
|
+
src: witness,
|
|
97
|
+
route: "logs",
|
|
98
|
+
q: { fn: "0", s: serder.snh },
|
|
99
|
+
wits: [witness],
|
|
101
100
|
};
|
|
102
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Publish group delegation approval to remote signing members before advancing the workflow.
|
|
104
|
+
*
|
|
105
|
+
* @param runtime Borrowed composed runtime; caller owns its worker and store lifetime.
|
|
106
|
+
* @param hby Borrowed local identities and accepted-state stores.
|
|
107
|
+
* @param groupHab Group approving habitat.
|
|
108
|
+
* @param message Signed approving interaction to embed for remote members.
|
|
109
|
+
* @returns Successful delivery URLs after each concrete Poster outcome.
|
|
110
|
+
*/
|
|
103
111
|
function* publishGroupDelegationApproval(runtime, hby, groupHab, message) {
|
|
104
112
|
const member = localGroupMember(hby, groupHab.pre);
|
|
105
113
|
const smids = groupSigningMembers(hby, groupHab.pre);
|
|
@@ -108,14 +116,18 @@ function* publishGroupDelegationApproval(runtime, hby, groupHab, message) {
|
|
|
108
116
|
if (recipient === member.pre || hby.habs.has(recipient)) {
|
|
109
117
|
continue;
|
|
110
118
|
}
|
|
111
|
-
const
|
|
112
|
-
recipient,
|
|
119
|
+
const { msg } = createExchangeMessage(member, {
|
|
120
|
+
dest: recipient,
|
|
113
121
|
route: MULTISIG_IXN_ROUTE,
|
|
114
122
|
payload: { gid: groupHab.pre, smids },
|
|
115
123
|
embeds: { ixn: message },
|
|
116
|
-
topic: "multisig",
|
|
117
124
|
});
|
|
118
|
-
|
|
125
|
+
const postman = runtime.postman;
|
|
126
|
+
const evt = postman.send({ src: member.pre, dest: recipient, topic: "multisig", msg }, { notify: true });
|
|
127
|
+
const result = yield* postman.wait(evt);
|
|
128
|
+
if (result.kin === "failed")
|
|
129
|
+
throw result.error;
|
|
130
|
+
deliveries.push(...result.deliveries);
|
|
119
131
|
}
|
|
120
132
|
return deliveries;
|
|
121
133
|
}
|
|
@@ -133,30 +145,26 @@ function pinApprovalSeal(hby, hab, delegated, approving) {
|
|
|
133
145
|
]);
|
|
134
146
|
hab.kvy.processEscrowDelegables();
|
|
135
147
|
}
|
|
136
|
-
/**
|
|
137
|
-
function
|
|
138
|
-
const
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
*
|
|
143
|
-
|
|
144
|
-
yield* querySink.send(emission);
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
yield* runtime.respondant.sendWithHab(emission, hab);
|
|
148
|
-
},
|
|
149
|
-
};
|
|
148
|
+
/** Observe approval state while the command's host workers own background progress. */
|
|
149
|
+
function* waitForDelegation(done, timeoutMs) {
|
|
150
|
+
const deadline = Date.now() + timeoutMs;
|
|
151
|
+
while (!done()) {
|
|
152
|
+
if (Date.now() >= deadline)
|
|
153
|
+
throw new Error(`Runtime did not converge within ${timeoutMs}ms.`);
|
|
154
|
+
yield* runtimeTurn();
|
|
155
|
+
}
|
|
150
156
|
}
|
|
151
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* Approve pending events without starting or serially driving background workers.
|
|
152
159
|
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
160
|
+
* @param hby Borrowed local identities and accepted-state stores.
|
|
161
|
+
* @param hab Approving local habitat.
|
|
162
|
+
* @param runtime Borrowed composed runtime; caller owns its worker and store lifetime.
|
|
163
|
+
* @param confirmArgs Command approval choices/callback inputs.
|
|
155
164
|
*/
|
|
156
|
-
|
|
165
|
+
function* performDelegationApproval(hby, hab, runtime, confirmArgs) {
|
|
157
166
|
const interactionApproval = confirmArgs.interact ?? false;
|
|
158
|
-
|
|
159
|
-
yield* processRuntimeUntil(runtime, () => pendingDelegations(hby, hab.pre).length > 0, { hab, maxTurns: 64, pollMailbox: true, sink });
|
|
167
|
+
yield* waitForDelegation(() => pendingDelegations(hby, hab.pre).length > 0, 15_000);
|
|
160
168
|
const pending = pendingDelegations(hby, hab.pre);
|
|
161
169
|
if (pending.length === 0) {
|
|
162
170
|
throw new ValidationError(`No delegated events are awaiting approval for ${hab.pre}.`);
|
|
@@ -193,23 +201,12 @@ export function* performDelegationApproval(hby, hab, runtime, confirmArgs) {
|
|
|
193
201
|
const witnesses = delegateWitnesses(hby, serder).sort();
|
|
194
202
|
const selectedWitness = witnesses[0];
|
|
195
203
|
const member = localGroupMember(hby, hab.pre);
|
|
196
|
-
const memberSink = delegateConfirmSink(runtime, hby, member);
|
|
197
204
|
pinApprovalSeal(hby, hab, serder, approving);
|
|
198
|
-
yield* processRuntimeTurn(runtime, {
|
|
199
|
-
hab: member,
|
|
200
|
-
pollMailbox: true,
|
|
201
|
-
sink: memberSink,
|
|
202
|
-
});
|
|
203
205
|
if (!delegateCommitted(hby, serder) && selectedWitness) {
|
|
204
|
-
|
|
205
|
-
yield*
|
|
206
|
+
runtime.querying.enqueue(delegateWitnessLogsQuery(member, serder, selectedWitness));
|
|
207
|
+
yield* waitForDelegation(() => delegateCommitted(hby, serder), 30_000);
|
|
206
208
|
}
|
|
207
209
|
pinApprovalSeal(hby, hab, serder, approving);
|
|
208
|
-
yield* processRuntimeTurn(runtime, {
|
|
209
|
-
hab: member,
|
|
210
|
-
pollMailbox: true,
|
|
211
|
-
sink: memberSink,
|
|
212
|
-
});
|
|
213
210
|
if (serder.pre && serder.said) {
|
|
214
211
|
const stillPending = hby.db.delegables.get([serder.pre]).includes(serder.said);
|
|
215
212
|
if (stillPending) {
|
|
@@ -229,7 +226,7 @@ export function* performDelegationApproval(hby, hab, runtime, confirmArgs) {
|
|
|
229
226
|
hab.rotate({ data: [anchor] });
|
|
230
227
|
}
|
|
231
228
|
if (hab.kever?.wits.length) {
|
|
232
|
-
const witDoer = new WitnessReceiptor(hby,
|
|
229
|
+
const witDoer = new WitnessReceiptor(hby, runtime.protocol, runtime.http, runtime.clock);
|
|
233
230
|
yield* witDoer.submit(hab.pre, {
|
|
234
231
|
sn: hab.kever.sn,
|
|
235
232
|
auths,
|
|
@@ -245,18 +242,29 @@ export function* performDelegationApproval(hby, hab, runtime, confirmArgs) {
|
|
|
245
242
|
// Witnessed delegates must prove the delegated event is committed
|
|
246
243
|
// locally before we pin `aess.` and retry delegated unescrow. Doing
|
|
247
244
|
// it earlier can make local state look approved but incomplete.
|
|
248
|
-
|
|
249
|
-
yield*
|
|
245
|
+
runtime.querying.enqueue(delegateWitnessLogsQuery(hab, serder, selectedWitness));
|
|
246
|
+
yield* waitForDelegation(() => delegateCommitted(hby, serder), 30_000);
|
|
250
247
|
}
|
|
251
248
|
else {
|
|
252
|
-
const querier = runtime.querying.watchSeqNo(serder.pre, serder.sn ?? 0, { hab });
|
|
253
249
|
// No delegate witness exists to query. Process the local delegable
|
|
254
250
|
// after the delegator has anchored approval; the delegate still
|
|
255
251
|
// discovers approval through its own delegator-KEL query path.
|
|
256
252
|
pinApprovalSeal(hby, hab, serder, approving);
|
|
257
|
-
yield*
|
|
253
|
+
const observed = yield* race([
|
|
254
|
+
call(function* () {
|
|
255
|
+
yield* new SeqNoQuerier(hby.db, runtime.querying, serder.pre, serder.sn ?? 0, {
|
|
256
|
+
signer: hab.pre,
|
|
257
|
+
}).queryDo();
|
|
258
|
+
return true;
|
|
259
|
+
}),
|
|
260
|
+
call(function* () {
|
|
261
|
+
yield* sleep(30_000);
|
|
262
|
+
return false;
|
|
263
|
+
}),
|
|
264
|
+
]);
|
|
265
|
+
if (!observed)
|
|
266
|
+
throw new Error("Runtime did not converge within 30000ms.");
|
|
258
267
|
}
|
|
259
|
-
yield* processRuntimeTurn(runtime, { hab, pollMailbox: true, sink });
|
|
260
268
|
// Match KERIpy sequencing: only record the approving seal and retry
|
|
261
269
|
// delegated unescrow after the delegate event has been observed as
|
|
262
270
|
// locally committed through the witness-backed query/replay path.
|
|
@@ -275,17 +283,17 @@ export function* performDelegationApproval(hby, hab, runtime, confirmArgs) {
|
|
|
275
283
|
/** Approve pending delegated events for the selected local delegator habitat. */
|
|
276
284
|
export function* delegateConfirmCommand(args) {
|
|
277
285
|
const confirmArgs = {
|
|
278
|
-
name: args.name,
|
|
279
|
-
base: args.base,
|
|
280
|
-
headDirPath: args.headDirPath,
|
|
281
|
-
passcode: args.passcode,
|
|
282
|
-
alias: args.alias,
|
|
283
|
-
compat: args.compat,
|
|
284
|
-
interact: args.interact,
|
|
285
|
-
auto: args.auto,
|
|
286
|
-
authenticate: args.authenticate,
|
|
287
|
-
code: args.code,
|
|
288
|
-
codeTime: args.codeTime,
|
|
286
|
+
name: parseStringOption(args.name, "name"),
|
|
287
|
+
base: parseStringOption(args.base, "base"),
|
|
288
|
+
headDirPath: parseStringOption(args.headDirPath, "headDirPath"),
|
|
289
|
+
passcode: parseStringOption(args.passcode, "passcode"),
|
|
290
|
+
alias: parseStringOption(args.alias, "alias"),
|
|
291
|
+
compat: parseBooleanOption(args.compat, "compat"),
|
|
292
|
+
interact: parseBooleanOption(args.interact, "interact"),
|
|
293
|
+
auto: parseBooleanOption(args.auto, "auto"),
|
|
294
|
+
authenticate: parseBooleanOption(args.authenticate, "authenticate"),
|
|
295
|
+
code: parseStringListOption(args.code, "code"),
|
|
296
|
+
codeTime: parseStringOption(args.codeTime, "codeTime"),
|
|
289
297
|
};
|
|
290
298
|
if (!confirmArgs.name) {
|
|
291
299
|
throw new ValidationError("Name is required and cannot be empty");
|
|
@@ -302,6 +310,13 @@ export function* delegateConfirmCommand(args) {
|
|
|
302
310
|
if (!hab.kever) {
|
|
303
311
|
throw new ValidationError(`Missing accepted key state for ${hab.pre}.`);
|
|
304
312
|
}
|
|
305
|
-
|
|
313
|
+
const signer = isLocalGroupHab(hby, hab) ? localGroupMember(hby, hab.pre) : hab;
|
|
314
|
+
const worker = yield* spawn(() => runAgentRuntime(runtime, { hab: signer }));
|
|
315
|
+
try {
|
|
316
|
+
yield* performDelegationApproval(hby, hab, runtime, confirmArgs);
|
|
317
|
+
}
|
|
318
|
+
finally {
|
|
319
|
+
yield* worker.halt();
|
|
320
|
+
}
|
|
306
321
|
});
|
|
307
322
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ValidationError } from "../../core/errors.js";
|
|
2
2
|
import { dgKey } from "../../db/core/keys.js";
|
|
3
|
-
import { withExistingHab } from "
|
|
3
|
+
import { withExistingHab } from "../common/context.js";
|
|
4
|
+
import { parseBooleanOption, parseStringOption } from "../common/parsing.js";
|
|
4
5
|
/**
|
|
5
6
|
* Implements `tufa export`.
|
|
6
7
|
*
|
|
@@ -8,13 +9,13 @@ import { withExistingHab } from "./common/context.js";
|
|
|
8
9
|
*/
|
|
9
10
|
export function* exportCommand(args) {
|
|
10
11
|
const exportArgs = {
|
|
11
|
-
name: args.name,
|
|
12
|
-
base: args.base,
|
|
13
|
-
headDirPath: args.headDirPath,
|
|
14
|
-
passcode: args.passcode,
|
|
15
|
-
alias: args.alias,
|
|
16
|
-
files: args.files,
|
|
17
|
-
ends: args.ends,
|
|
12
|
+
name: parseStringOption(args.name, "name"),
|
|
13
|
+
base: parseStringOption(args.base, "base"),
|
|
14
|
+
headDirPath: parseStringOption(args.headDirPath, "headDirPath"),
|
|
15
|
+
passcode: parseStringOption(args.passcode, "passcode"),
|
|
16
|
+
alias: parseStringOption(args.alias, "alias"),
|
|
17
|
+
files: parseBooleanOption(args.files, "files"),
|
|
18
|
+
ends: parseBooleanOption(args.ends, "ends"),
|
|
18
19
|
};
|
|
19
20
|
if (!exportArgs.name) {
|
|
20
21
|
throw new ValidationError("Name is required and cannot be empty");
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { call } from "effection";
|
|
2
|
+
import { resolveBootstrap } from "../../app/bootstrap/bootstrapping.js";
|
|
3
|
+
import { createProtocolProcessor } from "../../app/protocol/protocol-processing.js";
|
|
4
|
+
import { createAgentRuntime, runAgentRuntimeUntil, } from "../../app/runtime/agent-runtime.js";
|
|
5
|
+
import { systemClock } from "../../app/runtime/runtime-clock.js";
|
|
6
|
+
import { FetchHttpClient } from "../../app/transport/http-client.js";
|
|
7
|
+
import { ValidationError } from "../../core/errors.js";
|
|
8
|
+
import { assertBootstrapComplete } from "../common/bootstrap.js";
|
|
9
|
+
import { createConfiger } from "../../app/identity/configing.js";
|
|
10
|
+
import { resolveDelegationCommunicationHab } from "../../app/identity/delegating.js";
|
|
11
|
+
import { Receiptor, WitnessReceiptor } from "../../app/witness/receipting.js";
|
|
12
|
+
import { setupHby } from "../common/existing.js";
|
|
13
|
+
import { loadInceptFileOptions, parseBooleanOption, parseCountOption, parseDataItems, parseKeriVersionOption, parseStringListOption, parseStringOption, parseThresholdOption, } from "../common/parsing.js";
|
|
14
|
+
/**
|
|
15
|
+
* Loads incept options from a file and overlays explicit CLI values.
|
|
16
|
+
*/
|
|
17
|
+
function mergeWithFile(args) {
|
|
18
|
+
let opts = {};
|
|
19
|
+
if (args.file && args.file !== "") {
|
|
20
|
+
opts = loadInceptFileOptions(args.file);
|
|
21
|
+
}
|
|
22
|
+
if (args.transferable !== undefined)
|
|
23
|
+
opts.transferable = args.transferable;
|
|
24
|
+
if (args.wits !== undefined)
|
|
25
|
+
opts.wits = args.wits;
|
|
26
|
+
if (args.icount !== undefined)
|
|
27
|
+
opts.icount = args.icount;
|
|
28
|
+
if (args.isith !== undefined)
|
|
29
|
+
opts.isith = args.isith;
|
|
30
|
+
if (args.ncount !== undefined)
|
|
31
|
+
opts.ncount = args.ncount;
|
|
32
|
+
if (args.nsith !== undefined)
|
|
33
|
+
opts.nsith = args.nsith;
|
|
34
|
+
if (args.toad !== undefined)
|
|
35
|
+
opts.toad = args.toad;
|
|
36
|
+
if (args.estOnly !== undefined)
|
|
37
|
+
opts.estOnly = args.estOnly;
|
|
38
|
+
if (args.delpre !== undefined)
|
|
39
|
+
opts.delpre = args.delpre;
|
|
40
|
+
if (args.data !== undefined)
|
|
41
|
+
opts.data = parseDataItems(args.data);
|
|
42
|
+
return opts;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Implements `tufa incept`.
|
|
46
|
+
*
|
|
47
|
+
* Creates a single-sig identifier locally.
|
|
48
|
+
*
|
|
49
|
+
* @param args Parsed command flags and positionals; required identifiers and policy values are validated before effects.
|
|
50
|
+
*/
|
|
51
|
+
export function* inceptCommand(args) {
|
|
52
|
+
// Select one HTTP implementation for all work owned by this command.
|
|
53
|
+
const http = new FetchHttpClient();
|
|
54
|
+
const inceptArgs = {
|
|
55
|
+
name: parseStringOption(args.name, "name"),
|
|
56
|
+
base: parseStringOption(args.base, "base"),
|
|
57
|
+
headDirPath: parseStringOption(args.headDirPath, "headDirPath"),
|
|
58
|
+
temp: parseBooleanOption(args.temp, "temp"),
|
|
59
|
+
passcode: parseStringOption(args.passcode, "passcode"),
|
|
60
|
+
alias: parseStringOption(args.alias, "alias"),
|
|
61
|
+
configDir: parseStringOption(args.configDir, "configDir"),
|
|
62
|
+
configFile: parseStringOption(args.configFile, "configFile"),
|
|
63
|
+
endpoint: parseBooleanOption(args.endpoint, "endpoint"),
|
|
64
|
+
proxy: parseStringOption(args.proxy, "proxy"),
|
|
65
|
+
file: parseStringOption(args.file, "file"),
|
|
66
|
+
transferable: parseBooleanOption(args.transferable, "transferable"),
|
|
67
|
+
wits: parseStringListOption(args.wits, "wits"),
|
|
68
|
+
toad: parseCountOption(args.toad, "toad"),
|
|
69
|
+
icount: parseCountOption(args.icount, "icount"),
|
|
70
|
+
isith: parseThresholdOption(args.isith),
|
|
71
|
+
ncount: parseCountOption(args.ncount, "ncount"),
|
|
72
|
+
nsith: parseThresholdOption(args.nsith),
|
|
73
|
+
estOnly: parseBooleanOption(args.estOnly, "estOnly"),
|
|
74
|
+
data: parseStringListOption(args.data, "data"),
|
|
75
|
+
delpre: parseStringOption(args.delpre, "delpre"),
|
|
76
|
+
version: parseKeriVersionOption(args.version),
|
|
77
|
+
};
|
|
78
|
+
if (!inceptArgs.name) {
|
|
79
|
+
throw new ValidationError("Name is required and cannot be empty");
|
|
80
|
+
}
|
|
81
|
+
if (!inceptArgs.alias) {
|
|
82
|
+
throw new ValidationError("Alias is required and cannot be empty");
|
|
83
|
+
}
|
|
84
|
+
const opts = mergeWithFile(inceptArgs);
|
|
85
|
+
if (opts.icount === 0)
|
|
86
|
+
throw new ValidationError("icount must be positive");
|
|
87
|
+
// A command-local scope owns acquisition and teardown; there is no independent child consumer.
|
|
88
|
+
const result = yield* call(function* () {
|
|
89
|
+
const cf = inceptArgs.configFile
|
|
90
|
+
? (yield* createConfiger({
|
|
91
|
+
name: inceptArgs.configFile,
|
|
92
|
+
base: "",
|
|
93
|
+
temp: false,
|
|
94
|
+
headDirPath: inceptArgs.configDir,
|
|
95
|
+
reopen: true,
|
|
96
|
+
clear: false,
|
|
97
|
+
}))
|
|
98
|
+
: undefined;
|
|
99
|
+
const hby = yield* setupHby(inceptArgs.name, inceptArgs.base ?? "", inceptArgs.passcode, inceptArgs.temp ?? false, inceptArgs.headDirPath, {
|
|
100
|
+
readonly: false,
|
|
101
|
+
cf,
|
|
102
|
+
skipConfig: !cf,
|
|
103
|
+
skipSignator: true,
|
|
104
|
+
});
|
|
105
|
+
let failure;
|
|
106
|
+
try {
|
|
107
|
+
if (hby.habByName(inceptArgs.alias)) {
|
|
108
|
+
throw new ValidationError(`Alias ${inceptArgs.alias} already exists; inception requires an unused alias.`);
|
|
109
|
+
}
|
|
110
|
+
assertBootstrapComplete(yield* resolveBootstrap(hby, http));
|
|
111
|
+
const hab = hby.makeHab(inceptArgs.alias, undefined, {
|
|
112
|
+
transferable: opts.transferable ?? false,
|
|
113
|
+
wits: opts.wits ?? [],
|
|
114
|
+
toad: opts.toad ?? 0,
|
|
115
|
+
icount: opts.icount ?? 1,
|
|
116
|
+
isith: opts.isith,
|
|
117
|
+
ncount: opts.ncount ?? 1,
|
|
118
|
+
nsith: opts.nsith,
|
|
119
|
+
estOnly: opts.estOnly ?? false,
|
|
120
|
+
data: opts.data ?? [],
|
|
121
|
+
delpre: opts.delpre,
|
|
122
|
+
version: inceptArgs.version,
|
|
123
|
+
});
|
|
124
|
+
if (hab.kever?.wits.length) {
|
|
125
|
+
if (inceptArgs.endpoint) {
|
|
126
|
+
const receiptor = new Receiptor(hby, createProtocolProcessor(hby), http, systemClock);
|
|
127
|
+
yield* receiptor.receipt(hab.pre, { sn: 0 });
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
const witDoer = new WitnessReceiptor(hby, createProtocolProcessor(hby), http, systemClock);
|
|
131
|
+
yield* witDoer.submit(hab.pre, { sn: 0 });
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
let delegationPhase = null;
|
|
135
|
+
if (opts.delpre) {
|
|
136
|
+
const communicationHab = resolveDelegationCommunicationHab(hby, inceptArgs.proxy);
|
|
137
|
+
if (!communicationHab) {
|
|
138
|
+
throw new ValidationError(`Delegated inception for ${hab.pre} requires --proxy <alias>.`);
|
|
139
|
+
}
|
|
140
|
+
const runtime = yield* createAgentRuntime(hby, http, systemClock);
|
|
141
|
+
try {
|
|
142
|
+
runtime.delegating.beginLatest(hab.pre, 0, {
|
|
143
|
+
communicationHab,
|
|
144
|
+
});
|
|
145
|
+
yield* runAgentRuntimeUntil(runtime, () => runtime.delegating.complete(hab.pre, 0), { hab, timeoutMs: 120_000, pollMailbox: true });
|
|
146
|
+
delegationPhase = runtime.delegating.workflowStatus(hab.pre, "0").phase;
|
|
147
|
+
}
|
|
148
|
+
finally {
|
|
149
|
+
yield* runtime.close();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
const state = hby.db.getState(hab.pre);
|
|
153
|
+
return { prefix: hab.pre, keys: state?.k ?? [], delegationPhase };
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
failure = { error };
|
|
157
|
+
throw error;
|
|
158
|
+
}
|
|
159
|
+
finally {
|
|
160
|
+
try {
|
|
161
|
+
yield* hby.close();
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
if (failure) {
|
|
165
|
+
// deno-lint-ignore no-unsafe-finally -- Preserve inception and shutdown failures.
|
|
166
|
+
throw new AggregateError([failure.error, error], "Inception and database close failed", {
|
|
167
|
+
cause: failure.error,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
// deno-lint-ignore no-unsafe-finally -- Final success requires resource closure.
|
|
171
|
+
throw error;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
console.log(`Prefix ${result.prefix}`);
|
|
176
|
+
for (const [idx, key] of result.keys.entries())
|
|
177
|
+
console.log(`\tPublic key ${idx + 1}: ${key}`);
|
|
178
|
+
if (result.delegationPhase)
|
|
179
|
+
console.log(`Delegation status ${result.delegationPhase}`);
|
|
180
|
+
console.log("");
|
|
181
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { Encrypter } from "cesr-ts";
|
|
2
|
+
import { resolveBootstrap } from "../../app/bootstrap/bootstrapping.js";
|
|
3
|
+
import { createConfiger } from "../../app/identity/configing.js";
|
|
4
|
+
import { branToSeedAeid, createHabery } from "../../app/identity/habbing.js";
|
|
5
|
+
import { FetchHttpClient } from "../../app/transport/http-client.js";
|
|
6
|
+
import { ValidationError } from "../../core/errors.js";
|
|
7
|
+
import { assertBootstrapComplete } from "../common/bootstrap.js";
|
|
8
|
+
import { parseBooleanOption, parseStringOption } from "../common/parsing.js";
|
|
9
|
+
import { readPasscode } from "../common/passcode.js";
|
|
10
|
+
/**
|
|
11
|
+
* Implements `tufa init`.
|
|
12
|
+
*
|
|
13
|
+
* Creates/open a habery keystore and database.
|
|
14
|
+
*
|
|
15
|
+
* @param args Parsed command flags and positionals; required identifiers and policy values are validated before effects.
|
|
16
|
+
*/
|
|
17
|
+
export function* initCommand(args) {
|
|
18
|
+
// Extract values from args
|
|
19
|
+
const initArgs = {
|
|
20
|
+
name: parseStringOption(args.name, "--name"),
|
|
21
|
+
base: parseStringOption(args.base, "--base"),
|
|
22
|
+
headDirPath: parseStringOption(args.headDirPath, "--head-dir"),
|
|
23
|
+
temp: parseBooleanOption(args.temp, "--temp") ?? false,
|
|
24
|
+
salt: parseStringOption(args.salt, "--salt"),
|
|
25
|
+
configDir: parseStringOption(args.configDir, "--config-dir"),
|
|
26
|
+
configFile: parseStringOption(args.configFile, "--config-file"),
|
|
27
|
+
passcode: parseStringOption(args.passcode, "--passcode"),
|
|
28
|
+
nopasscode: parseBooleanOption(args.nopasscode, "--nopasscode") ?? false,
|
|
29
|
+
aeid: parseStringOption(args.aeid, "--aeid"),
|
|
30
|
+
seed: parseStringOption(args.seed, "--seed"),
|
|
31
|
+
};
|
|
32
|
+
const name = initArgs.name;
|
|
33
|
+
if (!name || name.trim().length === 0) {
|
|
34
|
+
throw new ValidationError("Name is required and cannot be empty");
|
|
35
|
+
}
|
|
36
|
+
let credentials = resolveCredentials(initArgs);
|
|
37
|
+
if (credentials.kind === "prompt") {
|
|
38
|
+
const passcode = yield* readPasscode("Passcode:");
|
|
39
|
+
requirePasscode(passcode);
|
|
40
|
+
const retry = yield* readPasscode("Re-enter passcode:");
|
|
41
|
+
requirePasscode(retry);
|
|
42
|
+
if (passcode !== retry)
|
|
43
|
+
throw new ValidationError("Passcodes do not match");
|
|
44
|
+
credentials = passcodeCredentials(passcode);
|
|
45
|
+
}
|
|
46
|
+
const cf = initArgs.configFile
|
|
47
|
+
? (yield* createConfiger({
|
|
48
|
+
name: initArgs.configFile,
|
|
49
|
+
base: "",
|
|
50
|
+
temp: false,
|
|
51
|
+
headDirPath: initArgs.configDir,
|
|
52
|
+
reopen: true,
|
|
53
|
+
clear: false,
|
|
54
|
+
}))
|
|
55
|
+
: undefined;
|
|
56
|
+
let hby;
|
|
57
|
+
let created;
|
|
58
|
+
let failure;
|
|
59
|
+
try {
|
|
60
|
+
let seed;
|
|
61
|
+
let aeid;
|
|
62
|
+
if (credentials.kind === "encrypted") {
|
|
63
|
+
seed = credentials.seed;
|
|
64
|
+
aeid = credentials.aeid;
|
|
65
|
+
}
|
|
66
|
+
hby = yield* createHabery({
|
|
67
|
+
name,
|
|
68
|
+
base: initArgs.base ?? "",
|
|
69
|
+
headDirPath: initArgs.headDirPath,
|
|
70
|
+
temp: initArgs.temp ?? false,
|
|
71
|
+
cf,
|
|
72
|
+
skipConfig: !cf,
|
|
73
|
+
skipSignator: true,
|
|
74
|
+
aeid,
|
|
75
|
+
seed,
|
|
76
|
+
salt: initArgs.salt,
|
|
77
|
+
});
|
|
78
|
+
assertBootstrapComplete(yield* resolveBootstrap(hby, new FetchHttpClient()));
|
|
79
|
+
created = { keystore: hby.ks.path, database: hby.db.path, aeid: hby.mgr.aeid };
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
failure = { error };
|
|
83
|
+
throw error;
|
|
84
|
+
}
|
|
85
|
+
finally {
|
|
86
|
+
try {
|
|
87
|
+
if (hby)
|
|
88
|
+
yield* hby.close();
|
|
89
|
+
else if (cf)
|
|
90
|
+
yield* cf.close();
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (failure) {
|
|
94
|
+
// deno-lint-ignore no-unsafe-finally -- Preserve initialization and shutdown failures.
|
|
95
|
+
throw new AggregateError([failure.error, error], "Initialization and database close failed", {
|
|
96
|
+
cause: failure.error,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
// deno-lint-ignore no-unsafe-finally -- Final success requires resource closure.
|
|
100
|
+
throw error;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
console.log("KERI Keystore created at:", created.keystore);
|
|
104
|
+
console.log("KERI Database created at:", created.database);
|
|
105
|
+
if (created.aeid)
|
|
106
|
+
console.log("\taeid:", created.aeid);
|
|
107
|
+
}
|
|
108
|
+
/** Refuse empty secrets without changing passcode normalization or derivation. */
|
|
109
|
+
function requirePasscode(passcode) {
|
|
110
|
+
if (passcode.trim().length === 0)
|
|
111
|
+
throw new ValidationError("Passcode cannot be empty");
|
|
112
|
+
if (passcode.length < 21)
|
|
113
|
+
throw new ValidationError("Passcode must contain at least 21 characters");
|
|
114
|
+
}
|
|
115
|
+
/** Derive once through the same primitive path used for encrypted Habery reopen. */
|
|
116
|
+
function passcodeCredentials(passcode) {
|
|
117
|
+
requirePasscode(passcode);
|
|
118
|
+
return { kind: "encrypted", ...branToSeedAeid(passcode) };
|
|
119
|
+
}
|
|
120
|
+
/** Validate one explicit encryption method, including a matching AEID/seed pair. */
|
|
121
|
+
function resolveCredentials(args) {
|
|
122
|
+
const passcodeProvided = args.passcode !== undefined;
|
|
123
|
+
const aeidProvided = args.aeid !== undefined;
|
|
124
|
+
const seedProvided = args.seed !== undefined;
|
|
125
|
+
if (args.nopasscode) {
|
|
126
|
+
if (passcodeProvided || aeidProvided || seedProvided) {
|
|
127
|
+
throw new ValidationError("--nopasscode cannot be combined with --passcode, --aeid or --seed");
|
|
128
|
+
}
|
|
129
|
+
return { kind: "plaintext" };
|
|
130
|
+
}
|
|
131
|
+
if (passcodeProvided) {
|
|
132
|
+
if (aeidProvided || seedProvided) {
|
|
133
|
+
throw new ValidationError("Choose either --passcode or --aeid with --seed");
|
|
134
|
+
}
|
|
135
|
+
return passcodeCredentials(args.passcode);
|
|
136
|
+
}
|
|
137
|
+
if (aeidProvided || seedProvided) {
|
|
138
|
+
if (!args.aeid || !args.seed)
|
|
139
|
+
throw new ValidationError("--aeid and --seed must be supplied together");
|
|
140
|
+
try {
|
|
141
|
+
if (!new Encrypter({ verkey: args.aeid }).verifySeed(args.seed)) {
|
|
142
|
+
throw new ValidationError("Seed is not associated with the supplied AEID");
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
catch (cause) {
|
|
146
|
+
if (cause instanceof ValidationError)
|
|
147
|
+
throw cause;
|
|
148
|
+
throw new ValidationError("Invalid AEID/seed credentials", { cause });
|
|
149
|
+
}
|
|
150
|
+
return { kind: "encrypted", aeid: args.aeid, seed: args.seed };
|
|
151
|
+
}
|
|
152
|
+
return { kind: "prompt" };
|
|
153
|
+
}
|