hd-wallet-ui 2.1.2 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -2
- package/dist/browser/sdn-wallet-public-client.js +1 -1
- package/dist/client/asset-review.js +444 -439
- package/dist/client/index.d.ts +8 -0
- package/dist/client/index.js +985 -761
- package/dist/client/sdn.js +152 -147
- package/dist/client/types.d.ts +40 -1
- package/dist/wallet-origin/index.js +1854 -1513
- package/dist/wallet-origin-host/assets/wallet-origin.8c6002e69b67d46d4d1d8cd987671c7954e8890eb23f5ef2c06c76a0af3583ef.wasm +0 -0
- package/dist/wallet-origin-host/assets/{wallet-origin.6c4e3aac527401d7f38d46aa9780d88130e70a8684e6e18b9ce0dd2a9d185abc.css → wallet-origin.a76de7ca94a41a4800d35df29d7b115206c3da6ff3a7e828309aa34adc88b5c3.css} +1 -1
- package/dist/wallet-origin-host/assets/wallet-origin.d0119af9e661f9c0a7fb9f00725255d398037b15e691c02c43f357c15ecd7fab.js +13878 -0
- package/dist/wallet-origin-host/index.html +2 -2
- package/dist/wallet-origin-host/integrity.json +1 -1
- package/package.json +3 -3
- package/dist/wallet-origin-host/assets/wallet-origin.473a5a2e61f9c7efbe2ca8f13cbebc0669bf00bfd6ed9083ccb5e6381f747cf4.wasm +0 -0
- package/dist/wallet-origin-host/assets/wallet-origin.87236cc2bfc4194523883e6b8aec4e83d1f13ce37fc9ff92ca82c637adde371c.js +0 -13360
package/dist/client/types.d.ts
CHANGED
|
@@ -5,7 +5,9 @@ export type WalletRelayOperation =
|
|
|
5
5
|
| 'sdn.auth.jcs-envelope.v2'
|
|
6
6
|
| 'sdn.auth.publish-request.v1'
|
|
7
7
|
| 'sdn.asset-review.authority-activation.v1'
|
|
8
|
-
| 'sdn.asset-review.decision.v1'
|
|
8
|
+
| 'sdn.asset-review.decision.v1'
|
|
9
|
+
| 'sdn.wallet.field-open.v1'
|
|
10
|
+
| 'sdn.wallet.key-unwrap.v1';
|
|
9
11
|
|
|
10
12
|
export type WalletClientStatus = 'dormant' | 'opening' | 'connected' | 'error';
|
|
11
13
|
export type WalletClientId =
|
|
@@ -27,6 +29,7 @@ export type WalletClientErrorCode =
|
|
|
27
29
|
| 'EXPIRED'
|
|
28
30
|
| 'INVALID_CLIENT'
|
|
29
31
|
| 'INVALID_REQUEST'
|
|
32
|
+
| 'NOT_ADDRESSED_TO_ACCOUNT'
|
|
30
33
|
| 'RELAY_ERROR'
|
|
31
34
|
| 'REPLACED'
|
|
32
35
|
| 'WALLET_NOT_COMPLETED';
|
|
@@ -225,6 +228,42 @@ export interface WalletPublicClient {
|
|
|
225
228
|
destroy(): Promise<void>;
|
|
226
229
|
}
|
|
227
230
|
|
|
231
|
+
/**
|
|
232
|
+
* One field sealed to the signed-in user's contact-encryption key with the SDN
|
|
233
|
+
* Unified ECIES field cipher: its SDS `$ENC` header bytes, the HKDF info
|
|
234
|
+
* (`sdn-field-encryption/v1|<site>|<schema>|<field>|k<version>`, equal to the
|
|
235
|
+
* header's CONTEXT), its field id and its ciphertext.
|
|
236
|
+
*/
|
|
237
|
+
export interface SealedFieldInput {
|
|
238
|
+
readonly enc: Uint8Array;
|
|
239
|
+
readonly context: string;
|
|
240
|
+
readonly fieldId: number;
|
|
241
|
+
readonly ciphertext: Uint8Array;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export type OpenedField =
|
|
245
|
+
| { readonly plaintext: Uint8Array }
|
|
246
|
+
| { readonly refused: 'NOT_ADDRESSED_TO_ACCOUNT' };
|
|
247
|
+
|
|
248
|
+
/** sdn-flatbuffers-pages-v1: the wallet opens this site's fields after consent. */
|
|
249
|
+
export interface FlatbuffersWalletClient extends WalletPublicClient {
|
|
250
|
+
/** 1..16 fields, at most 4096 bytes each and 12288 bytes in all. */
|
|
251
|
+
openFields(value: { readonly fields: readonly SealedFieldInput[] }): Promise<readonly OpenedField[]>;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* sdn-flatsql-pages-v1: the wallet unwraps one database's content key (an
|
|
256
|
+
* `$ENC` + `$KMF` pair wrapped to the user) after consent. The content key is
|
|
257
|
+
* a scoped key for that database, not a wallet key.
|
|
258
|
+
*/
|
|
259
|
+
export interface FlatsqlWalletClient extends WalletPublicClient {
|
|
260
|
+
unwrapKey(value: {
|
|
261
|
+
readonly enc: Uint8Array;
|
|
262
|
+
readonly kmf: Uint8Array;
|
|
263
|
+
readonly context: string;
|
|
264
|
+
}): Promise<{ readonly contentKey: Uint8Array }>;
|
|
265
|
+
}
|
|
266
|
+
|
|
228
267
|
export interface SdnWalletClient extends WalletPublicClient {
|
|
229
268
|
requestSdnLoginV1(value: SdnLoginV1Request): Promise<RawWalletSignature>;
|
|
230
269
|
requestSdnLoginV2(value: SdnLoginV2Request): Promise<CanonicalWalletSignature>;
|