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
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime-owned operations for single-signature IPEX Unblind (proof release for one live presentation).
|
|
3
|
+
*
|
|
4
|
+
* One explicit consent step, the disclosee's. The disclosee calls `requestUnblind`: it approves the exact live
|
|
5
|
+
* Grant, signs the query for the missing public suffix and returns after local commit. The discloser has no
|
|
6
|
+
* approval step: it consented by signing the Grant, so an owner that authenticated a peer query for a live
|
|
7
|
+
* Grant its identifier sent replies on its own, and `processOnce` adopts and delivers that reply under the
|
|
8
|
+
* Grant's deadline (KERIpy keeps a local approve gate; the wire is unchanged).
|
|
9
|
+
* `UnblindingOperations.processOnce` also sends and resends the unchanged query each second, finishes the
|
|
10
|
+
* Grant once the authenticated reply is complete, and ends the operation at the Grant's original exchange
|
|
11
|
+
* deadline. The only signing outside the Grant's own scope is the requester's query. A record that is active
|
|
12
|
+
* with no live operation reads `interrupted` (or `expired` past the deadline) and nothing is sent for it
|
|
13
|
+
* after a restart; a repeated peer query is answered again from stored state.
|
|
14
|
+
*
|
|
15
|
+
* Workflow-contract shape (`app/runtime/workflow-contract.ts`): `requestUnblind` returns after local
|
|
16
|
+
* commit and never wait for the peer, `unblindingStatus` is a pure read, `waitForUnblinding` only observes
|
|
17
|
+
* and returns a `WaitResult`, `abandonUnblinding` is local. Completion creates no Admit.
|
|
18
|
+
*
|
|
19
|
+
* There is no operation store; status is the live table plus what the stores prove. Durable: the Grant and
|
|
20
|
+
* its deadline, and the finished proof view. A requester whose Grant's proofs are current reads `done`; one
|
|
21
|
+
* whose Grant is still live with proofs missing and no live operation reads `interrupted` (request it
|
|
22
|
+
* again), and past the deadline `expired`. A responder is driven entirely by a peer's query, so a
|
|
23
|
+
* responder's operation exists only while live: its `done`, `failed` and `expired` readings, like every
|
|
24
|
+
* requester `abandoned` and `failed` reading, are remembered only until the process ends, and a responder
|
|
25
|
+
* Grant with no live operation throws. Memory only: the owner's approval and frozen query/reply, resend
|
|
26
|
+
* timers, the consent time. Per-identifier {@link Unblind} owners come through a narrow interface (`runtime.ipex`). Group identifiers
|
|
27
|
+
* are refused; group Unblind belongs to the group proposal API.
|
|
28
|
+
*/
|
|
29
|
+
import { type CesrFrame, SerderKERI } from "cesr-ts";
|
|
30
|
+
import { type Operation } from "effection";
|
|
31
|
+
import { Unblind } from "../../acdc/unblinding.js";
|
|
32
|
+
import type { Exchanger, ExchangeRouteHandler } from "../exchanges/exchanging.js";
|
|
33
|
+
import type { Hab, Habery } from "../identity/habbing.js";
|
|
34
|
+
import { type Multiplexor } from "../multisig/grouping.js";
|
|
35
|
+
import type { ProtocolProcessor } from "../protocol/protocol-processing.js";
|
|
36
|
+
import { type DeliveryFailure, DeliveryOutbox } from "../runtime/delivery-outbox.js";
|
|
37
|
+
import type { RetryPolicy } from "../runtime/retry-backoff.js";
|
|
38
|
+
import type { RuntimeClock } from "../runtime/runtime-clock.js";
|
|
39
|
+
import { type ChangeSink, type WaitResult } from "../runtime/workflow-contract.js";
|
|
40
|
+
import type { IssuanceDelivery } from "./issuance.js";
|
|
41
|
+
/** Milliseconds between resends of the unchanged disclosee query, as `tufa ipex unblind` does. */
|
|
42
|
+
export declare const UNBLIND_QUERY_RESEND_MS = 1000;
|
|
43
|
+
/** Which side of the presentation the local identifier is. */
|
|
44
|
+
export type UnblindingRole = "requester" | "responder";
|
|
45
|
+
/** Terminal states that are not completion; each carries a reason. */
|
|
46
|
+
export type UnblindingEndState = "abandoned" | "interrupted" | "expired" | "failed";
|
|
47
|
+
/** Where an active Unblind is. */
|
|
48
|
+
export type UnblindingPhase = "awaitingReply" | "proving";
|
|
49
|
+
/** Status of one Unblind, discriminated on `state`. A pure read. */
|
|
50
|
+
export type UnblindingStatus = {
|
|
51
|
+
state: "active";
|
|
52
|
+
role: UnblindingRole;
|
|
53
|
+
phase: UnblindingPhase;
|
|
54
|
+
deadline: string;
|
|
55
|
+
failure?: DeliveryFailure;
|
|
56
|
+
} | {
|
|
57
|
+
state: "done";
|
|
58
|
+
role: UnblindingRole;
|
|
59
|
+
} | {
|
|
60
|
+
state: UnblindingEndState;
|
|
61
|
+
role: UnblindingRole;
|
|
62
|
+
reason: string;
|
|
63
|
+
};
|
|
64
|
+
/** Collaborators only a group needs; an owner without them unblinds as an individual alone. */
|
|
65
|
+
export interface GroupUnblindDeps {
|
|
66
|
+
/** Where the Unblind child wrappers (`/multisig/qry`, `/multisig/rpy`) are delegated; one owner per runtime registers. */
|
|
67
|
+
readonly mux: Pick<Multiplexor, "addChildHandler" | "removeChildHandler">;
|
|
68
|
+
/** Local intake of this member's own contribution and of the other members'. */
|
|
69
|
+
readonly protocol: Pick<ProtocolProcessor, "dispatch">;
|
|
70
|
+
}
|
|
71
|
+
/** Narrow collaborators of the Unblind owner. Hosts adapt their runtime to this once. */
|
|
72
|
+
export interface UnblindingDeps {
|
|
73
|
+
readonly hby: Habery;
|
|
74
|
+
readonly exc: Pick<Exchanger, "retainedInput" | "exchangeDeadline" | "complete" | "verifyGrantProofs">;
|
|
75
|
+
/** Collaborators of group Unblind; absent, this owner refuses group identifiers. */
|
|
76
|
+
readonly group?: GroupUnblindDeps;
|
|
77
|
+
/** Per-identifier Unblind owners (`runtime.ipex`), so several identifiers can unblind on one runtime. */
|
|
78
|
+
readonly unblinds: {
|
|
79
|
+
unblind(hab: Hab): Unblind;
|
|
80
|
+
unblindOwners(): Iterable<Unblind>;
|
|
81
|
+
};
|
|
82
|
+
readonly delivery: IssuanceDelivery;
|
|
83
|
+
/** Same clock the exchanger and Unblind owners were composed with. */
|
|
84
|
+
readonly clock: RuntimeClock;
|
|
85
|
+
/** Delivery retry delays; the production policy when absent. */
|
|
86
|
+
readonly retry?: Readonly<RetryPolicy>;
|
|
87
|
+
readonly changes?: ChangeSink;
|
|
88
|
+
}
|
|
89
|
+
/** One operation the user consented to or the discloser owes; exists only while its approval is live in memory. */
|
|
90
|
+
interface LiveUnblinding {
|
|
91
|
+
/** SAID of the live Grant. */
|
|
92
|
+
readonly grant: string;
|
|
93
|
+
/** Presentation transaction id. */
|
|
94
|
+
readonly xid: string;
|
|
95
|
+
readonly role: UnblindingRole;
|
|
96
|
+
/** The Grant's original exchange deadline (ISO 8601). */
|
|
97
|
+
readonly deadline: string;
|
|
98
|
+
readonly hab: Hab;
|
|
99
|
+
readonly owner: Unblind;
|
|
100
|
+
/** The discloser of the Grant: where the query goes. */
|
|
101
|
+
readonly peer: string;
|
|
102
|
+
readonly expires: bigint;
|
|
103
|
+
/** Requester: the frozen signed query, resent unchanged. */
|
|
104
|
+
query?: Uint8Array;
|
|
105
|
+
/** When {@link query} was signed (host clock, ms); it is re-dated once older than the single-key window. */
|
|
106
|
+
queryAt: number;
|
|
107
|
+
nextQuery: number;
|
|
108
|
+
/** Group party state; such an operation never re-dates its threshold query. */
|
|
109
|
+
group?: GroupUnblind;
|
|
110
|
+
phase: UnblindingPhase;
|
|
111
|
+
/** Signed bytes the steps decided to send; a peer briefly offline is retried until the Grant deadline. */
|
|
112
|
+
readonly outbox: DeliveryOutbox;
|
|
113
|
+
/** The steps are done; the operation ends once the outbox is empty. */
|
|
114
|
+
finished: boolean;
|
|
115
|
+
/** A step is running; overlapping `processOnce` calls skip it. */
|
|
116
|
+
busy: boolean;
|
|
117
|
+
}
|
|
118
|
+
/** Per-operation state of a group party; memory only. */
|
|
119
|
+
declare class GroupUnblind {
|
|
120
|
+
readonly member: Hab;
|
|
121
|
+
readonly proposer: string;
|
|
122
|
+
readonly pending: Map<string, {
|
|
123
|
+
parent: SerderKERI;
|
|
124
|
+
child: CesrFrame;
|
|
125
|
+
}>;
|
|
126
|
+
readonly seen: Set<string>;
|
|
127
|
+
/** The exact DH-style body this member contributes to, once frozen. */
|
|
128
|
+
frozen?: Uint8Array;
|
|
129
|
+
contributed: boolean;
|
|
130
|
+
finished: boolean;
|
|
131
|
+
started: boolean;
|
|
132
|
+
constructor(member: Hab, proposer: string);
|
|
133
|
+
}
|
|
134
|
+
/** What a consent step selected. */
|
|
135
|
+
export interface UnblindingBegun {
|
|
136
|
+
grant: string;
|
|
137
|
+
xid: string;
|
|
138
|
+
role: UnblindingRole;
|
|
139
|
+
}
|
|
140
|
+
/** Choices of a consent to Unblind; the party is the live Grant's recipient (request) or sender (answer). */
|
|
141
|
+
export interface UnblindingOptions {
|
|
142
|
+
/** A group requires the current signing member that authors the query (disclosee) or the reply (discloser). */
|
|
143
|
+
proposer?: string;
|
|
144
|
+
/** Ordinary state labels the owner treats as the credential-state vocabulary; omitted uses the owner's default. */
|
|
145
|
+
states?: readonly string[];
|
|
146
|
+
}
|
|
147
|
+
/** What an operation that finished or ended in this process reports until the process ends. */
|
|
148
|
+
type SettledUnblinding = {
|
|
149
|
+
role: UnblindingRole;
|
|
150
|
+
state: "done";
|
|
151
|
+
} | {
|
|
152
|
+
role: UnblindingRole;
|
|
153
|
+
state: UnblindingEndState;
|
|
154
|
+
reason: string;
|
|
155
|
+
};
|
|
156
|
+
/** The live operations table and its driver. One per host runtime; every identifier may unblind through it. */
|
|
157
|
+
export declare class UnblindingOperations {
|
|
158
|
+
readonly deps: UnblindingDeps;
|
|
159
|
+
/** Operations whose approval is live in this process. Internal to this module's functions. */
|
|
160
|
+
readonly live: Map<string, LiveUnblinding>;
|
|
161
|
+
/** Operations that finished or ended in this process; not durable, see the module doc. */
|
|
162
|
+
readonly settled: Map<string, SettledUnblinding>;
|
|
163
|
+
/** The Unblind child handlers registered on the multiplexor, once a group operation began. */
|
|
164
|
+
groupRoutes: Array<[string, ExchangeRouteHandler]> | null;
|
|
165
|
+
constructor(deps: UnblindingDeps);
|
|
166
|
+
/**
|
|
167
|
+
* Whether a pass has work: a live operation, or an owner holds an authenticated peer query whose reply is
|
|
168
|
+
* owed (an in-memory walk of the owners, no store read).
|
|
169
|
+
*/
|
|
170
|
+
active(): boolean;
|
|
171
|
+
/** Advance every live operation by one pass, each bounded by its Grant deadline. */
|
|
172
|
+
processOnce(): Operation<void>;
|
|
173
|
+
/**
|
|
174
|
+
* Take on the replies the owners owe. The discloser has no consent step: an owner that authenticated a
|
|
175
|
+
* peer query for a live Grant its identifier sent holds the operation, and this delivers its reply
|
|
176
|
+
* under the Grant's deadline. Decided from the owners' state, so a restarted process re-answers a
|
|
177
|
+
* repeated query.
|
|
178
|
+
*/
|
|
179
|
+
private adopt;
|
|
180
|
+
/** End a live operation: release the approval, remember why until the process ends, tell the sink. */
|
|
181
|
+
end(op: LiveUnblinding, state: UnblindingEndState, reason: string): void;
|
|
182
|
+
/** Drop the live entry and the owner's approval and frozen messages; delivered bytes stay the peer's. */
|
|
183
|
+
private release;
|
|
184
|
+
private finished;
|
|
185
|
+
private timer;
|
|
186
|
+
private setPhase;
|
|
187
|
+
/**
|
|
188
|
+
* One pass of a group party, in the order of the CLI loop it replaces: take in the members' wrappers, contribute
|
|
189
|
+
* this member's signature once to the frozen body, publish it to the other members, and finish.
|
|
190
|
+
*/
|
|
191
|
+
private stepGroup;
|
|
192
|
+
/** One pass, in the order of the CLI loop it replaces. */
|
|
193
|
+
private step;
|
|
194
|
+
/**
|
|
195
|
+
* The query to send now: the signed bytes unchanged while they are timely, and a re-dated one
|
|
196
|
+
* (`Unblind.requery`: same frozen request, new `dt`, SAID and signatures) once they are older than the
|
|
197
|
+
* single-key window, which the discloser's KRAM would drop as stale. Re-signing happens only here, inside
|
|
198
|
+
* the consent that began the operation; a registry head that moved since fails the operation instead. A
|
|
199
|
+
* group threshold query cannot be re-dated by one member; group Unblind is not run here.
|
|
200
|
+
*/
|
|
201
|
+
private current;
|
|
202
|
+
private finishedStep;
|
|
203
|
+
/** One pass: send what is queued, step only once the queue is empty, send what the step queued. */
|
|
204
|
+
private advance;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* The disclosee's consent to request the missing proofs for one live Grant: approves the Grant, signs the
|
|
208
|
+
* query over the missing accepted public suffix and records it. Returns after local commit; `processOnce`
|
|
209
|
+
* sends and resends it. A Grant whose proofs are already current reads `done` at once.
|
|
210
|
+
*
|
|
211
|
+
* @throws ValidationError for a Grant that is not live and addressed to a local identifier, a group without a
|
|
212
|
+
* current signing member as proposer, or an Unblind already begun for it.
|
|
213
|
+
*/
|
|
214
|
+
export declare function requestUnblind(ops: UnblindingOperations, grant: string, options?: UnblindingOptions): UnblindingBegun;
|
|
215
|
+
/**
|
|
216
|
+
* A group discloser member's consent to answer a live presentation: approves the Grant, so that this member
|
|
217
|
+
* contributes its signature to the one threshold reply (the proposer authors the reply once the disclosee's
|
|
218
|
+
* authenticated query arrives; the others contribute to it). Returns after local commit; `processOnce` does
|
|
219
|
+
* the rest. An individual discloser needs no consent: its owner answers an authenticated query by itself.
|
|
220
|
+
*
|
|
221
|
+
* @throws ValidationError for an individual identifier, a Grant the group did not send, a proposer that is not a
|
|
222
|
+
* current signing member, or an Unblind already begun.
|
|
223
|
+
*/
|
|
224
|
+
export declare function answerUnblind(ops: UnblindingOperations, grant: string, options?: UnblindingOptions): UnblindingBegun;
|
|
225
|
+
/**
|
|
226
|
+
* Pure read of one Unblind: what finished or ended in this process, the live table, and otherwise what the
|
|
227
|
+
* stores prove for the requester (see the module doc for what a reload loses). A requester's Grant whose
|
|
228
|
+
* proofs are not current and that no live operation holds reads `interrupted`, or `expired` past the Grant
|
|
229
|
+
* deadline; that is a statement, not a write.
|
|
230
|
+
*
|
|
231
|
+
* @throws ValidationError when `grant` is not a Grant a local identifier is the disclosee of, and no
|
|
232
|
+
* operation for it is live or remembered.
|
|
233
|
+
*/
|
|
234
|
+
export declare function unblindingStatus(ops: UnblindingOperations, grant: string): UnblindingStatus;
|
|
235
|
+
/** Options for {@link waitForUnblinding}. */
|
|
236
|
+
export interface UnblindingWaitOptions {
|
|
237
|
+
/** Wall-clock budget. */
|
|
238
|
+
timeoutMs: number;
|
|
239
|
+
clock?: RuntimeClock;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Observe until the Unblind is done or ended, or the budget expires. Starts no worker and drives nothing:
|
|
243
|
+
* someone else must call `processOnce`.
|
|
244
|
+
*/
|
|
245
|
+
export declare function waitForUnblinding(ops: UnblindingOperations, grant: string, { timeoutMs, clock }: UnblindingWaitOptions): Operation<WaitResult<UnblindingStatus>>;
|
|
246
|
+
/**
|
|
247
|
+
* Local abandon: release the approval and frozen messages and read `abandoned` until the process ends. Does
|
|
248
|
+
* not message the peer and does not undo proofs already finished. Does nothing to an Unblind that is already
|
|
249
|
+
* done or ended.
|
|
250
|
+
*
|
|
251
|
+
* @throws ValidationError when no Unblind was begun for `grant`.
|
|
252
|
+
*/
|
|
253
|
+
export declare function abandonUnblinding(ops: UnblindingOperations, grant: string, reason?: string): void;
|
|
254
|
+
export {};
|
|
255
|
+
//# sourceMappingURL=unblinding-workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unblinding-workflow.d.ts","sourceRoot":"","sources":["../../../src/app/ipex/unblinding-workflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAc,KAAK,SAAS,EAA4C,UAAU,EAAY,MAAM,SAAS,CAAC;AACrH,OAA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AAO,GAAE,iBAAsB,GAC9B,eAAe,CAajB;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,oBAAoB,EACzB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,iBAAsB,GAC9B,eAAe,CAQjB;AA+DD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,oBAAoB,EACzB,KAAK,EAAE,MAAM,GACZ,gBAAgB,CA8BlB;AAED,6CAA6C;AAC7C,MAAM,WAAW,qBAAqB;IACpC,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAiB,iBAAiB,CAChC,GAAG,EAAE,oBAAoB,EACzB,KAAK,EAAE,MAAM,EACb,EAAE,SAAS,EAAE,KAAsB,EAAE,EAAE,qBAAqB,GAC3D,SAAS,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAIzC;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAA0B,GAAG,IAAI,CASlH"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Poll-and-settle for credential IPEX traffic: what arrived through the mailbox,
|
|
3
|
+
* settling the grants already stored, and waiting for new state to appear.
|
|
4
|
+
*
|
|
5
|
+
* The pieces follow the workflow contract. `settleStoredGrants` is the explicit
|
|
6
|
+
* operation: it replays stored grant artifacts that have not yet saved their
|
|
7
|
+
* credential. `ipexArrivalStatus` is a pure synchronous read of durable state
|
|
8
|
+
* (accepted `exns` and `reger.saved`) against a baseline taken earlier.
|
|
9
|
+
* `waitForIpexArrival` only observes: it starts no worker and returns a
|
|
10
|
+
* {@link WaitResult} instead of throwing on its deadline.
|
|
11
|
+
*
|
|
12
|
+
* How hosts use it:
|
|
13
|
+
* - A wallet's runtime already polls its mailboxes continuously, so it takes a
|
|
14
|
+
* baseline, then calls `ipexArrivalStatus` from its UI or `waitForIpexArrival`
|
|
15
|
+
* (passing `settle` bound to `settleStoredGrants` when it wants stored grants
|
|
16
|
+
* replayed). It runs no workers and no poller of its own.
|
|
17
|
+
* - `tufa ipex poll` has no running runtime, so it runs the workers itself
|
|
18
|
+
* (`withRuntimeWorkers` plus a mailbox poller whose batches pass through
|
|
19
|
+
* {@link MailboxIntakeTally.track}) around the same wait.
|
|
20
|
+
*
|
|
21
|
+
* Dependencies are narrow collaborators, not an AgentRuntime (ADR-0013).
|
|
22
|
+
*/
|
|
23
|
+
import type { SerderKERI, Versionage } from "cesr-ts";
|
|
24
|
+
import { type Operation } from "effection";
|
|
25
|
+
import type { Reger } from "../../db/reger.js";
|
|
26
|
+
import type { Habery } from "../identity/habbing.js";
|
|
27
|
+
import type { ProtocolProcessor } from "../protocol/protocol-processing.js";
|
|
28
|
+
import { type RuntimeClock } from "../runtime/runtime-clock.js";
|
|
29
|
+
import type { WaitResult } from "../runtime/workflow-contract.js";
|
|
30
|
+
import type { MailboxPollBatch } from "./mailbox-poller.js";
|
|
31
|
+
/** Stores the status read inspects. A `Habery` and a `Reger` fit. */
|
|
32
|
+
export interface IpexArrivalDeps {
|
|
33
|
+
/** Accepted exchange messages. */
|
|
34
|
+
readonly hby: Pick<Habery, "db">;
|
|
35
|
+
/** Saved credential index. */
|
|
36
|
+
readonly reger: Pick<Reger, "saved">;
|
|
37
|
+
}
|
|
38
|
+
/** Collaborators for replaying stored grants. */
|
|
39
|
+
export interface StoredGrantSettleDeps extends IpexArrivalDeps {
|
|
40
|
+
/** Needs the full `Habery`: stored artifacts are rebuilt from its escrow paths. */
|
|
41
|
+
readonly hby: Habery;
|
|
42
|
+
/** Receive processor that accepts the replayed grant artifacts. */
|
|
43
|
+
readonly protocol: ProtocolProcessor;
|
|
44
|
+
}
|
|
45
|
+
/** Said sets taken before waiting; arrivals are everything beyond them. */
|
|
46
|
+
export interface IpexBaseline {
|
|
47
|
+
readonly exns: ReadonlySet<string>;
|
|
48
|
+
readonly saved: ReadonlySet<string>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Counts mailbox batches a host has consumed and whether one is still settling.
|
|
52
|
+
* Process-local: it describes this host's intake, so it is not part of any durable
|
|
53
|
+
* status. A wallet that does not track batches simply omits it.
|
|
54
|
+
*/
|
|
55
|
+
export declare class MailboxIntakeTally {
|
|
56
|
+
receiving: number;
|
|
57
|
+
batches: number;
|
|
58
|
+
messages: number;
|
|
59
|
+
/** Run the host's settle step for one batch, counting it when settled. */
|
|
60
|
+
track(batch: MailboxPollBatch, settle: () => Operation<void>): Operation<void>;
|
|
61
|
+
}
|
|
62
|
+
/** What arrived since the baseline. `arrived` once new state exists and no batch is mid-settle. */
|
|
63
|
+
export interface IpexArrivalStatus {
|
|
64
|
+
state: "waiting" | "arrived";
|
|
65
|
+
/** New accepted `/ipex/` exchange messages, in store order. */
|
|
66
|
+
ipex: SerderKERI[];
|
|
67
|
+
/** Said of each newly saved credential. */
|
|
68
|
+
saved: string[];
|
|
69
|
+
/** True while the host's tally has a batch mid-settle (state may be partially visible). */
|
|
70
|
+
receiving: boolean;
|
|
71
|
+
}
|
|
72
|
+
/** Options for {@link waitForIpexArrival}. */
|
|
73
|
+
export interface WaitForIpexArrivalOptions {
|
|
74
|
+
/** Wall-clock budget. */
|
|
75
|
+
timeoutMs: number;
|
|
76
|
+
/** Host intake tally; when omitted no batch is ever considered mid-settle. */
|
|
77
|
+
tally?: MailboxIntakeTally;
|
|
78
|
+
/** Elapsed milliseconds between reads. */
|
|
79
|
+
pollMs?: number;
|
|
80
|
+
clock?: RuntimeClock;
|
|
81
|
+
}
|
|
82
|
+
/** Deps and host hook for {@link waitForIpexArrival}. */
|
|
83
|
+
export interface IpexArrivalWaitDeps extends IpexArrivalDeps {
|
|
84
|
+
/** Host-supplied step run before each read, such as `settleStoredGrants`. */
|
|
85
|
+
readonly settle?: () => Operation<void>;
|
|
86
|
+
}
|
|
87
|
+
/** Snapshot the said sets that later arrivals are measured against. */
|
|
88
|
+
export declare function ipexBaseline(deps: IpexArrivalDeps): IpexBaseline;
|
|
89
|
+
/** Pure read of what arrived since `baseline`. Starts nothing and writes nothing. */
|
|
90
|
+
export declare function ipexArrivalStatus(deps: IpexArrivalDeps, baseline: IpexBaseline, tally?: MailboxIntakeTally): IpexArrivalStatus;
|
|
91
|
+
/**
|
|
92
|
+
* Replay accepted grant artifacts whose credential is not yet saved, so a grant
|
|
93
|
+
* stored before the credential arrived settles once its evidence is complete.
|
|
94
|
+
*/
|
|
95
|
+
export declare function settleStoredGrants(deps: StoredGrantSettleDeps, gvrsn?: Versionage): Operation<void>;
|
|
96
|
+
/**
|
|
97
|
+
* Observe until new IPEX state has arrived and settled, or the budget expires.
|
|
98
|
+
* Runs `deps.settle` before each read; starts no worker.
|
|
99
|
+
*
|
|
100
|
+
* @returns `settled` with the arrival, or `timed-out` with the last read (which
|
|
101
|
+
* may already hold arrivals that were still mid-settle).
|
|
102
|
+
*/
|
|
103
|
+
export declare function waitForIpexArrival(deps: IpexArrivalWaitDeps, baseline: IpexBaseline, { timeoutMs, tally, pollMs, clock }: WaitForIpexArrivalOptions): Operation<WaitResult<IpexArrivalStatus>>;
|
|
104
|
+
//# sourceMappingURL=ipex-arrival.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ipex-arrival.d.ts","sourceRoot":"","sources":["../../../src/app/mailbox/ipex-arrival.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAOrD,OAAO,KAAK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AAE,OAAO,CAAC;CACpB;AAED,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAED,yDAAyD;AACzD,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC;CACzC;AAUD,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,IAAI,EAAE,eAAe,GAAG,YAAY,CAKhE;AAED,qFAAqF;AACrF,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,eAAe,EACrB,QAAQ,EAAE,YAAY,EACtB,KAAK,CAAC,EAAE,kBAAkB,GACzB,iBAAiB,CAYnB;AAED;;;GAGG;AACH,wBAAiB,kBAAkB,CAAC,IAAI,EAAE,qBAAqB,EAAE,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,IAAI,CAAC,CAOpG;AAED;;;;;;GAMG;AACH,wBAAiB,kBAAkB,CACjC,IAAI,EAAE,mBAAmB,EACzB,QAAQ,EAAE,YAAY,EACtB,EAAE,SAAS,EAAE,KAAK,EAAE,MAAY,EAAE,KAAmB,EAAE,EAAE,yBAAyB,GACjF,SAAS,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAU1C"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pushing an identifier's KEL to its mailboxes as a runtime reaction: after a rotation completes, every
|
|
3
|
+
* configured, active mailbox is told the new key state, because a mailbox authenticates the owner's polls
|
|
4
|
+
* against the KEL it holds.
|
|
5
|
+
*
|
|
6
|
+
* The durable state is one record per (identifier, mailbox), `Baser.kpub`: the establishment event whose KEL
|
|
7
|
+
* the mailbox last answered 2xx for, and, when publishing used up its budget, the event it gave up on. A
|
|
8
|
+
* pass derives what is owed: for each local identifier (groups included) and each mailbox it has an
|
|
9
|
+
* authorized role with and a URL for, a post is owed unless the record shows the identifier's latest
|
|
10
|
+
* establishment event. A {@link RotatedCue} only marks the identifier for the next tock, so a lost cue, a bare `Hab.rotate`, a
|
|
11
|
+
* member that did not sign a group event, a crash and a one-shot CLI host are all found by derivation. A
|
|
12
|
+
* crash between the post and the record costs one harmless resend, since a host drops duplicate events.
|
|
13
|
+
*
|
|
14
|
+
* An event is published only once it is complete: fully witnessed and, for a delegated identifier, its
|
|
15
|
+
* authorizing source seal is stored (`Baser.aess`). Witnesses are not told; receipting already gives them
|
|
16
|
+
* the event.
|
|
17
|
+
*
|
|
18
|
+
* A failed post is retried with a doubling delay up to {@link KEL_PUBLISH_MAX_DELAY_MS}, in memory, and given
|
|
19
|
+
* up when the next attempt would start more than {@link KEL_PUBLISH_BUDGET_MS} after the first. Giving up
|
|
20
|
+
* writes `failed` to the record and a change to the sink. A timed-out entry is not retried on its own: a new
|
|
21
|
+
* rotation, a successful poll of that mailbox (the mailbox is evidently back), a successful 403 repair, a
|
|
22
|
+
* `prompt`, or the next runtime open (memory starts empty, so each owed entry gets a fresh budget) re-arms it.
|
|
23
|
+
* A host that cannot take a multi-message stream (KERIpy answers 400 or 406) is recorded as told: it does
|
|
24
|
+
* not authenticate polls, so nothing is lost.
|
|
25
|
+
*/
|
|
26
|
+
import { type Operation } from "effection";
|
|
27
|
+
import type { RotatedCue } from "../../core/cues.js";
|
|
28
|
+
import { Deck } from "../../core/deck.js";
|
|
29
|
+
import { type DoerPacing } from "../runtime/doing.js";
|
|
30
|
+
import type { RetryPolicy } from "../runtime/retry-backoff.js";
|
|
31
|
+
import type { RuntimeClock } from "../runtime/runtime-clock.js";
|
|
32
|
+
import { type ChangeSink, type WaitResult } from "../runtime/workflow-contract.js";
|
|
33
|
+
import { type KelPublishingDeps, type MailboxPublication } from "./kel-publishing.js";
|
|
34
|
+
/** Most posts one `processOnce` attempts, so a first pass over a large store cannot stall the fiber. */
|
|
35
|
+
export declare const KelSendsPerPass = 4;
|
|
36
|
+
/** Delay after a post's first failure; doubles per attempt up to {@link KEL_PUBLISH_MAX_DELAY_MS}. */
|
|
37
|
+
export declare const KEL_PUBLISH_BASE_MS = 1000;
|
|
38
|
+
export declare const KEL_PUBLISH_MAX_DELAY_MS = 60000;
|
|
39
|
+
/** Give up when the next attempt would start more than this long after the first. */
|
|
40
|
+
export declare const KEL_PUBLISH_BUDGET_MS = 300000;
|
|
41
|
+
/** The production retry policy of KEL posts: `boundMs` is the budget. */
|
|
42
|
+
export declare const DEFAULT_KEL_PUBLISH_RETRY: Readonly<RetryPolicy>;
|
|
43
|
+
/** Milliseconds between publisher passes; retries start at one second, so a finer tock buys nothing. */
|
|
44
|
+
export declare const KEL_PUBLISHER_TOCK_MS = 250;
|
|
45
|
+
/** Tocks between full sweeps of every identifier: 240 tocks of 250 ms is a minute. */
|
|
46
|
+
export declare const KEL_PUBLISHER_SWEEP_TOCKS = 240;
|
|
47
|
+
/** The production pacing of the publisher fiber. */
|
|
48
|
+
export declare const KEL_PUBLISHER_PACING: Readonly<DoerPacing>;
|
|
49
|
+
/** Collaborators of the publisher. */
|
|
50
|
+
export interface KelPublisherDeps extends KelPublishingDeps {
|
|
51
|
+
/** Optional sink told `{kind:"event", id:"<pre>:<sn>"}` after each attempt and when a publication is given up. */
|
|
52
|
+
readonly changes?: ChangeSink;
|
|
53
|
+
/** Retry delays of a failed post, and the budget after which it is given up; {@link DEFAULT_KEL_PUBLISH_RETRY} when absent. */
|
|
54
|
+
readonly retry?: Readonly<RetryPolicy>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Where one (identifier, mailbox) stands: `published` (the record shows the latest establishment event),
|
|
58
|
+
* `pending` (owed, being sent or waiting out a retry delay), `waiting` (owed but gated: unwitnessed,
|
|
59
|
+
* unanchored or no URL) or `timed-out` (given up in this process; see the module comment for what re-arms it).
|
|
60
|
+
*/
|
|
61
|
+
export interface KelPublicationStatus {
|
|
62
|
+
readonly pre: string;
|
|
63
|
+
readonly mailbox: string;
|
|
64
|
+
readonly state: "published" | "pending" | "waiting" | "timed-out";
|
|
65
|
+
/** The establishment event the identifier's mailboxes should hold. */
|
|
66
|
+
readonly said: string;
|
|
67
|
+
readonly attempts: number;
|
|
68
|
+
readonly lastFailure?: string;
|
|
69
|
+
/** When the next attempt is due (ISO-8601), for a pending entry that has failed. */
|
|
70
|
+
readonly retryAt?: string;
|
|
71
|
+
}
|
|
72
|
+
/** Every (identifier, mailbox) pair, derived from the stores at the time of the read. */
|
|
73
|
+
export interface KelPublisherStatus {
|
|
74
|
+
readonly entries: readonly KelPublicationStatus[];
|
|
75
|
+
}
|
|
76
|
+
/** Derives, sends and records the KEL posts a wallet's identifiers owe their mailboxes. */
|
|
77
|
+
export declare class KelPublisher {
|
|
78
|
+
#private;
|
|
79
|
+
/** Completion points push here; the next tock gives that identifier's entries a fresh budget. */
|
|
80
|
+
readonly rotated: Deck<RotatedCue>;
|
|
81
|
+
/** A failure that escapes a pass is counted and kept here; the fiber keeps running. */
|
|
82
|
+
readonly health: {
|
|
83
|
+
faults: number;
|
|
84
|
+
last: {
|
|
85
|
+
error: unknown;
|
|
86
|
+
at: number;
|
|
87
|
+
} | null;
|
|
88
|
+
};
|
|
89
|
+
constructor(deps: KelPublisherDeps);
|
|
90
|
+
/**
|
|
91
|
+
* Give `pre`'s entries a fresh budget and derive them on the next tock; with `mailbox`, re-arm only that mailbox's
|
|
92
|
+
* entry, and only if it timed out (the poller calls this after a successful poll).
|
|
93
|
+
*/
|
|
94
|
+
prompt(pre: string, mailbox?: string): void;
|
|
95
|
+
/**
|
|
96
|
+
* A mailbox refused the owner's poll with 403: whatever the record says it holds, it cannot authenticate
|
|
97
|
+
* the owner (it lost its state, or accepted a post it then escrowed). Forget what it was given, so the next
|
|
98
|
+
* pass posts the KEL again, and give the entry a fresh budget. The poller calls this at most once per backoff
|
|
99
|
+
* period, which is also the most this posts; a mailbox that never recovers is given up on like any other.
|
|
100
|
+
*/
|
|
101
|
+
repair(pre: string, mailbox: string): void;
|
|
102
|
+
/**
|
|
103
|
+
* The full check: forget records of mailboxes no longer authorized, and mark every identifier for derivation.
|
|
104
|
+
* A walk of all identifiers, so a host runs it at open and every many tocks.
|
|
105
|
+
*/
|
|
106
|
+
sweep(): void;
|
|
107
|
+
/**
|
|
108
|
+
* The fixed-tock pass: drain the cues, derive the marked identifiers and those still owed, then send up to
|
|
109
|
+
* {@link KelSendsPerPass} due posts, each within `timeoutMs` for the mailbox's answer. An idle pass reads no
|
|
110
|
+
* store. A post is recorded when the mailbox answers 2xx; a failure is retried on the schedule until the budget
|
|
111
|
+
* is used up. Never throws on a remote failure; every attempt is returned.
|
|
112
|
+
*/
|
|
113
|
+
processDue({ timeoutMs }?: {
|
|
114
|
+
timeoutMs?: number;
|
|
115
|
+
}): Operation<MailboxPublication[]>;
|
|
116
|
+
/** A sweep and a pass: what a one-shot host, or a test, runs once. */
|
|
117
|
+
processOnce(options?: {
|
|
118
|
+
timeoutMs?: number;
|
|
119
|
+
}): Operation<MailboxPublication[]>;
|
|
120
|
+
/** Pure read of every (identifier, mailbox) pair and where it stands. */
|
|
121
|
+
status(): KelPublisherStatus;
|
|
122
|
+
/** Pure read of one identifier's mailboxes; the cheap read for a wait on a single identifier. */
|
|
123
|
+
statusOf(pre: string): KelPublicationStatus[];
|
|
124
|
+
/**
|
|
125
|
+
* Observe until every mailbox of `pre` is `published` or `timed-out`, or the deadline passes. Starts no
|
|
126
|
+
* worker: the runtime's publisher fiber (or a host's own `processOnce`) makes the progress. A waiting entry
|
|
127
|
+
* (unwitnessed, unanchored, no URL) keeps the wait open.
|
|
128
|
+
*/
|
|
129
|
+
waitForPublication(pre: string, { timeoutMs, pollMs }: {
|
|
130
|
+
timeoutMs: number;
|
|
131
|
+
pollMs?: number;
|
|
132
|
+
}): Operation<WaitResult<KelPublisherStatus>>;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Run the publisher on its own fiber until halted, as a fixed-tock doer: a sweep on tock 0 and every
|
|
136
|
+
* `pacing.sweepTocks`, a pass on every tock, then a wait of one tock. A mailbox that hangs holds up only this
|
|
137
|
+
* fiber, never the operation owners. A failure that escapes a pass is counted in `publisher.health` and the
|
|
138
|
+
* loop keeps running.
|
|
139
|
+
*/
|
|
140
|
+
export declare function kelPublisherDo(publisher: KelPublisher, clock: RuntimeClock, pacing?: Readonly<DoerPacing>): Operation<never>;
|
|
141
|
+
//# sourceMappingURL=kel-publisher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kel-publisher.d.ts","sourceRoot":"","sources":["../../../src/app/mailbox/kel-publisher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,OAAO,EAAE,KAAK,UAAU,EAAW,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,KAAK,UAAU,EAAgB,KAAK,UAAU,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAGxB,MAAM,qBAAqB,CAAC;AAG7B,wGAAwG;AACxG,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,sGAAsG;AACtG,eAAO,MAAM,mBAAmB,OAAQ,CAAC;AACzC,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAC/C,qFAAqF;AACrF,eAAO,MAAM,q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AO,CAAC;YAAC,EAAE,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAA;KAAE,CAA6B;gBASjG,IAAI,EAAE,gBAAgB;IAIlC;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAW3C;;;;;OAKG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAO1C;;;OAGG;IACH,KAAK,IAAI,IAAI;IAOb;;;;;OAKG;IACF,UAAU,CAAC,EAAE,SAAyC,EAAE,GAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,SAAS,CAChG,kBAAkB,EAAE,CACrB;IAkCD,sEAAsE;IACrE,WAAW,CAAC,OAAO,GAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,SAAS,CAAC,kBAAkB,EAAE,CAAC;IAKnF,yEAAyE;IACzE,MAAM,IAAI,kBAAkB;IAK5B,iGAAiG;IACjG,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,EAAE;IA4B7C;;;;OAIG;IACF,kBAAkB,CACjB,GAAG,EAAE,MAAM,EACX,EAAE,SAAS,EAAE,MAAW,EAAE,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GACjE,SAAS,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;CAqG7C;AAED;;;;;GAKG;AACH,wBAAiB,cAAc,CAC7B,SAAS,EAAE,YAAY,EACvB,KAAK,EAAE,YAAY,EACnB,MAAM,GAAE,QAAQ,CAAC,UAAU,CAAwB,GAClD,SAAS,CAAC,KAAK,CAAC,CAUlB"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Telling a mailbox host an identifier's KEL. A host authenticates a mailbox poll against the key state it
|
|
3
|
+
* holds, which is only as new as the last KEL it was given, so a rotation it has not been told about makes it
|
|
4
|
+
* refuse the owner's polls. The publisher (`KelPublisher`) and the poller's repair of a refusing mailbox use
|
|
5
|
+
* the one post below and record it in the same marker, `Baser.kpub`.
|
|
6
|
+
*/
|
|
7
|
+
import { type Operation } from "effection";
|
|
8
|
+
import type { Baser } from "../../db/basing.js";
|
|
9
|
+
import type { Habery } from "../identity/habbing.js";
|
|
10
|
+
import type { RuntimeClock } from "../runtime/runtime-clock.js";
|
|
11
|
+
import type { HttpClient } from "../transport/http-client.js";
|
|
12
|
+
/** Longest a mailbox may take to answer the post, in milliseconds. */
|
|
13
|
+
export declare const KEL_PUBLISH_HEADER_TIMEOUT_MS = 10000;
|
|
14
|
+
/** What posting the KEL to one mailbox came to; a failure carries its reason (and status) and is never thrown. */
|
|
15
|
+
export type MailboxPublication = {
|
|
16
|
+
readonly mailbox: string;
|
|
17
|
+
readonly outcome: "told";
|
|
18
|
+
} | {
|
|
19
|
+
readonly mailbox: string;
|
|
20
|
+
readonly outcome: "failed";
|
|
21
|
+
readonly reason: string;
|
|
22
|
+
readonly status?: number;
|
|
23
|
+
};
|
|
24
|
+
/** Collaborators the post needs; nothing else is reachable from here. */
|
|
25
|
+
export interface KelPublishingDeps {
|
|
26
|
+
/** Borrowed identities and accepted-state stores. */
|
|
27
|
+
readonly hby: Habery;
|
|
28
|
+
/** Borrowed HTTP implementation. */
|
|
29
|
+
readonly http: HttpClient;
|
|
30
|
+
/** Borrowed clock for the header deadline. */
|
|
31
|
+
readonly clock: RuntimeClock;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Post the KEL replay of `pre` (delegation chain, KEL and the receipts stored for it) to one mailbox's CESR
|
|
35
|
+
* ingress, with `CESR-DESTINATION` selecting the hosted mailbox. A separate request, never prefixed to a poll:
|
|
36
|
+
* a host answers with the response to the first message of a body.
|
|
37
|
+
*/
|
|
38
|
+
export declare function postKelToMailbox({ hby, http, clock }: KelPublishingDeps, pre: string, endpoint: {
|
|
39
|
+
eid: string;
|
|
40
|
+
url: string;
|
|
41
|
+
}, { timeoutMs }?: {
|
|
42
|
+
timeoutMs?: number;
|
|
43
|
+
}): Operation<MailboxPublication>;
|
|
44
|
+
/**
|
|
45
|
+
* The establishment events a mailbox must hold to authenticate `pre`: the identifier's own latest one and, for
|
|
46
|
+
* a local group, the local signing member's, because the member signs the group's polls and the host needs its
|
|
47
|
+
* key state to verify them. `collectKelSubmission` is the one place that decides what the post carries; these
|
|
48
|
+
* heads are what the record is compared with.
|
|
49
|
+
*/
|
|
50
|
+
export declare function kelHeads(hby: Habery, pre: string): {
|
|
51
|
+
d: string;
|
|
52
|
+
m?: string;
|
|
53
|
+
} | null;
|
|
54
|
+
/**
|
|
55
|
+
* Record that `mailbox` was given the KEL of `pre` up to `heads`, and clear any earlier give-up. The record holds
|
|
56
|
+
* coordinates only; the publisher derives what is owed by comparing it with the identifier's current heads.
|
|
57
|
+
*/
|
|
58
|
+
export declare function pinKelPublished(db: Baser, pre: string, mailbox: string, heads: {
|
|
59
|
+
d: string;
|
|
60
|
+
m?: string;
|
|
61
|
+
}, clock: Pick<RuntimeClock, "now">): void;
|
|
62
|
+
/** Whether `record` shows the mailbox holds `heads`. */
|
|
63
|
+
export declare function holdsHeads(record: {
|
|
64
|
+
d: string | null;
|
|
65
|
+
m?: string;
|
|
66
|
+
} | null, heads: {
|
|
67
|
+
d: string;
|
|
68
|
+
m?: string;
|
|
69
|
+
}): boolean;
|
|
70
|
+
//# sourceMappingURL=kel-publishing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kel-publishing.d.ts","sourceRoot":"","sources":["../../../src/app/mailbox/kel-publishing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,KAAK,SAAS,EAAU,MAAM,WAAW,CAAC;AACnD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAA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G,IAAI,CAMnF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,EAAE,EAAE,KAAK,EACT,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,KAAK,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAChC,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,GAC/B,IAAI,CAMN;AAED,wDAAwD;AACxD,wBAAgB,UAAU,CAAC,MAAM,EAAE;IAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,EAAE,KAAK,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAErH"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Habery } from "../identity/habbing.js";
|
|
2
|
+
/** Replay material in both the normalized and legacy multipart shapes. */
|
|
3
|
+
export interface KelSubmission {
|
|
4
|
+
/** Verifier-ready stream for the raw CESR body: delegation chain then KEL, with the receipts stored for it. */
|
|
5
|
+
readonly replay: Uint8Array;
|
|
6
|
+
readonly kel: Uint8Array;
|
|
7
|
+
readonly delkel: Uint8Array;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Collect the accepted KEL of `pre`, and its delegation chain, from the local stores. When `pre` is a local
|
|
11
|
+
* group the KEL of the local member that signs for it comes first, so a host that authenticates the member's
|
|
12
|
+
* mailbox polls learns the member's key state, including a rotation of its own, along with the group's.
|
|
13
|
+
*
|
|
14
|
+
* `replay` is the verifier-ready stream used by raw CESR ingress. `kel`/`delkel` preserve the legacy
|
|
15
|
+
* multipart wrapper contract used by existing KERIpy mailbox admin hosts.
|
|
16
|
+
*/
|
|
17
|
+
export declare function collectKelSubmission(hby: Habery, pre: string): KelSubmission;
|
|
18
|
+
//# sourceMappingURL=kel-submission.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kel-submission.d.ts","sourceRoot":"","sources":["../../../src/app/mailbox/kel-submission.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGrD,0EAA0E;AAC1E,MAAM,WAAW,aAAa;IAC5B,+GAA+G;IAC/G,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;CAC7B;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,CAY5E"}
|