xpi-ts 0.2.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/LICENSE +21 -0
- package/README.md +516 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/lib/bitcore/address.d.ts +66 -0
- package/dist/lib/bitcore/address.d.ts.map +1 -0
- package/dist/lib/bitcore/address.js +407 -0
- package/dist/lib/bitcore/block/block.d.ts +57 -0
- package/dist/lib/bitcore/block/block.d.ts.map +1 -0
- package/dist/lib/bitcore/block/block.js +233 -0
- package/dist/lib/bitcore/block/blockheader.d.ts +82 -0
- package/dist/lib/bitcore/block/blockheader.d.ts.map +1 -0
- package/dist/lib/bitcore/block/blockheader.js +323 -0
- package/dist/lib/bitcore/block/index.d.ts +5 -0
- package/dist/lib/bitcore/block/index.d.ts.map +1 -0
- package/dist/lib/bitcore/block/index.js +2 -0
- package/dist/lib/bitcore/chunk.d.ts +22 -0
- package/dist/lib/bitcore/chunk.d.ts.map +1 -0
- package/dist/lib/bitcore/chunk.js +46 -0
- package/dist/lib/bitcore/crypto/bn.d.ts +53 -0
- package/dist/lib/bitcore/crypto/bn.d.ts.map +1 -0
- package/dist/lib/bitcore/crypto/bn.js +238 -0
- package/dist/lib/bitcore/crypto/ecdsa.d.ts +46 -0
- package/dist/lib/bitcore/crypto/ecdsa.d.ts.map +1 -0
- package/dist/lib/bitcore/crypto/ecdsa.js +247 -0
- package/dist/lib/bitcore/crypto/hash.d.ts +16 -0
- package/dist/lib/bitcore/crypto/hash.d.ts.map +1 -0
- package/dist/lib/bitcore/crypto/hash.js +87 -0
- package/dist/lib/bitcore/crypto/index.d.ts +9 -0
- package/dist/lib/bitcore/crypto/index.d.ts.map +1 -0
- package/dist/lib/bitcore/crypto/index.js +8 -0
- package/dist/lib/bitcore/crypto/musig2.d.ts +40 -0
- package/dist/lib/bitcore/crypto/musig2.d.ts.map +1 -0
- package/dist/lib/bitcore/crypto/musig2.js +236 -0
- package/dist/lib/bitcore/crypto/point.d.ts +20 -0
- package/dist/lib/bitcore/crypto/point.d.ts.map +1 -0
- package/dist/lib/bitcore/crypto/point.js +133 -0
- package/dist/lib/bitcore/crypto/random.d.ts +7 -0
- package/dist/lib/bitcore/crypto/random.d.ts.map +1 -0
- package/dist/lib/bitcore/crypto/random.js +30 -0
- package/dist/lib/bitcore/crypto/schnorr.d.ts +40 -0
- package/dist/lib/bitcore/crypto/schnorr.d.ts.map +1 -0
- package/dist/lib/bitcore/crypto/schnorr.js +185 -0
- package/dist/lib/bitcore/crypto/signature.d.ts +53 -0
- package/dist/lib/bitcore/crypto/signature.d.ts.map +1 -0
- package/dist/lib/bitcore/crypto/signature.js +300 -0
- package/dist/lib/bitcore/crypto/sigtype.d.ts +5 -0
- package/dist/lib/bitcore/crypto/sigtype.d.ts.map +1 -0
- package/dist/lib/bitcore/crypto/sigtype.js +18 -0
- package/dist/lib/bitcore/encoding/base58.d.ts +16 -0
- package/dist/lib/bitcore/encoding/base58.d.ts.map +1 -0
- package/dist/lib/bitcore/encoding/base58.js +55 -0
- package/dist/lib/bitcore/encoding/base58check.d.ts +9 -0
- package/dist/lib/bitcore/encoding/base58check.d.ts.map +1 -0
- package/dist/lib/bitcore/encoding/base58check.js +82 -0
- package/dist/lib/bitcore/encoding/bufferreader.d.ts +34 -0
- package/dist/lib/bitcore/encoding/bufferreader.d.ts.map +1 -0
- package/dist/lib/bitcore/encoding/bufferreader.js +198 -0
- package/dist/lib/bitcore/encoding/bufferwriter.d.ts +36 -0
- package/dist/lib/bitcore/encoding/bufferwriter.d.ts.map +1 -0
- package/dist/lib/bitcore/encoding/bufferwriter.js +189 -0
- package/dist/lib/bitcore/encoding/varint.d.ts +20 -0
- package/dist/lib/bitcore/encoding/varint.d.ts.map +1 -0
- package/dist/lib/bitcore/encoding/varint.js +61 -0
- package/dist/lib/bitcore/errors.d.ts +28 -0
- package/dist/lib/bitcore/errors.d.ts.map +1 -0
- package/dist/lib/bitcore/errors.js +325 -0
- package/dist/lib/bitcore/hdprivatekey.d.ts +78 -0
- package/dist/lib/bitcore/hdprivatekey.d.ts.map +1 -0
- package/dist/lib/bitcore/hdprivatekey.js +381 -0
- package/dist/lib/bitcore/hdpublickey.d.ts +98 -0
- package/dist/lib/bitcore/hdpublickey.d.ts.map +1 -0
- package/dist/lib/bitcore/hdpublickey.js +416 -0
- package/dist/lib/bitcore/index.d.ts +60 -0
- package/dist/lib/bitcore/index.d.ts.map +1 -0
- package/dist/lib/bitcore/index.js +44 -0
- package/dist/lib/bitcore/message.d.ts +23 -0
- package/dist/lib/bitcore/message.d.ts.map +1 -0
- package/dist/lib/bitcore/message.js +112 -0
- package/dist/lib/bitcore/mnemonic/errors.d.ts +7 -0
- package/dist/lib/bitcore/mnemonic/errors.d.ts.map +1 -0
- package/dist/lib/bitcore/mnemonic/errors.js +20 -0
- package/dist/lib/bitcore/mnemonic/index.d.ts +5 -0
- package/dist/lib/bitcore/mnemonic/index.d.ts.map +1 -0
- package/dist/lib/bitcore/mnemonic/index.js +4 -0
- package/dist/lib/bitcore/mnemonic/mnemonic.d.ts +23 -0
- package/dist/lib/bitcore/mnemonic/mnemonic.d.ts.map +1 -0
- package/dist/lib/bitcore/mnemonic/mnemonic.js +164 -0
- package/dist/lib/bitcore/mnemonic/pbkdf2.d.ts +2 -0
- package/dist/lib/bitcore/mnemonic/pbkdf2.d.ts.map +1 -0
- package/dist/lib/bitcore/mnemonic/pbkdf2.js +25 -0
- package/dist/lib/bitcore/mnemonic/words/english.d.ts +2 -0
- package/dist/lib/bitcore/mnemonic/words/english.d.ts.map +1 -0
- package/dist/lib/bitcore/mnemonic/words/english.js +2050 -0
- package/dist/lib/bitcore/mnemonic/words/index.d.ts +4 -0
- package/dist/lib/bitcore/mnemonic/words/index.d.ts.map +1 -0
- package/dist/lib/bitcore/mnemonic/words/index.js +4 -0
- package/dist/lib/bitcore/musig2/index.d.ts +3 -0
- package/dist/lib/bitcore/musig2/index.d.ts.map +1 -0
- package/dist/lib/bitcore/musig2/index.js +2 -0
- package/dist/lib/bitcore/musig2/session.d.ts +79 -0
- package/dist/lib/bitcore/musig2/session.d.ts.map +1 -0
- package/dist/lib/bitcore/musig2/session.js +346 -0
- package/dist/lib/bitcore/musig2/signer.d.ts +61 -0
- package/dist/lib/bitcore/musig2/signer.d.ts.map +1 -0
- package/dist/lib/bitcore/musig2/signer.js +146 -0
- package/dist/lib/bitcore/networks.d.ts +53 -0
- package/dist/lib/bitcore/networks.d.ts.map +1 -0
- package/dist/lib/bitcore/networks.js +150 -0
- package/dist/lib/bitcore/opcode.d.ts +250 -0
- package/dist/lib/bitcore/opcode.d.ts.map +1 -0
- package/dist/lib/bitcore/opcode.js +270 -0
- package/dist/lib/bitcore/privatekey.d.ts +56 -0
- package/dist/lib/bitcore/privatekey.d.ts.map +1 -0
- package/dist/lib/bitcore/privatekey.js +237 -0
- package/dist/lib/bitcore/publickey.d.ts +59 -0
- package/dist/lib/bitcore/publickey.d.ts.map +1 -0
- package/dist/lib/bitcore/publickey.js +263 -0
- package/dist/lib/bitcore/script/interpreter.d.ts +98 -0
- package/dist/lib/bitcore/script/interpreter.d.ts.map +1 -0
- package/dist/lib/bitcore/script/interpreter.js +1704 -0
- package/dist/lib/bitcore/script.d.ts +111 -0
- package/dist/lib/bitcore/script.d.ts.map +1 -0
- package/dist/lib/bitcore/script.js +1112 -0
- package/dist/lib/bitcore/taproot/musig2.d.ts +29 -0
- package/dist/lib/bitcore/taproot/musig2.d.ts.map +1 -0
- package/dist/lib/bitcore/taproot/musig2.js +104 -0
- package/dist/lib/bitcore/taproot/nft.d.ts +164 -0
- package/dist/lib/bitcore/taproot/nft.d.ts.map +1 -0
- package/dist/lib/bitcore/taproot/nft.js +407 -0
- package/dist/lib/bitcore/taproot.d.ts +65 -0
- package/dist/lib/bitcore/taproot.d.ts.map +1 -0
- package/dist/lib/bitcore/taproot.js +288 -0
- package/dist/lib/bitcore/transaction/index.d.ts +12 -0
- package/dist/lib/bitcore/transaction/index.d.ts.map +1 -0
- package/dist/lib/bitcore/transaction/index.js +6 -0
- package/dist/lib/bitcore/transaction/input.d.ts +202 -0
- package/dist/lib/bitcore/transaction/input.d.ts.map +1 -0
- package/dist/lib/bitcore/transaction/input.js +911 -0
- package/dist/lib/bitcore/transaction/output.d.ts +48 -0
- package/dist/lib/bitcore/transaction/output.d.ts.map +1 -0
- package/dist/lib/bitcore/transaction/output.js +231 -0
- package/dist/lib/bitcore/transaction/sighash.d.ts +32 -0
- package/dist/lib/bitcore/transaction/sighash.d.ts.map +1 -0
- package/dist/lib/bitcore/transaction/sighash.js +335 -0
- package/dist/lib/bitcore/transaction/signature.d.ts +36 -0
- package/dist/lib/bitcore/transaction/signature.d.ts.map +1 -0
- package/dist/lib/bitcore/transaction/signature.js +130 -0
- package/dist/lib/bitcore/transaction/transaction.d.ts +164 -0
- package/dist/lib/bitcore/transaction/transaction.d.ts.map +1 -0
- package/dist/lib/bitcore/transaction/transaction.js +1016 -0
- package/dist/lib/bitcore/transaction/unspentoutput.d.ts +58 -0
- package/dist/lib/bitcore/transaction/unspentoutput.d.ts.map +1 -0
- package/dist/lib/bitcore/transaction/unspentoutput.js +167 -0
- package/dist/lib/bitcore/unit.d.ts +44 -0
- package/dist/lib/bitcore/unit.d.ts.map +1 -0
- package/dist/lib/bitcore/unit.js +106 -0
- package/dist/lib/bitcore/uri.d.ts +29 -0
- package/dist/lib/bitcore/uri.d.ts.map +1 -0
- package/dist/lib/bitcore/uri.js +163 -0
- package/dist/lib/bitcore/util/base32.d.ts +5 -0
- package/dist/lib/bitcore/util/base32.d.ts.map +1 -0
- package/dist/lib/bitcore/util/base32.js +58 -0
- package/dist/lib/bitcore/util/buffer.d.ts +18 -0
- package/dist/lib/bitcore/util/buffer.d.ts.map +1 -0
- package/dist/lib/bitcore/util/buffer.js +76 -0
- package/dist/lib/bitcore/util/convertBits.d.ts +2 -0
- package/dist/lib/bitcore/util/convertBits.d.ts.map +1 -0
- package/dist/lib/bitcore/util/convertBits.js +26 -0
- package/dist/lib/bitcore/util/js.d.ts +9 -0
- package/dist/lib/bitcore/util/js.d.ts.map +1 -0
- package/dist/lib/bitcore/util/js.js +45 -0
- package/dist/lib/bitcore/util/preconditions.d.ts +6 -0
- package/dist/lib/bitcore/util/preconditions.d.ts.map +1 -0
- package/dist/lib/bitcore/util/preconditions.js +31 -0
- package/dist/lib/bitcore/util.d.ts +14 -0
- package/dist/lib/bitcore/util.d.ts.map +1 -0
- package/dist/lib/bitcore/util.js +13 -0
- package/dist/lib/bitcore/xaddress.d.ts +45 -0
- package/dist/lib/bitcore/xaddress.d.ts.map +1 -0
- package/dist/lib/bitcore/xaddress.js +279 -0
- package/dist/lib/rank/api.d.ts +75 -0
- package/dist/lib/rank/api.d.ts.map +1 -0
- package/dist/lib/rank/api.js +4 -0
- package/dist/lib/rank/index.d.ts +127 -0
- package/dist/lib/rank/index.d.ts.map +1 -0
- package/dist/lib/rank/index.js +421 -0
- package/dist/lib/rank/opcode.d.ts +23 -0
- package/dist/lib/rank/opcode.d.ts.map +1 -0
- package/dist/lib/rank/opcode.js +23 -0
- package/dist/lib/rank/script.d.ts +2 -0
- package/dist/lib/rank/script.d.ts.map +1 -0
- package/dist/lib/rank/script.js +7 -0
- package/dist/lib/rank/transaction.d.ts +3 -0
- package/dist/lib/rank/transaction.d.ts.map +1 -0
- package/dist/lib/rank/transaction.js +12 -0
- package/dist/lib/rpc.d.ts +136 -0
- package/dist/lib/rpc.d.ts.map +1 -0
- package/dist/lib/rpc.js +62 -0
- package/dist/utils/constants.d.ts +18 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +20 -0
- package/dist/utils/env.d.ts +3 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/env.js +8 -0
- package/dist/utils/string.d.ts +11 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/string.js +47 -0
- package/dist/utils/types.d.ts +2 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +1 -0
- package/dist/utils/wallet.d.ts +12 -0
- package/dist/utils/wallet.d.ts.map +1 -0
- package/dist/utils/wallet.js +28 -0
- package/package.json +91 -0
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
import { BN } from './crypto/bn.js';
|
|
2
|
+
import { PrivateKey } from './privatekey.js';
|
|
3
|
+
import { PublicKey } from './publickey.js';
|
|
4
|
+
import { Point } from './crypto/point.js';
|
|
5
|
+
import { get as getNetwork, defaultNetwork, } from './networks.js';
|
|
6
|
+
import { Hash } from './crypto/hash.js';
|
|
7
|
+
import { Random } from './crypto/random.js';
|
|
8
|
+
import { Base58Check } from './encoding/base58check.js';
|
|
9
|
+
import { JSUtil } from './util/js.js';
|
|
10
|
+
import { Preconditions } from './util/preconditions.js';
|
|
11
|
+
import { HDPublicKey } from './hdpublickey.js';
|
|
12
|
+
export class HDPrivateKey {
|
|
13
|
+
privateKey;
|
|
14
|
+
network;
|
|
15
|
+
depth;
|
|
16
|
+
parentFingerPrint;
|
|
17
|
+
childIndex;
|
|
18
|
+
chainCode;
|
|
19
|
+
fingerPrint;
|
|
20
|
+
publicKey;
|
|
21
|
+
xprivkey;
|
|
22
|
+
_hdPublicKey;
|
|
23
|
+
_buffers;
|
|
24
|
+
static Hardened = 0x80000000;
|
|
25
|
+
static MaxIndex = 2 * HDPrivateKey.Hardened;
|
|
26
|
+
static RootElementAlias = ['m', 'M', "m'", "M'"];
|
|
27
|
+
constructor(data) {
|
|
28
|
+
if (data instanceof HDPrivateKey) {
|
|
29
|
+
return data;
|
|
30
|
+
}
|
|
31
|
+
if (data === undefined) {
|
|
32
|
+
data = HDPrivateKey._getRandomData();
|
|
33
|
+
}
|
|
34
|
+
const info = this._classifyArguments(data);
|
|
35
|
+
this._buildFromObject(info);
|
|
36
|
+
}
|
|
37
|
+
get hdPublicKey() {
|
|
38
|
+
return this._hdPublicKey;
|
|
39
|
+
}
|
|
40
|
+
get xpubkey() {
|
|
41
|
+
return this._hdPublicKey.xpubkey;
|
|
42
|
+
}
|
|
43
|
+
_classifyArguments(data) {
|
|
44
|
+
if (typeof data === 'string') {
|
|
45
|
+
return HDPrivateKey._transformString(data);
|
|
46
|
+
}
|
|
47
|
+
else if (Buffer.isBuffer(data)) {
|
|
48
|
+
const str = data.toString();
|
|
49
|
+
if (HDPrivateKey.isValidSerialized(str)) {
|
|
50
|
+
return HDPrivateKey._transformSerialized(str);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
return HDPrivateKey._transformBuffer(data);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else if (typeof data === 'object' && data !== null) {
|
|
57
|
+
if ('xprivkey' in data) {
|
|
58
|
+
return HDPrivateKey._transformObject(data);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
throw new Error('Invalid HDPrivateKey data');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
static _transformString(str) {
|
|
69
|
+
if (!JSUtil.isHexa(str)) {
|
|
70
|
+
return HDPrivateKey._transformSerialized(str);
|
|
71
|
+
}
|
|
72
|
+
return HDPrivateKey._transformBuffer(Buffer.from(str, 'hex'));
|
|
73
|
+
}
|
|
74
|
+
static _transformSerialized(str) {
|
|
75
|
+
const buf = Base58Check.decode(str);
|
|
76
|
+
return HDPrivateKey._transformBuffer(buf);
|
|
77
|
+
}
|
|
78
|
+
static _transformBuffer(buf) {
|
|
79
|
+
if (buf.length !== 78) {
|
|
80
|
+
throw new Error('Invalid HDPrivateKey buffer length');
|
|
81
|
+
}
|
|
82
|
+
const version = buf.readUInt32BE(0);
|
|
83
|
+
const network = getNetwork(version, 'xprivkey');
|
|
84
|
+
if (!network) {
|
|
85
|
+
throw new Error('Invalid HDPrivateKey network');
|
|
86
|
+
}
|
|
87
|
+
const depth = buf.readUInt8(4);
|
|
88
|
+
const parentFingerPrint = buf.subarray(5, 9);
|
|
89
|
+
const childIndex = buf.readUInt32BE(9);
|
|
90
|
+
const chainCode = buf.subarray(13, 45);
|
|
91
|
+
const privateKeyBuffer = buf.subarray(46, 78);
|
|
92
|
+
const compressed = buf[45] === 0x01;
|
|
93
|
+
return {
|
|
94
|
+
network,
|
|
95
|
+
depth,
|
|
96
|
+
parentFingerPrint,
|
|
97
|
+
childIndex,
|
|
98
|
+
chainCode,
|
|
99
|
+
privateKey: new PrivateKey({ buf: privateKeyBuffer, compressed }, network),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
static _transformObject(obj) {
|
|
103
|
+
const network = getNetwork(obj.network);
|
|
104
|
+
if (!network) {
|
|
105
|
+
throw new Error('Invalid network');
|
|
106
|
+
}
|
|
107
|
+
return {
|
|
108
|
+
network,
|
|
109
|
+
depth: obj.depth,
|
|
110
|
+
parentFingerPrint: Buffer.from(obj.parentFingerPrint, 'hex'),
|
|
111
|
+
childIndex: obj.childIndex,
|
|
112
|
+
chainCode: Buffer.from(obj.chainCode, 'hex'),
|
|
113
|
+
privateKey: new PrivateKey(obj.privateKey, network),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
static _getRandomData() {
|
|
117
|
+
const seed = Random.getRandomBuffer(64);
|
|
118
|
+
return HDPrivateKey._fromSeed(seed);
|
|
119
|
+
}
|
|
120
|
+
static _fromSeed(seed) {
|
|
121
|
+
const hash = Hash.sha512hmac(seed, Buffer.from('Bitcoin seed'));
|
|
122
|
+
const privateKeyBuffer = hash.subarray(0, 32);
|
|
123
|
+
const chainCode = hash.subarray(32, 64);
|
|
124
|
+
return {
|
|
125
|
+
network: defaultNetwork,
|
|
126
|
+
depth: 0,
|
|
127
|
+
parentFingerPrint: Buffer.alloc(4),
|
|
128
|
+
childIndex: 0,
|
|
129
|
+
chainCode,
|
|
130
|
+
privateKey: new PrivateKey(privateKeyBuffer, defaultNetwork),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
_buildFromObject(info) {
|
|
134
|
+
Preconditions.checkArgument(!!info.network, 'network', 'Network is required');
|
|
135
|
+
Preconditions.checkArgument(!!info.privateKey, 'privateKey', 'Private key is required');
|
|
136
|
+
Preconditions.checkArgument(!!info.chainCode, 'chainCode', 'Chain code is required');
|
|
137
|
+
const buffers = {
|
|
138
|
+
version: Buffer.alloc(4),
|
|
139
|
+
depth: Buffer.from([info.depth || 0]),
|
|
140
|
+
parentFingerPrint: info.parentFingerPrint || Buffer.alloc(4),
|
|
141
|
+
childIndex: Buffer.alloc(4),
|
|
142
|
+
chainCode: info.chainCode,
|
|
143
|
+
privateKey: info.privateKey.toBuffer(),
|
|
144
|
+
checksum: undefined,
|
|
145
|
+
};
|
|
146
|
+
buffers.version.writeUInt32BE(info.network.xprivkey, 0);
|
|
147
|
+
buffers.childIndex.writeUInt32BE(info.childIndex || 0, 0);
|
|
148
|
+
const version = info.network.xprivkey;
|
|
149
|
+
const depth = info.depth || 0;
|
|
150
|
+
const parentFingerPrint = info.parentFingerPrint || Buffer.alloc(4);
|
|
151
|
+
const childIndex = info.childIndex || 0;
|
|
152
|
+
const chainCode = info.chainCode;
|
|
153
|
+
const privateKeyBuffer = info.privateKey.toBuffer();
|
|
154
|
+
const buf = Buffer.alloc(78);
|
|
155
|
+
buf.writeUInt32BE(version, 0);
|
|
156
|
+
buf.writeUInt8(depth, 4);
|
|
157
|
+
parentFingerPrint.copy(buf, 5);
|
|
158
|
+
buf.writeUInt32BE(childIndex, 9);
|
|
159
|
+
chainCode.copy(buf, 13);
|
|
160
|
+
privateKeyBuffer.copy(buf, 46);
|
|
161
|
+
const xprivkey = Base58Check.encode(buf);
|
|
162
|
+
JSUtil.defineImmutable(this, {
|
|
163
|
+
network: info.network,
|
|
164
|
+
depth: info.depth || 0,
|
|
165
|
+
parentFingerPrint: info.parentFingerPrint || Buffer.alloc(4),
|
|
166
|
+
childIndex: info.childIndex || 0,
|
|
167
|
+
chainCode: info.chainCode,
|
|
168
|
+
privateKey: info.privateKey,
|
|
169
|
+
publicKey: PublicKey.fromPoint(info.privateKey.toPublicKey().point, true),
|
|
170
|
+
fingerPrint: Hash.sha256ripemd160(PublicKey.fromPoint(info.privateKey.toPublicKey().point, true).toBuffer()).subarray(0, 4),
|
|
171
|
+
xprivkey: xprivkey,
|
|
172
|
+
_buffers: buffers,
|
|
173
|
+
});
|
|
174
|
+
this._hdPublicKey = new HDPublicKey({
|
|
175
|
+
network: this.network,
|
|
176
|
+
depth: this.depth,
|
|
177
|
+
parentFingerPrint: this.parentFingerPrint,
|
|
178
|
+
childIndex: this.childIndex,
|
|
179
|
+
chainCode: this.chainCode,
|
|
180
|
+
publicKey: this.publicKey,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
isValidPath(arg, hardened) {
|
|
184
|
+
if (typeof arg === 'string') {
|
|
185
|
+
const indexes = HDPrivateKey._getDerivationIndexes(arg);
|
|
186
|
+
return indexes !== null && indexes.every(index => this.isValidPath(index));
|
|
187
|
+
}
|
|
188
|
+
if (typeof arg === 'number') {
|
|
189
|
+
if (arg < HDPrivateKey.Hardened && hardened === true) {
|
|
190
|
+
arg += HDPrivateKey.Hardened;
|
|
191
|
+
}
|
|
192
|
+
return arg >= 0 && arg < HDPrivateKey.MaxIndex;
|
|
193
|
+
}
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
static _getDerivationIndexes(path) {
|
|
197
|
+
const steps = path.split('/');
|
|
198
|
+
if (HDPrivateKey.RootElementAlias.includes(path)) {
|
|
199
|
+
return [];
|
|
200
|
+
}
|
|
201
|
+
if (!HDPrivateKey.RootElementAlias.includes(steps[0])) {
|
|
202
|
+
return null;
|
|
203
|
+
}
|
|
204
|
+
const indexes = steps.slice(1).map(step => {
|
|
205
|
+
const isHardened = step.slice(-1) === "'";
|
|
206
|
+
if (isHardened) {
|
|
207
|
+
step = step.slice(0, -1);
|
|
208
|
+
}
|
|
209
|
+
if (!step || step[0] === '-') {
|
|
210
|
+
return NaN;
|
|
211
|
+
}
|
|
212
|
+
let index = +step;
|
|
213
|
+
if (isHardened) {
|
|
214
|
+
index += HDPrivateKey.Hardened;
|
|
215
|
+
}
|
|
216
|
+
return index;
|
|
217
|
+
});
|
|
218
|
+
return indexes.some(isNaN) ? null : indexes;
|
|
219
|
+
}
|
|
220
|
+
static isValidSerialized(data, network) {
|
|
221
|
+
try {
|
|
222
|
+
HDPrivateKey._transformString(typeof data === 'string' ? data : data.toString('hex'));
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
catch (e) {
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
getSerializedError(data, network) {
|
|
230
|
+
try {
|
|
231
|
+
HDPrivateKey._transformString(typeof data === 'string' ? data : data.toString('hex'));
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
catch (e) {
|
|
235
|
+
return e;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
derive(arg, hardened) {
|
|
239
|
+
return this.deriveNonCompliantChild(arg, hardened);
|
|
240
|
+
}
|
|
241
|
+
_deriveFromString(path, nonCompliant) {
|
|
242
|
+
if (!this.isValidPath(path)) {
|
|
243
|
+
throw new Error('Invalid derivation path');
|
|
244
|
+
}
|
|
245
|
+
const indexes = HDPrivateKey._getDerivationIndexes(path);
|
|
246
|
+
if (indexes === null) {
|
|
247
|
+
throw new Error('Invalid derivation path');
|
|
248
|
+
}
|
|
249
|
+
return indexes.reduce((prev, index) => {
|
|
250
|
+
return prev._deriveWithNumber(index, undefined, nonCompliant);
|
|
251
|
+
}, this);
|
|
252
|
+
}
|
|
253
|
+
_deriveWithNumber(index, hardened, nonCompliant) {
|
|
254
|
+
if (!this.isValidPath(index, hardened)) {
|
|
255
|
+
throw new Error('Invalid derivation path');
|
|
256
|
+
}
|
|
257
|
+
hardened = index >= HDPrivateKey.Hardened ? true : hardened;
|
|
258
|
+
if (index < HDPrivateKey.Hardened && hardened === true) {
|
|
259
|
+
index += HDPrivateKey.Hardened;
|
|
260
|
+
}
|
|
261
|
+
const indexBuffer = Buffer.from([
|
|
262
|
+
index >> 24,
|
|
263
|
+
index >> 16,
|
|
264
|
+
index >> 8,
|
|
265
|
+
index,
|
|
266
|
+
]);
|
|
267
|
+
let data;
|
|
268
|
+
if (hardened && nonCompliant) {
|
|
269
|
+
const nonZeroPadded = this.privateKey.bn.toBuffer();
|
|
270
|
+
data = Buffer.concat([Buffer.from([0]), nonZeroPadded, indexBuffer]);
|
|
271
|
+
}
|
|
272
|
+
else if (hardened) {
|
|
273
|
+
const privateKeyBuffer = this.privateKey.bn.toBuffer({ size: 32 });
|
|
274
|
+
data = Buffer.concat([Buffer.from([0]), privateKeyBuffer, indexBuffer]);
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
data = Buffer.concat([this.publicKey.toBuffer(), indexBuffer]);
|
|
278
|
+
}
|
|
279
|
+
const hash = Hash.sha512hmac(data, this.chainCode);
|
|
280
|
+
const leftPart = BN.fromBuffer(hash.subarray(0, 32), { size: 32 });
|
|
281
|
+
const childChainCode = hash.subarray(32, 64);
|
|
282
|
+
const childPrivateKey = leftPart
|
|
283
|
+
.add(this.privateKey.toBigNumber())
|
|
284
|
+
.umod(Point.getN())
|
|
285
|
+
.toBuffer({ size: 32 });
|
|
286
|
+
if (!PrivateKey.isValid(childPrivateKey)) {
|
|
287
|
+
return this._deriveWithNumber(index + 1, undefined, nonCompliant);
|
|
288
|
+
}
|
|
289
|
+
return new HDPrivateKey({
|
|
290
|
+
network: this.network,
|
|
291
|
+
depth: this.depth + 1,
|
|
292
|
+
parentFingerPrint: Hash.sha256ripemd160(this.privateKey.toPublicKey().toBuffer()).subarray(0, 4),
|
|
293
|
+
childIndex: index,
|
|
294
|
+
chainCode: childChainCode,
|
|
295
|
+
privateKey: new PrivateKey({
|
|
296
|
+
bn: childPrivateKey.toString('hex'),
|
|
297
|
+
network: this.network.name,
|
|
298
|
+
compressed: this.privateKey.compressed,
|
|
299
|
+
}),
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
deriveChild(arg, hardened) {
|
|
303
|
+
if (typeof arg === 'string') {
|
|
304
|
+
return this._deriveFromString(arg, false);
|
|
305
|
+
}
|
|
306
|
+
else if (typeof arg === 'number') {
|
|
307
|
+
return this._deriveWithNumber(arg, hardened, false);
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
throw new Error('Invalid derivation argument');
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
deriveNonCompliantChild(arg, hardened) {
|
|
314
|
+
if (typeof arg === 'string') {
|
|
315
|
+
return this._deriveFromString(arg, true);
|
|
316
|
+
}
|
|
317
|
+
else if (typeof arg === 'number') {
|
|
318
|
+
return this._deriveWithNumber(arg, hardened, true);
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
throw new Error('Invalid derivation argument');
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
toString() {
|
|
325
|
+
return this.xprivkey;
|
|
326
|
+
}
|
|
327
|
+
toObject() {
|
|
328
|
+
return {
|
|
329
|
+
xprivkey: this.xprivkey,
|
|
330
|
+
network: this.network.toString(),
|
|
331
|
+
depth: this.depth,
|
|
332
|
+
parentFingerPrint: this.parentFingerPrint.toString('hex'),
|
|
333
|
+
childIndex: this.childIndex,
|
|
334
|
+
chainCode: this.chainCode.toString('hex'),
|
|
335
|
+
privateKey: this.privateKey.toString(),
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
toJSON() {
|
|
339
|
+
return this.toObject();
|
|
340
|
+
}
|
|
341
|
+
toBuffer() {
|
|
342
|
+
if (this._buffers.xprivkey) {
|
|
343
|
+
return this._buffers.xprivkey;
|
|
344
|
+
}
|
|
345
|
+
const version = this.network.xprivkey;
|
|
346
|
+
const depth = this.depth;
|
|
347
|
+
const parentFingerPrint = this.parentFingerPrint;
|
|
348
|
+
const childIndex = this.childIndex;
|
|
349
|
+
const chainCode = this.chainCode;
|
|
350
|
+
const privateKeyBuffer = this.privateKey.toBuffer();
|
|
351
|
+
const buf = Buffer.alloc(78);
|
|
352
|
+
buf.writeUInt32BE(version, 0);
|
|
353
|
+
buf.writeUInt8(depth, 4);
|
|
354
|
+
parentFingerPrint.copy(buf, 5);
|
|
355
|
+
buf.writeUInt32BE(childIndex, 9);
|
|
356
|
+
chainCode.copy(buf, 13);
|
|
357
|
+
privateKeyBuffer.copy(buf, 46);
|
|
358
|
+
this._buffers.xprivkey = buf;
|
|
359
|
+
return buf;
|
|
360
|
+
}
|
|
361
|
+
static fromBuffer(arg) {
|
|
362
|
+
return new HDPrivateKey(arg.toString('hex'));
|
|
363
|
+
}
|
|
364
|
+
static fromString(arg) {
|
|
365
|
+
return new HDPrivateKey(arg);
|
|
366
|
+
}
|
|
367
|
+
static fromObject(obj) {
|
|
368
|
+
return new HDPrivateKey(obj);
|
|
369
|
+
}
|
|
370
|
+
static fromSeed(hexa, network) {
|
|
371
|
+
const seed = typeof hexa === 'string' ? Buffer.from(hexa, 'hex') : hexa;
|
|
372
|
+
const data = HDPrivateKey._fromSeed(seed);
|
|
373
|
+
if (network) {
|
|
374
|
+
data.network = getNetwork(network) || defaultNetwork;
|
|
375
|
+
}
|
|
376
|
+
return new HDPrivateKey(data);
|
|
377
|
+
}
|
|
378
|
+
inspect() {
|
|
379
|
+
return `<HDPrivateKey: ${this.xprivkey}, network: ${this.network}>`;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { PublicKey } from './publickey.js';
|
|
2
|
+
import { HDPrivateKey } from './hdprivatekey.js';
|
|
3
|
+
import { Network } from './networks.js';
|
|
4
|
+
export interface HDPublicKeyData {
|
|
5
|
+
xpubkey?: string;
|
|
6
|
+
network?: Network;
|
|
7
|
+
depth?: number;
|
|
8
|
+
parentFingerPrint?: Buffer;
|
|
9
|
+
childIndex?: number;
|
|
10
|
+
chainCode?: Buffer;
|
|
11
|
+
publicKey?: PublicKey;
|
|
12
|
+
}
|
|
13
|
+
export interface HDPublicKeyObject {
|
|
14
|
+
xpubkey: string;
|
|
15
|
+
network: string;
|
|
16
|
+
depth: number;
|
|
17
|
+
fingerPrint: string;
|
|
18
|
+
parentFingerPrint: string;
|
|
19
|
+
childIndex: number;
|
|
20
|
+
chainCode: string;
|
|
21
|
+
publicKey: string;
|
|
22
|
+
}
|
|
23
|
+
export interface HDPublicKeyBuffers {
|
|
24
|
+
version: Buffer;
|
|
25
|
+
depth: Buffer;
|
|
26
|
+
parentFingerPrint: Buffer;
|
|
27
|
+
childIndex: Buffer;
|
|
28
|
+
chainCode: Buffer;
|
|
29
|
+
publicKey: Buffer;
|
|
30
|
+
checksum?: Buffer;
|
|
31
|
+
xpubkey?: Buffer;
|
|
32
|
+
privateKey?: Buffer;
|
|
33
|
+
xprivkey?: Buffer;
|
|
34
|
+
}
|
|
35
|
+
export declare class HDPublicKey {
|
|
36
|
+
readonly xpubkey: Buffer;
|
|
37
|
+
readonly network: Network;
|
|
38
|
+
readonly depth: number;
|
|
39
|
+
readonly publicKey: PublicKey;
|
|
40
|
+
readonly fingerPrint: Buffer;
|
|
41
|
+
readonly parentFingerPrint: Buffer;
|
|
42
|
+
readonly childIndex: number;
|
|
43
|
+
readonly chainCode: Buffer;
|
|
44
|
+
private _buffers;
|
|
45
|
+
static readonly Hardened = 2147483648;
|
|
46
|
+
static readonly RootElementAlias: string[];
|
|
47
|
+
static readonly VersionSize = 4;
|
|
48
|
+
static readonly DepthSize = 1;
|
|
49
|
+
static readonly ParentFingerPrintSize = 4;
|
|
50
|
+
static readonly ChildIndexSize = 4;
|
|
51
|
+
static readonly ChainCodeSize = 32;
|
|
52
|
+
static readonly PublicKeySize = 33;
|
|
53
|
+
static readonly CheckSumSize = 4;
|
|
54
|
+
static readonly DataSize = 78;
|
|
55
|
+
static readonly SerializedByteSize = 82;
|
|
56
|
+
static readonly VersionStart = 0;
|
|
57
|
+
static readonly VersionEnd: number;
|
|
58
|
+
static readonly DepthStart: number;
|
|
59
|
+
static readonly DepthEnd: number;
|
|
60
|
+
static readonly ParentFingerPrintStart: number;
|
|
61
|
+
static readonly ParentFingerPrintEnd: number;
|
|
62
|
+
static readonly ChildIndexStart: number;
|
|
63
|
+
static readonly ChildIndexEnd: number;
|
|
64
|
+
static readonly ChainCodeStart: number;
|
|
65
|
+
static readonly ChainCodeEnd: number;
|
|
66
|
+
static readonly PublicKeyStart: number;
|
|
67
|
+
static readonly PublicKeyEnd: number;
|
|
68
|
+
static readonly ChecksumStart: number;
|
|
69
|
+
static readonly ChecksumEnd: number;
|
|
70
|
+
constructor(arg: string | Buffer | HDPublicKeyData | HDPublicKeyObject | HDPrivateKey);
|
|
71
|
+
static isValidPath(arg: string | number): boolean;
|
|
72
|
+
static isValidSerialized(data: string | Buffer, network?: string | Network): boolean;
|
|
73
|
+
static getSerializedError(data: string | Buffer, network?: string | Network): Error | null;
|
|
74
|
+
private static _validateNetwork;
|
|
75
|
+
static fromString(arg: string): HDPublicKey;
|
|
76
|
+
static fromObject(arg: HDPublicKeyData | HDPublicKeyObject): HDPublicKey;
|
|
77
|
+
static fromBuffer(arg: Buffer): HDPublicKey;
|
|
78
|
+
private _classifyArguments;
|
|
79
|
+
private static _transformString;
|
|
80
|
+
private static _transformSerialized;
|
|
81
|
+
private static _transformBuffer;
|
|
82
|
+
private static _transformObject;
|
|
83
|
+
private _buildFromPrivate;
|
|
84
|
+
private _buildFromSerialized;
|
|
85
|
+
private _buildFromBuffers;
|
|
86
|
+
private static _validateBufferArguments;
|
|
87
|
+
private _buildFromObject;
|
|
88
|
+
derive(arg: string | number, hardened?: boolean): HDPublicKey;
|
|
89
|
+
deriveChild(arg: string | number, hardened?: boolean): HDPublicKey;
|
|
90
|
+
private _deriveWithNumber;
|
|
91
|
+
private _deriveFromString;
|
|
92
|
+
toString(): string;
|
|
93
|
+
toBuffer(): Buffer;
|
|
94
|
+
toObject(): HDPublicKeyObject;
|
|
95
|
+
toJSON(): string;
|
|
96
|
+
inspect(): string;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=hdpublickey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hdpublickey.d.ts","sourceRoot":"","sources":["../../../lib/bitcore/hdpublickey.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAqC,MAAM,eAAe,CAAA;AAQ1E,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,qB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