keri-ts 2.1.0 → 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/custody.js +164 -0
- package/esm/keri/npm/src/acdc/dhking.js +244 -32
- package/esm/keri/npm/src/acdc/regbasing.js +10 -0
- package/esm/keri/npm/src/acdc/salting.js +16 -1
- package/esm/keri/npm/src/acdc/scheming.js +93 -54
- package/esm/keri/npm/src/acdc/unblinding.js +118 -95
- 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 +4 -6
- 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 +68 -60
- 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/delivery/forwarding.js +16 -3
- package/esm/keri/npm/src/app/exchanges/exchanging.js +14 -4
- package/esm/keri/npm/src/app/identity/challenging.js +50 -0
- 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 +129 -6
- package/esm/keri/npm/src/app/identity/keeping.js +77 -4
- 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-grouping.js +34 -11
- 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 +10 -5
- package/esm/keri/npm/src/app/multisig/counseling.js +482 -0
- package/esm/keri/npm/src/app/multisig/group-members.js +18 -0
- package/esm/keri/npm/src/app/multisig/multisig-workflows.js +94 -139
- 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/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 +9 -3
- package/esm/keri/npm/src/app/queries/query-workflows.js +98 -0
- package/esm/keri/npm/src/app/runtime/agent-runtime.js +106 -55
- 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/http-client.js +25 -6
- package/esm/keri/npm/src/app/witness/http-endpoints.js +4 -4
- package/esm/keri/npm/src/cli/common/event-completion.js +49 -0
- package/esm/keri/npm/src/cli/common/runtime-workers.js +23 -0
- package/esm/keri/npm/src/cli/credentials/ipex.js +157 -190
- 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.js +10 -13
- package/esm/keri/npm/src/cli/identity/challenge.js +8 -34
- package/esm/keri/npm/src/cli/identity/delegate.js +81 -258
- package/esm/keri/npm/src/cli/identity/incept.js +15 -32
- package/esm/keri/npm/src/cli/identity/interact.js +5 -17
- package/esm/keri/npm/src/cli/identity/rotate.js +8 -36
- package/esm/keri/npm/src/cli/index.js +3 -1
- 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 +163 -284
- package/esm/keri/npm/src/cli/messaging/root-copy-lines.js +31 -0
- package/esm/keri/npm/src/core/kel/eventing.js +66 -10
- package/esm/keri/npm/src/core/mailbox/kram-policy.js +39 -6
- 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 +13 -0
- package/esm/keri/npm/src/db/basing.js +34 -2
- package/esm/keri/npm/src/db/core/indexeddb-persistence.js +221 -0
- package/esm/keri/npm/src/db/indexeddb.js +98 -0
- package/esm/keri/npm/src/db/keeping.js +11 -2
- package/esm/keri/npm/src/db/store-lock.js +150 -0
- 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.browser.js +2 -0
- package/esm/keri/npm/src/npm/index.browser.js +9 -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 +51 -4
- 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/tel-publication.js +16 -0
- package/esm/keri/npm/src/version.js +2 -2
- package/package.json +15 -2
- package/types/acdc/authoring.d.ts +54 -0
- package/types/acdc/authoring.d.ts.map +1 -0
- 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 +4 -0
- package/types/acdc/regbasing.d.ts.map +1 -1
- package/types/acdc/salting.d.ts +6 -1
- 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 +56 -44
- package/types/app/credentials/root-replicating.d.ts.map +1 -1
- 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/delivery/forwarding.d.ts +6 -0
- package/types/app/delivery/forwarding.d.ts.map +1 -1
- 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/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 +67 -2
- package/types/app/identity/habbing.d.ts.map +1 -1
- package/types/app/identity/keeping.d.ts +49 -3
- package/types/app/identity/keeping.d.ts.map +1 -1
- 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-grouping.d.ts +18 -0
- package/types/app/ipex/ipex-grouping.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 +3 -0
- 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 +11 -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 +91 -22
- 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/signaling.d.ts +3 -1
- package/types/app/notifications/signaling.d.ts.map +1 -1
- package/types/app/protocol/parsering.d.ts +13 -0
- package/types/app/protocol/parsering.d.ts.map +1 -1
- package/types/app/protocol/protocol-processing.d.ts +7 -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 +72 -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/http-client.d.ts.map +1 -1
- 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/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.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/interact.d.ts.map +1 -1
- package/types/cli/identity/rotate.d.ts.map +1 -1
- package/types/cli/index.d.ts +3 -1
- 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 +28 -5
- 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/core/cues.d.ts +11 -0
- package/types/core/cues.d.ts.map +1 -1
- package/types/core/kel/eventing.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/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 +8 -2
- package/types/db/basing.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/indexeddb.d.ts +37 -0
- package/types/db/indexeddb.d.ts.map +1 -0
- package/types/db/keeping.d.ts +5 -2
- package/types/db/keeping.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/npm/db-indexeddb.d.ts +4 -0
- package/types/npm/db-indexeddb.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 +41 -6
- package/types/runtime/index.d.ts.map +1 -1
- 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/cli/common/tel-completion.js +0 -24
- package/types/cli/common/tel-completion.d.ts +0 -8
- package/types/cli/common/tel-completion.d.ts.map +0 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Library entry points for resolving one OOBI URL.
|
|
3
|
+
*
|
|
4
|
+
* `tufa oobi resolve` and a browser wallet share this: queue the URL with the
|
|
5
|
+
* durable Oobiery, then observe the Oobiery's own records until the URL reaches
|
|
6
|
+
* a terminal row. Everything observable lives in `oobis.`, `coobi.`, `moobi.`,
|
|
7
|
+
* `eoobi.` and `roobi.`, so a caller can begin, return to its UI and read the
|
|
8
|
+
* status later without a handle.
|
|
9
|
+
*
|
|
10
|
+
* These functions never start runtime workers. Something must already be running
|
|
11
|
+
* the Oobiery (a wallet's own runtime, or the CLI's `withRuntimeWorkers`) for a
|
|
12
|
+
* queued job to progress; see `app/runtime/workflow-contract.ts`.
|
|
13
|
+
*/
|
|
14
|
+
import type { Operation } from "effection";
|
|
15
|
+
import type { OobiRecord } from "../../core/records.js";
|
|
16
|
+
import type { Baser } from "../../db/basing.js";
|
|
17
|
+
import { type ChangeSink, type WaitResult } from "../runtime/workflow-contract.js";
|
|
18
|
+
import { type Oobiery } from "./oobiery.js";
|
|
19
|
+
/** Default wall-clock budget for one blocking resolution. */
|
|
20
|
+
export declare const OOBI_RESOLVE_TIMEOUT_MS = 30000;
|
|
21
|
+
/** Collaborator for the pure status read: the OOBI record stores. A `Habery` fits. */
|
|
22
|
+
export interface OobiStatusDeps {
|
|
23
|
+
readonly db: Baser;
|
|
24
|
+
}
|
|
25
|
+
/** Collaborators for queueing a URL. */
|
|
26
|
+
export interface OobiBeginDeps {
|
|
27
|
+
/** Durable job owner; only its queueing entry is used. */
|
|
28
|
+
readonly oobiery: Pick<Oobiery, "resolve">;
|
|
29
|
+
/** Optional sink told `{kind:"oobi", id:url}` after the job is queued. */
|
|
30
|
+
readonly changes?: ChangeSink;
|
|
31
|
+
}
|
|
32
|
+
/** Collaborators for the observe-only wait. */
|
|
33
|
+
export interface OobiWaitDeps extends OobiStatusDeps {
|
|
34
|
+
/**
|
|
35
|
+
* Extra host predicate that OOBI-dependent ingress has settled, evaluated
|
|
36
|
+
* after the terminal row exists. Omitted: the terminal row alone ends the wait.
|
|
37
|
+
*/
|
|
38
|
+
readonly settled?: () => boolean;
|
|
39
|
+
/** Optional sink told `{kind:"oobi", id:url}` when the wait ends in a terminal state. */
|
|
40
|
+
readonly changes?: ChangeSink;
|
|
41
|
+
}
|
|
42
|
+
/** Everything `resolveOobi` needs. */
|
|
43
|
+
export interface OobiResolveDeps extends OobiBeginDeps, OobiWaitDeps {
|
|
44
|
+
}
|
|
45
|
+
/** Optional controls for beginning a resolution. */
|
|
46
|
+
export interface BeginOobiOptions {
|
|
47
|
+
/** Contact alias recorded when the OOBI resolves. */
|
|
48
|
+
alias?: string;
|
|
49
|
+
}
|
|
50
|
+
/** Optional controls for a wait. */
|
|
51
|
+
export interface WaitForOobiOptions {
|
|
52
|
+
/** Wall-clock budget; defaults to {@link OOBI_RESOLVE_TIMEOUT_MS}. */
|
|
53
|
+
timeoutMs?: number;
|
|
54
|
+
}
|
|
55
|
+
/** Optional controls for a blocking resolution. */
|
|
56
|
+
export interface ResolveOobiOptions extends BeginOobiOptions, WaitForOobiOptions {
|
|
57
|
+
}
|
|
58
|
+
/** Durable state of one requested URL. `pending` covers queued, in flight and unknown URLs. */
|
|
59
|
+
export type OobiStatus = {
|
|
60
|
+
state: "pending";
|
|
61
|
+
} | {
|
|
62
|
+
state: "resolved";
|
|
63
|
+
record: OobiRecord;
|
|
64
|
+
} | {
|
|
65
|
+
state: "failed";
|
|
66
|
+
/** The state the Oobiery recorded, or `"failed"` when it recorded none. */
|
|
67
|
+
reason: string;
|
|
68
|
+
record: OobiRecord;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Outcome of a wait. It settles when the status is terminal; `status.state` then
|
|
72
|
+
* says `resolved` or `failed`. On `timed-out`, `status` is the last read (pending).
|
|
73
|
+
*/
|
|
74
|
+
export type OobiResolveResult = WaitResult<OobiStatus>;
|
|
75
|
+
/**
|
|
76
|
+
* Queue one URL with the durable Oobiery. Returns after the job is queued.
|
|
77
|
+
*
|
|
78
|
+
* @param url Exact OOBI or well-known URL; it is also the key of the status record.
|
|
79
|
+
*/
|
|
80
|
+
export declare function beginOobi(deps: OobiBeginDeps, url: string, options?: BeginOobiOptions): void;
|
|
81
|
+
/** Read the durable status of one requested URL. Pure: no worker, no I/O beyond the Baser. */
|
|
82
|
+
export declare function oobiStatus(deps: OobiStatusDeps, url: string): OobiStatus;
|
|
83
|
+
/**
|
|
84
|
+
* Observe a queued URL until it is terminal (and `deps.settled`, when given) or
|
|
85
|
+
* the budget expires. Starts no worker.
|
|
86
|
+
*
|
|
87
|
+
* @returns `settled` with a `resolved` or `failed` status (reason recorded), or `timed-out`.
|
|
88
|
+
*/
|
|
89
|
+
export declare function waitForOobi(deps: OobiWaitDeps, url: string, { timeoutMs }?: WaitForOobiOptions): Operation<OobiResolveResult>;
|
|
90
|
+
/** `beginOobi` then `waitForOobi`. The host must be running the Oobiery for the wait to end in a terminal state. */
|
|
91
|
+
export declare function resolveOobi(deps: OobiResolveDeps, url: string, options?: ResolveOobiOptions): Operation<OobiResolveResult>;
|
|
92
|
+
//# sourceMappingURL=oobi-resolving.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oobi-resolving.d.ts","sourceRoot":"","sources":["../../../src/app/bootstrap/oobi-resolving.ts"],"names":[],"mappings":"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MAAM,UAAU,GAClB;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,GACpB;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,GACzC;IACA,KAAK,EAAE,QAAQ,CAAC;IAChB,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;CACpB,CAAC;AAEJ;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AAEvD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,IAAI,CAGhG;AAED,8FAA8F;AAC9F,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,CAKxE;AAED;;;;;GAKG;AACH,wBAAiB,WAAW,CAC1B,IAAI,EAAE,YAAY,EAClB,GAAG,EAAE,MAAM,EACX,EAAE,SAAmC,EAAE,GAAE,kBAAuB,GAC/D,SAAS,CAAC,iBAAiB,CAAC,CAS9B;AAED,oHAAoH;AACpH,wBAAiB,WAAW,CAC1B,IAAI,EAAE,eAAe,EACrB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE,kBAAuB,GAC/B,SAAS,CAAC,iBAAiB,CAAC,CAG9B"}
|
|
@@ -14,6 +14,8 @@ import type { Exchanger, ExchangeRouteHandler } from "../exchanges/exchanging.js
|
|
|
14
14
|
import type { Hab, Habery } from "../identity/habbing.js";
|
|
15
15
|
import type { Notifier } from "../notifications/notifying.js";
|
|
16
16
|
import type { ProtocolProcessor } from "../protocol/protocol-processing.js";
|
|
17
|
+
import { type DoerPacing } from "../runtime/doing.js";
|
|
18
|
+
import { type RuntimeClock } from "../runtime/runtime-clock.js";
|
|
17
19
|
import type { HttpClient } from "../transport/http-client.js";
|
|
18
20
|
export declare const OOBI_REQUEST_ROUTE = "/oobis";
|
|
19
21
|
/**
|
|
@@ -131,7 +133,7 @@ export declare class Oobiery {
|
|
|
131
133
|
* This mirrors the KERIpy model where OOBI resolution is its own long-running
|
|
132
134
|
* doer rather than root-owned queue plumbing.
|
|
133
135
|
*/
|
|
134
|
-
oobiDo(): Operation<never>;
|
|
136
|
+
oobiDo(clock?: RuntimeClock, pacing?: Readonly<DoerPacing>): Operation<never>;
|
|
135
137
|
/** Select queued work, including a surviving in-flight row whose former process is gone. */
|
|
136
138
|
private nextQueued;
|
|
137
139
|
/** Select a parent only after its current child attempts, including authentication, settle. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oobiery.d.ts","sourceRoot":"","sources":["../../../src/app/bootstrap/oobiery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,EAAkB,UAAU,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAQ,KAAK,SAAS,EAAoB,MAAM,WAAW,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,KAAK,IAAI,EAAS,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAuB,KAAK,oBAAoB,EAA2B,MAAM,uBAAuB,CAAC;AAEhH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,oBAAoB,EA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G,OAAO,CAIvD;AAgCD,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -4,6 +4,7 @@ import type { Operation } from "effection";
|
|
|
4
4
|
import type { Regery } from "../../vdr/credentialing.js";
|
|
5
5
|
import type { TelProcessDecision } from "../../vdr/eventing.js";
|
|
6
6
|
import type { Poster } from "../delivery/forwarding.js";
|
|
7
|
+
import type { GroupEventRef } from "../multisig/counseling.js";
|
|
7
8
|
import { MULTISIG_REV_ROUTE } from "../multisig/grouping.js";
|
|
8
9
|
import type { GroupSendResult } from "../multisig/multisig-messaging.js";
|
|
9
10
|
import type { Reactor } from "../protocol/reactor.js";
|
|
@@ -21,8 +22,10 @@ export interface CredentialRevokeResult {
|
|
|
21
22
|
publicationComplete: boolean;
|
|
22
23
|
/** Actual external transport destinations, populated by a completed delivery operation. */
|
|
23
24
|
deliveries: string[];
|
|
25
|
+
/** Group coordination; `event` is the group anchor that seals the revocation. */
|
|
24
26
|
group?: GroupSendResult & {
|
|
25
27
|
route: typeof MULTISIG_REV_ROUTE;
|
|
28
|
+
event: GroupEventRef;
|
|
26
29
|
};
|
|
27
30
|
}
|
|
28
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-revoking.d.ts","sourceRoot":"","sources":["../../../src/app/credentials/credential-revoking.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,OAAO,EAAe,KAAK,UAAU,EAAqC,MAAM,SAAS,CAAC;AAC1F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAK3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"credential-revoking.d.ts","sourceRoot":"","sources":["../../../src/app/credentials/credential-revoking.ts"],"names":[],"mappings":"AA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;;;;GAKG;AACH,wBAAiB,2BAA2B,CAC1C,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,SAAS,MAAM,EAAE,GAC5B,SAAS,CAAC,MAAM,EAAE,CAAC,CAsCrB;AAED,0FAA0F;AAC1F,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,aAAa,EAAE,OAAO,GACrB,MAAM,EAAE,CAGV"}
|
|
@@ -12,6 +12,7 @@ import { Regery } from "../../vdr/credentialing.js";
|
|
|
12
12
|
import { type TelProcessDecision } from "../../vdr/eventing.js";
|
|
13
13
|
import type { Poster } from "../delivery/forwarding.js";
|
|
14
14
|
import type { Hab, Habery } from "../identity/habbing.js";
|
|
15
|
+
import type { GroupEventRef } from "../multisig/counseling.js";
|
|
15
16
|
import { MULTISIG_ISS_ROUTE, MULTISIG_VCP_ROUTE, type MultisigVdrProposal } from "../multisig/grouping.js";
|
|
16
17
|
import type { Reactor } from "../protocol/reactor.js";
|
|
17
18
|
import type { VerifierDecision } from "./verifying.js";
|
|
@@ -58,6 +59,8 @@ export interface RegistryResult {
|
|
|
58
59
|
/** Present for group coordination, with acceptance assessed separately from sending. */
|
|
59
60
|
group?: GroupSendResult & {
|
|
60
61
|
route: typeof MULTISIG_VCP_ROUTE;
|
|
62
|
+
/** The group anchor that seals the registry inception. */
|
|
63
|
+
event: GroupEventRef;
|
|
61
64
|
status: TelProcessDecision["kind"];
|
|
62
65
|
accepted: boolean;
|
|
63
66
|
};
|
|
@@ -80,6 +83,8 @@ export interface IssueResult {
|
|
|
80
83
|
status: VerifierDecision["kind"];
|
|
81
84
|
group?: GroupSendResult & {
|
|
82
85
|
route: typeof MULTISIG_ISS_ROUTE;
|
|
86
|
+
/** The group anchor that seals the issuance. */
|
|
87
|
+
event: GroupEventRef;
|
|
83
88
|
/** Registry event processor decision, independent of the credential verifier decision. */
|
|
84
89
|
telStatus: TelProcessDecision["kind"];
|
|
85
90
|
/** Whether the credential is actually saved; sending a proposal does not make it so. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-workflows.d.ts","sourceRoot":"","sources":["../../../src/app/credentials/credential-workflows.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAML,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAK3C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAkC,MAAM,EAAiC,MAAM,4BAA4B,CAAC;AACnH,OAAO,EAAE,KAAK,kBAAkB,EAA6B,MAAM,uBAAuB,CAAC;AAC3F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"credential-workflows.d.ts","sourceRoot":"","sources":["../../../src/app/credentials/credential-workflows.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAML,UAAU,EACV,KAAK,UAAU,EAEhB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAK3C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAkC,MAAM,EAAiC,MAAM,4BAA4B,CAAC;AACnH,OAAO,EAAE,KAAK,kBAAkB,EAA6B,MAAM,uBAAuB,CAAC;AAC3F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EACL,kBAAkB,E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X,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,GAAG,EACb,QAAQ,EAAE,mBAAmB,GAC5B,SAAS,CAAC,eAAe,CAAC,CAS5B"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Library home for settling one ACDC v2 registry event (`rip` or `bup`) that a
|
|
3
|
+
* group sealed in a KEL anchor. Written once so every host (CLI, tufa, wallet,
|
|
4
|
+
* service) shares one definition of "the registry event is done".
|
|
5
|
+
*
|
|
6
|
+
* The TEL event is accepted only after the group's anchor is accepted in the
|
|
7
|
+
* group KEL and fully witnessed, then the registry escrows are reprocessed:
|
|
8
|
+
* - `registryEventStatus` is a pure read of durable state.
|
|
9
|
+
* - `settleRegistryEvent` is the local step: it reprocesses the escrows once.
|
|
10
|
+
* Idempotent; it signs, sends and receipts nothing, because
|
|
11
|
+
* witness receipting needs host choices (authorization codes, endpoint mode).
|
|
12
|
+
* - `waitForRegistryEvent` only observes and starts no worker.
|
|
13
|
+
*
|
|
14
|
+
* The anchor facts come from the KEL itself, the same facts the Counselor derives
|
|
15
|
+
* for a group event, because a one-shot host such as the CLI does not run the
|
|
16
|
+
* Counselor loop. Dependencies are declared collaborators, not an AgentRuntime.
|
|
17
|
+
*/
|
|
18
|
+
import type { SerderACDC } from "cesr-ts";
|
|
19
|
+
import type { Operation } from "effection";
|
|
20
|
+
import type { RegistryStore } from "../../acdc/registering.js";
|
|
21
|
+
import type { Baser } from "../../db/basing.js";
|
|
22
|
+
import type { GroupEventRef } from "../multisig/counseling.js";
|
|
23
|
+
import type { ProtocolProcessor } from "../protocol/protocol-processing.js";
|
|
24
|
+
import { type RuntimeClock } from "../runtime/runtime-clock.js";
|
|
25
|
+
import { type WaitResult } from "../runtime/workflow-contract.js";
|
|
26
|
+
/** Elapsed milliseconds between reads of a registry wait. */
|
|
27
|
+
export declare const REGISTRY_WAIT_POLL_MS = 50;
|
|
28
|
+
/** Exact registry event and the group anchor that seals it. */
|
|
29
|
+
export interface RegistryEventRef {
|
|
30
|
+
/** Registry identifier. */
|
|
31
|
+
readonly regid: string;
|
|
32
|
+
/** Sequence number of the TEL event. */
|
|
33
|
+
readonly sn: number;
|
|
34
|
+
/** SAID of the TEL event. */
|
|
35
|
+
readonly said: string;
|
|
36
|
+
/** Group KEL event that carries the seal. */
|
|
37
|
+
readonly anchor: GroupEventRef;
|
|
38
|
+
}
|
|
39
|
+
/** Collaborators for the pure read. */
|
|
40
|
+
export interface RegistryEventReadDeps {
|
|
41
|
+
readonly db: Baser;
|
|
42
|
+
readonly store: Pick<RegistryStore, "seqEvent">;
|
|
43
|
+
}
|
|
44
|
+
/** Collaborators for {@link settleRegistryEvent}. */
|
|
45
|
+
export interface RegistrySettleDeps extends RegistryEventReadDeps {
|
|
46
|
+
readonly protocol: Pick<ProtocolProcessor, "processEscrowsOnce">;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Durable state of one registry event:
|
|
50
|
+
* - `awaiting-anchor`: the group KEL has not accepted the anchor.
|
|
51
|
+
* - `awaiting-receipts`: the anchor is accepted but lacks its witness receipts.
|
|
52
|
+
* - `awaiting-tel`: the anchor is complete; the registry escrows have not accepted the event.
|
|
53
|
+
* - `accepted`: the TEL event is accepted at its sequence number.
|
|
54
|
+
*/
|
|
55
|
+
export type RegistryEventStatus = {
|
|
56
|
+
state: "awaiting-anchor";
|
|
57
|
+
} | {
|
|
58
|
+
state: "awaiting-receipts";
|
|
59
|
+
} | {
|
|
60
|
+
state: "awaiting-tel";
|
|
61
|
+
} | {
|
|
62
|
+
state: "accepted";
|
|
63
|
+
};
|
|
64
|
+
/** Outcome of a wait; `timed-out` carries the status read at the deadline. */
|
|
65
|
+
export type RegistryWaitResult = WaitResult<RegistryEventStatus, {
|
|
66
|
+
deadline: number;
|
|
67
|
+
}>;
|
|
68
|
+
/** Wait choices; the deadline is an epoch-millisecond instant. */
|
|
69
|
+
export interface RegistryWaitOptions {
|
|
70
|
+
deadline: number;
|
|
71
|
+
clock?: Pick<RuntimeClock, "now">;
|
|
72
|
+
}
|
|
73
|
+
/** Reference for a TEL event sealed by a known anchor. */
|
|
74
|
+
export declare function registryEventRef(tel: SerderACDC, anchor: GroupEventRef): RegistryEventRef;
|
|
75
|
+
/** Read the status of one registry event; mutates nothing. */
|
|
76
|
+
export declare function registryEventStatus(deps: RegistryEventReadDeps, ref: RegistryEventRef): RegistryEventStatus;
|
|
77
|
+
/**
|
|
78
|
+
* Local settle step: reprocess the escrows once. That accepts the anchor when
|
|
79
|
+
* the last member signature has arrived and, once the anchor is complete, the
|
|
80
|
+
* sealed TEL event. Does nothing for an event already accepted.
|
|
81
|
+
*/
|
|
82
|
+
export declare function settleRegistryEvent(deps: RegistrySettleDeps, ref: RegistryEventRef): Operation<RegistryEventStatus>;
|
|
83
|
+
/** Observe the event until `accepted` or the deadline passes. Starts no worker; the host settles. */
|
|
84
|
+
export declare function waitForRegistryEvent(deps: RegistryEventReadDeps, ref: RegistryEventRef, { deadline, clock }: RegistryWaitOptions): Operation<RegistryWaitResult>;
|
|
85
|
+
//# sourceMappingURL=registry-settling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry-settling.d.ts","sourceRoot":"","sources":["../../../src/app/credentials/registry-settling.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,KAAK,YAAY,EAAe,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AAC1D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,GAAG,gBAAgB,CAOzF;AAED,8DAA8D;AAC9D,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,qBAAqB,EAAE,GAAG,EAAE,gBAAgB,GAAG,mBAAmB,CAM3G;AAED;;;;GAIG;AACH,wBAAiB,mBAAmB,CAAC,IAAI,EAAE,kBAAkB,EAAE,GAAG,EAAE,gBAAgB,GAAG,SAAS,CAAC,mBAAmB,CAAC,CAIpH;AAED,qGAAqG;AACrG,wBAAiB,oBAAoB,CACnC,IAAI,EAAE,qBAAqB,EAC3B,GAAG,EAAE,gBAAgB,EACrB,EAAE,QAAQ,EAAE,KAAmB,EAAE,EAAE,mBAAmB,GACrD,SAAS,CAAC,kBAAkB,CAAC,CAQ/B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Operation } from "effection";
|
|
2
|
-
import type
|
|
2
|
+
import { type RegistryRoot } from "../../acdc/salting.js";
|
|
3
|
+
import { AppError } from "../../core/errors.js";
|
|
3
4
|
import type { Poster } from "../delivery/forwarding.js";
|
|
4
5
|
import type { Hab } from "../identity/habbing.js";
|
|
5
6
|
import type { RuntimeClock } from "../runtime/runtime-clock.js";
|
|
@@ -18,68 +19,79 @@ export type RootDelivery<C extends RootCopy = RootCopy> = {
|
|
|
18
19
|
copy: C;
|
|
19
20
|
error: unknown;
|
|
20
21
|
};
|
|
21
|
-
/** The operator command that resends a copy automatic replication did not send. */
|
|
22
|
-
export declare const RootCopyRecovery = "tufa vc registry root send";
|
|
23
22
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
23
|
+
* Send each copy from `sender` to its recipient's `credential` mailbox, in
|
|
24
|
+
* order, and return one outcome per copy. A failed copy does not stop later
|
|
25
|
+
* copies. The caller runs `postman.deliverDo` for the duration; Poster wait
|
|
26
|
+
* misuse or closure still throws.
|
|
27
27
|
*/
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
export declare function deliverRegistryRoots<C extends RootCopy>(postman: Poster, sender: string, copies: readonly C[]): Operation<RootDelivery<C>[]>;
|
|
29
|
+
/** How one copy attempt ended: `deferred` and `failed` may succeed later; `refused` never will. */
|
|
30
|
+
export type RootCopyKin = "sent" | "deferred" | "refused" | "failed";
|
|
31
|
+
/**
|
|
32
|
+
* The typed outcome of one copy attempt, whatever drove it (`RootReplicator`, the
|
|
33
|
+
* `replicateRootCopies` and `resealRootCopies` loops).
|
|
34
|
+
*
|
|
35
|
+
* `kin` says whether to try again: `sent` means handed to the mailbox, not received
|
|
36
|
+
* (`deliveries` names where, as `RootDelivery`); `deferred` means local evidence
|
|
37
|
+
* (the BUP, key state, a hint) is not yet present; `refused` means the copy is not
|
|
38
|
+
* authorized; `failed` means the budget ended or the Poster could not send it.
|
|
39
|
+
* Unless `sent`, `error` is the error itself. `exchange` is the prepared copy's SAID
|
|
40
|
+
* once one was prepared.
|
|
41
|
+
*/
|
|
42
|
+
export interface RootCopyResult {
|
|
43
|
+
kin: RootCopyKin;
|
|
44
|
+
group: string;
|
|
31
45
|
registry: string;
|
|
32
46
|
sender: string;
|
|
33
47
|
recipient: string;
|
|
34
48
|
exchange?: string;
|
|
35
|
-
|
|
36
|
-
error?:
|
|
37
|
-
|
|
49
|
+
deliveries?: string[];
|
|
50
|
+
error?: unknown;
|
|
51
|
+
}
|
|
52
|
+
/** An accepted rotation whose re-seal recipients could not be selected at all. */
|
|
53
|
+
export interface RootExamination {
|
|
54
|
+
group: string;
|
|
55
|
+
rotation: string;
|
|
56
|
+
error: AppError;
|
|
38
57
|
}
|
|
39
58
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
59
|
+
* Prepare and deliver one `/registry/root` copy for `gid` from its local member to
|
|
60
|
+
* `recipient`, before `deadline` (epoch ms of `clock`).
|
|
61
|
+
*
|
|
62
|
+
* The copy is sealed with `RegistryRoot.prepare` and a per-registry derived hint
|
|
63
|
+
* (`hinted`, so a copy that could never verify is reported, not sent). Any
|
|
64
|
+
* `AppError` ends in the result; any other exception is an invariant failure and
|
|
65
|
+
* escapes. The caller runs `postman.deliverDo` for the duration.
|
|
44
66
|
*/
|
|
45
|
-
export declare function
|
|
67
|
+
export declare function replicateRootCopy(root: RegistryRoot, postman: Poster, clock: RuntimeClock, gid: string, registry: string, recipient: string, deadline: number): Operation<RootCopyResult>;
|
|
46
68
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
69
|
+
* Send one copy of each of `registries`' held roots for group `ghab` to each
|
|
70
|
+
* recipient, signed by `ghab`'s local member, and return one result per copy.
|
|
49
71
|
*
|
|
50
|
-
* `recipients` defaults to every other current signing member.
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* does. `timeoutMs` is this replication's own budget: a copy reached after it
|
|
55
|
-
* ends, or still sending when it ends, is reported unsent. Nothing is retried
|
|
56
|
-
* or recorded and an `AppError` never escapes: every outcome is returned for
|
|
57
|
-
* display. The caller runs `postman.deliverDo` for the duration.
|
|
72
|
+
* `recipients` defaults to every other current signing member. `timeoutMs` is this
|
|
73
|
+
* replication's own budget: a copy reached after it ends, or still sending when it
|
|
74
|
+
* ends, is `failed`. Nothing is retried or recorded and an `AppError` never
|
|
75
|
+
* escapes. The caller runs `postman.deliverDo` for the duration.
|
|
58
76
|
*/
|
|
59
|
-
export declare function
|
|
77
|
+
export declare function replicateRootCopies(root: RegistryRoot, postman: Poster, clock: RuntimeClock, ghab: Hab, registries: readonly string[], { recipients, timeoutMs }: {
|
|
60
78
|
recipients?: readonly string[];
|
|
61
79
|
timeoutMs: number;
|
|
62
|
-
}): Operation<
|
|
80
|
+
}): Operation<RootCopyResult[]>;
|
|
63
81
|
/** Budget for re-seal copies from a command without its own `--timeout`, as KERIpy `rootreplicating.Budget`. */
|
|
64
82
|
export declare const RootResealBudgetMs = 30000;
|
|
65
|
-
/** A re-seal that could not even select its recipients, displayed as a `root_copy` line. */
|
|
66
|
-
export interface RootResealFailure {
|
|
67
|
-
phase: "root_copy";
|
|
68
|
-
gid: string;
|
|
69
|
-
rotation: string;
|
|
70
|
-
transmitted: false;
|
|
71
|
-
error: string;
|
|
72
|
-
}
|
|
73
83
|
/**
|
|
74
84
|
* After an accepted group rotation, send held roots to new or rekeyed members.
|
|
75
85
|
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* sends
|
|
79
|
-
*
|
|
80
|
-
* `postman.deliverDo` for the duration.
|
|
86
|
+
* Only a signer of the rotation that held a prior key sends (`RegistryRoot.resealed`),
|
|
87
|
+
* every such signer sends with no election, and a member holding no root for the
|
|
88
|
+
* group sends nothing. `examination` is set when the recipients could not be
|
|
89
|
+
* selected, and then nothing is sent. Fire and forget like `replicateRootCopies`.
|
|
81
90
|
*/
|
|
82
|
-
export declare function
|
|
91
|
+
export declare function resealRootCopies(root: RegistryRoot, postman: Poster, clock: RuntimeClock, ghab: Hab, rotation: string, { timeoutMs }?: {
|
|
83
92
|
timeoutMs?: number;
|
|
84
|
-
}): Operation<
|
|
93
|
+
}): Operation<{
|
|
94
|
+
examination: RootExamination | null;
|
|
95
|
+
copies: RootCopyResult[];
|
|
96
|
+
}>;
|
|
85
97
|
//# sourceMappingURL=root-replicating.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"root-replicating.d.ts","sourceRoot":"","sources":["../../../src/app/credentials/root-replicating.ts"],"names":[],"mappings":"AAUA,OAAO,EAAU,KAAK,SAAS,EAAQ,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"root-replicating.d.ts","sourceRoot":"","sources":["../../../src/app/credentials/root-replicating.ts"],"names":[],"mappings":"AAUA,OAAO,EAAU,KAAK,SAAS,EAAQ,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,uBAAuB,CAAC;AAC1E,OAA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|
+
* are worked out from state and sent without any command asking.
|
|
4
|
+
*
|
|
5
|
+
* A group's registry root is retained by one custodian, so every other current
|
|
6
|
+
* member must be sent a sealed copy (KERIpy `replicate` cue, Locksmith
|
|
7
|
+
* `root_replicating`). Nothing is queued durably. A pass derives what is owed: for each
|
|
8
|
+
* local group, each registry whose root this member holds, and each other current signing
|
|
9
|
+
* member, a copy is owed unless `Baser.rrsn` shows one sent to the key the member
|
|
10
|
+
* currently contributes to the group. A new member has no row and a rekeyed member's row
|
|
11
|
+
* holds its old key, so both are owed a (re-sealed) copy after an accepted rotation. The
|
|
12
|
+
* marker is written when the Poster reports a copy sent, and holds the recipient's public
|
|
13
|
+
* key, never a root. A crash between send and marker costs one harmless resend, since
|
|
14
|
+
* receiving is idempotent.
|
|
15
|
+
*
|
|
16
|
+
* A pass runs for a group on the replicator's first pass, after its latest establishment
|
|
17
|
+
* changes (an accepted rotation), and when the Dhke completion cue prompts it, so a cue
|
|
18
|
+
* lost in a crash is recovered by the next start. Sending a root a member already holds to
|
|
19
|
+
* the group's current members is not a new consent, so nothing here asks anyone.
|
|
20
|
+
*
|
|
21
|
+
* A copy that cannot be prepared or delivered stays owed and is retried with a
|
|
22
|
+
* process-local backoff; `status` reports it until it goes.
|
|
23
|
+
*/
|
|
24
|
+
import type { Operation } from "effection";
|
|
25
|
+
import type { DhkeReplicate } from "../../acdc/dhking.js";
|
|
26
|
+
import type { RegistryRoot } from "../../acdc/salting.js";
|
|
27
|
+
import type { Poster } from "../delivery/forwarding.js";
|
|
28
|
+
import type { Hab } from "../identity/habbing.js";
|
|
29
|
+
import type { RuntimeClock } from "../runtime/runtime-clock.js";
|
|
30
|
+
import type { ChangeSink } from "../runtime/workflow-contract.js";
|
|
31
|
+
import { type RootCopyResult } from "./root-replicating.js";
|
|
32
|
+
/** Most copies one `processOnce` attempts, so a first pass over a large store cannot stall the runtime. */
|
|
33
|
+
export declare const RootSendsPerPass = 4;
|
|
34
|
+
/** Process-local retry delay after a copy's first failed attempt; doubles per attempt up to {@link RootRetryMaxMs}. */
|
|
35
|
+
export declare const RootRetryBaseMs = 1000;
|
|
36
|
+
export declare const RootRetryMaxMs = 300000;
|
|
37
|
+
/** A copy still owed and the error of its last attempt (null before the first attempt). */
|
|
38
|
+
export interface OwedCopyStatus {
|
|
39
|
+
group: string;
|
|
40
|
+
registry: string;
|
|
41
|
+
recipient: string;
|
|
42
|
+
attempts: number;
|
|
43
|
+
lastFailure: unknown;
|
|
44
|
+
}
|
|
45
|
+
export interface RootReplicatorStatus {
|
|
46
|
+
owed: OwedCopyStatus[];
|
|
47
|
+
}
|
|
48
|
+
/** The declared collaborators; no runtime bundle. `postman.deliverDo` is run by the host. */
|
|
49
|
+
export interface RootReplicatorDeps {
|
|
50
|
+
root: RegistryRoot;
|
|
51
|
+
postman: Poster;
|
|
52
|
+
clock: RuntimeClock;
|
|
53
|
+
changes?: ChangeSink;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Derives, sends and records registry root copies for a wallet's local groups.
|
|
57
|
+
*
|
|
58
|
+
* Holds no durable state of its own beyond `Baser.rrsn`; what is pending and the
|
|
59
|
+
* backoff are process-local and rebuilt from state. A host calls `prompt` (or
|
|
60
|
+
* `replicate`) for each Dhke cue and `processOnce` on its loop; both are safe to repeat,
|
|
61
|
+
* and overlapping `processOnce` calls never send one copy twice.
|
|
62
|
+
*/
|
|
63
|
+
export declare class RootReplicator {
|
|
64
|
+
#private;
|
|
65
|
+
constructor(deps: RootReplicatorDeps);
|
|
66
|
+
/** Re-derive `group`'s owed copies on the next pass and retry its failed copies at once. */
|
|
67
|
+
prompt(group: string): void;
|
|
68
|
+
/** The Dhke completion cue: a prompt to run the pass now, not the source of truth. */
|
|
69
|
+
replicate(cue: Pick<DhkeReplicate, "gid" | "registries">): void;
|
|
70
|
+
/**
|
|
71
|
+
* Derive what is owed, then send up to {@link RootSendsPerPass} due copies within
|
|
72
|
+
* `timeoutMs`. A copy is recorded when sent and kept for retry otherwise. Never throws
|
|
73
|
+
* on a remote failure; every attempt is returned. The host runs `postman.deliverDo`.
|
|
74
|
+
*/
|
|
75
|
+
processOnce({ timeoutMs }?: {
|
|
76
|
+
timeoutMs?: number;
|
|
77
|
+
}): Operation<RootCopyResult[]>;
|
|
78
|
+
/**
|
|
79
|
+
* The fixed-tock pass: re-derive only the groups that were prompted, then send up to {@link RootSendsPerPass}
|
|
80
|
+
* due copies. A rotation nobody prompted for waits for {@link RootReplicator.sweep}.
|
|
81
|
+
*/
|
|
82
|
+
processDue({ timeoutMs }?: {
|
|
83
|
+
timeoutMs?: number;
|
|
84
|
+
}): Operation<RootCopyResult[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Send each registry's root to each recipient now, whatever was sent before, as an
|
|
87
|
+
* explicit command does; a sent copy is recorded like any other. `recipients` defaults
|
|
88
|
+
* to every other current signing member.
|
|
89
|
+
*/
|
|
90
|
+
send(ghab: Hab, registries: readonly string[], { recipients, timeoutMs }: {
|
|
91
|
+
recipients?: readonly string[];
|
|
92
|
+
timeoutMs: number;
|
|
93
|
+
}): Operation<RootCopyResult[]>;
|
|
94
|
+
/** Whether a copy is owed or a group is waiting to be re-derived; in memory, reads no store. */
|
|
95
|
+
pending(): boolean;
|
|
96
|
+
/** Pure read: what is owed and why it has not gone yet. */
|
|
97
|
+
status(): RootReplicatorStatus;
|
|
98
|
+
/**
|
|
99
|
+
* The full check: drop markers of groups that are gone (once) and re-derive each local group that is new or
|
|
100
|
+
* whose establishment event changed. One keyed read per local identifier, so a host runs it every
|
|
101
|
+
* many tocks, not every tock.
|
|
102
|
+
*/
|
|
103
|
+
sweep(): void;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=root-replicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root-replicator.d.ts","sourceRoot":"","sources":["../../../src/app/credentials/root-replicator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK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AG,YAAY,CAAC,GAAG,IAAI;IAI/D;;;;OAIG;IACF,WAAW,CAAC,EAAE,SAA8B,EAAE,GAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,SAAS,CAAC,cAAc,EAAE,CAAC;IAK1G;;;OAGG;IACF,UAAU,CAAC,EAAE,SAA8B,EAAE,GAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,SAAS,CAAC,cAAc,EAAE,CAAC;IAqBzG;;;;OAIG;IACF,IAAI,CACH,IAAI,EAAE,GAAG,EACT,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE;QAAE,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,GAC/E,SAAS,CAAC,cAAc,EAAE,CAAC;IAc9B,gGAAgG;IAChG,OAAO,IAAI,OAAO;IAIlB,2DAA2D;IAC3D,MAAM,IAAI,oBAAoB;IAqC9B;;;;OAIG;IACH,KAAK,IAAI,IAAI;CA0Cd"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Library status and wait for v1 TEL publication, owned here so that every host
|
|
3
|
+
* (CLI, wallet, service) observes one definition of "the TEL event is done".
|
|
4
|
+
*
|
|
5
|
+
* A TEL event is complete when the issuer's KEL holds the anchoring event, that
|
|
6
|
+
* event has its witness receipts, and the local publication owner finished
|
|
7
|
+
* disseminating it (`TelPublication`'s `ctel.`). Issuing a credential also needs
|
|
8
|
+
* the saved credential evidence: publication alone is not verifier acceptance.
|
|
9
|
+
*
|
|
10
|
+
* `telEventStatus` is a pure read of durable state. `waitForTelEvent` only
|
|
11
|
+
* observes: it starts no runtime workers, so the host must already run the
|
|
12
|
+
* publication owner (a wallet's runtime, or the CLI's `withRuntimeWorkers`), and
|
|
13
|
+
* an expired deadline is a returned `timed-out` value. See
|
|
14
|
+
* `app/runtime/workflow-contract.ts`.
|
|
15
|
+
*/
|
|
16
|
+
import type { Operation } from "effection";
|
|
17
|
+
import type { TelPublication } from "../../vdr/tel-publication.js";
|
|
18
|
+
import { type RuntimeClock } from "../runtime/runtime-clock.js";
|
|
19
|
+
import { type WaitResult } from "../runtime/workflow-contract.js";
|
|
20
|
+
/** Elapsed milliseconds between reads of a TEL wait. */
|
|
21
|
+
export declare const TEL_WAIT_POLL_MS = 50;
|
|
22
|
+
/** Collaborator for status and waits: the publication owner's durable facts. */
|
|
23
|
+
export interface TelCompletionDeps {
|
|
24
|
+
readonly publication: Pick<TelPublication, "progress" | "reger">;
|
|
25
|
+
}
|
|
26
|
+
/** Steps a tracked TEL event can be waiting on. */
|
|
27
|
+
export type TelPhase = "awaitingAnchor" | "awaitingReceipts" | "awaitingPublication" | "awaitingCredentialSave";
|
|
28
|
+
/** Durable status of one TEL event; `unknown` means publication does not track it. */
|
|
29
|
+
export type TelEventStatus = {
|
|
30
|
+
state: "active";
|
|
31
|
+
phase: TelPhase;
|
|
32
|
+
} | {
|
|
33
|
+
state: "complete";
|
|
34
|
+
} | {
|
|
35
|
+
state: "unknown";
|
|
36
|
+
reason: "not-tracked";
|
|
37
|
+
};
|
|
38
|
+
/** Outcome of a wait; `timed-out` carries the status read at the deadline. */
|
|
39
|
+
export type TelWaitResult = WaitResult<TelEventStatus, {
|
|
40
|
+
deadline: number;
|
|
41
|
+
}>;
|
|
42
|
+
/** Wait choices; the deadline is an epoch-millisecond instant so callers can start it before authoring. */
|
|
43
|
+
export interface TelWaitOptions {
|
|
44
|
+
deadline: number;
|
|
45
|
+
clock?: Pick<RuntimeClock, "now">;
|
|
46
|
+
}
|
|
47
|
+
/** Read the status of the TEL event `pre` at `sn`; mutates nothing. */
|
|
48
|
+
export declare function telEventStatus(deps: TelCompletionDeps, pre: string, sn?: number): TelEventStatus;
|
|
49
|
+
/** Status of an issued credential: its TEL issuance event plus saved credential evidence. */
|
|
50
|
+
export declare function issuedCredentialStatus(deps: TelCompletionDeps, said: string): TelEventStatus;
|
|
51
|
+
/** Observe one exact TEL coordinate until complete or the deadline passes. Starts no worker. */
|
|
52
|
+
export declare function waitForTelEvent(deps: TelCompletionDeps, pre: string, sn: number, options: TelWaitOptions): Operation<TelWaitResult>;
|
|
53
|
+
/** Observe an issuance until its TEL event is complete and the credential is saved. Starts no worker. */
|
|
54
|
+
export declare function waitForIssuedCredential(deps: TelCompletionDeps, said: string, options: TelWaitOptions): Operation<TelWaitResult>;
|
|
55
|
+
//# sourceMappingURL=tel-completion.d.ts.map
|