@xyo-network/quant-wallet 7.0.5 → 7.0.6
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 +1 -34
- package/dist/neutral/index.d.ts +5 -2
- package/dist/neutral/index.d.ts.map +1 -1
- package/dist/neutral/index.mjs +2 -229
- package/dist/neutral/index.mjs.map +3 -3
- package/package.json +16 -24
- package/dist/neutral/QuantHDWallet.d.ts +0 -47
- package/dist/neutral/QuantHDWallet.d.ts.map +0 -1
- package/dist/neutral/bip85.d.ts +0 -10
- package/dist/neutral/bip85.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,36 +1,3 @@
|
|
|
1
|
-
[![logo][]](https://xyo.network)
|
|
2
|
-
|
|
3
1
|
# @xyo-network/quant-wallet
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
A classical BIP-32/BIP-39 spine (via `ethers.HDNodeWallet`) walks the hierarchy; at every node, BIP-85 derives a deterministic 32-byte seed (`HMAC-SHA512("bip-entropy-from-k", node.privateKey)[0..32]`) that becomes the input to `MlDsa.keygen(seed)`. The result is a deterministic, hierarchical post-quantum identity reproducible from a single BIP-39 mnemonic.
|
|
8
|
-
|
|
9
|
-
Addresses are **bech32m** strings with the algorithm in the HRP (`qm65` for ML-DSA-65) so the
|
|
10
|
-
BoundWitness validator dispatches to the ML-DSA verifier registered by `@xyo-network/quant-account`.
|
|
11
|
-
See [`@xyo-network/address`](../../core/packages/address) for the full address format and API.
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```ts
|
|
16
|
-
import { QuantHDWallet } from '@xyo-network/quant-wallet'
|
|
17
|
-
|
|
18
|
-
const wallet = await QuantHDWallet.fromPhrase('abandon abandon ... abandon abandon about')
|
|
19
|
-
console.log(wallet.address) // 'qm65…' (bech32m, 43 chars)
|
|
20
|
-
console.log(wallet.algorithm) // 'ml-dsa-65'
|
|
21
|
-
|
|
22
|
-
const child = await wallet.derivePath("m/44'/60'/0'/0/0")
|
|
23
|
-
const [signature] = await child.sign(hashBytes)
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Notes
|
|
27
|
-
|
|
28
|
-
- `derivePath` accepts either a classical BIP-32 path (entropy comes from the implicit BIP-85 leaf tail) or an explicit BIP-85 path beginning with `m/83696968'/`.
|
|
29
|
-
- `neuter()` is not supported — ML-DSA-65 has no standardized public-key-only HD derivation.
|
|
30
|
-
- `signJwt` is not implemented — no IANA JOSE `alg` for ML-DSA-65 is finalized yet.
|
|
31
|
-
|
|
32
|
-
## Credits
|
|
33
|
-
|
|
34
|
-
[Made with 🔥 and ❄️ by XYO Foundation](https://xyo.network)
|
|
35
|
-
|
|
36
|
-
[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
|
|
3
|
+
Deprecated compatibility stub. Use `@xyo-network/sdk-protocol/quant-wallet` instead.
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use `@xyo-network/sdk-protocol/quant-wallet` instead.
|
|
3
|
+
* `@xyo-network/quant-wallet` is a backward-compatibility re-export stub.
|
|
4
|
+
*/
|
|
5
|
+
export * from '@xyo-network/sdk-protocol/quant-wallet';
|
|
3
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,wCAAwC,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,230 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
5
|
-
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
6
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
7
|
-
if (decorator = decorators[i])
|
|
8
|
-
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
9
|
-
if (kind && result) __defProp(target, key, result);
|
|
10
|
-
return result;
|
|
11
|
-
};
|
|
12
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
13
|
-
|
|
14
|
-
// src/bip85.ts
|
|
15
|
-
import {
|
|
16
|
-
computeHmac,
|
|
17
|
-
getBytes,
|
|
18
|
-
toUtf8Bytes
|
|
19
|
-
} from "ethers";
|
|
20
|
-
var BIP85_PURPOSE = "83696968'";
|
|
21
|
-
var BIP85_HEX_APP = "128169'";
|
|
22
|
-
var BIP85_HMAC_KEY = "bip-entropy-from-k";
|
|
23
|
-
var BIP85_SEED_LENGTH = 32;
|
|
24
|
-
function bip85DefaultLeafTail(index = 0) {
|
|
25
|
-
return `${BIP85_PURPOSE}/${BIP85_HEX_APP}/32'/${index}'`;
|
|
26
|
-
}
|
|
27
|
-
function isBip85AbsolutePath(path) {
|
|
28
|
-
return path.startsWith(`m/${BIP85_PURPOSE}/`);
|
|
29
|
-
}
|
|
30
|
-
function isUnderBip85Purpose(node) {
|
|
31
|
-
const p = node.path;
|
|
32
|
-
if (p === null) return false;
|
|
33
|
-
return p === `m/${BIP85_PURPOSE}` || p.startsWith(`m/${BIP85_PURPOSE}/`);
|
|
34
|
-
}
|
|
35
|
-
function bip85EntropyFromNode(node) {
|
|
36
|
-
const key = toUtf8Bytes(BIP85_HMAC_KEY);
|
|
37
|
-
const msg = getBytes(node.privateKey);
|
|
38
|
-
const hmac = computeHmac("sha512", key, msg);
|
|
39
|
-
return getBytes(hmac).slice(0, BIP85_SEED_LENGTH);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// src/QuantHDWallet.ts
|
|
43
|
-
import { generateMnemonic } from "@scure/bip39";
|
|
44
|
-
import { wordlist as englishWordlist } from "@scure/bip39/wordlists/english.js";
|
|
45
|
-
import {
|
|
46
|
-
hexFromArrayBuffer,
|
|
47
|
-
staticImplements,
|
|
48
|
-
toUint8Array
|
|
49
|
-
} from "@xylabs/sdk";
|
|
50
|
-
import {
|
|
51
|
-
isMnemonicInitializationConfig,
|
|
52
|
-
isPhraseInitializationConfig,
|
|
53
|
-
isPrivateKeyInitializationConfig
|
|
54
|
-
} from "@xyo-network/account-model";
|
|
55
|
-
import { QuantAccount } from "@xyo-network/quant-account";
|
|
56
|
-
import {
|
|
57
|
-
defaultPath,
|
|
58
|
-
HDNodeWallet,
|
|
59
|
-
Mnemonic
|
|
60
|
-
} from "ethers";
|
|
61
|
-
var QuantHDWallet = class {
|
|
62
|
-
algorithm = "ml-dsa-65";
|
|
63
|
-
_account;
|
|
64
|
-
_master;
|
|
65
|
-
_seed;
|
|
66
|
-
node;
|
|
67
|
-
neuter = () => {
|
|
68
|
-
throw new Error("neuter() is not implemented for ml-dsa-65 HD wallets");
|
|
69
|
-
};
|
|
70
|
-
constructor(key, node, master, seed, account) {
|
|
71
|
-
if (key !== QuantHDWallet._protectedConstructorKey) {
|
|
72
|
-
throw new Error("Do not call this protected constructor");
|
|
73
|
-
}
|
|
74
|
-
this.node = node;
|
|
75
|
-
this._master = master;
|
|
76
|
-
this._seed = seed;
|
|
77
|
-
this._account = account;
|
|
78
|
-
}
|
|
79
|
-
static async create(opts) {
|
|
80
|
-
if (isPhraseInitializationConfig(opts)) {
|
|
81
|
-
return await this.fromPhrase(opts.phrase);
|
|
82
|
-
}
|
|
83
|
-
if (isMnemonicInitializationConfig(opts)) {
|
|
84
|
-
return await this.fromPhrase(opts.mnemonic, opts.path);
|
|
85
|
-
}
|
|
86
|
-
if (isPrivateKeyInitializationConfig(opts)) {
|
|
87
|
-
throw new Error("Invalid initialization config. from privateKey not supported. Use QuantAccount.fromPrivateKey instead.");
|
|
88
|
-
}
|
|
89
|
-
throw new Error("Invalid initialization config");
|
|
90
|
-
}
|
|
91
|
-
static async createFromNode(node, master, previousHash) {
|
|
92
|
-
const leafNode = isUnderBip85Purpose(node) ? node : node.derivePath(bip85DefaultLeafTail(0));
|
|
93
|
-
const seed = bip85EntropyFromNode(leafNode);
|
|
94
|
-
const account = await QuantAccount.create({
|
|
95
|
-
privateKey: seed.buffer,
|
|
96
|
-
previousHash: previousHash === void 0 ? void 0 : toUint8Array(previousHash, 32).buffer
|
|
97
|
-
});
|
|
98
|
-
const wallet = new QuantHDWallet(this._protectedConstructorKey, node, master, seed, account);
|
|
99
|
-
return wallet.verifyUniqueWallet();
|
|
100
|
-
}
|
|
101
|
-
static async fromExtendedKey(key) {
|
|
102
|
-
const node = HDNodeWallet.fromExtendedKey(key);
|
|
103
|
-
const master = node.depth === 0 ? node : void 0;
|
|
104
|
-
return await this.createFromNode(node, master);
|
|
105
|
-
}
|
|
106
|
-
static async fromMnemonic(mnemonic, path = defaultPath) {
|
|
107
|
-
const master = HDNodeWallet.fromMnemonic(mnemonic, "m");
|
|
108
|
-
const node = path === "m" || path === "m/" ? master : master.derivePath(path.startsWith("m/") ? path.slice(2) : path);
|
|
109
|
-
return await this.createFromNode(node, master);
|
|
110
|
-
}
|
|
111
|
-
static async fromPhrase(phrase, path = defaultPath) {
|
|
112
|
-
return await this.fromMnemonic(Mnemonic.fromPhrase(phrase), path);
|
|
113
|
-
}
|
|
114
|
-
static async fromPrivateKey(_key) {
|
|
115
|
-
return await Promise.reject(new Error("fromPrivateKey is not supported on QuantHDWallet \u2014 use fromSeed, fromPhrase, fromMnemonic, or fromExtendedKey"));
|
|
116
|
-
}
|
|
117
|
-
static async fromSeed(seed) {
|
|
118
|
-
const master = HDNodeWallet.fromSeed(toUint8Array(seed));
|
|
119
|
-
return await this.createFromNode(master, master);
|
|
120
|
-
}
|
|
121
|
-
static generateMnemonic(wordlist = englishWordlist, strength = 256) {
|
|
122
|
-
return generateMnemonic(wordlist, strength);
|
|
123
|
-
}
|
|
124
|
-
static async random() {
|
|
125
|
-
return await this.fromPhrase(this.generateMnemonic());
|
|
126
|
-
}
|
|
127
|
-
get address() {
|
|
128
|
-
return this._account.address;
|
|
129
|
-
}
|
|
130
|
-
get addressBytes() {
|
|
131
|
-
return this._account.addressBytes;
|
|
132
|
-
}
|
|
133
|
-
get chainCode() {
|
|
134
|
-
return this.node.chainCode;
|
|
135
|
-
}
|
|
136
|
-
get depth() {
|
|
137
|
-
return this.node.depth;
|
|
138
|
-
}
|
|
139
|
-
get extendedKey() {
|
|
140
|
-
return this.node.extendedKey;
|
|
141
|
-
}
|
|
142
|
-
get fingerprint() {
|
|
143
|
-
return this.node.fingerprint;
|
|
144
|
-
}
|
|
145
|
-
get index() {
|
|
146
|
-
return this.node.index;
|
|
147
|
-
}
|
|
148
|
-
get mnemonic() {
|
|
149
|
-
return this.node.mnemonic;
|
|
150
|
-
}
|
|
151
|
-
get parentFingerprint() {
|
|
152
|
-
return this.node.parentFingerprint;
|
|
153
|
-
}
|
|
154
|
-
get path() {
|
|
155
|
-
return this.node.path;
|
|
156
|
-
}
|
|
157
|
-
get previousHash() {
|
|
158
|
-
return this._account.previousHash;
|
|
159
|
-
}
|
|
160
|
-
set previousHash(_value) {
|
|
161
|
-
}
|
|
162
|
-
get previousHashBytes() {
|
|
163
|
-
return this._account.previousHashBytes;
|
|
164
|
-
}
|
|
165
|
-
set previousHashBytes(_value) {
|
|
166
|
-
}
|
|
167
|
-
get privateKey() {
|
|
168
|
-
return hexFromArrayBuffer(this._seed.buffer, { prefix: false }).toLowerCase();
|
|
169
|
-
}
|
|
170
|
-
get publicKey() {
|
|
171
|
-
const bytes = this._account.publicKey;
|
|
172
|
-
return hexFromArrayBuffer(bytes, { prefix: false }).toLowerCase();
|
|
173
|
-
}
|
|
174
|
-
async derivePath(path) {
|
|
175
|
-
if (path.startsWith("m/")) {
|
|
176
|
-
if (isBip85AbsolutePath(path)) {
|
|
177
|
-
if (this._master === void 0) {
|
|
178
|
-
throw new Error("Cannot derive BIP-85 absolute path: wallet has no master node (built from extended key)");
|
|
179
|
-
}
|
|
180
|
-
const childNode = this._master.derivePath(path.slice(2));
|
|
181
|
-
return await QuantHDWallet.createFromNode(childNode, this._master);
|
|
182
|
-
}
|
|
183
|
-
const parentPath = this.path;
|
|
184
|
-
if (parentPath !== null && path.startsWith(parentPath)) {
|
|
185
|
-
const childPath = path.slice(parentPath.length + 1);
|
|
186
|
-
return await QuantHDWallet.createFromNode(this.node.derivePath(childPath), this._master);
|
|
187
|
-
}
|
|
188
|
-
if (this._master !== void 0) {
|
|
189
|
-
return await QuantHDWallet.createFromNode(this._master.derivePath(path.slice(2)), this._master);
|
|
190
|
-
}
|
|
191
|
-
throw new Error(`Invalid absolute path ${path} for wallet with path ${parentPath}`);
|
|
192
|
-
}
|
|
193
|
-
return await QuantHDWallet.createFromNode(this.node.derivePath(path), this._master);
|
|
194
|
-
}
|
|
195
|
-
async sign(hash, previousHash) {
|
|
196
|
-
return await this._account.sign(hash, previousHash);
|
|
197
|
-
}
|
|
198
|
-
async signJwt(options) {
|
|
199
|
-
return await this._account.signJwt(options);
|
|
200
|
-
}
|
|
201
|
-
async verify(msg, signature) {
|
|
202
|
-
return await this._account.verify(msg, signature);
|
|
203
|
-
}
|
|
204
|
-
verifyUniqueWallet() {
|
|
205
|
-
const address = this.address;
|
|
206
|
-
const existing = QuantHDWallet._walletAddressMap[address]?.deref();
|
|
207
|
-
if (existing === void 0) {
|
|
208
|
-
QuantHDWallet._walletAddressMap[address] = new WeakRef(this);
|
|
209
|
-
return this;
|
|
210
|
-
}
|
|
211
|
-
return existing;
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
__publicField(QuantHDWallet, "_protectedConstructorKey", /* @__PURE__ */ Symbol());
|
|
215
|
-
__publicField(QuantHDWallet, "_walletAddressMap", {});
|
|
216
|
-
QuantHDWallet = __decorateClass([
|
|
217
|
-
staticImplements()
|
|
218
|
-
], QuantHDWallet);
|
|
219
|
-
export {
|
|
220
|
-
BIP85_HEX_APP,
|
|
221
|
-
BIP85_HMAC_KEY,
|
|
222
|
-
BIP85_PURPOSE,
|
|
223
|
-
BIP85_SEED_LENGTH,
|
|
224
|
-
QuantHDWallet,
|
|
225
|
-
bip85DefaultLeafTail,
|
|
226
|
-
bip85EntropyFromNode,
|
|
227
|
-
isBip85AbsolutePath,
|
|
228
|
-
isUnderBip85Purpose
|
|
229
|
-
};
|
|
1
|
+
// src/index.ts
|
|
2
|
+
export * from "@xyo-network/sdk-protocol/quant-wallet";
|
|
230
3
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * @deprecated Use `@xyo-network/sdk-protocol/quant-wallet` instead.\n * `@xyo-network/quant-wallet` is a backward-compatibility re-export stub.\n */\nexport * from '@xyo-network/sdk-protocol/quant-wallet'\n"],
|
|
5
|
+
"mappings": ";AAIA,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/quant-wallet",
|
|
3
|
-
"version": "7.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "7.0.6",
|
|
4
|
+
"description": "DEPRECATED - use @xyo-network/sdk-protocol/quant-wallet. Backward-compatibility re-export stub for @xyo-network/quant-wallet.",
|
|
5
|
+
"deprecated": "Use @xyo-network/sdk-protocol/quant-wallet instead. @xyo-network/quant-wallet is a backward-compatibility re-export stub and will not receive further updates.",
|
|
5
6
|
"homepage": "https://xyo.network",
|
|
6
7
|
"bugs": {
|
|
7
8
|
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-client-js/issues",
|
|
@@ -34,42 +35,33 @@
|
|
|
34
35
|
"README.md"
|
|
35
36
|
],
|
|
36
37
|
"dependencies": {
|
|
37
|
-
"@xyo-network/
|
|
38
|
-
"@xyo-network/address": "~7.0.5",
|
|
39
|
-
"@xyo-network/quant-account": "~7.0.5",
|
|
40
|
-
"@xyo-network/wallet-model": "~7.0.5"
|
|
38
|
+
"@xyo-network/sdk-protocol": "~7.0.6"
|
|
41
39
|
},
|
|
42
40
|
"devDependencies": {
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
46
|
-
"@scure/base": "~2.2.0",
|
|
47
|
-
"@scure/bip39": "~2.2.0",
|
|
48
|
-
"@xylabs/sdk": "^7.0.1",
|
|
49
|
-
"@xylabs/toolchain": "~8.5.3",
|
|
50
|
-
"@xylabs/tsconfig": "~8.5.3",
|
|
51
|
-
"@xylabs/vitest-extended": "^7.0.1",
|
|
52
|
-
"async-mutex": "^0.5.0",
|
|
41
|
+
"@xylabs/toolchain": "~8.5.12",
|
|
42
|
+
"@xylabs/tsconfig": "~8.5.12",
|
|
53
43
|
"browserslist": "4.28.4",
|
|
54
44
|
"eslint": "^10.6.0",
|
|
55
45
|
"eslint-import-resolver-typescript": "^4.4.5",
|
|
56
|
-
"
|
|
57
|
-
"tslib": "~2.8.1",
|
|
58
|
-
"typescript": "~6.0.3",
|
|
59
|
-
"vite": "^8.1.0",
|
|
60
|
-
"vitest": "~4.1.9",
|
|
61
|
-
"zod": "^4.4.3",
|
|
62
|
-
"@xyo-network/pqc": "~7.0.5"
|
|
46
|
+
"typescript": "~6.0.3"
|
|
63
47
|
},
|
|
64
48
|
"peerDependencies": {
|
|
49
|
+
"@ariestools/sdk": "^7.0.4",
|
|
50
|
+
"@bitauth/libauth": "~3.0",
|
|
65
51
|
"@noble/post-quantum": "~0.6.1",
|
|
66
52
|
"@opentelemetry/api": "^1.9",
|
|
67
53
|
"@opentelemetry/sdk-trace-base": "^2.7",
|
|
68
54
|
"@scure/base": "~2.2",
|
|
69
55
|
"@scure/bip39": "~2.2",
|
|
70
|
-
"@xylabs/
|
|
56
|
+
"@xylabs/geo": "^7.0",
|
|
57
|
+
"@xylabs/threads": "^7.0",
|
|
58
|
+
"ajv": "^8.20",
|
|
71
59
|
"async-mutex": "^0.5",
|
|
60
|
+
"debug": "^4.4",
|
|
72
61
|
"ethers": "^6.16",
|
|
62
|
+
"hash-wasm": "~4.12",
|
|
63
|
+
"idb": "^8.0",
|
|
64
|
+
"observable-fns": "^0.6",
|
|
73
65
|
"zod": "^4.4"
|
|
74
66
|
},
|
|
75
67
|
"engines": {
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { Hash, Hex } from '@xylabs/sdk';
|
|
2
|
-
import type { AccountAlgorithm, AccountConfig, AccountInstance, SignJwtOptions, SignJwtResult } from '@xyo-network/account-model';
|
|
3
|
-
import type { XyoAddress } from '@xyo-network/address';
|
|
4
|
-
import type { WalletInstance } from '@xyo-network/wallet-model';
|
|
5
|
-
import { HDNodeWallet, Mnemonic } from 'ethers';
|
|
6
|
-
export declare class QuantHDWallet implements WalletInstance {
|
|
7
|
-
private static _protectedConstructorKey;
|
|
8
|
-
private static _walletAddressMap;
|
|
9
|
-
readonly algorithm: AccountAlgorithm;
|
|
10
|
-
protected readonly _account: AccountInstance;
|
|
11
|
-
protected readonly _master: HDNodeWallet | undefined;
|
|
12
|
-
protected readonly _seed: Uint8Array;
|
|
13
|
-
protected readonly node: HDNodeWallet;
|
|
14
|
-
neuter: () => WalletInstance;
|
|
15
|
-
protected constructor(key: unknown, node: HDNodeWallet, master: HDNodeWallet | undefined, seed: Uint8Array, account: AccountInstance);
|
|
16
|
-
static create(opts?: AccountConfig): Promise<WalletInstance>;
|
|
17
|
-
protected static createFromNode(node: HDNodeWallet, master?: HDNodeWallet, previousHash?: string): Promise<WalletInstance>;
|
|
18
|
-
static fromExtendedKey(key: string): Promise<WalletInstance>;
|
|
19
|
-
static fromMnemonic(mnemonic: Mnemonic, path?: string): Promise<WalletInstance>;
|
|
20
|
-
static fromPhrase(phrase: string, path?: string): Promise<WalletInstance>;
|
|
21
|
-
static fromPrivateKey(_key: ArrayBufferLike | bigint | string): Promise<AccountInstance>;
|
|
22
|
-
static fromSeed(seed: string | ArrayBufferLike): Promise<WalletInstance>;
|
|
23
|
-
static generateMnemonic(wordlist?: string[], strength?: number): string;
|
|
24
|
-
static random(): Promise<WalletInstance>;
|
|
25
|
-
get address(): XyoAddress;
|
|
26
|
-
get addressBytes(): ArrayBufferLike;
|
|
27
|
-
get chainCode(): string;
|
|
28
|
-
get depth(): number;
|
|
29
|
-
get extendedKey(): string;
|
|
30
|
-
get fingerprint(): string;
|
|
31
|
-
get index(): number;
|
|
32
|
-
get mnemonic(): Mnemonic | null;
|
|
33
|
-
get parentFingerprint(): string;
|
|
34
|
-
get path(): string | null;
|
|
35
|
-
get previousHash(): Hash | undefined;
|
|
36
|
-
set previousHash(_value: Hash | undefined);
|
|
37
|
-
get previousHashBytes(): ArrayBufferLike | undefined;
|
|
38
|
-
set previousHashBytes(_value: ArrayBufferLike | undefined);
|
|
39
|
-
get privateKey(): Hex;
|
|
40
|
-
get publicKey(): Hex;
|
|
41
|
-
derivePath(path: string): Promise<WalletInstance>;
|
|
42
|
-
sign(hash: ArrayBufferLike, previousHash?: ArrayBufferLike): Promise<[ArrayBufferLike, Hash?]>;
|
|
43
|
-
signJwt(options: SignJwtOptions): Promise<SignJwtResult>;
|
|
44
|
-
verify(msg: ArrayBufferLike, signature: ArrayBufferLike): Promise<boolean>;
|
|
45
|
-
verifyUniqueWallet(): WalletInstance;
|
|
46
|
-
}
|
|
47
|
-
//# sourceMappingURL=QuantHDWallet.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"QuantHDWallet.d.ts","sourceRoot":"","sources":["../../src/QuantHDWallet.ts"],"names":[],"mappings":"AAEA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,eAAe,EAAE,YAAY,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC,CAAC;IAI9F,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;IAIxD,MAAM,CAAC,GAAG,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;IAIhF,kBAAkB,IAAI,cAAc;CASrC"}
|
package/dist/neutral/bip85.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { HDNodeWallet } from 'ethers';
|
|
2
|
-
export declare const BIP85_PURPOSE = "83696968'";
|
|
3
|
-
export declare const BIP85_HEX_APP = "128169'";
|
|
4
|
-
export declare const BIP85_HMAC_KEY = "bip-entropy-from-k";
|
|
5
|
-
export declare const BIP85_SEED_LENGTH = 32;
|
|
6
|
-
export declare function bip85DefaultLeafTail(index?: number): string;
|
|
7
|
-
export declare function isBip85AbsolutePath(path: string): boolean;
|
|
8
|
-
export declare function isUnderBip85Purpose(node: HDNodeWallet): boolean;
|
|
9
|
-
export declare function bip85EntropyFromNode(node: HDNodeWallet): Uint8Array;
|
|
10
|
-
//# sourceMappingURL=bip85.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bip85.d.ts","sourceRoot":"","sources":["../../src/bip85.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAK1C,eAAO,MAAM,aAAa,cAAc,CAAA;AACxC,eAAO,MAAM,aAAa,YAAY,CAAA;AACtC,eAAO,MAAM,cAAc,uBAAuB,CAAA;AAClD,eAAO,MAAM,iBAAiB,KAAK,CAAA;AAEnC,wBAAgB,oBAAoB,CAAC,KAAK,SAAI,GAAG,MAAM,CAEtD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAI/D;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,CAKnE"}
|