keri-ts 1.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/esm/keri/npm/src/acdc/chaining.js +213 -0
- package/esm/keri/npm/src/acdc/dhking.js +716 -0
- package/esm/keri/npm/src/acdc/messaging.js +2 -0
- package/esm/keri/npm/src/acdc/observing.js +40 -7
- package/esm/keri/npm/src/acdc/regbasing.js +13 -2
- package/esm/keri/npm/src/acdc/regengine.js +71 -23
- package/esm/keri/npm/src/acdc/regeventing.js +163 -44
- package/esm/keri/npm/src/acdc/registering.js +93 -14
- package/esm/keri/npm/src/acdc/relating.js +59 -0
- package/esm/keri/npm/src/acdc/salting.js +720 -0
- package/esm/keri/npm/src/acdc/scheming.js +94 -39
- package/esm/keri/npm/src/acdc/unblinding.js +1042 -0
- package/esm/keri/npm/src/app/{authenticating.js → bootstrap/authenticating.js} +39 -18
- package/esm/keri/npm/src/app/bootstrap/bootstrapping.js +109 -0
- package/esm/keri/npm/src/app/{oobi-replies.js → bootstrap/oobi-replies.js} +8 -6
- package/esm/keri/npm/src/app/{oobiery.js → bootstrap/oobiery.js} +161 -75
- package/esm/keri/npm/src/app/credentials/credential-importing.js +201 -0
- package/esm/keri/npm/src/app/credentials/credential-proposals.js +120 -0
- package/esm/keri/npm/src/app/credentials/credential-revoking.js +165 -0
- package/esm/keri/npm/src/app/credentials/credential-workflows.js +365 -0
- package/esm/keri/npm/src/app/credentials/tel-publishing.js +27 -0
- package/esm/keri/npm/src/app/{verifying.js → credentials/verifying.js} +50 -6
- package/esm/keri/npm/src/app/delivery/forwarding.js +600 -0
- package/esm/keri/npm/src/app/delivery/introducing.js +68 -0
- package/esm/keri/npm/src/app/{reply-streams.js → delivery/reply-streams.js} +52 -7
- package/esm/keri/npm/src/app/delivery/respondant.js +159 -0
- package/esm/keri/npm/src/app/{stored-replies.js → delivery/stored-replies.js} +4 -4
- package/esm/keri/npm/src/app/exchanges/essr.js +111 -0
- package/esm/keri/npm/src/app/exchanges/exchange-messaging.js +66 -0
- package/esm/keri/npm/src/app/exchanges/exchanging.js +1354 -0
- package/esm/keri/npm/src/app/{configing.js → identity/configing.js} +4 -4
- package/esm/keri/npm/src/app/{delegating.js → identity/delegating.js} +99 -29
- package/esm/keri/npm/src/app/{endpoint-roleing.js → identity/endpoint-roleing.js} +36 -36
- package/esm/keri/npm/src/app/{habbing.js → identity/habbing.js} +232 -150
- package/esm/keri/npm/src/app/{keeping.js → identity/keeping.js} +60 -56
- package/esm/keri/npm/src/app/{organizing.js → identity/organizing.js} +47 -21
- package/esm/keri/npm/src/app/ipex/ipex-building.js +162 -0
- package/esm/keri/npm/src/app/{ipex-credentialing.js → ipex/ipex-credentialing.js} +142 -31
- package/esm/keri/npm/src/app/ipex/ipex-graph.js +243 -0
- package/esm/keri/npm/src/app/ipex/ipex-grouping.js +664 -0
- package/esm/keri/npm/src/app/{ipex-node-authentication.js → ipex/ipex-node-authentication.js} +83 -6
- package/esm/keri/npm/src/app/ipex/ipex-v2.js +692 -0
- package/esm/keri/npm/src/app/{ipexing.js → ipex/ipexing.js} +58 -1
- package/esm/keri/npm/src/app/mailbox/forward-handler.js +228 -0
- package/esm/keri/npm/src/app/{mailbox-director.js → mailbox/mailbox-director.js} +120 -15
- package/esm/keri/npm/src/app/mailbox/mailbox-poller.js +305 -0
- package/esm/keri/npm/src/app/mailbox/mailbox-sse.js +254 -0
- package/esm/keri/npm/src/app/{mailboxing.js → mailbox/mailboxing.js} +118 -67
- package/esm/keri/npm/src/app/mailbox/topic-routing.js +54 -0
- package/esm/keri/npm/src/app/multisig/group-members.js +173 -0
- package/esm/keri/npm/src/app/{grouping.js → multisig/grouping.js} +384 -70
- package/esm/keri/npm/src/app/multisig/multisig-messaging.js +164 -0
- package/esm/keri/npm/src/app/multisig/multisig-workflows.js +821 -0
- package/esm/keri/npm/src/app/{notifying.js → notifications/notifying.js} +8 -14
- package/esm/keri/npm/src/app/{signaling.js → notifications/signaling.js} +1 -1
- package/esm/keri/npm/src/app/{parsering.js → protocol/parsering.js} +86 -18
- package/esm/keri/npm/src/app/protocol/protocol-processing.js +245 -0
- package/esm/keri/npm/src/app/protocol/reactor.js +55 -0
- package/esm/keri/npm/src/app/{query-replies.js → queries/query-replies.js} +57 -6
- package/esm/keri/npm/src/app/queries/querying.js +306 -0
- package/esm/keri/npm/src/app/queries/witness-inquisitor.js +415 -0
- package/esm/keri/npm/src/app/{abortable.js → runtime/abortable.js} +43 -4
- package/esm/keri/npm/src/app/runtime/agent-runtime.js +633 -0
- package/esm/keri/npm/src/app/runtime/cue-runtime.js +61 -0
- package/esm/keri/npm/src/app/runtime/runtime-clock.js +6 -0
- package/esm/keri/npm/src/app/{byte-source.js → transport/byte-source.js} +36 -6
- package/esm/keri/npm/src/app/transport/cesr-egress.js +317 -0
- package/esm/keri/npm/src/app/{cesr-http.js → transport/cesr-http.js} +20 -55
- package/esm/keri/npm/src/app/transport/http-client.js +172 -0
- package/esm/keri/npm/src/app/transport/http-messenger.js +52 -0
- package/esm/keri/npm/src/app/transport/http-stream-messenger.js +60 -0
- package/esm/keri/npm/src/app/transport/httping.js +57 -0
- package/esm/keri/npm/src/app/transport/message-source.js +77 -0
- package/esm/keri/npm/src/app/transport/messengering.js +68 -0
- package/esm/keri/npm/src/app/{socket-source.js → transport/socket-source.js} +39 -2
- package/esm/keri/npm/src/app/transport/tcp-egress.js +377 -0
- package/esm/keri/npm/src/app/transport/tcp-messenger.js +162 -0
- package/esm/keri/npm/src/app/transport/tcp-stream-messenger.js +40 -0
- package/esm/keri/npm/src/app/transport/transport-error.js +14 -0
- package/esm/keri/npm/src/app/witness/http-endpoints.js +185 -0
- package/esm/keri/npm/src/app/witness/ingress.js +148 -0
- package/esm/keri/npm/src/app/witness/receipt-client.js +248 -0
- package/esm/keri/npm/src/app/witness/receipt-messages.js +29 -0
- package/esm/keri/npm/src/app/witness/receipting.js +323 -0
- package/esm/keri/npm/src/app/witness/registration.js +50 -0
- package/esm/keri/npm/src/cli/common/bootstrap.js +12 -0
- package/esm/keri/npm/src/{app/cli → cli}/common/context.js +47 -6
- package/esm/keri/npm/src/{app/cli → cli}/common/existing.js +9 -11
- package/esm/keri/npm/src/cli/common/parsing.js +279 -0
- package/esm/keri/npm/src/cli/common/passcode.js +66 -0
- package/esm/keri/npm/src/cli/common/tel-completion.js +24 -0
- package/esm/keri/npm/src/{app/cli → cli}/common/witness-auth.js +2 -2
- package/esm/keri/npm/src/cli/credentials/ipex.js +702 -0
- package/esm/keri/npm/src/cli/credentials/vc.js +399 -0
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/did.js +63 -36
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/ends.js +33 -28
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/loc.js +16 -11
- package/esm/keri/npm/src/cli/endpoints/oobi-clean.js +134 -0
- package/esm/keri/npm/src/{app/cli → cli/endpoints}/oobi.js +35 -32
- package/esm/keri/npm/src/{app/cli → cli/identity}/aid.js +8 -7
- package/esm/keri/npm/src/{app/cli → cli/identity}/challenge.js +60 -49
- package/esm/keri/npm/src/{app/cli → cli/identity}/delegate.js +61 -26
- package/esm/keri/npm/src/{app/cli → cli/identity}/export.js +9 -8
- package/esm/keri/npm/src/cli/identity/incept.js +181 -0
- package/esm/keri/npm/src/cli/identity/init.js +153 -0
- package/esm/keri/npm/src/cli/identity/interact.js +84 -0
- package/esm/keri/npm/src/{app/cli → cli/identity}/list.js +7 -6
- package/esm/keri/npm/src/{app/cli → cli/identity}/rotate.js +60 -57
- package/esm/keri/npm/src/cli/index.js +38 -0
- package/esm/keri/npm/src/{app/cli → cli/messaging}/exchange.js +24 -22
- package/esm/keri/npm/src/{app/cli → cli/messaging}/multisig.js +165 -156
- package/esm/keri/npm/src/{app/cli → cli/messaging}/notifications.js +26 -22
- package/esm/keri/npm/src/{app/cli → cli}/output.js +1 -1
- package/esm/keri/npm/src/{app/cli → cli/tools}/annotate.js +10 -4
- package/esm/keri/npm/src/{app/cli → cli/tools}/benchmark.js +15 -4
- package/esm/keri/npm/src/{app/cli → cli/tools}/db-dump.js +11 -10
- package/esm/keri/npm/src/{app/cli → cli/tools}/saidify.js +3 -2
- package/esm/keri/npm/src/{app/cli → cli/tools}/sign.js +16 -10
- package/esm/keri/npm/src/{app/cli → cli/tools}/verify.js +10 -10
- package/esm/keri/npm/src/core/attachment-countering.js +31 -1
- package/esm/keri/npm/src/core/{exchange-proofing.js → exchange/exchange-proofing.js} +32 -2
- package/esm/keri/npm/src/core/{protocol-exchanging.js → exchange/protocol-exchanging.js} +26 -4
- package/esm/keri/npm/src/core/genus-framing.js +44 -0
- package/esm/keri/npm/src/core/{eventing.js → kel/eventing.js} +57 -25
- package/esm/keri/npm/src/core/{kever-decisions.js → kel/kever-decisions.js} +24 -12
- package/esm/keri/npm/src/core/{kever.js → kel/kever.js} +4 -4
- package/esm/keri/npm/src/core/logger.js +3 -3
- package/esm/keri/npm/src/core/{kram-policy.js → mailbox/kram-policy.js} +14 -4
- package/esm/keri/npm/src/core/{kram-pruning.js → mailbox/kram-pruning.js} +3 -3
- package/esm/keri/npm/src/core/{kram-signatures.js → mailbox/kram-signatures.js} +1 -1
- package/esm/keri/npm/src/core/{kram-staging.js → mailbox/kram-staging.js} +6 -6
- package/esm/keri/npm/src/core/{kram-time.js → mailbox/kram-time.js} +4 -3
- package/esm/keri/npm/src/core/{kraming.js → mailbox/kraming.js} +2 -2
- package/esm/keri/npm/src/core/protocol-eventing.js +1 -1
- package/esm/keri/npm/src/core/protocol-serialization.js +9 -34
- package/esm/keri/npm/src/core/routing.js +52 -17
- package/esm/keri/npm/src/db/baser-defaults.js +11 -0
- package/esm/keri/npm/src/db/basing.js +89 -232
- package/esm/keri/npm/src/db/core/lmdber.js +102 -63
- package/esm/keri/npm/src/db/escrowing.js +73 -49
- package/esm/keri/npm/src/db/exchange/exchange-nests.js +54 -0
- package/esm/keri/npm/src/db/exchange/exchange-records.js +7 -0
- package/esm/keri/npm/src/db/index.js +5 -4
- package/esm/keri/npm/src/db/keeping.js +122 -3
- package/esm/keri/npm/src/db/{kram-factors.js → mailbox/kram-factors.js} +1 -1
- package/esm/keri/npm/src/db/{mailboxing.js → mailbox/mailboxing.js} +3 -3
- package/esm/keri/npm/src/db/reger.js +38 -29
- package/esm/keri/npm/src/db/{kel-replay.js → replay/kel-replay.js} +11 -4
- package/esm/keri/npm/src/db/{tel-replay.js → replay/tel-replay.js} +34 -0
- package/esm/keri/npm/src/db/{witness-replay.js → replay/witness-replay.js} +2 -2
- package/esm/keri/npm/src/db/subing.js +2 -3
- package/esm/keri/npm/src/did/webs/artifacts.js +15 -18
- package/esm/keri/npm/src/did/webs/designated-aliases.js +5 -7
- package/esm/keri/npm/src/did/webs/resolving.js +73 -56
- package/esm/keri/npm/src/library/index.js +1 -1
- package/esm/keri/npm/src/npm/cli.js +1 -1
- package/esm/keri/npm/src/npm/index.js +1 -1
- package/esm/keri/npm/src/runtime/index.js +79 -47
- package/esm/keri/npm/src/vdr/backer-state.js +55 -0
- package/esm/keri/npm/src/vdr/credential-tsn-record.js +59 -0
- package/esm/keri/npm/src/vdr/credentialing.js +84 -82
- package/esm/keri/npm/src/vdr/eventing.js +592 -204
- package/esm/keri/npm/src/vdr/registry-tsn-record.js +55 -0
- package/esm/keri/npm/src/vdr/revoking.js +90 -0
- package/esm/keri/npm/src/vdr/tel-anchor.js +29 -0
- package/esm/keri/npm/src/vdr/tel-publication.js +178 -0
- package/esm/keri/npm/src/{app/version.js → version.js} +2 -2
- package/package.json +5 -3
- package/types/_dnt.polyfills.d.ts +6 -0
- package/types/_dnt.polyfills.d.ts.map +1 -1
- package/types/acdc/chaining.d.ts +35 -0
- package/types/acdc/chaining.d.ts.map +1 -0
- package/types/acdc/dhking.d.ts +136 -0
- package/types/acdc/dhking.d.ts.map +1 -0
- package/types/acdc/messaging.d.ts.map +1 -1
- package/types/acdc/observing.d.ts +18 -7
- package/types/acdc/observing.d.ts.map +1 -1
- package/types/acdc/regbasing.d.ts +3 -1
- package/types/acdc/regbasing.d.ts.map +1 -1
- package/types/acdc/regengine.d.ts +9 -4
- package/types/acdc/regengine.d.ts.map +1 -1
- package/types/acdc/regeventing.d.ts +24 -7
- package/types/acdc/regeventing.d.ts.map +1 -1
- package/types/acdc/registering.d.ts +22 -6
- package/types/acdc/registering.d.ts.map +1 -1
- package/types/acdc/registraring.d.ts +1 -1
- package/types/acdc/registraring.d.ts.map +1 -1
- package/types/acdc/relating.d.ts +21 -0
- package/types/acdc/relating.d.ts.map +1 -0
- package/types/acdc/salting.d.ts +241 -0
- package/types/acdc/salting.d.ts.map +1 -0
- package/types/acdc/scheming.d.ts +1 -1
- package/types/acdc/scheming.d.ts.map +1 -1
- package/types/acdc/unblinding.d.ts +150 -0
- package/types/acdc/unblinding.d.ts.map +1 -0
- package/types/app/bootstrap/authenticating.d.ts +54 -0
- package/types/app/bootstrap/authenticating.d.ts.map +1 -0
- package/types/app/bootstrap/bootstrapping.d.ts +45 -0
- package/types/app/bootstrap/bootstrapping.d.ts.map +1 -0
- package/types/app/{oobi-replies.d.ts → bootstrap/oobi-replies.d.ts} +1 -1
- package/types/app/bootstrap/oobi-replies.d.ts.map +1 -0
- package/types/app/{oobiery.d.ts → bootstrap/oobiery.d.ts} +98 -25
- package/types/app/bootstrap/oobiery.d.ts.map +1 -0
- package/types/app/credentials/credential-importing.d.ts +29 -0
- package/types/app/credentials/credential-importing.d.ts.map +1 -0
- package/types/app/credentials/credential-proposals.d.ts +27 -0
- package/types/app/credentials/credential-proposals.d.ts.map +1 -0
- package/types/app/credentials/credential-revoking.d.ts +44 -0
- package/types/app/credentials/credential-revoking.d.ts.map +1 -0
- package/types/app/credentials/credential-workflows.d.ts +149 -0
- package/types/app/credentials/credential-workflows.d.ts.map +1 -0
- package/types/app/{schema-resolving.d.ts → credentials/schema-resolving.d.ts} +2 -2
- package/types/app/credentials/schema-resolving.d.ts.map +1 -0
- package/types/app/credentials/tel-publishing.d.ts +16 -0
- package/types/app/credentials/tel-publishing.d.ts.map +1 -0
- package/types/app/{verifying.d.ts → credentials/verifying.d.ts} +19 -7
- package/types/app/credentials/verifying.d.ts.map +1 -0
- package/types/app/delivery/forwarding.d.ts +227 -0
- package/types/app/delivery/forwarding.d.ts.map +1 -0
- package/types/app/delivery/introducing.d.ts +21 -0
- package/types/app/delivery/introducing.d.ts.map +1 -0
- package/types/app/delivery/reply-streams.d.ts +49 -0
- package/types/app/delivery/reply-streams.d.ts.map +1 -0
- package/types/app/delivery/respondant.d.ts +52 -0
- package/types/app/delivery/respondant.d.ts.map +1 -0
- package/types/app/{stored-replies.d.ts → delivery/stored-replies.d.ts} +1 -1
- package/types/app/delivery/stored-replies.d.ts.map +1 -0
- package/types/app/exchanges/essr.d.ts +53 -0
- package/types/app/exchanges/essr.d.ts.map +1 -0
- package/types/app/exchanges/exchange-messaging.d.ts +73 -0
- package/types/app/exchanges/exchange-messaging.d.ts.map +1 -0
- package/types/app/exchanges/exchanging.d.ts +379 -0
- package/types/app/exchanges/exchanging.d.ts.map +1 -0
- package/types/app/{challenging.d.ts → identity/challenging.d.ts} +3 -3
- package/types/app/identity/challenging.d.ts.map +1 -0
- package/types/app/{configing.d.ts → identity/configing.d.ts} +1 -1
- package/types/app/identity/configing.d.ts.map +1 -0
- package/types/app/{delegating.d.ts → identity/delegating.d.ts} +52 -15
- package/types/app/identity/delegating.d.ts.map +1 -0
- package/types/app/{endpoint-roleing.d.ts → identity/endpoint-roleing.d.ts} +24 -13
- package/types/app/identity/endpoint-roleing.d.ts.map +1 -0
- package/types/app/{habbing.d.ts → identity/habbing.d.ts} +73 -32
- package/types/app/identity/habbing.d.ts.map +1 -0
- package/types/app/{keeping.d.ts → identity/keeping.d.ts} +19 -5
- package/types/app/identity/keeping.d.ts.map +1 -0
- package/types/app/{organizing.d.ts → identity/organizing.d.ts} +19 -4
- package/types/app/identity/organizing.d.ts.map +1 -0
- package/types/app/ipex/ipex-building.d.ts +30 -0
- package/types/app/ipex/ipex-building.d.ts.map +1 -0
- package/types/app/{ipex-credentialing.d.ts → ipex/ipex-credentialing.d.ts} +33 -6
- package/types/app/ipex/ipex-credentialing.d.ts.map +1 -0
- package/types/app/ipex/ipex-graph.d.ts +28 -0
- package/types/app/ipex/ipex-graph.d.ts.map +1 -0
- package/types/app/ipex/ipex-grouping.d.ts +112 -0
- package/types/app/ipex/ipex-grouping.d.ts.map +1 -0
- package/types/app/{ipex-node-authentication.d.ts → ipex/ipex-node-authentication.d.ts} +10 -5
- package/types/app/ipex/ipex-node-authentication.d.ts.map +1 -0
- package/types/app/ipex/ipex-v2.d.ts +71 -0
- package/types/app/ipex/ipex-v2.d.ts.map +1 -0
- package/types/app/{ipexing.d.ts → ipex/ipexing.d.ts} +21 -6
- package/types/app/ipex/ipexing.d.ts.map +1 -0
- package/types/app/mailbox/forward-handler.d.ts +68 -0
- package/types/app/mailbox/forward-handler.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-director.d.ts +252 -0
- package/types/app/mailbox/mailbox-director.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-poller.d.ts +149 -0
- package/types/app/mailbox/mailbox-poller.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-sse.d.ts +63 -0
- package/types/app/mailbox/mailbox-sse.d.ts.map +1 -0
- package/types/app/{mailboxing.d.ts → mailbox/mailboxing.d.ts} +92 -40
- package/types/app/mailbox/mailboxing.d.ts.map +1 -0
- package/types/app/mailbox/topic-routing.d.ts +18 -0
- package/types/app/mailbox/topic-routing.d.ts.map +1 -0
- package/types/app/multisig/group-members.d.ts +60 -0
- package/types/app/multisig/group-members.d.ts.map +1 -0
- package/types/app/{grouping.d.ts → multisig/grouping.d.ts} +142 -19
- package/types/app/multisig/grouping.d.ts.map +1 -0
- package/types/app/multisig/multisig-messaging.d.ts +97 -0
- package/types/app/multisig/multisig-messaging.d.ts.map +1 -0
- package/types/app/multisig/multisig-workflows.d.ts +85 -0
- package/types/app/multisig/multisig-workflows.d.ts.map +1 -0
- package/types/app/{notifying.d.ts → notifications/notifying.d.ts} +4 -5
- package/types/app/notifications/notifying.d.ts.map +1 -0
- package/types/app/notifications/signaling.d.ts.map +1 -0
- package/types/app/{parsering.d.ts → protocol/parsering.d.ts} +40 -11
- package/types/app/protocol/parsering.d.ts.map +1 -0
- package/types/app/{protocol-host-policy.d.ts → protocol/protocol-host-policy.d.ts} +1 -10
- package/types/app/protocol/protocol-host-policy.d.ts.map +1 -0
- package/types/app/protocol/protocol-processing.d.ts +140 -0
- package/types/app/protocol/protocol-processing.d.ts.map +1 -0
- package/types/app/protocol/reactor.d.ts +43 -0
- package/types/app/protocol/reactor.d.ts.map +1 -0
- package/types/app/queries/query-replies.d.ts +78 -0
- package/types/app/queries/query-replies.d.ts.map +1 -0
- package/types/app/queries/querying.d.ts +155 -0
- package/types/app/queries/querying.d.ts.map +1 -0
- package/types/app/queries/witness-inquisitor.d.ts +150 -0
- package/types/app/queries/witness-inquisitor.d.ts.map +1 -0
- package/types/app/runtime/abortable.d.ts +39 -0
- package/types/app/runtime/abortable.d.ts.map +1 -0
- package/types/app/runtime/agent-runtime.d.ts +348 -0
- package/types/app/runtime/agent-runtime.d.ts.map +1 -0
- package/types/app/runtime/cue-runtime.d.ts +33 -0
- package/types/app/runtime/cue-runtime.d.ts.map +1 -0
- package/types/app/runtime/runtime-clock.d.ts +28 -0
- package/types/app/runtime/runtime-clock.d.ts.map +1 -0
- package/types/app/runtime/runtime-turn.d.ts.map +1 -0
- package/types/app/transport/byte-source.d.ts +41 -0
- package/types/app/transport/byte-source.d.ts.map +1 -0
- package/types/app/transport/cesr-egress.d.ts +117 -0
- package/types/app/transport/cesr-egress.d.ts.map +1 -0
- package/types/app/{cesr-http.d.ts → transport/cesr-http.d.ts} +4 -27
- package/types/app/transport/cesr-http.d.ts.map +1 -0
- package/types/app/transport/http-client.d.ts +99 -0
- package/types/app/transport/http-client.d.ts.map +1 -0
- package/types/app/transport/http-messenger.d.ts +37 -0
- package/types/app/transport/http-messenger.d.ts.map +1 -0
- package/types/app/transport/http-stream-messenger.d.ts +30 -0
- package/types/app/transport/http-stream-messenger.d.ts.map +1 -0
- package/types/app/transport/httping.d.ts +19 -0
- package/types/app/transport/httping.d.ts.map +1 -0
- package/types/app/transport/message-source.d.ts +22 -0
- package/types/app/transport/message-source.d.ts.map +1 -0
- package/types/app/transport/messengering.d.ts +41 -0
- package/types/app/transport/messengering.d.ts.map +1 -0
- package/types/app/{socket-source.d.ts → transport/socket-source.d.ts} +8 -0
- package/types/app/transport/socket-source.d.ts.map +1 -0
- package/types/app/transport/tcp-egress.d.ts +118 -0
- package/types/app/transport/tcp-egress.d.ts.map +1 -0
- package/types/app/transport/tcp-messenger.d.ts +69 -0
- package/types/app/transport/tcp-messenger.d.ts.map +1 -0
- package/types/app/transport/tcp-stream-messenger.d.ts +25 -0
- package/types/app/transport/tcp-stream-messenger.d.ts.map +1 -0
- package/types/app/transport/transport-error.d.ts +12 -0
- package/types/app/transport/transport-error.d.ts.map +1 -0
- package/types/app/witness/http-endpoints.d.ts +77 -0
- package/types/app/witness/http-endpoints.d.ts.map +1 -0
- package/types/app/witness/ingress.d.ts +65 -0
- package/types/app/witness/ingress.d.ts.map +1 -0
- package/types/app/witness/receipt-client.d.ts +82 -0
- package/types/app/witness/receipt-client.d.ts.map +1 -0
- package/types/app/witness/receipt-messages.d.ts +21 -0
- package/types/app/witness/receipt-messages.d.ts.map +1 -0
- package/types/app/witness/receipting.d.ts +117 -0
- package/types/app/witness/receipting.d.ts.map +1 -0
- package/types/app/witness/registration.d.ts +27 -0
- package/types/app/witness/registration.d.ts.map +1 -0
- package/types/cli/common/bootstrap.d.ts +5 -0
- package/types/cli/common/bootstrap.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/context.d.ts +10 -5
- package/types/cli/common/context.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/existing.d.ts +2 -4
- package/types/cli/common/existing.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/parsing.d.ts +26 -15
- package/types/cli/common/parsing.d.ts.map +1 -0
- package/types/cli/common/passcode.d.ts +9 -0
- package/types/cli/common/passcode.d.ts.map +1 -0
- package/types/cli/common/rendering.d.ts.map +1 -0
- package/types/cli/common/tel-completion.d.ts +8 -0
- package/types/cli/common/tel-completion.d.ts.map +1 -0
- package/types/{app/cli → cli}/common/witness-auth.d.ts +1 -1
- package/types/cli/common/witness-auth.d.ts.map +1 -0
- package/types/cli/credentials/ipex.d.ts +110 -0
- package/types/cli/credentials/ipex.d.ts.map +1 -0
- package/types/cli/credentials/vc.d.ts +42 -0
- package/types/cli/credentials/vc.d.ts.map +1 -0
- package/types/{app/cli → cli/endpoints}/did.d.ts +5 -1
- package/types/cli/endpoints/did.d.ts.map +1 -0
- package/types/{app/cli → cli/endpoints}/ends.d.ts +9 -1
- package/types/cli/endpoints/ends.d.ts.map +1 -0
- package/types/cli/endpoints/loc.d.ts.map +1 -0
- package/types/cli/endpoints/oobi-clean.d.ts +8 -0
- package/types/cli/endpoints/oobi-clean.d.ts.map +1 -0
- package/types/{app/cli → cli/endpoints}/oobi.d.ts +2 -0
- package/types/cli/endpoints/oobi.d.ts.map +1 -0
- package/types/cli/identity/aid.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/challenge.d.ts +5 -1
- package/types/cli/identity/challenge.d.ts.map +1 -0
- package/types/cli/identity/delegate.d.ts.map +1 -0
- package/types/cli/identity/export.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/incept.d.ts +2 -0
- package/types/cli/identity/incept.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/init.d.ts +2 -0
- package/types/cli/identity/init.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/interact.d.ts +2 -0
- package/types/cli/identity/interact.d.ts.map +1 -0
- package/types/cli/identity/list.d.ts.map +1 -0
- package/types/{app/cli → cli/identity}/rotate.d.ts +9 -2
- package/types/cli/identity/rotate.d.ts.map +1 -0
- package/types/cli/index.d.ts +39 -0
- package/types/cli/index.d.ts.map +1 -0
- package/types/{app/cli → cli/messaging}/exchange.d.ts +3 -1
- package/types/cli/messaging/exchange.d.ts.map +1 -0
- package/types/cli/messaging/multisig.d.ts +29 -0
- package/types/cli/messaging/multisig.d.ts.map +1 -0
- package/types/cli/messaging/notifications.d.ts.map +1 -0
- package/types/cli/output.d.ts.map +1 -0
- package/types/cli/tools/annotate-color.d.ts.map +1 -0
- package/types/cli/tools/annotate.d.ts.map +1 -0
- package/types/cli/tools/benchmark.d.ts.map +1 -0
- package/types/cli/tools/db-dump.d.ts.map +1 -0
- package/types/cli/tools/saidify.d.ts.map +1 -0
- package/types/{app/cli → cli/tools}/sign.d.ts +2 -0
- package/types/cli/tools/sign.d.ts.map +1 -0
- package/types/cli/tools/verify.d.ts.map +1 -0
- package/types/core/attachment-countering.d.ts +10 -1
- package/types/core/attachment-countering.d.ts.map +1 -1
- package/types/core/cues.d.ts +78 -21
- package/types/core/cues.d.ts.map +1 -1
- package/types/core/{exchange-proofing.d.ts → exchange/exchange-proofing.d.ts} +9 -2
- package/types/core/exchange/exchange-proofing.d.ts.map +1 -0
- package/types/core/{protocol-exchanging.d.ts → exchange/protocol-exchanging.d.ts} +10 -2
- package/types/core/exchange/protocol-exchanging.d.ts.map +1 -0
- package/types/core/genus-framing.d.ts +12 -0
- package/types/core/genus-framing.d.ts.map +1 -0
- package/types/core/{eventing.d.ts → kel/eventing.d.ts} +22 -10
- package/types/core/kel/eventing.d.ts.map +1 -0
- package/types/core/{kever-decisions.d.ts → kel/kever-decisions.d.ts} +21 -8
- package/types/core/kel/kever-decisions.d.ts.map +1 -0
- package/types/core/{kever.d.ts → kel/kever.d.ts} +2 -2
- package/types/core/kel/kever.d.ts.map +1 -0
- package/types/core/kel/witnesses.d.ts.map +1 -0
- package/types/core/logger.d.ts +1 -1
- package/types/core/logger.d.ts.map +1 -1
- package/types/core/{kram-auth.d.ts → mailbox/kram-auth.d.ts} +2 -2
- package/types/core/mailbox/kram-auth.d.ts.map +1 -0
- package/types/core/{kram-policy.d.ts → mailbox/kram-policy.d.ts} +2 -2
- package/types/core/mailbox/kram-policy.d.ts.map +1 -0
- package/types/core/{kram-pruning.d.ts → mailbox/kram-pruning.d.ts} +1 -1
- package/types/core/mailbox/kram-pruning.d.ts.map +1 -0
- package/types/core/{kram-signatures.d.ts → mailbox/kram-signatures.d.ts} +3 -3
- package/types/core/mailbox/kram-signatures.d.ts.map +1 -0
- package/types/core/{kram-staging.d.ts → mailbox/kram-staging.d.ts} +2 -2
- package/types/core/mailbox/kram-staging.d.ts.map +1 -0
- package/types/core/{kram-time.d.ts → mailbox/kram-time.d.ts} +2 -2
- package/types/core/mailbox/kram-time.d.ts.map +1 -0
- package/types/core/{kraming.d.ts → mailbox/kraming.d.ts} +5 -5
- package/types/core/mailbox/kraming.d.ts.map +1 -0
- package/types/core/mailbox/mailbox-topics.d.ts.map +1 -0
- package/types/core/protocol-eventing.d.ts.map +1 -1
- package/types/core/protocol-serialization.d.ts +1 -1
- package/types/core/protocol-serialization.d.ts.map +1 -1
- package/types/core/records.d.ts +1 -1
- package/types/core/records.d.ts.map +1 -1
- package/types/core/routing.d.ts +24 -4
- package/types/core/routing.d.ts.map +1 -1
- package/types/db/baser-defaults.d.ts +5 -0
- package/types/db/baser-defaults.d.ts.map +1 -0
- package/types/db/basing.d.ts +32 -44
- package/types/db/basing.d.ts.map +1 -1
- package/types/db/core/lmdber.d.ts +18 -13
- package/types/db/core/lmdber.d.ts.map +1 -1
- package/types/db/escrowing.d.ts +3 -1
- package/types/db/escrowing.d.ts.map +1 -1
- package/types/db/exchange/exchange-nests.d.ts +12 -0
- package/types/db/exchange/exchange-nests.d.ts.map +1 -0
- package/types/db/exchange/exchange-records.d.ts +38 -0
- package/types/db/exchange/exchange-records.d.ts.map +1 -0
- package/types/db/index.d.ts +5 -4
- package/types/db/index.d.ts.map +1 -1
- package/types/db/keeping.d.ts +19 -1
- package/types/db/keeping.d.ts.map +1 -1
- package/types/db/{kram-factors.d.ts → mailbox/kram-factors.d.ts} +2 -2
- package/types/db/mailbox/kram-factors.d.ts.map +1 -0
- package/types/db/{mailboxing.d.ts → mailbox/mailboxing.d.ts} +2 -2
- package/types/db/mailbox/mailboxing.d.ts.map +1 -0
- package/types/db/reger.d.ts +7 -6
- package/types/db/reger.d.ts.map +1 -1
- package/types/db/{kel-replay.d.ts → replay/kel-replay.d.ts} +1 -2
- package/types/db/replay/kel-replay.d.ts.map +1 -0
- package/types/db/{tel-replay.d.ts → replay/tel-replay.d.ts} +11 -1
- package/types/db/replay/tel-replay.d.ts.map +1 -0
- package/types/db/{witness-replay.d.ts → replay/witness-replay.d.ts} +1 -1
- package/types/db/replay/witness-replay.d.ts.map +1 -0
- package/types/db/subing.d.ts.map +1 -1
- package/types/did/keri/resolving.d.ts +1 -1
- package/types/did/keri/resolving.d.ts.map +1 -1
- package/types/did/webs/artifacts.d.ts +5 -5
- package/types/did/webs/artifacts.d.ts.map +1 -1
- package/types/did/webs/designated-aliases.d.ts +1 -2
- package/types/did/webs/designated-aliases.d.ts.map +1 -1
- package/types/did/webs/documenting.d.ts +1 -1
- package/types/did/webs/documenting.d.ts.map +1 -1
- package/types/did/webs/resolving.d.ts +13 -9
- package/types/did/webs/resolving.d.ts.map +1 -1
- package/types/library/index.d.ts +1 -1
- package/types/library/index.d.ts.map +1 -1
- package/types/npm/cli.d.ts +1 -1
- package/types/npm/cli.d.ts.map +1 -1
- package/types/npm/index.d.ts +1 -1
- package/types/npm/index.d.ts.map +1 -1
- package/types/runtime/index.d.ts +86 -51
- package/types/runtime/index.d.ts.map +1 -1
- package/types/vdr/backer-state.d.ts +22 -0
- package/types/vdr/backer-state.d.ts.map +1 -0
- package/types/vdr/credential-tsn-record.d.ts +13 -0
- package/types/vdr/credential-tsn-record.d.ts.map +1 -0
- package/types/vdr/credentialing.d.ts +16 -17
- package/types/vdr/credentialing.d.ts.map +1 -1
- package/types/vdr/eventing.d.ts +60 -18
- package/types/vdr/eventing.d.ts.map +1 -1
- package/types/vdr/registry-tsn-record.d.ts +6 -0
- package/types/vdr/registry-tsn-record.d.ts.map +1 -0
- package/types/vdr/revoking.d.ts +18 -0
- package/types/vdr/revoking.d.ts.map +1 -0
- package/types/vdr/tel-anchor.d.ts +10 -0
- package/types/vdr/tel-anchor.d.ts.map +1 -0
- package/types/vdr/tel-publication.d.ts +49 -0
- package/types/vdr/tel-publication.d.ts.map +1 -0
- package/types/vdr/tsn-query.d.ts +1 -1
- package/types/vdr/tsn-query.d.ts.map +1 -1
- package/types/{app/version.d.ts → version.d.ts} +2 -2
- package/types/version.d.ts.map +1 -0
- package/esm/keri/npm/src/app/agent-runtime.js +0 -544
- package/esm/keri/npm/src/app/cesr-egress.js +0 -294
- package/esm/keri/npm/src/app/cli/common/displaying.js +0 -43
- package/esm/keri/npm/src/app/cli/common/parsing.js +0 -215
- package/esm/keri/npm/src/app/cli/incept.js +0 -185
- package/esm/keri/npm/src/app/cli/index.js +0 -36
- package/esm/keri/npm/src/app/cli/init.js +0 -149
- package/esm/keri/npm/src/app/cli/interact.js +0 -72
- package/esm/keri/npm/src/app/cli/ipex.js +0 -519
- package/esm/keri/npm/src/app/cli/query.js +0 -142
- package/esm/keri/npm/src/app/cli/vc.js +0 -283
- package/esm/keri/npm/src/app/cli/verifier.js +0 -92
- package/esm/keri/npm/src/app/credential-workflows.js +0 -409
- package/esm/keri/npm/src/app/cue-runtime.js +0 -38
- package/esm/keri/npm/src/app/essr.js +0 -170
- package/esm/keri/npm/src/app/exchanging.js +0 -1001
- package/esm/keri/npm/src/app/forwarding.js +0 -936
- package/esm/keri/npm/src/app/group-members.js +0 -37
- package/esm/keri/npm/src/app/httping.js +0 -162
- package/esm/keri/npm/src/app/ipex-graph.js +0 -407
- package/esm/keri/npm/src/app/ipex-grouping.js +0 -276
- package/esm/keri/npm/src/app/ipex-v2.js +0 -438
- package/esm/keri/npm/src/app/mailbox-sse.js +0 -240
- package/esm/keri/npm/src/app/multisig-workflows.js +0 -457
- package/esm/keri/npm/src/app/querying.js +0 -775
- package/esm/keri/npm/src/app/reactor.js +0 -394
- package/esm/keri/npm/src/app/respondant.js +0 -358
- package/esm/keri/npm/src/app/runtime-services.js +0 -22
- package/esm/keri/npm/src/app/tcp-conversation.js +0 -85
- package/esm/keri/npm/src/app/tcp-egress.js +0 -251
- package/esm/keri/npm/src/app/verifier-agent.js +0 -443
- package/esm/keri/npm/src/app/witnessing.js +0 -914
- package/esm/keri/npm/src/core/index.js +0 -23
- package/esm/keri/npm/src/db/exchange-nests.js +0 -80
- package/esm/keri/npm/src/db/exchange-records.js +0 -7
- package/esm/keri/npm/src/db/payload-archive.js +0 -402
- package/esm/keri/npm/src/db/payload-store.js +0 -406
- package/esm/keri/npm/src/db/payload-view.js +0 -23
- package/esm/keri/npm/src/db/verifier-cueing.js +0 -132
- package/esm/keri/npm/src/vdr/credential-tsn.js +0 -230
- package/esm/keri/npm/src/vdr/registry-tsn.js +0 -217
- package/types/app/abortable.d.ts +0 -13
- package/types/app/abortable.d.ts.map +0 -1
- package/types/app/agent-runtime.d.ts +0 -221
- package/types/app/agent-runtime.d.ts.map +0 -1
- package/types/app/authenticating.d.ts +0 -36
- package/types/app/authenticating.d.ts.map +0 -1
- package/types/app/byte-source.d.ts +0 -16
- package/types/app/byte-source.d.ts.map +0 -1
- package/types/app/cesr-egress.d.ts +0 -45
- package/types/app/cesr-egress.d.ts.map +0 -1
- package/types/app/cesr-http.d.ts.map +0 -1
- package/types/app/challenging.d.ts.map +0 -1
- package/types/app/cli/aid.d.ts.map +0 -1
- package/types/app/cli/annotate-color.d.ts.map +0 -1
- package/types/app/cli/annotate.d.ts.map +0 -1
- package/types/app/cli/benchmark.d.ts.map +0 -1
- package/types/app/cli/challenge.d.ts.map +0 -1
- package/types/app/cli/common/context.d.ts.map +0 -1
- package/types/app/cli/common/displaying.d.ts +0 -12
- package/types/app/cli/common/displaying.d.ts.map +0 -1
- package/types/app/cli/common/existing.d.ts.map +0 -1
- package/types/app/cli/common/parsing.d.ts.map +0 -1
- package/types/app/cli/common/rendering.d.ts.map +0 -1
- package/types/app/cli/common/witness-auth.d.ts.map +0 -1
- package/types/app/cli/db-dump.d.ts.map +0 -1
- package/types/app/cli/delegate.d.ts.map +0 -1
- package/types/app/cli/did.d.ts.map +0 -1
- package/types/app/cli/ends.d.ts.map +0 -1
- package/types/app/cli/exchange.d.ts.map +0 -1
- package/types/app/cli/export.d.ts.map +0 -1
- package/types/app/cli/incept.d.ts.map +0 -1
- package/types/app/cli/index.d.ts +0 -37
- package/types/app/cli/index.d.ts.map +0 -1
- package/types/app/cli/init.d.ts.map +0 -1
- package/types/app/cli/interact.d.ts.map +0 -1
- package/types/app/cli/ipex.d.ts +0 -20
- package/types/app/cli/ipex.d.ts.map +0 -1
- package/types/app/cli/list.d.ts.map +0 -1
- package/types/app/cli/loc.d.ts.map +0 -1
- package/types/app/cli/multisig.d.ts +0 -12
- package/types/app/cli/multisig.d.ts.map +0 -1
- package/types/app/cli/notifications.d.ts.map +0 -1
- package/types/app/cli/oobi.d.ts.map +0 -1
- package/types/app/cli/output.d.ts.map +0 -1
- package/types/app/cli/query.d.ts +0 -12
- package/types/app/cli/query.d.ts.map +0 -1
- package/types/app/cli/rotate.d.ts.map +0 -1
- package/types/app/cli/saidify.d.ts.map +0 -1
- package/types/app/cli/sign.d.ts.map +0 -1
- package/types/app/cli/vc.d.ts +0 -20
- package/types/app/cli/vc.d.ts.map +0 -1
- package/types/app/cli/verifier.d.ts +0 -3
- package/types/app/cli/verifier.d.ts.map +0 -1
- package/types/app/cli/verify.d.ts.map +0 -1
- package/types/app/configing.d.ts.map +0 -1
- package/types/app/credential-workflows.d.ts +0 -113
- package/types/app/credential-workflows.d.ts.map +0 -1
- package/types/app/cue-runtime.d.ts +0 -12
- package/types/app/cue-runtime.d.ts.map +0 -1
- package/types/app/delegating.d.ts.map +0 -1
- package/types/app/endpoint-roleing.d.ts.map +0 -1
- package/types/app/essr.d.ts +0 -58
- package/types/app/essr.d.ts.map +0 -1
- package/types/app/exchanging.d.ts +0 -233
- package/types/app/exchanging.d.ts.map +0 -1
- package/types/app/forwarding.d.ts +0 -352
- package/types/app/forwarding.d.ts.map +0 -1
- package/types/app/group-members.d.ts +0 -12
- package/types/app/group-members.d.ts.map +0 -1
- package/types/app/grouping.d.ts.map +0 -1
- package/types/app/habbing.d.ts.map +0 -1
- package/types/app/httping.d.ts +0 -49
- package/types/app/httping.d.ts.map +0 -1
- package/types/app/ipex-credentialing.d.ts.map +0 -1
- package/types/app/ipex-graph.d.ts +0 -49
- package/types/app/ipex-graph.d.ts.map +0 -1
- package/types/app/ipex-grouping.d.ts +0 -43
- package/types/app/ipex-grouping.d.ts.map +0 -1
- package/types/app/ipex-node-authentication.d.ts.map +0 -1
- package/types/app/ipex-v2.d.ts +0 -46
- package/types/app/ipex-v2.d.ts.map +0 -1
- package/types/app/ipexing.d.ts.map +0 -1
- package/types/app/keeping.d.ts.map +0 -1
- package/types/app/mailbox-director.d.ts +0 -140
- package/types/app/mailbox-director.d.ts.map +0 -1
- package/types/app/mailbox-sse.d.ts +0 -32
- package/types/app/mailbox-sse.d.ts.map +0 -1
- package/types/app/mailboxing.d.ts.map +0 -1
- package/types/app/multisig-workflows.d.ts +0 -47
- package/types/app/multisig-workflows.d.ts.map +0 -1
- package/types/app/notifying.d.ts.map +0 -1
- package/types/app/oobi-replies.d.ts.map +0 -1
- package/types/app/oobiery.d.ts.map +0 -1
- package/types/app/organizing.d.ts.map +0 -1
- package/types/app/parsering.d.ts.map +0 -1
- package/types/app/protocol-host-policy.d.ts.map +0 -1
- package/types/app/query-replies.d.ts +0 -40
- package/types/app/query-replies.d.ts.map +0 -1
- package/types/app/querying.d.ts +0 -221
- package/types/app/querying.d.ts.map +0 -1
- package/types/app/reactor.d.ts +0 -138
- package/types/app/reactor.d.ts.map +0 -1
- package/types/app/reply-streams.d.ts +0 -20
- package/types/app/reply-streams.d.ts.map +0 -1
- package/types/app/respondant.d.ts +0 -63
- package/types/app/respondant.d.ts.map +0 -1
- package/types/app/runtime-services.d.ts +0 -26
- package/types/app/runtime-services.d.ts.map +0 -1
- package/types/app/runtime-turn.d.ts.map +0 -1
- package/types/app/schema-resolving.d.ts.map +0 -1
- package/types/app/signaling.d.ts.map +0 -1
- package/types/app/socket-source.d.ts.map +0 -1
- package/types/app/stored-replies.d.ts.map +0 -1
- package/types/app/tcp-conversation.d.ts +0 -27
- package/types/app/tcp-conversation.d.ts.map +0 -1
- package/types/app/tcp-egress.d.ts +0 -49
- package/types/app/tcp-egress.d.ts.map +0 -1
- package/types/app/verifier-agent.d.ts +0 -92
- package/types/app/verifier-agent.d.ts.map +0 -1
- package/types/app/verifying.d.ts.map +0 -1
- package/types/app/version.d.ts.map +0 -1
- package/types/app/witnessing.d.ts +0 -223
- package/types/app/witnessing.d.ts.map +0 -1
- package/types/core/eventing.d.ts.map +0 -1
- package/types/core/exchange-proofing.d.ts.map +0 -1
- package/types/core/index.d.ts +0 -24
- package/types/core/index.d.ts.map +0 -1
- package/types/core/kever-decisions.d.ts.map +0 -1
- package/types/core/kever.d.ts.map +0 -1
- package/types/core/kram-auth.d.ts.map +0 -1
- package/types/core/kram-policy.d.ts.map +0 -1
- package/types/core/kram-pruning.d.ts.map +0 -1
- package/types/core/kram-signatures.d.ts.map +0 -1
- package/types/core/kram-staging.d.ts.map +0 -1
- package/types/core/kram-time.d.ts.map +0 -1
- package/types/core/kraming.d.ts.map +0 -1
- package/types/core/mailbox-topics.d.ts.map +0 -1
- package/types/core/protocol-exchanging.d.ts.map +0 -1
- package/types/core/witnesses.d.ts.map +0 -1
- package/types/db/exchange-nests.d.ts +0 -15
- package/types/db/exchange-nests.d.ts.map +0 -1
- package/types/db/exchange-records.d.ts +0 -33
- package/types/db/exchange-records.d.ts.map +0 -1
- package/types/db/kel-replay.d.ts.map +0 -1
- package/types/db/kram-factors.d.ts.map +0 -1
- package/types/db/mailboxing.d.ts.map +0 -1
- package/types/db/payload-archive.d.ts +0 -70
- package/types/db/payload-archive.d.ts.map +0 -1
- package/types/db/payload-store.d.ts +0 -40
- package/types/db/payload-store.d.ts.map +0 -1
- package/types/db/payload-view.d.ts +0 -4
- package/types/db/payload-view.d.ts.map +0 -1
- package/types/db/tel-replay.d.ts.map +0 -1
- package/types/db/verifier-cueing.d.ts +0 -46
- package/types/db/verifier-cueing.d.ts.map +0 -1
- package/types/db/witness-replay.d.ts.map +0 -1
- package/types/vdr/credential-tsn.d.ts +0 -23
- package/types/vdr/credential-tsn.d.ts.map +0 -1
- package/types/vdr/registry-tsn.d.ts +0 -28
- package/types/vdr/registry-tsn.d.ts.map +0 -1
- /package/esm/keri/npm/src/app/{schema-resolving.js → credentials/schema-resolving.js} +0 -0
- /package/esm/keri/npm/src/app/{challenging.js → identity/challenging.js} +0 -0
- /package/esm/keri/npm/src/app/{protocol-host-policy.js → protocol/protocol-host-policy.js} +0 -0
- /package/esm/keri/npm/src/app/{runtime-turn.js → runtime/runtime-turn.js} +0 -0
- /package/esm/keri/npm/src/{app/cli → cli}/common/rendering.js +0 -0
- /package/esm/keri/npm/src/{app/cli → cli/tools}/annotate-color.js +0 -0
- /package/esm/keri/npm/src/core/{witnesses.js → kel/witnesses.js} +0 -0
- /package/esm/keri/npm/src/core/{kram-auth.js → mailbox/kram-auth.js} +0 -0
- /package/esm/keri/npm/src/core/{mailbox-topics.js → mailbox/mailbox-topics.js} +0 -0
- /package/types/app/{signaling.d.ts → notifications/signaling.d.ts} +0 -0
- /package/types/app/{runtime-turn.d.ts → runtime/runtime-turn.d.ts} +0 -0
- /package/types/{app/cli → cli}/common/rendering.d.ts +0 -0
- /package/types/{app/cli → cli/endpoints}/loc.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/aid.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/delegate.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/export.d.ts +0 -0
- /package/types/{app/cli → cli/identity}/list.d.ts +0 -0
- /package/types/{app/cli → cli/messaging}/notifications.d.ts +0 -0
- /package/types/{app/cli → cli}/output.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/annotate-color.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/annotate.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/benchmark.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/db-dump.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/saidify.d.ts +0 -0
- /package/types/{app/cli → cli/tools}/verify.d.ts +0 -0
- /package/types/core/{witnesses.d.ts → kel/witnesses.d.ts} +0 -0
- /package/types/core/{mailbox-topics.d.ts → mailbox/mailbox-topics.d.ts} +0 -0
|
@@ -7,13 +7,18 @@
|
|
|
7
7
|
* - keeps EXN route construction in `ipexing.ts`
|
|
8
8
|
* - keeps registry, wallet, and verifier persistence in VDR modules
|
|
9
9
|
*/
|
|
10
|
-
import { concatBytes, Counter, parsePather, SerderACDC, SerderKERI, Vrsn_1_0, } from "cesr-ts";
|
|
11
|
-
import { resolveAttachmentGvrsn } from "
|
|
12
|
-
import { ValidationError } from "
|
|
13
|
-
import { dgKey } from "
|
|
14
|
-
import { CredentialWallet, serializeCredential } from "
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
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";
|
|
17
22
|
const textEncoder = new TextEncoder();
|
|
18
23
|
/** Build KERIpy-shaped support artifacts for one credential presentation. */
|
|
19
24
|
export function credentialSupportMessages(hby, reger, creder, recipient) {
|
|
@@ -102,6 +107,80 @@ export function credentialPresentationArtifacts(hby, reger, credentialSaidValue,
|
|
|
102
107
|
anc: { wire: replay.message, genus: resolveAttachmentGvrsn(replay.serder, gvrsn) },
|
|
103
108
|
};
|
|
104
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
|
+
}
|
|
105
184
|
/** Build a signed `/ipex/grant` message with embedded credential artifacts. */
|
|
106
185
|
export function ipexCredentialGrant(args) {
|
|
107
186
|
const [creder] = args.reger.cloneCred(args.credentialSaid);
|
|
@@ -114,6 +193,9 @@ export function ipexCredentialGrant(args) {
|
|
|
114
193
|
anc: artifacts.anc.wire,
|
|
115
194
|
agree: args.options?.agree ?? null,
|
|
116
195
|
});
|
|
196
|
+
if (!credentialGrantReady(args.hby, args.reger, grant, attachments, gvrsn)) {
|
|
197
|
+
throw new ValidationError(`Credential ${args.credentialSaid} is missing verified local evidence.`);
|
|
198
|
+
}
|
|
117
199
|
return {
|
|
118
200
|
grant,
|
|
119
201
|
attachments,
|
|
@@ -122,45 +204,74 @@ export function ipexCredentialGrant(args) {
|
|
|
122
204
|
support,
|
|
123
205
|
};
|
|
124
206
|
}
|
|
125
|
-
/**
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
if (
|
|
132
|
-
throw new ValidationError(
|
|
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>"}.`);
|
|
133
215
|
}
|
|
134
|
-
if ((
|
|
135
|
-
throw new ValidationError(
|
|
216
|
+
if (ipexRecipient(grant) !== recipient) {
|
|
217
|
+
throw new ValidationError("Grant recipient does not match the admitting identifier.");
|
|
136
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);
|
|
137
229
|
const [admit, attachments] = ipexAdmitExn(args.hab, args.message ?? "", args.grant, args.options ?? {});
|
|
138
230
|
return {
|
|
139
231
|
admit,
|
|
140
232
|
attachments,
|
|
141
|
-
wire: concatBytes(args.hab.endorse(admit, { pipelined: false, gvrsn: args.options?.gvrsn ?? undefined }), attachments),
|
|
233
|
+
wire: args.sign === false ? new Uint8Array() : concatBytes(args.hab.endorse(admit, { pipelined: false, gvrsn: args.options?.gvrsn ?? undefined }), attachments),
|
|
142
234
|
};
|
|
143
235
|
}
|
|
144
|
-
/**
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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();
|
|
150
251
|
}
|
|
151
252
|
/** Rebuild grant-embedded `anc`, `iss`, and `acdc` streams from exchange storage. */
|
|
152
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) {
|
|
153
264
|
if (grant.route !== IPEX_GRANT_ROUTE || !grant.said) {
|
|
154
|
-
throw new ValidationError(`Expected
|
|
265
|
+
throw new ValidationError(`Expected ${IPEX_GRANT_ROUTE} EXN.`);
|
|
155
266
|
}
|
|
156
267
|
const embeds = embeddedSection(grant);
|
|
157
268
|
if (!embeds) {
|
|
158
269
|
throw new ValidationError(`Grant ${grant.said} is missing embedded artifacts.`);
|
|
159
270
|
}
|
|
160
271
|
return {
|
|
161
|
-
anc: storedArtifact(keriBody(embeds.anc, "anc"), pathedAttachment(
|
|
162
|
-
iss: storedArtifact(keriBody(embeds.iss, "iss"), pathedAttachment(
|
|
163
|
-
acdc: storedArtifact(acdcBody(embeds.acdc, "acdc"), pathedAttachment(
|
|
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),
|
|
164
275
|
};
|
|
165
276
|
}
|
|
166
277
|
/** Extract the embedded credential SAID from an accepted `/ipex/grant`. */
|
|
@@ -218,10 +329,10 @@ function acdcBody(value, label) {
|
|
|
218
329
|
function storedArtifact(body, attachment, gvrsn) {
|
|
219
330
|
return { wire: concatBytes(body.raw, attachment), genus: resolveAttachmentGvrsn(body, gvrsn) };
|
|
220
331
|
}
|
|
221
|
-
function pathedAttachment(
|
|
332
|
+
function pathedAttachment(pathed, label) {
|
|
222
333
|
const path = `/e/${label}`;
|
|
223
|
-
for (const
|
|
224
|
-
const attachment = pathedAttachmentFromRaw(
|
|
334
|
+
for (const raw of pathed) {
|
|
335
|
+
const attachment = pathedAttachmentFromRaw(raw, path);
|
|
225
336
|
if (attachment) {
|
|
226
337
|
return attachment;
|
|
227
338
|
}
|
|
@@ -0,0 +1,243 @@
|
|
|
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";
|
|
4
|
+
const nodeIlks = new Set([null, "acm", "ace", "act", "acg"]);
|
|
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
|
+
}
|
|
14
|
+
/** SAD maps, including null-prototype maps, exclude scalar/array representations. */
|
|
15
|
+
function record(value) {
|
|
16
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
17
|
+
}
|
|
18
|
+
/** Python's empty section containers carry no disclosed edge semantics. */
|
|
19
|
+
function present(value) {
|
|
20
|
+
return Array.isArray(value) ? value.length > 0 : record(value) ? Object.keys(value).length > 0 : Boolean(value);
|
|
21
|
+
}
|
|
22
|
+
/** Validate disclosure-query shape; actual schema commitments are checked against disclosed nodes. */
|
|
23
|
+
export function validDisclosurePlan(value) {
|
|
24
|
+
if (!Array.isArray(value))
|
|
25
|
+
return false;
|
|
26
|
+
for (const item of value) {
|
|
27
|
+
if (!Array.isArray(item) || item.length !== 3)
|
|
28
|
+
return false;
|
|
29
|
+
const [schema, path, fields] = item;
|
|
30
|
+
if (typeof schema !== "string" || typeof path !== "string")
|
|
31
|
+
return false;
|
|
32
|
+
if (path !== "/") {
|
|
33
|
+
if (!path.startsWith("/") || !path.endsWith("/"))
|
|
34
|
+
return false;
|
|
35
|
+
const parts = path.replace(/^\/+|\/+$/g, "").split("/");
|
|
36
|
+
if (parts.some((part) => !part) || parts.at(-1) !== "_")
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (!Array.isArray(fields))
|
|
40
|
+
return false;
|
|
41
|
+
if (fields.length === 1 && fields[0] === "")
|
|
42
|
+
continue;
|
|
43
|
+
for (const field of fields) {
|
|
44
|
+
if (typeof field !== "string" || !field || field.startsWith("/"))
|
|
45
|
+
return false;
|
|
46
|
+
try {
|
|
47
|
+
makePather(field, { relative: true });
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return true;
|
|
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
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Index unique disclosed credential nodes and walk their reachable graph in BFS order.
|
|
62
|
+
* Offers may omit far nodes; grants require every referenced node. Nested ownership
|
|
63
|
+
* does not make these nodes independently accepted runtime messages.
|
|
64
|
+
*/
|
|
65
|
+
export function walkIpexGraph(origin, nests, closed) {
|
|
66
|
+
const nodes = new Map();
|
|
67
|
+
for (const [index, frame] of nests.entries()) {
|
|
68
|
+
const body = frame.body;
|
|
69
|
+
if (!(body instanceof SerderACDC) || !body.verify() || !nodeIlks.has(body.ilk)
|
|
70
|
+
|| !body.said || (index === 0 && body.said !== origin) || nodes.has(body.said))
|
|
71
|
+
return null;
|
|
72
|
+
// Descendants are not additional implicit evidence for this disclosed node.
|
|
73
|
+
if (frame.nests?.length)
|
|
74
|
+
return null;
|
|
75
|
+
nodes.set(body.said, frame);
|
|
76
|
+
}
|
|
77
|
+
if (!nodes.has(origin))
|
|
78
|
+
return null;
|
|
79
|
+
const seen = new Set();
|
|
80
|
+
const order = [];
|
|
81
|
+
const dependencies = new Map();
|
|
82
|
+
const queue = [origin];
|
|
83
|
+
for (let index = 0; index < queue.length; index++) {
|
|
84
|
+
const said = queue[index];
|
|
85
|
+
if (seen.has(said))
|
|
86
|
+
continue;
|
|
87
|
+
seen.add(said);
|
|
88
|
+
order.push(said);
|
|
89
|
+
const farNodes = new Set();
|
|
90
|
+
dependencies.set(said, farNodes);
|
|
91
|
+
const edges = blocks(nodes.get(said).body.sad.e);
|
|
92
|
+
if (!edges)
|
|
93
|
+
return null;
|
|
94
|
+
const groups = [...edges];
|
|
95
|
+
for (let g = 0; g < groups.length; g++) {
|
|
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)) {
|
|
102
|
+
if (closed)
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
farNodes.add(target);
|
|
107
|
+
if (!seen.has(target))
|
|
108
|
+
queue.push(target);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
if (!record(edge))
|
|
113
|
+
return null;
|
|
114
|
+
for (const [key, value] of Object.entries(edge)) {
|
|
115
|
+
if (acdcGroupLabels.has(key) || typeof value === "string")
|
|
116
|
+
continue;
|
|
117
|
+
groups.push(value);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
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;
|
|
142
|
+
}
|
|
143
|
+
/** Compare SAD values structurally while retaining list order; map insertion order is not semantic here. */
|
|
144
|
+
function equal(a, b) {
|
|
145
|
+
if (a === b)
|
|
146
|
+
return true;
|
|
147
|
+
if (Array.isArray(a) && Array.isArray(b))
|
|
148
|
+
return a.length === b.length && a.every((item, i) => equal(item, b[i]));
|
|
149
|
+
if (record(a) && record(b)) {
|
|
150
|
+
return Object.keys(a).length === Object.keys(b).length
|
|
151
|
+
&& Object.entries(a).every(([key, value]) => Object.hasOwn(b, key) && equal(value, b[key]));
|
|
152
|
+
}
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
/** Select every disclosed node in exact BFS order using literal SAD paths and virtual far-node hops. */
|
|
156
|
+
export function verifyIpexDisclosure(plan, origin, graph) {
|
|
157
|
+
if (!plan.length || graph.order[0] !== origin)
|
|
158
|
+
return false;
|
|
159
|
+
const selected = [];
|
|
160
|
+
for (const [schema, prefix, fields] of plan) {
|
|
161
|
+
let said = origin;
|
|
162
|
+
let node = graph.nodes.get(said);
|
|
163
|
+
if (!node)
|
|
164
|
+
return false;
|
|
165
|
+
let value = node.body.sad;
|
|
166
|
+
if (prefix !== "/") {
|
|
167
|
+
for (const part of prefix.replace(/^\/+|\/+$/g, "").split("/")) {
|
|
168
|
+
if (part === "_") {
|
|
169
|
+
if (!record(value) || typeof value.n !== "string")
|
|
170
|
+
return false;
|
|
171
|
+
const target = value.n;
|
|
172
|
+
said = target;
|
|
173
|
+
node = graph.nodes.get(said);
|
|
174
|
+
if (!node)
|
|
175
|
+
return false;
|
|
176
|
+
value = node.body.sad;
|
|
177
|
+
}
|
|
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
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
selected.push(said);
|
|
190
|
+
const serder = node.body;
|
|
191
|
+
const nodeSchema = serder.schema;
|
|
192
|
+
if ((record(nodeSchema) ? nodeSchema.$id : nodeSchema) !== schema)
|
|
193
|
+
return false;
|
|
194
|
+
if (fields.length === 1 && fields[0] === "") {
|
|
195
|
+
for (const label of ["a", "e", "r"]) {
|
|
196
|
+
const section = serder.sad[label];
|
|
197
|
+
if (present(section) && !record(section))
|
|
198
|
+
return false;
|
|
199
|
+
}
|
|
200
|
+
if (present(serder.sad.A) && !Array.isArray(serder.sad.A))
|
|
201
|
+
return false;
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
const sections = new Map();
|
|
205
|
+
for (const field of fields) {
|
|
206
|
+
try {
|
|
207
|
+
const pather = makePather(field, { relative: true });
|
|
208
|
+
pather.resolve(serder.sad);
|
|
209
|
+
const root = pather.rparts[0];
|
|
210
|
+
if (root !== undefined)
|
|
211
|
+
sections.set(root, [...(sections.get(root) ?? []), field]);
|
|
212
|
+
}
|
|
213
|
+
catch {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
for (const [root, paths] of sections) {
|
|
218
|
+
const section = serder.sad[root];
|
|
219
|
+
if (!record(section))
|
|
220
|
+
continue;
|
|
221
|
+
try {
|
|
222
|
+
const compactor = new Compactor({
|
|
223
|
+
mad: structuredClone(section),
|
|
224
|
+
makify: true,
|
|
225
|
+
kind: serder.kind,
|
|
226
|
+
});
|
|
227
|
+
compactor.compact(paths, root);
|
|
228
|
+
const partial = compactor.partials?.[paths.join("|")];
|
|
229
|
+
if (!partial)
|
|
230
|
+
return false;
|
|
231
|
+
const expected = partial.mad;
|
|
232
|
+
if (section.d === "" && expected.d)
|
|
233
|
+
expected.d = "";
|
|
234
|
+
if (!equal(expected, section))
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
catch {
|
|
238
|
+
return false;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return equal(selected, graph.order);
|
|
243
|
+
}
|