@xyo-network/quant-wallet 7.0.0 → 7.0.2
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.
|
@@ -11,7 +11,17 @@ export declare class QuantHDWallet implements WalletInstance {
|
|
|
11
11
|
protected readonly _master: HDNodeWallet | undefined;
|
|
12
12
|
protected readonly _seed: Uint8Array;
|
|
13
13
|
protected readonly node: HDNodeWallet;
|
|
14
|
+
neuter: () => WalletInstance;
|
|
14
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>;
|
|
15
25
|
get address(): XyoAddress;
|
|
16
26
|
get addressBytes(): ArrayBufferLike;
|
|
17
27
|
get chainCode(): string;
|
|
@@ -28,17 +38,7 @@ export declare class QuantHDWallet implements WalletInstance {
|
|
|
28
38
|
set previousHashBytes(_value: ArrayBufferLike | undefined);
|
|
29
39
|
get privateKey(): Hex;
|
|
30
40
|
get publicKey(): Hex;
|
|
31
|
-
static create(opts?: AccountConfig): Promise<WalletInstance>;
|
|
32
|
-
static fromExtendedKey(key: string): Promise<WalletInstance>;
|
|
33
|
-
static fromMnemonic(mnemonic: Mnemonic, path?: string): Promise<WalletInstance>;
|
|
34
|
-
static fromPhrase(phrase: string, path?: string): Promise<WalletInstance>;
|
|
35
|
-
static fromPrivateKey(_key: ArrayBufferLike | bigint | string): Promise<AccountInstance>;
|
|
36
|
-
static fromSeed(seed: string | ArrayBufferLike): Promise<WalletInstance>;
|
|
37
|
-
static generateMnemonic(wordlist?: string[], strength?: number): string;
|
|
38
|
-
static random(): Promise<WalletInstance>;
|
|
39
|
-
protected static createFromNode(node: HDNodeWallet, master?: HDNodeWallet, previousHash?: string): Promise<WalletInstance>;
|
|
40
41
|
derivePath(path: string): Promise<WalletInstance>;
|
|
41
|
-
neuter: () => WalletInstance;
|
|
42
42
|
sign(hash: ArrayBufferLike, previousHash?: ArrayBufferLike): Promise<[ArrayBufferLike, Hash?]>;
|
|
43
43
|
signJwt(options: SignJwtOptions): Promise<SignJwtResult>;
|
|
44
44
|
verify(msg: ArrayBufferLike, signature: ArrayBufferLike): Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuantHDWallet.d.ts","sourceRoot":"","sources":["../../src/QuantHDWallet.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAI/C,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAC9D,MAAM,4BAA4B,CAAA;AAMnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EACQ,YAAY,EAAE,QAAQ,EACpC,MAAM,QAAQ,CAAA;AASf,qBACa,aAAc,YAAW,cAAc;IAClD,OAAO,CAAC,MAAM,CAAC,wBAAwB,CAAW;IAClD,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAA8C;IAE9E,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAc;IAElD,SAAS,CAAC,QA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B,IAAI,MAAM,CAE9B;IAED,IAAI,IAAI,IAAI,MAAM,GAAG,IAAI,CAExB;IAED,IAAI,YAAY,IAAI,IAAI,GAAG,SAAS,CAEnC;IAED,IAAI,YAAY,CAAC,MAAM,EAAE,IAAI,GAAG,SAAS,EAExC;IAED,IAAI,iBAAiB,IAAI,eAAe,GAAG,SAAS,CAEnD;IAED,IAAI,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,SAAS,EAExD;IAED,IAAI,UAAU,IAAI,GAAG,CAEpB;IAED,IAAI,SAAS,IAAI,GAAG,CAGnB;IAEK,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAsBjD,IAAI,CAAC,IAAI,EAAE,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/index.mjs
CHANGED
|
@@ -64,6 +64,9 @@ var QuantHDWallet = class {
|
|
|
64
64
|
_master;
|
|
65
65
|
_seed;
|
|
66
66
|
node;
|
|
67
|
+
neuter = () => {
|
|
68
|
+
throw new Error("neuter() is not implemented for ml-dsa-65 HD wallets");
|
|
69
|
+
};
|
|
67
70
|
constructor(key, node, master, seed, account) {
|
|
68
71
|
if (key !== QuantHDWallet._protectedConstructorKey) {
|
|
69
72
|
throw new Error("Do not call this protected constructor");
|
|
@@ -73,6 +76,54 @@ var QuantHDWallet = class {
|
|
|
73
76
|
this._seed = seed;
|
|
74
77
|
this._account = account;
|
|
75
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
|
+
}
|
|
76
127
|
get address() {
|
|
77
128
|
return this._account.address;
|
|
78
129
|
}
|
|
@@ -120,54 +171,6 @@ var QuantHDWallet = class {
|
|
|
120
171
|
const bytes = this._account.publicKey;
|
|
121
172
|
return hexFromArrayBuffer(bytes, { prefix: false }).toLowerCase();
|
|
122
173
|
}
|
|
123
|
-
static async create(opts) {
|
|
124
|
-
if (isPhraseInitializationConfig(opts)) {
|
|
125
|
-
return await this.fromPhrase(opts.phrase);
|
|
126
|
-
}
|
|
127
|
-
if (isMnemonicInitializationConfig(opts)) {
|
|
128
|
-
return await this.fromPhrase(opts.mnemonic, opts.path);
|
|
129
|
-
}
|
|
130
|
-
if (isPrivateKeyInitializationConfig(opts)) {
|
|
131
|
-
throw new Error("Invalid initialization config. from privateKey not supported. Use QuantAccount.fromPrivateKey instead.");
|
|
132
|
-
}
|
|
133
|
-
throw new Error("Invalid initialization config");
|
|
134
|
-
}
|
|
135
|
-
static async fromExtendedKey(key) {
|
|
136
|
-
const node = HDNodeWallet.fromExtendedKey(key);
|
|
137
|
-
const master = node.depth === 0 ? node : void 0;
|
|
138
|
-
return await this.createFromNode(node, master);
|
|
139
|
-
}
|
|
140
|
-
static async fromMnemonic(mnemonic, path = defaultPath) {
|
|
141
|
-
const master = HDNodeWallet.fromMnemonic(mnemonic, "m");
|
|
142
|
-
const node = path === "m" || path === "m/" ? master : master.derivePath(path.startsWith("m/") ? path.slice(2) : path);
|
|
143
|
-
return await this.createFromNode(node, master);
|
|
144
|
-
}
|
|
145
|
-
static async fromPhrase(phrase, path = defaultPath) {
|
|
146
|
-
return await this.fromMnemonic(Mnemonic.fromPhrase(phrase), path);
|
|
147
|
-
}
|
|
148
|
-
static async fromPrivateKey(_key) {
|
|
149
|
-
return await Promise.reject(new Error("fromPrivateKey is not supported on QuantHDWallet \u2014 use fromSeed, fromPhrase, fromMnemonic, or fromExtendedKey"));
|
|
150
|
-
}
|
|
151
|
-
static async fromSeed(seed) {
|
|
152
|
-
const master = HDNodeWallet.fromSeed(toUint8Array(seed));
|
|
153
|
-
return await this.createFromNode(master, master);
|
|
154
|
-
}
|
|
155
|
-
static generateMnemonic(wordlist = englishWordlist, strength = 256) {
|
|
156
|
-
return generateMnemonic(wordlist, strength);
|
|
157
|
-
}
|
|
158
|
-
static async random() {
|
|
159
|
-
return await this.fromPhrase(QuantHDWallet.generateMnemonic());
|
|
160
|
-
}
|
|
161
|
-
static async createFromNode(node, master, previousHash) {
|
|
162
|
-
const leafNode = isUnderBip85Purpose(node) ? node : node.derivePath(bip85DefaultLeafTail(0));
|
|
163
|
-
const seed = bip85EntropyFromNode(leafNode);
|
|
164
|
-
const account = await QuantAccount.create({
|
|
165
|
-
privateKey: seed.buffer,
|
|
166
|
-
previousHash: previousHash === void 0 ? void 0 : toUint8Array(previousHash, 32).buffer
|
|
167
|
-
});
|
|
168
|
-
const wallet = new QuantHDWallet(QuantHDWallet._protectedConstructorKey, node, master, seed, account);
|
|
169
|
-
return wallet.verifyUniqueWallet();
|
|
170
|
-
}
|
|
171
174
|
async derivePath(path) {
|
|
172
175
|
if (path.startsWith("m/")) {
|
|
173
176
|
if (isBip85AbsolutePath(path)) {
|
|
@@ -189,9 +192,6 @@ var QuantHDWallet = class {
|
|
|
189
192
|
}
|
|
190
193
|
return await QuantHDWallet.createFromNode(this.node.derivePath(path), this._master);
|
|
191
194
|
}
|
|
192
|
-
neuter = () => {
|
|
193
|
-
throw new Error("neuter() is not implemented for ml-dsa-65 HD wallets");
|
|
194
|
-
};
|
|
195
195
|
async sign(hash, previousHash) {
|
|
196
196
|
return await this._account.sign(hash, previousHash);
|
|
197
197
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/bip85.ts", "../../src/QuantHDWallet.ts"],
|
|
4
|
-
"sourcesContent": ["import type { HDNodeWallet } from 'ethers'\nimport {\n computeHmac, getBytes, toUtf8Bytes,\n} from 'ethers'\n\nexport const BIP85_PURPOSE = \"83696968'\"\nexport const BIP85_HEX_APP = \"128169'\"\nexport const BIP85_HMAC_KEY = 'bip-entropy-from-k'\nexport const BIP85_SEED_LENGTH = 32\n\nexport function bip85DefaultLeafTail(index = 0): string {\n return `${BIP85_PURPOSE}/${BIP85_HEX_APP}/32'/${index}'`\n}\n\nexport function isBip85AbsolutePath(path: string): boolean {\n return path.startsWith(`m/${BIP85_PURPOSE}/`)\n}\n\nexport function isUnderBip85Purpose(node: HDNodeWallet): boolean {\n const p = node.path\n if (p === null) return false\n return p === `m/${BIP85_PURPOSE}` || p.startsWith(`m/${BIP85_PURPOSE}/`)\n}\n\nexport function bip85EntropyFromNode(node: HDNodeWallet): Uint8Array {\n const key = toUtf8Bytes(BIP85_HMAC_KEY)\n const msg = getBytes(node.privateKey)\n const hmac = computeHmac('sha512', key, msg)\n return getBytes(hmac).slice(0, BIP85_SEED_LENGTH)\n}\n", "import { generateMnemonic } from '@scure/bip39'\nimport { wordlist as englishWordlist } from '@scure/bip39/wordlists/english.js'\nimport type { Hash, Hex } from '@xylabs/sdk-js'\nimport {\n hexFromArrayBuffer, staticImplements, toUint8Array,\n} from '@xylabs/sdk-js'\nimport type {\n AccountAlgorithm,\n AccountConfig, AccountInstance, SignJwtOptions, SignJwtResult,\n} from '@xyo-network/account-model'\nimport {\n isMnemonicInitializationConfig,\n isPhraseInitializationConfig,\n isPrivateKeyInitializationConfig,\n} from '@xyo-network/account-model'\nimport type { XyoAddress } from '@xyo-network/address'\nimport { QuantAccount } from '@xyo-network/quant-account'\nimport type { WalletInstance, WalletStatic } from '@xyo-network/wallet-model'\nimport {\n defaultPath, HDNodeWallet, Mnemonic,\n} from 'ethers'\n\nimport {\n bip85DefaultLeafTail,\n bip85EntropyFromNode,\n isBip85AbsolutePath,\n isUnderBip85Purpose,\n} from './bip85.ts'\n\n@staticImplements<WalletStatic<WalletInstance>>()\nexport class QuantHDWallet implements WalletInstance {\n private static _protectedConstructorKey = Symbol()\n private static _walletAddressMap: Record<string, WeakRef<WalletInstance>> = {}\n\n readonly algorithm: AccountAlgorithm = 'ml-dsa-65'\n\n protected readonly _account: AccountInstance\n protected readonly _master: HDNodeWallet | undefined\n protected readonly _seed: Uint8Array\n protected readonly node: HDNodeWallet\n\n protected constructor(\n key: unknown,\n node: HDNodeWallet,\n master: HDNodeWallet | undefined,\n seed: Uint8Array,\n account: AccountInstance,\n ) {\n if (key !== QuantHDWallet._protectedConstructorKey) {\n throw new Error('Do not call this protected constructor')\n }\n this.node = node\n this._master = master\n this._seed = seed\n this._account = account\n }\n\n
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;AACA;AAAA,EACE;AAAA,EAAa;AAAA,EAAU;AAAA,OAClB;AAEA,IAAM,gBAAgB;AACtB,IAAM,gBAAgB;AACtB,IAAM,iBAAiB;AACvB,IAAM,oBAAoB;AAE1B,SAAS,qBAAqB,QAAQ,GAAW;AACtD,SAAO,GAAG,aAAa,IAAI,aAAa,QAAQ,KAAK;AACvD;AAEO,SAAS,oBAAoB,MAAuB;AACzD,SAAO,KAAK,WAAW,KAAK,aAAa,GAAG;AAC9C;AAEO,SAAS,oBAAoB,MAA6B;AAC/D,QAAM,IAAI,KAAK;AACf,MAAI,MAAM,KAAM,QAAO;AACvB,SAAO,MAAM,KAAK,aAAa,MAAM,EAAE,WAAW,KAAK,aAAa,GAAG;AACzE;AAEO,SAAS,qBAAqB,MAAgC;AACnE,QAAM,MAAM,YAAY,cAAc;AACtC,QAAM,MAAM,SAAS,KAAK,UAAU;AACpC,QAAM,OAAO,YAAY,UAAU,KAAK,GAAG;AAC3C,SAAO,SAAS,IAAI,EAAE,MAAM,GAAG,iBAAiB;AAClD;;;AC7BA,SAAS,wBAAwB;AACjC,SAAS,YAAY,uBAAuB;AAE5C;AAAA,EACE;AAAA,EAAoB;AAAA,EAAkB;AAAA,OACjC;AAKP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,oBAAoB;AAE7B;AAAA,EACE;AAAA,EAAa;AAAA,EAAc;AAAA,OACtB;AAUA,IAAM,gBAAN,MAA8C;AAAA,EAI1C,YAA8B;AAAA,EAEpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,
|
|
4
|
+
"sourcesContent": ["import type { HDNodeWallet } from 'ethers'\nimport {\n computeHmac, getBytes, toUtf8Bytes,\n} from 'ethers'\n\nexport const BIP85_PURPOSE = \"83696968'\"\nexport const BIP85_HEX_APP = \"128169'\"\nexport const BIP85_HMAC_KEY = 'bip-entropy-from-k'\nexport const BIP85_SEED_LENGTH = 32\n\nexport function bip85DefaultLeafTail(index = 0): string {\n return `${BIP85_PURPOSE}/${BIP85_HEX_APP}/32'/${index}'`\n}\n\nexport function isBip85AbsolutePath(path: string): boolean {\n return path.startsWith(`m/${BIP85_PURPOSE}/`)\n}\n\nexport function isUnderBip85Purpose(node: HDNodeWallet): boolean {\n const p = node.path\n if (p === null) return false\n return p === `m/${BIP85_PURPOSE}` || p.startsWith(`m/${BIP85_PURPOSE}/`)\n}\n\nexport function bip85EntropyFromNode(node: HDNodeWallet): Uint8Array {\n const key = toUtf8Bytes(BIP85_HMAC_KEY)\n const msg = getBytes(node.privateKey)\n const hmac = computeHmac('sha512', key, msg)\n return getBytes(hmac).slice(0, BIP85_SEED_LENGTH)\n}\n", "import { generateMnemonic } from '@scure/bip39'\nimport { wordlist as englishWordlist } from '@scure/bip39/wordlists/english.js'\nimport type { Hash, Hex } from '@xylabs/sdk-js'\nimport {\n hexFromArrayBuffer, staticImplements, toUint8Array,\n} from '@xylabs/sdk-js'\nimport type {\n AccountAlgorithm,\n AccountConfig, AccountInstance, SignJwtOptions, SignJwtResult,\n} from '@xyo-network/account-model'\nimport {\n isMnemonicInitializationConfig,\n isPhraseInitializationConfig,\n isPrivateKeyInitializationConfig,\n} from '@xyo-network/account-model'\nimport type { XyoAddress } from '@xyo-network/address'\nimport { QuantAccount } from '@xyo-network/quant-account'\nimport type { WalletInstance, WalletStatic } from '@xyo-network/wallet-model'\nimport {\n defaultPath, HDNodeWallet, Mnemonic,\n} from 'ethers'\n\nimport {\n bip85DefaultLeafTail,\n bip85EntropyFromNode,\n isBip85AbsolutePath,\n isUnderBip85Purpose,\n} from './bip85.ts'\n\n@staticImplements<WalletStatic<WalletInstance>>()\nexport class QuantHDWallet implements WalletInstance {\n private static _protectedConstructorKey = Symbol()\n private static _walletAddressMap: Record<string, WeakRef<WalletInstance>> = {}\n\n readonly algorithm: AccountAlgorithm = 'ml-dsa-65'\n\n protected readonly _account: AccountInstance\n protected readonly _master: HDNodeWallet | undefined\n protected readonly _seed: Uint8Array\n protected readonly node: HDNodeWallet\n\n neuter: () => WalletInstance = () => {\n throw new Error('neuter() is not implemented for ml-dsa-65 HD wallets')\n }\n\n protected constructor(\n key: unknown,\n node: HDNodeWallet,\n master: HDNodeWallet | undefined,\n seed: Uint8Array,\n account: AccountInstance,\n ) {\n if (key !== QuantHDWallet._protectedConstructorKey) {\n throw new Error('Do not call this protected constructor')\n }\n this.node = node\n this._master = master\n this._seed = seed\n this._account = account\n }\n\n static async create(opts?: AccountConfig): Promise<WalletInstance> {\n if (isPhraseInitializationConfig(opts)) {\n return await this.fromPhrase(opts.phrase)\n }\n if (isMnemonicInitializationConfig(opts)) {\n return await this.fromPhrase(opts.mnemonic, opts.path)\n }\n if (isPrivateKeyInitializationConfig(opts)) {\n throw new Error('Invalid initialization config. from privateKey not supported. Use QuantAccount.fromPrivateKey instead.')\n }\n throw new Error('Invalid initialization config')\n }\n\n protected static async createFromNode(\n node: HDNodeWallet,\n master?: HDNodeWallet,\n previousHash?: string,\n ): Promise<WalletInstance> {\n // If the node is already under the BIP-85 purpose subtree, take entropy right there.\n // Otherwise auto-descend to the default HEX-entropy leaf (num_bytes=32, index=0).\n const leafNode = isUnderBip85Purpose(node) ? node : node.derivePath(bip85DefaultLeafTail(0))\n const seed = bip85EntropyFromNode(leafNode)\n const account = await QuantAccount.create({\n privateKey: seed.buffer,\n previousHash: previousHash === undefined ? undefined : toUint8Array(previousHash, 32).buffer,\n })\n const wallet = new QuantHDWallet(this._protectedConstructorKey, node, master, seed, account)\n return wallet.verifyUniqueWallet()\n }\n\n static async fromExtendedKey(key: string): Promise<WalletInstance> {\n const node = HDNodeWallet.fromExtendedKey(key) as HDNodeWallet\n // If the xkey is the root (depth 0), it is its own master and absolute BIP-85 paths can be resolved\n const master = node.depth === 0 ? node : undefined\n return await this.createFromNode(node, master)\n }\n\n static async fromMnemonic(mnemonic: Mnemonic, path: string = defaultPath): Promise<WalletInstance> {\n // Pass 'm' explicitly: without it, ethers returns the node at defaultPath rather than the BIP-32 root.\n const master = HDNodeWallet.fromMnemonic(mnemonic, 'm')\n const node = path === 'm' || path === 'm/' ? master : master.derivePath(path.startsWith('m/') ? path.slice(2) : path)\n return await this.createFromNode(node, master)\n }\n\n static async fromPhrase(phrase: string, path: string = defaultPath): Promise<WalletInstance> {\n return await this.fromMnemonic(Mnemonic.fromPhrase(phrase), path)\n }\n\n static async fromPrivateKey(_key: ArrayBufferLike | bigint | string): Promise<AccountInstance> {\n return await Promise.reject(new Error('fromPrivateKey is not supported on QuantHDWallet \u2014 use fromSeed, fromPhrase, fromMnemonic, or fromExtendedKey'))\n }\n\n static async fromSeed(seed: string | ArrayBufferLike): Promise<WalletInstance> {\n const master = HDNodeWallet.fromSeed(toUint8Array(seed))\n return await this.createFromNode(master, master)\n }\n\n static generateMnemonic(wordlist: string[] = englishWordlist, strength = 256): string {\n return generateMnemonic(wordlist, strength)\n }\n\n static async random(): Promise<WalletInstance> {\n return await this.fromPhrase(this.generateMnemonic())\n }\n\n get address(): XyoAddress {\n return this._account.address\n }\n\n get addressBytes(): ArrayBufferLike {\n return this._account.addressBytes\n }\n\n get chainCode(): string {\n return this.node.chainCode\n }\n\n get depth(): number {\n return this.node.depth\n }\n\n get extendedKey(): string {\n return this.node.extendedKey\n }\n\n get fingerprint(): string {\n return this.node.fingerprint\n }\n\n get index(): number {\n return this.node.index\n }\n\n get mnemonic(): Mnemonic | null {\n return this.node.mnemonic\n }\n\n get parentFingerprint(): string {\n return this.node.parentFingerprint\n }\n\n get path(): string | null {\n return this.node.path\n }\n\n get previousHash(): Hash | undefined {\n return this._account.previousHash\n }\n\n set previousHash(_value: Hash | undefined) {\n // intentionally not supported \u2014 use sign() chaining\n }\n\n get previousHashBytes(): ArrayBufferLike | undefined {\n return this._account.previousHashBytes\n }\n\n set previousHashBytes(_value: ArrayBufferLike | undefined) {\n // intentionally not supported \u2014 use sign() chaining\n }\n\n get privateKey(): Hex {\n return hexFromArrayBuffer(this._seed.buffer, { prefix: false }).toLowerCase() as Hex\n }\n\n get publicKey(): Hex {\n const bytes = (this._account as unknown as { publicKey: ArrayBufferLike }).publicKey\n return hexFromArrayBuffer(bytes, { prefix: false }).toLowerCase() as Hex\n }\n\n async derivePath(path: string): Promise<WalletInstance> {\n if (path.startsWith('m/')) {\n if (isBip85AbsolutePath(path)) {\n if (this._master === undefined) {\n throw new Error('Cannot derive BIP-85 absolute path: wallet has no master node (built from extended key)')\n }\n const childNode = this._master.derivePath(path.slice(2))\n return await QuantHDWallet.createFromNode(childNode, this._master)\n }\n const parentPath = this.path\n if (parentPath !== null && path.startsWith(parentPath)) {\n const childPath = path.slice(parentPath.length + 1)\n return await QuantHDWallet.createFromNode(this.node.derivePath(childPath), this._master)\n }\n if (this._master !== undefined) {\n return await QuantHDWallet.createFromNode(this._master.derivePath(path.slice(2)), this._master)\n }\n throw new Error(`Invalid absolute path ${path} for wallet with path ${parentPath}`)\n }\n return await QuantHDWallet.createFromNode(this.node.derivePath(path), this._master)\n }\n\n async sign(hash: ArrayBufferLike, previousHash?: ArrayBufferLike): Promise<[ArrayBufferLike, Hash?]> {\n return await this._account.sign(hash, previousHash)\n }\n\n async signJwt(options: SignJwtOptions): Promise<SignJwtResult> {\n return await this._account.signJwt(options)\n }\n\n async verify(msg: ArrayBufferLike, signature: ArrayBufferLike): Promise<boolean> {\n return await this._account.verify(msg, signature)\n }\n\n verifyUniqueWallet(): WalletInstance {\n const address = this.address\n const existing = QuantHDWallet._walletAddressMap[address]?.deref()\n if (existing === undefined) {\n QuantHDWallet._walletAddressMap[address] = new WeakRef<WalletInstance>(this)\n return this\n }\n return existing\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AACA;AAAA,EACE;AAAA,EAAa;AAAA,EAAU;AAAA,OAClB;AAEA,IAAM,gBAAgB;AACtB,IAAM,gBAAgB;AACtB,IAAM,iBAAiB;AACvB,IAAM,oBAAoB;AAE1B,SAAS,qBAAqB,QAAQ,GAAW;AACtD,SAAO,GAAG,aAAa,IAAI,aAAa,QAAQ,KAAK;AACvD;AAEO,SAAS,oBAAoB,MAAuB;AACzD,SAAO,KAAK,WAAW,KAAK,aAAa,GAAG;AAC9C;AAEO,SAAS,oBAAoB,MAA6B;AAC/D,QAAM,IAAI,KAAK;AACf,MAAI,MAAM,KAAM,QAAO;AACvB,SAAO,MAAM,KAAK,aAAa,MAAM,EAAE,WAAW,KAAK,aAAa,GAAG;AACzE;AAEO,SAAS,qBAAqB,MAAgC;AACnE,QAAM,MAAM,YAAY,cAAc;AACtC,QAAM,MAAM,SAAS,KAAK,UAAU;AACpC,QAAM,OAAO,YAAY,UAAU,KAAK,GAAG;AAC3C,SAAO,SAAS,IAAI,EAAE,MAAM,GAAG,iBAAiB;AAClD;;;AC7BA,SAAS,wBAAwB;AACjC,SAAS,YAAY,uBAAuB;AAE5C;AAAA,EACE;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": "Quantum-resistant (ML-DSA-65 / FIPS 204) HD Wallet using BIP-85 entropy derivation for XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"README.md"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@xyo-network/account-model": "~7.0.
|
|
38
|
-
"@xyo-network/
|
|
39
|
-
"@xyo-network/
|
|
40
|
-
"@xyo-network/
|
|
37
|
+
"@xyo-network/account-model": "~7.0.2",
|
|
38
|
+
"@xyo-network/quant-account": "~7.0.2",
|
|
39
|
+
"@xyo-network/wallet-model": "~7.0.2",
|
|
40
|
+
"@xyo-network/address": "~7.0.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@noble/post-quantum": "~0.6.1",
|
|
@@ -45,19 +45,19 @@
|
|
|
45
45
|
"@opentelemetry/sdk-trace-base": "^2.8.0",
|
|
46
46
|
"@scure/base": "~2.2.0",
|
|
47
47
|
"@scure/bip39": "~2.2.0",
|
|
48
|
-
"@xylabs/sdk-js": "^6.1.
|
|
49
|
-
"@xylabs/toolchain": "~8.
|
|
50
|
-
"@xylabs/tsconfig": "~8.
|
|
51
|
-
"@xylabs/vitest-extended": "^6.1.
|
|
48
|
+
"@xylabs/sdk-js": "^6.1.4",
|
|
49
|
+
"@xylabs/toolchain": "~8.3.0",
|
|
50
|
+
"@xylabs/tsconfig": "~8.3.0",
|
|
51
|
+
"@xylabs/vitest-extended": "^6.1.4",
|
|
52
52
|
"async-mutex": "^0.5.0",
|
|
53
|
-
"eslint": "^10.
|
|
54
|
-
"ethers": "^6.
|
|
53
|
+
"eslint": "^10.5.0",
|
|
54
|
+
"ethers": "^6.17.0",
|
|
55
55
|
"tslib": "~2.8.1",
|
|
56
56
|
"typescript": "~6.0.3",
|
|
57
|
-
"vite": "^8.0
|
|
58
|
-
"vitest": "~4.1.
|
|
57
|
+
"vite": "^8.1.0",
|
|
58
|
+
"vitest": "~4.1.9",
|
|
59
59
|
"zod": "^4.4.3",
|
|
60
|
-
"@xyo-network/pqc": "~7.0.
|
|
60
|
+
"@xyo-network/pqc": "~7.0.2"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@noble/post-quantum": "~0.6.1",
|