@interop/wallet-core 0.49.0 → 0.51.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 (163) hide show
  1. package/README.md +5 -2
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +127 -0
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -0
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +195 -0
  5. package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -0
  6. package/dist/clientAnnex/forget.d.ts +138 -0
  7. package/dist/clientAnnex/forget.d.ts.map +1 -0
  8. package/dist/clientAnnex/forget.js +133 -0
  9. package/dist/clientAnnex/forget.js.map +1 -0
  10. package/dist/clientAnnex/forgetLast.d.ts +291 -0
  11. package/dist/clientAnnex/forgetLast.d.ts.map +1 -0
  12. package/dist/clientAnnex/forgetLast.js +408 -0
  13. package/dist/clientAnnex/forgetLast.js.map +1 -0
  14. package/dist/{webvh/companionGc.d.ts → clientAnnex/gc.d.ts} +50 -16
  15. package/dist/clientAnnex/gc.d.ts.map +1 -0
  16. package/dist/{webvh/companionGc.js → clientAnnex/gc.js} +103 -71
  17. package/dist/clientAnnex/gc.js.map +1 -0
  18. package/dist/clientAnnex/index.d.ts +60 -0
  19. package/dist/clientAnnex/index.d.ts.map +1 -0
  20. package/dist/clientAnnex/index.js +60 -0
  21. package/dist/clientAnnex/index.js.map +1 -0
  22. package/dist/{unlock → clientAnnex}/ladder.d.ts +89 -15
  23. package/dist/clientAnnex/ladder.d.ts.map +1 -0
  24. package/dist/clientAnnex/ladder.js +474 -0
  25. package/dist/clientAnnex/ladder.js.map +1 -0
  26. package/dist/clientAnnex/ladderAnchored.d.ts +276 -0
  27. package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -0
  28. package/dist/clientAnnex/ladderAnchored.js +631 -0
  29. package/dist/clientAnnex/ladderAnchored.js.map +1 -0
  30. package/dist/{webvh/companion.d.ts → clientAnnex/log.d.ts} +333 -119
  31. package/dist/clientAnnex/log.d.ts.map +1 -0
  32. package/dist/{webvh/companion.js → clientAnnex/log.js} +583 -199
  33. package/dist/clientAnnex/log.js.map +1 -0
  34. package/dist/clientAnnex/recoveryLadderAnchored.d.ts +103 -0
  35. package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -0
  36. package/dist/clientAnnex/recoveryLadderAnchored.js +263 -0
  37. package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -0
  38. package/dist/{unlock → clientAnnex}/selfEnroll.d.ts +1 -1
  39. package/dist/clientAnnex/selfEnroll.d.ts.map +1 -0
  40. package/dist/{unlock → clientAnnex}/selfEnroll.js +1 -1
  41. package/dist/clientAnnex/selfEnroll.js.map +1 -0
  42. package/dist/clientAnnex/zcap.d.ts +49 -0
  43. package/dist/clientAnnex/zcap.d.ts.map +1 -0
  44. package/dist/clientAnnex/zcap.js +101 -0
  45. package/dist/clientAnnex/zcap.js.map +1 -0
  46. package/dist/clients/index.d.ts +9 -6
  47. package/dist/clients/index.d.ts.map +1 -1
  48. package/dist/clients/index.js +8 -5
  49. package/dist/clients/index.js.map +1 -1
  50. package/dist/clients/listing.d.ts +32 -0
  51. package/dist/clients/listing.d.ts.map +1 -1
  52. package/dist/clients/listing.js +47 -1
  53. package/dist/clients/listing.js.map +1 -1
  54. package/dist/clients/revocation.d.ts +33 -1
  55. package/dist/clients/revocation.d.ts.map +1 -1
  56. package/dist/clients/revocation.js +16 -4
  57. package/dist/clients/revocation.js.map +1 -1
  58. package/dist/enrollment/index.d.ts +6 -4
  59. package/dist/enrollment/index.d.ts.map +1 -1
  60. package/dist/enrollment/index.js +6 -4
  61. package/dist/enrollment/index.js.map +1 -1
  62. package/dist/enrollment/onboardingInvite.d.ts +5 -88
  63. package/dist/enrollment/onboardingInvite.d.ts.map +1 -1
  64. package/dist/enrollment/onboardingInvite.js +5 -168
  65. package/dist/enrollment/onboardingInvite.js.map +1 -1
  66. package/dist/genesis/accountGenesis.d.ts +12 -0
  67. package/dist/genesis/accountGenesis.d.ts.map +1 -1
  68. package/dist/genesis/accountGenesis.js.map +1 -1
  69. package/dist/genesis/index.d.ts +5 -0
  70. package/dist/genesis/index.d.ts.map +1 -1
  71. package/dist/genesis/index.js +5 -0
  72. package/dist/genesis/index.js.map +1 -1
  73. package/dist/keys/index.d.ts +1 -1
  74. package/dist/keys/index.d.ts.map +1 -1
  75. package/dist/keys/index.js +1 -1
  76. package/dist/keys/index.js.map +1 -1
  77. package/dist/keys/spaceEpochs.d.ts +7 -2
  78. package/dist/keys/spaceEpochs.d.ts.map +1 -1
  79. package/dist/keys/spaceEpochs.js +8 -2
  80. package/dist/keys/spaceEpochs.js.map +1 -1
  81. package/dist/keys/userKeyRoster.d.ts +39 -0
  82. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  83. package/dist/keys/userKeyRoster.js +43 -1
  84. package/dist/keys/userKeyRoster.js.map +1 -1
  85. package/dist/recovery/index.d.ts +5 -3
  86. package/dist/recovery/index.d.ts.map +1 -1
  87. package/dist/recovery/index.js +4 -2
  88. package/dist/recovery/index.js.map +1 -1
  89. package/dist/recovery/recoveryDelegation.d.ts +35 -12
  90. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  91. package/dist/recovery/recoveryDelegation.js +84 -86
  92. package/dist/recovery/recoveryDelegation.js.map +1 -1
  93. package/dist/recovery/recoveryWebvh.d.ts +32 -1
  94. package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
  95. package/dist/recovery/recoveryWebvh.js +2 -2
  96. package/dist/recovery/recoveryWebvh.js.map +1 -1
  97. package/dist/request/capabilityRequest.d.ts +33 -0
  98. package/dist/request/capabilityRequest.d.ts.map +1 -0
  99. package/dist/request/capabilityRequest.js +35 -0
  100. package/dist/request/capabilityRequest.js.map +1 -0
  101. package/dist/request/ephemeralExchange.d.ts +118 -0
  102. package/dist/request/ephemeralExchange.d.ts.map +1 -0
  103. package/dist/request/ephemeralExchange.js +224 -0
  104. package/dist/request/ephemeralExchange.js.map +1 -0
  105. package/dist/request/index.d.ts +6 -0
  106. package/dist/request/index.d.ts.map +1 -1
  107. package/dist/request/index.js +6 -0
  108. package/dist/request/index.js.map +1 -1
  109. package/dist/space/activity.d.ts +2 -2
  110. package/dist/space/activity.js +3 -3
  111. package/dist/space/activity.js.map +1 -1
  112. package/dist/unlock/index.d.ts +11 -23
  113. package/dist/unlock/index.d.ts.map +1 -1
  114. package/dist/unlock/index.js +10 -21
  115. package/dist/unlock/index.js.map +1 -1
  116. package/dist/unlock/retire.d.ts +47 -3
  117. package/dist/unlock/retire.d.ts.map +1 -1
  118. package/dist/unlock/retire.js +21 -5
  119. package/dist/unlock/retire.js.map +1 -1
  120. package/dist/unlock/standingWebvh.d.ts +37 -82
  121. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  122. package/dist/unlock/standingWebvh.js +64 -247
  123. package/dist/unlock/standingWebvh.js.map +1 -1
  124. package/dist/unlock/unlockRecord.d.ts +13 -6
  125. package/dist/unlock/unlockRecord.d.ts.map +1 -1
  126. package/dist/unlock/unlockRecord.js +14 -8
  127. package/dist/unlock/unlockRecord.js.map +1 -1
  128. package/dist/webvh/delegatedLogStore.d.ts +5 -5
  129. package/dist/webvh/delegatedLogStore.js +1 -1
  130. package/dist/webvh/didWebvh.d.ts +19 -9
  131. package/dist/webvh/didWebvh.d.ts.map +1 -1
  132. package/dist/webvh/didWebvh.js +16 -16
  133. package/dist/webvh/didWebvh.js.map +1 -1
  134. package/dist/webvh/index.d.ts +9 -25
  135. package/dist/webvh/index.d.ts.map +1 -1
  136. package/dist/webvh/index.js +9 -23
  137. package/dist/webvh/index.js.map +1 -1
  138. package/dist/webvh/revokeClient.d.ts +77 -5
  139. package/dist/webvh/revokeClient.d.ts.map +1 -1
  140. package/dist/webvh/revokeClient.js +154 -61
  141. package/dist/webvh/revokeClient.js.map +1 -1
  142. package/dist/webvh/standingZcap.d.ts +11 -1
  143. package/dist/webvh/standingZcap.d.ts.map +1 -1
  144. package/dist/webvh/standingZcap.js +13 -14
  145. package/dist/webvh/standingZcap.js.map +1 -1
  146. package/dist/webvh/wasIdStore.d.ts +13 -7
  147. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  148. package/dist/webvh/wasIdStore.js +8 -4
  149. package/dist/webvh/wasIdStore.js.map +1 -1
  150. package/dist/webvh/zcap.d.ts +0 -24
  151. package/dist/webvh/zcap.d.ts.map +1 -1
  152. package/dist/webvh/zcap.js +0 -42
  153. package/dist/webvh/zcap.js.map +1 -1
  154. package/package.json +41 -35
  155. package/dist/unlock/ladder.d.ts.map +0 -1
  156. package/dist/unlock/ladder.js +0 -258
  157. package/dist/unlock/ladder.js.map +0 -1
  158. package/dist/unlock/selfEnroll.d.ts.map +0 -1
  159. package/dist/unlock/selfEnroll.js.map +0 -1
  160. package/dist/webvh/companion.d.ts.map +0 -1
  161. package/dist/webvh/companion.js.map +0 -1
  162. package/dist/webvh/companionGc.d.ts.map +0 -1
  163. package/dist/webvh/companionGc.js.map +0 -1
@@ -6,10 +6,13 @@
6
6
  * surface -- the place "disconnect this wallet" lives -- and the cascades
7
7
  * behind it.
8
8
  *
9
- * - `listAccountClients` / `currentAccountSigningKeys` -- the listing over the
10
- * locally verified did:webvh log, with display labels merged, and the same
11
- * read reduced to the key set an app grant's delegation signer is checked
12
- * against. Both take an already-verified log in place of fetching one.
9
+ * - `listAccountClients` / `currentAccountSigningKeys` /
10
+ * `currentAccountRecordSigners` -- the listing over the locally verified
11
+ * did:webvh log, with display labels merged; the same read reduced to the
12
+ * key set an app grant's delegation signer is checked against; and that
13
+ * set widened by the document's ladder VMs, the allowlist a re-minted
14
+ * unlock or recovery record's proof is settled against. All take an
15
+ * already-verified log in place of fetching one.
13
16
  * - `disconnectEligibility` / `revokedClientKeysFor` / `cascadeCompletion` --
14
17
  * the disconnect-eligibility policy as data and pure functions, so both
15
18
  * surfaces refuse the same rows for the same reasons and report a partial
@@ -24,12 +27,12 @@
24
27
  * convergence of the roster onto the account document (recipients, then
25
28
  * the roster log's seal).
26
29
  */
27
- export { currentAccountSigningKeys, listAccountClients } from './listing.js';
30
+ export { currentAccountRecordSigners, currentAccountSigningKeys, listAccountClients } from './listing.js';
28
31
  export type { AccountClientView, AccountLogPointer, VerifiedAccountLog } from './listing.js';
29
32
  export { cascadeCompletion, disconnectEligibility, revokedClientKeysFor } from './policy.js';
30
33
  export type { DisconnectRefusal } from './policy.js';
31
34
  export { revokeAccountClient } from './revocation.js';
32
- export type { CascadeCollections, ClientRevocationResult, RosterSealReport } from './revocation.js';
35
+ export type { CascadeCollections, ClientRevocationResult, GenerationDelegationRemint, RosterSealReport } from './revocation.js';
33
36
  export { checkUserKeyRosterAtLogin, convergeUserKeyRosterToAccount } from './rosterPolicy.js';
34
37
  export type { AdoptedUserKey } from './rosterPolicy.js';
35
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAC5E,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,aAAa,CAAA;AACpB,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,aAAa,CAAA;AACpB,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA"}
@@ -6,10 +6,13 @@
6
6
  * surface -- the place "disconnect this wallet" lives -- and the cascades
7
7
  * behind it.
8
8
  *
9
- * - `listAccountClients` / `currentAccountSigningKeys` -- the listing over the
10
- * locally verified did:webvh log, with display labels merged, and the same
11
- * read reduced to the key set an app grant's delegation signer is checked
12
- * against. Both take an already-verified log in place of fetching one.
9
+ * - `listAccountClients` / `currentAccountSigningKeys` /
10
+ * `currentAccountRecordSigners` -- the listing over the locally verified
11
+ * did:webvh log, with display labels merged; the same read reduced to the
12
+ * key set an app grant's delegation signer is checked against; and that
13
+ * set widened by the document's ladder VMs, the allowlist a re-minted
14
+ * unlock or recovery record's proof is settled against. All take an
15
+ * already-verified log in place of fetching one.
13
16
  * - `disconnectEligibility` / `revokedClientKeysFor` / `cascadeCompletion` --
14
17
  * the disconnect-eligibility policy as data and pure functions, so both
15
18
  * surfaces refuse the same rows for the same reasons and report a partial
@@ -24,7 +27,7 @@
24
27
  * convergence of the roster onto the account document (recipients, then
25
28
  * the roster log's seal).
26
29
  */
27
- export { currentAccountSigningKeys, listAccountClients } from './listing.js';
30
+ export { currentAccountRecordSigners, currentAccountSigningKeys, listAccountClients } from './listing.js';
28
31
  export { cascadeCompletion, disconnectEligibility, revokedClientKeysFor } from './policy.js';
29
32
  export { revokeAccountClient } from './revocation.js';
30
33
  export { checkUserKeyRosterAtLogin, convergeUserKeyRosterToAccount } from './rosterPolicy.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAO5E,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,aAAa,CAAA;AAGpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAOrD,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/clients/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,cAAc,CAAA;AAOrB,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,aAAa,CAAA;AAGpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAQrD,OAAO,EACL,yBAAyB,EACzB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA"}
@@ -108,4 +108,36 @@ export declare function currentAccountSigningKeys({ pointer, verifiedLog, accoun
108
108
  verifiedLog?: VerifiedAccountLog;
109
109
  accountLogPinStore?: ResourceLogPinStore;
110
110
  }): Promise<Set<string>>;
111
+ /**
112
+ * The keys the locally verified document backs as the signer of a RE-MINTED
113
+ * unlock or recovery record -- the allowlist a reader settles a record's
114
+ * mixed-signer proof against once the record is decrypted and its pointer
115
+ * names this account. It is {@link currentAccountSigningKeys} (every
116
+ * enrolled client's signing key: the revocation cascade's and the login-time
117
+ * refresh's re-mint signer) plus the ladder VMs the document lists (the
118
+ * last-client forget's re-mint signer -- on a client-less account the ladder
119
+ * VM is the only key left that can re-sign a record, and a reader that
120
+ * refused it would refuse every other unlock method's record after the
121
+ * transition). The ladder VM is recognized by the relation asymmetry
122
+ * (`ladderVmIds`), never by a marker. Same fetch-or-verified-log contract as
123
+ * its sibling.
124
+ *
125
+ * Deliberately NOT the app-grant check's key set: an app grant's delegation
126
+ * signer must be an enrolled client (or, from a transient session, the annex
127
+ * key under the generation delegation), and widening that listing to the
128
+ * ladder VM would misread the transition state.
129
+ *
130
+ * @param options {object}
131
+ * @param options.pointer {AccountLogPointer}
132
+ * @param [options.verifiedLog] {VerifiedAccountLog} an already-verified log
133
+ * to read instead of fetching and verifying one
134
+ * @param [options.accountLogPinStore] {ResourceLogPinStore} this client's
135
+ * chain-head pin for the account log, checked when the log is fetched here
136
+ * @returns {Promise<Set<string>>} public key multibases
137
+ */
138
+ export declare function currentAccountRecordSigners({ pointer, verifiedLog, accountLogPinStore }: {
139
+ pointer: AccountLogPointer;
140
+ verifiedLog?: VerifiedAccountLog;
141
+ accountLogPinStore?: ResourceLogPinStore;
142
+ }): Promise<Set<string>>;
111
143
  //# sourceMappingURL=listing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"listing.d.ts","sourceRoot":"","sources":["../../src/clients/listing.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAEL,gBAAgB,EAChB,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAC3E,OAA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;GA0BG;AACH,wBAAsB,2BAA2B,CAAC,EAChD,OAAO,EACP,WAAW,EACX,kBAAkB,EACnB,EAAE;IACD,OAAO,EAAE,iBAAiB,CAAA;IAC1B,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAChC,kBAAkB,CAAC,EAAE,mBAAmB,CAAA;CACzC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAkBvB"}
@@ -26,7 +26,8 @@
26
26
  * re-verifying `did.jsonl` per surface. Whether such a cache is safe to hold,
27
27
  * and what invalidates it, is the caller's call.
28
28
  */
29
- import { listEnrolledWebvhClients, verifyAccountLog } from '../webvh/index.js';
29
+ import { ladderVmIds, listEnrolledWebvhClients, verifyAccountLog } from '../webvh/index.js';
30
+ import { vmFragmentOf } from '../resourceLog/index.js';
30
31
  import { readClientLabels } from '../keys/index.js';
31
32
  /**
32
33
  * Lists the wallet clients enrolled on an account, from the locally verified
@@ -95,4 +96,49 @@ export async function currentAccountSigningKeys({ pointer, verifiedLog, accountL
95
96
  }));
96
97
  return new Set(listEnrolledWebvhClients({ log }).map(client => client.signingKeyMultibase));
97
98
  }
99
+ /**
100
+ * The keys the locally verified document backs as the signer of a RE-MINTED
101
+ * unlock or recovery record -- the allowlist a reader settles a record's
102
+ * mixed-signer proof against once the record is decrypted and its pointer
103
+ * names this account. It is {@link currentAccountSigningKeys} (every
104
+ * enrolled client's signing key: the revocation cascade's and the login-time
105
+ * refresh's re-mint signer) plus the ladder VMs the document lists (the
106
+ * last-client forget's re-mint signer -- on a client-less account the ladder
107
+ * VM is the only key left that can re-sign a record, and a reader that
108
+ * refused it would refuse every other unlock method's record after the
109
+ * transition). The ladder VM is recognized by the relation asymmetry
110
+ * (`ladderVmIds`), never by a marker. Same fetch-or-verified-log contract as
111
+ * its sibling.
112
+ *
113
+ * Deliberately NOT the app-grant check's key set: an app grant's delegation
114
+ * signer must be an enrolled client (or, from a transient session, the annex
115
+ * key under the generation delegation), and widening that listing to the
116
+ * ladder VM would misread the transition state.
117
+ *
118
+ * @param options {object}
119
+ * @param options.pointer {AccountLogPointer}
120
+ * @param [options.verifiedLog] {VerifiedAccountLog} an already-verified log
121
+ * to read instead of fetching and verifying one
122
+ * @param [options.accountLogPinStore] {ResourceLogPinStore} this client's
123
+ * chain-head pin for the account log, checked when the log is fetched here
124
+ * @returns {Promise<Set<string>>} public key multibases
125
+ */
126
+ export async function currentAccountRecordSigners({ pointer, verifiedLog, accountLogPinStore }) {
127
+ const verified = verifiedLog ??
128
+ (await verifyAccountLog({
129
+ ...pointer,
130
+ ...(accountLogPinStore ? { pinStore: accountLogPinStore } : {})
131
+ }));
132
+ const keys = await currentAccountSigningKeys({
133
+ pointer,
134
+ verifiedLog: verified
135
+ });
136
+ for (const id of ladderVmIds({ doc: verified.doc })) {
137
+ const multibase = vmFragmentOf(id);
138
+ if (multibase !== undefined) {
139
+ keys.add(multibase);
140
+ }
141
+ }
142
+ return keys;
143
+ }
98
144
  //# sourceMappingURL=listing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"listing.js","sourceRoot":"","sources":["../../src/clients/listing.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAEjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,gBAAgB,EAA0B,MAAM,kBAAkB,CAAA;AAmC3E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,EACvC,OAAO,EACP,WAAW,EACX,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EAOnB;IACC,yEAAyE;IACzE,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC1C,WAAW;YACT,gBAAgB,CAAC;gBACf,GAAG,OAAO;gBACV,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAA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,CAAC;YAC5B,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;QACrB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
@@ -44,6 +44,17 @@
44
44
  * signed stopped chaining at stage 1, so a wallet that issues recovery
45
45
  * codes re-mints them here -- while the registry is still readable under
46
46
  * the session's pre-adoption vault keys.
47
+ * 5. **The generation-delegation re-mint** (optional, mirroring stage 4 as a
48
+ * client-annex log entry replacing the service entry): revoking the durable
49
+ * client that minted the current annex generation's delegation kills
50
+ * it under the same current-key-set rule, and without this stage the
51
+ * death is silent mid-generation. The injected closure runs the
52
+ * signer-death axis of `ensureGenerationDelegationCurrent` against the
53
+ * post-edit document; it runs even when the account has no roster (the
54
+ * document edit alone is what rots the delegation). What the stage does
55
+ * not cover -- App Connect grants a transient session minted under the
56
+ * old delegation -- stays dead: mid-generation grant death is a stated
57
+ * consequence of ordinary disconnects, healed by the app reconnecting.
47
58
  *
48
59
  * The revoking session then adopts the fresh key in place (`onRotationAdopted`
49
60
  * -- profile vault keys, storage ciphers, engine restarts: whatever "in place"
@@ -64,6 +75,19 @@ import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
64
75
  import { type ClientWebvhUpdateKeys, type PublishedKeyDocument, type RevokedClientKeys, type WebvhIdStore } from '../webvh/index.js';
65
76
  import { type CascadeCollections, type RosterSealReport, type UserKey, type UserKeyCascadeResult } from '../keys/index.js';
66
77
  export type { CascadeCollections, RosterSealReport };
78
+ /**
79
+ * What the generation-delegation re-mint stage reports: whether an annex
80
+ * entry replaced the service entry's delegation on this run, and -- when the
81
+ * stage could not run -- why it was skipped (`no-pointer`: the account has no
82
+ * annex posture; `no-ladder-seed`: the session holds no ladder seed to
83
+ * sign the annex entry with; `failed`: the closure's own best-effort
84
+ * catch, reported rather than thrown so the cascade's remedy stages never
85
+ * abort on it).
86
+ */
87
+ export interface GenerationDelegationRemint {
88
+ renewed: boolean;
89
+ skipped?: 'no-pointer' | 'no-ladder-seed' | 'failed';
90
+ }
67
91
  /**
68
92
  * What a completed cascade reports: whether the roster actually rotated on
69
93
  * this run (a re-run of an already-complete revocation reports `false`), the
@@ -82,6 +106,7 @@ export interface ClientRevocationResult {
82
106
  reminted: number;
83
107
  skipped: number;
84
108
  };
109
+ generation?: GenerationDelegationRemint;
85
110
  }
86
111
  /**
87
112
  * Runs the whole revocation cascade for one enrolled wallet client. See the
@@ -130,12 +155,16 @@ export interface ClientRevocationResult {
130
155
  * @param [options.remintRecoveryDelegations] {Function} `({ document }) =>
131
156
  * Promise<{ reminted, skipped }>` -- the recovery-delegation re-mint stage,
132
157
  * for a wallet that issues recovery codes
158
+ * @param [options.remintGenerationDelegation] {Function} `({ document }) =>
159
+ * Promise<GenerationDelegationRemint>` -- the generation-delegation
160
+ * re-mint stage, run against the post-edit document (stage 5 in the module
161
+ * doc); expected to catch its own failures and report them
133
162
  * @param [options.onRotationAdopted] {Function} `({ userKey }) => Promise<void>`
134
163
  * -- the live-session adoption of a rotated key, run last so the session
135
164
  * keeps operating without a re-login
136
165
  * @returns {Promise<ClientRevocationResult>}
137
166
  */
138
- export declare function revokeAccountClient({ idStore, updateKeys, revokedClient, knownLatentHashes, expectedDid, ownSigningKeyMultibase, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, remintRecoveryDelegations, onRotationAdopted }: {
167
+ export declare function revokeAccountClient({ idStore, updateKeys, revokedClient, knownLatentHashes, expectedDid, ownSigningKeyMultibase, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, remintRecoveryDelegations, remintGenerationDelegation, onRotationAdopted }: {
139
168
  idStore: WebvhIdStore;
140
169
  updateKeys: ClientWebvhUpdateKeys;
141
170
  revokedClient: RevokedClientKeys;
@@ -158,6 +187,9 @@ export declare function revokeAccountClient({ idStore, updateKeys, revokedClient
158
187
  reminted: number;
159
188
  skipped: number;
160
189
  }>;
190
+ remintGenerationDelegation?: (options: {
191
+ document: PublishedKeyDocument;
192
+ }) => Promise<GenerationDelegationRemint>;
161
193
  onRotationAdopted?: (rotation: {
162
194
  userKey: UserKey;
163
195
  }) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"revocation.d.ts","sourceRoot":"","sources":["../../src/clients/revocation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,OAAO,EACZ,KAAK,oBAAoB,EAC1B,MAAM,kBAAkB,CAAA;AAEzB,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,CAAA;AAEpD;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,CAAC,EAAE,gBAAgB,CAAA;IAC7B,WAAW,EAAE,oBAAoB,CAAA;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gBAAgB,CAAC,EAAE,oBAAoB,CAAA;IACvC,QAAQ,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CACjD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,OAAO,EACP,UAA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keys/index.js';
47
47
  * @param [options.remintRecoveryDelegations] {Function} `({ document }) =>
48
48
  * Promise<{ reminted, skipped }>` -- the recovery-delegation re-mint stage,
49
49
  * for a wallet that issues recovery codes
50
+ * @param [options.remintGenerationDelegation] {Function} `({ document }) =>
51
+ * Promise<GenerationDelegationRemint>` -- the generation-delegation
52
+ * re-mint stage, run against the post-edit document (stage 5 in the module
53
+ * doc); expected to catch its own failures and report them
50
54
  * @param [options.onRotationAdopted] {Function} `({ userKey }) => Promise<void>`
51
55
  * -- the live-session adoption of a rotated key, run last so the session
52
56
  * keeps operating without a re-login
53
57
  * @returns {Promise<ClientRevocationResult>}
54
58
  */
55
- export async function revokeAccountClient({ idStore, updateKeys, revokedClient, knownLatentHashes, expectedDid, ownSigningKeyMultibase, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, remintRecoveryDelegations, onRotationAdopted }) {
59
+ export async function revokeAccountClient({ idStore, updateKeys, revokedClient, knownLatentHashes, expectedDid, ownSigningKeyMultibase, rosterStore, userKey, clientKeyAgreementKey, pinnedEpochId, onUserKeyAdopted, collections, remintRecoveryDelegations, remintGenerationDelegation, onRotationAdopted }) {
56
60
  if (ownSigningKeyMultibase &&
57
61
  ownSigningKeyMultibase === revokedClient.signingKeyMultibase) {
58
62
  throw new Error('This wallet cannot disconnect itself; use another enrolled wallet ' +
@@ -88,16 +92,23 @@ export async function revokeAccountClient({ idStore, updateKeys, revokedClient,
88
92
  });
89
93
  if (!tail.rosterDescriptor || !tail.userKey) {
90
94
  // No roster to rotate: the document edit has landed, so the client IS
91
- // disconnected -- a completed cascade with nothing rotated.
95
+ // disconnected -- a completed cascade with nothing rotated. The
96
+ // generation-delegation re-mint still runs: the edit alone is what rots
97
+ // the delegation, roster or no roster.
98
+ const generation = await remintGenerationDelegation?.({ document: doc });
92
99
  return {
93
100
  rotated: false,
94
101
  collections: tail.collections,
95
- document: doc
102
+ document: doc,
103
+ ...(generation ? { generation } : {})
96
104
  };
97
105
  }
98
106
  // 4. The recovery re-mints, while the registry is still readable under the
99
107
  // session's pre-adoption vault keys.
100
108
  const recovery = await remintRecoveryDelegations?.({ document: doc });
109
+ // 5. The generation-delegation re-mint, against the same post-edit
110
+ // document.
111
+ const generation = await remintGenerationDelegation?.({ document: doc });
101
112
  if (tail.rotated) {
102
113
  await onRotationAdopted?.({ userKey: tail.userKey });
103
114
  }
@@ -108,7 +119,8 @@ export async function revokeAccountClient({ idStore, updateKeys, revokedClient,
108
119
  document: doc,
109
120
  userKey: tail.userKey,
110
121
  rosterDescriptor: tail.rosterDescriptor,
111
- ...(recovery ? { recovery } : {})
122
+ ...(recovery ? { recovery } : {}),
123
+ ...(generation ? { generation } : {})
112
124
  };
113
125
  }
114
126
  //# sourceMappingURL=revocation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"revocation.js","sourceRoot":"","sources":["../../src/clients/revocation.ts"],"names":[],"mappings":"AA+DA,OAAO,EACL,iBAAiB,EAKlB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,gCAAgC,EAKjC,MAAM,kBAAkB,CAAA;AAqBzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,EACxC,OAAO,EACP,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,sBAAsB,EACtB,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,yBAAyB,EACzB,iBAAiB,EAsBlB;IACC,IACE,sBAAsB;QACtB,sBAAsB,KAAK,aAAa,CAAC,mBAAmB,EAC5D,CAAC;QACD,MAAM,IAAI,KAAK,CACb,oEAAoE;YAClE,sCAAsC,CACzC,CAAA;IACH,CAAC;IACD,IAAI,CAAC,aAAa,CAAC,kBAAkB,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CACb,oEAAoE;YAClE,8CAA8C,CACj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AE,CAAC,CAAA;IACtD,CAAC;IAED,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3D,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,QAAQ,EAAE,GAAG;QACb,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClC,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"revocation.js","sourceRoot":"","sources":["../../src/clients/revocation.ts"],"names":[],"mappings":"AA0EA,OAAO,EACL,iBAAiB,EAKlB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,gCAAgC,EAKjC,MAAM,kBAAkB,CAAA;AAoCzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,EACxC,OAAO,EACP,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,WAAW,EACX,sBAAsB,EACtB,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,WAAW,EACX,yBAAyB,EACzB,0BAA0B,EAC1B,iBAAiB,EAyBlB;IACC,IACE,sBAAsB;QACtB,sBAAsB,KAAK,aAAa,CAAC,mBAAmB,EAC5D,CAAC;QACD,MAAM,IAAI,KAAK,CACb,oEAAoE;YAClE,sCAAsC,CACzC,CAAA;IACH,CAAC;IACD,IAAI,CAAC,aAAa,CAAC,kBAAkB,EAAE,CAAC;QACtC,MAAM,IAAI,KAAK,CACb,oEAAoE;YAClE,8CAA8C,CACjD,CAAA;IACH,CAAC;IAED,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AAG,MAAM,yBAAyB,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAA;IAErE,mEAAmE;IACnE,YAAY;IACZ,MAAM,UAAU,GAAG,MAAM,0BAA0B,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAA;IAExE,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,MAAM,iBAAiB,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;IACtD,CAAC;IAED,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3D,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,QAAQ,EAAE,GAAG;QACb,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtC,CAAA;AACH,CAAC"}
@@ -20,9 +20,11 @@
20
20
  * response envelope, the transport that carries a connect code (verbatim)
21
21
  * plus a suggested display label back over an exchange whose request asked
22
22
  * with a `WalletOnboardingQuery` (`@interop/wallet-core/request`).
23
- * - `createOnboardingExchange` / `pollOnboardingExchange` -- the inviter's
24
- * transport for that same exchange: creating the ephemeral exchange that
25
- * carries the query, and polling it until the response envelope arrives.
23
+ * - `ONBOARDING_INVITE_TTL_MS` -- how long a wallet offers an invite for. The
24
+ * invite's transport (creating the ephemeral exchange that carries the
25
+ * query, polling it until the envelope arrives) is the generic requester in
26
+ * `@interop/wallet-core/request` (`createEphemeralExchange` /
27
+ * `pollEphemeralExchange`).
26
28
  * - `completeEnrollmentCore` -- the enrollee's half: verify from the published
27
29
  * log, read the roster, hand back the user key and the epoch to pin. Persisting
28
30
  * the key set stays with the caller's own unlock layer.
@@ -32,5 +34,5 @@ export type { EnrollmentRequest } from './enrollment.js';
32
34
  export { CONNECT_CODE_PREFIX, isConnectCode } from './connectCode.js';
33
35
  export { encodeOnboardingResponse, ONBOARDING_LABEL_MAX_LENGTH, ONBOARDING_RESPONSE_VERSION, parseOnboardingResponse } from './onboardingResponse.js';
34
36
  export type { WalletOnboardingResponse } from './onboardingResponse.js';
35
- export { createOnboardingExchange, ONBOARDING_INTERACTION_PATH, ONBOARDING_INVITE_TTL_MS, ONBOARDING_POLL_INTERVAL_MS, OnboardingExchangeGoneError, pollOnboardingExchange } from './onboardingInvite.js';
37
+ export { ONBOARDING_INVITE_TTL_MS } from './onboardingInvite.js';
36
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enrollment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,iBAAiB,EACjB,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,yBAAyB,CAAA;AAChC,YAAY,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AACvE,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACvB,MAAM,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enrollment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,iBAAiB,EACjB,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,yBAAyB,CAAA;AAChC,YAAY,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA"}
@@ -20,9 +20,11 @@
20
20
  * response envelope, the transport that carries a connect code (verbatim)
21
21
  * plus a suggested display label back over an exchange whose request asked
22
22
  * with a `WalletOnboardingQuery` (`@interop/wallet-core/request`).
23
- * - `createOnboardingExchange` / `pollOnboardingExchange` -- the inviter's
24
- * transport for that same exchange: creating the ephemeral exchange that
25
- * carries the query, and polling it until the response envelope arrives.
23
+ * - `ONBOARDING_INVITE_TTL_MS` -- how long a wallet offers an invite for. The
24
+ * invite's transport (creating the ephemeral exchange that carries the
25
+ * query, polling it until the envelope arrives) is the generic requester in
26
+ * `@interop/wallet-core/request` (`createEphemeralExchange` /
27
+ * `pollEphemeralExchange`).
26
28
  * - `completeEnrollmentCore` -- the enrollee's half: verify from the published
27
29
  * log, read the roster, hand back the user key and the epoch to pin. Persisting
28
30
  * the key set stays with the caller's own unlock layer.
@@ -30,5 +32,5 @@
30
32
  export { approveEnrollment, assertCanonicalEnrollmentKeys, completeEnrollmentCore, encodeEnrollmentRequest, EnrollmentPendingError, enrollmentClientDid, enrollmentRecipientKid, mintEnrollmentRequest, parseEnrollmentRequest } from './enrollment.js';
31
33
  export { CONNECT_CODE_PREFIX, isConnectCode } from './connectCode.js';
32
34
  export { encodeOnboardingResponse, ONBOARDING_LABEL_MAX_LENGTH, ONBOARDING_RESPONSE_VERSION, parseOnboardingResponse } from './onboardingResponse.js';
33
- export { createOnboardingExchange, ONBOARDING_INTERACTION_PATH, ONBOARDING_INVITE_TTL_MS, ONBOARDING_POLL_INTERVAL_MS, OnboardingExchangeGoneError, pollOnboardingExchange } from './onboardingInvite.js';
35
+ export { ONBOARDING_INVITE_TTL_MS } from './onboardingInvite.js';
34
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enrollment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EACL,iBAAiB,EACjB,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACvB,MAAM,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enrollment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,iBAAiB,EACjB,6BAA6B,EAC7B,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA"}
@@ -2,98 +2,15 @@
2
2
  * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
3
  */
4
4
  /**
5
- * The inviter's half of the wallet-onboarding invite: creating an ephemeral
6
- * exchange on the WAS server that carries a `WalletOnboardingQuery`
7
- * (`@interop/wallet-core/request`) as its stored request, and polling that
8
- * exchange until the other wallet posts its response envelope
9
- * (`onboardingResponse.ts`). Pure logic -- no UI framework, no DOM, and no
10
- * module-level mutable state: every run is per-instance, cancelled through the
11
- * caller's `AbortSignal`, with the network transport injected.
12
- *
13
- * These routes are deliberately unauthenticated (a capability-URL posture: the
14
- * exchange URL is the secret, and it travels point-to-point through the QR
15
- * code), so nothing here signs a request.
5
+ * The wallet-onboarding invite's one policy constant. The invite's transport
6
+ * is the generic ephemeral-exchange requester in
7
+ * `@interop/wallet-core/request` (`createEphemeralExchange` /
8
+ * `pollEphemeralExchange`); what stays here is how long a wallet offers the
9
+ * invite for.
16
10
  */
17
- /**
18
- * How often the inviter polls the exchange for the enrollee's response.
19
- */
20
- export declare const ONBOARDING_POLL_INTERVAL_MS = 3000;
21
11
  /**
22
12
  * How long an invite is offered for, comfortably inside the server's
23
13
  * ten-minute exchange TTL so the countdown expires before the server does.
24
14
  */
25
15
  export declare const ONBOARDING_INVITE_TTL_MS: number;
26
- /**
27
- * The exchange path the interaction URL adds, with the interaction-URL
28
- * version query the other wallet's scanner expects.
29
- */
30
- export declare const ONBOARDING_INTERACTION_PATH = "/protocols?iuv=1";
31
- /**
32
- * The subset of `fetch` this module uses, so a caller (or a test) injects its
33
- * own transport instead of relying on the global.
34
- */
35
- type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
36
- /**
37
- * Raised when the exchange is no longer on the server (a `404`): it either
38
- * expired or was never created. The remedy is a fresh invite, so a caller
39
- * renders its "code expired" state. Dispatch on `err.name` rather than
40
- * `instanceof`: the transport is injected and may resolve to a different copy
41
- * of this package, which makes the name the stable contract.
42
- */
43
- export declare class OnboardingExchangeGoneError extends Error {
44
- constructor(message?: string);
45
- }
46
- /**
47
- * INVITER: creates an ephemeral exchange holding the onboarding request as its
48
- * stored request, and returns both the exchange URL (the inviter polls it) and
49
- * the interaction URL (the QR code carries it).
50
- *
51
- * The server relays the stored request verbatim as its reply to the begin
52
- * POST, so the VPR details are stored wrapped as a VC-API exchange response
53
- * (`{ verifiablePresentationRequest: request }`) -- the shape the joining
54
- * wallet's classifier reads.
55
- *
56
- * The exchange URL is read from the `Location` response header, falling back
57
- * to the body's `location` member -- deployments differ on which they set,
58
- * and either alone is enough.
59
- *
60
- * @param options {object}
61
- * @param options.serverUrl {string} the configured WAS server base URL
62
- * @param options.request {unknown} the VPR details to store
63
- * @param [options.fetch] {FetchLike}
64
- * @returns {Promise<{ exchangeUrl: string, interactionUrl: string }>}
65
- */
66
- export declare function createOnboardingExchange({ serverUrl, request, fetch: fetchImpl }: {
67
- serverUrl: string;
68
- request: unknown;
69
- fetch?: FetchLike;
70
- }): Promise<{
71
- exchangeUrl: string;
72
- interactionUrl: string;
73
- }>;
74
- /**
75
- * INVITER: polls the exchange until the other wallet posts its response, and
76
- * resolves with that response body verbatim (the caller's consent panel
77
- * interprets it, typically through `parseOnboardingResponse`).
78
- *
79
- * A `404` means the exchange expired or was never there, and rejects with
80
- * {@link OnboardingExchangeGoneError}. Every other failure -- a network
81
- * error, another non-ok status, an unparseable body -- is transient and
82
- * simply retried on the next tick. An aborted signal rejects promptly with
83
- * the signal's reason, cancelling any in-flight request.
84
- *
85
- * @param options {object}
86
- * @param options.exchangeUrl {string}
87
- * @param [options.signal] {AbortSignal}
88
- * @param [options.intervalMs] {number}
89
- * @param [options.fetch] {FetchLike}
90
- * @returns {Promise<unknown>} the completed exchange's `response` member
91
- */
92
- export declare function pollOnboardingExchange({ exchangeUrl, signal, intervalMs, fetch: fetchImpl }: {
93
- exchangeUrl: string;
94
- signal?: AbortSignal;
95
- intervalMs?: number;
96
- fetch?: FetchLike;
97
- }): Promise<unknown>;
98
- export {};
99
16
  //# sourceMappingURL=onboardingInvite.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"onboardingInvite.d.ts","sourceRoot":"","sources":["../../src/enrollment/onboardingInvite.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;GAYG;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B,OAAO,CAAA;AAE/C;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAAgB,CAAA;AAErD;;;GAGG;AACH,eAAO,MAAM,2BAA2B,qBAAqB,CAAA;AAE7D;;;GAGG;AACH,KAAK,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEzE;;;;;;GAMG;AACH,qBAAa,2BAA4B,SAAQ,KAAK;gBACxC,OAAO,SAAoD;CAIxE;AAcD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,wBAAwB,CAAC,EAC7C,SAAS,EACT,OAAO,EACP,KAAK,EAAE,SAA4B,EACpC,EAAE;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC,CA8B3D;AAmCD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,sBAAsB,CAAC,EAC3C,WAAW,EACX,MAAM,EACN,UAAwC,EACxC,KAAK,EAAE,SAA4B,EACpC,EAAE;IACD,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,GAAG,OAAO,CAAC,OAAO,CAAC,CA+BnB"}
1
+ {"version":3,"file":"onboardingInvite.d.ts","sourceRoot":"","sources":["../../src/enrollment/onboardingInvite.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;GAMG;AAEH;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAAgB,CAAA"}