forked from bitpay/bitcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhdkeys.js
372 lines (324 loc) · 18.7 KB
/
hdkeys.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
'use strict';
// Relax some linter options:
// * quote marks so "m/0'/1/2'/" doesn't need to be scaped
// * too many tests, maxstatements -> 100
// * store test vectors at the end, latedef: false
// * should call is never defined
/* jshint quotmark: false */
/* jshint latedef: false */
/* jshint maxstatements: 100 */
/* jshint unused: false */
var _ = require('lodash');
var should = require('chai').should();
var expect = require('chai').expect;
var sinon = require('sinon');
var bitcore = require('..');
var Networks = bitcore.Networks;
var HDPrivateKey = bitcore.HDPrivateKey;
var HDPublicKey = bitcore.HDPublicKey;
describe('HDKeys building with static methods', function() {
var classes = [HDPublicKey, HDPrivateKey];
var clazz, index;
_.each(classes, function(clazz) {
var expectStaticMethodFail = function(staticMethod, argument, message) {
expect(clazz[staticMethod].bind(null, argument)).to.throw(message);
};
it(clazz.name + ' fromJSON checks that a valid JSON is provided', function() {
var errorMessage = 'Invalid Argument: No valid argument was provided';
var method = 'fromObject';
expectStaticMethodFail(method, undefined, errorMessage);
expectStaticMethodFail(method, null, errorMessage);
expectStaticMethodFail(method, 'invalid JSON', errorMessage);
expectStaticMethodFail(method, '{\'singlequotes\': true}', errorMessage);
});
it(clazz.name + ' fromString checks that a string is provided', function() {
var errorMessage = 'No valid string was provided';
var method = 'fromString';
expectStaticMethodFail(method, undefined, errorMessage);
expectStaticMethodFail(method, null, errorMessage);
expectStaticMethodFail(method, {}, errorMessage);
});
it(clazz.name + ' fromObject checks that an object is provided', function() {
var errorMessage = 'No valid argument was provided';
var method = 'fromObject';
expectStaticMethodFail(method, undefined, errorMessage);
expectStaticMethodFail(method, null, errorMessage);
expectStaticMethodFail(method, '', errorMessage);
});
});
});
describe('BIP32 compliance', function() {
it('should initialize test vector 1 from the extended public key', function() {
new HDPublicKey(vector1_m_public).xpubkey.should.equal(vector1_m_public);
});
it('should initialize test vector 1 from the extended private key', function() {
new HDPrivateKey(vector1_m_private).xprivkey.should.equal(vector1_m_private);
});
it('can initialize a public key from an extended private key', function() {
new HDPublicKey(vector1_m_private).xpubkey.should.equal(vector1_m_public);
});
it('toString should be equal to the `xpubkey` member', function() {
var privateKey = new HDPrivateKey(vector1_m_private);
privateKey.toString().should.equal(privateKey.xprivkey);
});
it('toString should be equal to the `xpubkey` member', function() {
var publicKey = new HDPublicKey(vector1_m_public);
publicKey.toString().should.equal(publicKey.xpubkey);
});
it('should get the extended public key from the extended private key for test vector 1', function() {
HDPrivateKey(vector1_m_private).xpubkey.should.equal(vector1_m_public);
});
it("should get m/0' ext. private key from test vector 1", function() {
var privateKey = new HDPrivateKey(vector1_m_private).derive("m/0'");
privateKey.xprivkey.should.equal(vector1_m0h_private);
});
it("should get m/0' ext. public key from test vector 1", function() {
HDPrivateKey(vector1_m_private).derive("m/0'")
.xpubkey.should.equal(vector1_m0h_public);
});
it("should get m/0'/1 ext. private key from test vector 1", function() {
HDPrivateKey(vector1_m_private).derive("m/0'/1")
.xprivkey.should.equal(vector1_m0h1_private);
});
it("should get m/0'/1 ext. public key from test vector 1", function() {
HDPrivateKey(vector1_m_private).derive("m/0'/1")
.xpubkey.should.equal(vector1_m0h1_public);
});
it("should get m/0'/1 ext. public key from m/0' public key from test vector 1", function() {
var derivedPublic = HDPrivateKey(vector1_m_private).derive("m/0'").hdPublicKey.derive("m/1");
derivedPublic.xpubkey.should.equal(vector1_m0h1_public);
});
it("should get m/0'/1/2' ext. private key from test vector 1", function() {
var privateKey = new HDPrivateKey(vector1_m_private);
var derived = privateKey.derive("m/0'/1/2'");
derived.xprivkey.should.equal(vector1_m0h12h_private);
});
it("should get m/0'/1/2' ext. public key from test vector 1", function() {
HDPrivateKey(vector1_m_private).derive("m/0'/1/2'")
.xpubkey.should.equal(vector1_m0h12h_public);
});
it("should get m/0'/1/2'/2 ext. private key from test vector 1", function() {
HDPrivateKey(vector1_m_private).derive("m/0'/1/2'/2")
.xprivkey.should.equal(vector1_m0h12h2_private);
});
it("should get m/0'/1/2'/2 ext. public key from m/0'/1/2' public key from test vector 1", function() {
var derived = HDPrivateKey(vector1_m_private).derive("m/0'/1/2'").hdPublicKey;
derived.derive("m/2").xpubkey.should.equal(vector1_m0h12h2_public);
});
it("should get m/0'/1/2h/2 ext. public key from test vector 1", function() {
HDPrivateKey(vector1_m_private).derive("m/0'/1/2'/2")
.xpubkey.should.equal(vector1_m0h12h2_public);
});
it("should get m/0'/1/2h/2/1000000000 ext. private key from test vector 1", function() {
HDPrivateKey(vector1_m_private).derive("m/0'/1/2'/2/1000000000")
.xprivkey.should.equal(vector1_m0h12h21000000000_private);
});
it("should get m/0'/1/2h/2/1000000000 ext. public key from test vector 1", function() {
HDPrivateKey(vector1_m_private).derive("m/0'/1/2'/2/1000000000")
.xpubkey.should.equal(vector1_m0h12h21000000000_public);
});
it("should get m/0'/1/2'/2/1000000000 ext. public key from m/0'/1/2'/2 public key from test vector 1", function() {
var derived = HDPrivateKey(vector1_m_private).derive("m/0'/1/2'/2").hdPublicKey;
derived.derive("m/1000000000").xpubkey.should.equal(vector1_m0h12h21000000000_public);
});
it('should initialize test vector 2 from the extended public key', function() {
HDPublicKey(vector2_m_public).xpubkey.should.equal(vector2_m_public);
});
it('should initialize test vector 2 from the extended private key', function() {
HDPrivateKey(vector2_m_private).xprivkey.should.equal(vector2_m_private);
});
it('should get the extended public key from the extended private key for test vector 2', function() {
HDPrivateKey(vector2_m_private).xpubkey.should.equal(vector2_m_public);
});
it("should get m/0 ext. private key from test vector 2", function() {
HDPrivateKey(vector2_m_private).derive(0).xprivkey.should.equal(vector2_m0_private);
});
it("should get m/0 ext. public key from test vector 2", function() {
HDPrivateKey(vector2_m_private).derive(0).xpubkey.should.equal(vector2_m0_public);
});
it("should get m/0 ext. public key from m public key from test vector 2", function() {
HDPrivateKey(vector2_m_private).hdPublicKey.derive(0).xpubkey.should.equal(vector2_m0_public);
});
it("should get m/0/2147483647h ext. private key from test vector 2", function() {
HDPrivateKey(vector2_m_private).derive("m/0/2147483647'")
.xprivkey.should.equal(vector2_m02147483647h_private);
});
it("should get m/0/2147483647h ext. public key from test vector 2", function() {
HDPrivateKey(vector2_m_private).derive("m/0/2147483647'")
.xpubkey.should.equal(vector2_m02147483647h_public);
});
it("should get m/0/2147483647h/1 ext. private key from test vector 2", function() {
HDPrivateKey(vector2_m_private).derive("m/0/2147483647'/1")
.xprivkey.should.equal(vector2_m02147483647h1_private);
});
it("should get m/0/2147483647h/1 ext. public key from test vector 2", function() {
HDPrivateKey(vector2_m_private).derive("m/0/2147483647'/1")
.xpubkey.should.equal(vector2_m02147483647h1_public);
});
it("should get m/0/2147483647h/1 ext. public key from m/0/2147483647h public key from test vector 2", function() {
var derived = HDPrivateKey(vector2_m_private).derive("m/0/2147483647'").hdPublicKey;
derived.derive(1).xpubkey.should.equal(vector2_m02147483647h1_public);
});
it("should get m/0/2147483647h/1/2147483646h ext. private key from test vector 2", function() {
HDPrivateKey(vector2_m_private).derive("m/0/2147483647'/1/2147483646'")
.xprivkey.should.equal(vector2_m02147483647h12147483646h_private);
});
it("should get m/0/2147483647h/1/2147483646h ext. public key from test vector 2", function() {
HDPrivateKey(vector2_m_private).derive("m/0/2147483647'/1/2147483646'")
.xpubkey.should.equal(vector2_m02147483647h12147483646h_public);
});
it("should get m/0/2147483647h/1/2147483646h/2 ext. private key from test vector 2", function() {
HDPrivateKey(vector2_m_private).derive("m/0/2147483647'/1/2147483646'/2")
.xprivkey.should.equal(vector2_m02147483647h12147483646h2_private);
});
it("should get m/0/2147483647h/1/2147483646h/2 ext. public key from test vector 2", function() {
HDPrivateKey(vector2_m_private).derive("m/0/2147483647'/1/2147483646'/2")
.xpubkey.should.equal(vector2_m02147483647h12147483646h2_public);
});
it("should get m/0/2147483647h/1/2147483646h/2 ext. public key from m/0/2147483647h/2147483646h public key from test vector 2", function() {
var derivedPublic = HDPrivateKey(vector2_m_private)
.derive("m/0/2147483647'/1/2147483646'").hdPublicKey;
derivedPublic.derive("m/2")
.xpubkey.should.equal(vector2_m02147483647h12147483646h2_public);
});
it('should use full 32 bytes for private key data that is hashed (as per bip32)', function() {
// https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
var privateKeyBuffer = Buffer.from('00000055378cf5fafb56c711c674143f9b0ee82ab0ba2924f19b64f5ae7cdbfd', 'hex');
var chainCodeBuffer = Buffer.from('9c8a5c863e5941f3d99453e6ba66b328bb17cf0b8dec89ed4fc5ace397a1c089', 'hex');
var key = HDPrivateKey.fromObject({
network: 'testnet',
depth: 0,
parentFingerPrint: 0,
childIndex: 0,
privateKey: privateKeyBuffer,
chainCode: chainCodeBuffer
});
var derived = key.deriveChild("m/44'/0'/0'/0/0'");
derived.privateKey.toString().should.equal('3348069561d2a0fb925e74bf198762acc47dce7db27372257d2d959a9e6f8aeb');
});
it('should NOT use full 32 bytes for private key data that is hashed with nonCompliant flag', function() {
// This is to test that the previously implemented non-compliant to BIP32
var privateKeyBuffer = Buffer.from('00000055378cf5fafb56c711c674143f9b0ee82ab0ba2924f19b64f5ae7cdbfd', 'hex');
var chainCodeBuffer = Buffer.from('9c8a5c863e5941f3d99453e6ba66b328bb17cf0b8dec89ed4fc5ace397a1c089', 'hex');
var key = HDPrivateKey.fromObject({
network: 'testnet',
depth: 0,
parentFingerPrint: 0,
childIndex: 0,
privateKey: privateKeyBuffer,
chainCode: chainCodeBuffer
});
var derived = key.deriveNonCompliantChild("m/44'/0'/0'/0/0'");
derived.privateKey.toString().should.equal('4811a079bab267bfdca855b3bddff20231ff7044e648514fa099158472df2836');
});
it('should NOT use full 32 bytes for private key data that is hashed with the nonCompliant derive method', function() {
// This is to test that the previously implemented non-compliant to BIP32
var privateKeyBuffer = Buffer.from('00000055378cf5fafb56c711c674143f9b0ee82ab0ba2924f19b64f5ae7cdbfd', 'hex');
var chainCodeBuffer = Buffer.from('9c8a5c863e5941f3d99453e6ba66b328bb17cf0b8dec89ed4fc5ace397a1c089', 'hex');
var key = HDPrivateKey.fromObject({
network: 'testnet',
depth: 0,
parentFingerPrint: 0,
childIndex: 0,
privateKey: privateKeyBuffer,
chainCode: chainCodeBuffer
});
var derived = key.derive("m/44'/0'/0'/0/0'");
derived.privateKey.toString().should.equal('4811a079bab267bfdca855b3bddff20231ff7044e648514fa099158472df2836');
});
describe('edge cases', function() {
var sandbox = sinon.createSandbox();
afterEach(function() {
sandbox.restore();
});
it('will handle edge case that derived private key is invalid', function() {
var invalid = Buffer.from('0000000000000000000000000000000000000000000000000000000000000000', 'hex');
var privateKeyBuffer = Buffer.from('5f72914c48581fc7ddeb944a9616389200a9560177d24f458258e5b04527bcd1', 'hex');
var chainCodeBuffer = Buffer.from('39816057bba9d952fe87fe998b7fd4d690a1bb58c2ff69141469e4d1dffb4b91', 'hex');
var unstubbed = bitcore.crypto.BN.prototype.toBuffer;
var count = 0;
var stub = sandbox.stub(bitcore.crypto.BN.prototype, 'toBuffer').callsFake(function (args) {
// On the fourth call to the function give back an invalid private key
// otherwise use the normal behavior.
count++;
if (count === 4) {
return invalid;
}
var ret = unstubbed.apply(this, arguments);
return ret;
});
sandbox.spy(bitcore.PrivateKey, 'isValid');
var key = HDPrivateKey.fromObject({
network: 'testnet',
depth: 0,
parentFingerPrint: 0,
childIndex: 0,
privateKey: privateKeyBuffer,
chainCode: chainCodeBuffer
});
var derived = key.derive("m/44'");
derived.privateKey.toString().should.equal('b15bce3608d607ee3a49069197732c656bca942ee59f3e29b4d56914c1de6825');
bitcore.PrivateKey.isValid.callCount.should.equal(2);
});
it('will handle edge case that a derive public key is invalid', function() {
var publicKeyBuffer = Buffer.from('029e58b241790284ef56502667b15157b3fc58c567f044ddc35653860f9455d099', 'hex');
var chainCodeBuffer = Buffer.from('39816057bba9d952fe87fe998b7fd4d690a1bb58c2ff69141469e4d1dffb4b91', 'hex');
var key = new HDPublicKey({
network: 'testnet',
depth: 0,
parentFingerPrint: 0,
childIndex: 0,
chainCode: chainCodeBuffer,
publicKey: publicKeyBuffer
});
var unstubbed = bitcore.PublicKey.fromPoint;
bitcore.PublicKey.fromPoint = function() {
bitcore.PublicKey.fromPoint = unstubbed;
throw new Error('Point cannot be equal to Infinity');
};
sandbox.spy(key, '_deriveWithNumber');
var derived = key.derive("m/44");
key._deriveWithNumber.callCount.should.equal(2);
key.publicKey.toString().should.equal('029e58b241790284ef56502667b15157b3fc58c567f044ddc35653860f9455d099');
});
});
describe('seed', function() {
it('should initialize a new BIP32 correctly from test vector 1 seed', function() {
var seededKey = HDPrivateKey.fromSeed(vector1_master, Networks.livenet);
seededKey.xprivkey.should.equal(vector1_m_private);
seededKey.xpubkey.should.equal(vector1_m_public);
});
it('should initialize a new BIP32 correctly from test vector 2 seed', function() {
var seededKey = HDPrivateKey.fromSeed(vector2_master, Networks.livenet);
seededKey.xprivkey.should.equal(vector2_m_private);
seededKey.xpubkey.should.equal(vector2_m_public);
});
});
});
//test vectors: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki
var vector1_master = '000102030405060708090a0b0c0d0e0f';
var vector1_m_public = 'xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8';
var vector1_m_private = 'xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi';
var vector1_m0h_public = 'xpub68Gmy5EdvgibQVfPdqkBBCHxA5htiqg55crXYuXoQRKfDBFA1WEjWgP6LHhwBZeNK1VTsfTFUHCdrfp1bgwQ9xv5ski8PX9rL2dZXvgGDnw';
var vector1_m0h_private = 'xprv9uHRZZhk6KAJC1avXpDAp4MDc3sQKNxDiPvvkX8Br5ngLNv1TxvUxt4cV1rGL5hj6KCesnDYUhd7oWgT11eZG7XnxHrnYeSvkzY7d2bhkJ7';
var vector1_m0h1_public = 'xpub6ASuArnXKPbfEwhqN6e3mwBcDTgzisQN1wXN9BJcM47sSikHjJf3UFHKkNAWbWMiGj7Wf5uMash7SyYq527Hqck2AxYysAA7xmALppuCkwQ';
var vector1_m0h1_private = 'xprv9wTYmMFdV23N2TdNG573QoEsfRrWKQgWeibmLntzniatZvR9BmLnvSxqu53Kw1UmYPxLgboyZQaXwTCg8MSY3H2EU4pWcQDnRnrVA1xe8fs';
var vector1_m0h12h_public = 'xpub6D4BDPcP2GT577Vvch3R8wDkScZWzQzMMUm3PWbmWvVJrZwQY4VUNgqFJPMM3No2dFDFGTsxxpG5uJh7n7epu4trkrX7x7DogT5Uv6fcLW5';
var vector1_m0h12h_private = 'xprv9z4pot5VBttmtdRTWfWQmoH1taj2axGVzFqSb8C9xaxKymcFzXBDptWmT7FwuEzG3ryjH4ktypQSAewRiNMjANTtpgP4mLTj34bhnZX7UiM';
var vector1_m0h12h2_public = 'xpub6FHa3pjLCk84BayeJxFW2SP4XRrFd1JYnxeLeU8EqN3vDfZmbqBqaGJAyiLjTAwm6ZLRQUMv1ZACTj37sR62cfN7fe5JnJ7dh8zL4fiyLHV';
var vector1_m0h12h2_private = 'xprvA2JDeKCSNNZky6uBCviVfJSKyQ1mDYahRjijr5idH2WwLsEd4Hsb2Tyh8RfQMuPh7f7RtyzTtdrbdqqsunu5Mm3wDvUAKRHSC34sJ7in334';
var vector1_m0h12h21000000000_public = 'xpub6H1LXWLaKsWFhvm6RVpEL9P4KfRZSW7abD2ttkWP3SSQvnyA8FSVqNTEcYFgJS2UaFcxupHiYkro49S8yGasTvXEYBVPamhGW6cFJodrTHy';
var vector1_m0h12h21000000000_private = 'xprvA41z7zogVVwxVSgdKUHDy1SKmdb533PjDz7J6N6mV6uS3ze1ai8FHa8kmHScGpWmj4WggLyQjgPie1rFSruoUihUZREPSL39UNdE3BBDu76';
var vector2_master = 'fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542';
var vector2_m_public = 'xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB';
var vector2_m_private = 'xprv9s21ZrQH143K31xYSDQpPDxsXRTUcvj2iNHm5NUtrGiGG5e2DtALGdso3pGz6ssrdK4PFmM8NSpSBHNqPqm55Qn3LqFtT2emdEXVYsCzC2U';
var vector2_m0_public = 'xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH';
var vector2_m0_private = 'xprv9vHkqa6EV4sPZHYqZznhT2NPtPCjKuDKGY38FBWLvgaDx45zo9WQRUT3dKYnjwih2yJD9mkrocEZXo1ex8G81dwSM1fwqWpWkeS3v86pgKt';
var vector2_m02147483647h_public = 'xpub6ASAVgeehLbnwdqV6UKMHVzgqAG8Gr6riv3Fxxpj8ksbH9ebxaEyBLZ85ySDhKiLDBrQSARLq1uNRts8RuJiHjaDMBU4Zn9h8LZNnBC5y4a';
var vector2_m02147483647h_private = 'xprv9wSp6B7kry3Vj9m1zSnLvN3xH8RdsPP1Mh7fAaR7aRLcQMKTR2vidYEeEg2mUCTAwCd6vnxVrcjfy2kRgVsFawNzmjuHc2YmYRmagcEPdU9';
var vector2_m02147483647h1_public = 'xpub6DF8uhdarytz3FWdA8TvFSvvAh8dP3283MY7p2V4SeE2wyWmG5mg5EwVvmdMVCQcoNJxGoWaU9DCWh89LojfZ537wTfunKau47EL2dhHKon';
var vector2_m02147483647h1_private = 'xprv9zFnWC6h2cLgpmSA46vutJzBcfJ8yaJGg8cX1e5StJh45BBciYTRXSd25UEPVuesF9yog62tGAQtHjXajPPdbRCHuWS6T8XA2ECKADdw4Ef';
var vector2_m02147483647h12147483646h_public = 'xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL';
var vector2_m02147483647h12147483646h_private = 'xprvA1RpRA33e1JQ7ifknakTFpgNXPmW2YvmhqLQYMmrj4xJXXWYpDPS3xz7iAxn8L39njGVyuoseXzU6rcxFLJ8HFsTjSyQbLYnMpCqE2VbFWc';
var vector2_m02147483647h12147483646h2_public = 'xpub6FnCn6nSzZAw5Tw7cgR9bi15UV96gLZhjDstkXXxvCLsUXBGXPdSnLFbdpq8p9HmGsApME5hQTZ3emM2rnY5agb9rXpVGyy3bdW6EEgAtqt';
var vector2_m02147483647h12147483646h2_private = 'xprvA2nrNbFZABcdryreWet9Ea4LvTJcGsqrMzxHx98MMrotbir7yrKCEXw7nadnHM8Dq38EGfSh6dqA9QWTyefMLEcBYJUuekgW4BYPJcr9E7j';