@interop/wallet-core 0.44.0 → 0.46.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.
Files changed (103) hide show
  1. package/dist/clients/revocation.d.ts +2 -25
  2. package/dist/clients/revocation.d.ts.map +1 -1
  3. package/dist/clients/revocation.js +25 -96
  4. package/dist/clients/revocation.js.map +1 -1
  5. package/dist/keyring/record.d.ts +4 -3
  6. package/dist/keyring/record.d.ts.map +1 -1
  7. package/dist/keyring/record.js.map +1 -1
  8. package/dist/keys/index.d.ts +7 -0
  9. package/dist/keys/index.d.ts.map +1 -1
  10. package/dist/keys/index.js +6 -0
  11. package/dist/keys/index.js.map +1 -1
  12. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  13. package/dist/keys/rosterLogStore.js +18 -1
  14. package/dist/keys/rosterLogStore.js.map +1 -1
  15. package/dist/keys/userKeyRosterCascade.d.ts +121 -0
  16. package/dist/keys/userKeyRosterCascade.d.ts.map +1 -0
  17. package/dist/keys/userKeyRosterCascade.js +125 -0
  18. package/dist/keys/userKeyRosterCascade.js.map +1 -0
  19. package/dist/recovery/index.d.ts +1 -1
  20. package/dist/recovery/index.d.ts.map +1 -1
  21. package/dist/recovery/index.js +1 -1
  22. package/dist/recovery/index.js.map +1 -1
  23. package/dist/recovery/recoveryDelegation.d.ts +27 -40
  24. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  25. package/dist/recovery/recoveryDelegation.js +119 -53
  26. package/dist/recovery/recoveryDelegation.js.map +1 -1
  27. package/dist/recovery/recoveryWebvh.d.ts +9 -2
  28. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  29. package/dist/recovery/recoveryWebvh.js +4 -2
  30. package/dist/recovery/recoveryWebvh.js.map +1 -1
  31. package/dist/resourceLog/controller.d.ts +38 -3
  32. package/dist/resourceLog/controller.d.ts.map +1 -1
  33. package/dist/resourceLog/controller.js +106 -10
  34. package/dist/resourceLog/controller.js.map +1 -1
  35. package/dist/resourceLog/errors.d.ts +22 -1
  36. package/dist/resourceLog/errors.d.ts.map +1 -1
  37. package/dist/resourceLog/errors.js +23 -1
  38. package/dist/resourceLog/errors.js.map +1 -1
  39. package/dist/resourceLog/index.d.ts +8 -6
  40. package/dist/resourceLog/index.d.ts.map +1 -1
  41. package/dist/resourceLog/index.js +7 -5
  42. package/dist/resourceLog/index.js.map +1 -1
  43. package/dist/resourceLog/license.d.ts +44 -0
  44. package/dist/resourceLog/license.d.ts.map +1 -0
  45. package/dist/resourceLog/license.js +63 -0
  46. package/dist/resourceLog/license.js.map +1 -0
  47. package/dist/resourceLog/verify.d.ts +3 -2
  48. package/dist/resourceLog/verify.d.ts.map +1 -1
  49. package/dist/resourceLog/verify.js +30 -8
  50. package/dist/resourceLog/verify.js.map +1 -1
  51. package/dist/unlock/index.d.ts +22 -8
  52. package/dist/unlock/index.d.ts.map +1 -1
  53. package/dist/unlock/index.js +21 -8
  54. package/dist/unlock/index.js.map +1 -1
  55. package/dist/unlock/ladder.d.ts +76 -0
  56. package/dist/unlock/ladder.d.ts.map +1 -1
  57. package/dist/unlock/ladder.js +111 -1
  58. package/dist/unlock/ladder.js.map +1 -1
  59. package/dist/unlock/retire.d.ts +126 -0
  60. package/dist/unlock/retire.d.ts.map +1 -0
  61. package/dist/unlock/retire.js +83 -0
  62. package/dist/unlock/retire.js.map +1 -0
  63. package/dist/unlock/standingWebvh.d.ts +50 -3
  64. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  65. package/dist/unlock/standingWebvh.js +78 -9
  66. package/dist/unlock/standingWebvh.js.map +1 -1
  67. package/dist/unlock/unlockRecord.d.ts +28 -8
  68. package/dist/unlock/unlockRecord.d.ts.map +1 -1
  69. package/dist/unlock/unlockRecord.js +93 -13
  70. package/dist/unlock/unlockRecord.js.map +1 -1
  71. package/dist/webvh/companion.d.ts +681 -0
  72. package/dist/webvh/companion.d.ts.map +1 -0
  73. package/dist/webvh/companion.js +1151 -0
  74. package/dist/webvh/companion.js.map +1 -0
  75. package/dist/webvh/delegatedLogStore.d.ts +67 -0
  76. package/dist/webvh/delegatedLogStore.d.ts.map +1 -0
  77. package/dist/webvh/delegatedLogStore.js +104 -0
  78. package/dist/webvh/delegatedLogStore.js.map +1 -0
  79. package/dist/webvh/didWebvh.d.ts +109 -5
  80. package/dist/webvh/didWebvh.d.ts.map +1 -1
  81. package/dist/webvh/didWebvh.js +186 -21
  82. package/dist/webvh/didWebvh.js.map +1 -1
  83. package/dist/webvh/index.d.ts +34 -5
  84. package/dist/webvh/index.d.ts.map +1 -1
  85. package/dist/webvh/index.js +31 -5
  86. package/dist/webvh/index.js.map +1 -1
  87. package/dist/webvh/listClients.d.ts +33 -0
  88. package/dist/webvh/listClients.d.ts.map +1 -1
  89. package/dist/webvh/listClients.js +27 -0
  90. package/dist/webvh/listClients.js.map +1 -1
  91. package/dist/webvh/standingZcap.d.ts +48 -0
  92. package/dist/webvh/standingZcap.d.ts.map +1 -0
  93. package/dist/webvh/standingZcap.js +54 -0
  94. package/dist/webvh/standingZcap.js.map +1 -0
  95. package/dist/webvh/wasIdStore.d.ts +36 -6
  96. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  97. package/dist/webvh/wasIdStore.js +32 -13
  98. package/dist/webvh/wasIdStore.js.map +1 -1
  99. package/dist/webvh/zcap.d.ts +24 -0
  100. package/dist/webvh/zcap.d.ts.map +1 -1
  101. package/dist/webvh/zcap.js +42 -0
  102. package/dist/webvh/zcap.js.map +1 -1
  103. package/package.json +9 -9
@@ -0,0 +1,83 @@
1
+ import { rotateRosterToDocumentAndCascade } from '../keys/index.js';
2
+ import { removeUnlockKey } from './standingWebvh.js';
3
+ /**
4
+ * Retires one standing unlock credential from an account. See the module doc
5
+ * for the order and the convergence story. Once the posture edit lands, a
6
+ * thrown later stage leaves durable state a naive re-run -- or the login-time
7
+ * sweep -- converges from.
8
+ *
9
+ * @param options {object}
10
+ * @param options.idStore {WebvhIdStore} the account's `id` collection store
11
+ * @param options.updateKeys {ClientWebvhUpdateKeys} the RETIRING (enrolled)
12
+ * client's own did:webvh update-key seeds, which sign the posture edit
13
+ * @param options.unlockKeys {StandingUnlockKeys} the retired credential's
14
+ * public posture (its key-agreement publication and its committed update
15
+ * key)
16
+ * @param [options.expectedDid] {string} the account DID from the caller's
17
+ * stored account pointer; supplied, the posture edit refuses a `did.jsonl`
18
+ * resolving to any other account
19
+ * @param [options.verb] {string} what the caller is doing, for the
20
+ * pending-rotation refusal message (e.g. `'changing your passphrase'`)
21
+ * @param options.rosterStore {EncryptionDescriptorStore} the
22
+ * `key-map/user-key.jsonl` roster store
23
+ * @param [options.userKey] {UserKey} this client's cached user key
24
+ * @param options.clientKeyAgreementKey {IKeyAgreementKey} this client's own
25
+ * (identity) key-agreement key -- its roster entry
26
+ * @param [options.pinnedEpochId] {string} the locally pinned latest-seen
27
+ * roster epoch
28
+ * @param [options.onUserKeyAdopted] {Function} persists a rotated key:
29
+ * called with `{ userKey, latestEpochId, descriptor }` after the roster read
30
+ * and BEFORE the fan-out. The key and the epoch pin must persist atomically
31
+ * @param options.collections {CascadeCollections} the fan-out's work
32
+ * @param [options.onRotationAdopted] {Function} `({ userKey }) =>
33
+ * Promise<void>` -- the live-session adoption of a rotated key, run last so
34
+ * the session keeps operating without a re-login
35
+ * @returns {Promise<UnlockCredentialRetirementResult>}
36
+ */
37
+ export async function retireUnlockCredential({ idStore, updateKeys, unlockKeys, expectedDid, verb, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, onRotationAdopted }) {
38
+ // 1. The document posture edit -- the credential's standing, first. It
39
+ // resolves the document as it now stands, which is what stage 2 resolves
40
+ // its remaining recipients from.
41
+ const { did, doc, log } = await removeUnlockKey({
42
+ idStore,
43
+ updateKeys,
44
+ unlockKeys,
45
+ ...(expectedDid !== undefined ? { expectedDid } : {}),
46
+ ...(verb !== undefined ? { verb } : {})
47
+ });
48
+ // 2. The shared roster-and-cascade tail: the roster rotation onto the
49
+ // post-edit document (with its post-edit controller floor and its seal
50
+ // backstop), then the collection fan-out onto the fresh key.
51
+ const tail = await rotateRosterToDocumentAndCascade({
52
+ rosterStore,
53
+ did,
54
+ doc,
55
+ log,
56
+ ...(userKey ? { userKey } : {}),
57
+ clientKeyAgreementKey,
58
+ pinnedEpochId,
59
+ ...(onUserKeyAdopted ? { onUserKeyAdopted } : {}),
60
+ collections
61
+ });
62
+ if (!tail.rosterDescriptor || !tail.userKey) {
63
+ // No roster to rotate: the posture edit has landed, so the credential IS
64
+ // retired -- a completed ceremony with nothing rotated.
65
+ return {
66
+ rotated: false,
67
+ collections: tail.collections,
68
+ document: doc
69
+ };
70
+ }
71
+ if (tail.rotated) {
72
+ await onRotationAdopted?.({ userKey: tail.userKey });
73
+ }
74
+ return {
75
+ rotated: tail.rotated,
76
+ ...(tail.rosterSeal ? { rosterSeal: tail.rosterSeal } : {}),
77
+ collections: tail.collections,
78
+ document: doc,
79
+ userKey: tail.userKey,
80
+ rosterDescriptor: tail.rosterDescriptor
81
+ };
82
+ }
83
+ //# sourceMappingURL=retire.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retire.js","sourceRoot":"","sources":["../../src/unlock/retire.ts"],"names":[],"mappings":"AAoDA,OAAO,EACL,gCAAgC,EAKjC,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,eAAe,EAA2B,MAAM,oBAAoB,CAAA;AAmB7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,EAC3C,OAAO,EACP,UAAU,EACV,UAAU,EACV,WAAW,EACX,IAAI,EACJ,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EAkBlB;IACC,uEAAuE;IACvE,yEAAyE;IACzE,iCAAiC;IACjC,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,MAAM,eAAe,CAAC;QAC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b,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;KACxC,CAAA;AACH,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { VerificationMethod } from '@interop/did-method-webvh';
1
+ import type { DIDDoc, DIDLog, VerificationMethod } from '@interop/did-method-webvh';
2
2
  import type { ClientWebvhUpdateKeys, WebvhEnrollmentKeys, WebvhIdStore } from '../webvh/didWebvh.js';
3
3
  /**
4
4
  * The narrow store seam the self-enrollment continuation writes through: a
@@ -62,6 +62,45 @@ export declare function unlockKeyVerificationMethod({ did, keyAgreement }: {
62
62
  did: string;
63
63
  keyAgreement: UnlockKeyAgreementPublication;
64
64
  }): VerificationMethod;
65
+ /**
66
+ * CLIENT-LESS GENESIS: assembles the one-entry did:webvh log of an account
67
+ * with zero enrolled durable clients, anchored on the minting credential's
68
+ * ladder alone. Everything derives from the ladder seed: rung 0 is the sole
69
+ * `updateKeys` member and signs the entry, `nextKeyHashes` commits rung 0's
70
+ * own carry-over hash plus rung 1 (the staged rung) -- the carry-over hash is
71
+ * what the first durable self-enrollment's reveal-and-commit entry,
72
+ * re-stating `updateKeys` containing rung 0, requires --
73
+ * and the ladder VM (the stable sibling) is published under `assertionMethod`
74
+ * and `capabilityDelegation` only. The credential's `keyAgreement` posture
75
+ * entry is FOLDED INTO GENESIS -- no enrolled client exists to run the
76
+ * separate bind entry ({@link publishUnlockKey}) -- so the genesis
77
+ * `keyAgreement` array holds only the credential's entry.
78
+ *
79
+ * The client-less window this opens is closed by the credential's first
80
+ * durable self-enrollment ({@link selfEnrollWebvhClient}), whose add entry
81
+ * atomically publishes the client, retires rung 0, and removes the ladder VM.
82
+ *
83
+ * The caller owns publication (conditional, create-only) and the pointer
84
+ * write that follows; this assembles and signs the log only.
85
+ *
86
+ * @param options {object}
87
+ * @param options.wasServerUrl {string}
88
+ * @param options.spaceId {string}
89
+ * @param options.ladderSeed {Uint8Array} the credential's ladder seed
90
+ * @param options.keyAgreement {UnlockKeyAgreementPublication} the
91
+ * credential's key-agreement publication (commitment or verbatim)
92
+ * @returns {Promise<{ log: DIDLog, webDoc: object, did: string }>}
93
+ */
94
+ export declare function createClientlessAccountLog({ wasServerUrl, spaceId, ladderSeed, keyAgreement }: {
95
+ wasServerUrl: string;
96
+ spaceId: string;
97
+ ladderSeed: Uint8Array;
98
+ keyAgreement: UnlockKeyAgreementPublication;
99
+ }): Promise<{
100
+ log: DIDLog;
101
+ webDoc: object;
102
+ did: string;
103
+ }>;
65
104
  /**
66
105
  * BIND (run by an enrolled client, root authority): publishes a standing
67
106
  * credential's split posture into the document -- one entry adding the
@@ -82,7 +121,10 @@ export declare function unlockKeyVerificationMethod({ did, keyAgreement }: {
82
121
  * to, from the caller's stored account pointer
83
122
  * @param [options.verb] {string} what the caller is doing, for the
84
123
  * pending-rotation refusal message (e.g. `'issuing a recovery code'`)
85
- * @returns {Promise<{ did: string }>}
124
+ * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the account
125
+ * DID and the document and log as this call leaves them (unchanged when the
126
+ * posture was already settled), which is what the caller's roster-side half
127
+ * converges onto
86
128
  */
87
129
  export declare function publishUnlockKey(options: {
88
130
  idStore: WebvhIdStore;
@@ -92,6 +134,8 @@ export declare function publishUnlockKey(options: {
92
134
  verb?: string;
93
135
  }): Promise<{
94
136
  did: string;
137
+ doc: DIDDoc;
138
+ log: DIDLog;
95
139
  }>;
96
140
  /**
97
141
  * REMOVAL (run by an enrolled client, root authority): removes a standing
@@ -102,7 +146,8 @@ export declare function publishUnlockKey(options: {
102
146
  * entry.
103
147
  *
104
148
  * @param options {object} see {@link publishUnlockKey}
105
- * @returns {Promise<{ did: string }>}
149
+ * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} see
150
+ * {@link publishUnlockKey}
106
151
  */
107
152
  export declare function removeUnlockKey(options: {
108
153
  idStore: WebvhIdStore;
@@ -112,6 +157,8 @@ export declare function removeUnlockKey(options: {
112
157
  verb?: string;
113
158
  }): Promise<{
114
159
  did: string;
160
+ doc: DIDDoc;
161
+ log: DIDLog;
115
162
  }>;
116
163
  /**
117
164
  * SELF-ENROLLMENT (run by the credential-derived client through the delegated
@@ -1 +1 @@
1
- {"version":3,"file":"standingWebvh.d.ts","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"AA4CA,OAAO,KAAK,EAAU,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAe3E,OAAO,KAAK,EACV,qBAAqB,EAErB,mBAAmB,EACnB,YAAY,EACb,MAAM,sBAAsB,CAAA;AAG7B;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,YAAY,EACZ,kBAAkB,GAAG,eAAe,CACrC,CAAA;AAED;;;;;;GAMG;AACH,MAAM,MAAM,6BAA6B,GACvC;IAAE,kBAAkB,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,6BAA6B,CAAA;IAC3C,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,EAC5B,GAAG,EACH,YAAY,EACb,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,6BAA6B,CAAA;CAC5C,GAAG,MAAM,CAMT;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,GAAG,EACH,YAAY,EACb,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,6BAA6B,CAAA;CAC5C,GAAG,kBAAkB,CAgBrB;AAsDD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE;IAC9C,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,UAAU,EAAE,kBAAkB,CA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EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAIrD;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE;IAC7C,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,UAAU,EAAE,kBAAkB,CAAA;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAIrD;AAkGD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE;IACnD,KAAK,EAAE,cAAc,CAAA;IACrB,UAAU,EAAE,UAAU,CAAA;IACtB,aAAa,EAAE,mBAAmB,CAAA;IAClC,oBAAoB,EAAE,qBAAqB,CAAA;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAE5C"}
@@ -34,6 +34,10 @@
34
34
  * hash. The credential's own posture -- its `keyAgreement` entry and the
35
35
  * freshly committed `hash(rung i + 1)` -- stands untouched, ready for the
36
36
  * next self-enrollment. Nothing is spent, and no replacement exists.
37
+ * When the account was CLIENT-LESS ({@link createClientlessAccountLog}),
38
+ * the same atomic entry removes the ladder VM from the document and its
39
+ * relations -- the transitional key exists only while no durable client
40
+ * does, and folding the removal in leaves no window with neither.
37
41
  *
38
42
  * Which rung is current is recovered from the log itself
39
43
  * (`attributeLadderRung`, fail-closed); a lost compare-and-swap race re-runs,
@@ -42,8 +46,9 @@
42
46
  * from durable state alone, on the recovery continuation's pattern.
43
47
  */
44
48
  import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
45
- import { assertCarryOverCommitments, BYOE_CONTEXT_URL, markedVerificationMethodPair, MULTIKEY_COMMITMENT_VM_TYPE, MULTIKEY_VM_TYPE, publishUpdatedLog, putLogResource, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
46
- import { attributeLadderRung, ladderRung } from './ladder.js';
49
+ import { assertCarryOverCommitments, BYOE_CONTEXT_URL, createClientlessWebvhLog, didWebvhControllerTemplate, genesisNextKeyHashes, markedVerificationMethodPair, MULTIKEY_COMMITMENT_VM_TYPE, MULTIKEY_VM_TYPE, publishUpdatedLog, putLogResource, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
50
+ import { ladderVmIds } from '../webvh/listClients.js';
51
+ import { attributeLadderRung, ladderRung, ladderVmKeyMultibase } from './ladder.js';
47
52
  /**
48
53
  * The verification-method id a credential's key-agreement entry publishes
49
54
  * under: `<did>#<multibase>` for a verbatim key (indistinguishable by id from
@@ -94,6 +99,58 @@ export function unlockKeyVerificationMethod({ did, keyAgreement }) {
94
99
  publicKeyCommitment: keyAgreement.commitment
95
100
  };
96
101
  }
102
+ /**
103
+ * CLIENT-LESS GENESIS: assembles the one-entry did:webvh log of an account
104
+ * with zero enrolled durable clients, anchored on the minting credential's
105
+ * ladder alone. Everything derives from the ladder seed: rung 0 is the sole
106
+ * `updateKeys` member and signs the entry, `nextKeyHashes` commits rung 0's
107
+ * own carry-over hash plus rung 1 (the staged rung) -- the carry-over hash is
108
+ * what the first durable self-enrollment's reveal-and-commit entry,
109
+ * re-stating `updateKeys` containing rung 0, requires --
110
+ * and the ladder VM (the stable sibling) is published under `assertionMethod`
111
+ * and `capabilityDelegation` only. The credential's `keyAgreement` posture
112
+ * entry is FOLDED INTO GENESIS -- no enrolled client exists to run the
113
+ * separate bind entry ({@link publishUnlockKey}) -- so the genesis
114
+ * `keyAgreement` array holds only the credential's entry.
115
+ *
116
+ * The client-less window this opens is closed by the credential's first
117
+ * durable self-enrollment ({@link selfEnrollWebvhClient}), whose add entry
118
+ * atomically publishes the client, retires rung 0, and removes the ladder VM.
119
+ *
120
+ * The caller owns publication (conditional, create-only) and the pointer
121
+ * write that follows; this assembles and signs the log only.
122
+ *
123
+ * @param options {object}
124
+ * @param options.wasServerUrl {string}
125
+ * @param options.spaceId {string}
126
+ * @param options.ladderSeed {Uint8Array} the credential's ladder seed
127
+ * @param options.keyAgreement {UnlockKeyAgreementPublication} the
128
+ * credential's key-agreement publication (commitment or verbatim)
129
+ * @returns {Promise<{ log: DIDLog, webDoc: object, did: string }>}
130
+ */
131
+ export async function createClientlessAccountLog({ wasServerUrl, spaceId, ladderSeed, keyAgreement }) {
132
+ const rung0 = await ladderRung({ ladderSeed, index: 0 });
133
+ const rung1 = await ladderRung({ ladderSeed, index: 1 });
134
+ const controllerTemplate = didWebvhControllerTemplate({
135
+ wasServerUrl,
136
+ spaceId
137
+ });
138
+ return createClientlessWebvhLog({
139
+ wasServerUrl,
140
+ spaceId,
141
+ ladderVmKeyMultibase: await ladderVmKeyMultibase({ ladderSeed }),
142
+ credentialKeyAgreementMethod: unlockKeyVerificationMethod({
143
+ did: controllerTemplate,
144
+ keyAgreement
145
+ }),
146
+ updateKeyPublicKeyMultibase: rung0.keyMultibase,
147
+ nextKeyHashes: await genesisNextKeyHashes({
148
+ activeKeyMultibase: rung0.keyMultibase,
149
+ stagedKeyMultibase: rung1.keyMultibase
150
+ }),
151
+ signer: await updateKeySigner({ seed: rung0.seed })
152
+ });
153
+ }
97
154
  /**
98
155
  * Reads and resolves the published log through the narrow store seam.
99
156
  *
@@ -150,7 +207,10 @@ async function publishLogOnly({ store, log, ifMatch }) {
150
207
  * to, from the caller's stored account pointer
151
208
  * @param [options.verb] {string} what the caller is doing, for the
152
209
  * pending-rotation refusal message (e.g. `'issuing a recovery code'`)
153
- * @returns {Promise<{ did: string }>}
210
+ * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the account
211
+ * DID and the document and log as this call leaves them (unchanged when the
212
+ * posture was already settled), which is what the caller's roster-side half
213
+ * converges onto
154
214
  */
155
215
  export async function publishUnlockKey(options) {
156
216
  return withLogConflictRetry(() => setUnlockKeyPostureOnce({ ...options, polarity: 'publish' }));
@@ -164,7 +224,8 @@ export async function publishUnlockKey(options) {
164
224
  * entry.
165
225
  *
166
226
  * @param options {object} see {@link publishUnlockKey}
167
- * @returns {Promise<{ did: string }>}
227
+ * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} see
228
+ * {@link publishUnlockKey}
168
229
  */
169
230
  export async function removeUnlockKey(options) {
170
231
  return withLogConflictRetry(() => setUnlockKeyPostureOnce({ ...options, polarity: 'remove' }));
@@ -176,7 +237,7 @@ export async function removeUnlockKey(options) {
176
237
  * between two copies would be published into an append-only log.
177
238
  *
178
239
  * @param options {object} see {@link publishUnlockKey}, plus `polarity`
179
- * @returns {Promise<{ did: string }>}
240
+ * @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>}
180
241
  */
181
242
  async function setUnlockKeyPostureOnce({ idStore, updateKeys, unlockKeys, expectedDid, verb, polarity }) {
182
243
  const published = await readLogOrThrow({
@@ -192,7 +253,7 @@ async function setUnlockKeyPostureOnce({ idStore, updateKeys, unlockKeys, expect
192
253
  ? vmPresent && hashCommitted
193
254
  : !vmPresent && !hashCommitted;
194
255
  if (settled) {
195
- return { did };
256
+ return { did, doc, log: published.log };
196
257
  }
197
258
  const activeKey = await updateKeyMultibase({ seed: updateKeys.updateSeed });
198
259
  if (!published.updateKeys.includes(activeKey)) {
@@ -236,7 +297,7 @@ async function setUnlockKeyPostureOnce({ idStore, updateKeys, unlockKeys, expect
236
297
  capabilityDelegation: relationIds(doc.capabilityDelegation)
237
298
  });
238
299
  await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
239
- return { did: updated.did };
300
+ return { did: updated.did, doc: updated.doc, log: updated.log };
240
301
  }
241
302
  /**
242
303
  * SELF-ENROLLMENT (run by the credential-derived client through the delegated
@@ -329,6 +390,13 @@ async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, new
329
390
  // client's update key, whose hash the commit entry just committed.
330
391
  const { did, doc } = published;
331
392
  const vmId = (publicKeyMultibase) => `${did}#${publicKeyMultibase}`;
393
+ // When this is the FIRST durable enrollment of a client-less account, the
394
+ // same atomic entry ends the client-less window: every ladder VM (the
395
+ // relation-asymmetry recognition) leaves the document and its relations
396
+ // here, so no window exists where the account has neither a durable client
397
+ // nor the ladder VM. On an account with enrolled clients the recognition
398
+ // finds none and the filters are no-ops.
399
+ const ladderVms = ladderVmIds({ doc });
332
400
  const addedMethods = markedVerificationMethodPair({
333
401
  controller: did,
334
402
  signingKeyMultibase: newClientKeys.signingKeyMultibase,
@@ -336,10 +404,11 @@ async function selfEnrollWebvhClientOnce({ store, ladderSeed, newClientKeys, new
336
404
  });
337
405
  const existingMethods = (doc.verificationMethod ?? []);
338
406
  const verificationMethods = [
339
- ...existingMethods.filter(method => !addedMethods.some(added => added.id === method.id)),
407
+ ...existingMethods.filter(method => !addedMethods.some(added => added.id === method.id) &&
408
+ (method.id === undefined || !ladderVms.includes(method.id))),
340
409
  ...addedMethods
341
410
  ];
342
- const withReference = (relation, id) => [...new Set([...relationIds(relation), id])];
411
+ const withReference = (relation, id) => [...new Set([...relationIds(relation), id])].filter(referencedId => !ladderVms.includes(referencedId));
343
412
  const signingVmId = vmId(newClientKeys.signingKeyMultibase);
344
413
  const signer = await updateKeySigner({
345
414
  seed: newClientUpdateSeeds.updateSeed
@@ -1 +1 @@
1
- {"version":3,"file":"standingWebvh.js","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAExE,OAAO,EACL,0BAA0B,EAC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AC1E,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAA;AACrD,CAAC"}
@@ -26,15 +26,18 @@ export interface SealedRecordMember {
26
26
  /**
27
27
  * The unwrapped contents of an unlock record: the credential-authenticated
28
28
  * account core (controller + pointer, plus the ladder seed where the
29
- * credential is a standing method), the bridge delegation, the optional bind
30
- * email, and the bind timestamp. `pointer` is required -- the record exists
31
- * only on WAS deployments.
29
+ * credential is a standing method), the bridge delegation, the optional
30
+ * companion-Space delegation (`delegatedClients` -- a standing credential's
31
+ * pre-minted GET+PUT over the auxiliary companion Space's items subtree),
32
+ * the optional bind email, and the bind timestamp. `pointer` is required --
33
+ * the record exists only on WAS deployments.
32
34
  */
33
35
  export interface UnlockRecordContents {
34
36
  controller: string;
35
37
  email?: string;
36
38
  pointer: AccountPointer;
37
39
  delegation: IZcap;
40
+ delegatedClients?: IZcap;
38
41
  ladderSeed?: Uint8Array;
39
42
  createdAt: string;
40
43
  }
@@ -45,6 +48,7 @@ export interface UnlockRecordContents {
45
48
  export interface SignedUnlockRecord extends SignedRecord {
46
49
  binding: string;
47
50
  bridge: SealedRecordMember;
51
+ delegatedClients?: SealedRecordMember;
48
52
  ladder?: SealedRecordMember;
49
53
  }
50
54
  /**
@@ -110,6 +114,9 @@ export declare function unlockRecordBinding({ record }: {
110
114
  * @param options.pointer {AccountPointer} the account pointer
111
115
  * @param options.delegation {IZcap} the PUT-on-`did.jsonl` delegation to
112
116
  * the credential-derived signing DID
117
+ * @param [options.delegatedClients] {IZcap} the companion-Space delegation
118
+ * (GET+PUT over the auxiliary Space's items subtree), for a standing
119
+ * credential (a recovery code carries none)
113
120
  * @param [options.ladderSeed] {Uint8Array} the update-key ladder seed, for
114
121
  * a standing credential (a recovery code carries none)
115
122
  * @param options.keyAgreementKey {IKeyAgreementKey} the credential's unlock
@@ -122,11 +129,12 @@ export declare function unlockRecordBinding({ record }: {
122
129
  * freshness.
123
130
  * @returns {Promise<SignedUnlockRecord>}
124
131
  */
125
- export declare function wrapUnlockRecord({ controller, email, pointer, delegation, ladderSeed, keyAgreementKey, signer, bindingMacKey, createdAt }: {
132
+ export declare function wrapUnlockRecord({ controller, email, pointer, delegation, delegatedClients, ladderSeed, keyAgreementKey, signer, bindingMacKey, createdAt }: {
126
133
  controller: string;
127
134
  email?: string;
128
135
  pointer: AccountPointer;
129
136
  delegation: IZcap;
137
+ delegatedClients?: IZcap;
130
138
  ladderSeed?: Uint8Array;
131
139
  keyAgreementKey: IKeyAgreementKey;
132
140
  signer: RecordSigner;
@@ -177,15 +185,23 @@ export declare function unwrapUnlockRecord({ record, keyAgreementKey, keyResolve
177
185
  proofState: UnlockRecordProofState;
178
186
  }>;
179
187
  /**
180
- * Re-mints an unlock record's bridge: the revocation-cascade path that
181
- * replaces a rotted or expiring delegation while touching nothing else. The
188
+ * Re-mints an unlock record's pre-minted delegations: the revocation-cascade
189
+ * path that replaces a rotted or expiring bridge (and, where the record
190
+ * carries one, its companion-Space sibling) while touching nothing else. The
182
191
  * shell, the ladder member, and the binding are carried VERBATIM (the re-mint
183
192
  * cannot decrypt any of them and does not need to -- each is self-contained
184
- * and the binding covers the core), a fresh bridge is sealed to the
193
+ * and the binding covers the core), the fresh delegations are sealed to the
185
194
  * credential's unlock KAK public half, and the frame is re-signed by the
186
195
  * acting client's account key -- the mixed-signer case the reader settles
187
196
  * against the verified document.
188
197
  *
198
+ * The two members rot on one axis (same signer, same current-key-set rule,
199
+ * same renewal window), so a re-mint pass reseals both atomically; a
200
+ * `delegatedClients` member the caller supplies no fresh delegation for is
201
+ * carried verbatim, sealed as it stands (self-contained, like the ladder) --
202
+ * the fallback for a pass that cannot rebuild the companion target, never
203
+ * the intended steady state.
204
+ *
189
205
  * A record with no binding cannot be re-minted ({@link UnlockBindingError});
190
206
  * its credential must be rebound.
191
207
  *
@@ -193,14 +209,18 @@ export declare function unwrapUnlockRecord({ record, keyAgreementKey, keyResolve
193
209
  * @param options.record {unknown} the standing stored record
194
210
  * @param options.delegation {IZcap} the freshly minted `did.jsonl`
195
211
  * delegation
212
+ * @param [options.delegatedClients] {IZcap} the freshly minted
213
+ * companion-Space delegation; when absent, an existing `delegatedClients`
214
+ * member travels verbatim
196
215
  * @param options.keyAgreementKey {IKeyAgreementKey} the credential's unlock
197
216
  * KAK, public half only
198
217
  * @param options.signer {RecordSigner} the acting client's account key
199
218
  * @returns {Promise<SignedUnlockRecord>}
200
219
  */
201
- export declare function remintUnlockRecordBridge({ record, delegation, keyAgreementKey, signer }: {
220
+ export declare function remintUnlockRecordDelegations({ record, delegation, delegatedClients, keyAgreementKey, signer }: {
202
221
  record: unknown;
203
222
  delegation: IZcap;
223
+ delegatedClients?: IZcap;
204
224
  keyAgreementKey: IKeyAgreementKey;
205
225
  signer: RecordSigner;
206
226
  }): Promise<SignedUnlockRecord>;
@@ -1 +1 @@
1
- {"version":3,"file":"unlockRecord.d.ts","sourceRoot":"","sources":["../../src/unlock/unlockRecord.ts"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,KAAK,EACN,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAc/D,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,YAAY,EACb,MAAM,sBAAsB,CAAA;AAW7B;;;;;;;;GAQG;AACH,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,oBAAoB,CAAA;IAChC,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,cAAc,CAAA;IACvB,UAAU,EAAE,KAAK,CAAA;IAC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