keri-ts 2.0.1 → 2.2.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 +30 -2
- package/esm/keri/npm/src/acdc/authoring.js +195 -0
- package/esm/keri/npm/src/acdc/chaining.js +223 -89
- package/esm/keri/npm/src/acdc/custody.js +164 -0
- package/esm/keri/npm/src/acdc/dhking.js +244 -32
- package/esm/keri/npm/src/acdc/observing.js +2 -2
- package/esm/keri/npm/src/acdc/regbasing.js +30 -29
- package/esm/keri/npm/src/acdc/regengine.js +4 -6
- package/esm/keri/npm/src/acdc/registering.js +13 -10
- package/esm/keri/npm/src/acdc/registraring.js +4 -9
- package/esm/keri/npm/src/acdc/salting.js +143 -26
- package/esm/keri/npm/src/acdc/scheming.js +93 -54
- package/esm/keri/npm/src/acdc/unblinding.js +120 -99
- package/esm/keri/npm/src/app/bootstrap/authenticating.js +4 -6
- package/esm/keri/npm/src/app/bootstrap/oobi-resolving.js +41 -0
- package/esm/keri/npm/src/app/bootstrap/oobiery.js +5 -7
- package/esm/keri/npm/src/app/credentials/credential-revoking.js +1 -0
- package/esm/keri/npm/src/app/credentials/credential-workflows.js +2 -0
- package/esm/keri/npm/src/app/credentials/registry-settling.js +44 -0
- package/esm/keri/npm/src/app/credentials/root-replicating.js +131 -0
- package/esm/keri/npm/src/app/credentials/root-replicator.js +198 -0
- package/esm/keri/npm/src/app/credentials/tel-completion.js +36 -0
- package/esm/keri/npm/src/app/credentials/verifying.js +12 -3
- package/esm/keri/npm/src/app/delivery/forwarding.js +64 -9
- package/esm/keri/npm/src/app/exchanges/exchanging.js +24 -15
- package/esm/keri/npm/src/app/identity/challenging.js +50 -0
- package/esm/keri/npm/src/app/identity/configing.js +17 -43
- package/esm/keri/npm/src/app/identity/delegating.js +77 -77
- package/esm/keri/npm/src/app/identity/delegation-approval.js +333 -0
- package/esm/keri/npm/src/app/identity/event-completion.js +154 -0
- package/esm/keri/npm/src/app/identity/habbing.js +183 -41
- package/esm/keri/npm/src/app/identity/keeping.js +78 -5
- package/esm/keri/npm/src/app/identity/lmdb-habery.js +12 -0
- package/esm/keri/npm/src/app/ipex/group-ipex.js +327 -0
- package/esm/keri/npm/src/app/ipex/group-issuance.js +902 -0
- package/esm/keri/npm/src/app/ipex/ipex-admitting.js +120 -0
- package/esm/keri/npm/src/app/ipex/ipex-conversation.js +197 -0
- package/esm/keri/npm/src/app/ipex/ipex-discloser.js +591 -0
- package/esm/keri/npm/src/app/ipex/ipex-granting.js +93 -0
- package/esm/keri/npm/src/app/ipex/ipex-graph.js +7 -70
- package/esm/keri/npm/src/app/ipex/ipex-grouping.js +42 -16
- package/esm/keri/npm/src/app/ipex/ipex-v2.js +21 -5
- package/esm/keri/npm/src/app/ipex/ipexing.js +1 -1
- package/esm/keri/npm/src/app/ipex/issuance.js +888 -0
- package/esm/keri/npm/src/app/ipex/pending-presentations.js +46 -0
- package/esm/keri/npm/src/app/ipex/presentation-files.js +200 -0
- package/esm/keri/npm/src/app/ipex/presenting.js +401 -0
- package/esm/keri/npm/src/app/ipex/receive-issuance.js +86 -0
- package/esm/keri/npm/src/app/ipex/unblinding-workflow.js +660 -0
- package/esm/keri/npm/src/app/mailbox/ipex-arrival.js +103 -0
- package/esm/keri/npm/src/app/mailbox/kel-publisher.js +322 -0
- package/esm/keri/npm/src/app/mailbox/kel-publishing.js +65 -0
- package/esm/keri/npm/src/app/mailbox/kel-submission.js +24 -0
- package/esm/keri/npm/src/app/mailbox/mailbox-admin.js +208 -0
- package/esm/keri/npm/src/app/mailbox/mailbox-poller.js +212 -47
- package/esm/keri/npm/src/app/mailbox/mailboxing.js +15 -14
- package/esm/keri/npm/src/app/multisig/counseling.js +482 -0
- package/esm/keri/npm/src/app/multisig/group-members.js +32 -0
- package/esm/keri/npm/src/app/multisig/grouping.js +4 -3
- package/esm/keri/npm/src/app/multisig/multisig-workflows.js +101 -141
- package/esm/keri/npm/src/app/multisig/proposals.js +281 -0
- package/esm/keri/npm/src/app/multisig/proposing.js +122 -0
- package/esm/keri/npm/src/app/notifications/notifying.js +5 -9
- package/esm/keri/npm/src/app/notifications/signaling.js +5 -5
- package/esm/keri/npm/src/app/protocol/parsering.js +26 -1
- package/esm/keri/npm/src/app/protocol/protocol-processing.js +44 -6
- package/esm/keri/npm/src/app/queries/query-workflows.js +98 -0
- package/esm/keri/npm/src/app/queries/witness-inquisitor.js +2 -2
- package/esm/keri/npm/src/app/runtime/agent-runtime.js +113 -65
- package/esm/keri/npm/src/app/runtime/cue-runtime.js +3 -6
- package/esm/keri/npm/src/app/runtime/delivery-outbox.js +87 -0
- package/esm/keri/npm/src/app/runtime/doing.js +17 -0
- package/esm/keri/npm/src/app/runtime/ipex-auxiliaries.js +207 -0
- package/esm/keri/npm/src/app/runtime/operation-owners.js +151 -0
- package/esm/keri/npm/src/app/runtime/retry-backoff.js +93 -0
- package/esm/keri/npm/src/app/runtime/workflow-contract.js +80 -0
- package/esm/keri/npm/src/app/transport/byte-source.js +6 -42
- package/esm/keri/npm/src/app/transport/cesr-egress.js +77 -13
- package/esm/keri/npm/src/app/transport/file-bytes.js +41 -0
- package/esm/keri/npm/src/app/transport/http-client.js +25 -6
- package/esm/keri/npm/src/app/transport/http-messenger.js +14 -9
- package/esm/keri/npm/src/app/transport/message-source.js +1 -1
- package/esm/keri/npm/src/app/transport/messengering.js +3 -4
- package/esm/keri/npm/src/app/transport/node-http-client.js +21 -0
- package/esm/keri/npm/src/app/transport/tcp-dialer.js +14 -0
- package/esm/keri/npm/src/app/witness/http-endpoints.js +4 -4
- package/esm/keri/npm/src/app/witness/receipt-client.js +2 -2
- package/esm/keri/npm/src/cli/common/context.js +2 -2
- package/esm/keri/npm/src/cli/common/event-completion.js +49 -0
- package/esm/keri/npm/src/cli/common/existing.js +3 -5
- package/esm/keri/npm/src/cli/common/runtime-workers.js +23 -0
- package/esm/keri/npm/src/cli/credentials/ipex.js +159 -191
- package/esm/keri/npm/src/cli/credentials/vc.js +53 -72
- package/esm/keri/npm/src/cli/endpoints/did.js +12 -3
- package/esm/keri/npm/src/cli/endpoints/oobi-clean.js +4 -3
- package/esm/keri/npm/src/cli/endpoints/oobi.js +12 -15
- package/esm/keri/npm/src/cli/identity/challenge.js +9 -35
- package/esm/keri/npm/src/cli/identity/delegate.js +81 -258
- package/esm/keri/npm/src/cli/identity/incept.js +17 -34
- package/esm/keri/npm/src/cli/identity/init.js +4 -3
- package/esm/keri/npm/src/cli/identity/interact.js +7 -19
- package/esm/keri/npm/src/cli/identity/rotate.js +10 -38
- package/esm/keri/npm/src/cli/index.js +3 -1
- package/esm/keri/npm/src/cli/messaging/exchange.js +2 -2
- package/esm/keri/npm/src/cli/messaging/group-join.js +79 -0
- package/esm/keri/npm/src/cli/messaging/group-wait.js +88 -0
- package/esm/keri/npm/src/cli/messaging/multisig.js +187 -250
- package/esm/keri/npm/src/cli/messaging/root-copy-lines.js +31 -0
- package/esm/keri/npm/src/cli/tools/annotate.js +2 -1
- package/esm/keri/npm/src/cli/tools/benchmark.js +2 -1
- package/esm/keri/npm/src/cli/tools/db-dump.js +1 -4
- package/esm/keri/npm/src/core/bytes.js +9 -0
- package/esm/keri/npm/src/core/kel/delegation-ancestry.js +92 -0
- package/esm/keri/npm/src/core/kel/eventing.js +67 -12
- package/esm/keri/npm/src/core/kel/kever.js +11 -9
- package/esm/keri/npm/src/core/mailbox/kram-policy.js +41 -9
- package/esm/keri/npm/src/core/mailbox/kram-pruning.js +15 -22
- package/esm/keri/npm/src/core/mailbox/kram-staging.js +2 -2
- package/esm/keri/npm/src/core/mailbox/kraming.js +2 -0
- package/esm/keri/npm/src/core/records.js +23 -0
- package/esm/keri/npm/src/core/routing.js +15 -2
- package/esm/keri/npm/src/db/basing.js +183 -205
- package/esm/keri/npm/src/db/core/dber.js +1062 -0
- package/esm/keri/npm/src/db/core/index.js +4 -2
- package/esm/keri/npm/src/db/core/indexeddb-persistence.js +221 -0
- package/esm/keri/npm/src/db/core/lmdb-opener.js +30 -0
- package/esm/keri/npm/src/db/core/lmdber.js +199 -1067
- package/esm/keri/npm/src/db/core/memstore.js +532 -0
- package/esm/keri/npm/src/db/core/path-manager.js +109 -223
- package/esm/keri/npm/src/db/core/store-owner.js +104 -0
- package/esm/keri/npm/src/db/core/webdber.js +252 -0
- package/esm/keri/npm/src/db/escrowing.js +2 -2
- package/esm/keri/npm/src/db/exchange/exchange-nests.js +3 -2
- package/esm/keri/npm/src/db/indexeddb.js +98 -0
- package/esm/keri/npm/src/db/keeping.js +38 -123
- package/esm/keri/npm/src/db/koming.js +1 -1
- package/esm/keri/npm/src/db/lmdb-stores.js +68 -0
- package/esm/keri/npm/src/db/lmdb.js +6 -0
- package/esm/keri/npm/src/db/mailbox/mailboxing.js +12 -65
- package/esm/keri/npm/src/db/noting.js +11 -55
- package/esm/keri/npm/src/db/reger.js +43 -105
- package/esm/keri/npm/src/db/replay/witness-replay.js +2 -20
- package/esm/keri/npm/src/db/store-lock.js +150 -0
- package/esm/keri/npm/src/db/subing.js +1 -1
- package/esm/keri/npm/src/npm/db-indexeddb.browser.js +2 -0
- package/esm/keri/npm/src/npm/db-indexeddb.js +3 -0
- package/esm/keri/npm/src/npm/db-lmdb.js +3 -0
- package/esm/keri/npm/src/npm/db.browser.js +2 -0
- package/esm/keri/npm/src/npm/index.browser.js +9 -0
- package/esm/keri/npm/src/npm/runtime-node.js +3 -0
- package/esm/keri/npm/src/npm/runtime-web.browser.js +2 -0
- package/esm/keri/npm/src/npm/runtime-web.js +3 -0
- package/esm/keri/npm/src/npm/runtime.browser.js +2 -0
- package/esm/keri/npm/src/runtime/index.js +58 -12
- package/esm/keri/npm/src/runtime/node.js +14 -0
- package/esm/keri/npm/src/runtime/web/output-barrier.js +47 -0
- package/esm/keri/npm/src/runtime/web/persistent-storage.js +37 -0
- package/esm/keri/npm/src/runtime/web.js +10 -0
- package/esm/keri/npm/src/vdr/eventing.js +1 -1
- package/esm/keri/npm/src/vdr/tel-publication.js +19 -3
- package/esm/keri/npm/src/version.js +2 -2
- package/package.json +24 -4
- package/types/acdc/authoring.d.ts +54 -0
- package/types/acdc/authoring.d.ts.map +1 -0
- package/types/acdc/chaining.d.ts +56 -6
- package/types/acdc/chaining.d.ts.map +1 -1
- package/types/acdc/custody.d.ts +77 -0
- package/types/acdc/custody.d.ts.map +1 -0
- package/types/acdc/dhking.d.ts +94 -3
- package/types/acdc/dhking.d.ts.map +1 -1
- package/types/acdc/regbasing.d.ts +11 -6
- package/types/acdc/regbasing.d.ts.map +1 -1
- package/types/acdc/regengine.d.ts.map +1 -1
- package/types/acdc/registering.d.ts +8 -4
- package/types/acdc/registering.d.ts.map +1 -1
- package/types/acdc/registraring.d.ts.map +1 -1
- package/types/acdc/salting.d.ts +59 -7
- package/types/acdc/salting.d.ts.map +1 -1
- package/types/acdc/scheming.d.ts +2 -0
- package/types/acdc/scheming.d.ts.map +1 -1
- package/types/acdc/unblinding.d.ts +58 -19
- package/types/acdc/unblinding.d.ts.map +1 -1
- package/types/app/bootstrap/authenticating.d.ts +3 -1
- package/types/app/bootstrap/authenticating.d.ts.map +1 -1
- package/types/app/bootstrap/oobi-resolving.d.ts +92 -0
- package/types/app/bootstrap/oobi-resolving.d.ts.map +1 -0
- package/types/app/bootstrap/oobiery.d.ts +3 -1
- package/types/app/bootstrap/oobiery.d.ts.map +1 -1
- package/types/app/credentials/credential-revoking.d.ts +3 -0
- package/types/app/credentials/credential-revoking.d.ts.map +1 -1
- package/types/app/credentials/credential-workflows.d.ts +5 -0
- package/types/app/credentials/credential-workflows.d.ts.map +1 -1
- package/types/app/credentials/registry-settling.d.ts +85 -0
- package/types/app/credentials/registry-settling.d.ts.map +1 -0
- package/types/app/credentials/root-replicating.d.ts +97 -0
- package/types/app/credentials/root-replicating.d.ts.map +1 -0
- package/types/app/credentials/root-replicator.d.ts +105 -0
- package/types/app/credentials/root-replicator.d.ts.map +1 -0
- package/types/app/credentials/tel-completion.d.ts +55 -0
- package/types/app/credentials/tel-completion.d.ts.map +1 -0
- package/types/app/credentials/verifying.d.ts +2 -1
- package/types/app/credentials/verifying.d.ts.map +1 -1
- package/types/app/delivery/forwarding.d.ts +16 -0
- package/types/app/delivery/forwarding.d.ts.map +1 -1
- package/types/app/exchanges/exchanging.d.ts +2 -0
- package/types/app/exchanges/exchanging.d.ts.map +1 -1
- package/types/app/identity/challenging.d.ts +54 -0
- package/types/app/identity/challenging.d.ts.map +1 -1
- package/types/app/identity/configing.d.ts +7 -5
- package/types/app/identity/configing.d.ts.map +1 -1
- package/types/app/identity/delegating.d.ts +21 -4
- package/types/app/identity/delegating.d.ts.map +1 -1
- package/types/app/identity/delegation-approval.d.ts +228 -0
- package/types/app/identity/delegation-approval.d.ts.map +1 -0
- package/types/app/identity/event-completion.d.ts +151 -0
- package/types/app/identity/event-completion.d.ts.map +1 -0
- package/types/app/identity/habbing.d.ts +90 -7
- package/types/app/identity/habbing.d.ts.map +1 -1
- package/types/app/identity/keeping.d.ts +50 -4
- package/types/app/identity/keeping.d.ts.map +1 -1
- package/types/app/identity/lmdb-habery.d.ts +6 -0
- package/types/app/identity/lmdb-habery.d.ts.map +1 -0
- package/types/app/ipex/group-ipex.d.ts +247 -0
- package/types/app/ipex/group-ipex.d.ts.map +1 -0
- package/types/app/ipex/group-issuance.d.ts +281 -0
- package/types/app/ipex/group-issuance.d.ts.map +1 -0
- package/types/app/ipex/ipex-admitting.d.ts +47 -0
- package/types/app/ipex/ipex-admitting.d.ts.map +1 -0
- package/types/app/ipex/ipex-conversation.d.ts +195 -0
- package/types/app/ipex/ipex-conversation.d.ts.map +1 -0
- package/types/app/ipex/ipex-discloser.d.ts +156 -0
- package/types/app/ipex/ipex-discloser.d.ts.map +1 -0
- package/types/app/ipex/ipex-granting.d.ts +145 -0
- package/types/app/ipex/ipex-granting.d.ts.map +1 -0
- package/types/app/ipex/ipex-graph.d.ts +4 -4
- package/types/app/ipex/ipex-graph.d.ts.map +1 -1
- package/types/app/ipex/ipex-grouping.d.ts +18 -0
- package/types/app/ipex/ipex-grouping.d.ts.map +1 -1
- package/types/app/ipex/ipex-v2.d.ts +11 -2
- package/types/app/ipex/ipex-v2.d.ts.map +1 -1
- package/types/app/ipex/ipexing.d.ts +3 -0
- package/types/app/ipex/ipexing.d.ts.map +1 -1
- package/types/app/ipex/issuance.d.ts +443 -0
- package/types/app/ipex/issuance.d.ts.map +1 -0
- package/types/app/ipex/pending-presentations.d.ts +25 -0
- package/types/app/ipex/pending-presentations.d.ts.map +1 -0
- package/types/app/ipex/presentation-files.d.ts +47 -0
- package/types/app/ipex/presentation-files.d.ts.map +1 -0
- package/types/app/ipex/presenting.d.ts +298 -0
- package/types/app/ipex/presenting.d.ts.map +1 -0
- package/types/app/ipex/receive-issuance.d.ts +99 -0
- package/types/app/ipex/receive-issuance.d.ts.map +1 -0
- package/types/app/ipex/unblinding-workflow.d.ts +255 -0
- package/types/app/ipex/unblinding-workflow.d.ts.map +1 -0
- package/types/app/mailbox/ipex-arrival.d.ts +104 -0
- package/types/app/mailbox/ipex-arrival.d.ts.map +1 -0
- package/types/app/mailbox/kel-publisher.d.ts +141 -0
- package/types/app/mailbox/kel-publisher.d.ts.map +1 -0
- package/types/app/mailbox/kel-publishing.d.ts +70 -0
- package/types/app/mailbox/kel-publishing.d.ts.map +1 -0
- package/types/app/mailbox/kel-submission.d.ts +18 -0
- package/types/app/mailbox/kel-submission.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-admin.d.ts +113 -0
- package/types/app/mailbox/mailbox-admin.d.ts.map +1 -0
- package/types/app/mailbox/mailbox-poller.d.ts +92 -3
- package/types/app/mailbox/mailbox-poller.d.ts.map +1 -1
- package/types/app/mailbox/mailboxing.d.ts +4 -1
- package/types/app/mailbox/mailboxing.d.ts.map +1 -1
- package/types/app/multisig/counseling.d.ts +196 -0
- package/types/app/multisig/counseling.d.ts.map +1 -0
- package/types/app/multisig/group-members.d.ts +20 -0
- package/types/app/multisig/group-members.d.ts.map +1 -1
- package/types/app/multisig/grouping.d.ts +39 -20
- package/types/app/multisig/grouping.d.ts.map +1 -1
- package/types/app/multisig/multisig-workflows.d.ts +93 -23
- package/types/app/multisig/multisig-workflows.d.ts.map +1 -1
- package/types/app/multisig/proposals.d.ts +129 -0
- package/types/app/multisig/proposals.d.ts.map +1 -0
- package/types/app/multisig/proposing.d.ts +125 -0
- package/types/app/multisig/proposing.d.ts.map +1 -0
- package/types/app/notifications/notifying.d.ts +1 -1
- package/types/app/notifications/notifying.d.ts.map +1 -1
- package/types/app/notifications/signaling.d.ts +3 -1
- package/types/app/notifications/signaling.d.ts.map +1 -1
- package/types/app/protocol/parsering.d.ts +16 -1
- package/types/app/protocol/parsering.d.ts.map +1 -1
- package/types/app/protocol/protocol-processing.d.ts +9 -1
- package/types/app/protocol/protocol-processing.d.ts.map +1 -1
- package/types/app/queries/query-workflows.d.ts +98 -0
- package/types/app/queries/query-workflows.d.ts.map +1 -0
- package/types/app/runtime/agent-runtime.d.ts +79 -25
- package/types/app/runtime/agent-runtime.d.ts.map +1 -1
- package/types/app/runtime/cue-runtime.d.ts +2 -1
- package/types/app/runtime/cue-runtime.d.ts.map +1 -1
- package/types/app/runtime/delivery-outbox.d.ts +68 -0
- package/types/app/runtime/delivery-outbox.d.ts.map +1 -0
- package/types/app/runtime/doing.d.ts +27 -0
- package/types/app/runtime/doing.d.ts.map +1 -0
- package/types/app/runtime/ipex-auxiliaries.d.ts +74 -0
- package/types/app/runtime/ipex-auxiliaries.d.ts.map +1 -0
- package/types/app/runtime/operation-owners.d.ts +137 -0
- package/types/app/runtime/operation-owners.d.ts.map +1 -0
- package/types/app/runtime/retry-backoff.d.ts +49 -0
- package/types/app/runtime/retry-backoff.d.ts.map +1 -0
- package/types/app/runtime/workflow-contract.d.ts +79 -0
- package/types/app/runtime/workflow-contract.d.ts.map +1 -0
- package/types/app/transport/byte-source.d.ts +13 -10
- package/types/app/transport/byte-source.d.ts.map +1 -1
- package/types/app/transport/cesr-egress.d.ts +21 -7
- package/types/app/transport/cesr-egress.d.ts.map +1 -1
- package/types/app/transport/file-bytes.d.ts +11 -0
- package/types/app/transport/file-bytes.d.ts.map +1 -0
- package/types/app/transport/http-client.d.ts +3 -0
- package/types/app/transport/http-client.d.ts.map +1 -1
- package/types/app/transport/http-messenger.d.ts +15 -10
- package/types/app/transport/http-messenger.d.ts.map +1 -1
- package/types/app/transport/message-source.d.ts +1 -1
- package/types/app/transport/messengering.d.ts +2 -2
- package/types/app/transport/messengering.d.ts.map +1 -1
- package/types/app/transport/node-http-client.d.ts +10 -0
- package/types/app/transport/node-http-client.d.ts.map +1 -0
- package/types/app/transport/tcp-dialer.d.ts +21 -0
- package/types/app/transport/tcp-dialer.d.ts.map +1 -0
- package/types/cli/common/event-completion.d.ts +26 -0
- package/types/cli/common/event-completion.d.ts.map +1 -0
- package/types/cli/common/existing.d.ts.map +1 -1
- package/types/cli/common/runtime-workers.d.ts +23 -0
- package/types/cli/common/runtime-workers.d.ts.map +1 -0
- package/types/cli/credentials/ipex.d.ts.map +1 -1
- package/types/cli/credentials/vc.d.ts +1 -1
- package/types/cli/credentials/vc.d.ts.map +1 -1
- package/types/cli/endpoints/did.d.ts.map +1 -1
- package/types/cli/endpoints/oobi-clean.d.ts.map +1 -1
- package/types/cli/endpoints/oobi.d.ts +3 -1
- package/types/cli/endpoints/oobi.d.ts.map +1 -1
- package/types/cli/identity/challenge.d.ts +1 -1
- package/types/cli/identity/challenge.d.ts.map +1 -1
- package/types/cli/identity/delegate.d.ts +14 -1
- package/types/cli/identity/delegate.d.ts.map +1 -1
- package/types/cli/identity/incept.d.ts.map +1 -1
- package/types/cli/identity/init.d.ts.map +1 -1
- package/types/cli/identity/interact.d.ts.map +1 -1
- package/types/cli/identity/rotate.d.ts.map +1 -1
- package/types/cli/index.d.ts +4 -2
- package/types/cli/index.d.ts.map +1 -1
- package/types/cli/messaging/group-join.d.ts +53 -0
- package/types/cli/messaging/group-join.d.ts.map +1 -0
- package/types/cli/messaging/group-wait.d.ts +34 -0
- package/types/cli/messaging/group-wait.d.ts.map +1 -0
- package/types/cli/messaging/multisig.d.ts +36 -4
- package/types/cli/messaging/multisig.d.ts.map +1 -1
- package/types/cli/messaging/root-copy-lines.d.ts +39 -0
- package/types/cli/messaging/root-copy-lines.d.ts.map +1 -0
- package/types/cli/tools/annotate.d.ts.map +1 -1
- package/types/cli/tools/benchmark.d.ts.map +1 -1
- package/types/cli/tools/db-dump.d.ts.map +1 -1
- package/types/core/bytes.d.ts +2 -0
- package/types/core/bytes.d.ts.map +1 -1
- package/types/core/cues.d.ts +11 -0
- package/types/core/cues.d.ts.map +1 -1
- package/types/core/kel/delegation-ancestry.d.ts +41 -0
- package/types/core/kel/delegation-ancestry.d.ts.map +1 -0
- package/types/core/kel/eventing.d.ts.map +1 -1
- package/types/core/kel/kever.d.ts +5 -4
- package/types/core/kel/kever.d.ts.map +1 -1
- package/types/core/mailbox/kram-policy.d.ts +14 -0
- package/types/core/mailbox/kram-policy.d.ts.map +1 -1
- package/types/core/mailbox/kram-pruning.d.ts +1 -3
- package/types/core/mailbox/kram-pruning.d.ts.map +1 -1
- package/types/core/mailbox/kraming.d.ts +1 -1
- package/types/core/mailbox/kraming.d.ts.map +1 -1
- package/types/core/records.d.ts +61 -0
- package/types/core/records.d.ts.map +1 -1
- package/types/core/routing.d.ts +6 -0
- package/types/core/routing.d.ts.map +1 -1
- package/types/db/basing.d.ts +22 -25
- package/types/db/basing.d.ts.map +1 -1
- package/types/db/core/dber.d.ts +505 -0
- package/types/db/core/dber.d.ts.map +1 -0
- package/types/db/core/index.d.ts +4 -2
- package/types/db/core/index.d.ts.map +1 -1
- package/types/db/core/indexeddb-persistence.d.ts +59 -0
- package/types/db/core/indexeddb-persistence.d.ts.map +1 -0
- package/types/db/core/lmdb-opener.d.ts +17 -0
- package/types/db/core/lmdb-opener.d.ts.map +1 -0
- package/types/db/core/lmdber.d.ts +60 -383
- package/types/db/core/lmdber.d.ts.map +1 -1
- package/types/db/core/memstore.d.ts +129 -0
- package/types/db/core/memstore.d.ts.map +1 -0
- package/types/db/core/path-manager.d.ts +22 -45
- package/types/db/core/path-manager.d.ts.map +1 -1
- package/types/db/core/store-owner.d.ts +59 -0
- package/types/db/core/store-owner.d.ts.map +1 -0
- package/types/db/core/webdber.d.ts +127 -0
- package/types/db/core/webdber.d.ts.map +1 -0
- package/types/db/escrowing.d.ts +3 -3
- package/types/db/escrowing.d.ts.map +1 -1
- package/types/db/exchange/exchange-nests.d.ts.map +1 -1
- package/types/db/indexeddb.d.ts +37 -0
- package/types/db/indexeddb.d.ts.map +1 -0
- package/types/db/keeping.d.ts +14 -25
- package/types/db/keeping.d.ts.map +1 -1
- package/types/db/koming.d.ts +7 -8
- package/types/db/koming.d.ts.map +1 -1
- package/types/db/lmdb-stores.d.ts +45 -0
- package/types/db/lmdb-stores.d.ts.map +1 -0
- package/types/db/lmdb.d.ts +7 -0
- package/types/db/lmdb.d.ts.map +1 -0
- package/types/db/mailbox/mailboxing.d.ts +7 -21
- package/types/db/mailbox/mailboxing.d.ts.map +1 -1
- package/types/db/noting.d.ts +7 -12
- package/types/db/noting.d.ts.map +1 -1
- package/types/db/reger.d.ts +7 -11
- package/types/db/reger.d.ts.map +1 -1
- package/types/db/replay/witness-replay.d.ts +0 -2
- package/types/db/replay/witness-replay.d.ts.map +1 -1
- package/types/db/store-lock.d.ts +72 -0
- package/types/db/store-lock.d.ts.map +1 -0
- package/types/db/subing.d.ts +24 -25
- package/types/db/subing.d.ts.map +1 -1
- package/types/npm/db-indexeddb.d.ts +4 -0
- package/types/npm/db-indexeddb.d.ts.map +1 -0
- package/types/npm/db-lmdb.d.ts +4 -0
- package/types/npm/db-lmdb.d.ts.map +1 -0
- package/types/npm/runtime-node.d.ts +4 -0
- package/types/npm/runtime-node.d.ts.map +1 -0
- package/types/npm/runtime-web.d.ts +4 -0
- package/types/npm/runtime-web.d.ts.map +1 -0
- package/types/runtime/index.d.ts +48 -14
- package/types/runtime/index.d.ts.map +1 -1
- package/types/runtime/node.d.ts +15 -0
- package/types/runtime/node.d.ts.map +1 -0
- package/types/runtime/web/output-barrier.d.ts +30 -0
- package/types/runtime/web/output-barrier.d.ts.map +1 -0
- package/types/runtime/web/persistent-storage.d.ts +36 -0
- package/types/runtime/web/persistent-storage.d.ts.map +1 -0
- package/types/runtime/web.d.ts +11 -0
- package/types/runtime/web.d.ts.map +1 -0
- package/types/vdr/tel-publication.d.ts +6 -0
- package/types/vdr/tel-publication.d.ts.map +1 -1
- package/types/version.d.ts +2 -2
- package/esm/keri/npm/src/acdc/relating.js +0 -59
- package/esm/keri/npm/src/cli/common/tel-completion.js +0 -24
- package/esm/keri/npm/src/db/baser-defaults.js +0 -11
- package/types/acdc/relating.d.ts +0 -21
- package/types/acdc/relating.d.ts.map +0 -1
- package/types/cli/common/tel-completion.d.ts +0 -8
- package/types/cli/common/tel-completion.d.ts.map +0 -1
- package/types/db/baser-defaults.d.ts +0 -5
- package/types/db/baser-defaults.d.ts.map +0 -1
|
@@ -2,19 +2,18 @@
|
|
|
2
2
|
import { b, Cigar, Dater, Diger, Ilks, Labeler, Noncer, NumberPrimitive, NumDex, Prefixer, Saider, SealEvent, SerderKERI, Siger, t, Texter, Verfer, Verser, Vrsn_1_0, } from "cesr-ts";
|
|
3
3
|
import { action } from "effection";
|
|
4
4
|
import { attachmentCounterPayloadQb64b, attachmentCounterQb64b, attachmentOrdinal, resolveAttachmentGvrsn, } from "../core/attachment-countering.js";
|
|
5
|
-
import {
|
|
5
|
+
import { DatabaseOperationError, ValidationError } from "../core/errors.js";
|
|
6
6
|
import { Kever } from "../core/kel/kever.js";
|
|
7
7
|
import { consoleLogger } from "../core/logger.js";
|
|
8
|
-
import { CacheTypeRecord, EndpointRecord, EventSourceRecord, HabitatRecord, KeyStateRecord, LocationRecord, MsgCacheRecord, ObservedRecord, OobiRecord, TopicsRecord, TxnMsgCacheRecord, WellKnownAuthN, } from "../core/records.js";
|
|
8
|
+
import { CacheTypeRecord, EndpointRecord, EventSourceRecord, HabitatRecord, KelPublishedRecord, KeyStateRecord, LocationRecord, MsgCacheRecord, ObservedRecord, OobiRecord, RootSentRecord, TopicsRecord, TxnMsgCacheRecord, WellKnownAuthN, } from "../core/records.js";
|
|
9
9
|
import { encodeDateTimeToDater, makeNowIso8601 } from "../time/mod.js";
|
|
10
|
-
import { baserDefaults } from "./baser-defaults.js";
|
|
11
10
|
import { dgKey, splitOnKey } from "./core/keys.js";
|
|
12
|
-
import {
|
|
11
|
+
import { StoreOwner } from "./core/store-owner.js";
|
|
13
12
|
import { ExchangeRecord, ExchangeRegistryStateRecord } from "./exchange/exchange-records.js";
|
|
14
13
|
import { IoSetKomer, Komer } from "./koming.js";
|
|
15
14
|
import { CapturedKelReplay } from "./replay/kel-replay.js";
|
|
16
15
|
import { CapturedWitnessReplay } from "./replay/witness-replay.js";
|
|
17
|
-
import { B64OnIoDupSuber, BytesIoSetSuber, CatCesrIoSetSuber, CatCesrSuber, CesrIoSetSuber, CesrOnSuber, CesrSuber, IoSetSuber, OnIoDupSuber, OnSuber, SchemerSuber, SerderSuber, Suber, } from "./subing.js";
|
|
16
|
+
import { B64OnIoDupSuber, BytesIoSetSuber, BytesSuber, CatCesrIoSetSuber, CatCesrSuber, CesrIoSetSuber, CesrOnSuber, CesrSuber, IoSetSuber, OnIoDupSuber, OnSuber, SchemerSuber, SerderSuber, Suber, } from "./subing.js";
|
|
18
17
|
function isMissingReloadEventError(error) {
|
|
19
18
|
return error instanceof Error
|
|
20
19
|
&& error.message.startsWith("Missing accepted event for reloaded Kever state ");
|
|
@@ -87,7 +86,7 @@ function hugeOrdinalRaw(num) {
|
|
|
87
86
|
* - the full store surface is now bound, but only the local habitat/runtime
|
|
88
87
|
* subset is actively driven by `Habery`/CLI in this arc
|
|
89
88
|
*/
|
|
90
|
-
export class Baser {
|
|
89
|
+
export class Baser extends StoreOwner {
|
|
91
90
|
/**
|
|
92
91
|
* Read pinned-main ESSR evidence only while an accepted or pending EXN owns it.
|
|
93
92
|
* Return hydrated Texters in first-insertion order, or null for absent/unowned
|
|
@@ -102,13 +101,8 @@ export class Baser {
|
|
|
102
101
|
const fragments = this.essrs.get([said]);
|
|
103
102
|
return fragments.length ? fragments : null;
|
|
104
103
|
}
|
|
105
|
-
constructor(
|
|
106
|
-
|
|
107
|
-
enumerable: true,
|
|
108
|
-
configurable: true,
|
|
109
|
-
writable: true,
|
|
110
|
-
value: void 0
|
|
111
|
-
});
|
|
104
|
+
constructor(store, logger = consoleLogger) {
|
|
105
|
+
super(store);
|
|
112
106
|
Object.defineProperty(this, "logger", {
|
|
113
107
|
enumerable: true,
|
|
114
108
|
configurable: true,
|
|
@@ -516,6 +510,20 @@ export class Baser {
|
|
|
516
510
|
writable: true,
|
|
517
511
|
value: void 0
|
|
518
512
|
});
|
|
513
|
+
/** keri-ts only. Sent `/registry/root` copies; (group, registry, recipient) -> recipient key sealed to and send time. Never a root. */
|
|
514
|
+
Object.defineProperty(this, "rrsn", {
|
|
515
|
+
enumerable: true,
|
|
516
|
+
configurable: true,
|
|
517
|
+
writable: true,
|
|
518
|
+
value: void 0
|
|
519
|
+
});
|
|
520
|
+
/** keri-ts only. The KEL a mailbox was last given: (identifier, mailbox) -> establishment SAID, time and outcome. */
|
|
521
|
+
Object.defineProperty(this, "kpub", {
|
|
522
|
+
enumerable: true,
|
|
523
|
+
configurable: true,
|
|
524
|
+
writable: true,
|
|
525
|
+
value: void 0
|
|
526
|
+
});
|
|
519
527
|
Object.defineProperty(this, "chas", {
|
|
520
528
|
enumerable: true,
|
|
521
529
|
configurable: true,
|
|
@@ -720,6 +728,18 @@ export class Baser {
|
|
|
720
728
|
writable: true,
|
|
721
729
|
value: void 0
|
|
722
730
|
}); // Shared KRAM exchange opener time keyed by XID.
|
|
731
|
+
Object.defineProperty(this, "heldq", {
|
|
732
|
+
enumerable: true,
|
|
733
|
+
configurable: true,
|
|
734
|
+
writable: true,
|
|
735
|
+
value: void 0
|
|
736
|
+
}); // Authenticated DH queries received before consent, keyed by XID.
|
|
737
|
+
Object.defineProperty(this, "heldu", {
|
|
738
|
+
enumerable: true,
|
|
739
|
+
configurable: true,
|
|
740
|
+
writable: true,
|
|
741
|
+
value: void 0
|
|
742
|
+
}); // Authenticated Unblind queries a discloser owes a reply to, keyed by `(discloser, XID)`.
|
|
723
743
|
Object.defineProperty(this, "tmsc", {
|
|
724
744
|
enumerable: true,
|
|
725
745
|
configurable: true,
|
|
@@ -816,48 +836,28 @@ export class Baser {
|
|
|
816
836
|
writable: true,
|
|
817
837
|
value: void 0
|
|
818
838
|
}); // Type-media quadruples.
|
|
819
|
-
this.logger =
|
|
820
|
-
this.lmdber = new LMDBer(options, baserDefaults(options.compat));
|
|
821
|
-
}
|
|
822
|
-
/** Expose the resolved logical database name delegated from the root LMDBer. */
|
|
823
|
-
get name() {
|
|
824
|
-
return this.lmdber.name;
|
|
825
|
-
}
|
|
826
|
-
/** Expose the resolved database base prefix delegated from the root LMDBer. */
|
|
827
|
-
get base() {
|
|
828
|
-
return this.lmdber.base;
|
|
829
|
-
}
|
|
830
|
-
/** Report whether the root LMDB environment and typed subdb bindings are open. */
|
|
831
|
-
get opened() {
|
|
832
|
-
return this.lmdber.opened;
|
|
839
|
+
this.logger = logger;
|
|
833
840
|
}
|
|
834
841
|
/** Test a schema dependency ownership marker without hydrating its stored exchange. */
|
|
835
842
|
hasSchemaEscrow(said) {
|
|
836
843
|
if (this.emse) {
|
|
837
|
-
for (const key of this.emse.sdb
|
|
844
|
+
for (const key of this.store.scanKeys(this.emse.sdb, { start: b(`${said}.`), limit: 1 })) {
|
|
838
845
|
return t(key).startsWith(`${said}.`);
|
|
846
|
+
}
|
|
839
847
|
}
|
|
840
848
|
return false;
|
|
841
849
|
}
|
|
842
|
-
/** Report whether this `Baser` uses a temporary backing directory. */
|
|
843
|
-
get temp() {
|
|
844
|
-
return this.lmdber.temp;
|
|
845
|
-
}
|
|
846
|
-
/** Expose the resolved filesystem path of the active backing environment. */
|
|
847
|
-
get path() {
|
|
848
|
-
return this.lmdber.path;
|
|
849
|
-
}
|
|
850
|
-
/** Expose the raw LMDB environment for low-level tests and debugging only. */
|
|
851
|
-
get env() {
|
|
852
|
-
return this.lmdber.env;
|
|
853
|
-
}
|
|
854
|
-
/** Report an active caller writer without exposing native transaction internals. */
|
|
855
|
-
get inWriteTransaction() {
|
|
856
|
-
return this.lmdber.inWriteTransaction;
|
|
857
|
-
}
|
|
858
850
|
/** Read an owned binary row through the backing database's normal copy path. */
|
|
859
851
|
getVal(table, key) {
|
|
860
|
-
return this.
|
|
852
|
+
return this.store.getVal(table, key);
|
|
853
|
+
}
|
|
854
|
+
/** Scan owned keys through the backing database. */
|
|
855
|
+
scanKeys(table, options) {
|
|
856
|
+
return this.store.scanKeys(table, options);
|
|
857
|
+
}
|
|
858
|
+
/** Seek within one key's duplicates through the backing database. */
|
|
859
|
+
seekVal(table, key, start) {
|
|
860
|
+
return this.store.seekVal(table, key, start);
|
|
861
861
|
}
|
|
862
862
|
/**
|
|
863
863
|
* Reopen the root LMDB environment and bind the KERIpy-style named subdbs.
|
|
@@ -868,481 +868,487 @@ export class Baser {
|
|
|
868
868
|
* than hand-rolled raw LMDB handles.
|
|
869
869
|
*/
|
|
870
870
|
*reopen(options = {}) {
|
|
871
|
-
const opened = yield* this.
|
|
871
|
+
const opened = yield* this.store.reopen(options);
|
|
872
872
|
if (!opened) {
|
|
873
873
|
return false;
|
|
874
874
|
}
|
|
875
875
|
try {
|
|
876
876
|
// Serialized KEL events keyed by `(pre, said)` digest keys.
|
|
877
|
-
this.evts = new SerderSuber(this.
|
|
877
|
+
this.evts = new SerderSuber(this.store, { subkey: "evts." });
|
|
878
878
|
this.evtsRaw = this.evts.sdb;
|
|
879
879
|
// First-seen event logs map `(pre, fn)` ordinals to event digests.
|
|
880
|
-
this.fels = new OnSuber(this.
|
|
880
|
+
this.fels = new OnSuber(this.store, { subkey: "fels." });
|
|
881
881
|
// Key-event logs map `(pre, sn)` sequence numbers to event digests.
|
|
882
|
-
this.kels = new OnIoDupSuber(this.
|
|
882
|
+
this.kels = new OnIoDupSuber(this.store, { subkey: "kels." });
|
|
883
883
|
// Event timestamps keyed by digest, used when escrowing and timeout logic
|
|
884
884
|
// needs the first-seen datetime.
|
|
885
|
-
this.dtss = new CesrSuber(this.
|
|
885
|
+
this.dtss = new CesrSuber(this.store, {
|
|
886
886
|
subkey: "dtss.",
|
|
887
887
|
ctor: Dater,
|
|
888
888
|
});
|
|
889
889
|
// Authorizing event source seal couples keyed by event digest.
|
|
890
|
-
this.aess = new CatCesrSuber(this.
|
|
890
|
+
this.aess = new CatCesrSuber(this.store, {
|
|
891
891
|
subkey: "aess.",
|
|
892
892
|
ctor: [NumberPrimitive, Diger],
|
|
893
893
|
});
|
|
894
894
|
// Fully qualified indexed controller signatures for one event digest.
|
|
895
|
-
this.sigs = new CesrIoSetSuber(this.
|
|
895
|
+
this.sigs = new CesrIoSetSuber(this.store, {
|
|
896
896
|
subkey: "sigs.",
|
|
897
897
|
ctor: Siger,
|
|
898
898
|
});
|
|
899
899
|
// Indexed witness signatures for one event digest.
|
|
900
|
-
this.wigs = new CesrIoSetSuber(this.
|
|
900
|
+
this.wigs = new CesrIoSetSuber(this.store, {
|
|
901
901
|
subkey: "wigs.",
|
|
902
902
|
ctor: Siger,
|
|
903
903
|
});
|
|
904
904
|
// Event receipt couples from non-transferable signers that are not
|
|
905
905
|
// witnesses, such as watchers or jurors.
|
|
906
|
-
this.rcts = new CatCesrIoSetSuber(this.
|
|
906
|
+
this.rcts = new CatCesrIoSetSuber(this.store, {
|
|
907
907
|
subkey: "rcts.",
|
|
908
908
|
ctor: [Prefixer, Cigar],
|
|
909
909
|
});
|
|
910
910
|
// Unverified event receipt escrow triples from non-transferable signers.
|
|
911
|
-
this.ures = new CatCesrIoSetSuber(this.
|
|
911
|
+
this.ures = new CatCesrIoSetSuber(this.store, {
|
|
912
912
|
subkey: "ures.",
|
|
913
913
|
ctor: [Diger, Prefixer, Cigar],
|
|
914
914
|
});
|
|
915
915
|
// Event validator receipt quadruples from transferable signers.
|
|
916
|
-
this.vrcs = new CatCesrIoSetSuber(this.
|
|
916
|
+
this.vrcs = new CatCesrIoSetSuber(this.store, {
|
|
917
917
|
subkey: "vrcs.",
|
|
918
918
|
ctor: [Prefixer, NumberPrimitive, Diger, Siger],
|
|
919
919
|
});
|
|
920
920
|
// Unverified event validator receipt escrow tuples from transferable
|
|
921
921
|
// signers.
|
|
922
|
-
this.vres = new CatCesrIoSetSuber(this.
|
|
922
|
+
this.vres = new CatCesrIoSetSuber(this.store, {
|
|
923
923
|
subkey: "vres.",
|
|
924
924
|
ctor: [Diger, Prefixer, NumberPrimitive, Diger, Siger],
|
|
925
925
|
});
|
|
926
926
|
// Partially signed key-event escrows mapping `(pre, sn)` to event digests.
|
|
927
|
-
this.pses = new OnIoDupSuber(this.
|
|
927
|
+
this.pses = new OnIoDupSuber(this.store, { subkey: "pses." });
|
|
928
928
|
// Partially witnessed key-event escrows mapping `(pre, sn)` to event
|
|
929
929
|
// digests.
|
|
930
|
-
this.pwes = new OnIoDupSuber(this.
|
|
930
|
+
this.pwes = new OnIoDupSuber(this.store, { subkey: "pwes." });
|
|
931
931
|
// Partially delegated key-event escrows mapping `(pre, sn)` to event
|
|
932
932
|
// digests.
|
|
933
|
-
this.pdes = new OnIoDupSuber(this.
|
|
933
|
+
this.pdes = new OnIoDupSuber(this.store, { subkey: "pdes." });
|
|
934
934
|
// Unverified delegation seal source couples keyed by delegated event
|
|
935
935
|
// digest.
|
|
936
|
-
this.udes = new CatCesrSuber(this.
|
|
936
|
+
this.udes = new CatCesrSuber(this.store, {
|
|
937
937
|
subkey: "udes.",
|
|
938
938
|
ctor: [NumberPrimitive, Diger],
|
|
939
939
|
});
|
|
940
940
|
// Unverified witness escrow couples from witness signers.
|
|
941
|
-
this.uwes = new B64OnIoDupSuber(this.
|
|
941
|
+
this.uwes = new B64OnIoDupSuber(this.store, { subkey: "uwes." });
|
|
942
942
|
// Out-of-order escrowed event tables mapping `(pre, sn)` to event digests.
|
|
943
|
-
this.ooes = new OnIoDupSuber(this.
|
|
943
|
+
this.ooes = new OnIoDupSuber(this.store, { subkey: "ooes." });
|
|
944
944
|
// Duplicitous event log tables mapping `(pre, sn)` to conflicting digests.
|
|
945
|
-
this.dels = new OnIoDupSuber(this.
|
|
945
|
+
this.dels = new OnIoDupSuber(this.store, { subkey: "dels." });
|
|
946
946
|
// Likely-duplicitous escrowed event tables keyed by `(pre, sn)`.
|
|
947
|
-
this.ldes = new OnIoDupSuber(this.
|
|
947
|
+
this.ldes = new OnIoDupSuber(this.store, { subkey: "ldes." });
|
|
948
948
|
// Query-not-found escrows keyed by queried event digest.
|
|
949
|
-
this.qnfs = new IoSetSuber(this.
|
|
949
|
+
this.qnfs = new IoSetSuber(this.store, { subkey: "qnfs." });
|
|
950
950
|
// First-seen ordinal numbers for events, used in superseding and recovery
|
|
951
951
|
// rotation logic.
|
|
952
|
-
this.fons = new CesrSuber(this.
|
|
952
|
+
this.fons = new CesrSuber(this.store, {
|
|
953
953
|
subkey: "fons.",
|
|
954
954
|
ctor: NumberPrimitive,
|
|
955
955
|
});
|
|
956
956
|
// Database migration datetimes keyed by migration name.
|
|
957
|
-
this.migs = new CesrSuber(this.
|
|
957
|
+
this.migs = new CesrSuber(this.store, {
|
|
958
958
|
subkey: "migs.",
|
|
959
959
|
ctor: Dater,
|
|
960
960
|
});
|
|
961
961
|
// Database version table retained for parity even though it is currently
|
|
962
962
|
// unused.
|
|
963
|
-
this.vers = new Suber(this.
|
|
963
|
+
this.vers = new Suber(this.store, { subkey: "vers." });
|
|
964
964
|
// Event source records describing whether an event is local/protected or
|
|
965
965
|
// remote/not protected.
|
|
966
|
-
this.esrs = new Komer(this.
|
|
966
|
+
this.esrs = new Komer(this.store, {
|
|
967
967
|
subkey: "esrs.",
|
|
968
968
|
recordClass: EventSourceRecord,
|
|
969
969
|
});
|
|
970
970
|
// Misfit escrows for remote events that should be dropped unless they
|
|
971
971
|
// become authenticated.
|
|
972
|
-
this.misfits = new IoSetSuber(this.
|
|
972
|
+
this.misfits = new IoSetSuber(this.store, { subkey: "mfes." });
|
|
973
973
|
// Delegable event escrows for KEL events whose local delegator still
|
|
974
974
|
// needs to approve them.
|
|
975
|
-
this.delegables = new IoSetSuber(this.
|
|
975
|
+
this.delegables = new IoSetSuber(this.store, {
|
|
976
976
|
subkey: "dees.",
|
|
977
977
|
});
|
|
978
978
|
// Latest key-state record for each identifier prefix.
|
|
979
|
-
this.states = new Komer(this.
|
|
979
|
+
this.states = new Komer(this.store, {
|
|
980
980
|
subkey: "stts.",
|
|
981
981
|
recordClass: KeyStateRecord,
|
|
982
982
|
});
|
|
983
983
|
// Witness lists for a given event digest.
|
|
984
|
-
this.wits = new CesrIoSetSuber(this.
|
|
984
|
+
this.wits = new CesrIoSetSuber(this.store, {
|
|
985
985
|
subkey: "wits.",
|
|
986
986
|
ctor: Prefixer,
|
|
987
987
|
});
|
|
988
988
|
// Habitat application records keyed by habitat name and namespace.
|
|
989
|
-
this.habs = new Komer(this.
|
|
989
|
+
this.habs = new Komer(this.store, {
|
|
990
990
|
subkey: "habs.",
|
|
991
991
|
recordClass: HabitatRecord,
|
|
992
992
|
});
|
|
993
993
|
// Habitat name database mapping `(domain, name)` to identifier prefixes.
|
|
994
|
-
this.names = new Suber(this.
|
|
994
|
+
this.names = new Suber(this.store, { subkey: "names.", sep: "^" });
|
|
995
995
|
// SAD datetime stamps keyed by SAID.
|
|
996
|
-
this.sdts = new CesrSuber(this.
|
|
996
|
+
this.sdts = new CesrSuber(this.store, {
|
|
997
997
|
subkey: "sdts.",
|
|
998
998
|
ctor: Dater,
|
|
999
999
|
});
|
|
1000
1000
|
// SAD indexed signatures keyed by the reply/event quadkey.
|
|
1001
|
-
this.ssgs = new CesrIoSetSuber(this.
|
|
1001
|
+
this.ssgs = new CesrIoSetSuber(this.store, {
|
|
1002
1002
|
subkey: "ssgs.",
|
|
1003
1003
|
ctor: Siger,
|
|
1004
1004
|
});
|
|
1005
1005
|
// SAD non-indexed signature couples keyed by SAD SAID.
|
|
1006
|
-
this.scgs = new CatCesrIoSetSuber(this.
|
|
1006
|
+
this.scgs = new CatCesrIoSetSuber(this.store, {
|
|
1007
1007
|
subkey: "scgs.",
|
|
1008
1008
|
ctor: [Verfer, Cigar],
|
|
1009
1009
|
});
|
|
1010
1010
|
// Reply messages keyed by reply SAID.
|
|
1011
1011
|
// Datetimes and signatures live in the companion `sdts.`, `ssgs.`, and
|
|
1012
1012
|
// `scgs.` stores.
|
|
1013
|
-
this.rpys = new SerderSuber(this.
|
|
1013
|
+
this.rpys = new SerderSuber(this.store, { subkey: "rpys." });
|
|
1014
1014
|
// Reply escrow indices of partially signed reply messages, mapping reply
|
|
1015
1015
|
// routes such as `/end/role` or `/loc/schema` to reply SAIDs.
|
|
1016
|
-
this.rpes = new CesrIoSetSuber(this.
|
|
1016
|
+
this.rpes = new CesrIoSetSuber(this.store, {
|
|
1017
1017
|
subkey: "rpes.",
|
|
1018
1018
|
ctor: Diger,
|
|
1019
1019
|
});
|
|
1020
1020
|
// AuthN/AuthZ by local controller at `cid` of endpoint provider at `eid`.
|
|
1021
1021
|
// Maps `cid.role.eid` to the SAID of the relevant `/end/role` reply.
|
|
1022
|
-
this.eans = new CesrSuber(this.
|
|
1022
|
+
this.eans = new CesrSuber(this.store, {
|
|
1023
1023
|
subkey: "eans.",
|
|
1024
1024
|
ctor: Diger,
|
|
1025
1025
|
});
|
|
1026
1026
|
// AuthN/AuthZ by endpoint provider at `eid` of a location at URL scheme.
|
|
1027
1027
|
// Maps `cid.role.eid` to the SAID of the relevant `/loc` reply.
|
|
1028
|
-
this.lans = new CesrSuber(this.
|
|
1028
|
+
this.lans = new CesrSuber(this.store, {
|
|
1029
1029
|
subkey: "lans.",
|
|
1030
1030
|
ctor: Diger,
|
|
1031
1031
|
});
|
|
1032
1032
|
// Service endpoint identifier auth records extracted from `/end/role`
|
|
1033
1033
|
// replies.
|
|
1034
|
-
this.ends = new Komer(this.
|
|
1034
|
+
this.ends = new Komer(this.store, {
|
|
1035
1035
|
subkey: "ends.",
|
|
1036
1036
|
recordClass: EndpointRecord,
|
|
1037
1037
|
});
|
|
1038
1038
|
// Service endpoint locations keyed by endpoint identifier and URL scheme.
|
|
1039
|
-
this.locs = new Komer(this.
|
|
1039
|
+
this.locs = new Komer(this.store, {
|
|
1040
1040
|
subkey: "locs.",
|
|
1041
1041
|
recordClass: LocationRecord,
|
|
1042
1042
|
});
|
|
1043
1043
|
// Observed identifier records keyed by controller, watcher, and observed
|
|
1044
1044
|
// identifier.
|
|
1045
|
-
this.obvs = new Komer(this.
|
|
1045
|
+
this.obvs = new Komer(this.store, {
|
|
1046
1046
|
subkey: "obvs.",
|
|
1047
1047
|
recordClass: ObservedRecord,
|
|
1048
1048
|
});
|
|
1049
1049
|
// Index of the last retrieved message from a witness mailbox.
|
|
1050
|
-
this.tops = new Komer(this.
|
|
1050
|
+
this.tops = new Komer(this.store, {
|
|
1051
1051
|
subkey: "witm.",
|
|
1052
1052
|
recordClass: TopicsRecord,
|
|
1053
1053
|
});
|
|
1054
1054
|
// Group partial signature escrow entries.
|
|
1055
|
-
this.gpse = new CatCesrIoSetSuber(this.
|
|
1055
|
+
this.gpse = new CatCesrIoSetSuber(this.store, {
|
|
1056
1056
|
subkey: "gpse.",
|
|
1057
1057
|
ctor: [NumberPrimitive, Diger],
|
|
1058
1058
|
});
|
|
1059
1059
|
// Group delegate escrow entries.
|
|
1060
|
-
this.gdee = new CatCesrIoSetSuber(this.
|
|
1060
|
+
this.gdee = new CatCesrIoSetSuber(this.store, {
|
|
1061
1061
|
subkey: "gdee.",
|
|
1062
1062
|
ctor: [NumberPrimitive, Diger],
|
|
1063
1063
|
});
|
|
1064
1064
|
// Group partial witness escrow entries.
|
|
1065
|
-
this.gpwe = new CatCesrIoSetSuber(this.
|
|
1065
|
+
this.gpwe = new CatCesrIoSetSuber(this.store, {
|
|
1066
1066
|
subkey: "gdwe.",
|
|
1067
1067
|
ctor: [NumberPrimitive, Diger],
|
|
1068
1068
|
});
|
|
1069
1069
|
// Completed group multisig references.
|
|
1070
|
-
this.cgms = new CesrSuber(this.
|
|
1070
|
+
this.cgms = new CesrSuber(this.store, {
|
|
1071
1071
|
subkey: "cgms.",
|
|
1072
1072
|
ctor: Diger,
|
|
1073
1073
|
});
|
|
1074
1074
|
// Exchange-message partial signature escrow messages.
|
|
1075
|
-
this.epse = new SerderSuber(this.
|
|
1075
|
+
this.epse = new SerderSuber(this.store, { subkey: "epse." });
|
|
1076
1076
|
// Exchange-message partial signature escrow datetimes.
|
|
1077
|
-
this.epsd = new CesrSuber(this.
|
|
1077
|
+
this.epsd = new CesrSuber(this.store, {
|
|
1078
1078
|
subkey: "epsd.",
|
|
1079
1079
|
ctor: Dater,
|
|
1080
1080
|
});
|
|
1081
|
-
this.emse = !this.
|
|
1082
|
-
? new SerderSuber(this.
|
|
1081
|
+
this.emse = !this.store.readonly || this.store.hasTable("emse.")
|
|
1082
|
+
? new SerderSuber(this.store, { subkey: "emse." })
|
|
1083
1083
|
: null;
|
|
1084
|
-
this.emsd = !this.
|
|
1085
|
-
? new CesrSuber(this.
|
|
1084
|
+
this.emsd = !this.store.readonly || this.store.hasTable("emsd.")
|
|
1085
|
+
? new CesrSuber(this.store, { subkey: "emsd.", ctor: Dater })
|
|
1086
1086
|
: null;
|
|
1087
1087
|
// Exchange messages keyed by digest.
|
|
1088
|
-
this.exns = new SerderSuber(this.
|
|
1088
|
+
this.exns = new SerderSuber(this.store, { subkey: "exns." });
|
|
1089
1089
|
// Bind metadata during store opening, never lazily inside an admission that may abort.
|
|
1090
|
-
this.exchangeMeta = new Komer(this.
|
|
1091
|
-
this.exrs = new Komer(this.
|
|
1090
|
+
this.exchangeMeta = new Komer(this.store, { subkey: "exchange.meta.", recordClass: ExchangeRecord });
|
|
1091
|
+
this.exrs = new Komer(this.store, { subkey: "exrs.", recordClass: ExchangeRegistryStateRecord });
|
|
1092
1092
|
// Forward pointers to provided reply messages.
|
|
1093
|
-
this.erpy = new CesrSuber(this.
|
|
1093
|
+
this.erpy = new CesrSuber(this.store, {
|
|
1094
1094
|
subkey: "erpy.",
|
|
1095
1095
|
ctor: Saider,
|
|
1096
1096
|
});
|
|
1097
1097
|
// Exchange-message indexed signatures.
|
|
1098
|
-
this.esigs = new CesrIoSetSuber(this.
|
|
1098
|
+
this.esigs = new CesrIoSetSuber(this.store, {
|
|
1099
1099
|
subkey: "esigs.",
|
|
1100
1100
|
ctor: Siger,
|
|
1101
1101
|
});
|
|
1102
1102
|
// Exchange-message non-indexed signature couples.
|
|
1103
|
-
this.ecigs = new CatCesrIoSetSuber(this.
|
|
1103
|
+
this.ecigs = new CatCesrIoSetSuber(this.store, {
|
|
1104
1104
|
subkey: "ecigs.",
|
|
1105
1105
|
ctor: [Verfer, Cigar],
|
|
1106
1106
|
});
|
|
1107
1107
|
// Historical source coordinates remain interoperable CESR couples, never private pointers.
|
|
1108
|
-
this.ests = new CatCesrIoSetSuber(this.
|
|
1108
|
+
this.ests = new CatCesrIoSetSuber(this.store, {
|
|
1109
1109
|
subkey: "ests.",
|
|
1110
1110
|
ctor: [NumberPrimitive, Diger],
|
|
1111
1111
|
});
|
|
1112
|
-
this.eidx = new CesrIoSetSuber(this.
|
|
1112
|
+
this.eidx = new CesrIoSetSuber(this.store, { subkey: "eidx.", ctor: Diger });
|
|
1113
1113
|
// Exchange-message pathed attachments.
|
|
1114
|
-
this.epath = new IoSetSuber(this.
|
|
1115
|
-
this.enst = new IoSetSuber(this.
|
|
1114
|
+
this.epath = new IoSetSuber(this.store, { subkey: ".epath" });
|
|
1115
|
+
this.enst = new IoSetSuber(this.store, { subkey: "enst." });
|
|
1116
1116
|
// Encrypt-Sender-Sign-Receiver payloads keyed by exchange digest.
|
|
1117
|
-
this.essrs = new CesrIoSetSuber(this.
|
|
1117
|
+
this.essrs = new CesrIoSetSuber(this.store, {
|
|
1118
1118
|
subkey: "essrs.",
|
|
1119
1119
|
ctor: Texter,
|
|
1120
1120
|
});
|
|
1121
1121
|
// Registry root copies awaiting automatic retention, keyed by exchange SAID.
|
|
1122
|
-
this.rrpe = new CesrSuber(this.
|
|
1122
|
+
this.rrpe = new CesrSuber(this.store, { subkey: "rrpe.", ctor: Dater });
|
|
1123
|
+
// Registry root copies sent, keyed by group, registry and recipient.
|
|
1124
|
+
this.rrsn = new Komer(this.store, { subkey: "rrsn.", recordClass: RootSentRecord });
|
|
1125
|
+
// KEL last given to each mailbox, keyed by identifier and mailbox.
|
|
1126
|
+
this.kpub = new Komer(this.store, { subkey: "kpub.", recordClass: KelPublishedRecord });
|
|
1123
1127
|
// Accepted signed challenge-response exchange-message SAIDs keyed by the
|
|
1124
1128
|
// signer prefix.
|
|
1125
|
-
this.chas = new CesrIoSetSuber(this.
|
|
1129
|
+
this.chas = new CesrIoSetSuber(this.store, {
|
|
1126
1130
|
subkey: "chas.",
|
|
1127
1131
|
ctor: Diger,
|
|
1128
1132
|
});
|
|
1129
1133
|
// Successful signed challenge-response exchange-message SAIDs keyed by
|
|
1130
1134
|
// the signer prefix.
|
|
1131
|
-
this.reps = new CesrIoSetSuber(this.
|
|
1135
|
+
this.reps = new CesrIoSetSuber(this.store, {
|
|
1132
1136
|
subkey: "reps.",
|
|
1133
1137
|
ctor: Diger,
|
|
1134
1138
|
});
|
|
1135
1139
|
// Authorized well-known OOBI records.
|
|
1136
|
-
this.wkas = new IoSetKomer(this.
|
|
1140
|
+
this.wkas = new IoSetKomer(this.store, {
|
|
1137
1141
|
subkey: "wkas.",
|
|
1138
1142
|
recordClass: WellKnownAuthN,
|
|
1139
1143
|
});
|
|
1140
1144
|
// Key-state notice datetime stamps keyed by key-state SAID.
|
|
1141
|
-
this.kdts = new CesrSuber(this.
|
|
1145
|
+
this.kdts = new CesrSuber(this.store, {
|
|
1142
1146
|
subkey: "kdts.",
|
|
1143
1147
|
ctor: Dater,
|
|
1144
1148
|
});
|
|
1145
1149
|
// Key-state messages keyed by key-state SAID.
|
|
1146
1150
|
// Datetimes and signatures are held in the companion key-state stores.
|
|
1147
|
-
this.ksns = new Komer(this.
|
|
1151
|
+
this.ksns = new Komer(this.store, {
|
|
1148
1152
|
subkey: "ksns.",
|
|
1149
1153
|
recordClass: KeyStateRecord,
|
|
1150
1154
|
});
|
|
1151
1155
|
// Successful key-state notice SAID index mapping `(controller, aid)` to
|
|
1152
1156
|
// saved key-state SAIDs.
|
|
1153
|
-
this.knas = new CesrSuber(this.
|
|
1157
|
+
this.knas = new CesrSuber(this.store, {
|
|
1154
1158
|
subkey: "knas.",
|
|
1155
1159
|
ctor: Diger,
|
|
1156
1160
|
});
|
|
1157
1161
|
// Watcher watched-SAID index mapping `(cid, aid, oid)` to the saved reply
|
|
1158
1162
|
// message SAID for a watched identifier.
|
|
1159
|
-
this.wwas = new CesrSuber(this.
|
|
1163
|
+
this.wwas = new CesrSuber(this.store, {
|
|
1160
1164
|
subkey: "wwas.",
|
|
1161
1165
|
ctor: Diger,
|
|
1162
1166
|
});
|
|
1163
1167
|
// Config-loaded OOBIs to be processed asynchronously.
|
|
1164
|
-
this.oobis = new Komer(this.
|
|
1168
|
+
this.oobis = new Komer(this.store, {
|
|
1165
1169
|
subkey: "oobis.",
|
|
1166
1170
|
sep: ">",
|
|
1167
1171
|
recordClass: OobiRecord,
|
|
1168
1172
|
});
|
|
1169
1173
|
// Retriable OOBIs that failed to load.
|
|
1170
|
-
this.eoobi = new Komer(this.
|
|
1174
|
+
this.eoobi = new Komer(this.store, {
|
|
1171
1175
|
subkey: "eoobi.",
|
|
1172
1176
|
sep: ">",
|
|
1173
1177
|
recordClass: OobiRecord,
|
|
1174
1178
|
});
|
|
1175
1179
|
// OOBIs with outstanding client requests.
|
|
1176
|
-
this.coobi = new Komer(this.
|
|
1180
|
+
this.coobi = new Komer(this.store, {
|
|
1177
1181
|
subkey: "coobi.",
|
|
1178
1182
|
sep: ">",
|
|
1179
1183
|
recordClass: OobiRecord,
|
|
1180
1184
|
});
|
|
1181
1185
|
// Successfully resolved OOBIs.
|
|
1182
|
-
this.roobi = new Komer(this.
|
|
1186
|
+
this.roobi = new Komer(this.store, {
|
|
1183
1187
|
subkey: "roobi.",
|
|
1184
1188
|
sep: ">",
|
|
1185
1189
|
recordClass: OobiRecord,
|
|
1186
1190
|
});
|
|
1187
1191
|
// Well-known OOBIs used for multifactor authentication against resolved
|
|
1188
1192
|
// OOBIs.
|
|
1189
|
-
this.woobi = new Komer(this.
|
|
1193
|
+
this.woobi = new Komer(this.store, {
|
|
1190
1194
|
subkey: "woobi.",
|
|
1191
1195
|
sep: ">",
|
|
1192
1196
|
recordClass: OobiRecord,
|
|
1193
1197
|
});
|
|
1194
1198
|
// Multi-OOBI associations where one AID is tied to multiple OOBIs.
|
|
1195
|
-
this.moobi = new Komer(this.
|
|
1199
|
+
this.moobi = new Komer(this.store, {
|
|
1196
1200
|
subkey: "moobi.",
|
|
1197
1201
|
sep: ">",
|
|
1198
1202
|
recordClass: OobiRecord,
|
|
1199
1203
|
});
|
|
1200
1204
|
// Multifactor well-known OOBI auth records awaiting processing, keyed by
|
|
1201
1205
|
// controller URL.
|
|
1202
|
-
this.mfa = new Komer(this.
|
|
1206
|
+
this.mfa = new Komer(this.store, {
|
|
1203
1207
|
subkey: "mfa.",
|
|
1204
1208
|
sep: ">",
|
|
1205
1209
|
recordClass: OobiRecord,
|
|
1206
1210
|
});
|
|
1207
1211
|
// Resolved multifactor well-known OOBI auth records keyed by controller
|
|
1208
1212
|
// URL.
|
|
1209
|
-
this.rmfa = new Komer(this.
|
|
1213
|
+
this.rmfa = new Komer(this.store, {
|
|
1210
1214
|
subkey: "rmfa.",
|
|
1211
1215
|
sep: ">",
|
|
1212
1216
|
recordClass: OobiRecord,
|
|
1213
1217
|
});
|
|
1214
1218
|
// JSON Schema SADs keyed by schema SAID.
|
|
1215
|
-
this.schema = new SchemerSuber(this.
|
|
1219
|
+
this.schema = new SchemerSuber(this.store, {
|
|
1216
1220
|
subkey: "schema.",
|
|
1217
1221
|
});
|
|
1218
1222
|
// Field values for contact information for remote identifiers.
|
|
1219
|
-
this.cfld = new Suber(this.
|
|
1223
|
+
this.cfld = new Suber(this.store, { subkey: "cfld." });
|
|
1220
1224
|
// Global settings for the Habery environment.
|
|
1221
|
-
this.hbys = new Suber(this.
|
|
1225
|
+
this.hbys = new Suber(this.store, { subkey: "hbys." });
|
|
1222
1226
|
// Signed contact data keyed by identifier prefix.
|
|
1223
|
-
this.cons = new Suber(this.
|
|
1227
|
+
this.cons = new Suber(this.store, { subkey: "cons." });
|
|
1224
1228
|
// Signature cigars for signed contact data.
|
|
1225
|
-
this.ccigs = new CesrSuber(this.
|
|
1229
|
+
this.ccigs = new CesrSuber(this.store, {
|
|
1226
1230
|
subkey: "ccigs.",
|
|
1227
1231
|
ctor: Cigar,
|
|
1228
1232
|
});
|
|
1229
1233
|
// Blinded media tuples for remote contact information.
|
|
1230
|
-
this.imgs = new CatCesrSuber(this.
|
|
1234
|
+
this.imgs = new CatCesrSuber(this.store, {
|
|
1231
1235
|
subkey: "imgs.",
|
|
1232
1236
|
ctor: [Noncer, Noncer, Labeler, Texter],
|
|
1233
1237
|
});
|
|
1234
1238
|
// Field values for local identifier information.
|
|
1235
|
-
this.ifld = new Suber(this.
|
|
1239
|
+
this.ifld = new Suber(this.store, { subkey: "ifld." });
|
|
1236
1240
|
// Signed local identifier data keyed by prefix.
|
|
1237
|
-
this.sids = new Suber(this.
|
|
1241
|
+
this.sids = new Suber(this.store, { subkey: "sids." });
|
|
1238
1242
|
// Signature cigars for signed local identifier data.
|
|
1239
|
-
this.icigs = new CesrSuber(this.
|
|
1243
|
+
this.icigs = new CesrSuber(this.store, {
|
|
1240
1244
|
subkey: "icigs.",
|
|
1241
1245
|
ctor: Cigar,
|
|
1242
1246
|
});
|
|
1243
1247
|
// Blinded media tuples for local identifier information.
|
|
1244
|
-
this.iimgs = new CatCesrSuber(this.
|
|
1248
|
+
this.iimgs = new CatCesrSuber(this.store, {
|
|
1245
1249
|
subkey: "iimgs.",
|
|
1246
1250
|
ctor: [Noncer, Noncer, Labeler, Texter],
|
|
1247
1251
|
});
|
|
1248
1252
|
// Delegated partial-witness escrow messages.
|
|
1249
|
-
this.dpwe = new SerderSuber(this.
|
|
1253
|
+
this.dpwe = new SerderSuber(this.store, { subkey: "dpwe." });
|
|
1250
1254
|
// Delegated unanchored escrow messages.
|
|
1251
|
-
this.dune = new SerderSuber(this.
|
|
1255
|
+
this.dune = new SerderSuber(this.store, { subkey: "dune." });
|
|
1252
1256
|
// Delegate publication escrow messages for sending delegator information
|
|
1253
1257
|
// to local witnesses.
|
|
1254
|
-
this.dpub = new SerderSuber(this.
|
|
1258
|
+
this.dpub = new SerderSuber(this.store, { subkey: "dpub." });
|
|
1255
1259
|
// Completed group delegated AIDs keyed by ordinal.
|
|
1256
|
-
this.cdel = new CesrOnSuber(this.
|
|
1260
|
+
this.cdel = new CesrOnSuber(this.store, {
|
|
1257
1261
|
subkey: "cdel.",
|
|
1258
1262
|
ctor: Diger,
|
|
1259
1263
|
});
|
|
1260
1264
|
// Multisig embed payload SAIDs mapped to containing exchange-message
|
|
1261
1265
|
// SAIDs across group multisig participants.
|
|
1262
|
-
this.meids = new CesrIoSetSuber(this.
|
|
1266
|
+
this.meids = new CesrIoSetSuber(this.store, {
|
|
1263
1267
|
subkey: "meids.",
|
|
1264
1268
|
ctor: Saider,
|
|
1265
1269
|
});
|
|
1266
1270
|
// Multisig embed payload SAIDs mapped to group multisig participant AIDs.
|
|
1267
|
-
this.maids = new CesrIoSetSuber(this.
|
|
1271
|
+
this.maids = new CesrIoSetSuber(this.store, {
|
|
1268
1272
|
subkey: "maids.",
|
|
1269
1273
|
ctor: Prefixer,
|
|
1270
1274
|
});
|
|
1271
1275
|
// KRAM cache-type records keyed by expression string.
|
|
1272
|
-
this.ctyp = new Komer(this.
|
|
1276
|
+
this.ctyp = new Komer(this.store, {
|
|
1273
1277
|
subkey: "ctyp.",
|
|
1274
1278
|
recordClass: CacheTypeRecord,
|
|
1275
1279
|
});
|
|
1276
1280
|
// KRAM message-cache records keyed by `(AID, MID)`.
|
|
1277
|
-
this.msgc = new Komer(this.
|
|
1281
|
+
this.msgc = new Komer(this.store, {
|
|
1278
1282
|
subkey: "msgc.",
|
|
1279
1283
|
recordClass: MsgCacheRecord,
|
|
1280
1284
|
});
|
|
1281
|
-
this.xdt = new CesrSuber(this.
|
|
1285
|
+
this.xdt = new CesrSuber(this.store, { subkey: "xdt.", ctor: Dater });
|
|
1282
1286
|
// KRAM transactioned message-cache records keyed by `(AID, XID, MID)`.
|
|
1283
|
-
this.tmsc = new Komer(this.
|
|
1287
|
+
this.tmsc = new Komer(this.store, {
|
|
1284
1288
|
subkey: "tmsc.",
|
|
1285
1289
|
recordClass: TxnMsgCacheRecord,
|
|
1286
1290
|
});
|
|
1287
|
-
this.
|
|
1288
|
-
this.
|
|
1291
|
+
this.heldq = new BytesSuber(this.store, { subkey: "heldq." });
|
|
1292
|
+
this.heldu = new BytesSuber(this.store, { subkey: "heldu." });
|
|
1293
|
+
this.ulgs = new CesrIoSetSuber(this.store, { subkey: "ulgs.", ctor: Prefixer });
|
|
1294
|
+
this.cigs = new CatCesrIoSetSuber(this.store, { subkey: "cigs.", ctor: [Verfer, Cigar] });
|
|
1289
1295
|
// KRAM partially signed multi-key messages keyed by `(AID, MID)`.
|
|
1290
|
-
this.pmkm = new SerderSuber(this.
|
|
1296
|
+
this.pmkm = new SerderSuber(this.store, { subkey: "pmkm." });
|
|
1291
1297
|
// KRAM partially signed multi-key signatures keyed by `(AID, MID)`.
|
|
1292
|
-
this.pmks = new CesrIoSetSuber(this.
|
|
1298
|
+
this.pmks = new CesrIoSetSuber(this.store, {
|
|
1293
1299
|
subkey: "pmks.",
|
|
1294
1300
|
ctor: Siger,
|
|
1295
1301
|
});
|
|
1296
1302
|
// KRAM partially signed multi-key sender key-state seals keyed by
|
|
1297
1303
|
// `(AID, MID)`.
|
|
1298
|
-
this.pmsk = new CatCesrSuber(this.
|
|
1304
|
+
this.pmsk = new CatCesrSuber(this.store, {
|
|
1299
1305
|
subkey: "pmsk.",
|
|
1300
1306
|
ctor: [NumberPrimitive, Diger],
|
|
1301
1307
|
});
|
|
1302
1308
|
// Transferable receipt quadruples used by the KRAM attachment path.
|
|
1303
|
-
this.trqs = new CatCesrIoSetSuber(this.
|
|
1309
|
+
this.trqs = new CatCesrIoSetSuber(this.store, {
|
|
1304
1310
|
subkey: "trqs.",
|
|
1305
1311
|
ctor: [Prefixer, NumberPrimitive, Diger, Siger],
|
|
1306
1312
|
});
|
|
1307
1313
|
// Transferable last-signature groups used by the KRAM attachment path.
|
|
1308
|
-
this.tsgs = new CatCesrIoSetSuber(this.
|
|
1314
|
+
this.tsgs = new CatCesrIoSetSuber(this.store, {
|
|
1309
1315
|
subkey: "tsgs.",
|
|
1310
1316
|
ctor: [Prefixer, NumberPrimitive, Diger, Siger],
|
|
1311
1317
|
});
|
|
1312
1318
|
// First-seen seal couples for issuing or delegating events.
|
|
1313
|
-
this.sscs = new CatCesrIoSetSuber(this.
|
|
1319
|
+
this.sscs = new CatCesrIoSetSuber(this.store, {
|
|
1314
1320
|
subkey: "sscs.",
|
|
1315
1321
|
ctor: [NumberPrimitive, Diger],
|
|
1316
1322
|
});
|
|
1317
1323
|
// Source seal triples for issued or delegated events.
|
|
1318
|
-
this.ssts = new CatCesrIoSetSuber(this.
|
|
1324
|
+
this.ssts = new CatCesrIoSetSuber(this.store, {
|
|
1319
1325
|
subkey: "ssts.",
|
|
1320
1326
|
ctor: [Prefixer, NumberPrimitive, Diger],
|
|
1321
1327
|
});
|
|
1322
1328
|
// First-seen replay couples storing ordinal and datetime pairs.
|
|
1323
|
-
this.frcs = new CatCesrIoSetSuber(this.
|
|
1329
|
+
this.frcs = new CatCesrIoSetSuber(this.store, {
|
|
1324
1330
|
subkey: "frcs.",
|
|
1325
1331
|
ctor: [NumberPrimitive, Dater],
|
|
1326
1332
|
});
|
|
1327
1333
|
// Typed digest seal couples.
|
|
1328
|
-
this.tdcs = new CatCesrIoSetSuber(this.
|
|
1334
|
+
this.tdcs = new CatCesrIoSetSuber(this.store, {
|
|
1329
1335
|
subkey: "tdcs.",
|
|
1330
1336
|
ctor: [Verser, Noncer],
|
|
1331
1337
|
});
|
|
1332
1338
|
// Pathed streams stored as raw bytes.
|
|
1333
|
-
this.ptds = new BytesIoSetSuber(this.
|
|
1339
|
+
this.ptds = new BytesIoSetSuber(this.store, { subkey: "ptds." });
|
|
1334
1340
|
// Blind state quadruples.
|
|
1335
|
-
this.bsqs = new CatCesrIoSetSuber(this.
|
|
1341
|
+
this.bsqs = new CatCesrIoSetSuber(this.store, {
|
|
1336
1342
|
subkey: "bsqs.",
|
|
1337
1343
|
ctor: [Noncer, Noncer, Noncer, Labeler],
|
|
1338
1344
|
});
|
|
1339
1345
|
// Bound state sextuples.
|
|
1340
|
-
this.bsss = new CatCesrIoSetSuber(this.
|
|
1346
|
+
this.bsss = new CatCesrIoSetSuber(this.store, {
|
|
1341
1347
|
subkey: "bsss.",
|
|
1342
1348
|
ctor: [Noncer, Noncer, Noncer, Labeler, NumberPrimitive, Noncer],
|
|
1343
1349
|
});
|
|
1344
1350
|
// Type-media quadruples.
|
|
1345
|
-
this.tmqs = new CatCesrIoSetSuber(this.
|
|
1351
|
+
this.tmqs = new CatCesrIoSetSuber(this.store, {
|
|
1346
1352
|
subkey: "tmqs.",
|
|
1347
1353
|
ctor: [Noncer, Noncer, Labeler, Texter],
|
|
1348
1354
|
});
|
|
@@ -1359,39 +1365,39 @@ export class Baser {
|
|
|
1359
1365
|
this.kevers.clear();
|
|
1360
1366
|
this.prefixes.clear();
|
|
1361
1367
|
this.groups.clear();
|
|
1362
|
-
return yield* this.
|
|
1368
|
+
return yield* this.store.close(clear);
|
|
1363
1369
|
}
|
|
1364
1370
|
/** Read the root LMDB version marker through the shared lifecycle owner. */
|
|
1365
1371
|
getVer() {
|
|
1366
|
-
return this.
|
|
1372
|
+
return this.store.getVer();
|
|
1367
1373
|
}
|
|
1368
1374
|
/** Write the root LMDB version marker through the shared lifecycle owner. */
|
|
1369
1375
|
setVer(val) {
|
|
1370
|
-
this.
|
|
1376
|
+
this.store.setVer(val);
|
|
1371
1377
|
}
|
|
1372
1378
|
/** Count raw physical entries in `evts.` for test/debug visibility. */
|
|
1373
1379
|
cntEvts() {
|
|
1374
|
-
return this.
|
|
1380
|
+
return this.store.cnt(this.evtsRaw);
|
|
1375
1381
|
}
|
|
1376
1382
|
/** Raw insert helper kept for tests/debug tooling. */
|
|
1377
1383
|
putEvt(key, val) {
|
|
1378
|
-
return this.
|
|
1384
|
+
return this.store.putVal(this.evtsRaw, key, val);
|
|
1379
1385
|
}
|
|
1380
1386
|
/** Raw upsert helper kept for tests/debug tooling. */
|
|
1381
1387
|
setEvt(key, val) {
|
|
1382
|
-
return this.
|
|
1388
|
+
return this.store.setVal(this.evtsRaw, key, val);
|
|
1383
1389
|
}
|
|
1384
1390
|
/** Raw fetch helper kept for tests/debug tooling. */
|
|
1385
1391
|
getEvt(key) {
|
|
1386
|
-
return this.
|
|
1392
|
+
return this.store.getVal(this.evtsRaw, key);
|
|
1387
1393
|
}
|
|
1388
1394
|
/** Raw delete helper kept for tests/debug tooling. */
|
|
1389
1395
|
delEvt(key) {
|
|
1390
|
-
return this.
|
|
1396
|
+
return this.store.delVal(this.evtsRaw, key);
|
|
1391
1397
|
}
|
|
1392
1398
|
/** Iterate `evts.` entries with optional byte-prefix filter. */
|
|
1393
1399
|
*getAllEvtsIter(top = new Uint8Array(0)) {
|
|
1394
|
-
yield* this.
|
|
1400
|
+
yield* this.store.getTopItemIter(this.evtsRaw, top);
|
|
1395
1401
|
}
|
|
1396
1402
|
/**
|
|
1397
1403
|
* Persist one serialized event body in `evts.` under its digest key.
|
|
@@ -1917,7 +1923,7 @@ export class Baser {
|
|
|
1917
1923
|
if (sn === null)
|
|
1918
1924
|
return new CapturedKelReplay(this, [[pre, 0, felEnd]]);
|
|
1919
1925
|
const start = b(`${pre}.${"f".repeat(32)}`);
|
|
1920
|
-
for (const entry of this.kels.sdb
|
|
1926
|
+
for (const entry of this.store.scan(this.kels.sdb, { start, reverse: true, limit: 1 })) {
|
|
1921
1927
|
const [prefix, end] = splitOnKey(entry.key);
|
|
1922
1928
|
if (t(prefix) !== pre)
|
|
1923
1929
|
return null;
|
|
@@ -1970,7 +1976,7 @@ export class Baser {
|
|
|
1970
1976
|
replayEnd(pre) {
|
|
1971
1977
|
// Fixed-width CESR ordinal keys sort lexically, so the maximal suffix bounds this prefix's tail.
|
|
1972
1978
|
const start = b(`${pre}.${"f".repeat(32)}`);
|
|
1973
|
-
for (const entry of this.fels.sdb
|
|
1979
|
+
for (const entry of this.store.scan(this.fels.sdb, { start, reverse: true, limit: 1 })) {
|
|
1974
1980
|
const [prefix, ordinal] = splitOnKey(entry.key);
|
|
1975
1981
|
return t(prefix) === pre ? ordinal : null;
|
|
1976
1982
|
}
|
|
@@ -2033,6 +2039,13 @@ export class Baser {
|
|
|
2033
2039
|
return this.hbys.get(name);
|
|
2034
2040
|
}
|
|
2035
2041
|
}
|
|
2042
|
+
/** Placement of this store kind. */
|
|
2043
|
+
Object.defineProperty(Baser, "Family", {
|
|
2044
|
+
enumerable: true,
|
|
2045
|
+
configurable: true,
|
|
2046
|
+
writable: true,
|
|
2047
|
+
value: { tail: "db", maxTables: 128 }
|
|
2048
|
+
});
|
|
2036
2049
|
/**
|
|
2037
2050
|
* Thin Effection-native lifecycle host for one `Baser`.
|
|
2038
2051
|
*
|
|
@@ -2084,38 +2097,3 @@ export class BaserDoer {
|
|
|
2084
2097
|
}
|
|
2085
2098
|
}
|
|
2086
2099
|
}
|
|
2087
|
-
/** Constructor-safe async factory for a fully reopened `Baser`. */
|
|
2088
|
-
export function* createBaser(options = {}) {
|
|
2089
|
-
const baser = new Baser(options);
|
|
2090
|
-
let delivered = false;
|
|
2091
|
-
let failure;
|
|
2092
|
-
try {
|
|
2093
|
-
const opened = yield* baser.reopen(options);
|
|
2094
|
-
if (!opened) {
|
|
2095
|
-
throw new DatabaseNotOpenError("Failed to open Baser");
|
|
2096
|
-
}
|
|
2097
|
-
delivered = true;
|
|
2098
|
-
return baser;
|
|
2099
|
-
}
|
|
2100
|
-
catch (error) {
|
|
2101
|
-
failure = { error };
|
|
2102
|
-
throw error;
|
|
2103
|
-
}
|
|
2104
|
-
finally {
|
|
2105
|
-
if (!delivered) {
|
|
2106
|
-
try {
|
|
2107
|
-
yield* baser.close();
|
|
2108
|
-
}
|
|
2109
|
-
catch (error) {
|
|
2110
|
-
if (failure) {
|
|
2111
|
-
// deno-lint-ignore no-unsafe-finally -- Preserve the operation failure alongside shutdown failure.
|
|
2112
|
-
throw new AggregateError([failure.error, error], "Database acquisition and close failed", {
|
|
2113
|
-
cause: failure.error,
|
|
2114
|
-
});
|
|
2115
|
-
}
|
|
2116
|
-
// deno-lint-ignore no-unsafe-finally -- A shutdown failure must propagate.
|
|
2117
|
-
throw error;
|
|
2118
|
-
}
|
|
2119
|
-
}
|
|
2120
|
-
}
|
|
2121
|
-
}
|