@substrate-system/keys 0.2.7 → 0.2.9

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 (64) hide show
  1. package/dist/_base.cjs +244 -0
  2. package/dist/_base.cjs.map +7 -0
  3. package/dist/_base.js +231 -0
  4. package/dist/_base.js.map +7 -0
  5. package/dist/_base.min.cjs +2 -0
  6. package/dist/_base.min.cjs.map +7 -0
  7. package/dist/_base.min.js +4 -0
  8. package/dist/_base.min.js.map +7 -0
  9. package/dist/aes/index.cjs +1 -0
  10. package/dist/aes/index.cjs.map +2 -2
  11. package/dist/aes/index.d.ts +15 -0
  12. package/dist/aes/index.d.ts.map +1 -1
  13. package/dist/aes/index.js +1 -0
  14. package/dist/aes/index.js.map +2 -2
  15. package/dist/aes/index.min.cjs +1 -1
  16. package/dist/aes/index.min.cjs.map +3 -3
  17. package/dist/aes/index.min.js +1 -1
  18. package/dist/aes/index.min.js.map +2 -2
  19. package/dist/constants.cjs +83 -0
  20. package/dist/constants.cjs.map +7 -0
  21. package/dist/constants.js +63 -0
  22. package/dist/constants.js.map +7 -0
  23. package/dist/constants.min.cjs +2 -0
  24. package/dist/constants.min.cjs.map +7 -0
  25. package/dist/constants.min.js +2 -0
  26. package/dist/constants.min.js.map +7 -0
  27. package/dist/ecc/index.min.js.map +2 -2
  28. package/dist/errors.cjs +90 -0
  29. package/dist/errors.cjs.map +7 -0
  30. package/dist/errors.js +71 -0
  31. package/dist/errors.js.map +7 -0
  32. package/dist/errors.min.cjs +2 -0
  33. package/dist/errors.min.cjs.map +7 -0
  34. package/dist/errors.min.js +2 -0
  35. package/dist/errors.min.js.map +7 -0
  36. package/dist/index.cjs +44 -0
  37. package/dist/index.cjs.map +7 -0
  38. package/dist/index.d.ts +2 -0
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +1 -0
  41. package/dist/index.js.map +7 -0
  42. package/dist/index.min.cjs +2 -0
  43. package/dist/index.min.cjs.map +7 -0
  44. package/dist/index.min.js +2 -2
  45. package/dist/index.min.js.map +7 -0
  46. package/dist/meta.json +329 -3
  47. package/dist/rsa/index.min.js.map +2 -2
  48. package/dist/types.cjs +72 -0
  49. package/dist/types.cjs.map +7 -0
  50. package/dist/types.js +52 -0
  51. package/dist/types.js.map +7 -0
  52. package/dist/types.min.cjs +2 -0
  53. package/dist/types.min.cjs.map +7 -0
  54. package/dist/types.min.js +2 -0
  55. package/dist/types.min.js.map +7 -0
  56. package/dist/util.cjs +445 -0
  57. package/dist/util.cjs.map +7 -0
  58. package/dist/util.js +434 -0
  59. package/dist/util.js.map +7 -0
  60. package/dist/util.min.cjs +4 -0
  61. package/dist/util.min.cjs.map +7 -0
  62. package/dist/util.min.js +4 -0
  63. package/dist/util.min.js.map +7 -0
  64. package/package.json +5 -5
package/dist/meta.json CHANGED
@@ -1,7 +1,37 @@
1
1
  {
2
2
  "inputs": {
3
+ "src/_base.ts": {
4
+ "bytes": 14878,
5
+ "imports": [],
6
+ "format": "esm"
7
+ },
8
+ "src/constants.ts": {
9
+ "bytes": 1444,
10
+ "imports": [],
11
+ "format": "esm"
12
+ },
13
+ "src/errors.ts": {
14
+ "bytes": 2061,
15
+ "imports": [],
16
+ "format": "esm"
17
+ },
18
+ "src/index.ts": {
19
+ "bytes": 211,
20
+ "imports": [],
21
+ "format": "esm"
22
+ },
23
+ "src/types.ts": {
24
+ "bytes": 1248,
25
+ "imports": [],
26
+ "format": "esm"
27
+ },
28
+ "src/util.ts": {
29
+ "bytes": 15867,
30
+ "imports": [],
31
+ "format": "esm"
32
+ },
3
33
  "src/aes/index.ts": {
4
- "bytes": 5643,
34
+ "bytes": 5650,
5
35
  "imports": [],
6
36
  "format": "esm"
7
37
  },
@@ -17,11 +47,306 @@
17
47
  }
18
48
  },
19
49
  "outputs": {
50
+ "dist/_base.js.map": {
51
+ "imports": [],
52
+ "exports": [],
53
+ "inputs": {},
54
+ "bytes": 19544
55
+ },
56
+ "dist/_base.js": {
57
+ "imports": [
58
+ {
59
+ "path": "uint8arrays",
60
+ "kind": "import-statement",
61
+ "external": true
62
+ },
63
+ {
64
+ "path": "idb-keyval",
65
+ "kind": "import-statement",
66
+ "external": true
67
+ },
68
+ {
69
+ "path": "./aes/index.js",
70
+ "kind": "import-statement",
71
+ "external": true
72
+ },
73
+ {
74
+ "path": "./util.js",
75
+ "kind": "import-statement",
76
+ "external": true
77
+ },
78
+ {
79
+ "path": "./constants.js",
80
+ "kind": "import-statement",
81
+ "external": true
82
+ },
83
+ {
84
+ "path": "./util.js",
85
+ "kind": "import-statement",
86
+ "external": true
87
+ }
88
+ ],
89
+ "exports": [
90
+ "AbstractKeys",
91
+ "encryptKeyTo",
92
+ "encryptTo",
93
+ "getDeviceName",
94
+ "getPublicKeyAsArrayBuffer",
95
+ "getPublicKeyAsUint8Array",
96
+ "publicKeyToDid"
97
+ ],
98
+ "entryPoint": "src/_base.ts",
99
+ "inputs": {
100
+ "src/_base.ts": {
101
+ "bytesInOutput": 6797
102
+ }
103
+ },
104
+ "bytes": 7381
105
+ },
106
+ "dist/constants.js.map": {
107
+ "imports": [],
108
+ "exports": [],
109
+ "inputs": {},
110
+ "bytes": 2333
111
+ },
112
+ "dist/constants.js": {
113
+ "imports": [
114
+ {
115
+ "path": "./types.js",
116
+ "kind": "import-statement",
117
+ "external": true
118
+ }
119
+ ],
120
+ "exports": [
121
+ "AES_GCM",
122
+ "BASE58_DID_PREFIX",
123
+ "BLS_DID_PREFIX",
124
+ "DEFAULT_CHAR_SIZE",
125
+ "DEFAULT_ECC_EXCHANGE",
126
+ "DEFAULT_ECC_EXCHANGE_CURVE",
127
+ "DEFAULT_ECC_WRITE",
128
+ "DEFAULT_HASH_ALGORITHM",
129
+ "DEFAULT_RSA_EXCHANGE",
130
+ "DEFAULT_RSA_SIZE",
131
+ "DEFAULT_RSA_WRITE",
132
+ "DEFAULT_SYMM_ALGORITHM",
133
+ "DEFAULT_SYMM_LENGTH",
134
+ "ECC_EXCHANGE_ALG",
135
+ "ECC_EXCHANGE_NAME",
136
+ "ECC_WRITE_ALG",
137
+ "ECC_WRITE_NAME",
138
+ "EDWARDS_DID_PREFIX",
139
+ "IV_LENGTH",
140
+ "KEY_TYPE",
141
+ "KEY_USE",
142
+ "RSA_ALGORITHM",
143
+ "RSA_DID_PREFIX",
144
+ "RSA_HASHING_ALGORITHM",
145
+ "RSA_SIGN_ALGORITHM",
146
+ "SALT_LENGTH"
147
+ ],
148
+ "entryPoint": "src/constants.ts",
149
+ "inputs": {
150
+ "src/constants.ts": {
151
+ "bytesInOutput": 1194
152
+ }
153
+ },
154
+ "bytes": 1760
155
+ },
156
+ "dist/errors.js.map": {
157
+ "imports": [],
158
+ "exports": [],
159
+ "inputs": {},
160
+ "bytes": 3226
161
+ },
162
+ "dist/errors.js": {
163
+ "imports": [
164
+ {
165
+ "path": "./types.js",
166
+ "kind": "import-statement",
167
+ "external": true
168
+ }
169
+ ],
170
+ "exports": [
171
+ "ECCNotEnabled",
172
+ "InvalidKeyUse",
173
+ "InvalidMaxValue",
174
+ "KeyDoesNotExist",
175
+ "NotKey",
176
+ "NotKeyPair",
177
+ "UnsupportedCrypto",
178
+ "checkIsKey",
179
+ "checkIsKeyPair",
180
+ "checkValidCryptoSystem",
181
+ "checkValidKeyUse",
182
+ "default"
183
+ ],
184
+ "entryPoint": "src/errors.ts",
185
+ "inputs": {
186
+ "src/errors.ts": {
187
+ "bytesInOutput": 1967
188
+ }
189
+ },
190
+ "bytes": 2366
191
+ },
192
+ "dist/index.js.map": {
193
+ "imports": [],
194
+ "exports": [],
195
+ "inputs": {},
196
+ "bytes": 414
197
+ },
198
+ "dist/index.js": {
199
+ "imports": [
200
+ {
201
+ "path": "./types.js",
202
+ "kind": "import-statement",
203
+ "external": true
204
+ },
205
+ {
206
+ "path": "./rsa/index.js",
207
+ "kind": "import-statement",
208
+ "external": true
209
+ },
210
+ {
211
+ "path": "./ecc/index.js",
212
+ "kind": "import-statement",
213
+ "external": true
214
+ },
215
+ {
216
+ "path": "./aes/index.js",
217
+ "kind": "import-statement",
218
+ "external": true
219
+ },
220
+ {
221
+ "path": "./_base.js",
222
+ "kind": "import-statement",
223
+ "external": true
224
+ },
225
+ {
226
+ "path": "./_base.js",
227
+ "kind": "import-statement",
228
+ "external": true
229
+ }
230
+ ],
231
+ "exports": [
232
+ "aes",
233
+ "ecc",
234
+ "getDeviceName",
235
+ "rsa"
236
+ ],
237
+ "entryPoint": "src/index.ts",
238
+ "inputs": {
239
+ "src/index.ts": {
240
+ "bytesInOutput": 217
241
+ }
242
+ },
243
+ "bytes": 300
244
+ },
245
+ "dist/types.js.map": {
246
+ "imports": [],
247
+ "exports": [],
248
+ "inputs": {},
249
+ "bytes": 2347
250
+ },
251
+ "dist/types.js": {
252
+ "imports": [],
253
+ "exports": [
254
+ "CharSize",
255
+ "CryptoSystem",
256
+ "EccCurve",
257
+ "HashAlg",
258
+ "KeyUse",
259
+ "RsaSize",
260
+ "SymmKeyLength"
261
+ ],
262
+ "entryPoint": "src/types.ts",
263
+ "inputs": {
264
+ "src/types.ts": {
265
+ "bytesInOutput": 1470
266
+ }
267
+ },
268
+ "bytes": 1604
269
+ },
270
+ "dist/util.js.map": {
271
+ "imports": [],
272
+ "exports": [],
273
+ "inputs": {},
274
+ "bytes": 24875
275
+ },
276
+ "dist/util.js": {
277
+ "imports": [
278
+ {
279
+ "path": "@substrate-system/one-webcrypto",
280
+ "kind": "import-statement",
281
+ "external": true
282
+ },
283
+ {
284
+ "path": "uint8arrays",
285
+ "kind": "import-statement",
286
+ "external": true
287
+ },
288
+ {
289
+ "path": "tweetnacl",
290
+ "kind": "import-statement",
291
+ "external": true
292
+ },
293
+ {
294
+ "path": "./types.js",
295
+ "kind": "import-statement",
296
+ "external": true
297
+ },
298
+ {
299
+ "path": "./constants.js",
300
+ "kind": "import-statement",
301
+ "external": true
302
+ }
303
+ ],
304
+ "exports": [
305
+ "InvalidKeyUse",
306
+ "InvalidMaxValue",
307
+ "base64ToArrBuf",
308
+ "checkValidKeyUse",
309
+ "createDeviceName",
310
+ "did",
311
+ "didToPublicKey",
312
+ "ed25519Verify",
313
+ "fromBase64",
314
+ "getDeviceName",
315
+ "getPublicKeyAsArrayBuffer",
316
+ "getPublicKeyAsUint8Array",
317
+ "importKey",
318
+ "importPublicKey",
319
+ "importRsaKey",
320
+ "isCryptoKey",
321
+ "joinBufs",
322
+ "makeEccKeypair",
323
+ "makeRSAKeypair",
324
+ "normalizeBase64ToBuf",
325
+ "normalizeToBuf",
326
+ "normalizeUnicodeToBuf",
327
+ "normalizeUtf16ToBuf",
328
+ "normalizeUtf8ToBuf",
329
+ "publicKeyToDid",
330
+ "randomBuf",
331
+ "rsaOperations",
332
+ "rsaVerify",
333
+ "sha256",
334
+ "strToArrBuf",
335
+ "toBase64"
336
+ ],
337
+ "entryPoint": "src/util.ts",
338
+ "inputs": {
339
+ "src/util.ts": {
340
+ "bytesInOutput": 12717
341
+ }
342
+ },
343
+ "bytes": 13449
344
+ },
20
345
  "dist/aes/index.js.map": {
21
346
  "imports": [],
22
347
  "exports": [],
23
348
  "inputs": {},
24
- "bytes": 8401
349
+ "bytes": 8411
25
350
  },
26
351
  "dist/aes/index.js": {
27
352
  "imports": [
@@ -53,6 +378,7 @@
53
378
  ],
54
379
  "exports": [
55
380
  "AES",
381
+ "decryptBytes",
56
382
  "importAesKey"
57
383
  ],
58
384
  "entryPoint": "src/aes/index.ts",
@@ -61,7 +387,7 @@
61
387
  "bytesInOutput": 3594
62
388
  }
63
389
  },
64
- "bytes": 3791
390
+ "bytes": 3807
65
391
  },
66
392
  "dist/ecc/index.js.map": {
67
393
  "imports": [],