@dstorage-tech/dstorage-sdk 0.0.6 → 0.0.8
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/dist/KeypairEncryptionAdapter-EOBRCIGP-5PFPNLLA.mjs +8 -0
- package/dist/{KeypairEncryptionAdapter-XUKCLRFU-AYDAZ2TZ.mjs → KeypairEncryptionAdapter-EOBRCIGP-FLPJIL26.mjs} +3 -3
- package/dist/{MnemonicEncryptionAdapter-RCHUETBP-M7NHGSHO.mjs → MnemonicEncryptionAdapter-S56YG63Q-B3F3TO3T.mjs} +3 -3
- package/dist/MnemonicEncryptionAdapter-S56YG63Q-POTD74UN.mjs +8 -0
- package/dist/{PasswordEncryptionAdapter-ECHND672-MUTHAMZY.mjs → PasswordEncryptionAdapter-B2UG7MWB-M4C3KJ4S.mjs} +3 -3
- package/dist/{PasswordEncryptionAdapter-ECHND672-3DEFO6FP.mjs → PasswordEncryptionAdapter-B2UG7MWB-QCSOIQJA.mjs} +3 -3
- package/dist/browser.d.mts +91 -8
- package/dist/browser.mjs +171 -67
- package/dist/{chunk-HDD6SUU4.mjs → chunk-42O7KEL4.mjs} +30 -11
- package/dist/{chunk-X4LEBNK6.mjs → chunk-5F3HZ2RJ.mjs} +30 -11
- package/dist/{chunk-6IAQVMSM.mjs → chunk-E73HFT6J.mjs} +5 -5
- package/dist/{chunk-UDYXMII2.mjs → chunk-EOPUNIUH.mjs} +5 -5
- package/dist/{chunk-O37NHERH.mjs → chunk-L6WCT64V.mjs} +4 -2
- package/dist/{chunk-4X5K43JF.mjs → chunk-M3F2LR3B.mjs} +3 -1
- package/dist/{chunk-JMPRZK5D.mjs → chunk-O6COTUD4.mjs} +3 -1
- package/dist/{chunk-BWLEAAFW.mjs → chunk-PCXBQRCO.mjs} +55 -2056
- package/dist/{chunk-OLGVVM5Y.mjs → chunk-QFJ2Y4XE.mjs} +5 -5
- package/dist/{chunk-Z6DUAI5B.mjs → chunk-XW4RZG2X.mjs} +5 -5
- package/dist/{contract-api-TJ7JPHZA-6FUBJ6DS.mjs → contract-api-NUY4UEKE-ZANT3ICG.mjs} +3 -3
- package/dist/{contract-api-AO4RGPLT-ENC72WCG.mjs → contract-api-P6YEDYQ6-2X6BMD64.mjs} +3 -3
- package/dist/{dist-INTAFXQ7.mjs → dist-AGNOIJI4.mjs} +3 -1
- package/dist/{dist-MOLWJ4Y7.mjs → dist-J4JUJ2J5.mjs} +3 -1
- package/dist/errors.d.mts +2 -0
- package/dist/errors.d.ts +2 -0
- package/dist/errors.js +10 -2054
- package/dist/errors.mjs +10 -2054
- package/dist/index.d.mts +108 -8
- package/dist/index.d.ts +108 -8
- package/dist/index.js +306 -2187
- package/dist/index.mjs +174 -70
- package/package.json +3 -2
- package/dist/KeypairEncryptionAdapter-XUKCLRFU-ERPYK5S4.mjs +0 -8
- package/dist/MnemonicEncryptionAdapter-RCHUETBP-DZPBGQG6.mjs +0 -8
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EncryptionErrorCode
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L6WCT64V.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DStorageError,
|
|
6
6
|
KeyDeriver,
|
|
7
7
|
deriveKek,
|
|
8
8
|
unwrapKey,
|
|
9
9
|
wrapKey
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PCXBQRCO.mjs";
|
|
11
11
|
|
|
12
|
-
// ../encryption/dist/chunk-
|
|
12
|
+
// ../encryption/dist/chunk-SOX5GKK4.mjs
|
|
13
13
|
var MnemonicEncryptionAdapter = class {
|
|
14
14
|
constructor(input) {
|
|
15
15
|
this.name = "mnemonic";
|
|
@@ -73,8 +73,8 @@ var MnemonicEncryptionAdapter = class {
|
|
|
73
73
|
* @param variant ML-KEM variant. Default: "mlkem768".
|
|
74
74
|
*/
|
|
75
75
|
async intoKeypairEncryptionAdapter(context, variant) {
|
|
76
|
-
const { KeypairEncryptionAdapter } = await import("./KeypairEncryptionAdapter-
|
|
77
|
-
const { mlkemGenerateKeypairFromSeed } = await import("./dist-
|
|
76
|
+
const { KeypairEncryptionAdapter } = await import("./KeypairEncryptionAdapter-EOBRCIGP-5PFPNLLA.mjs");
|
|
77
|
+
const { mlkemGenerateKeypairFromSeed } = await import("./dist-J4JUJ2J5.mjs");
|
|
78
78
|
const kekMaterial = await this.kekMaterialPromise;
|
|
79
79
|
const mlkemBits = await globalThis.crypto.subtle.deriveBits(
|
|
80
80
|
{
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EncryptionErrorCode
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L6WCT64V.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DStorageError,
|
|
6
6
|
mlkemGenerateKeypair,
|
|
7
7
|
mlkemUnwrapDek,
|
|
8
8
|
mlkemWrapDek
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PCXBQRCO.mjs";
|
|
10
10
|
|
|
11
|
-
// ../encryption/dist/chunk-
|
|
11
|
+
// ../encryption/dist/chunk-A7BIR2QB.mjs
|
|
12
12
|
var KeypairEncryptionAdapter = class _KeypairEncryptionAdapter {
|
|
13
13
|
constructor(pk, sk, context, variant) {
|
|
14
14
|
this.publicKey = pk;
|
|
@@ -64,7 +64,7 @@ var KeypairEncryptionAdapter = class _KeypairEncryptionAdapter {
|
|
|
64
64
|
* @param variant Default: "mlkem768"
|
|
65
65
|
*/
|
|
66
66
|
static async fromMnemonic(input, context, variant = "mlkem768") {
|
|
67
|
-
const { MnemonicEncryptionAdapter } = await import("./MnemonicEncryptionAdapter-
|
|
67
|
+
const { MnemonicEncryptionAdapter } = await import("./MnemonicEncryptionAdapter-S56YG63Q-B3F3TO3T.mjs");
|
|
68
68
|
const ms = new MnemonicEncryptionAdapter(input);
|
|
69
69
|
return ms.intoKeypairEncryptionAdapter(context, variant);
|
|
70
70
|
}
|
|
@@ -84,7 +84,7 @@ var KeypairEncryptionAdapter = class _KeypairEncryptionAdapter {
|
|
|
84
84
|
* @param params Optional custom scrypt params
|
|
85
85
|
*/
|
|
86
86
|
static async fromPassword(password, salt, context, variant = "mlkem768", params) {
|
|
87
|
-
const { PasswordEncryptionAdapter } = await import("./PasswordEncryptionAdapter-
|
|
87
|
+
const { PasswordEncryptionAdapter } = await import("./PasswordEncryptionAdapter-B2UG7MWB-QCSOIQJA.mjs");
|
|
88
88
|
const ps = new PasswordEncryptionAdapter({
|
|
89
89
|
password,
|
|
90
90
|
salt,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../encryption/dist/chunk-
|
|
1
|
+
// ../encryption/dist/chunk-AGSZ3S6J.mjs
|
|
2
2
|
var EncryptionErrorCode = {
|
|
3
3
|
KEYPAIR_MISSING_SECRET_KEY: 13001,
|
|
4
4
|
MNEMONIC_TOO_SHORT: 13002,
|
|
@@ -9,7 +9,9 @@ var EncryptionErrorCode = {
|
|
|
9
9
|
PASSWORD_TOO_FEW_DISTINCT: 13007,
|
|
10
10
|
PASSWORD_SEQUENTIAL_RUN: 13008,
|
|
11
11
|
PASSWORD_KEYBOARD_WALK: 13009,
|
|
12
|
-
PASSWORD_ENTROPY_TOO_LOW: 13010
|
|
12
|
+
PASSWORD_ENTROPY_TOO_LOW: 13010,
|
|
13
|
+
PASSWORD_SCRYPT_N_TOO_LOW: 13011,
|
|
14
|
+
PASSWORD_SCRYPT_N_NOT_POWER_OF_TWO: 13012
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../chain/dist/chunk-
|
|
1
|
+
// ../chain/dist/chunk-XMWGGIPS.mjs
|
|
2
2
|
var ChainErrorCode = {
|
|
3
3
|
// mock.ts — 11001-11009
|
|
4
4
|
MOCK_REF_NOT_FOUND: 11001,
|
|
@@ -21,6 +21,8 @@ var ChainErrorCode = {
|
|
|
21
21
|
GATEWAY_LIST_NOT_ARRAY: 11212,
|
|
22
22
|
GATEWAY_REMOVE_FAILED: 11213,
|
|
23
23
|
GATEWAY_REMOVE_HTTP_ERROR: 11214,
|
|
24
|
+
GATEWAY_READ_RESPONSE_TOO_LARGE: 11215,
|
|
25
|
+
GATEWAY_LIST_RESPONSE_TOO_LARGE: 11216,
|
|
24
26
|
// contract-api.ts — 11401-11409
|
|
25
27
|
CONTRACT_UNSUPPORTED_VERSION: 11401,
|
|
26
28
|
CONTRACT_CIRCUIT_RESULT_MISSING: 11402,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../chain/dist/chunk-
|
|
1
|
+
// ../chain/dist/chunk-GNG6TMQC.mjs
|
|
2
2
|
var ChainErrorCode = {
|
|
3
3
|
// mock.ts — 11001-11009
|
|
4
4
|
MOCK_REF_NOT_FOUND: 11001,
|
|
@@ -21,6 +21,8 @@ var ChainErrorCode = {
|
|
|
21
21
|
GATEWAY_LIST_NOT_ARRAY: 11212,
|
|
22
22
|
GATEWAY_REMOVE_FAILED: 11213,
|
|
23
23
|
GATEWAY_REMOVE_HTTP_ERROR: 11214,
|
|
24
|
+
GATEWAY_READ_RESPONSE_TOO_LARGE: 11215,
|
|
25
|
+
GATEWAY_LIST_RESPONSE_TOO_LARGE: 11216,
|
|
24
26
|
// contract-api.ts — 11401-11409
|
|
25
27
|
CONTRACT_UNSUPPORTED_VERSION: 11401,
|
|
26
28
|
CONTRACT_CIRCUIT_RESULT_MISSING: 11402,
|