@interop/wallet-core 0.78.1 → 0.79.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 (170) hide show
  1. package/README.md +16 -3
  2. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +2 -2
  3. package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
  4. package/dist/clientAnnex/credentialAnchoredGenesis.js +1 -1
  5. package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
  6. package/dist/clientAnnex/establish.d.ts +2 -2
  7. package/dist/clientAnnex/establish.d.ts.map +1 -1
  8. package/dist/clientAnnex/forget.d.ts +1 -1
  9. package/dist/clientAnnex/forget.d.ts.map +1 -1
  10. package/dist/clientAnnex/heal.d.ts.map +1 -1
  11. package/dist/clientAnnex/heal.js +3 -1
  12. package/dist/clientAnnex/heal.js.map +1 -1
  13. package/dist/clientAnnex/ladder.d.ts +3 -98
  14. package/dist/clientAnnex/ladder.d.ts.map +1 -1
  15. package/dist/clientAnnex/ladder.js +4 -140
  16. package/dist/clientAnnex/ladder.js.map +1 -1
  17. package/dist/clientAnnex/log.d.ts +26 -10
  18. package/dist/clientAnnex/log.d.ts.map +1 -1
  19. package/dist/clientAnnex/log.js +39 -19
  20. package/dist/clientAnnex/log.js.map +1 -1
  21. package/dist/clientAnnex/mend.d.ts +2 -2
  22. package/dist/clientAnnex/mend.d.ts.map +1 -1
  23. package/dist/clientAnnex/mend.js +1 -1
  24. package/dist/clientAnnex/mend.js.map +1 -1
  25. package/dist/clientAnnex/rosterDeliveredEpochs.d.ts +1 -1
  26. package/dist/clientAnnex/rosterDeliveredEpochs.d.ts.map +1 -1
  27. package/dist/clientAnnex/selfEnroll.d.ts +1 -1
  28. package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
  29. package/dist/clientAnnex/selfEnroll.js +2 -1
  30. package/dist/clientAnnex/selfEnroll.js.map +1 -1
  31. package/dist/clients/revocation.d.ts +1 -1
  32. package/dist/clients/revocation.d.ts.map +1 -1
  33. package/dist/clients/rosterPolicy.d.ts +1 -1
  34. package/dist/clients/rosterPolicy.d.ts.map +1 -1
  35. package/dist/descriptors/logSource.d.ts +2 -1
  36. package/dist/descriptors/logSource.d.ts.map +1 -1
  37. package/dist/descriptors/logSource.js +1 -1
  38. package/dist/descriptors/logSource.js.map +1 -1
  39. package/dist/enrollment/enrollment.d.ts +2 -2
  40. package/dist/enrollment/enrollment.d.ts.map +1 -1
  41. package/dist/enrollment/enrollment.js +2 -1
  42. package/dist/enrollment/enrollment.js.map +1 -1
  43. package/dist/genesis/accountGenesis.d.ts +1 -1
  44. package/dist/genesis/accountGenesis.d.ts.map +1 -1
  45. package/dist/genesis/accountGenesis.js +11 -5
  46. package/dist/genesis/accountGenesis.js.map +1 -1
  47. package/dist/keyring/fetch.d.ts +1 -1
  48. package/dist/keyring/fetch.d.ts.map +1 -1
  49. package/dist/keyring/fetch.js +1 -1
  50. package/dist/keyring/fetch.js.map +1 -1
  51. package/dist/keyring/index.d.ts +15 -8
  52. package/dist/keyring/index.d.ts.map +1 -1
  53. package/dist/keyring/index.js +11 -6
  54. package/dist/keyring/index.js.map +1 -1
  55. package/dist/keyring/kdf.d.ts +0 -69
  56. package/dist/keyring/kdf.d.ts.map +1 -1
  57. package/dist/keyring/kdf.js +7 -86
  58. package/dist/keyring/kdf.js.map +1 -1
  59. package/dist/keyring/record.d.ts +1 -200
  60. package/dist/keyring/record.d.ts.map +1 -1
  61. package/dist/keyring/record.js +5 -251
  62. package/dist/keyring/record.js.map +1 -1
  63. package/dist/keyring/recordEnvelope.d.ts +270 -0
  64. package/dist/keyring/recordEnvelope.d.ts.map +1 -0
  65. package/dist/keyring/recordEnvelope.js +282 -0
  66. package/dist/keyring/recordEnvelope.js.map +1 -0
  67. package/dist/keyring/unlockIdentity.d.ts +71 -0
  68. package/dist/keyring/unlockIdentity.d.ts.map +1 -0
  69. package/dist/keyring/unlockIdentity.js +96 -0
  70. package/dist/keyring/unlockIdentity.js.map +1 -0
  71. package/dist/keyring/unlockSpace.d.ts +12 -1
  72. package/dist/keyring/unlockSpace.d.ts.map +1 -1
  73. package/dist/keyring/unlockSpace.js +15 -2
  74. package/dist/keyring/unlockSpace.js.map +1 -1
  75. package/dist/keys/index.d.ts +6 -3
  76. package/dist/keys/index.d.ts.map +1 -1
  77. package/dist/keys/index.js +6 -3
  78. package/dist/keys/index.js.map +1 -1
  79. package/dist/keys/rosterLogStore.d.ts +1 -1
  80. package/dist/keys/rosterLogStore.d.ts.map +1 -1
  81. package/dist/keys/rosterLogStore.js +1 -1
  82. package/dist/keys/rosterLogStore.js.map +1 -1
  83. package/dist/keys/rosterRecipientKid.d.ts +28 -0
  84. package/dist/keys/rosterRecipientKid.d.ts.map +1 -0
  85. package/dist/keys/rosterRecipientKid.js +27 -0
  86. package/dist/keys/rosterRecipientKid.js.map +1 -0
  87. package/dist/keys/spaceEpochs.d.ts +1 -1
  88. package/dist/keys/spaceEpochs.d.ts.map +1 -1
  89. package/dist/keys/spaceEpochs.js +2 -2
  90. package/dist/keys/spaceEpochs.js.map +1 -1
  91. package/dist/keys/userKey.d.ts +4 -46
  92. package/dist/keys/userKey.d.ts.map +1 -1
  93. package/dist/keys/userKey.js +8 -60
  94. package/dist/keys/userKey.js.map +1 -1
  95. package/dist/keys/userKeyCascade.d.ts +1 -33
  96. package/dist/keys/userKeyCascade.d.ts.map +1 -1
  97. package/dist/keys/userKeyCascade.js +2 -49
  98. package/dist/keys/userKeyCascade.js.map +1 -1
  99. package/dist/keys/userKeyGenerations.d.ts +47 -0
  100. package/dist/keys/userKeyGenerations.d.ts.map +1 -0
  101. package/dist/keys/userKeyGenerations.js +50 -0
  102. package/dist/keys/userKeyGenerations.js.map +1 -0
  103. package/dist/keys/userKeyRoster.d.ts +1 -19
  104. package/dist/keys/userKeyRoster.d.ts.map +1 -1
  105. package/dist/keys/userKeyRoster.js +13 -19
  106. package/dist/keys/userKeyRoster.js.map +1 -1
  107. package/dist/keys/userKeyRosterCascade.d.ts +1 -1
  108. package/dist/keys/userKeyRosterCascade.d.ts.map +1 -1
  109. package/dist/keys/userKeySigning.d.ts +44 -0
  110. package/dist/keys/userKeySigning.d.ts.map +1 -0
  111. package/dist/keys/userKeySigning.js +65 -0
  112. package/dist/keys/userKeySigning.js.map +1 -0
  113. package/dist/recovery/recoveryCode.d.ts.map +1 -1
  114. package/dist/recovery/recoveryCode.js +3 -4
  115. package/dist/recovery/recoveryCode.js.map +1 -1
  116. package/dist/recovery/recoveryDelegation.d.ts +1 -1
  117. package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
  118. package/dist/space/collections.d.ts +1 -43
  119. package/dist/space/collections.d.ts.map +1 -1
  120. package/dist/space/collections.js +2 -34
  121. package/dist/space/collections.js.map +1 -1
  122. package/dist/space/systemCollections.d.ts +55 -0
  123. package/dist/space/systemCollections.d.ts.map +1 -0
  124. package/dist/space/systemCollections.js +46 -0
  125. package/dist/space/systemCollections.js.map +1 -0
  126. package/dist/sync/contactsConflict.d.ts +56 -10
  127. package/dist/sync/contactsConflict.d.ts.map +1 -1
  128. package/dist/sync/contactsConflict.js +82 -18
  129. package/dist/sync/contactsConflict.js.map +1 -1
  130. package/dist/sync/engine.d.ts +9 -3
  131. package/dist/sync/engine.d.ts.map +1 -1
  132. package/dist/sync/engine.js.map +1 -1
  133. package/dist/sync/pull.d.ts +25 -4
  134. package/dist/sync/pull.d.ts.map +1 -1
  135. package/dist/sync/pull.js +27 -3
  136. package/dist/sync/pull.js.map +1 -1
  137. package/dist/sync/remint.d.ts +10 -4
  138. package/dist/sync/remint.d.ts.map +1 -1
  139. package/dist/sync/remint.js +28 -6
  140. package/dist/sync/remint.js.map +1 -1
  141. package/dist/unlock/ladderDerivation.d.ts +98 -0
  142. package/dist/unlock/ladderDerivation.d.ts.map +1 -0
  143. package/dist/unlock/ladderDerivation.js +157 -0
  144. package/dist/unlock/ladderDerivation.js.map +1 -0
  145. package/dist/unlock/retire.d.ts +1 -1
  146. package/dist/unlock/retire.d.ts.map +1 -1
  147. package/dist/unlock/standingClient.js +1 -1
  148. package/dist/unlock/standingClient.js.map +1 -1
  149. package/dist/unlock/standingWebvh.d.ts.map +1 -1
  150. package/dist/unlock/standingWebvh.js +3 -3
  151. package/dist/unlock/standingWebvh.js.map +1 -1
  152. package/dist/unlock/unlockRecord.d.ts +2 -1
  153. package/dist/unlock/unlockRecord.d.ts.map +1 -1
  154. package/dist/unlock/unlockRecord.js +11 -2
  155. package/dist/unlock/unlockRecord.js.map +1 -1
  156. package/dist/webvh/accountEntry.d.ts +2 -1
  157. package/dist/webvh/accountEntry.d.ts.map +1 -1
  158. package/dist/webvh/accountEntry.js.map +1 -1
  159. package/dist/webvh/didWebvh.d.ts +1 -11
  160. package/dist/webvh/didWebvh.d.ts.map +1 -1
  161. package/dist/webvh/didWebvh.js +5 -13
  162. package/dist/webvh/didWebvh.js.map +1 -1
  163. package/dist/webvh/updateKeyMultibase.d.ts +12 -0
  164. package/dist/webvh/updateKeyMultibase.d.ts.map +1 -0
  165. package/dist/webvh/updateKeyMultibase.js +23 -0
  166. package/dist/webvh/updateKeyMultibase.js.map +1 -0
  167. package/dist/webvh/wasIdStore.d.ts +5 -3
  168. package/dist/webvh/wasIdStore.d.ts.map +1 -1
  169. package/dist/webvh/wasIdStore.js.map +1 -1
  170. package/package.json +53 -11
@@ -1,14 +1,3 @@
1
- import { CapabilityAgent } from '@interop/capability-agent';
2
- import type { ProfileAgents } from '@interop/was-client/identity';
3
- import type { RecordSigner } from './record.js';
4
- /**
5
- * The load-bearing `CapabilityAgent` derivation names for an unlock identity
6
- * (the counterpart of the data identity's bootstrap names): every unlock
7
- * derivation runs through these exact strings, so they can never change
8
- * without stranding existing accounts.
9
- */
10
- export declare const UNLOCK_HANDLE = "unlock";
11
- export declare const UNLOCK_KEY_NAME = "unlock-key";
12
1
  /**
13
2
  * Unlock-derivation parameters, one variant per KDF family: Argon2id
14
3
  * (memory-hard) stretches a low-entropy passphrase; HKDF expands
@@ -75,62 +64,4 @@ export declare function deriveUnlockSeed({ secret, kdf }: {
75
64
  secret: string | Uint8Array;
76
65
  kdf: UnlockKdf;
77
66
  }): Promise<Uint8Array>;
78
- /**
79
- * Derives the full unlock identity from an unlock secret: the unlock
80
- * CapabilityAgent, a ZcapClient that can both invoke and delegate (the
81
- * unlock agent delegates a management zcap on its own Space to the account
82
- * controller at bind time), the unlock KAK + resolver for wrap/unwrap, the
83
- * record signer that signs and verifies the keyring record's proof, and the
84
- * unlock Space id. Performs no I/O -- the derivation seam for tests and future
85
- * unlock methods.
86
- *
87
- * @param options {object}
88
- * @param options.secret {string | Uint8Array}
89
- * @param options.kdf {UnlockKdf}
90
- * @returns {Promise<UnlockIdentity>}
91
- */
92
- export declare function deriveUnlockIdentity({ secret, kdf }: {
93
- secret: string | Uint8Array;
94
- kdf: UnlockKdf;
95
- }): Promise<UnlockIdentity>;
96
- /**
97
- * Assembles the unlock identity from an already-derived 32-byte unlock seed.
98
- * The seam that lets an app run the expensive stretch once per typed secret:
99
- * `deriveUnlockSeed` yields the seed, and both this assembly and the
100
- * standing-credential expansion (`unlock/standingClient`) consume it.
101
- *
102
- * @param options {object}
103
- * @param options.seed {Uint8Array} the method's 32-byte unlock seed
104
- * @returns {Promise<UnlockIdentity>}
105
- */
106
- export declare function unlockIdentityFromSeed({ seed }: {
107
- seed: Uint8Array;
108
- }): Promise<UnlockIdentity>;
109
- /**
110
- * The unlock Space id an unlock identity addresses: was-client's
111
- * `deriveSpaceId` over the unlock did:key (`base64url(SHA-256(did))`,
112
- * unpadded) -- a discovery convention, not an authorization one (holding the
113
- * id grants nothing). The address is wire-level (it is the one durable
114
- * locator a fresh client holds), so it comes from the one shared derivation
115
- * rather than a local restatement of it.
116
- *
117
- * @param options {object}
118
- * @param options.did {string} the unlock identity's did:key
119
- * @returns {string}
120
- */
121
- export declare function unlockSpaceIdFor({ did }: {
122
- did: string;
123
- }): string;
124
- /**
125
- * The derived unlock identity, as `deriveUnlockIdentity` returns it. Stated
126
- * explicitly rather than inferred from the return: the agent set's members
127
- * are named by `ProfileAgents`, so the emitted declaration references this
128
- * package's own copy of those types rather than whichever copy a linked
129
- * dependency happens to carry.
130
- */
131
- export interface UnlockIdentity extends Pick<ProfileAgents, 'zcapClient' | 'keyAgreementKey' | 'keyResolver'> {
132
- agent: CapabilityAgent;
133
- recordSigner: RecordSigner;
134
- spaceId: string;
135
- }
136
67
  //# sourceMappingURL=kdf.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kdf.d.ts","sourceRoot":"","sources":["../../src/keyring/kdf.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAK3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C;;;;;GAKG;AACH,eAAO,MAAM,aAAa,WAAW,CAAA;AACrC,eAAO,MAAM,eAAe,eAAe,CAAA;AAQ3C;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,SAAS,GACjB;IACE,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,UAAU,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;CACb,GACD;IACE,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAEL;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,EAAE,SAOzB,CAAA;AAoBD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,MAAM,EACN,GAAG,EACJ,EAAE;IACD,MAAM,EAAE,MAAM,GA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,CAAA;CACb,CAAA;AAEL;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,EAAE,SAOzB,CAAA;AAoBD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,MAAM,EACN,GAAG,EACJ,EAAE;IACD,MAAM,EAAE,MAAM,GAAG,UAAU,CAAA;IAC3B,GAAG,EAAE,SAAS,CAAA;CACf,GAAG,OAAO,CAAC,UAAU,CAAC,CAuBtB"}
@@ -3,10 +3,13 @@
3
3
  */
4
4
  /**
5
5
  * The unlock derivation: an unlock secret (a passphrase, or a passkey PRF
6
- * output) to the unlock identity that locates an account's keyring record and
7
- * wraps/unwraps it. Nothing about the account is derivable from the secret --
8
- * the identity's only jobs are addressing the minimal unlock Space and holding
9
- * the key-agreement key the keyring record is encrypted to.
6
+ * output) to the 32-byte unlock seed. `unlockIdentity.ts` expands that seed
7
+ * into the unlock identity that locates an account's keyring record and
8
+ * wraps/unwraps it. Nothing about the account is derivable from the secret.
9
+ *
10
+ * This file's only runtime imports are `@noble/hashes` modules, so an offline
11
+ * caller that only derives a seed loads no identity or proof dependencies.
12
+ * Keep it that way.
10
13
  *
11
14
  * The derivation is wire-level: two wallet apps must produce byte-identical
12
15
  * output for the same secret and parameter set, or the same passphrase would
@@ -15,21 +18,9 @@
15
18
  * React Native does not provide; Argon2id and HKDF are both fully specified
16
19
  * (RFC 9106 / RFC 5869), so any two implementations agree bit for bit.
17
20
  */
18
- import { deriveSpaceId } from '@interop/was-client/sync';
19
- import { CapabilityAgent } from '@interop/capability-agent';
20
21
  import { argon2idAsync } from '@noble/hashes/argon2.js';
21
22
  import { hkdf } from '@noble/hashes/hkdf.js';
22
23
  import { sha256, sha512 } from '@noble/hashes/sha2.js';
23
- import { agentsFromKeyAgent } from '@interop/was-client/identity';
24
- import { recordSignerFromAgent } from './record.js';
25
- /**
26
- * The load-bearing `CapabilityAgent` derivation names for an unlock identity
27
- * (the counterpart of the data identity's bootstrap names): every unlock
28
- * derivation runs through these exact strings, so they can never change
29
- * without stranding existing accounts.
30
- */
31
- export const UNLOCK_HANDLE = 'unlock';
32
- export const UNLOCK_KEY_NAME = 'unlock-key';
33
24
  /**
34
25
  * The number of bytes an unlock derivation produces (a 32-byte seed, which is
35
26
  * what `CapabilityAgent.fromSeed` takes).
@@ -111,74 +102,4 @@ export async function deriveUnlockSeed({ secret, kdf }) {
111
102
  }
112
103
  return hkdf(nobleHash(kdf.hash), secretBytes, salt, new TextEncoder().encode(kdf.info), UNLOCK_SEED_BYTES);
113
104
  }
114
- /**
115
- * Derives the full unlock identity from an unlock secret: the unlock
116
- * CapabilityAgent, a ZcapClient that can both invoke and delegate (the
117
- * unlock agent delegates a management zcap on its own Space to the account
118
- * controller at bind time), the unlock KAK + resolver for wrap/unwrap, the
119
- * record signer that signs and verifies the keyring record's proof, and the
120
- * unlock Space id. Performs no I/O -- the derivation seam for tests and future
121
- * unlock methods.
122
- *
123
- * @param options {object}
124
- * @param options.secret {string | Uint8Array}
125
- * @param options.kdf {UnlockKdf}
126
- * @returns {Promise<UnlockIdentity>}
127
- */
128
- export async function deriveUnlockIdentity({ secret, kdf }) {
129
- const seed = await deriveUnlockSeed({ secret, kdf });
130
- return unlockIdentityFromSeed({ seed });
131
- }
132
- /**
133
- * Assembles the unlock identity from an already-derived 32-byte unlock seed.
134
- * The seam that lets an app run the expensive stretch once per typed secret:
135
- * `deriveUnlockSeed` yields the seed, and both this assembly and the
136
- * standing-credential expansion (`unlock/standingClient`) consume it.
137
- *
138
- * @param options {object}
139
- * @param options.seed {Uint8Array} the method's 32-byte unlock seed
140
- * @returns {Promise<UnlockIdentity>}
141
- */
142
- export async function unlockIdentityFromSeed({ seed }) {
143
- const agent = await CapabilityAgent.fromSeed({
144
- seed,
145
- handle: UNLOCK_HANDLE,
146
- keyName: UNLOCK_KEY_NAME
147
- });
148
- // The unlock KAK is the Montgomery form of the unlock signing key -- the same
149
- // derivation the client side uses (`agentsFromSeed`), so a returning user
150
- // reconstitutes the exact key that wrapped the keyring record.
151
- const { zcapClient, keyAgreementKey, keyResolver } = agentsFromKeyAgent({
152
- keyAgent: agent
153
- });
154
- // The record signer is the unlock signing key itself, named by its public
155
- // multibase: the keyring record's proof is made and checked against a key
156
- // that derives from the secret, so the storage host never holds it and a
157
- // fresh client holds the verification prior by construction.
158
- const recordSigner = recordSignerFromAgent({ keyAgent: agent });
159
- const spaceId = unlockSpaceIdFor({ did: agent.id });
160
- return {
161
- agent,
162
- zcapClient,
163
- keyAgreementKey,
164
- keyResolver,
165
- recordSigner,
166
- spaceId
167
- };
168
- }
169
- /**
170
- * The unlock Space id an unlock identity addresses: was-client's
171
- * `deriveSpaceId` over the unlock did:key (`base64url(SHA-256(did))`,
172
- * unpadded) -- a discovery convention, not an authorization one (holding the
173
- * id grants nothing). The address is wire-level (it is the one durable
174
- * locator a fresh client holds), so it comes from the one shared derivation
175
- * rather than a local restatement of it.
176
- *
177
- * @param options {object}
178
- * @param options.did {string} the unlock identity's did:key
179
- * @returns {string}
180
- */
181
- export function unlockSpaceIdFor({ did }) {
182
- return deriveSpaceId(did);
183
- }
184
105
  //# sourceMappingURL=kdf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"kdf.js","sourceRoot":"","sources":["../../src/keyring/kdf.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAEjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAGnD;;;;;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UAAU,CAAC,MAAM,CAAC,CAAA;IAC5B,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IAC/C,IAAI,GAAG,CAAC,SAAS,KAAK,UAAU,EAAE,CAAC;QACjC,OAAO,aAAa,CAAC,WAAW,EAAE,IAAI,EAAE;YACtC,CAAC,EAAE,GAAG,CAAC,MAAM;YACb,CAAC,EAAE,GAAG,CAAC,MAAM;YACb,CAAC,EAAE,GAAG,CAAC,WAAW;YAClB,KAAK,EAAE,iBAAiB;SACzB,CAAC,CAAA;IACJ,CAAC;IACD,OAAO,IAAI,CACT,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EACnB,WAAW,EACX,IAAI,EACJ,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,EAClC,iBAAiB,CAClB,CAAA;AACH,CAAC"}
@@ -1,14 +1,6 @@
1
1
  import type { IKeyAgreementKey, IKeyResolver } from '@interop/data-integrity-core';
2
2
  import type { CollectionEncryption } from '@interop/was-client';
3
- import { type DocCipher } from '@interop/was-client/edv';
4
- /**
5
- * The version stamped on the stored `{ version, encryption, wrapped, proof }`
6
- * keyring envelope: the signed record, whose envelope seals under the record's
7
- * own key epoch (the `encryption` member) and whose sibling members carry a
8
- * Data Integrity proof by the unlock identity's signing key. Any other version
9
- * is refused as unusable -- such accounts are re-provisioned, not migrated.
10
- */
11
- export declare const KEYRING_RECORD_VERSION = 2;
3
+ import type { AccountPointer, KeyringRecordContents, SignedRecord } from './recordEnvelope.js';
12
4
  /**
13
5
  * The record signer's seam: the signing key's public multibase (which names
14
6
  * the key in the proof's `verificationMethod`) and a raw detached-signature
@@ -22,42 +14,6 @@ export interface RecordSigner {
22
14
  data: Uint8Array;
23
15
  }): Promise<Uint8Array>;
24
16
  }
25
- /**
26
- * The fixed proof shape a signed record carries: an eddsa-jcs-2022 Data
27
- * Integrity proof over the record's sibling members, `assertionMethod`
28
- * purpose, with the signing key named by a `did:key:<multibase>#<multibase>`
29
- * verification method.
30
- */
31
- export interface RecordProof {
32
- type: 'DataIntegrityProof';
33
- cryptosuite: 'eddsa-jcs-2022';
34
- verificationMethod: string;
35
- proofPurpose: 'assertionMethod';
36
- created?: string;
37
- proofValue: string;
38
- }
39
- /**
40
- * A stored signed record: the frame members the proof secures, plus the proof
41
- * itself.
42
- */
43
- export interface SignedRecord {
44
- version: number;
45
- encryption: CollectionEncryption;
46
- wrapped: unknown;
47
- proof: RecordProof;
48
- }
49
- /**
50
- * A record's proof is absent, malformed, signed by a key this client does not
51
- * accept, or does not verify over the record's own members. Its own class,
52
- * distinct from a decrypt failure or an unusable-version refusal: this is the
53
- * refusal that says the storage host forged or tampered with the record, which
54
- * an app maps to its own login copy.
55
- */
56
- export declare class RecordProofError extends Error {
57
- constructor(message: string, options?: {
58
- cause?: unknown;
59
- });
60
- }
61
17
  /**
62
18
  * Adapts a signing key agent (the unlock identity's `CapabilityAgent`, or an
63
19
  * enrolled client's own key agent) to the record signer seam: the agent's
@@ -130,98 +86,6 @@ export declare function recordProofKeyMultibase({ verificationMethod, label }: {
130
86
  verificationMethod: string;
131
87
  label: string;
132
88
  }): string;
133
- /**
134
- * Mints the one-epoch descriptor a fresh record is sealed under: epoch[0]
135
- * wrapped to the given KAK alone, built through `initRecipients` against a
136
- * throwaway in-memory store (the descriptor's home is the record itself).
137
- * Exported for any consumer sealing a self-contained
138
- * `{ version, encryption, wrapped }` record -- the keyring and recovery
139
- * records here, and a wallet app's own locally stored records (e.g.
140
- * freewallet's client-key record and unlock-methods registry).
141
- *
142
- * @param options {object}
143
- * @param options.keyAgreementKey {IKeyAgreementKey} the wrapping KAK (for
144
- * the keyring record, the unlock KAK)
145
- * @returns {Promise<CollectionEncryption>}
146
- */
147
- export declare function mintRecordEncryption({ keyAgreementKey }: {
148
- keyAgreementKey: IKeyAgreementKey;
149
- }): Promise<CollectionEncryption>;
150
- /**
151
- * Builds the record's reading cipher: an EDV cipher over the record's own
152
- * descriptor, from the reader's key-agreement key. The unwrap paths' cipher
153
- * (and the recovery record's, which reuses the keyring cipher context
154
- * verbatim); the wrap paths seal through {@link recordSealCipher} instead. An
155
- * app's own record kind passes its own `collectionId` so its failures name
156
- * the record kind. The context labels errors only -- the codec is agnostic to
157
- * it, so a record kind's real swap protection is its contents validation on
158
- * unwrap.
159
- *
160
- * @param options {object}
161
- * @param options.keyAgreementKey {IKeyAgreementKey} the wrapping KAK (for
162
- * the keyring record, the unlock KAK)
163
- * @param options.keyResolver {IKeyResolver}
164
- * @param options.encryption {CollectionEncryption} the record's descriptor
165
- * @param [options.collectionId] {string} the cipher context failures are
166
- * labeled with; defaults to the keyring context
167
- * @returns {Promise<DocCipher>}
168
- */
169
- export declare function recordCipher({ keyAgreementKey, keyResolver, encryption, collectionId }: {
170
- keyAgreementKey: IKeyAgreementKey;
171
- keyResolver: IKeyResolver;
172
- encryption: CollectionEncryption;
173
- collectionId?: string;
174
- }): Promise<DocCipher>;
175
- /**
176
- * Builds the record's sealing cipher: an encrypt-only EDV cipher over the
177
- * record's own descriptor, needing no key-agreement secret -- a write seals to
178
- * the descriptor's epoch public key, reconstructed from the epoch id. This is
179
- * what lets the recovery re-mint, which holds only the code's unlock KAK
180
- * public half, re-seal a record it can never open; the issuance wraps go
181
- * through the same construction and produce the same envelope shape. Decrypt
182
- * on it refuses with was-client's typed `EncryptOnlyCipherError`.
183
- *
184
- * @param options {object}
185
- * @param options.encryption {CollectionEncryption} the record's descriptor
186
- * @param [options.collectionId] {string} the cipher context failures are
187
- * labeled with; defaults to the keyring context
188
- * @returns {Promise<DocCipher>}
189
- */
190
- export declare function recordSealCipher({ encryption, collectionId }: {
191
- encryption: CollectionEncryption;
192
- collectionId?: string;
193
- }): Promise<DocCipher>;
194
- /**
195
- * Validates the common `{ version, encryption, wrapped }` frame of a stored
196
- * record (keyring or recovery -- `label` names the refusals) and returns its
197
- * members, the `proof` among them for the signed frame. Exported so an app's
198
- * own record kinds open their records through the same frame validation the
199
- * codec here seals with, rather than re-deriving the version and shape checks.
200
- *
201
- * A frame at the keyring record version is the signed frame, so it must carry
202
- * a fixed-shape proof; a record kind stamping its own version is unaffected
203
- * (its authenticity story is its own). Validating the shape here does not
204
- * verify it -- {@link verifyRecordProof} does, and every unwrap path in this
205
- * module runs it before decrypting.
206
- *
207
- * @param options {object}
208
- * @param options.record {unknown}
209
- * @param options.label {string} `'keyring'`, `'recovery'`, or an app record
210
- * kind's own label
211
- * @param [options.version] {number} the version the frame must carry;
212
- * defaults to the keyring record version
213
- * @returns {{ encryption: CollectionEncryption, wrapped: unknown,
214
- * proof?: RecordProof }}
215
- */
216
- export declare function parseRecordFrame({ record, label, version }: {
217
- record: unknown;
218
- label: string;
219
- version?: number;
220
- }): {
221
- encryption: CollectionEncryption;
222
- wrapped: unknown;
223
- proof?: RecordProof;
224
- };
225
89
  /**
226
90
  * Verifies a stored record's proof: the fixed proof shape, the signing key
227
91
  * against the caller's allowlist, and the signature over the record's sibling
@@ -248,31 +112,6 @@ export declare function verifyRecordProof({ record, allowedKeyMultibases, label
248
112
  allowedKeyMultibases: string | string[];
249
113
  label?: string;
250
114
  }): Promise<string>;
251
- /**
252
- * The account pointer a keyring record carries in place of the retired data
253
- * seed: where the account lives (`spaceId` + `host`, the WAS server's base
254
- * URL, which carries a base path when the server is deployed under a
255
- * sub-path) and, once provisioning has published it, the account's stable
256
- * did:webvh id. Discovery only -- holding the pointer authorizes nothing.
257
- */
258
- export interface AccountPointer {
259
- did?: string;
260
- spaceId: string;
261
- host: string;
262
- }
263
- /**
264
- * The unwrapped contents of a keyring record: the account controller (the
265
- * first enrolled client's did:key today), the account email captured at bind
266
- * time (when one was given -- carried so any unlock method recovers it; a
267
- * passkey login has no login form to ask on), and the account pointer (absent
268
- * only on no-WAS deployments, where there is no Space to point at).
269
- */
270
- export interface KeyringRecordContents {
271
- controller: string;
272
- email?: string;
273
- pointer?: AccountPointer;
274
- createdAt: string;
275
- }
276
115
  /**
277
116
  * Wraps the account-pointer contents into a keyring record: the controller,
278
117
  * email, and pointer (+ timestamp) sealed under a freshly minted record epoch
@@ -330,42 +169,4 @@ export declare function unwrapKeyringRecord({ record, keyAgreementKey, keyResolv
330
169
  keyResolver: IKeyResolver;
331
170
  expectedKeyMultibase: string;
332
171
  }): Promise<KeyringRecordContents>;
333
- /**
334
- * The bind timestamp a wrap path stamps into a record's plaintext: the
335
- * caller's, validated as a parseable ISO timestamp, or now. A caller supplies
336
- * one when it pins record freshness, so it knows the stamp of the record it is
337
- * writing without reading it back.
338
- *
339
- * @param options {object}
340
- * @param [options.createdAt] {string} the caller's timestamp
341
- * @returns {string}
342
- */
343
- export declare function recordCreatedAtStamp({ createdAt }: {
344
- createdAt?: string;
345
- }): string;
346
- /**
347
- * Parses and validates the required `createdAt` member of a record plaintext:
348
- * the moment the record was bound, as an ISO timestamp that must parse. Apps
349
- * pin freshness on it, so a record that cannot state its own bind time is
350
- * refused rather than defaulted.
351
- *
352
- * @param options {object}
353
- * @param options.value {unknown} the plaintext's `createdAt` member
354
- * @param options.label {string} names the record kind in the refusal
355
- * @returns {string}
356
- */
357
- export declare function parseRecordCreatedAt({ value, label }: {
358
- value: unknown;
359
- label: string;
360
- }): string;
361
- /**
362
- * Parses and validates the optional `pointer` member of a keyring record
363
- * plaintext. An absent member is a no-WAS record (returns undefined); a
364
- * present-but-malformed one throws -- a record that claims a pointer but
365
- * cannot state where the account lives is unusable.
366
- *
367
- * @param value {unknown} the record's `pointer` member
368
- * @returns {AccountPointer | undefined}
369
- */
370
- export declare function parseRecordPointer(value: unknown): AccountPointer | undefined;
371
172
  //# sourceMappingURL=record.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../src/keyring/record.ts"],"names":[],"mappings":"AAyCA,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,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