@xyo-network/wallet 4.2.1 → 5.0.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/wallet",
3
- "version": "4.2.1",
3
+ "version": "5.0.0",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -28,23 +28,27 @@
28
28
  },
29
29
  "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
+ "files": [
32
+ "dist",
33
+ "src"
34
+ ],
31
35
  "dependencies": {
32
36
  "@scure/bip39": "^1.6.0",
33
- "@xylabs/arraybuffer": "^4.14.1",
34
- "@xylabs/assert": "^4.14.1",
35
- "@xylabs/base": "^4.14.1",
36
- "@xylabs/hex": "^4.14.1",
37
- "@xylabs/static-implements": "^4.14.1",
38
- "@xyo-network/account": "^4.2.1",
39
- "@xyo-network/account-model": "^4.2.1",
40
- "@xyo-network/key-model": "^4.2.1",
41
- "@xyo-network/wallet-model": "^4.2.1",
37
+ "@xylabs/arraybuffer": "^5.0.0",
38
+ "@xylabs/assert": "^5.0.0",
39
+ "@xylabs/base": "^5.0.0",
40
+ "@xylabs/hex": "^5.0.0",
41
+ "@xylabs/static-implements": "^5.0.0",
42
+ "@xyo-network/account": "^5.0.0",
43
+ "@xyo-network/account-model": "^5.0.0",
44
+ "@xyo-network/key-model": "^5.0.0",
45
+ "@xyo-network/wallet-model": "^5.0.0",
42
46
  "ethers": "^6.15.0"
43
47
  },
44
48
  "devDependencies": {
45
- "@xylabs/ts-scripts-yarn3": "^7.0.1",
46
- "@xylabs/tsconfig": "^7.0.1",
47
- "@xylabs/vitest-matchers": "^4.14.1",
49
+ "@xylabs/ts-scripts-yarn3": "^7.0.2",
50
+ "@xylabs/tsconfig": "^7.0.2",
51
+ "@xylabs/vitest-matchers": "^5.0.0",
48
52
  "typescript": "^5.8.3",
49
53
  "vitest": "^3.2.4"
50
54
  },
@@ -0,0 +1,17 @@
1
+ import { Account } from '@xyo-network/account'
2
+ import {
3
+ describe, expect, it,
4
+ } from 'vitest'
5
+
6
+ import { HDWallet } from '../HDWallet.ts'
7
+
8
+ describe('Address', () => {
9
+ it('should round trip from BigInt', async () => {
10
+ for (let index = 0; index < 100; index++) {
11
+ const foo = await HDWallet.random()
12
+ const privateKey = BigInt(foo.privateKey)
13
+ const sharedAccount = await Account.fromPrivateKey(privateKey)
14
+ expect(sharedAccount).toBeDefined()
15
+ }
16
+ })
17
+ })
@@ -0,0 +1,20 @@
1
+ import {
2
+ describe, expect, it,
3
+ } from 'vitest'
4
+
5
+ // import { HDWallet } from '../../HDWallet'
6
+ // import { generateHDWalletTests } from './HDWallet.spec'
7
+
8
+ /**
9
+ * @group jsdom
10
+ */
11
+ /* describe.skip('Node Wallet Test', () => {
12
+ generateHDWalletTests('HDWallet: Browser', HDWallet)
13
+ })
14
+ */
15
+
16
+ describe('Node Wallet Test - Commented Out', () => {
17
+ it('Stub', () => {
18
+ expect(true).toBe(true)
19
+ })
20
+ })
@@ -0,0 +1,11 @@
1
+ import { describe } from 'vitest'
2
+
3
+ import { HDWallet } from '../../HDWallet.ts'
4
+ import { generateHDWalletTests } from './HDWallet.spec.ts'
5
+
6
+ /**
7
+ * @group nodejs
8
+ */
9
+ describe('Node Wallet Test', () => {
10
+ generateHDWalletTests('HDWallet: Node', HDWallet)
11
+ })
@@ -0,0 +1,228 @@
1
+ import type { Address, Hex } from '@xylabs/hex'
2
+ import { isAddress } from '@xylabs/hex'
3
+ import { matchers } from '@xylabs/vitest-matchers'
4
+ import type { WalletInstance, WalletStatic } from '@xyo-network/wallet-model'
5
+ import {
6
+ defaultPath, Mnemonic, SigningKey,
7
+ } from 'ethers'
8
+ import {
9
+ describe, expect, it,
10
+ test,
11
+ } from 'vitest'
12
+
13
+ expect.extend(matchers)
14
+
15
+ import { HDWallet } from '../../HDWallet.ts'
16
+
17
+ /**
18
+ * The wallet types that can be tested
19
+ */
20
+ type Wallet = HDWallet | WalletInstance
21
+
22
+ /**
23
+ * The serializable information of a wallet
24
+ */
25
+ interface WalletSnapshot {
26
+ address: Address
27
+ path: string | null
28
+ privateKey: Hex
29
+ publicKey: Hex
30
+ }
31
+
32
+ /**
33
+ * Converts a compressed public key to an uncompressed public key
34
+ * @param compressed The compressed public key
35
+ * @returns The uncompressed public key
36
+ */
37
+ const toUncompressedPublicKey = (compressed: string): string => SigningKey.computePublicKey(compressed, false).toLowerCase().replace('0x04', '')
38
+
39
+ /**
40
+ * Standardizes the representation of a hex string
41
+ * @param unformatted The unformatted hex string
42
+ * @returns The formatted hex string
43
+ */
44
+ const formatHexString = (unformatted: string): string => unformatted.toLowerCase().replace('0x', '')
45
+
46
+ /**
47
+ * Serializes a wallet to its snapshot representation
48
+ * @param wallet The wallet to snapshot
49
+ * @returns The snapshot representation of the wallet
50
+ */
51
+ const toWalletSnapshot = (wallet: Wallet): WalletSnapshot => {
52
+ const {
53
+ address, path, privateKey, publicKey,
54
+ } = wallet as WalletInstance
55
+ return {
56
+ address, path, privateKey, publicKey,
57
+ }
58
+ }
59
+
60
+ /**
61
+ * Snapshots the instances of two wallets to ensure repeatability
62
+ * of creation from the same source and prevent unintentional changes
63
+ * to the wallet protocol
64
+ * @param walletA The first wallet to snapshot
65
+ * @param walletB The second wallet to snapshot
66
+ */
67
+ const snapshotWalletInstances = (walletA: Wallet, walletB: Wallet) => {
68
+ expect(toWalletSnapshot(walletA)).toMatchSnapshot()
69
+ expect([toWalletSnapshot(walletA), toWalletSnapshot(walletB)]).toMatchSnapshot()
70
+ }
71
+
72
+ /**
73
+ * Compares two wallets to ensure their public/private keys are equal
74
+ * @param sutA The first wallet to compare
75
+ * @param sutB The second wallet to compare
76
+ */
77
+ const expectWalletsEqual = (sutA: WalletInstance, sutB: Wallet) => {
78
+ expect(sutA.address).toEqual(formatHexString(sutB.address))
79
+ expect(sutA.privateKey).toEqual(sutB.privateKey)
80
+ expect(sutA.private?.hex).toEqual(formatHexString(sutB.privateKey))
81
+ expect(sutA.publicKey).toEqual(sutB.publicKey)
82
+ expect(sutA.public?.hex).toEqual(toUncompressedPublicKey(sutB.publicKey))
83
+ }
84
+
85
+ /**
86
+ * Compares two wallets to ensure their public/private keys and paths are equal
87
+ * @param sutA The first wallet to compare
88
+ * @param sutB The second wallet to compare
89
+ */
90
+ const expectWalletsAndPathsEqual = (sutA: WalletInstance, sutB: Wallet) => {
91
+ expectWalletsEqual(sutA, sutB)
92
+ expect(sutA.path).toEqual(sutB.path)
93
+ }
94
+
95
+ /**
96
+ * Generates tests for a wallet type
97
+ * @param title The title of the test suite
98
+ * @param HDWallet The wallet type to test
99
+ */
100
+ export const generateHDWalletTests = (title: string, HDWallet: WalletStatic) => {
101
+ describe(title, () => {
102
+ const phrase = 'later puppy sound rebuild rebuild noise ozone amazing hope broccoli crystal grief'
103
+ const paths = ['0/4', "44'/0'/0'", "44'/60'/0'/0/0", "44'/60'/0'/0/1", "49'/0'/0'", "84'/0'/0'", "84'/0'/0'/0"]
104
+
105
+ describe('constructor', () => {
106
+ it('can be created from mnemonic', async () => {
107
+ const sut = await HDWallet.fromPhrase(phrase)
108
+ console.log('address', sut.address)
109
+ console.log('privateKeyX', sut.privateKey)
110
+ const mnemonic = Mnemonic.fromPhrase(phrase)
111
+ console.log('mnemonic.entropy', mnemonic.entropy)
112
+ expect(isAddress(sut.address)).toBe(true)
113
+ expect(sut).toBeDefined()
114
+ })
115
+ it.each(paths)('works repeatably & interoperably with Ethers', async (path: string) => {
116
+ const sutA = await HDWallet.fromPhrase(phrase)
117
+ const sutB = await HDWallet.fromMnemonic(Mnemonic.fromPhrase(phrase))
118
+ expectWalletsAndPathsEqual(sutA, sutB)
119
+ snapshotWalletInstances(sutA, sutB)
120
+ const accountA = await sutA.derivePath(path)
121
+ const accountB = await sutB.derivePath(path)
122
+ expectWalletsAndPathsEqual(accountA, accountB)
123
+ snapshotWalletInstances(accountA, accountB)
124
+ })
125
+ })
126
+ describe('derivePath', () => {
127
+ it.each(paths)('works repeatably & interoperably from phrase & extended key', async (path: string) => {
128
+ const sutA = await HDWallet.fromPhrase(phrase)
129
+ const sutB = await HDWallet.fromExtendedKey(sutA.extendedKey)
130
+ expectWalletsEqual(sutA, sutB)
131
+ expect(sutA.path).not.toBeNull()
132
+ expect(sutB.path).not.toBeNull()
133
+ snapshotWalletInstances(sutA, sutB)
134
+ const accountA = await sutA.derivePath?.(path)
135
+ const accountB = await sutB.derivePath?.(path)
136
+ expectWalletsEqual(accountA, accountB)
137
+ expect(accountA.path).not.toBeNull()
138
+ expect(accountB.path).not.toBeNull()
139
+ snapshotWalletInstances(accountA, accountB)
140
+ })
141
+
142
+ it('works when paths provided incrementally', async () => {
143
+ const parentRelativePath = "44'/60'/0'"
144
+ const childRelativePath = '0/1'
145
+ const sutA = await HDWallet.fromPhrase(phrase)
146
+ const sutB = await HDWallet.fromPhrase(phrase)
147
+ expectWalletsAndPathsEqual(sutA, sutB)
148
+ snapshotWalletInstances(sutA, sutB)
149
+ const accountA = await (await sutA.derivePath(parentRelativePath)).derivePath?.(childRelativePath)
150
+ const accountB = await sutB.derivePath?.([parentRelativePath, childRelativePath].join('/'))
151
+ expectWalletsAndPathsEqual(accountA, accountB)
152
+ snapshotWalletInstances(accountA, accountB)
153
+ })
154
+ it('works when paths provided absolutely', async () => {
155
+ const parentAbsolutePath = "m/44'/60'/0'"
156
+ const childRelativePath = '0/1'
157
+ const absolutePath = [parentAbsolutePath, childRelativePath].join('/')
158
+ const sutA = await HDWallet.fromPhrase(phrase, absolutePath)
159
+ const sutB = await HDWallet.fromPhrase(phrase, parentAbsolutePath)
160
+ expect(sutA.path).toEqual(absolutePath)
161
+ expect(sutB.path).toEqual(parentAbsolutePath)
162
+ // Skip intermediate snapshot since wallets currently have different paths
163
+ // snapshotWalletInstances(sutA, sutB)
164
+ const accountA = sutA
165
+ const accountB = await sutB.derivePath(childRelativePath)
166
+ expectWalletsAndPathsEqual(accountA, accountB)
167
+ // accountA and accountB should be the same instance
168
+ // expect(accountA).toBe(accountB)
169
+ snapshotWalletInstances(accountA, accountB)
170
+ })
171
+ it('returns cached instances on subsequent requests', async () => {
172
+ const parent = "44'/60'/0'"
173
+ const child = '0/1'
174
+ const sutA = await HDWallet.fromPhrase(phrase)
175
+ const sutB = await HDWallet.fromPhrase(phrase)
176
+ expectWalletsAndPathsEqual(sutA, sutB)
177
+ // sutA and sutB should be the same instance
178
+ expect(sutA).toBe(sutB)
179
+ const accountA = await (await sutA.derivePath(parent)).derivePath?.(child)
180
+ const accountB = await sutB.derivePath?.([parent, child].join('/'))
181
+ expectWalletsAndPathsEqual(accountA, accountB)
182
+ // accountA and accountB should be the same instance
183
+ // expect(accountA).toBe(accountB)
184
+ snapshotWalletInstances(accountA, accountB)
185
+ })
186
+ })
187
+ })
188
+ }
189
+
190
+ test('HDWallet tests generator is defined', () => {
191
+ expect(typeof generateHDWalletTests).toBe('function')
192
+ })
193
+
194
+ test('Same address, two paths', async () => {
195
+ const sut = await HDWallet.fromMnemonic(Mnemonic.fromPhrase('later puppy sound rebuild rebuild noise ozone amazing hope broccoli crystal grief'))
196
+ const accountNode = await sut.derivePath('0')
197
+ expect(accountNode.path).toBe(`${defaultPath}/0`)
198
+ const accountA = await sut.derivePath('0/2')
199
+ const accountB = await accountNode.derivePath('2')
200
+ const accountAPrime = await accountNode.derivePath("0'/2")
201
+ const accountAPrime2 = await accountNode.derivePath("0/2'")
202
+ expect(accountA.address).toEqual(accountB.address)
203
+ expect(accountNode.address === accountB.address).toBe(false)
204
+ expect(accountA.address === accountAPrime.address).toBe(false)
205
+ expect(accountA.address === accountAPrime2.address).toBe(false)
206
+
207
+ expect(accountNode.address).toMatchSnapshot()
208
+ expect(accountA.address).toMatchSnapshot()
209
+ expect(accountB.address).toMatchSnapshot()
210
+ expect(accountAPrime.address).toMatchSnapshot()
211
+ })
212
+
213
+ test('Random Wallet', async () => {
214
+ const sut = await HDWallet.random()
215
+ expect(sut).toBeDefined()
216
+ expect(sut.address).toBeDefined()
217
+ expect(sut.privateKey).toBeDefined()
218
+ expect(sut.publicKey).toBeDefined()
219
+ expect(sut.extendedKey).toBeDefined()
220
+ expect(sut.path).toBeDefined()
221
+ expect(sut.path).toBe(defaultPath)
222
+ })
223
+
224
+ test('HDWallet can be created from mnemonic', async () => {
225
+ const sut = await HDWallet.fromPhrase('abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about', "m/44'/0'/0'/0/0")
226
+ expect(sut).toBeDefined()
227
+ console.log('privateKey', sut.privateKey)
228
+ })
@@ -0,0 +1,841 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 1`] = `
4
+ {
5
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
6
+ "path": "m/44'/60'/0'/0/0",
7
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
8
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
9
+ }
10
+ `;
11
+
12
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 2`] = `
13
+ [
14
+ {
15
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
16
+ "path": "m/44'/60'/0'/0/0",
17
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
18
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
19
+ },
20
+ {
21
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
22
+ "path": "m/44'/60'/0'/0/0",
23
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
24
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
25
+ },
26
+ ]
27
+ `;
28
+
29
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 3`] = `
30
+ {
31
+ "address": "012167a8cd67f0f20fbfc54212ac9bba982dbae3",
32
+ "path": "m/44'/60'/0'/0/0/0/4",
33
+ "privateKey": "0x61ee4d0dc8d33ebfa9b7726c4600db4048240651dd8ac2119d5f59d28332f8ad",
34
+ "publicKey": "0x037697e2cf043b8e96c43694f440fbe0ec01f29dedb9f1ff7e1007742b32fe7523",
35
+ }
36
+ `;
37
+
38
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 4`] = `
39
+ [
40
+ {
41
+ "address": "012167a8cd67f0f20fbfc54212ac9bba982dbae3",
42
+ "path": "m/44'/60'/0'/0/0/0/4",
43
+ "privateKey": "0x61ee4d0dc8d33ebfa9b7726c4600db4048240651dd8ac2119d5f59d28332f8ad",
44
+ "publicKey": "0x037697e2cf043b8e96c43694f440fbe0ec01f29dedb9f1ff7e1007742b32fe7523",
45
+ },
46
+ {
47
+ "address": "012167a8cd67f0f20fbfc54212ac9bba982dbae3",
48
+ "path": "m/44'/60'/0'/0/0/0/4",
49
+ "privateKey": "0x61ee4d0dc8d33ebfa9b7726c4600db4048240651dd8ac2119d5f59d28332f8ad",
50
+ "publicKey": "0x037697e2cf043b8e96c43694f440fbe0ec01f29dedb9f1ff7e1007742b32fe7523",
51
+ },
52
+ ]
53
+ `;
54
+
55
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 5`] = `
56
+ {
57
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
58
+ "path": "m/44'/60'/0'/0/0",
59
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
60
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
61
+ }
62
+ `;
63
+
64
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 6`] = `
65
+ [
66
+ {
67
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
68
+ "path": "m/44'/60'/0'/0/0",
69
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
70
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
71
+ },
72
+ {
73
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
74
+ "path": "m/44'/60'/0'/0/0",
75
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
76
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
77
+ },
78
+ ]
79
+ `;
80
+
81
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 7`] = `
82
+ {
83
+ "address": "6ab24a1bcccc3ff79e8f826b7cc5bf583b5e9c57",
84
+ "path": "m/44'/60'/0'/0/0/44'/0'/0'",
85
+ "privateKey": "0x345ae736b1203dc38ede87bb44edffe039b8c6432fe591f835723ba00295d216",
86
+ "publicKey": "0x02f1ae68e6ed8f9100c3f1c8a3c7356faeaad8aaf0e5175d5a3105c5b3223c5818",
87
+ }
88
+ `;
89
+
90
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 8`] = `
91
+ [
92
+ {
93
+ "address": "6ab24a1bcccc3ff79e8f826b7cc5bf583b5e9c57",
94
+ "path": "m/44'/60'/0'/0/0/44'/0'/0'",
95
+ "privateKey": "0x345ae736b1203dc38ede87bb44edffe039b8c6432fe591f835723ba00295d216",
96
+ "publicKey": "0x02f1ae68e6ed8f9100c3f1c8a3c7356faeaad8aaf0e5175d5a3105c5b3223c5818",
97
+ },
98
+ {
99
+ "address": "6ab24a1bcccc3ff79e8f826b7cc5bf583b5e9c57",
100
+ "path": "m/44'/60'/0'/0/0/44'/0'/0'",
101
+ "privateKey": "0x345ae736b1203dc38ede87bb44edffe039b8c6432fe591f835723ba00295d216",
102
+ "publicKey": "0x02f1ae68e6ed8f9100c3f1c8a3c7356faeaad8aaf0e5175d5a3105c5b3223c5818",
103
+ },
104
+ ]
105
+ `;
106
+
107
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 9`] = `
108
+ {
109
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
110
+ "path": "m/44'/60'/0'/0/0",
111
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
112
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
113
+ }
114
+ `;
115
+
116
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 10`] = `
117
+ [
118
+ {
119
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
120
+ "path": "m/44'/60'/0'/0/0",
121
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
122
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
123
+ },
124
+ {
125
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
126
+ "path": "m/44'/60'/0'/0/0",
127
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
128
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
129
+ },
130
+ ]
131
+ `;
132
+
133
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 11`] = `
134
+ {
135
+ "address": "5e0e54445fdd4e453fca8216b056226c5ef6a2f1",
136
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/0",
137
+ "privateKey": "0x0f2012c26b02b57d233bde81f718a33d24a9331f9716521f0be31c79f69d4fef",
138
+ "publicKey": "0x03350c7ada7a25ffea5b1dcdd380366eb21879ad074463583053cb7ad7d3acd712",
139
+ }
140
+ `;
141
+
142
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 12`] = `
143
+ [
144
+ {
145
+ "address": "5e0e54445fdd4e453fca8216b056226c5ef6a2f1",
146
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/0",
147
+ "privateKey": "0x0f2012c26b02b57d233bde81f718a33d24a9331f9716521f0be31c79f69d4fef",
148
+ "publicKey": "0x03350c7ada7a25ffea5b1dcdd380366eb21879ad074463583053cb7ad7d3acd712",
149
+ },
150
+ {
151
+ "address": "5e0e54445fdd4e453fca8216b056226c5ef6a2f1",
152
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/0",
153
+ "privateKey": "0x0f2012c26b02b57d233bde81f718a33d24a9331f9716521f0be31c79f69d4fef",
154
+ "publicKey": "0x03350c7ada7a25ffea5b1dcdd380366eb21879ad074463583053cb7ad7d3acd712",
155
+ },
156
+ ]
157
+ `;
158
+
159
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 13`] = `
160
+ {
161
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
162
+ "path": "m/44'/60'/0'/0/0",
163
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
164
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
165
+ }
166
+ `;
167
+
168
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 14`] = `
169
+ [
170
+ {
171
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
172
+ "path": "m/44'/60'/0'/0/0",
173
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
174
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
175
+ },
176
+ {
177
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
178
+ "path": "m/44'/60'/0'/0/0",
179
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
180
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
181
+ },
182
+ ]
183
+ `;
184
+
185
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 15`] = `
186
+ {
187
+ "address": "3654cafa0b49eef056adc7dce5f745b08f98498d",
188
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/1",
189
+ "privateKey": "0x00689c78fca99bb3f0c6d116478b3b5250af3b3e4c5cc8bf211b6dca638806d0",
190
+ "publicKey": "0x0296ba5a05dbb3f0e33b10625422731a36b38de07aa66f947c58d2b5e55a35b6e4",
191
+ }
192
+ `;
193
+
194
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 16`] = `
195
+ [
196
+ {
197
+ "address": "3654cafa0b49eef056adc7dce5f745b08f98498d",
198
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/1",
199
+ "privateKey": "0x00689c78fca99bb3f0c6d116478b3b5250af3b3e4c5cc8bf211b6dca638806d0",
200
+ "publicKey": "0x0296ba5a05dbb3f0e33b10625422731a36b38de07aa66f947c58d2b5e55a35b6e4",
201
+ },
202
+ {
203
+ "address": "3654cafa0b49eef056adc7dce5f745b08f98498d",
204
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/1",
205
+ "privateKey": "0x00689c78fca99bb3f0c6d116478b3b5250af3b3e4c5cc8bf211b6dca638806d0",
206
+ "publicKey": "0x0296ba5a05dbb3f0e33b10625422731a36b38de07aa66f947c58d2b5e55a35b6e4",
207
+ },
208
+ ]
209
+ `;
210
+
211
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 17`] = `
212
+ {
213
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
214
+ "path": "m/44'/60'/0'/0/0",
215
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
216
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
217
+ }
218
+ `;
219
+
220
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 18`] = `
221
+ [
222
+ {
223
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
224
+ "path": "m/44'/60'/0'/0/0",
225
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
226
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
227
+ },
228
+ {
229
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
230
+ "path": "m/44'/60'/0'/0/0",
231
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
232
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
233
+ },
234
+ ]
235
+ `;
236
+
237
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 19`] = `
238
+ {
239
+ "address": "f2a43815de64547920effab3112c6af940454fff",
240
+ "path": "m/44'/60'/0'/0/0/49'/0'/0'",
241
+ "privateKey": "0x30f1f720d600844413a45e51faf88f98d3de353a79b9b869723dc889ac28e5be",
242
+ "publicKey": "0x02ec2d8adf5152cabb85480d2d5d695765cc9227406543dd7a85ac8bc6e4b35001",
243
+ }
244
+ `;
245
+
246
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 20`] = `
247
+ [
248
+ {
249
+ "address": "f2a43815de64547920effab3112c6af940454fff",
250
+ "path": "m/44'/60'/0'/0/0/49'/0'/0'",
251
+ "privateKey": "0x30f1f720d600844413a45e51faf88f98d3de353a79b9b869723dc889ac28e5be",
252
+ "publicKey": "0x02ec2d8adf5152cabb85480d2d5d695765cc9227406543dd7a85ac8bc6e4b35001",
253
+ },
254
+ {
255
+ "address": "f2a43815de64547920effab3112c6af940454fff",
256
+ "path": "m/44'/60'/0'/0/0/49'/0'/0'",
257
+ "privateKey": "0x30f1f720d600844413a45e51faf88f98d3de353a79b9b869723dc889ac28e5be",
258
+ "publicKey": "0x02ec2d8adf5152cabb85480d2d5d695765cc9227406543dd7a85ac8bc6e4b35001",
259
+ },
260
+ ]
261
+ `;
262
+
263
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 21`] = `
264
+ {
265
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
266
+ "path": "m/44'/60'/0'/0/0",
267
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
268
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
269
+ }
270
+ `;
271
+
272
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 22`] = `
273
+ [
274
+ {
275
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
276
+ "path": "m/44'/60'/0'/0/0",
277
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
278
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
279
+ },
280
+ {
281
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
282
+ "path": "m/44'/60'/0'/0/0",
283
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
284
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
285
+ },
286
+ ]
287
+ `;
288
+
289
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 23`] = `
290
+ {
291
+ "address": "e072bfa0adf20b46997aa346333683de09765ce6",
292
+ "path": "m/44'/60'/0'/0/0/84'/0'/0'",
293
+ "privateKey": "0xf28cddb3a0134f549978da00d9333afbf9d2f791a6c972f7df0ad9d2881e8fd4",
294
+ "publicKey": "0x02a1cc422be52d92df32ff0a1fd95cc61ccd26d220069624184a96a5dcee6b0b4c",
295
+ }
296
+ `;
297
+
298
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 24`] = `
299
+ [
300
+ {
301
+ "address": "e072bfa0adf20b46997aa346333683de09765ce6",
302
+ "path": "m/44'/60'/0'/0/0/84'/0'/0'",
303
+ "privateKey": "0xf28cddb3a0134f549978da00d9333afbf9d2f791a6c972f7df0ad9d2881e8fd4",
304
+ "publicKey": "0x02a1cc422be52d92df32ff0a1fd95cc61ccd26d220069624184a96a5dcee6b0b4c",
305
+ },
306
+ {
307
+ "address": "e072bfa0adf20b46997aa346333683de09765ce6",
308
+ "path": "m/44'/60'/0'/0/0/84'/0'/0'",
309
+ "privateKey": "0xf28cddb3a0134f549978da00d9333afbf9d2f791a6c972f7df0ad9d2881e8fd4",
310
+ "publicKey": "0x02a1cc422be52d92df32ff0a1fd95cc61ccd26d220069624184a96a5dcee6b0b4c",
311
+ },
312
+ ]
313
+ `;
314
+
315
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 25`] = `
316
+ {
317
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
318
+ "path": "m/44'/60'/0'/0/0",
319
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
320
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
321
+ }
322
+ `;
323
+
324
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 26`] = `
325
+ [
326
+ {
327
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
328
+ "path": "m/44'/60'/0'/0/0",
329
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
330
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
331
+ },
332
+ {
333
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
334
+ "path": "m/44'/60'/0'/0/0",
335
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
336
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
337
+ },
338
+ ]
339
+ `;
340
+
341
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 27`] = `
342
+ {
343
+ "address": "09a9478624b423318d0b5c69b08896c9c961af4b",
344
+ "path": "m/44'/60'/0'/0/0/84'/0'/0'/0",
345
+ "privateKey": "0x7d28a667a6acafc0da52d58d854c53266e8c8b3e2b836ccc4b8ad243be92caff",
346
+ "publicKey": "0x029526fc69eaa9c75901e0e9fc8b3ecb6697608b14e6a7a4b7506a17ae659e37f5",
347
+ }
348
+ `;
349
+
350
+ exports[`Node Wallet Test > HDWallet: Node > constructor > works repeatably & interoperably with Ethers 28`] = `
351
+ [
352
+ {
353
+ "address": "09a9478624b423318d0b5c69b08896c9c961af4b",
354
+ "path": "m/44'/60'/0'/0/0/84'/0'/0'/0",
355
+ "privateKey": "0x7d28a667a6acafc0da52d58d854c53266e8c8b3e2b836ccc4b8ad243be92caff",
356
+ "publicKey": "0x029526fc69eaa9c75901e0e9fc8b3ecb6697608b14e6a7a4b7506a17ae659e37f5",
357
+ },
358
+ {
359
+ "address": "09a9478624b423318d0b5c69b08896c9c961af4b",
360
+ "path": "m/44'/60'/0'/0/0/84'/0'/0'/0",
361
+ "privateKey": "0x7d28a667a6acafc0da52d58d854c53266e8c8b3e2b836ccc4b8ad243be92caff",
362
+ "publicKey": "0x029526fc69eaa9c75901e0e9fc8b3ecb6697608b14e6a7a4b7506a17ae659e37f5",
363
+ },
364
+ ]
365
+ `;
366
+
367
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > returns cached instances on subsequent requests 1`] = `
368
+ {
369
+ "address": "3654cafa0b49eef056adc7dce5f745b08f98498d",
370
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/1",
371
+ "privateKey": "0x00689c78fca99bb3f0c6d116478b3b5250af3b3e4c5cc8bf211b6dca638806d0",
372
+ "publicKey": "0x0296ba5a05dbb3f0e33b10625422731a36b38de07aa66f947c58d2b5e55a35b6e4",
373
+ }
374
+ `;
375
+
376
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > returns cached instances on subsequent requests 2`] = `
377
+ [
378
+ {
379
+ "address": "3654cafa0b49eef056adc7dce5f745b08f98498d",
380
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/1",
381
+ "privateKey": "0x00689c78fca99bb3f0c6d116478b3b5250af3b3e4c5cc8bf211b6dca638806d0",
382
+ "publicKey": "0x0296ba5a05dbb3f0e33b10625422731a36b38de07aa66f947c58d2b5e55a35b6e4",
383
+ },
384
+ {
385
+ "address": "3654cafa0b49eef056adc7dce5f745b08f98498d",
386
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/1",
387
+ "privateKey": "0x00689c78fca99bb3f0c6d116478b3b5250af3b3e4c5cc8bf211b6dca638806d0",
388
+ "publicKey": "0x0296ba5a05dbb3f0e33b10625422731a36b38de07aa66f947c58d2b5e55a35b6e4",
389
+ },
390
+ ]
391
+ `;
392
+
393
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 1`] = `
394
+ {
395
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
396
+ "path": "m/44'/60'/0'/0/0",
397
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
398
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
399
+ }
400
+ `;
401
+
402
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 2`] = `
403
+ [
404
+ {
405
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
406
+ "path": "m/44'/60'/0'/0/0",
407
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
408
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
409
+ },
410
+ {
411
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
412
+ "path": "m/44'/60'/0'/0/0",
413
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
414
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
415
+ },
416
+ ]
417
+ `;
418
+
419
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 3`] = `
420
+ {
421
+ "address": "012167a8cd67f0f20fbfc54212ac9bba982dbae3",
422
+ "path": "m/44'/60'/0'/0/0/0/4",
423
+ "privateKey": "0x61ee4d0dc8d33ebfa9b7726c4600db4048240651dd8ac2119d5f59d28332f8ad",
424
+ "publicKey": "0x037697e2cf043b8e96c43694f440fbe0ec01f29dedb9f1ff7e1007742b32fe7523",
425
+ }
426
+ `;
427
+
428
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 4`] = `
429
+ [
430
+ {
431
+ "address": "012167a8cd67f0f20fbfc54212ac9bba982dbae3",
432
+ "path": "m/44'/60'/0'/0/0/0/4",
433
+ "privateKey": "0x61ee4d0dc8d33ebfa9b7726c4600db4048240651dd8ac2119d5f59d28332f8ad",
434
+ "publicKey": "0x037697e2cf043b8e96c43694f440fbe0ec01f29dedb9f1ff7e1007742b32fe7523",
435
+ },
436
+ {
437
+ "address": "012167a8cd67f0f20fbfc54212ac9bba982dbae3",
438
+ "path": "m/44'/60'/0'/0/0/0/4",
439
+ "privateKey": "0x61ee4d0dc8d33ebfa9b7726c4600db4048240651dd8ac2119d5f59d28332f8ad",
440
+ "publicKey": "0x037697e2cf043b8e96c43694f440fbe0ec01f29dedb9f1ff7e1007742b32fe7523",
441
+ },
442
+ ]
443
+ `;
444
+
445
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 5`] = `
446
+ {
447
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
448
+ "path": "m/44'/60'/0'/0/0",
449
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
450
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
451
+ }
452
+ `;
453
+
454
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 6`] = `
455
+ [
456
+ {
457
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
458
+ "path": "m/44'/60'/0'/0/0",
459
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
460
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
461
+ },
462
+ {
463
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
464
+ "path": "m/44'/60'/0'/0/0",
465
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
466
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
467
+ },
468
+ ]
469
+ `;
470
+
471
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 7`] = `
472
+ {
473
+ "address": "6ab24a1bcccc3ff79e8f826b7cc5bf583b5e9c57",
474
+ "path": "m/44'/60'/0'/0/0/44'/0'/0'",
475
+ "privateKey": "0x345ae736b1203dc38ede87bb44edffe039b8c6432fe591f835723ba00295d216",
476
+ "publicKey": "0x02f1ae68e6ed8f9100c3f1c8a3c7356faeaad8aaf0e5175d5a3105c5b3223c5818",
477
+ }
478
+ `;
479
+
480
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 8`] = `
481
+ [
482
+ {
483
+ "address": "6ab24a1bcccc3ff79e8f826b7cc5bf583b5e9c57",
484
+ "path": "m/44'/60'/0'/0/0/44'/0'/0'",
485
+ "privateKey": "0x345ae736b1203dc38ede87bb44edffe039b8c6432fe591f835723ba00295d216",
486
+ "publicKey": "0x02f1ae68e6ed8f9100c3f1c8a3c7356faeaad8aaf0e5175d5a3105c5b3223c5818",
487
+ },
488
+ {
489
+ "address": "6ab24a1bcccc3ff79e8f826b7cc5bf583b5e9c57",
490
+ "path": "m/44'/60'/0'/0/0/44'/0'/0'",
491
+ "privateKey": "0x345ae736b1203dc38ede87bb44edffe039b8c6432fe591f835723ba00295d216",
492
+ "publicKey": "0x02f1ae68e6ed8f9100c3f1c8a3c7356faeaad8aaf0e5175d5a3105c5b3223c5818",
493
+ },
494
+ ]
495
+ `;
496
+
497
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 9`] = `
498
+ {
499
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
500
+ "path": "m/44'/60'/0'/0/0",
501
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
502
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
503
+ }
504
+ `;
505
+
506
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 10`] = `
507
+ [
508
+ {
509
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
510
+ "path": "m/44'/60'/0'/0/0",
511
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
512
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
513
+ },
514
+ {
515
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
516
+ "path": "m/44'/60'/0'/0/0",
517
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
518
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
519
+ },
520
+ ]
521
+ `;
522
+
523
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 11`] = `
524
+ {
525
+ "address": "5e0e54445fdd4e453fca8216b056226c5ef6a2f1",
526
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/0",
527
+ "privateKey": "0x0f2012c26b02b57d233bde81f718a33d24a9331f9716521f0be31c79f69d4fef",
528
+ "publicKey": "0x03350c7ada7a25ffea5b1dcdd380366eb21879ad074463583053cb7ad7d3acd712",
529
+ }
530
+ `;
531
+
532
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 12`] = `
533
+ [
534
+ {
535
+ "address": "5e0e54445fdd4e453fca8216b056226c5ef6a2f1",
536
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/0",
537
+ "privateKey": "0x0f2012c26b02b57d233bde81f718a33d24a9331f9716521f0be31c79f69d4fef",
538
+ "publicKey": "0x03350c7ada7a25ffea5b1dcdd380366eb21879ad074463583053cb7ad7d3acd712",
539
+ },
540
+ {
541
+ "address": "5e0e54445fdd4e453fca8216b056226c5ef6a2f1",
542
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/0",
543
+ "privateKey": "0x0f2012c26b02b57d233bde81f718a33d24a9331f9716521f0be31c79f69d4fef",
544
+ "publicKey": "0x03350c7ada7a25ffea5b1dcdd380366eb21879ad074463583053cb7ad7d3acd712",
545
+ },
546
+ ]
547
+ `;
548
+
549
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 13`] = `
550
+ {
551
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
552
+ "path": "m/44'/60'/0'/0/0",
553
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
554
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
555
+ }
556
+ `;
557
+
558
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 14`] = `
559
+ [
560
+ {
561
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
562
+ "path": "m/44'/60'/0'/0/0",
563
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
564
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
565
+ },
566
+ {
567
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
568
+ "path": "m/44'/60'/0'/0/0",
569
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
570
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
571
+ },
572
+ ]
573
+ `;
574
+
575
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 15`] = `
576
+ {
577
+ "address": "3654cafa0b49eef056adc7dce5f745b08f98498d",
578
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/1",
579
+ "privateKey": "0x00689c78fca99bb3f0c6d116478b3b5250af3b3e4c5cc8bf211b6dca638806d0",
580
+ "publicKey": "0x0296ba5a05dbb3f0e33b10625422731a36b38de07aa66f947c58d2b5e55a35b6e4",
581
+ }
582
+ `;
583
+
584
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 16`] = `
585
+ [
586
+ {
587
+ "address": "3654cafa0b49eef056adc7dce5f745b08f98498d",
588
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/1",
589
+ "privateKey": "0x00689c78fca99bb3f0c6d116478b3b5250af3b3e4c5cc8bf211b6dca638806d0",
590
+ "publicKey": "0x0296ba5a05dbb3f0e33b10625422731a36b38de07aa66f947c58d2b5e55a35b6e4",
591
+ },
592
+ {
593
+ "address": "3654cafa0b49eef056adc7dce5f745b08f98498d",
594
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/1",
595
+ "privateKey": "0x00689c78fca99bb3f0c6d116478b3b5250af3b3e4c5cc8bf211b6dca638806d0",
596
+ "publicKey": "0x0296ba5a05dbb3f0e33b10625422731a36b38de07aa66f947c58d2b5e55a35b6e4",
597
+ },
598
+ ]
599
+ `;
600
+
601
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 17`] = `
602
+ {
603
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
604
+ "path": "m/44'/60'/0'/0/0",
605
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
606
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
607
+ }
608
+ `;
609
+
610
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 18`] = `
611
+ [
612
+ {
613
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
614
+ "path": "m/44'/60'/0'/0/0",
615
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
616
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
617
+ },
618
+ {
619
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
620
+ "path": "m/44'/60'/0'/0/0",
621
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
622
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
623
+ },
624
+ ]
625
+ `;
626
+
627
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 19`] = `
628
+ {
629
+ "address": "f2a43815de64547920effab3112c6af940454fff",
630
+ "path": "m/44'/60'/0'/0/0/49'/0'/0'",
631
+ "privateKey": "0x30f1f720d600844413a45e51faf88f98d3de353a79b9b869723dc889ac28e5be",
632
+ "publicKey": "0x02ec2d8adf5152cabb85480d2d5d695765cc9227406543dd7a85ac8bc6e4b35001",
633
+ }
634
+ `;
635
+
636
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 20`] = `
637
+ [
638
+ {
639
+ "address": "f2a43815de64547920effab3112c6af940454fff",
640
+ "path": "m/44'/60'/0'/0/0/49'/0'/0'",
641
+ "privateKey": "0x30f1f720d600844413a45e51faf88f98d3de353a79b9b869723dc889ac28e5be",
642
+ "publicKey": "0x02ec2d8adf5152cabb85480d2d5d695765cc9227406543dd7a85ac8bc6e4b35001",
643
+ },
644
+ {
645
+ "address": "f2a43815de64547920effab3112c6af940454fff",
646
+ "path": "m/44'/60'/0'/0/0/49'/0'/0'",
647
+ "privateKey": "0x30f1f720d600844413a45e51faf88f98d3de353a79b9b869723dc889ac28e5be",
648
+ "publicKey": "0x02ec2d8adf5152cabb85480d2d5d695765cc9227406543dd7a85ac8bc6e4b35001",
649
+ },
650
+ ]
651
+ `;
652
+
653
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 21`] = `
654
+ {
655
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
656
+ "path": "m/44'/60'/0'/0/0",
657
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
658
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
659
+ }
660
+ `;
661
+
662
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 22`] = `
663
+ [
664
+ {
665
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
666
+ "path": "m/44'/60'/0'/0/0",
667
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
668
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
669
+ },
670
+ {
671
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
672
+ "path": "m/44'/60'/0'/0/0",
673
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
674
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
675
+ },
676
+ ]
677
+ `;
678
+
679
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 23`] = `
680
+ {
681
+ "address": "e072bfa0adf20b46997aa346333683de09765ce6",
682
+ "path": "m/44'/60'/0'/0/0/84'/0'/0'",
683
+ "privateKey": "0xf28cddb3a0134f549978da00d9333afbf9d2f791a6c972f7df0ad9d2881e8fd4",
684
+ "publicKey": "0x02a1cc422be52d92df32ff0a1fd95cc61ccd26d220069624184a96a5dcee6b0b4c",
685
+ }
686
+ `;
687
+
688
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 24`] = `
689
+ [
690
+ {
691
+ "address": "e072bfa0adf20b46997aa346333683de09765ce6",
692
+ "path": "m/44'/60'/0'/0/0/84'/0'/0'",
693
+ "privateKey": "0xf28cddb3a0134f549978da00d9333afbf9d2f791a6c972f7df0ad9d2881e8fd4",
694
+ "publicKey": "0x02a1cc422be52d92df32ff0a1fd95cc61ccd26d220069624184a96a5dcee6b0b4c",
695
+ },
696
+ {
697
+ "address": "e072bfa0adf20b46997aa346333683de09765ce6",
698
+ "path": "m/44'/60'/0'/0/0/84'/0'/0'",
699
+ "privateKey": "0xf28cddb3a0134f549978da00d9333afbf9d2f791a6c972f7df0ad9d2881e8fd4",
700
+ "publicKey": "0x02a1cc422be52d92df32ff0a1fd95cc61ccd26d220069624184a96a5dcee6b0b4c",
701
+ },
702
+ ]
703
+ `;
704
+
705
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 25`] = `
706
+ {
707
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
708
+ "path": "m/44'/60'/0'/0/0",
709
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
710
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
711
+ }
712
+ `;
713
+
714
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 26`] = `
715
+ [
716
+ {
717
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
718
+ "path": "m/44'/60'/0'/0/0",
719
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
720
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
721
+ },
722
+ {
723
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
724
+ "path": "m/44'/60'/0'/0/0",
725
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
726
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
727
+ },
728
+ ]
729
+ `;
730
+
731
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 27`] = `
732
+ {
733
+ "address": "09a9478624b423318d0b5c69b08896c9c961af4b",
734
+ "path": "m/44'/60'/0'/0/0/84'/0'/0'/0",
735
+ "privateKey": "0x7d28a667a6acafc0da52d58d854c53266e8c8b3e2b836ccc4b8ad243be92caff",
736
+ "publicKey": "0x029526fc69eaa9c75901e0e9fc8b3ecb6697608b14e6a7a4b7506a17ae659e37f5",
737
+ }
738
+ `;
739
+
740
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works repeatably & interoperably from phrase & extended key 28`] = `
741
+ [
742
+ {
743
+ "address": "09a9478624b423318d0b5c69b08896c9c961af4b",
744
+ "path": "m/44'/60'/0'/0/0/84'/0'/0'/0",
745
+ "privateKey": "0x7d28a667a6acafc0da52d58d854c53266e8c8b3e2b836ccc4b8ad243be92caff",
746
+ "publicKey": "0x029526fc69eaa9c75901e0e9fc8b3ecb6697608b14e6a7a4b7506a17ae659e37f5",
747
+ },
748
+ {
749
+ "address": "09a9478624b423318d0b5c69b08896c9c961af4b",
750
+ "path": "m/44'/60'/0'/0/0/84'/0'/0'/0",
751
+ "privateKey": "0x7d28a667a6acafc0da52d58d854c53266e8c8b3e2b836ccc4b8ad243be92caff",
752
+ "publicKey": "0x029526fc69eaa9c75901e0e9fc8b3ecb6697608b14e6a7a4b7506a17ae659e37f5",
753
+ },
754
+ ]
755
+ `;
756
+
757
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works when paths provided absolutely 1`] = `
758
+ {
759
+ "address": "148c7da67c48a8c6da464ba8b3619c2fd4037a43",
760
+ "path": "m/44'/60'/0'/0/1",
761
+ "privateKey": "0xedd1743fd3d99c73a7bd08913cbbb9e9f8eb83bb0a6252ef9936859a32e80896",
762
+ "publicKey": "0x02847ce60dc4a5350d7e4e7ff0ee6d4555aed4bedee79d9daf4e701c78f088b912",
763
+ }
764
+ `;
765
+
766
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works when paths provided absolutely 2`] = `
767
+ [
768
+ {
769
+ "address": "148c7da67c48a8c6da464ba8b3619c2fd4037a43",
770
+ "path": "m/44'/60'/0'/0/1",
771
+ "privateKey": "0xedd1743fd3d99c73a7bd08913cbbb9e9f8eb83bb0a6252ef9936859a32e80896",
772
+ "publicKey": "0x02847ce60dc4a5350d7e4e7ff0ee6d4555aed4bedee79d9daf4e701c78f088b912",
773
+ },
774
+ {
775
+ "address": "148c7da67c48a8c6da464ba8b3619c2fd4037a43",
776
+ "path": "m/44'/60'/0'/0/1",
777
+ "privateKey": "0xedd1743fd3d99c73a7bd08913cbbb9e9f8eb83bb0a6252ef9936859a32e80896",
778
+ "publicKey": "0x02847ce60dc4a5350d7e4e7ff0ee6d4555aed4bedee79d9daf4e701c78f088b912",
779
+ },
780
+ ]
781
+ `;
782
+
783
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works when paths provided incrementally 1`] = `
784
+ {
785
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
786
+ "path": "m/44'/60'/0'/0/0",
787
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
788
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
789
+ }
790
+ `;
791
+
792
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works when paths provided incrementally 2`] = `
793
+ [
794
+ {
795
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
796
+ "path": "m/44'/60'/0'/0/0",
797
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
798
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
799
+ },
800
+ {
801
+ "address": "e46c258c74c7c1df33d7caa4c2c664dc0843ab3f",
802
+ "path": "m/44'/60'/0'/0/0",
803
+ "privateKey": "0x96a7705eedbb701a03ee235911253fd3eb80e48a06106c0bf957d42b72bd8efa",
804
+ "publicKey": "0x03a9f10779cb44e73a1983b8225ce9de96ff63cbc8a2900db102fa55a38a14b206",
805
+ },
806
+ ]
807
+ `;
808
+
809
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works when paths provided incrementally 3`] = `
810
+ {
811
+ "address": "3654cafa0b49eef056adc7dce5f745b08f98498d",
812
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/1",
813
+ "privateKey": "0x00689c78fca99bb3f0c6d116478b3b5250af3b3e4c5cc8bf211b6dca638806d0",
814
+ "publicKey": "0x0296ba5a05dbb3f0e33b10625422731a36b38de07aa66f947c58d2b5e55a35b6e4",
815
+ }
816
+ `;
817
+
818
+ exports[`Node Wallet Test > HDWallet: Node > derivePath > works when paths provided incrementally 4`] = `
819
+ [
820
+ {
821
+ "address": "3654cafa0b49eef056adc7dce5f745b08f98498d",
822
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/1",
823
+ "privateKey": "0x00689c78fca99bb3f0c6d116478b3b5250af3b3e4c5cc8bf211b6dca638806d0",
824
+ "publicKey": "0x0296ba5a05dbb3f0e33b10625422731a36b38de07aa66f947c58d2b5e55a35b6e4",
825
+ },
826
+ {
827
+ "address": "3654cafa0b49eef056adc7dce5f745b08f98498d",
828
+ "path": "m/44'/60'/0'/0/0/44'/60'/0'/0/1",
829
+ "privateKey": "0x00689c78fca99bb3f0c6d116478b3b5250af3b3e4c5cc8bf211b6dca638806d0",
830
+ "publicKey": "0x0296ba5a05dbb3f0e33b10625422731a36b38de07aa66f947c58d2b5e55a35b6e4",
831
+ },
832
+ ]
833
+ `;
834
+
835
+ exports[`Same address, two paths 1`] = `"1eefd4fb703a43ce5ded91bdff2820a7a3999ca8"`;
836
+
837
+ exports[`Same address, two paths 2`] = `"1b9eedc3466de680d07b1e14ae69281c14fa47be"`;
838
+
839
+ exports[`Same address, two paths 3`] = `"1b9eedc3466de680d07b1e14ae69281c14fa47be"`;
840
+
841
+ exports[`Same address, two paths 4`] = `"e34188f2e84688b036f47bc2ad57aca1085cc95a"`;
@@ -0,0 +1,9 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`Same address, two paths 1`] = `"1eefd4fb703a43ce5ded91bdff2820a7a3999ca8"`;
4
+
5
+ exports[`Same address, two paths 2`] = `"1b9eedc3466de680d07b1e14ae69281c14fa47be"`;
6
+
7
+ exports[`Same address, two paths 3`] = `"1b9eedc3466de680d07b1e14ae69281c14fa47be"`;
8
+
9
+ exports[`Same address, two paths 4`] = `"e34188f2e84688b036f47bc2ad57aca1085cc95a"`;
package/xy.config.ts DELETED
@@ -1,9 +0,0 @@
1
- import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
- const config: XyTsupConfig = {
3
- compile: {
4
- browser: { src: true },
5
- node: { src: true },
6
- },
7
- }
8
-
9
- export default config