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
|
@@ -88,7 +88,7 @@ export function splitKey(key, sep = ".") {
|
|
|
88
88
|
const keyStr = t(keyBytes);
|
|
89
89
|
const splitAt = keyStr.lastIndexOf(sepStr);
|
|
90
90
|
if (splitAt <= 0 || splitAt + sepStr.length >= keyStr.length) {
|
|
91
|
-
throw new ValidationError(`Key must split into exactly 2 parts at rightmost separator
|
|
91
|
+
throw new ValidationError(`Key must split into exactly 2 parts at rightmost separator`);
|
|
92
92
|
}
|
|
93
93
|
return [
|
|
94
94
|
b(keyStr.slice(0, splitAt)),
|
|
@@ -162,7 +162,7 @@ export function unsuffix(iokey, sep = ".") {
|
|
|
162
162
|
const iokeyStr = t(iokeyBytes);
|
|
163
163
|
const lastSepIndex = iokeyStr.lastIndexOf(sepStr);
|
|
164
164
|
if (lastSepIndex === -1) {
|
|
165
|
-
throw new DatabaseKeyError(`No separator found in iokey
|
|
165
|
+
throw new DatabaseKeyError(`No separator found in iokey`);
|
|
166
166
|
}
|
|
167
167
|
const keyStr = iokeyStr.substring(0, lastSepIndex);
|
|
168
168
|
const suffixStr = iokeyStr.substring(lastSepIndex + sepStr.length);
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
* Core LMDB manager used by higher-level DB abstractions.
|
|
3
3
|
*/
|
|
4
4
|
import * as dntShim from "../../_dnt.shims.js";
|
|
5
|
-
import { b, bytesEqual, bytesHex,
|
|
6
|
-
import {
|
|
7
|
-
import { action } from "effection";
|
|
5
|
+
import { b, bytesEqual, bytesHex, t, toBytes } from "cesr-ts";
|
|
6
|
+
import { call, ensure } from "effection";
|
|
8
7
|
import { open } from "lmdb";
|
|
9
|
-
import * as lmdbBinding from "lmdb";
|
|
10
8
|
import { startsWith } from "../../core/bytes.js";
|
|
11
9
|
import { DatabaseKeyError, DatabaseNotOpenError, DatabaseOperationError } from "../../core/errors.js";
|
|
12
10
|
import { consoleLogger } from "../../core/logger.js";
|
|
@@ -211,6 +209,10 @@ const DEFAULT_DB_VERSION = "1.0.0";
|
|
|
211
209
|
* `PathManager` lifecycle instead of inheriting KERIpy's exact structure
|
|
212
210
|
*/
|
|
213
211
|
export class LMDBer {
|
|
212
|
+
/** Expose only a usable environment, never one whose shutdown has started or failed. */
|
|
213
|
+
get env() {
|
|
214
|
+
return this.closing ? null : this.root;
|
|
215
|
+
}
|
|
214
216
|
constructor(options = {}, defaults) {
|
|
215
217
|
Object.defineProperty(this, "pathManager", {
|
|
216
218
|
enumerable: true,
|
|
@@ -218,12 +220,19 @@ export class LMDBer {
|
|
|
218
220
|
writable: true,
|
|
219
221
|
value: void 0
|
|
220
222
|
});
|
|
221
|
-
Object.defineProperty(this, "
|
|
223
|
+
Object.defineProperty(this, "root", {
|
|
222
224
|
enumerable: true,
|
|
223
225
|
configurable: true,
|
|
224
226
|
writable: true,
|
|
225
227
|
value: void 0
|
|
226
228
|
});
|
|
229
|
+
/** A rejected close remains authoritative: the binding may have disabled only part of the handle. */
|
|
230
|
+
Object.defineProperty(this, "closing", {
|
|
231
|
+
enumerable: true,
|
|
232
|
+
configurable: true,
|
|
233
|
+
writable: true,
|
|
234
|
+
value: null
|
|
235
|
+
});
|
|
227
236
|
Object.defineProperty(this, "readonly", {
|
|
228
237
|
enumerable: true,
|
|
229
238
|
configurable: true,
|
|
@@ -249,6 +258,13 @@ export class LMDBer {
|
|
|
249
258
|
writable: true,
|
|
250
259
|
value: void 0
|
|
251
260
|
});
|
|
261
|
+
/** Existing-store maintenance may neither create tables nor clear its target. */
|
|
262
|
+
Object.defineProperty(this, "existingOnly", {
|
|
263
|
+
enumerable: true,
|
|
264
|
+
configurable: true,
|
|
265
|
+
writable: true,
|
|
266
|
+
value: false
|
|
267
|
+
});
|
|
252
268
|
this.defaults = { ...LMDBER_DEFAULTS, ...defaults };
|
|
253
269
|
this.logger = options.logger ?? consoleLogger;
|
|
254
270
|
this.configuredMapSize = options.mapSize;
|
|
@@ -266,7 +282,7 @@ export class LMDBer {
|
|
|
266
282
|
perm: this.defaults.perm,
|
|
267
283
|
};
|
|
268
284
|
this.pathManager = new PathManager(options, pathDefaults);
|
|
269
|
-
this.
|
|
285
|
+
this.root = null;
|
|
270
286
|
this.readonly = options.readonly || false;
|
|
271
287
|
}
|
|
272
288
|
/** Expose the resolved logical database name used for path derivation and temp dirs. */
|
|
@@ -281,6 +297,14 @@ export class LMDBer {
|
|
|
281
297
|
get opened() {
|
|
282
298
|
return this.pathManager.opened && this.env !== null;
|
|
283
299
|
}
|
|
300
|
+
/** Inspect the pinned lmdb-js writer at the storage boundary, without exposing its native handle. */
|
|
301
|
+
get inWriteTransaction() {
|
|
302
|
+
const root = this.requireEnv();
|
|
303
|
+
if (!("env" in root) || !root.env || typeof root.env !== "object") {
|
|
304
|
+
throw new DatabaseOperationError("Unsupported LMDB writer inspection");
|
|
305
|
+
}
|
|
306
|
+
return "writeTxn" in root.env && root.env.writeTxn != null;
|
|
307
|
+
}
|
|
284
308
|
/** Report whether this environment uses a temporary backing directory. */
|
|
285
309
|
get temp() {
|
|
286
310
|
return this.pathManager.temp;
|
|
@@ -297,29 +321,36 @@ export class LMDBer {
|
|
|
297
321
|
return this.env;
|
|
298
322
|
}
|
|
299
323
|
/** Normalize low-level LMDB key-shape failures into one project-specific error type. */
|
|
300
|
-
formatDbKeyError(
|
|
324
|
+
formatDbKeyError(error) {
|
|
301
325
|
const message = error instanceof Error ? error.message : String(error);
|
|
302
|
-
return new DatabaseKeyError(`Key is empty, too big, or wrong size: ${message}`, {
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
326
|
+
return new DatabaseKeyError(`Key is empty, too big, or wrong size: ${message}`, { cause: error });
|
|
327
|
+
}
|
|
328
|
+
/** Join native shutdown even when the caller is cancelled; failed handles cannot be reused. */
|
|
329
|
+
*closeEnv() {
|
|
330
|
+
if (!this.closing && this.root) {
|
|
331
|
+
const root = this.root;
|
|
332
|
+
// lmdb-js disables reads/writes before completion. A rejection cannot prove
|
|
333
|
+
// whether the environment is usable or fully closed; retain it as failed.
|
|
334
|
+
this.closing = new Promise((resolve, reject) => {
|
|
335
|
+
// In 3.5.3 the callback runs after doClose, including outstanding reads.
|
|
336
|
+
// The returned Promise alone can resolve before that deferred branch.
|
|
337
|
+
const native = root;
|
|
338
|
+
native.close(resolve).catch(reject);
|
|
339
|
+
}).then(() => {
|
|
340
|
+
this.root = null;
|
|
341
|
+
this.pathManager.opened = false;
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
const pending = this.closing;
|
|
345
|
+
if (pending) {
|
|
346
|
+
yield* call(function* () {
|
|
347
|
+
// Register joining before the async leaf. Effection reports a failing
|
|
348
|
+
// ensure as destruction failure, including when its task is halted.
|
|
349
|
+
yield* ensure(() => call(() => pending));
|
|
350
|
+
yield* call(() => pending);
|
|
351
|
+
});
|
|
352
|
+
this.closing = null;
|
|
353
|
+
}
|
|
323
354
|
}
|
|
324
355
|
/**
|
|
325
356
|
* Reopen the LMDB environment at the resolved path.
|
|
@@ -329,19 +360,9 @@ export class LMDBer {
|
|
|
329
360
|
* and stamps the default version marker on newly-created writable envs.
|
|
330
361
|
*/
|
|
331
362
|
*reopen(options = {}) {
|
|
363
|
+
yield* this.closeEnv();
|
|
332
364
|
const readonly = options.readonly ?? this.readonly;
|
|
333
365
|
this.readonly = readonly;
|
|
334
|
-
// Close existing database if open (prevents double-free when reopening)
|
|
335
|
-
if (this.env) {
|
|
336
|
-
try {
|
|
337
|
-
yield* this.closeEnv(this.env);
|
|
338
|
-
}
|
|
339
|
-
catch (error) {
|
|
340
|
-
// Ignore close errors (database might already be closed)
|
|
341
|
-
this.logger.warn(`Warning: Error closing existing LMDB environment: ${error}`);
|
|
342
|
-
}
|
|
343
|
-
this.env = null;
|
|
344
|
-
}
|
|
345
366
|
// Reopen path manager (now an Effection operation)
|
|
346
367
|
yield* this.pathManager.reopen(options);
|
|
347
368
|
if (!this.pathManager.path) {
|
|
@@ -354,16 +375,42 @@ export class LMDBer {
|
|
|
354
375
|
// For readonly mode, database files must exist
|
|
355
376
|
if (readonly && !dbExists) {
|
|
356
377
|
this.logger.error(`Cannot open readonly database: database files do not exist at ${dbPath}`);
|
|
357
|
-
this.
|
|
378
|
+
this.root = null;
|
|
358
379
|
return false;
|
|
359
380
|
}
|
|
360
|
-
|
|
381
|
+
if (options.mapSize !== undefined)
|
|
382
|
+
this.configuredMapSize = options.mapSize;
|
|
383
|
+
this.existingOnly = false;
|
|
384
|
+
this.openEnvironment(dbPath, dbExists);
|
|
385
|
+
// KERIpy parity: stamp version metadata on newly-created DBs and temp DBs.
|
|
386
|
+
if (this.opened && !readonly && (!dbExists || this.temp)) {
|
|
387
|
+
this.setVer(DEFAULT_DB_VERSION);
|
|
388
|
+
}
|
|
389
|
+
return this.opened;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Open a resolved existing environment without path creation or version writes.
|
|
393
|
+
* All subsequent named-table bindings refuse creation, including writable ones.
|
|
394
|
+
*/
|
|
395
|
+
*openExisting(path) {
|
|
396
|
+
if (this.root || this.closing || this.temp) {
|
|
397
|
+
throw new DatabaseOperationError("Existing-store opening requires a closed, persistent LMDBer");
|
|
398
|
+
}
|
|
399
|
+
const data = yield* this.pathManager.statFileOp(`${path}/data.mdb`);
|
|
400
|
+
if (!data.isFile) {
|
|
401
|
+
throw new DatabaseOperationError(`Existing database not found at ${path}`);
|
|
402
|
+
}
|
|
403
|
+
this.existingOnly = true;
|
|
404
|
+
this.openEnvironment(path, true);
|
|
405
|
+
this.pathManager.path = path;
|
|
406
|
+
this.pathManager.opened = true;
|
|
407
|
+
}
|
|
408
|
+
/** Open the native environment with the shared binary and map-size contract. */
|
|
409
|
+
openEnvironment(dbPath, dbExists) {
|
|
410
|
+
// Prefer the configured option, then env, then default.
|
|
361
411
|
// When data.mdb already exists, raise to at least the stored map size so
|
|
362
412
|
// KERIpy databases opened with KERI_BASER_MAP_SIZE=10GiB (etc.) do not abort
|
|
363
413
|
// under an undersized lmdb-js virtual mapping.
|
|
364
|
-
if (options.mapSize !== undefined) {
|
|
365
|
-
this.configuredMapSize = options.mapSize;
|
|
366
|
-
}
|
|
367
414
|
const dataMdbPath = dbExists ? `${dbPath}/data.mdb` : null;
|
|
368
415
|
const effectiveMapSize = resolveLmdbMapSize({
|
|
369
416
|
optionMapSize: this.configuredMapSize,
|
|
@@ -375,35 +422,27 @@ export class LMDBer {
|
|
|
375
422
|
});
|
|
376
423
|
const dbConfig = {
|
|
377
424
|
path: dbPath, // Use directory path (Node.js lmdb should handle this)
|
|
425
|
+
noSubdir: false, // A dotted directory name must not select LMDB's single-file layout.
|
|
378
426
|
maxDbs: this.defaults.maxNamedDBs,
|
|
379
427
|
mapSize: effectiveMapSize,
|
|
380
|
-
readOnly: readonly,
|
|
428
|
+
readOnly: this.readonly,
|
|
381
429
|
compression: false, // Disable compression for compatibility
|
|
382
430
|
encoding: "binary", // to mimic KERIpy behavior
|
|
383
431
|
keyEncoding: "binary", // to mimic KERIpy behavior
|
|
384
432
|
};
|
|
385
|
-
this.logger.debug(`Opening LMDB at: ${dbPath} (readonly: ${readonly}, mapSize: ${effectiveMapSize})`);
|
|
433
|
+
this.logger.debug(`Opening LMDB at: ${dbPath} (readonly: ${this.readonly}, mapSize: ${effectiveMapSize})`);
|
|
386
434
|
// Open LMDB environment
|
|
387
435
|
// LMDB's open() will create data.mdb and lock.mdb if they don't exist
|
|
388
436
|
try {
|
|
389
437
|
// do sync because wrapping synchronous native operations in action() can cause
|
|
390
438
|
// memory management issues with native bindings (double-free errors)
|
|
391
|
-
this.
|
|
439
|
+
this.root = open(dbConfig);
|
|
392
440
|
this.logger.debug(`LMDB environment opened successfully`);
|
|
393
|
-
// KERIpy parity: stamp version metadata on newly-created DBs and temp DBs.
|
|
394
|
-
if (this.opened && !readonly && (!dbExists || this.temp)) {
|
|
395
|
-
this.setVer(DEFAULT_DB_VERSION);
|
|
396
|
-
}
|
|
397
|
-
return this.opened;
|
|
398
441
|
}
|
|
399
442
|
catch (error) {
|
|
400
|
-
this.
|
|
443
|
+
this.root = null;
|
|
401
444
|
const message = error instanceof Error ? error.message : String(error);
|
|
402
|
-
throw new DatabaseOperationError(`Failed to open LMDB environment: ${message}`, {
|
|
403
|
-
path: dbPath,
|
|
404
|
-
readonly,
|
|
405
|
-
mapSize: effectiveMapSize,
|
|
406
|
-
});
|
|
445
|
+
throw new DatabaseOperationError(`Failed to open LMDB environment: ${message}`, { cause: error });
|
|
407
446
|
}
|
|
408
447
|
}
|
|
409
448
|
/** True if the current env path already has a `data.mdb` file. */
|
|
@@ -417,25 +456,15 @@ export class LMDBer {
|
|
|
417
456
|
return pathStat.isFile ?? false;
|
|
418
457
|
}
|
|
419
458
|
/**
|
|
420
|
-
* Close the
|
|
421
|
-
*
|
|
422
|
-
*
|
|
423
|
-
* timers before optional path cleanup, so test/resource teardown does not
|
|
424
|
-
* leak across later work.
|
|
459
|
+
* Close the environment before path cleanup. Observable binding failures
|
|
460
|
+
* propagate and permanently prevent this wrapper from reusing or deleting it.
|
|
461
|
+
* Repeated closure of a known-closed environment is harmless.
|
|
425
462
|
*/
|
|
426
463
|
*close(clear = false) {
|
|
427
|
-
if (this.
|
|
428
|
-
|
|
429
|
-
yield* this.closeEnv(this.env);
|
|
430
|
-
yield* this.quiesceEnvTimers(); // lmdb-js uses internal teardown timers to manage post-close; this lets them finish
|
|
431
|
-
}
|
|
432
|
-
catch (error) {
|
|
433
|
-
// Intentional recovery: close errors are non-fatal during shutdown paths.
|
|
434
|
-
this.logger.warn(`Error closing LMDB: ${error}`);
|
|
435
|
-
}
|
|
436
|
-
this.env = null;
|
|
464
|
+
if (clear && this.existingOnly) {
|
|
465
|
+
throw new DatabaseOperationError("Existing-store maintenance cannot clear its environment");
|
|
437
466
|
}
|
|
438
|
-
|
|
467
|
+
yield* this.closeEnv();
|
|
439
468
|
yield* this.pathManager.close(clear);
|
|
440
469
|
return true;
|
|
441
470
|
}
|
|
@@ -466,9 +495,7 @@ export class LMDBer {
|
|
|
466
495
|
}
|
|
467
496
|
catch (error) {
|
|
468
497
|
const message = error instanceof Error ? error.message : String(error);
|
|
469
|
-
throw new DatabaseOperationError(`Failed to set database version: ${message}`, {
|
|
470
|
-
version: val,
|
|
471
|
-
});
|
|
498
|
+
throw new DatabaseOperationError(`Failed to set database version: ${message}`, { cause: error });
|
|
472
499
|
}
|
|
473
500
|
}
|
|
474
501
|
/**
|
|
@@ -479,11 +506,21 @@ export class LMDBer {
|
|
|
479
506
|
*/
|
|
480
507
|
openDB(name, dupsort = false) {
|
|
481
508
|
const env = this.requireEnv();
|
|
482
|
-
|
|
509
|
+
// lmdb-js 3.5.3 supports create:false in open.js even though its public
|
|
510
|
+
// DatabaseOptions declaration omits it. Keep that native detail here.
|
|
511
|
+
const options = {
|
|
483
512
|
keyEncoding: "binary",
|
|
484
513
|
encoding: "binary", // Use binary encoding for values (raw bytes) to match KERIpy
|
|
485
514
|
dupSort: dupsort,
|
|
486
|
-
|
|
515
|
+
create: !this.existingOnly,
|
|
516
|
+
};
|
|
517
|
+
const table = env.openDB(name, options);
|
|
518
|
+
// The native API returns undefined for an absent non-creating binding,
|
|
519
|
+
// despite declaring a non-null result. Maintenance must reject it; ordinary
|
|
520
|
+
// readonly Baser bindings already tolerate tables absent from Python layouts.
|
|
521
|
+
if (this.existingOnly && !table)
|
|
522
|
+
throw new DatabaseOperationError(`Database not found: ${name}`);
|
|
523
|
+
return table;
|
|
487
524
|
}
|
|
488
525
|
/*
|
|
489
526
|
* Plain key/value family (`dupsort=false` parity surface)
|
|
@@ -512,7 +549,7 @@ export class LMDBer {
|
|
|
512
549
|
return result;
|
|
513
550
|
}
|
|
514
551
|
catch (error) {
|
|
515
|
-
throw this.formatDbKeyError(
|
|
552
|
+
throw this.formatDbKeyError(error);
|
|
516
553
|
}
|
|
517
554
|
}
|
|
518
555
|
/**
|
|
@@ -530,7 +567,7 @@ export class LMDBer {
|
|
|
530
567
|
return true;
|
|
531
568
|
}
|
|
532
569
|
catch (error) {
|
|
533
|
-
throw this.formatDbKeyError(
|
|
570
|
+
throw this.formatDbKeyError(error);
|
|
534
571
|
}
|
|
535
572
|
}
|
|
536
573
|
/**
|
|
@@ -551,64 +588,7 @@ export class LMDBer {
|
|
|
551
588
|
}
|
|
552
589
|
}
|
|
553
590
|
catch (error) {
|
|
554
|
-
throw this.formatDbKeyError(
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
/**
|
|
558
|
-
* Read one owned row only after its byte ceiling admits materialization.
|
|
559
|
-
* Pin 3.5.3 NAPI or matching native Node V8/compression-off hooks.
|
|
560
|
-
* Fast V8 reads may create mapped views; native scratch/residency are separate.
|
|
561
|
-
* Borrow an active writer, otherwise hold one explicit snapshot through both reads.
|
|
562
|
-
* A synchronous beforeCopy callback may reserve credit after extent admission; it must not mutate rows.
|
|
563
|
-
* The caller owns that credit's lifetime; this ceiling does not bound other read APIs.
|
|
564
|
-
*/
|
|
565
|
-
getValBounded(db, key, maxBytes, beforeCopy) {
|
|
566
|
-
const env = this.requireEnv();
|
|
567
|
-
if (!Number.isSafeInteger(maxBytes) || maxBytes < 0)
|
|
568
|
-
throw new RangeError("Invalid LMDB row byte ceiling");
|
|
569
|
-
const native = db;
|
|
570
|
-
const binding = lmdbBinding;
|
|
571
|
-
const version = binding.version;
|
|
572
|
-
const runtime = versions;
|
|
573
|
-
const matchingNodeV8 = version && Number.isSafeInteger(version.nodeCompiledVersion)
|
|
574
|
-
&& version.nodeCompiledVersion >= 20
|
|
575
|
-
&& version.nodeCompiledVersion === Number(runtime.node?.split(".")[0])
|
|
576
|
-
&& Boolean(runtime.v8) && !runtime.deno && !runtime.bun
|
|
577
|
-
&& binding.v8AccelerationEnabled === true;
|
|
578
|
-
if (!version || ("nodeCompiledVersion" in version && !matchingNodeV8) || native.encoding !== "binary"
|
|
579
|
-
|| native.compression || native.useVersions
|
|
580
|
-
|| native.env !== env.env
|
|
581
|
-
|| typeof native.getBinaryFast !== "function" || typeof native.getBinary !== "function"
|
|
582
|
-
|| typeof native._returnLargeBuffer !== "function" || typeof native.useReadTransaction !== "function") {
|
|
583
|
-
throw new DatabaseOperationError("Unsupported LMDB bounded-row binding; require lmdb 3.5.3 NAPI or matching native Node V8 binary mode");
|
|
584
|
-
}
|
|
585
|
-
const writer = native.env.writeTxn ?? null;
|
|
586
|
-
const transaction = writer ? undefined : native.useReadTransaction();
|
|
587
|
-
try {
|
|
588
|
-
const probe = Object.create(native);
|
|
589
|
-
// Native returns the required size before this hook grows/copies an insufficient target.
|
|
590
|
-
probe._returnLargeBuffer = () => undefined;
|
|
591
|
-
probe.getBinaryFast(key, { transaction });
|
|
592
|
-
const size = probe.lastSize;
|
|
593
|
-
if (size === -30798)
|
|
594
|
-
return null; // MDB_NOTFOUND
|
|
595
|
-
if (!Number.isSafeInteger(size) || size < 0)
|
|
596
|
-
throw new DatabaseOperationError("Invalid LMDB row extent");
|
|
597
|
-
if (size > maxBytes)
|
|
598
|
-
throw new ResourceLimitError("Stored LMDB row exceeds byte ceiling");
|
|
599
|
-
if ((native.env.writeTxn ?? null) !== writer)
|
|
600
|
-
throw new DatabaseOperationError("LMDB row transaction changed");
|
|
601
|
-
beforeCopy?.(size);
|
|
602
|
-
if ((native.env.writeTxn ?? null) !== writer)
|
|
603
|
-
throw new DatabaseOperationError("LMDB row transaction changed");
|
|
604
|
-
const value = native.getBinary(key, { transaction });
|
|
605
|
-
if (!value || value.length !== size || (native.env.writeTxn ?? null) !== writer) {
|
|
606
|
-
throw new DatabaseOperationError("LMDB row changed during bounded read");
|
|
607
|
-
}
|
|
608
|
-
return new Uint8Array(value);
|
|
609
|
-
}
|
|
610
|
-
finally {
|
|
611
|
-
transaction?.done();
|
|
591
|
+
throw this.formatDbKeyError(error);
|
|
612
592
|
}
|
|
613
593
|
}
|
|
614
594
|
/**
|
|
@@ -634,7 +614,7 @@ export class LMDBer {
|
|
|
634
614
|
return result;
|
|
635
615
|
}
|
|
636
616
|
catch (error) {
|
|
637
|
-
throw this.formatDbKeyError(
|
|
617
|
+
throw this.formatDbKeyError(error);
|
|
638
618
|
}
|
|
639
619
|
}
|
|
640
620
|
/**
|
|
@@ -688,9 +668,7 @@ export class LMDBer {
|
|
|
688
668
|
}
|
|
689
669
|
catch (error) {
|
|
690
670
|
const message = error instanceof Error ? error.message : String(error);
|
|
691
|
-
throw new DatabaseOperationError(`Failed to count database branch: ${message}`, {
|
|
692
|
-
top: Array.from(top),
|
|
693
|
-
});
|
|
671
|
+
throw new DatabaseOperationError(`Failed to count database branch: ${message}`, { cause: error });
|
|
694
672
|
}
|
|
695
673
|
}
|
|
696
674
|
/**
|
|
@@ -731,9 +709,7 @@ export class LMDBer {
|
|
|
731
709
|
}
|
|
732
710
|
catch (error) {
|
|
733
711
|
const message = error instanceof Error ? error.message : String(error);
|
|
734
|
-
throw new DatabaseOperationError(`Failed to delete database branch: ${message}`, {
|
|
735
|
-
top: Array.from(top),
|
|
736
|
-
});
|
|
712
|
+
throw new DatabaseOperationError(`Failed to delete database branch: ${message}`, { cause: error });
|
|
737
713
|
}
|
|
738
714
|
}
|
|
739
715
|
/**
|
|
@@ -762,9 +738,7 @@ export class LMDBer {
|
|
|
762
738
|
}
|
|
763
739
|
catch (error) {
|
|
764
740
|
const message = error instanceof Error ? error.message : String(error);
|
|
765
|
-
throw new DatabaseOperationError(`Failed to iterate database branch: ${message}`, {
|
|
766
|
-
top: Array.from(top),
|
|
767
|
-
});
|
|
741
|
+
throw new DatabaseOperationError(`Failed to iterate database branch: ${message}`, { cause: error });
|
|
768
742
|
}
|
|
769
743
|
}
|
|
770
744
|
/*
|
|
@@ -170,9 +170,7 @@ export class PathManager {
|
|
|
170
170
|
set name(value) {
|
|
171
171
|
// Check if path is absolute
|
|
172
172
|
if (isAbsolute(value) || /^[a-zA-Z]:[\\/]/.test(value)) {
|
|
173
|
-
throw new InvalidPathNameError(`Not relative name=${value} path
|
|
174
|
-
name: value,
|
|
175
|
-
});
|
|
173
|
+
throw new InvalidPathNameError(`Not relative name=${value} path.`);
|
|
176
174
|
}
|
|
177
175
|
this._name = value;
|
|
178
176
|
}
|
|
@@ -412,7 +410,7 @@ export class PathManager {
|
|
|
412
410
|
const altReady = yield* this._ensurePathAccessible(alt);
|
|
413
411
|
if (!altReady) {
|
|
414
412
|
this.logger.error(`Alt path not available at ${alt}`);
|
|
415
|
-
throw new PathError(`Alt path not available at ${alt}
|
|
413
|
+
throw new PathError(`Alt path not available at ${alt}`);
|
|
416
414
|
}
|
|
417
415
|
return { path: alt, headDirPath: this.defaults.altHeadDirPath };
|
|
418
416
|
}
|