@shapeshiftoss/hdwallet-native-vault 1.55.2 → 1.55.3
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/index.js +14 -28
- package/dist/index.js.map +1 -1
- package/dist/mapVault.js +42 -105
- package/dist/mapVault.js.map +1 -1
- package/dist/rawVault.js +168 -228
- package/dist/rawVault.js.map +1 -1
- package/dist/test/mockVault.skip.js +73 -129
- package/dist/test/mockVault.skip.js.map +1 -1
- package/dist/types.js +1 -2
- package/dist/util.d.ts +8 -6
- package/dist/util.d.ts.map +1 -1
- package/dist/util.js +24 -68
- package/dist/util.js.map +1 -1
- package/dist/vault.js +121 -183
- package/dist/vault.js.map +1 -1
- package/package.json +3 -3
package/dist/vault.js
CHANGED
|
@@ -1,233 +1,171 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
35
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
36
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
37
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
38
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
39
|
-
};
|
|
40
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
41
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
42
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
43
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
44
|
-
};
|
|
45
|
-
var _Vault_instances, _a, _Vault_isPrivateKey, _Vault_extensionRegistrationComplete, _Vault_valueWrappers, _Vault_wrapPrivateValue, _Vault_valueTransformers, _Vault_transformValue, _Vault_shieldingKey, _Vault_privateContents, _Vault_wrapperRevokers, _Vault_revokeWrapperForValue, _Vault_revokeWrapperForKey, _Vault_getUnwrapped, _Vault_unwrap, _Vault_sealed;
|
|
46
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
-
exports.Vault = void 0;
|
|
48
|
-
const core = __importStar(require("@shapeshiftoss/hdwallet-core"));
|
|
49
|
-
const jose = __importStar(require("jose"));
|
|
50
|
-
const ta = __importStar(require("type-assertions"));
|
|
51
|
-
const mapVault_1 = require("./mapVault");
|
|
52
|
-
const rawVault_1 = require("./rawVault");
|
|
53
|
-
const util_1 = require("./util");
|
|
1
|
+
import * as core from "@shapeshiftoss/hdwallet-core";
|
|
2
|
+
import * as jose from "jose";
|
|
3
|
+
import * as ta from "type-assertions";
|
|
4
|
+
import { MapVault } from "./mapVault";
|
|
5
|
+
import { RawVault } from "./rawVault";
|
|
6
|
+
import { crypto, decoder, encoder, Revocable, revocable, shadowedMap } from "./util";
|
|
54
7
|
ta.assert();
|
|
55
|
-
class Vault extends
|
|
8
|
+
export class Vault extends MapVault {
|
|
56
9
|
//#region static
|
|
57
|
-
static prepare(params) {
|
|
58
|
-
return
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
10
|
+
static async prepare(params) {
|
|
11
|
+
return MapVault.prepare(params);
|
|
12
|
+
}
|
|
13
|
+
static async create(password, sealed = true) {
|
|
14
|
+
return await Vault.open(undefined, password, sealed);
|
|
15
|
+
}
|
|
16
|
+
static async open(id, password, sealed = true) {
|
|
17
|
+
await Vault.prepare();
|
|
18
|
+
const out = new Vault(await RawVault.open(id, password));
|
|
19
|
+
if (sealed)
|
|
20
|
+
out.seal();
|
|
21
|
+
if (id !== undefined && password !== undefined)
|
|
22
|
+
await out.load();
|
|
23
|
+
return out;
|
|
66
24
|
}
|
|
67
|
-
static
|
|
68
|
-
return
|
|
69
|
-
yield _a.prepare();
|
|
70
|
-
const out = new _a(yield rawVault_1.RawVault.open(id, password));
|
|
71
|
-
if (sealed)
|
|
72
|
-
out.seal();
|
|
73
|
-
if (id !== undefined && password !== undefined)
|
|
74
|
-
yield out.load();
|
|
75
|
-
return out;
|
|
76
|
-
});
|
|
25
|
+
static #isPrivateKey(key) {
|
|
26
|
+
return String(key).startsWith("#");
|
|
77
27
|
}
|
|
28
|
+
static #extensionRegistrationComplete = false;
|
|
78
29
|
static extensionRegistrationComplete() {
|
|
79
|
-
|
|
30
|
+
Vault.#extensionRegistrationComplete = true;
|
|
80
31
|
}
|
|
32
|
+
static #valueWrappers = new Map();
|
|
81
33
|
static registerValueWrapper(key, valueWrapper) {
|
|
82
|
-
if (
|
|
34
|
+
if (Vault.#extensionRegistrationComplete)
|
|
83
35
|
throw new Error(`can't register value wrapper after registration is complete`);
|
|
84
|
-
if (!
|
|
36
|
+
if (!Vault.#isPrivateKey(key))
|
|
85
37
|
throw new TypeError(`can't set value wrapper for non-private key '${key}'`);
|
|
86
|
-
if (
|
|
38
|
+
if (Vault.#valueWrappers.has(key))
|
|
87
39
|
throw new Error(`can't overwrite previously-set value wrapper for key '${key}'`);
|
|
88
|
-
|
|
89
|
-
}
|
|
40
|
+
Vault.#valueWrappers.set(key, valueWrapper);
|
|
41
|
+
}
|
|
42
|
+
static #wrapPrivateValue(key, value, addRevoker) {
|
|
43
|
+
if (!this.#isPrivateKey(key))
|
|
44
|
+
throw new TypeError(`can't wrap value with non-private key '${key}'`);
|
|
45
|
+
const valueWrapper = this.#valueWrappers.get(key);
|
|
46
|
+
// if (!valueWrapper) throw new Error(`private key '${key}' does not have a registered value wrapper`)
|
|
47
|
+
if (!valueWrapper)
|
|
48
|
+
return core.untouchable(`no value wrapper registered for private key '${key}'`);
|
|
49
|
+
return (async () => await valueWrapper(await value, addRevoker))();
|
|
50
|
+
}
|
|
51
|
+
static #valueTransformers = new Map();
|
|
90
52
|
static registerValueTransformer(key, valueTransformer) {
|
|
91
|
-
if (
|
|
53
|
+
if (Vault.#extensionRegistrationComplete)
|
|
92
54
|
throw new Error(`can't register value transformer after registration is complete`);
|
|
93
|
-
if (!
|
|
55
|
+
if (!Vault.#isPrivateKey(key))
|
|
94
56
|
throw new TypeError(`can't set value transformer for non-private key '${key}'`);
|
|
95
|
-
if (
|
|
57
|
+
if (Vault.#valueTransformers.has(key))
|
|
96
58
|
throw new Error(`can't overwrite previously-set value transformer for key '${key}'`);
|
|
97
|
-
|
|
98
|
-
}
|
|
59
|
+
Vault.#valueTransformers.set(key, valueTransformer);
|
|
60
|
+
}
|
|
61
|
+
static #transformValue(key, value, addRevoker) {
|
|
62
|
+
const valueTransformer = this.#valueTransformers.get(key);
|
|
63
|
+
if (!valueTransformer)
|
|
64
|
+
return value;
|
|
65
|
+
return (async () => await valueTransformer(await value, addRevoker))();
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
#shieldingKey = (async () => {
|
|
69
|
+
const out = (await crypto).subtle.generateKey({
|
|
70
|
+
name: "AES-KW",
|
|
71
|
+
length: 256,
|
|
72
|
+
}, false, ["wrapKey", "unwrapKey"]);
|
|
73
|
+
return revocable(out, this.addRevoker.bind(this));
|
|
74
|
+
})();
|
|
75
|
+
#privateContents;
|
|
76
|
+
#wrapperRevokers = new Map();
|
|
99
77
|
constructor(rawVault) {
|
|
100
78
|
super(rawVault);
|
|
101
|
-
|
|
102
|
-
//#endregion
|
|
103
|
-
_Vault_shieldingKey.set(this, (() => __awaiter(this, void 0, void 0, function* () {
|
|
104
|
-
const out = (yield util_1.crypto).subtle.generateKey({
|
|
105
|
-
name: "AES-KW",
|
|
106
|
-
length: 256,
|
|
107
|
-
}, false, ["wrapKey", "unwrapKey"]);
|
|
108
|
-
return (0, util_1.revocable)(out, this.addRevoker.bind(this));
|
|
109
|
-
}))());
|
|
110
|
-
_Vault_privateContents.set(this, void 0);
|
|
111
|
-
_Vault_wrapperRevokers.set(this, new Map());
|
|
112
|
-
_Vault_sealed.set(this, false);
|
|
113
|
-
__classPrivateFieldSet(this, _Vault_privateContents, (0, util_1.revocable)(new Map(), (x) => this.addRevoker(x)), "f");
|
|
79
|
+
this.#privateContents = revocable(new Map(), (x) => this.addRevoker(x));
|
|
114
80
|
this.addRevoker(() => this.clear());
|
|
115
81
|
}
|
|
82
|
+
#revokeWrapperForValue(x) {
|
|
83
|
+
this.#wrapperRevokers.get(x)?.();
|
|
84
|
+
this.#wrapperRevokers.delete(x);
|
|
85
|
+
}
|
|
86
|
+
#revokeWrapperForKey(key) {
|
|
87
|
+
this.#revokeWrapperForValue(this.#privateContents.get(key));
|
|
88
|
+
}
|
|
116
89
|
clear() {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
90
|
+
this.#privateContents.forEach((x) => this.#revokeWrapperForValue(x));
|
|
91
|
+
this.#privateContents.clear();
|
|
92
|
+
this.#wrapperRevokers.clear();
|
|
120
93
|
super.clear();
|
|
121
94
|
}
|
|
122
95
|
delete(key) {
|
|
123
|
-
|
|
124
|
-
|
|
96
|
+
this.#revokeWrapperForKey(key);
|
|
97
|
+
this.#privateContents.delete(key);
|
|
125
98
|
return super.delete(key);
|
|
126
99
|
}
|
|
127
100
|
set(key, value) {
|
|
128
|
-
value =
|
|
129
|
-
if (!
|
|
101
|
+
value = Vault.#transformValue(key, value, this.addRevoker.bind(this));
|
|
102
|
+
if (!Vault.#isPrivateKey(key))
|
|
130
103
|
return super.set(key, value);
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const payload =
|
|
104
|
+
this.#revokeWrapperForKey(key);
|
|
105
|
+
this.#privateContents.set(key, (async () => {
|
|
106
|
+
const payload = encoder.encode(JSON.stringify(await value));
|
|
134
107
|
return new jose.FlattenedEncrypt(payload)
|
|
135
108
|
.setProtectedHeader({
|
|
136
109
|
alg: "A256KW",
|
|
137
110
|
enc: "A256GCM",
|
|
138
111
|
})
|
|
139
|
-
.encrypt(
|
|
140
|
-
})
|
|
141
|
-
const wrapperRevoker = new (
|
|
112
|
+
.encrypt(await this.#shieldingKey);
|
|
113
|
+
})());
|
|
114
|
+
const wrapperRevoker = new (Revocable(class {
|
|
142
115
|
}))();
|
|
143
|
-
const wrapper =
|
|
144
|
-
|
|
116
|
+
const wrapper = Vault.#wrapPrivateValue(key, value, (x) => wrapperRevoker.addRevoker(x));
|
|
117
|
+
this.#wrapperRevokers.set(key, () => wrapperRevoker.revoke());
|
|
145
118
|
return super.set(key, wrapper);
|
|
146
119
|
}
|
|
120
|
+
#getUnwrapped(key) {
|
|
121
|
+
if (!Vault.#isPrivateKey(key))
|
|
122
|
+
return this.get(key);
|
|
123
|
+
const jwe = this.#privateContents.get(key);
|
|
124
|
+
if (!jwe)
|
|
125
|
+
return undefined;
|
|
126
|
+
return (async () => {
|
|
127
|
+
const decryptResult = await jose.flattenedDecrypt(await jwe, await this.#shieldingKey, {
|
|
128
|
+
keyManagementAlgorithms: ["A256KW"],
|
|
129
|
+
contentEncryptionAlgorithms: ["A256GCM"],
|
|
130
|
+
});
|
|
131
|
+
const out = JSON.parse(decoder.decode(decryptResult.plaintext));
|
|
132
|
+
return out;
|
|
133
|
+
})();
|
|
134
|
+
}
|
|
135
|
+
#unwrap(addRevoker = (x) => this.addRevoker(x)) {
|
|
136
|
+
return shadowedMap(this, (x) => this.#getUnwrapped(x), addRevoker);
|
|
137
|
+
}
|
|
138
|
+
#sealed = false;
|
|
147
139
|
seal() {
|
|
148
|
-
|
|
140
|
+
this.#sealed = true;
|
|
149
141
|
}
|
|
150
142
|
get sealed() {
|
|
151
|
-
return
|
|
143
|
+
return this.#sealed;
|
|
152
144
|
}
|
|
153
145
|
unwrap(addRevoker) {
|
|
154
|
-
if (
|
|
146
|
+
if (this.#sealed)
|
|
155
147
|
throw new Error("can't unwrap a sealed vault");
|
|
156
|
-
return
|
|
148
|
+
return this.#unwrap((x) => {
|
|
157
149
|
this.addRevoker(x);
|
|
158
|
-
addRevoker
|
|
150
|
+
addRevoker?.(x);
|
|
159
151
|
});
|
|
160
152
|
}
|
|
161
|
-
load() {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
-
yield _super.load.call(this, (entries) => __awaiter(this, void 0, void 0, function* () {
|
|
167
|
-
this.clear();
|
|
168
|
-
entries.forEach(([k, v]) => this.set(k, v));
|
|
169
|
-
}));
|
|
170
|
-
return this;
|
|
153
|
+
async load() {
|
|
154
|
+
await super.load(async (entries) => {
|
|
155
|
+
this.clear();
|
|
156
|
+
entries.forEach(([k, v]) => this.set(k, v));
|
|
171
157
|
});
|
|
158
|
+
return this;
|
|
172
159
|
}
|
|
173
|
-
save() {
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
const unwrapped = __classPrivateFieldGet(this, _Vault_instances, "m", _Vault_unwrap).call(this, (x) => unwrappedRevoker.addRevoker(x));
|
|
181
|
-
yield _super.save.call(this, () => __awaiter(this, void 0, void 0, function* () {
|
|
182
|
-
return yield Promise.all(Array.from(unwrapped.entries()).map(([k, v]) => __awaiter(this, void 0, void 0, function* () { return [k, yield v]; })));
|
|
183
|
-
}));
|
|
184
|
-
unwrappedRevoker.revoke();
|
|
185
|
-
return this;
|
|
186
|
-
});
|
|
160
|
+
async save() {
|
|
161
|
+
const unwrappedRevoker = new (Revocable(class {
|
|
162
|
+
}))();
|
|
163
|
+
const unwrapped = this.#unwrap((x) => unwrappedRevoker.addRevoker(x));
|
|
164
|
+
await super.save(async () => await Promise.all(Array.from(unwrapped.entries()).map(async ([k, v]) => [k, await v])));
|
|
165
|
+
unwrappedRevoker.revoke();
|
|
166
|
+
return this;
|
|
187
167
|
}
|
|
188
168
|
}
|
|
189
|
-
exports.Vault = Vault;
|
|
190
|
-
_a = Vault, _Vault_shieldingKey = new WeakMap(), _Vault_privateContents = new WeakMap(), _Vault_wrapperRevokers = new WeakMap(), _Vault_sealed = new WeakMap(), _Vault_instances = new WeakSet(), _Vault_isPrivateKey = function _Vault_isPrivateKey(key) {
|
|
191
|
-
return String(key).startsWith("#");
|
|
192
|
-
}, _Vault_wrapPrivateValue = function _Vault_wrapPrivateValue(key, value, addRevoker) {
|
|
193
|
-
if (!__classPrivateFieldGet(this, _a, "m", _Vault_isPrivateKey).call(this, key))
|
|
194
|
-
throw new TypeError(`can't wrap value with non-private key '${key}'`);
|
|
195
|
-
const valueWrapper = __classPrivateFieldGet(this, _a, "f", _Vault_valueWrappers).get(key);
|
|
196
|
-
// if (!valueWrapper) throw new Error(`private key '${key}' does not have a registered value wrapper`)
|
|
197
|
-
if (!valueWrapper)
|
|
198
|
-
return core.untouchable(`no value wrapper registered for private key '${key}'`);
|
|
199
|
-
return (() => __awaiter(this, void 0, void 0, function* () { return yield valueWrapper(yield value, addRevoker); }))();
|
|
200
|
-
}, _Vault_transformValue = function _Vault_transformValue(key, value, addRevoker) {
|
|
201
|
-
const valueTransformer = __classPrivateFieldGet(this, _a, "f", _Vault_valueTransformers).get(key);
|
|
202
|
-
if (!valueTransformer)
|
|
203
|
-
return value;
|
|
204
|
-
return (() => __awaiter(this, void 0, void 0, function* () { return yield valueTransformer(yield value, addRevoker); }))();
|
|
205
|
-
}, _Vault_revokeWrapperForValue = function _Vault_revokeWrapperForValue(x) {
|
|
206
|
-
var _b;
|
|
207
|
-
(_b = __classPrivateFieldGet(this, _Vault_wrapperRevokers, "f").get(x)) === null || _b === void 0 ? void 0 : _b();
|
|
208
|
-
__classPrivateFieldGet(this, _Vault_wrapperRevokers, "f").delete(x);
|
|
209
|
-
}, _Vault_revokeWrapperForKey = function _Vault_revokeWrapperForKey(key) {
|
|
210
|
-
__classPrivateFieldGet(this, _Vault_instances, "m", _Vault_revokeWrapperForValue).call(this, __classPrivateFieldGet(this, _Vault_privateContents, "f").get(key));
|
|
211
|
-
}, _Vault_getUnwrapped = function _Vault_getUnwrapped(key) {
|
|
212
|
-
if (!__classPrivateFieldGet(_a, _a, "m", _Vault_isPrivateKey).call(_a, key))
|
|
213
|
-
return this.get(key);
|
|
214
|
-
const jwe = __classPrivateFieldGet(this, _Vault_privateContents, "f").get(key);
|
|
215
|
-
if (!jwe)
|
|
216
|
-
return undefined;
|
|
217
|
-
return (() => __awaiter(this, void 0, void 0, function* () {
|
|
218
|
-
const decryptResult = yield jose.flattenedDecrypt(yield jwe, yield __classPrivateFieldGet(this, _Vault_shieldingKey, "f"), {
|
|
219
|
-
keyManagementAlgorithms: ["A256KW"],
|
|
220
|
-
contentEncryptionAlgorithms: ["A256GCM"],
|
|
221
|
-
});
|
|
222
|
-
const out = JSON.parse(util_1.decoder.decode(decryptResult.plaintext));
|
|
223
|
-
return out;
|
|
224
|
-
}))();
|
|
225
|
-
}, _Vault_unwrap = function _Vault_unwrap(addRevoker = (x) => this.addRevoker(x)) {
|
|
226
|
-
return (0, util_1.shadowedMap)(this, (x) => __classPrivateFieldGet(this, _Vault_instances, "m", _Vault_getUnwrapped).call(this, x), addRevoker);
|
|
227
|
-
};
|
|
228
|
-
_Vault_extensionRegistrationComplete = { value: false };
|
|
229
|
-
_Vault_valueWrappers = { value: new Map() };
|
|
230
|
-
_Vault_valueTransformers = { value: new Map() };
|
|
231
169
|
Object.freeze(Vault);
|
|
232
170
|
Object.freeze(Vault.prototype);
|
|
233
171
|
Object.freeze(Object.getPrototypeOf(Vault));
|
package/dist/vault.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../src/vault.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../src/vault.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,8BAA8B,CAAC;AACrD,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAKrF,EAAE,CAAC,MAAM,EAA0D,CAAC;AAEpE,MAA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C,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QACtE,MAAM,KAAK,CAAC,IAAI,CACd,KAAK,IAAI,EAAE,CACT,MAAM,OAAO,CAAC,GAAG,CACf,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAiC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CACnG,CACJ,CAAC;QACF,gBAAgB,CAAC,MAAM,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;;AAGH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACrB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AAC/B,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapeshiftoss/hdwallet-native-vault",
|
|
3
|
-
"version": "1.55.
|
|
3
|
+
"version": "1.55.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"prepublishOnly": "yarn clean && yarn build"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@shapeshiftoss/hdwallet-native": "1.55.
|
|
17
|
+
"@shapeshiftoss/hdwallet-native": "1.55.3",
|
|
18
18
|
"bip39": "^3.0.4",
|
|
19
19
|
"hash-wasm": "^4.11.0",
|
|
20
20
|
"idb-keyval": "^6.0.3",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"@types/tiny-secp256k1": "^1.0.0",
|
|
29
29
|
"fake-indexeddb": "^3.1.7"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "139e31e9d61b2d8d63488101c6227a50f4fad061"
|
|
32
32
|
}
|