@pioneer-platform/pioneer-coins 9.0.0 → 9.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/paths.js +44 -29
- package/package.json +1 -1
package/lib/paths.js
CHANGED
|
@@ -7,14 +7,15 @@ function getPaths(blockchains, isTestnet) {
|
|
|
7
7
|
var output = [];
|
|
8
8
|
if (!blockchains)
|
|
9
9
|
blockchains = [];
|
|
10
|
-
if (blockchains.indexOf('bip122:000000000019d6689c085ae165831e93
|
|
10
|
+
if (blockchains.indexOf('bip122:000000000019d6689c085ae165831e93') >= 0) {
|
|
11
11
|
if (isTestnet) {
|
|
12
12
|
output.push({
|
|
13
13
|
note: "Bitcoin testnet account 0",
|
|
14
14
|
blockchain: 'bitcoin',
|
|
15
15
|
testnet: true,
|
|
16
16
|
symbol: 'BTC',
|
|
17
|
-
|
|
17
|
+
symbolSwapKit: 'BTC',
|
|
18
|
+
network: 'bip122:000000000019d6689c085ae165831e93',
|
|
18
19
|
script_type: "p2wpkh",
|
|
19
20
|
available_scripts_types: ['p2pkh', 'p2sh', 'p2wpkh', 'p2sh-p2wpkh'],
|
|
20
21
|
type: "zpub",
|
|
@@ -30,7 +31,8 @@ function getPaths(blockchains, isTestnet) {
|
|
|
30
31
|
note: "Bitcoin account 0",
|
|
31
32
|
blockchain: 'bitcoin',
|
|
32
33
|
symbol: 'BTC',
|
|
33
|
-
|
|
34
|
+
symbolSwapKit: 'BTC',
|
|
35
|
+
network: 'bip122:000000000019d6689c085ae165831e93',
|
|
34
36
|
script_type: "p2pkh",
|
|
35
37
|
available_scripts_types: ['p2pkh', 'p2sh', 'p2wpkh', 'p2sh-p2wpkh'],
|
|
36
38
|
type: "xpub",
|
|
@@ -45,7 +47,8 @@ function getPaths(blockchains, isTestnet) {
|
|
|
45
47
|
note: "Bitcoin account Native Segwit (Bech32)",
|
|
46
48
|
blockchain: 'bitcoin',
|
|
47
49
|
symbol: 'BTC',
|
|
48
|
-
|
|
50
|
+
symbolSwapKit: 'BTC',
|
|
51
|
+
network: 'bip122:000000000019d6689c085ae165831e93',
|
|
49
52
|
script_type: "p2wpkh",
|
|
50
53
|
available_scripts_types: ['p2pkh', 'p2sh', 'p2wpkh', 'p2sh-p2wpkh'],
|
|
51
54
|
type: "zpub",
|
|
@@ -56,11 +59,12 @@ function getPaths(blockchains, isTestnet) {
|
|
|
56
59
|
});
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
|
-
if (blockchains.indexOf('eip155:1
|
|
62
|
+
if (blockchains.indexOf('eip155:1') >= 0) {
|
|
60
63
|
var entry = {
|
|
61
64
|
note: " ETH primary (default)",
|
|
62
65
|
symbol: 'ETH',
|
|
63
|
-
|
|
66
|
+
symbolSwapKit: 'ETH',
|
|
67
|
+
network: 'eip155:1',
|
|
64
68
|
script_type: "ethereum",
|
|
65
69
|
available_scripts_types: ['ethereum'],
|
|
66
70
|
type: "address",
|
|
@@ -74,11 +78,12 @@ function getPaths(blockchains, isTestnet) {
|
|
|
74
78
|
entry.testnet = true;
|
|
75
79
|
output.push(entry);
|
|
76
80
|
}
|
|
77
|
-
if (blockchains.indexOf('eip155:43114
|
|
81
|
+
if (blockchains.indexOf('eip155:43114') >= 0) {
|
|
78
82
|
var entry = {
|
|
79
83
|
note: " AVAX primary (default)",
|
|
80
84
|
symbol: 'AVAX',
|
|
81
|
-
|
|
85
|
+
symbolSwapKit: 'AVAX',
|
|
86
|
+
network: 'eip155:43114',
|
|
82
87
|
script_type: "avalanche",
|
|
83
88
|
available_scripts_types: ['avalanche'],
|
|
84
89
|
type: "address",
|
|
@@ -92,7 +97,7 @@ function getPaths(blockchains, isTestnet) {
|
|
|
92
97
|
entry.testnet = true;
|
|
93
98
|
output.push(entry);
|
|
94
99
|
}
|
|
95
|
-
if (blockchains.indexOf('cosmos:thorchain-mainnet-v1
|
|
100
|
+
if (blockchains.indexOf('cosmos:thorchain-mainnet-v1') >= 0) {
|
|
96
101
|
var entry = {
|
|
97
102
|
note: " Default RUNE path ",
|
|
98
103
|
type: "address",
|
|
@@ -103,32 +108,34 @@ function getPaths(blockchains, isTestnet) {
|
|
|
103
108
|
showDisplay: false,
|
|
104
109
|
blockchain: 'thorchain',
|
|
105
110
|
symbol: 'RUNE',
|
|
106
|
-
|
|
111
|
+
symbolSwapKit: 'RUNE',
|
|
112
|
+
network: 'cosmos:thorchain-mainnet-v1',
|
|
107
113
|
};
|
|
108
114
|
if (isTestnet) {
|
|
109
115
|
entry.testnet = true;
|
|
110
116
|
}
|
|
111
117
|
output.push(entry);
|
|
112
118
|
}
|
|
113
|
-
if (blockchains.indexOf('cosmos:secret-mainnet-v1
|
|
119
|
+
if (blockchains.indexOf('cosmos:secret-mainnet-v1') >= 0) {
|
|
114
120
|
var entry = {
|
|
115
121
|
note: " Default Secret path ",
|
|
116
122
|
type: "address",
|
|
117
123
|
addressNList: [0x80000000 + 44, 0x80000000 + 931, 0x80000000 + 0, 0, 0],
|
|
118
124
|
addressNListMaster: [0x80000000 + 44, 0x80000000 + 931, 0x80000000 + 0, 0, 0],
|
|
119
125
|
curve: 'secp256k1',
|
|
120
|
-
script_type: "
|
|
126
|
+
script_type: "secret",
|
|
121
127
|
showDisplay: false,
|
|
122
|
-
blockchain: '
|
|
128
|
+
blockchain: 'secret',
|
|
123
129
|
symbol: 'SCRT',
|
|
124
|
-
|
|
130
|
+
symbolSwapKit: 'SCRT',
|
|
131
|
+
network: 'cosmos:secret-mainnet-v1',
|
|
125
132
|
};
|
|
126
133
|
if (isTestnet) {
|
|
127
134
|
entry.testnet = true;
|
|
128
135
|
}
|
|
129
136
|
output.push(entry);
|
|
130
137
|
}
|
|
131
|
-
if (blockchains.indexOf('cosmos:cosmoshub-4
|
|
138
|
+
if (blockchains.indexOf('cosmos:cosmoshub-4') >= 0) {
|
|
132
139
|
var entry = {
|
|
133
140
|
note: " Default ATOM path ",
|
|
134
141
|
type: "address",
|
|
@@ -140,14 +147,15 @@ function getPaths(blockchains, isTestnet) {
|
|
|
140
147
|
showDisplay: false,
|
|
141
148
|
blockchain: 'cosmos',
|
|
142
149
|
symbol: 'ATOM',
|
|
143
|
-
|
|
150
|
+
symbolSwapKit: 'GAIA',
|
|
151
|
+
network: 'cosmos:cosmoshub-4',
|
|
144
152
|
};
|
|
145
153
|
if (isTestnet) {
|
|
146
154
|
entry.testnet = true;
|
|
147
155
|
}
|
|
148
156
|
output.push(entry);
|
|
149
157
|
}
|
|
150
|
-
if (blockchains.indexOf('cosmos:osmosis-1
|
|
158
|
+
if (blockchains.indexOf('cosmos:osmosis-1') >= 0) {
|
|
151
159
|
var entry = {
|
|
152
160
|
note: " Default OSMO path ",
|
|
153
161
|
type: "address",
|
|
@@ -159,14 +167,15 @@ function getPaths(blockchains, isTestnet) {
|
|
|
159
167
|
showDisplay: false,
|
|
160
168
|
blockchain: 'osmosis',
|
|
161
169
|
symbol: 'OSMO',
|
|
162
|
-
|
|
170
|
+
symbolSwapKit: 'OSMO',
|
|
171
|
+
network: 'cosmos:osmosis-1',
|
|
163
172
|
};
|
|
164
173
|
if (isTestnet) {
|
|
165
174
|
entry.testnet = true;
|
|
166
175
|
}
|
|
167
176
|
output.push(entry);
|
|
168
177
|
}
|
|
169
|
-
if (blockchains.indexOf('binance:bnb-beacon-chain
|
|
178
|
+
if (blockchains.indexOf('binance:bnb-beacon-chain') >= 0) {
|
|
170
179
|
var entry = {
|
|
171
180
|
note: "Binance default path",
|
|
172
181
|
type: "address",
|
|
@@ -178,14 +187,15 @@ function getPaths(blockchains, isTestnet) {
|
|
|
178
187
|
showDisplay: false,
|
|
179
188
|
blockchain: 'binance',
|
|
180
189
|
symbol: 'BNB',
|
|
181
|
-
|
|
190
|
+
symbolSwapKit: 'BNB',
|
|
191
|
+
network: 'binance:bnb-beacon-chain',
|
|
182
192
|
};
|
|
183
193
|
if (isTestnet) {
|
|
184
194
|
entry.testnet = true;
|
|
185
195
|
}
|
|
186
196
|
output.push(entry);
|
|
187
197
|
}
|
|
188
|
-
if (blockchains.indexOf('bip122:000000000000000000651ef99cb9fcbe
|
|
198
|
+
if (blockchains.indexOf('bip122:000000000000000000651ef99cb9fcbe') >= 0) {
|
|
189
199
|
var entry = {
|
|
190
200
|
note: "Bitcoin Cash Default path",
|
|
191
201
|
type: "xpub",
|
|
@@ -197,14 +207,15 @@ function getPaths(blockchains, isTestnet) {
|
|
|
197
207
|
showDisplay: false,
|
|
198
208
|
blockchain: 'bitcoincash',
|
|
199
209
|
symbol: 'BCH',
|
|
200
|
-
|
|
210
|
+
symbolSwapKit: 'BCH',
|
|
211
|
+
network: 'bip122:000000000000000000651ef99cb9fcbe',
|
|
201
212
|
};
|
|
202
213
|
if (isTestnet) {
|
|
203
214
|
entry.testnet = true;
|
|
204
215
|
}
|
|
205
216
|
output.push(entry);
|
|
206
217
|
}
|
|
207
|
-
if (blockchains.indexOf('bip122:12a765e31ffd4059bada1e25190f6e98
|
|
218
|
+
if (blockchains.indexOf('bip122:12a765e31ffd4059bada1e25190f6e98') >= 0) {
|
|
208
219
|
var entry = {
|
|
209
220
|
note: "Litecoin Default path",
|
|
210
221
|
type: "xpub",
|
|
@@ -216,7 +227,8 @@ function getPaths(blockchains, isTestnet) {
|
|
|
216
227
|
showDisplay: false,
|
|
217
228
|
blockchain: 'litecoin',
|
|
218
229
|
symbol: 'LTC',
|
|
219
|
-
|
|
230
|
+
symbolSwapKit: 'LTC',
|
|
231
|
+
network: 'bip122:12a765e31ffd4059bada1e25190f6e98',
|
|
220
232
|
};
|
|
221
233
|
if (isTestnet) {
|
|
222
234
|
entry.testnet = true;
|
|
@@ -227,7 +239,8 @@ function getPaths(blockchains, isTestnet) {
|
|
|
227
239
|
note: "Litecoin account Native Segwit (Bech32)",
|
|
228
240
|
blockchain: 'litecoin',
|
|
229
241
|
symbol: 'LTC',
|
|
230
|
-
|
|
242
|
+
symbolSwapKit: 'LTC',
|
|
243
|
+
network: 'bip122:12a765e31ffd4059bada1e25190f6e98',
|
|
231
244
|
script_type: "p2wpkh",
|
|
232
245
|
available_scripts_types: ['p2pkh', 'p2sh', 'p2wpkh', 'p2sh-p2wpkh'],
|
|
233
246
|
type: "zpub",
|
|
@@ -238,7 +251,7 @@ function getPaths(blockchains, isTestnet) {
|
|
|
238
251
|
});
|
|
239
252
|
output.push(entry);
|
|
240
253
|
}
|
|
241
|
-
if (blockchains.indexOf('bip122:00000000001a91e3dace36e2be3bf030
|
|
254
|
+
if (blockchains.indexOf('bip122:00000000001a91e3dace36e2be3bf030') >= 0) {
|
|
242
255
|
var entry = {
|
|
243
256
|
note: "Dogecoin Default path",
|
|
244
257
|
type: "xpub",
|
|
@@ -250,20 +263,22 @@ function getPaths(blockchains, isTestnet) {
|
|
|
250
263
|
showDisplay: false,
|
|
251
264
|
blockchain: 'dogecoin',
|
|
252
265
|
symbol: 'DOGE',
|
|
253
|
-
|
|
266
|
+
symbolSwapKit: 'DOGE',
|
|
267
|
+
network: 'bip122:00000000001a91e3dace36e2be3bf030',
|
|
254
268
|
};
|
|
255
269
|
if (isTestnet) {
|
|
256
270
|
entry.testnet = true;
|
|
257
271
|
}
|
|
258
272
|
output.push(entry);
|
|
259
273
|
}
|
|
260
|
-
if (blockchains.indexOf('bip122:dash-hash
|
|
274
|
+
if (blockchains.indexOf('bip122:dash-hash') >= 0) {
|
|
261
275
|
var entry = {
|
|
262
276
|
note: "Default dash path",
|
|
263
277
|
type: "xpub",
|
|
264
278
|
coin: 'Dash',
|
|
265
279
|
symbol: 'DASH',
|
|
266
|
-
|
|
280
|
+
symbolSwapKit: 'DASH',
|
|
281
|
+
network: 'bip122:dash-hash',
|
|
267
282
|
blockchain: 'dash',
|
|
268
283
|
script_type: "p2pkh",
|
|
269
284
|
available_scripts_types: ['p2pkh'],
|