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
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IPEX credential artifact assembly for registry-backed ACDC workflows.
|
|
3
|
+
*
|
|
4
|
+
* KERIpy correspondence:
|
|
5
|
+
* - mirrors the byte material gathered by `vdr.credentialing.sendArtifacts`
|
|
6
|
+
* and the grant/admit command helpers
|
|
7
|
+
* - keeps EXN route construction in `ipexing.ts`
|
|
8
|
+
* - keeps registry, wallet, and verifier persistence in VDR modules
|
|
9
|
+
*/
|
|
10
|
+
import { concatBytes, Counter, Ilks, parseBytes, parsePather, SerderACDC, SerderKERI, Vrsn_1_0, } from "cesr-ts";
|
|
11
|
+
import { resolveAttachmentGvrsn } from "../../core/attachment-countering.js";
|
|
12
|
+
import { ValidationError } from "../../core/errors.js";
|
|
13
|
+
import { dgKey } from "../../db/core/keys.js";
|
|
14
|
+
import { CredentialWallet, serializeCredential } from "../../vdr/credentialing.js";
|
|
15
|
+
import { telAnchorIncludes } from "../../vdr/tel-anchor.js";
|
|
16
|
+
import { validateCredentialSource } from "../credentials/credential-proposals.js";
|
|
17
|
+
import { acceptedEventReplayMessage } from "../identity/habbing.js";
|
|
18
|
+
import { envelopeFromFrame } from "../protocol/parsering.js";
|
|
19
|
+
import { chunkBytes } from "../transport/byte-source.js";
|
|
20
|
+
import { processMessages } from "../transport/message-source.js";
|
|
21
|
+
import { IPEX_GRANT_ROUTE, ipexAdmitExn, ipexGrantExn, ipexRecipient } from "./ipexing.js";
|
|
22
|
+
const textEncoder = new TextEncoder();
|
|
23
|
+
/** Build KERIpy-shaped support artifacts for one credential presentation. */
|
|
24
|
+
export function credentialSupportMessages(hby, reger, creder, recipient) {
|
|
25
|
+
const messages = [];
|
|
26
|
+
const issuer = creder.issuer;
|
|
27
|
+
if (!issuer) {
|
|
28
|
+
throw new ValidationError("Credential is missing issuer AID.");
|
|
29
|
+
}
|
|
30
|
+
const issuerKever = hby.db.getKever(issuer);
|
|
31
|
+
if (!issuerKever) {
|
|
32
|
+
throw new ValidationError(`Missing issuer KEL state for ${issuer}.`);
|
|
33
|
+
}
|
|
34
|
+
messages.push(...hby.db.cloneDelegation(issuerKever));
|
|
35
|
+
messages.push(...hby.db.clonePreIter(issuer, 0));
|
|
36
|
+
const issuee = credentialIssuee(creder);
|
|
37
|
+
if (issuee && issuee !== recipient) {
|
|
38
|
+
const issueeKever = hby.db.getKever(issuee);
|
|
39
|
+
if (!issueeKever) {
|
|
40
|
+
throw new ValidationError(`Missing issuee KEL state for ${issuee}.`);
|
|
41
|
+
}
|
|
42
|
+
messages.push(...hby.db.cloneDelegation(issueeKever));
|
|
43
|
+
messages.push(...hby.db.clonePreIter(issuee, 0));
|
|
44
|
+
}
|
|
45
|
+
const registry = creder.regid;
|
|
46
|
+
if (registry) {
|
|
47
|
+
messages.push(...reger.clonePreIter(registry, 0));
|
|
48
|
+
}
|
|
49
|
+
const said = credentialSaid(creder);
|
|
50
|
+
messages.push(...reger.clonePreIter(said, 0));
|
|
51
|
+
return messages;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Build the full raw credential stream equivalent of KERIpy `sendCredential`.
|
|
55
|
+
*
|
|
56
|
+
* IPEX grant sends the support artifacts and recursively chained source
|
|
57
|
+
* credentials separately, then embeds the top-level credential in the grant
|
|
58
|
+
* EXN. Raw import/export paths can append the top-level credential message too.
|
|
59
|
+
*/
|
|
60
|
+
export function credentialStreamMessages(hby, reger, creder, recipient, gvrsn = Vrsn_1_0) {
|
|
61
|
+
return [
|
|
62
|
+
...credentialPresentationSupportMessages(hby, reger, creder, recipient, gvrsn),
|
|
63
|
+
credentialExportMessage(reger, credentialSaid(creder)),
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
/** Build the support stream used before sending a credential grant EXN. */
|
|
67
|
+
export function credentialPresentationSupportMessages(hby, reger, creder, recipient, gvrsn = Vrsn_1_0) {
|
|
68
|
+
const messages = credentialSupportMessages(hby, reger, creder, recipient);
|
|
69
|
+
for (const [source, atc] of reger.sources(hby.db, creder, gvrsn)) {
|
|
70
|
+
messages.push(...credentialSupportMessages(hby, reger, source, recipient));
|
|
71
|
+
messages.push(concatBytes(source.raw, atc));
|
|
72
|
+
}
|
|
73
|
+
return messages;
|
|
74
|
+
}
|
|
75
|
+
/** Build grant-embedded `acdc`, `iss`, and `anc` artifacts for one credential. */
|
|
76
|
+
export function credentialPresentationArtifacts(hby, reger, credentialSaidValue, gvrsn = Vrsn_1_0) {
|
|
77
|
+
const [creder, prefixer, number, diger] = reger.cloneCred(credentialSaidValue);
|
|
78
|
+
const acdc = serializeCredential(creder, prefixer, number, diger, gvrsn);
|
|
79
|
+
const iss = reger.cloneTvtAt(credentialSaidValue, 0, gvrsn);
|
|
80
|
+
const iserder = new SerderKERI({ raw: iss });
|
|
81
|
+
if (!iserder.said) {
|
|
82
|
+
throw new ValidationError(`Credential TEL message ${credentialSaidValue} is missing SAID.`);
|
|
83
|
+
}
|
|
84
|
+
if (iserder.pre !== prefixer.qb64 || iserder.snh !== number.numh || iserder.said !== diger.qb64) {
|
|
85
|
+
throw new ValidationError(`Credential source seal mismatch for ${credentialSaidValue}.`);
|
|
86
|
+
}
|
|
87
|
+
const telAnchor = reger.ancs.get(dgKey(credentialSaidValue, iserder.said));
|
|
88
|
+
if (!telAnchor) {
|
|
89
|
+
throw new ValidationError(`Credential TEL anchor missing for ${credentialSaidValue}.`);
|
|
90
|
+
}
|
|
91
|
+
const issuer = creder.issuer;
|
|
92
|
+
if (!issuer) {
|
|
93
|
+
throw new ValidationError(`Credential ${credentialSaidValue} is missing issuer.`);
|
|
94
|
+
}
|
|
95
|
+
const [anchorNumber, anchorDiger] = telAnchor;
|
|
96
|
+
const sn = Number(anchorNumber.num);
|
|
97
|
+
if (!Number.isSafeInteger(sn)) {
|
|
98
|
+
throw new ValidationError(`Credential anchor sequence is too large for replay: ${anchorNumber.qb64}.`);
|
|
99
|
+
}
|
|
100
|
+
const replay = acceptedEventReplayMessage(hby, issuer, sn, gvrsn);
|
|
101
|
+
if (replay.serder.said !== anchorDiger.qb64) {
|
|
102
|
+
throw new ValidationError(`Credential anchor event ${replay.serder.said ?? "<missing>"} did not match ${anchorDiger.qb64}.`);
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
acdc: { wire: acdc, genus: resolveAttachmentGvrsn(creder, gvrsn) },
|
|
106
|
+
iss: { wire: iss, genus: resolveAttachmentGvrsn(iserder, gvrsn) },
|
|
107
|
+
anc: { wire: replay.message, genus: resolveAttachmentGvrsn(replay.serder, gvrsn) },
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Check a grant against this member's verified credential and accepted issuer/TEL
|
|
112
|
+
* evidence before signing. A group holder may present another issuer's credential.
|
|
113
|
+
* Optional legacy embeds/proofs may be omitted when that authority is already
|
|
114
|
+
* local; supplied bodies and source seals must agree with it. Nothing is written.
|
|
115
|
+
*/
|
|
116
|
+
export function credentialGrantReady(hby, reger, grant, attachments, genus) {
|
|
117
|
+
if (grant.route !== IPEX_GRANT_ROUTE)
|
|
118
|
+
throw new ValidationError("Expected an IPEX grant.");
|
|
119
|
+
const embeds = embeddedSection(grant);
|
|
120
|
+
const creder = acdcBody(embeds?.acdc, "acdc");
|
|
121
|
+
if (!creder.verify())
|
|
122
|
+
throw new ValidationError("Grant credential has an invalid SAID.");
|
|
123
|
+
const suppliedIss = embeds?.iss === undefined ? null : keriBody(embeds.iss, "iss");
|
|
124
|
+
const suppliedAnc = embeds?.anc === undefined ? null : keriBody(embeds.anc, "anc");
|
|
125
|
+
if (suppliedIss
|
|
126
|
+
&& (!suppliedIss.verify() || ![Ilks.iss, Ilks.bis].some(ilk => ilk === suppliedIss.ilk)
|
|
127
|
+
|| suppliedIss.pre !== creder.said || suppliedIss.sn !== 0)) {
|
|
128
|
+
throw new ValidationError("Grant issuance does not match its credential.");
|
|
129
|
+
}
|
|
130
|
+
if (suppliedAnc && (!suppliedAnc.verify() || suppliedAnc.pre !== creder.issuer)) {
|
|
131
|
+
throw new ValidationError("Grant anchor does not match its credential issuer.");
|
|
132
|
+
}
|
|
133
|
+
const frames = parseBytes(concatBytes(Counter.makeGVC(genus), grant.raw, attachments));
|
|
134
|
+
if (frames.length !== 1)
|
|
135
|
+
throw new ValidationError("Grant evidence must contain one exchange.");
|
|
136
|
+
const paths = envelopeFromFrame(frames[0]).ptds.map(group => group.raw);
|
|
137
|
+
if (!reger.saved.get([creder.said]))
|
|
138
|
+
return false;
|
|
139
|
+
const expected = credentialPresentationArtifacts(hby, reger, creder.said, genus);
|
|
140
|
+
const issuance = new SerderKERI({ raw: expected.iss.wire });
|
|
141
|
+
if (suppliedIss && suppliedIss.said !== issuance.said) {
|
|
142
|
+
throw new ValidationError("Grant issuance conflicts with the saved credential.");
|
|
143
|
+
}
|
|
144
|
+
const source = pathedAttachment(paths, "acdc");
|
|
145
|
+
if (source.length)
|
|
146
|
+
validateCredentialSource(creder, issuance, source, genus);
|
|
147
|
+
if (suppliedAnc && !acceptedGrantAnchor(hby, creder.issuer, issuance, suppliedAnc))
|
|
148
|
+
return false;
|
|
149
|
+
const telProof = pathedAttachment(paths, "iss");
|
|
150
|
+
if (telProof.length) {
|
|
151
|
+
const proofFrames = parseBytes(concatBytes(Counter.makeGVC(genus), issuance.raw, telProof));
|
|
152
|
+
if (proofFrames.length !== 1)
|
|
153
|
+
throw new ValidationError("Grant TEL evidence must contain one event.");
|
|
154
|
+
const seal = envelopeFromFrame(proofFrames[0]).lastSsc;
|
|
155
|
+
if (seal) {
|
|
156
|
+
if (seal.s.num > BigInt(Number.MAX_SAFE_INTEGER)) {
|
|
157
|
+
throw new ValidationError("Grant issuer anchor exceeds supported storage ordinals.");
|
|
158
|
+
}
|
|
159
|
+
const anchor = hby.db.getEvtSerder(creder.issuer, seal.d.qb64);
|
|
160
|
+
if (!anchor)
|
|
161
|
+
return false;
|
|
162
|
+
if (anchor.sn !== Number(seal.s.num) || (suppliedAnc && suppliedAnc.said !== anchor.said)) {
|
|
163
|
+
throw new ValidationError("Grant TEL source seal does not match its anchor.");
|
|
164
|
+
}
|
|
165
|
+
if (!acceptedGrantAnchor(hby, creder.issuer, issuance, anchor))
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return true;
|
|
170
|
+
}
|
|
171
|
+
/** Local accepted KEL authority, not a proposed anchor or proof supplied by its wrapper. */
|
|
172
|
+
function acceptedGrantAnchor(hby, issuer, issuance, anchor) {
|
|
173
|
+
if (anchor.sn === null || !Number.isSafeInteger(anchor.sn)) {
|
|
174
|
+
throw new ValidationError("Grant anchor sequence exceeds supported storage ordinals.");
|
|
175
|
+
}
|
|
176
|
+
const accepted = hby.db.kels.getLast(issuer, anchor.sn);
|
|
177
|
+
if (!accepted)
|
|
178
|
+
return false;
|
|
179
|
+
if (accepted !== anchor.said || !telAnchorIncludes(issuer, issuance, anchor)) {
|
|
180
|
+
throw new ValidationError("Grant anchor does not bind the saved credential issuance.");
|
|
181
|
+
}
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
/** Build a signed `/ipex/grant` message with embedded credential artifacts. */
|
|
185
|
+
export function ipexCredentialGrant(args) {
|
|
186
|
+
const [creder] = args.reger.cloneCred(args.credentialSaid);
|
|
187
|
+
const gvrsn = args.options?.gvrsn ?? Vrsn_1_0;
|
|
188
|
+
const artifacts = credentialPresentationArtifacts(args.hby, args.reger, args.credentialSaid, gvrsn);
|
|
189
|
+
const support = credentialPresentationSupportMessages(args.hby, args.reger, creder, args.recipient, gvrsn);
|
|
190
|
+
const [grant, attachments] = ipexGrantExn(args.hab, args.recipient, args.message ?? "", artifacts.acdc.wire, {
|
|
191
|
+
...(args.options ?? {}),
|
|
192
|
+
iss: artifacts.iss.wire,
|
|
193
|
+
anc: artifacts.anc.wire,
|
|
194
|
+
agree: args.options?.agree ?? null,
|
|
195
|
+
});
|
|
196
|
+
if (!credentialGrantReady(args.hby, args.reger, grant, attachments, gvrsn)) {
|
|
197
|
+
throw new ValidationError(`Credential ${args.credentialSaid} is missing verified local evidence.`);
|
|
198
|
+
}
|
|
199
|
+
return {
|
|
200
|
+
grant,
|
|
201
|
+
attachments,
|
|
202
|
+
wire: args.sign === false ? new Uint8Array() : concatBytes(args.hab.endorse(grant, { pipelined: false, gvrsn }), attachments),
|
|
203
|
+
artifacts,
|
|
204
|
+
support,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Validate a supplied accepted grant's recipient and wallet obligation before signing.
|
|
209
|
+
* Explicit no-wait authoring may skip the saved marker; it does not establish
|
|
210
|
+
* wallet acceptance. Peer approval always checks its own wallet independently.
|
|
211
|
+
*/
|
|
212
|
+
export function validateAdmitGrant(grant, recipient, reger, requireSaved = true) {
|
|
213
|
+
if (grant.route !== IPEX_GRANT_ROUTE) {
|
|
214
|
+
throw new ValidationError(`Expected ${IPEX_GRANT_ROUTE} grant, got ${grant.route ?? "<none>"}.`);
|
|
215
|
+
}
|
|
216
|
+
if (ipexRecipient(grant) !== recipient) {
|
|
217
|
+
throw new ValidationError("Grant recipient does not match the admitting identifier.");
|
|
218
|
+
}
|
|
219
|
+
const said = credentialSaidFromGrant(grant);
|
|
220
|
+
if (!said)
|
|
221
|
+
throw new ValidationError("Grant is missing embedded ACDC SAID.");
|
|
222
|
+
if (requireSaved && !reger.saved.get([said]))
|
|
223
|
+
throw new ValidationError(`Credential ${said} is not saved locally.`);
|
|
224
|
+
return said;
|
|
225
|
+
}
|
|
226
|
+
/** Build an admit after validating its grant; group callers defer the endorsement. */
|
|
227
|
+
export function ipexCredentialAdmit(args) {
|
|
228
|
+
validateAdmitGrant(args.grant, args.hab.pre, args.reger, args.options?.requireSaved ?? true);
|
|
229
|
+
const [admit, attachments] = ipexAdmitExn(args.hab, args.message ?? "", args.grant, args.options ?? {});
|
|
230
|
+
return {
|
|
231
|
+
admit,
|
|
232
|
+
attachments,
|
|
233
|
+
wire: args.sign === false ? new Uint8Array() : concatBytes(args.hab.endorse(admit, { pipelined: false, gvrsn: args.options?.gvrsn ?? undefined }), attachments),
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Parse grant-embedded artifacts in KERIpy admit order: `anc`, `iss`, `acdc`.
|
|
238
|
+
*
|
|
239
|
+
* @param protocol Borrowed shared protocol processor; this operation owns its parser and input-specific Kevery.
|
|
240
|
+
* @param artifacts Grant-embedded anchor, issuance and credential streams in their named fields.
|
|
241
|
+
*/
|
|
242
|
+
export function* processCredentialPresentationArtifacts(protocol, artifacts) {
|
|
243
|
+
const kvy = protocol.makeKevery();
|
|
244
|
+
// Each artifact carries its own attachment genus; finish its dispatch before opening the next.
|
|
245
|
+
for (const artifact of [artifacts.anc, artifacts.iss, artifacts.acdc]) {
|
|
246
|
+
const bytes = concatBytes(Counter.makeGVC(artifact.genus), artifact.wire);
|
|
247
|
+
yield* processMessages((signal) => chunkBytes(bytes, { signal }), protocol, kvy);
|
|
248
|
+
}
|
|
249
|
+
// Recurring IPEX/verifier callers retain their existing single-pass escrow scheduling.
|
|
250
|
+
yield* protocol.processEscrowsOnce();
|
|
251
|
+
}
|
|
252
|
+
/** Rebuild grant-embedded `anc`, `iss`, and `acdc` streams from exchange storage. */
|
|
253
|
+
export function storedGrantArtifacts(hby, grant, gvrsn = Vrsn_1_0) {
|
|
254
|
+
if (!grant.said)
|
|
255
|
+
throw new ValidationError("Grant is missing its SAID.");
|
|
256
|
+
return grantPresentationArtifacts(grant, hby.db.epath.get([grant.said]).map(text => textEncoder.encode(text)), gvrsn);
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Decode the supplied grant's bodies and counted path groups without storage or
|
|
260
|
+
* admission. Approval passes the selected proposal's own evidence; stored replay
|
|
261
|
+
* passes its retained LMDB groups. Neither source can substitute for the other.
|
|
262
|
+
*/
|
|
263
|
+
export function grantPresentationArtifacts(grant, pathed, gvrsn = Vrsn_1_0) {
|
|
264
|
+
if (grant.route !== IPEX_GRANT_ROUTE || !grant.said) {
|
|
265
|
+
throw new ValidationError(`Expected ${IPEX_GRANT_ROUTE} EXN.`);
|
|
266
|
+
}
|
|
267
|
+
const embeds = embeddedSection(grant);
|
|
268
|
+
if (!embeds) {
|
|
269
|
+
throw new ValidationError(`Grant ${grant.said} is missing embedded artifacts.`);
|
|
270
|
+
}
|
|
271
|
+
return {
|
|
272
|
+
anc: storedArtifact(keriBody(embeds.anc, "anc"), pathedAttachment(pathed, "anc"), gvrsn),
|
|
273
|
+
iss: storedArtifact(keriBody(embeds.iss, "iss"), pathedAttachment(pathed, "iss"), gvrsn),
|
|
274
|
+
acdc: storedArtifact(acdcBody(embeds.acdc, "acdc"), pathedAttachment(pathed, "acdc"), gvrsn),
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
/** Extract the embedded credential SAID from an accepted `/ipex/grant`. */
|
|
278
|
+
export function credentialSaidFromGrant(grant) {
|
|
279
|
+
const embeds = embeddedSection(grant);
|
|
280
|
+
const acdc = embeds?.acdc;
|
|
281
|
+
if (!isRecord(acdc))
|
|
282
|
+
return null;
|
|
283
|
+
const said = acdc.d;
|
|
284
|
+
return typeof said === "string" ? said : null;
|
|
285
|
+
}
|
|
286
|
+
/** Return a raw exported credential message by SAID. */
|
|
287
|
+
export function credentialExportMessage(reger, credentialSaidValue) {
|
|
288
|
+
return new CredentialWallet(reger).exportCredential(credentialSaidValue);
|
|
289
|
+
}
|
|
290
|
+
function credentialSaid(creder) {
|
|
291
|
+
if (!creder.said) {
|
|
292
|
+
throw new ValidationError("Credential is missing SAID.");
|
|
293
|
+
}
|
|
294
|
+
return creder.said;
|
|
295
|
+
}
|
|
296
|
+
function credentialIssuee(creder) {
|
|
297
|
+
const attrib = creder.attrib;
|
|
298
|
+
if (isRecord(attrib)) {
|
|
299
|
+
const issuee = attrib.i;
|
|
300
|
+
return typeof issuee === "string" ? issuee : null;
|
|
301
|
+
}
|
|
302
|
+
return null;
|
|
303
|
+
}
|
|
304
|
+
/** Project only grant children; protocol readers below own body reconstruction. */
|
|
305
|
+
function embeddedSection(serder) {
|
|
306
|
+
const ked = serder.ked;
|
|
307
|
+
if (!ked)
|
|
308
|
+
return null;
|
|
309
|
+
const embeds = isRecord(ked.e) ? ked.e : isRecord(ked.a) && isRecord(ked.a.e) ? ked.a.e : null;
|
|
310
|
+
return embeds ? { anc: embeds.anc, iss: embeds.iss, acdc: embeds.acdc } : null;
|
|
311
|
+
}
|
|
312
|
+
/** Wire/schema-defined SAD keys remain unknown until a named-field check or Serder validates them. */
|
|
313
|
+
function isRecord(value) {
|
|
314
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
315
|
+
}
|
|
316
|
+
function keriBody(value, label) {
|
|
317
|
+
if (!isRecord(value)) {
|
|
318
|
+
throw new ValidationError(`Grant embedded ${label} is missing.`);
|
|
319
|
+
}
|
|
320
|
+
return new SerderKERI({ sad: value });
|
|
321
|
+
}
|
|
322
|
+
function acdcBody(value, label) {
|
|
323
|
+
if (!isRecord(value)) {
|
|
324
|
+
throw new ValidationError(`Grant embedded ${label} is missing.`);
|
|
325
|
+
}
|
|
326
|
+
return new SerderACDC({ sad: value, verify: false });
|
|
327
|
+
}
|
|
328
|
+
/** Use the receiver-configured child genus; legacy parent framing does not determine it. */
|
|
329
|
+
function storedArtifact(body, attachment, gvrsn) {
|
|
330
|
+
return { wire: concatBytes(body.raw, attachment), genus: resolveAttachmentGvrsn(body, gvrsn) };
|
|
331
|
+
}
|
|
332
|
+
function pathedAttachment(pathed, label) {
|
|
333
|
+
const path = `/e/${label}`;
|
|
334
|
+
for (const raw of pathed) {
|
|
335
|
+
const attachment = pathedAttachmentFromRaw(raw, path);
|
|
336
|
+
if (attachment) {
|
|
337
|
+
return attachment;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return new Uint8Array();
|
|
341
|
+
}
|
|
342
|
+
function pathedAttachmentFromRaw(raw, path) {
|
|
343
|
+
if (raw.length === 0) {
|
|
344
|
+
return null;
|
|
345
|
+
}
|
|
346
|
+
const counter = new Counter({ qb64b: raw });
|
|
347
|
+
const body = raw.slice(counter.fullSize);
|
|
348
|
+
try {
|
|
349
|
+
const pather = parsePather(body, "txt");
|
|
350
|
+
if (pather.path === path) {
|
|
351
|
+
return body.slice(pather.fullSize);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
catch {
|
|
355
|
+
// A multisig wrapper can preserve the grant's own pathed-material group as
|
|
356
|
+
// the counted payload. In that case unwrap one group layer and retry.
|
|
357
|
+
}
|
|
358
|
+
return body[0] === "-".charCodeAt(0) ? pathedAttachmentFromRaw(body, path) : null;
|
|
359
|
+
}
|
|
@@ -1,39 +1,25 @@
|
|
|
1
|
-
/** Borrowed
|
|
2
|
-
import { Compactor, makePather,
|
|
3
|
-
import {
|
|
4
|
-
const sectionLabels = new Set(["d", "u", "o", "w"]);
|
|
5
|
-
const groupLabels = new Set([...sectionLabels, "s"]);
|
|
6
|
-
const nodeLabels = new Set(["d", "u", "n", "s", "o", "w"]);
|
|
1
|
+
/** Borrowed IPEX frame DAGs, negotiated disclosure paths and traversal policy. */
|
|
2
|
+
import { Compactor, makePather, SerderACDC } from "cesr-ts";
|
|
3
|
+
import { acdcEdgeBlocks as blocks, acdcEdgeTarget, acdcGroupLabels } from "../../acdc/chaining.js";
|
|
7
4
|
const nodeIlks = new Set([null, "acm", "ace", "act", "acg"]);
|
|
8
|
-
|
|
5
|
+
/** Empty UUID marks field-map metadata; fixed-field public credentials keep that slot empty too. */
|
|
6
|
+
export function isIpexMetadata(node) {
|
|
7
|
+
return [null, "acm", "ace"].includes(node.ilk) && node.sad.u === "";
|
|
8
|
+
}
|
|
9
|
+
/** Offers carry bodies only; empty counted feet convey no child evidence. */
|
|
10
|
+
export function hasIpexNodeAttachments(frame) {
|
|
11
|
+
return frame.attachments.some((group) => group.items.length > 0)
|
|
12
|
+
|| Boolean(frame.essrs?.length || frame.nests?.length);
|
|
13
|
+
}
|
|
9
14
|
/** SAD maps, including null-prototype maps, exclude scalar/array representations. */
|
|
10
15
|
function record(value) {
|
|
11
16
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
12
17
|
}
|
|
13
|
-
/** Required SAIDs must have valid digest-qualified CESR material. */
|
|
14
|
-
function validSaid(value) {
|
|
15
|
-
if (typeof value !== "string")
|
|
16
|
-
return false;
|
|
17
|
-
try {
|
|
18
|
-
return new Saider({ qb64: value }).qb64 === value;
|
|
19
|
-
}
|
|
20
|
-
catch {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
18
|
/** Python's empty section containers carry no disclosed edge semantics. */
|
|
25
19
|
function present(value) {
|
|
26
20
|
return Array.isArray(value) ? value.length > 0 : record(value) ? Object.keys(value).length > 0 : Boolean(value);
|
|
27
21
|
}
|
|
28
|
-
/**
|
|
29
|
-
function blocks(value) {
|
|
30
|
-
if (!present(value))
|
|
31
|
-
return [];
|
|
32
|
-
if (record(value))
|
|
33
|
-
return [value];
|
|
34
|
-
return Array.isArray(value) && value.every(record) ? value : null;
|
|
35
|
-
}
|
|
36
|
-
/** Validate the frozen single-DAG disclosure triple grammar without parsing child bytes. */
|
|
22
|
+
/** Validate disclosure-query shape; actual schema commitments are checked against disclosed nodes. */
|
|
37
23
|
export function validDisclosurePlan(value) {
|
|
38
24
|
if (!Array.isArray(value))
|
|
39
25
|
return false;
|
|
@@ -67,6 +53,10 @@ export function validDisclosurePlan(value) {
|
|
|
67
53
|
}
|
|
68
54
|
return true;
|
|
69
55
|
}
|
|
56
|
+
/** Decode exactly one wire DAG without accepting the retired flat q.dp shape. */
|
|
57
|
+
export function singleDagDisclosurePlan(value) {
|
|
58
|
+
return Array.isArray(value) && value.length === 1 && validDisclosurePlan(value[0]) ? value[0] : null;
|
|
59
|
+
}
|
|
70
60
|
/**
|
|
71
61
|
* Index unique disclosed credential nodes and walk their reachable graph in BFS order.
|
|
72
62
|
* Offers may omit far nodes; grants require every referenced node. Nested ownership
|
|
@@ -88,6 +78,7 @@ export function walkIpexGraph(origin, nests, closed) {
|
|
|
88
78
|
return null;
|
|
89
79
|
const seen = new Set();
|
|
90
80
|
const order = [];
|
|
81
|
+
const dependencies = new Map();
|
|
91
82
|
const queue = [origin];
|
|
92
83
|
for (let index = 0; index < queue.length; index++) {
|
|
93
84
|
const said = queue[index];
|
|
@@ -95,35 +86,59 @@ export function walkIpexGraph(origin, nests, closed) {
|
|
|
95
86
|
continue;
|
|
96
87
|
seen.add(said);
|
|
97
88
|
order.push(said);
|
|
89
|
+
const farNodes = new Set();
|
|
90
|
+
dependencies.set(said, farNodes);
|
|
98
91
|
const edges = blocks(nodes.get(said).body.sad.e);
|
|
99
92
|
if (!edges)
|
|
100
93
|
return null;
|
|
101
|
-
const groups = edges
|
|
94
|
+
const groups = [...edges];
|
|
102
95
|
for (let g = 0; g < groups.length; g++) {
|
|
103
|
-
const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
96
|
+
const edge = groups[g];
|
|
97
|
+
const target = acdcEdgeTarget(edge);
|
|
98
|
+
if (target === false)
|
|
99
|
+
return null;
|
|
100
|
+
if (typeof target === "string") {
|
|
101
|
+
if (!nodes.has(target)) {
|
|
108
102
|
if (closed)
|
|
109
103
|
return null;
|
|
110
104
|
}
|
|
111
|
-
else
|
|
112
|
-
|
|
105
|
+
else {
|
|
106
|
+
farNodes.add(target);
|
|
107
|
+
if (!seen.has(target))
|
|
108
|
+
queue.push(target);
|
|
109
|
+
}
|
|
113
110
|
}
|
|
114
111
|
else {
|
|
115
|
-
|
|
112
|
+
if (!record(edge))
|
|
113
|
+
return null;
|
|
116
114
|
for (const [key, value] of Object.entries(edge)) {
|
|
117
|
-
if (
|
|
115
|
+
if (acdcGroupLabels.has(key) || typeof value === "string")
|
|
118
116
|
continue;
|
|
119
|
-
|
|
120
|
-
return null;
|
|
121
|
-
groups.push({ edge: value, nested: true });
|
|
117
|
+
groups.push(value);
|
|
122
118
|
}
|
|
123
119
|
}
|
|
124
120
|
}
|
|
125
121
|
}
|
|
126
|
-
|
|
122
|
+
if (seen.size !== nodes.size)
|
|
123
|
+
return null;
|
|
124
|
+
const parents = new Map();
|
|
125
|
+
for (const [near, children] of dependencies) {
|
|
126
|
+
for (const far of children) {
|
|
127
|
+
if (!parents.has(far))
|
|
128
|
+
parents.set(far, new Set());
|
|
129
|
+
parents.get(far).add(near);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const dependencyOrder = order.filter((said) => dependencies.get(said).size === 0);
|
|
133
|
+
for (let i = 0; i < dependencyOrder.length; i++) {
|
|
134
|
+
for (const near of parents.get(dependencyOrder[i]) ?? []) {
|
|
135
|
+
const children = dependencies.get(near);
|
|
136
|
+
children.delete(dependencyOrder[i]);
|
|
137
|
+
if (!children.size)
|
|
138
|
+
dependencyOrder.push(near);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return dependencyOrder.length === nodes.size ? { nodes, order } : null;
|
|
127
142
|
}
|
|
128
143
|
/** Compare SAD values structurally while retaining list order; map insertion order is not semantic here. */
|
|
129
144
|
function equal(a, b) {
|
|
@@ -137,8 +152,10 @@ function equal(a, b) {
|
|
|
137
152
|
}
|
|
138
153
|
return false;
|
|
139
154
|
}
|
|
140
|
-
/**
|
|
155
|
+
/** Select every disclosed node in exact BFS order using literal SAD paths and virtual far-node hops. */
|
|
141
156
|
export function verifyIpexDisclosure(plan, origin, graph) {
|
|
157
|
+
if (!plan.length || graph.order[0] !== origin)
|
|
158
|
+
return false;
|
|
142
159
|
const selected = [];
|
|
143
160
|
for (const [schema, prefix, fields] of plan) {
|
|
144
161
|
let said = origin;
|
|
@@ -151,18 +168,22 @@ export function verifyIpexDisclosure(plan, origin, graph) {
|
|
|
151
168
|
if (part === "_") {
|
|
152
169
|
if (!record(value) || typeof value.n !== "string")
|
|
153
170
|
return false;
|
|
154
|
-
|
|
171
|
+
const target = value.n;
|
|
172
|
+
said = target;
|
|
155
173
|
node = graph.nodes.get(said);
|
|
156
174
|
if (!node)
|
|
157
175
|
return false;
|
|
158
176
|
value = node.body.sad;
|
|
159
177
|
}
|
|
160
|
-
else
|
|
161
|
-
value
|
|
162
|
-
|
|
163
|
-
value
|
|
164
|
-
|
|
165
|
-
|
|
178
|
+
else {
|
|
179
|
+
if (record(value) && Object.hasOwn(value, part))
|
|
180
|
+
value = value[part];
|
|
181
|
+
else if (Array.isArray(value) && /^\d+$/.test(part) && Number(part) < value.length) {
|
|
182
|
+
value = value[Number(part)];
|
|
183
|
+
}
|
|
184
|
+
else
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
166
187
|
}
|
|
167
188
|
}
|
|
168
189
|
selected.push(said);
|
|
@@ -220,78 +241,3 @@ export function verifyIpexDisclosure(plan, origin, graph) {
|
|
|
220
241
|
}
|
|
221
242
|
return equal(selected, graph.order);
|
|
222
243
|
}
|
|
223
|
-
/** Check one declared edge relation and its schema pin after the graph's issuer proofs pass. */
|
|
224
|
-
function leafRelation(group, near, graph, inheritedSchema, db) {
|
|
225
|
-
if (Object.keys(group).some((key) => !nodeLabels.has(key)) || typeof group.n !== "string")
|
|
226
|
-
return null;
|
|
227
|
-
const far = graph.nodes.get(group.n)?.body;
|
|
228
|
-
if (!far)
|
|
229
|
-
return null;
|
|
230
|
-
const op = group.o;
|
|
231
|
-
const operators = op == null
|
|
232
|
-
? []
|
|
233
|
-
: typeof op === "string"
|
|
234
|
-
? [op]
|
|
235
|
-
: Array.isArray(op) && op.length && op.every((item) => typeof item === "string")
|
|
236
|
-
? op
|
|
237
|
-
: null;
|
|
238
|
-
if (!operators || operators.some((item) => !unaryOps.has(item)))
|
|
239
|
-
return null;
|
|
240
|
-
// The frozen reference recognizes these operators but leaves them unsatisfied.
|
|
241
|
-
if (operators.includes("NOT") || operators.includes("DI2I"))
|
|
242
|
-
return false;
|
|
243
|
-
if (operators.includes("E1E") && (!near.issuee || !far.issuee || near.issuee !== far.issuee))
|
|
244
|
-
return false;
|
|
245
|
-
if (operators.includes("I2I") && (!far.issuee || near.issuer !== far.issuee))
|
|
246
|
-
return false;
|
|
247
|
-
const schema = Object.hasOwn(group, "s") ? group.s : inheritedSchema;
|
|
248
|
-
if (schema == null)
|
|
249
|
-
return true;
|
|
250
|
-
if (typeof schema !== "string" && !record(schema))
|
|
251
|
-
return false;
|
|
252
|
-
const result = validateSchema(far, db, schema);
|
|
253
|
-
return result.kind === "missing" ? result : result.kind === "valid";
|
|
254
|
-
}
|
|
255
|
-
/** Evaluate AND/OR edge groups; malformed members cannot be hidden by a passing sibling. */
|
|
256
|
-
function groupRelation(group, near, graph, inheritedSchema, nested, db) {
|
|
257
|
-
const op = group.o ?? "AND";
|
|
258
|
-
if (op !== "AND" && op !== "OR")
|
|
259
|
-
return null;
|
|
260
|
-
const labels = nested ? groupLabels : sectionLabels;
|
|
261
|
-
const schema = nested && Object.hasOwn(group, "s") ? group.s : inheritedSchema;
|
|
262
|
-
const results = [];
|
|
263
|
-
for (const [key, node] of Object.entries(group)) {
|
|
264
|
-
if (labels.has(key))
|
|
265
|
-
continue;
|
|
266
|
-
if (!record(node))
|
|
267
|
-
return null;
|
|
268
|
-
const result = Object.hasOwn(node, "n")
|
|
269
|
-
? leafRelation(node, near, graph, schema, db)
|
|
270
|
-
: groupRelation(node, near, graph, schema, true, db);
|
|
271
|
-
if (result === null)
|
|
272
|
-
return null;
|
|
273
|
-
if (typeof result === "object")
|
|
274
|
-
return result;
|
|
275
|
-
results.push(result);
|
|
276
|
-
}
|
|
277
|
-
return !results.length ? null : op === "OR" ? results.some(Boolean) : results.every(Boolean);
|
|
278
|
-
}
|
|
279
|
-
/** Validate edge blocks against authenticated nodes; unavailable schemas remain typed dependencies. */
|
|
280
|
-
export function verifyIpexRelations(graph, db) {
|
|
281
|
-
for (const said of graph.order) {
|
|
282
|
-
const near = graph.nodes.get(said).body;
|
|
283
|
-
const edges = blocks(near.sad.e);
|
|
284
|
-
if (!edges)
|
|
285
|
-
return false;
|
|
286
|
-
for (const edge of edges) {
|
|
287
|
-
const matched = Object.hasOwn(edge, "n")
|
|
288
|
-
? leafRelation(edge, near, graph, null, db)
|
|
289
|
-
: groupRelation(edge, near, graph, null, false, db);
|
|
290
|
-
if (matched !== null && typeof matched === "object")
|
|
291
|
-
return matched;
|
|
292
|
-
if (matched !== true)
|
|
293
|
-
return false;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
return true;
|
|
297
|
-
}
|