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,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Group DH issuance steps for the runtime's `IssuanceOperations` owner.
|
|
3
|
+
*
|
|
4
|
+
* A local group issues (or receives) a v2 DH credential through the same live table, status read and wait as an
|
|
5
|
+
* individual. This module holds what is specific to a group: the explicit consent calls, the per-operation
|
|
6
|
+
* state machine that `IssuanceOperations.processOnce` advances, and the child handler that lets the
|
|
7
|
+
* `/multisig/qry` and `/multisig/rpy` wrappers of DH reach it.
|
|
8
|
+
*
|
|
9
|
+
* Consent (the only calls that sign, each returning after local commit without waiting on a member):
|
|
10
|
+
*
|
|
11
|
+
* | who | call | what it signs |
|
|
12
|
+
* | ----------------------------- | ----------------------------------------- | --------------------------------------------------- |
|
|
13
|
+
* | issuer custodian, prepare | {@link prepareGroupIssuance} | the custodian's contribution to a fresh Grant |
|
|
14
|
+
* | issuer custodian, one consent | {@link proposeGroupIssuance} | prepare, then approve its own proposal |
|
|
15
|
+
* | issuer member | {@link approveGroupIssuance} | this member's Grant contribution, and consent to its later DH query contribution |
|
|
16
|
+
* | holder custodian or member | {@link approveGroupIssuanceExchange} | consent to DH (contributions follow as they arrive) |
|
|
17
|
+
* | a member that only follows | {@link followGroupIssuanceProof} | nothing; verifies the custodian's final proof |
|
|
18
|
+
*
|
|
19
|
+
* The registry update is a separate consent: the custodian proposes the BUP through `proposeRegistryEvent`
|
|
20
|
+
* (its own contribution is its approval) and every other issuer member approves that proposal with
|
|
21
|
+
* `approveGroupProposal`. Admit is a separate consent as well.
|
|
22
|
+
*
|
|
23
|
+
* Automatic, inside `processOnce`: sending a member's own proposal, authenticating the Grant, approving DH once
|
|
24
|
+
* the Grant is authenticated, the custodian's evidence, query and reply traffic, wrapper intake, finishing the
|
|
25
|
+
* Grant and the proof broadcast to the other members. Root copies are not sent here: the DH completion cue
|
|
26
|
+
* feeds the runtime's `RootReplicator`, which sends exactly one copy per member.
|
|
27
|
+
*
|
|
28
|
+
* Reload: nothing about a group operation is durable but the protocol stores. A member that reloads reads
|
|
29
|
+
* `awaitingExchangeConsent` for a pending Grant it holds no root for and consents again with the same call;
|
|
30
|
+
* its signatures are deterministic, so consenting twice produces the same bytes. A custodian that reloaded
|
|
31
|
+
* after retaining its root resumes when the stores allow it ({@link deriveGroupCustody}).
|
|
32
|
+
*/
|
|
33
|
+
import { type CesrFrame, SerderACDC, SerderKERI } from "cesr-ts";
|
|
34
|
+
import { type Operation } from "effection";
|
|
35
|
+
import { type RegistryEventRef } from "../credentials/registry-settling.js";
|
|
36
|
+
import type { Exchanger, ExchangeRouteHandler } from "../exchanges/exchanging.js";
|
|
37
|
+
import type { Hab, Habery } from "../identity/habbing.js";
|
|
38
|
+
import type { CounselInputs } from "../multisig/counseling.js";
|
|
39
|
+
import { type GroupCoordinator } from "../multisig/group-members.js";
|
|
40
|
+
import { type Multiplexor, type MultisigChildRoute } from "../multisig/grouping.js";
|
|
41
|
+
import { type RegistryProposeDeps } from "../multisig/proposing.js";
|
|
42
|
+
import { type GrantDraft, type IssuanceBegun, type IssuanceDeps, type IssuanceOperations, type IssuanceRole, type LiveIssuance } from "./issuance.js";
|
|
43
|
+
/** One DH child route and the handler that delegates its wrappers to this owner. */
|
|
44
|
+
export type GroupRouteBinding = [route: string, handler: ExchangeRouteHandler];
|
|
45
|
+
/** Collaborators only a group needs; an owner without them issues as an individual alone. */
|
|
46
|
+
export interface GroupIssuanceDeps {
|
|
47
|
+
/** Where the DH child wrappers (`/multisig/qry`, `/multisig/rpy`) are delegated; one owner per runtime registers. */
|
|
48
|
+
readonly mux: Pick<Multiplexor, "addChildHandler" | "removeChildHandler">;
|
|
49
|
+
/** Collaborators of the custodian's registry update proposal. */
|
|
50
|
+
readonly registry: RegistryProposeDeps;
|
|
51
|
+
}
|
|
52
|
+
/** A prepared Grant and the proposal the other issuer members consent to. */
|
|
53
|
+
export interface PreparedGroupGrant {
|
|
54
|
+
grant: string;
|
|
55
|
+
proposal: Uint8Array;
|
|
56
|
+
}
|
|
57
|
+
/** The custodian a group's accepted coordinator elects, and whether the local member is it. */
|
|
58
|
+
export interface GroupElection {
|
|
59
|
+
coordinator: GroupCoordinator;
|
|
60
|
+
/** AID of the elected member that generates and retains the DH keys. */
|
|
61
|
+
custodian: string;
|
|
62
|
+
lead: boolean;
|
|
63
|
+
}
|
|
64
|
+
/** Choices of a group member's consent to a Grant. */
|
|
65
|
+
export interface GroupConsentOptions {
|
|
66
|
+
/** SAID of the accepted group event whose threshold evidence elects the custodian; default the latest establishment. */
|
|
67
|
+
coordinator?: string;
|
|
68
|
+
/** Witness codes and counseling choices for the registry update's anchor; the CLI passes `fallbackAfterMs: 0`. */
|
|
69
|
+
anchor?: CounselInputs;
|
|
70
|
+
}
|
|
71
|
+
/** Choices of an issuer member's approval of a stored or supplied Grant proposal. */
|
|
72
|
+
export interface GroupApprovalOptions extends GroupConsentOptions {
|
|
73
|
+
/** The proposal as bytes; omitted: the stored proposal wrapper. */
|
|
74
|
+
proposal?: Uint8Array;
|
|
75
|
+
}
|
|
76
|
+
/** Choices of following a group issuance to its final proof. */
|
|
77
|
+
export interface GroupFollowOptions {
|
|
78
|
+
coordinator?: string;
|
|
79
|
+
/** The custodian's final proof as bytes; omitted: the proof wrapper the mailbox stored. */
|
|
80
|
+
proof?: Uint8Array;
|
|
81
|
+
}
|
|
82
|
+
/** A stored Grant proposal a member may consent to. */
|
|
83
|
+
export interface GroupIssuanceProposal {
|
|
84
|
+
/** SAID of the Grant to pass to {@link approveGroupIssuance}. */
|
|
85
|
+
grant: string;
|
|
86
|
+
/** SAID of the `/multisig/exn` wrapper that carries it. */
|
|
87
|
+
wrapper: string;
|
|
88
|
+
/** The group that issues. */
|
|
89
|
+
group: string;
|
|
90
|
+
/** AID of the member that proposed it. */
|
|
91
|
+
proposer: string;
|
|
92
|
+
recipient: string;
|
|
93
|
+
/** True once this member's runtime holds the accepted Grant, so nothing is left to consent to. */
|
|
94
|
+
complete: boolean;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* The local member of a group as one party to a group issuance: the group, the member that signs for it, and the
|
|
98
|
+
* custodian its accepted coordinator elects. Resolving checks everything a consent relies on once, so no later step
|
|
99
|
+
* re-derives it. Not exported from the runtime barrel.
|
|
100
|
+
*/
|
|
101
|
+
export declare class GroupParty {
|
|
102
|
+
readonly hby: Habery;
|
|
103
|
+
readonly group: Hab;
|
|
104
|
+
readonly member: Hab;
|
|
105
|
+
readonly coordinator: GroupCoordinator;
|
|
106
|
+
readonly custodian: string;
|
|
107
|
+
private constructor();
|
|
108
|
+
/**
|
|
109
|
+
* The party of `group` under `coordinator` (default the group's latest establishment event).
|
|
110
|
+
*
|
|
111
|
+
* @throws ValidationError for an owner composed without group collaborators, an identifier that is not a local
|
|
112
|
+
* group, or a coordinator that is not an accepted event electing a current signing member.
|
|
113
|
+
*/
|
|
114
|
+
static resolve(deps: IssuanceDeps, group: Hab, coordinator?: string): GroupParty;
|
|
115
|
+
/** Whether the local member is the elected custodian. */
|
|
116
|
+
get lead(): boolean;
|
|
117
|
+
/** The other current signing members of the group. */
|
|
118
|
+
others(): string[];
|
|
119
|
+
/** The election this party stands for. */
|
|
120
|
+
election(): GroupElection;
|
|
121
|
+
/** Wrap `child` for the other members; the parent authenticates one exact child and never supplies its threshold. */
|
|
122
|
+
wrap(child: CesrFrame, route: MultisigChildRoute): Operation<Uint8Array>;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Pure read of a group's election under `coordinator` (default its latest establishment event): who is the
|
|
126
|
+
* custodian and whether the local member is it.
|
|
127
|
+
*
|
|
128
|
+
* @throws ValidationError as {@link GroupParty.resolve}.
|
|
129
|
+
*/
|
|
130
|
+
export declare function groupIssuanceElection(ops: IssuanceOperations, group: string, coordinator?: string): GroupElection;
|
|
131
|
+
/** What deriving a custodian reads: the identities and the retained Grant. */
|
|
132
|
+
export interface CustodyDeps {
|
|
133
|
+
hby: Habery;
|
|
134
|
+
exc: Exchanger;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* The party a restarted group custodian was frozen with, derived from the stores. The local member is the
|
|
138
|
+
* custodian when it holds the root of every registry the Grant discloses and received none of them as a copy: a
|
|
139
|
+
* root reaches a non-custodian only as a stored `/registry/root` exchange addressed to it, so that exchange tells
|
|
140
|
+
* a member that was sent its copy from the member whose own DH exchange retained the root. The coordinator is the
|
|
141
|
+
* latest accepted group event whose threshold evidence elects that member; DH only checks that the frozen
|
|
142
|
+
* coordinator still elects the frozen custodian, so any such event serves. Null when the member received a copy
|
|
143
|
+
* of a disclosed root, holds none, or no accepted event elects it.
|
|
144
|
+
*/
|
|
145
|
+
export declare function deriveGroupCustody(deps: CustodyDeps, hab: Hab, grant: string): GroupElection | null;
|
|
146
|
+
/**
|
|
147
|
+
* Prepare the custodian's first partial Grant for a fresh credential, preserving the discloser's fresh-origin and
|
|
148
|
+
* far-node checks, and return the proposal the other issuer members consent to. Signs the custodian's Grant
|
|
149
|
+
* contribution and files it locally; sends nothing and approves no DH exchange. The group is the credential's
|
|
150
|
+
* managed registry's.
|
|
151
|
+
*
|
|
152
|
+
* @throws ValidationError unless the local member is the elected custodian of the group that owns the
|
|
153
|
+
* credential's registry.
|
|
154
|
+
*/
|
|
155
|
+
export declare function prepareGroupIssuance(ops: IssuanceOperations, draft: GrantDraft, coordinator?: string): Operation<PreparedGroupGrant>;
|
|
156
|
+
/**
|
|
157
|
+
* Stored Grant proposals, one per Grant, of `group` or of every local group. The wrapper kept is another member's
|
|
158
|
+
* where there is one (the proposal as received), and this member's own contribution otherwise.
|
|
159
|
+
*/
|
|
160
|
+
export declare function groupIssuanceProposals(ops: IssuanceOperations, group?: Hab): GroupIssuanceProposal[];
|
|
161
|
+
/**
|
|
162
|
+
* The issuer member's consent to a group Grant, and through it to contributing this member's signature to the DH
|
|
163
|
+
* query when the custodian's arrives. The group is the proposal's. Verifies the proposal (it must carry the
|
|
164
|
+
* elected custodian's signature) and rebuilds the exact Grant from its fresh inputs, signs this member's
|
|
165
|
+
* contribution, files it and records the operation. Returns after local commit: sending the contribution to the
|
|
166
|
+
* other members, and everything after, is `processOnce`.
|
|
167
|
+
*
|
|
168
|
+
* Calling it again after a reload produces the same signature and resumes the operation: a member that reloads
|
|
169
|
+
* between consent and completion consents again.
|
|
170
|
+
*
|
|
171
|
+
* @throws ValidationError for a proposal the stores do not prove, one the elected custodian did not sign, an
|
|
172
|
+
* operation already begun, or a Grant that differs from its exact fresh issuance inputs.
|
|
173
|
+
*/
|
|
174
|
+
export declare function approveGroupIssuance(ops: IssuanceOperations, grantSaid: string, options?: GroupApprovalOptions): Operation<IssuanceBegun>;
|
|
175
|
+
/**
|
|
176
|
+
* A custodian's one consent to issue a fresh credential: prepares the Grant ({@link prepareGroupIssuance}) and
|
|
177
|
+
* approves its own proposal ({@link approveGroupIssuance}). The other members approve the proposal it sent.
|
|
178
|
+
*/
|
|
179
|
+
export declare function proposeGroupIssuance(ops: IssuanceOperations, draft: GrantDraft, options?: GroupConsentOptions): Operation<IssuanceBegun>;
|
|
180
|
+
/**
|
|
181
|
+
* The holder group member's consent to DH for one authenticated pending Grant addressed to the group (the group is
|
|
182
|
+
* the Grant's recipient). Approves DH through the coordinator's election; the member's contribution to the reply,
|
|
183
|
+
* and for the custodian the keys, follow from `processOnce`. Admit is a separate consent.
|
|
184
|
+
*
|
|
185
|
+
* @throws ValidationError for a Grant that is not pending for a local group, or an operation already begun.
|
|
186
|
+
*/
|
|
187
|
+
export declare function approveGroupIssuanceExchange(ops: IssuanceOperations, said: string, coordinator?: string): IssuanceBegun;
|
|
188
|
+
/**
|
|
189
|
+
* Follow a group issuance that has already been contributed to, only to verify and accept the custodian's final
|
|
190
|
+
* proof: the file-free path of an issuer member that left after contributing and returns for the proof. The group
|
|
191
|
+
* is the Grant's sender. Signs nothing. The proof may already be stored (it arrives by mailbox), or be supplied as
|
|
192
|
+
* bytes.
|
|
193
|
+
*
|
|
194
|
+
* @throws ValidationError for a Grant this runtime's groups did not send, or one already begun.
|
|
195
|
+
*/
|
|
196
|
+
export declare function followGroupIssuanceProof(ops: IssuanceOperations, said: string, options?: GroupFollowOptions): Operation<IssuanceBegun>;
|
|
197
|
+
/**
|
|
198
|
+
* The custodian's exact public proof of a completed group issuance: the proof support and the
|
|
199
|
+
* `/multisig/ipex-proof` wrapper every other member received, read back from the stores. A copy for members that
|
|
200
|
+
* were away and for a file hand-off.
|
|
201
|
+
*
|
|
202
|
+
* @throws ValidationError unless the local member is the custodian of the Grant's sending group and has published
|
|
203
|
+
* the proof of an accepted Grant.
|
|
204
|
+
*/
|
|
205
|
+
export declare function groupIssuanceProof(ops: IssuanceOperations, said: string): Operation<Uint8Array>;
|
|
206
|
+
/** How a group issuance starts: consent from a proposal, only following the proof, or resumed after a restart. */
|
|
207
|
+
export type GroupIssuanceMode = "consent" | "proofOnly" | "resumed";
|
|
208
|
+
/** What starts one group issuance beyond its party, Grant and nodes. */
|
|
209
|
+
export interface GroupStart {
|
|
210
|
+
mode?: GroupIssuanceMode;
|
|
211
|
+
/** The member's own proposal wrapper still owed to the other members. */
|
|
212
|
+
proposal?: Uint8Array;
|
|
213
|
+
/** Witness codes and counseling choices for the registry update's anchor, memory only. */
|
|
214
|
+
anchor?: CounselInputs;
|
|
215
|
+
}
|
|
216
|
+
/** A proposal wrapper and the child it commits. */
|
|
217
|
+
export interface GroupProposalFrame {
|
|
218
|
+
parent: SerderKERI;
|
|
219
|
+
child: CesrFrame;
|
|
220
|
+
}
|
|
221
|
+
/** The per-operation state `IssuanceOperations` keeps for a group party; memory only. */
|
|
222
|
+
export declare class GroupIssuance {
|
|
223
|
+
readonly party: GroupParty;
|
|
224
|
+
readonly role: IssuanceRole;
|
|
225
|
+
readonly grant: SerderKERI;
|
|
226
|
+
readonly nodes: readonly CesrFrame[];
|
|
227
|
+
/** Wrappers received and not yet taken into DH, by SAID. */
|
|
228
|
+
readonly pending: Map<string, GroupWrapper>;
|
|
229
|
+
readonly seen: Set<string>;
|
|
230
|
+
approved: boolean;
|
|
231
|
+
contributed: boolean;
|
|
232
|
+
started: boolean;
|
|
233
|
+
/** Exact DH message this member contributes to, once frozen. */
|
|
234
|
+
frozen?: Uint8Array;
|
|
235
|
+
query?: Uint8Array;
|
|
236
|
+
nextQuery: number;
|
|
237
|
+
nextProofScan: number;
|
|
238
|
+
/** The custodian's registry update, once proposed. */
|
|
239
|
+
registryUpdate?: RegistryEventRef;
|
|
240
|
+
/** Proposal wrapper this member still owes the other members. */
|
|
241
|
+
proposal?: Uint8Array;
|
|
242
|
+
nodeBytes?: Uint8Array;
|
|
243
|
+
readonly mode: GroupIssuanceMode;
|
|
244
|
+
readonly anchor?: CounselInputs;
|
|
245
|
+
constructor(party: GroupParty, role: IssuanceRole, grant: SerderKERI, nodes: readonly CesrFrame[], start?: GroupStart);
|
|
246
|
+
/** SAID of the Grant. */
|
|
247
|
+
get said(): string;
|
|
248
|
+
/** DH transaction id: the opening Grant's SAID, or the transaction a continuation Grant joins. */
|
|
249
|
+
get xid(): string;
|
|
250
|
+
/** The other party: the holder (issuer role) or the issuer (holder role). */
|
|
251
|
+
get peer(): string;
|
|
252
|
+
/** The disclosed credential the Grant carries first. */
|
|
253
|
+
get origin(): SerderACDC;
|
|
254
|
+
/** The credential's registry. */
|
|
255
|
+
get registry(): string;
|
|
256
|
+
/** Whether `parent` is a DH child wrapper of this operation, beyond the structure every group wrapper has. */
|
|
257
|
+
accepts(parent: SerderKERI, children: readonly CesrFrame[]): boolean;
|
|
258
|
+
}
|
|
259
|
+
/** A DH wrapper and its child, kept until this member takes it into DH. */
|
|
260
|
+
export interface GroupWrapper {
|
|
261
|
+
wrapper: SerderKERI;
|
|
262
|
+
child: CesrFrame;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Delegate the DH child wrappers of `/multisig/qry` and `/multisig/rpy` to this owner, once. The delegation is
|
|
266
|
+
* structural: a wrapper that arrives before a member consents is kept as evidence and found by the operation
|
|
267
|
+
* when it starts, and consent alone ever makes a member contribute. Registration refuses a second owner on
|
|
268
|
+
* one runtime, which is the multiplexor's rule.
|
|
269
|
+
*/
|
|
270
|
+
export declare function registerGroupRoutes(ops: IssuanceOperations): void;
|
|
271
|
+
/** Release the delegation; a reopened runtime builds a new multiplexor, so this is for owners that outlive a phase. */
|
|
272
|
+
export declare function releaseGroupRoutes(ops: IssuanceOperations): void;
|
|
273
|
+
/**
|
|
274
|
+
* Advance one group operation by one pass; true once the Grant is accepted and nothing is left to do. Mirrors
|
|
275
|
+
* the order of the loop it replaces: own proposal, Grant authentication, DH approval, the custodian's evidence and
|
|
276
|
+
* query, wrapper intake and contribution, outgoing DH messages, the custodian's registry update, finish and proof.
|
|
277
|
+
* Every signature here is one the consent that began the operation covers; the registry update's approval by
|
|
278
|
+
* other members is not.
|
|
279
|
+
*/
|
|
280
|
+
export declare function stepGroup(ops: IssuanceOperations, op: LiveIssuance): Operation<boolean>;
|
|
281
|
+
//# sourceMappingURL=group-issuance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-issuance.d.ts","sourceRoot":"","sources":["../../../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
|
2
|
+
* IPEX Admit preparation over borrowed protocol owners.
|
|
3
|
+
*
|
|
4
|
+
* Reads accepted Grants and their graph truth from the Habery, Exchanger and
|
|
5
|
+
* registry store only; it records no admission. Embedders that keep admitted
|
|
6
|
+
* records (the wallet) call it before and after their own inventory writes.
|
|
7
|
+
*/
|
|
8
|
+
import { type SerderKERI, type Versionage } from "cesr-ts";
|
|
9
|
+
import { type Operation } from "effection";
|
|
10
|
+
import type { RegistryStore } from "../../acdc/registering.js";
|
|
11
|
+
import type { Exchanger } from "../exchanges/exchanging.js";
|
|
12
|
+
import type { Habery } from "../identity/habbing.js";
|
|
13
|
+
import type { Receiptor, WitnessAuthMap } from "../witness/receipting.js";
|
|
14
|
+
/** A signed response prepared after consent/current policy; intake and delivery remain caller-owned. */
|
|
15
|
+
export interface PreparedAdmit {
|
|
16
|
+
admit: SerderKERI;
|
|
17
|
+
wire: Uint8Array;
|
|
18
|
+
support: Uint8Array;
|
|
19
|
+
}
|
|
20
|
+
/** Borrow concrete owners only; no constructor opens a store or starts a worker. */
|
|
21
|
+
export declare class IpexAdmitter {
|
|
22
|
+
readonly hby: Habery;
|
|
23
|
+
readonly registry: RegistryStore;
|
|
24
|
+
readonly exc: Exchanger;
|
|
25
|
+
constructor(hby: Habery, registry: RegistryStore, exc: Exchanger);
|
|
26
|
+
/** Authenticate accepted outer evidence through existing replay, without current node policy. */
|
|
27
|
+
accepted(said: string, route: string): Promise<SerderKERI>;
|
|
28
|
+
/** New use requires current node evidence and a valid root under shared issued-state policy. */
|
|
29
|
+
graphAccepted(grant: string, origin: string): boolean;
|
|
30
|
+
/** Resolve only the origin actually carried by this accepted Grant. */
|
|
31
|
+
origin(grant: SerderKERI): string;
|
|
32
|
+
/** Freeze an unsigned response only after explicit consent, exact prior authentication and current root truth. */
|
|
33
|
+
prepareAdmitBody(grant: string, holder: string, { consent, message, gvrsn }?: {
|
|
34
|
+
consent?: boolean;
|
|
35
|
+
message?: string;
|
|
36
|
+
gvrsn?: Versionage;
|
|
37
|
+
}): Operation<SerderKERI>;
|
|
38
|
+
/** Sign an individual response; group approval consumes the same unsigned body through its own exact-stream owner. */
|
|
39
|
+
prepareAdmit(grant: string, holder: string, { consent, message, gvrsn, receiptor, auths }?: {
|
|
40
|
+
consent?: boolean;
|
|
41
|
+
message?: string;
|
|
42
|
+
gvrsn?: Versionage;
|
|
43
|
+
receiptor?: Receiptor;
|
|
44
|
+
auths?: WitnessAuthMap;
|
|
45
|
+
}): Operation<PreparedAdmit>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=ipex-admitting.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ipex-admitting.d.ts","sourceRoot":"","sources":["../../../src/app/ipex/ipex-admitting.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAc,KAAK,UAAU,EAAE,KAAK,UAAU,EAAY,MAAM,SAAS,CAAC;AACjF,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAG/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGrD,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAO1E,wGAAwG;AACxG,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,UAAU,CAAC;CACrB;AAED,oFAAoF;AACpF,qBAAa,YAAY;IACX,QAAQ,CAAC,GAAG,EAAE,MAAM;IAAE,QAAQ,CAAC,QAAQ,EAAE,aAAa;IAAE,QAAQ,CAAC,GAAG,EAAE,SAAS;gBAAtE,GAAG,EAAE,MAAM,EAAW,QAAQ,EAAE,aAAa,EAAW,GAAG,EAAE,SAAS;IAE3F,iGAAiG;IAC3F,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAShE,gGAAgG;IAChG,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO;IAYrD,uEAAuE;IACvE,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM;IAejC,kHAAkH;IACjH,gBAAgB,CACf,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,EAAE,OAAe,EAAE,OAAY,EAAE,KAAgB,EAAE,GAAE;QACnD,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,UAAU,CAAC;KACf,GACL,SAAS,CAAC,UAAU,CAAC;IAexB,sHAAsH;IACrH,YAAY,CACX,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,EAAE,OAAe,EAAE,OAAY,EAAE,KAAgB,EAAE,SAAS,EAAE,KAAK,EAAE,GAAE;QACrE,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,UAAU,CAAC;QACnB,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,KAAK,CAAC,EAAE,cAAc,CAAC;KACnB,GACL,SAAS,CAAC,aAAa,CAAC;CAqB5B"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legacy (v1) IPEX conversation for a single-signature controller: send an
|
|
3
|
+
* apply, offer, agree or spurn, read where a conversation stands and observe it
|
|
4
|
+
* until the peer replies. Owned by the library so that every host (CLI, wallet,
|
|
5
|
+
* service) runs one implementation.
|
|
6
|
+
*
|
|
7
|
+
* Operations follow the workflow contract. `sendIpexApply`, `sendIpexOffer`,
|
|
8
|
+
* `sendIpexAgree` and `sendIpexSpurn` are explicit: each validates the accepted
|
|
9
|
+
* prior message, signs exactly one exchange, accepts it locally, hands it to the
|
|
10
|
+
* Poster and returns once that delivery attempt has an outcome. They never wait
|
|
11
|
+
* for the peer. `ipexExchangeStatus` is a pure synchronous read of durable
|
|
12
|
+
* state. `waitForIpexExchange` only observes: it starts no worker and returns a
|
|
13
|
+
* timed-out value instead of throwing.
|
|
14
|
+
*
|
|
15
|
+
* Boundaries:
|
|
16
|
+
* - Dependencies are narrow collaborators, not an AgentRuntime (ADR-0013). The
|
|
17
|
+
* host owns their lifetimes and must be running the Poster worker so the
|
|
18
|
+
* delivery attempt can complete (`withRuntimeWorkers` for a one-shot host).
|
|
19
|
+
* - Recipients arrive as resolved AIDs; contact lookup is a host concern.
|
|
20
|
+
* - Group controllers do not use these operations: their propose/approve split
|
|
21
|
+
* needs the multisig coordinator, which the group proposal API will own.
|
|
22
|
+
* - Durable state records acceptance, not delivery, so there is no "sent but
|
|
23
|
+
* unanswered" read distinct from `awaiting-reply`; a send's return value is
|
|
24
|
+
* the evidence that it was sent.
|
|
25
|
+
*/
|
|
26
|
+
import { type SerderKERI, type Versionage } from "cesr-ts";
|
|
27
|
+
import { type Operation } from "effection";
|
|
28
|
+
import type { Reger } from "../../db/reger.js";
|
|
29
|
+
import type { Poster } from "../delivery/forwarding.js";
|
|
30
|
+
import type { Hab, Habery } from "../identity/habbing.js";
|
|
31
|
+
import type { ProtocolProcessor } from "../protocol/protocol-processing.js";
|
|
32
|
+
import type { Reactor } from "../protocol/reactor.js";
|
|
33
|
+
import { type RuntimeClock } from "../runtime/runtime-clock.js";
|
|
34
|
+
import type { ChangeSink, WaitResult } from "../runtime/workflow-contract.js";
|
|
35
|
+
import { type IpexVerb } from "./ipexing.js";
|
|
36
|
+
/** Collaborators sending an exchange needs; nothing else is reachable from here. */
|
|
37
|
+
export interface IpexSendDeps {
|
|
38
|
+
/** Borrowed identities and accepted-state stores. */
|
|
39
|
+
readonly hby: Habery;
|
|
40
|
+
/** Parser/dispatcher that accepts the signed exchange into local state. */
|
|
41
|
+
readonly reactor: Reactor;
|
|
42
|
+
/** Escrow processing, and the exchanger that reports acceptance, over the same database as `hby`. */
|
|
43
|
+
readonly protocol: ProtocolProcessor;
|
|
44
|
+
/** Delivery queue; its worker must be running while a send awaits its outcome. */
|
|
45
|
+
readonly postman: Poster;
|
|
46
|
+
/** Optional sink told `{kind:"ipex", id:"<said>"}` for the new exchange and its prior after local acceptance. */
|
|
47
|
+
readonly changes?: ChangeSink;
|
|
48
|
+
}
|
|
49
|
+
/** The exchange a send signed and accepted, with the destinations that took it. */
|
|
50
|
+
export interface IpexSent {
|
|
51
|
+
readonly exn: SerderKERI;
|
|
52
|
+
/** Successful destination URLs. */
|
|
53
|
+
readonly deliveries: string[];
|
|
54
|
+
}
|
|
55
|
+
/** Choices shared by every conversation send. */
|
|
56
|
+
export interface IpexMessageOptions {
|
|
57
|
+
/** Resolved recipient AID. */
|
|
58
|
+
recipient: string;
|
|
59
|
+
/** Free-text `m` field; defaults to empty. */
|
|
60
|
+
message?: string;
|
|
61
|
+
}
|
|
62
|
+
/** Stores the status read inspects. A `Habery` and a `Reger` fit. */
|
|
63
|
+
export interface IpexStatusDeps {
|
|
64
|
+
/** Accepted exchange messages and their reply indexes. */
|
|
65
|
+
readonly hby: Pick<Habery, "db">;
|
|
66
|
+
/** Saved credential index. */
|
|
67
|
+
readonly reger: Pick<Reger, "saved">;
|
|
68
|
+
}
|
|
69
|
+
/** Wallet fact for a grant: the credential it carries and whether the wallet saved it. */
|
|
70
|
+
export interface IpexCredentialFact {
|
|
71
|
+
readonly said: string;
|
|
72
|
+
readonly saved: boolean;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Where one accepted exchange stands.
|
|
76
|
+
* - `unknown`: no accepted exchange has this SAID.
|
|
77
|
+
* - `awaiting-reply`: accepted and no response is accepted against it yet.
|
|
78
|
+
* - `replied`: a response is accepted; `reply.route` is `null` only if the
|
|
79
|
+
* indexed response is no longer stored.
|
|
80
|
+
*
|
|
81
|
+
* `credential` is present for grants only.
|
|
82
|
+
*/
|
|
83
|
+
export type IpexExchangeStatus = {
|
|
84
|
+
state: "unknown";
|
|
85
|
+
} | {
|
|
86
|
+
state: "awaiting-reply";
|
|
87
|
+
route: string;
|
|
88
|
+
credential?: IpexCredentialFact;
|
|
89
|
+
} | {
|
|
90
|
+
state: "replied";
|
|
91
|
+
route: string;
|
|
92
|
+
reply: {
|
|
93
|
+
said: string;
|
|
94
|
+
route: string | null;
|
|
95
|
+
};
|
|
96
|
+
credential?: IpexCredentialFact;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Require a local single-signature sender.
|
|
100
|
+
*
|
|
101
|
+
* @throws ValidationError when `sender` is not a local AID of `hby` or is a group AID.
|
|
102
|
+
*/
|
|
103
|
+
export declare function requireIpexSender(hby: Habery, sender: Hab): void;
|
|
104
|
+
/**
|
|
105
|
+
* Validate an accepted predecessor and its known parties before any local signing.
|
|
106
|
+
*
|
|
107
|
+
* @throws ValidationError when the prior is not accepted, has the wrong route or
|
|
108
|
+
* parties, or already has an accepted response.
|
|
109
|
+
*/
|
|
110
|
+
export declare function requireIpexPrior(hby: Pick<Habery, "db">, sender: string, recipient: string, said: string, verb: Exclude<IpexVerb, "apply">): void;
|
|
111
|
+
/**
|
|
112
|
+
* Accept one signed exchange locally and confirm it was accepted.
|
|
113
|
+
*
|
|
114
|
+
* @param wire Signed exchange followed by its attachments.
|
|
115
|
+
* @param refusal Message for the infrastructure failure of a local exchange that was not accepted.
|
|
116
|
+
* @param prior Said of the message this one answers; its status changes too.
|
|
117
|
+
*/
|
|
118
|
+
export declare function acceptIpexExchange(deps: Pick<IpexSendDeps, "reactor" | "protocol" | "changes">, exn: SerderKERI, wire: Uint8Array, genus: Versionage, refusal: string, prior?: string): Operation<void>;
|
|
119
|
+
/** Choices for {@link sendIpexApply}. */
|
|
120
|
+
export interface IpexApplyOptions extends IpexMessageOptions {
|
|
121
|
+
/** Schema SAID requested. */
|
|
122
|
+
schema: string;
|
|
123
|
+
/** Requested attribute values; defaults to none. */
|
|
124
|
+
attrs?: Record<string, unknown>;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Send an `/ipex/apply` asking `recipient` for a credential of `schema`.
|
|
128
|
+
* An apply starts a conversation, so there is no prior to validate and sending
|
|
129
|
+
* it twice sends two distinct applies.
|
|
130
|
+
*
|
|
131
|
+
* @throws ValidationError for a sender that is not a local single-signature AID or a refused local exchange.
|
|
132
|
+
*/
|
|
133
|
+
export declare function sendIpexApply(deps: IpexSendDeps, sender: Hab, { recipient, schema, attrs, message }: IpexApplyOptions): Operation<IpexSent>;
|
|
134
|
+
/** Choices for {@link sendIpexOffer}. */
|
|
135
|
+
export interface IpexOfferOptions extends IpexMessageOptions {
|
|
136
|
+
/** Raw ACDC message embedded as the offer's `acdc`. */
|
|
137
|
+
acdc: Uint8Array;
|
|
138
|
+
/** Said of the accepted apply this offer answers; omit for an unsolicited offer. */
|
|
139
|
+
apply?: string;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Send an `/ipex/offer` carrying one embedded ACDC, optionally answering an apply.
|
|
143
|
+
*
|
|
144
|
+
* @throws ValidationError as for {@link requireIpexPrior} when `apply` is given.
|
|
145
|
+
*/
|
|
146
|
+
export declare function sendIpexOffer(deps: IpexSendDeps, sender: Hab, { recipient, acdc, apply, message }: IpexOfferOptions): Operation<IpexSent>;
|
|
147
|
+
/** Choices for {@link sendIpexAgree}. */
|
|
148
|
+
export interface IpexAgreeOptions extends IpexMessageOptions {
|
|
149
|
+
/** Said of the accepted offer being agreed to. */
|
|
150
|
+
offer: string;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Send an `/ipex/agree` answering an accepted offer.
|
|
154
|
+
*
|
|
155
|
+
* @throws ValidationError as for {@link requireIpexPrior}.
|
|
156
|
+
*/
|
|
157
|
+
export declare function sendIpexAgree(deps: IpexSendDeps, sender: Hab, { recipient, offer, message }: IpexAgreeOptions): Operation<IpexSent>;
|
|
158
|
+
/** Choices for {@link sendIpexSpurn}. */
|
|
159
|
+
export interface IpexSpurnOptions extends IpexMessageOptions {
|
|
160
|
+
/** Said of the accepted apply, offer, agree or grant being rejected. */
|
|
161
|
+
prior: string;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Send an `/ipex/spurn` rejecting an accepted apply, offer, agree or grant.
|
|
165
|
+
*
|
|
166
|
+
* @throws ValidationError as for {@link requireIpexPrior}.
|
|
167
|
+
*/
|
|
168
|
+
export declare function sendIpexSpurn(deps: IpexSendDeps, sender: Hab, { recipient, prior, message }: IpexSpurnOptions): Operation<IpexSent>;
|
|
169
|
+
/**
|
|
170
|
+
* Pure synchronous status of the accepted exchange `said`, derived from the
|
|
171
|
+
* exchange store, the reply index and (for grants) the saved-credential index.
|
|
172
|
+
* Mutates nothing.
|
|
173
|
+
*/
|
|
174
|
+
export declare function ipexExchangeStatus(deps: IpexStatusDeps, said: string): IpexExchangeStatus;
|
|
175
|
+
/** What a {@link waitForIpexExchange} is waiting for. */
|
|
176
|
+
export type IpexWaitFor = "replied" | "credential-saved";
|
|
177
|
+
/** Choices for {@link waitForIpexExchange}. */
|
|
178
|
+
export interface IpexWaitOptions {
|
|
179
|
+
/** Wall-clock budget. */
|
|
180
|
+
timeoutMs: number;
|
|
181
|
+
/** `replied` (default) waits for an accepted response; `credential-saved` for a grant's credential to be saved. */
|
|
182
|
+
until?: IpexWaitFor;
|
|
183
|
+
/** Elapsed milliseconds between reads. */
|
|
184
|
+
pollMs?: number;
|
|
185
|
+
clock?: RuntimeClock;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Observe `said` until the wanted state holds or the budget expires. A wait
|
|
189
|
+
* that is already satisfied returns at once. Starts no worker: the host's own
|
|
190
|
+
* poller and escrow loop make the peer's reply or the credential arrive.
|
|
191
|
+
*
|
|
192
|
+
* @returns `settled`, or `timed-out`; both carry the status read at return.
|
|
193
|
+
*/
|
|
194
|
+
export declare function waitForIpexExchange(deps: IpexStatusDeps, said: string, { timeoutMs, until, pollMs, clock }: IpexWaitOptions): Operation<WaitResult<IpexExchangeStatus>>;
|
|
195
|
+
//# sourceMappingURL=ipex-conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ipex-conversation.d.ts","sourceRoot":"","sources":["../../../src/app/ipex/ipex-conversation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAwB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACjF,OAAO,EAAE,KAAK,SAAS,EAAS,MAAM,WAAW,CAAC;AAIlD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,6BAA6B,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAG9E,OAAO,EAML,KAAK,QAAQ,EAEd,MAAM,cAAc,CAAC;AAEtB,oFAAoF;AACpF,MAAM,WAAW,YAAY;IAC3B,qDAAqD;IACrD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,qGAAqG;IACrG,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,kFAAkF;IAClF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iHAAiH;IACjH,QAAQ,CAAC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