@pioneer-platform/pioneer-coins 9.0.1 → 9.0.3

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.
Files changed (2) hide show
  1. package/lib/paths.js +51 -28
  2. package/package.json +1 -1
package/lib/paths.js CHANGED
@@ -2,12 +2,35 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPaths = exports.blockchains = void 0;
4
4
  var log = require('@pioneer-platform/loggerdog')();
5
- exports.blockchains = ['bitcoin', 'ethereum', 'thorchain', 'bitcoincash', 'litecoin', 'binance', 'cosmos', 'dogecoin', 'osmosis'];
5
+ exports.blockchains = [
6
+ 'eip155:42161',
7
+ 'eip155:43114',
8
+ 'eip155:56',
9
+ 'binance:bnb-beacon-chain',
10
+ 'bip122:000000000000000000651ef99cb9fcbe',
11
+ 'bip122:000000000019d6689c085ae165831e93',
12
+ 'eip155:8453',
13
+ 'cosmos:cosmoshub-4',
14
+ 'bip122:dash-hash',
15
+ 'bip122:digibytes-hash',
16
+ 'bip122:00000000001a91e3dace36e2be3bf030',
17
+ 'cosmos:kaiyo-1',
18
+ 'eos:cf057bbfb72640471fd910bcb67639c2',
19
+ 'eip155:1',
20
+ 'bip122:12a765e31ffd4059bada1e25190f6e98',
21
+ 'cosmos:maya-mainnet-v1',
22
+ 'eip155:10',
23
+ 'cosmos:osmosis-1',
24
+ 'eip155:137',
25
+ 'ripple:unknown',
26
+ 'cosmos:thorchain-mainnet-v1',
27
+ 'bip122:0000000000196a45'
28
+ ];
6
29
  function getPaths(blockchains, isTestnet) {
7
30
  var output = [];
8
31
  if (!blockchains)
9
32
  blockchains = [];
10
- if (blockchains.indexOf('bip122:000000000019d6689c085ae165831e93/slip44:0') >= 0) {
33
+ if (blockchains.indexOf('bip122:000000000019d6689c085ae165831e93') >= 0) {
11
34
  if (isTestnet) {
12
35
  output.push({
13
36
  note: "Bitcoin testnet account 0",
@@ -15,7 +38,7 @@ function getPaths(blockchains, isTestnet) {
15
38
  testnet: true,
16
39
  symbol: 'BTC',
17
40
  symbolSwapKit: 'BTC',
18
- network: 'bip122:000000000019d6689c085ae165831e93/slip44:0',
41
+ network: 'bip122:000000000019d6689c085ae165831e93',
19
42
  script_type: "p2wpkh",
20
43
  available_scripts_types: ['p2pkh', 'p2sh', 'p2wpkh', 'p2sh-p2wpkh'],
21
44
  type: "zpub",
@@ -32,7 +55,7 @@ function getPaths(blockchains, isTestnet) {
32
55
  blockchain: 'bitcoin',
33
56
  symbol: 'BTC',
34
57
  symbolSwapKit: 'BTC',
35
- network: 'bip122:000000000019d6689c085ae165831e93/slip44:0',
58
+ network: 'bip122:000000000019d6689c085ae165831e93',
36
59
  script_type: "p2pkh",
37
60
  available_scripts_types: ['p2pkh', 'p2sh', 'p2wpkh', 'p2sh-p2wpkh'],
38
61
  type: "xpub",
@@ -48,7 +71,7 @@ function getPaths(blockchains, isTestnet) {
48
71
  blockchain: 'bitcoin',
49
72
  symbol: 'BTC',
50
73
  symbolSwapKit: 'BTC',
51
- network: 'bip122:000000000019d6689c085ae165831e93/slip44:0',
74
+ network: 'bip122:000000000019d6689c085ae165831e93',
52
75
  script_type: "p2wpkh",
53
76
  available_scripts_types: ['p2pkh', 'p2sh', 'p2wpkh', 'p2sh-p2wpkh'],
54
77
  type: "zpub",
@@ -59,12 +82,12 @@ function getPaths(blockchains, isTestnet) {
59
82
  });
60
83
  }
61
84
  }
62
- if (blockchains.indexOf('eip155:1/slip44:60') >= 0) {
85
+ if (blockchains.indexOf('eip155:1') >= 0) {
63
86
  var entry = {
64
87
  note: " ETH primary (default)",
65
88
  symbol: 'ETH',
66
89
  symbolSwapKit: 'ETH',
67
- network: 'eip155:1/slip44:60',
90
+ network: 'eip155:1',
68
91
  script_type: "ethereum",
69
92
  available_scripts_types: ['ethereum'],
70
93
  type: "address",
@@ -78,12 +101,12 @@ function getPaths(blockchains, isTestnet) {
78
101
  entry.testnet = true;
79
102
  output.push(entry);
80
103
  }
81
- if (blockchains.indexOf('eip155:43114/slip44:60') >= 0) {
104
+ if (blockchains.indexOf('eip155:43114') >= 0) {
82
105
  var entry = {
83
106
  note: " AVAX primary (default)",
84
107
  symbol: 'AVAX',
85
108
  symbolSwapKit: 'AVAX',
86
- network: 'eip155:43114/slip44:60',
109
+ network: 'eip155:43114',
87
110
  script_type: "avalanche",
88
111
  available_scripts_types: ['avalanche'],
89
112
  type: "address",
@@ -97,7 +120,7 @@ function getPaths(blockchains, isTestnet) {
97
120
  entry.testnet = true;
98
121
  output.push(entry);
99
122
  }
100
- if (blockchains.indexOf('cosmos:thorchain-mainnet-v1/slip44:931') >= 0) {
123
+ if (blockchains.indexOf('cosmos:thorchain-mainnet-v1') >= 0) {
101
124
  var entry = {
102
125
  note: " Default RUNE path ",
103
126
  type: "address",
@@ -109,14 +132,14 @@ function getPaths(blockchains, isTestnet) {
109
132
  blockchain: 'thorchain',
110
133
  symbol: 'RUNE',
111
134
  symbolSwapKit: 'RUNE',
112
- network: 'cosmos:thorchain-mainnet-v1/slip44:931',
135
+ network: 'cosmos:thorchain-mainnet-v1',
113
136
  };
114
137
  if (isTestnet) {
115
138
  entry.testnet = true;
116
139
  }
117
140
  output.push(entry);
118
141
  }
119
- if (blockchains.indexOf('cosmos:secret-mainnet-v1/slip44:118') >= 0) {
142
+ if (blockchains.indexOf('cosmos:secret-mainnet-v1') >= 0) {
120
143
  var entry = {
121
144
  note: " Default Secret path ",
122
145
  type: "address",
@@ -128,14 +151,14 @@ function getPaths(blockchains, isTestnet) {
128
151
  blockchain: 'secret',
129
152
  symbol: 'SCRT',
130
153
  symbolSwapKit: 'SCRT',
131
- network: 'cosmos:secret-mainnet-v1/slip44:118',
154
+ network: 'cosmos:secret-mainnet-v1',
132
155
  };
133
156
  if (isTestnet) {
134
157
  entry.testnet = true;
135
158
  }
136
159
  output.push(entry);
137
160
  }
138
- if (blockchains.indexOf('cosmos:cosmoshub-4/slip44:118') >= 0) {
161
+ if (blockchains.indexOf('cosmos:cosmoshub-4') >= 0) {
139
162
  var entry = {
140
163
  note: " Default ATOM path ",
141
164
  type: "address",
@@ -148,14 +171,14 @@ function getPaths(blockchains, isTestnet) {
148
171
  blockchain: 'cosmos',
149
172
  symbol: 'ATOM',
150
173
  symbolSwapKit: 'GAIA',
151
- network: 'cosmos:cosmoshub-4/slip44:118',
174
+ network: 'cosmos:cosmoshub-4',
152
175
  };
153
176
  if (isTestnet) {
154
177
  entry.testnet = true;
155
178
  }
156
179
  output.push(entry);
157
180
  }
158
- if (blockchains.indexOf('cosmos:osmosis-1/slip44:118') >= 0) {
181
+ if (blockchains.indexOf('cosmos:osmosis-1') >= 0) {
159
182
  var entry = {
160
183
  note: " Default OSMO path ",
161
184
  type: "address",
@@ -168,14 +191,14 @@ function getPaths(blockchains, isTestnet) {
168
191
  blockchain: 'osmosis',
169
192
  symbol: 'OSMO',
170
193
  symbolSwapKit: 'OSMO',
171
- network: 'cosmos:osmosis-1/slip44:118',
194
+ network: 'cosmos:osmosis-1',
172
195
  };
173
196
  if (isTestnet) {
174
197
  entry.testnet = true;
175
198
  }
176
199
  output.push(entry);
177
200
  }
178
- if (blockchains.indexOf('binance:bnb-beacon-chain/slip44:118') >= 0) {
201
+ if (blockchains.indexOf('binance:bnb-beacon-chain') >= 0) {
179
202
  var entry = {
180
203
  note: "Binance default path",
181
204
  type: "address",
@@ -188,14 +211,14 @@ function getPaths(blockchains, isTestnet) {
188
211
  blockchain: 'binance',
189
212
  symbol: 'BNB',
190
213
  symbolSwapKit: 'BNB',
191
- network: 'binance:bnb-beacon-chain/slip44:118',
214
+ network: 'binance:bnb-beacon-chain',
192
215
  };
193
216
  if (isTestnet) {
194
217
  entry.testnet = true;
195
218
  }
196
219
  output.push(entry);
197
220
  }
198
- if (blockchains.indexOf('bip122:000000000000000000651ef99cb9fcbe/slip44:145') >= 0) {
221
+ if (blockchains.indexOf('bip122:000000000000000000651ef99cb9fcbe') >= 0) {
199
222
  var entry = {
200
223
  note: "Bitcoin Cash Default path",
201
224
  type: "xpub",
@@ -208,14 +231,14 @@ function getPaths(blockchains, isTestnet) {
208
231
  blockchain: 'bitcoincash',
209
232
  symbol: 'BCH',
210
233
  symbolSwapKit: 'BCH',
211
- network: 'bip122:000000000000000000651ef99cb9fcbe/slip44:145',
234
+ network: 'bip122:000000000000000000651ef99cb9fcbe',
212
235
  };
213
236
  if (isTestnet) {
214
237
  entry.testnet = true;
215
238
  }
216
239
  output.push(entry);
217
240
  }
218
- if (blockchains.indexOf('bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2') >= 0) {
241
+ if (blockchains.indexOf('bip122:12a765e31ffd4059bada1e25190f6e98') >= 0) {
219
242
  var entry = {
220
243
  note: "Litecoin Default path",
221
244
  type: "xpub",
@@ -228,7 +251,7 @@ function getPaths(blockchains, isTestnet) {
228
251
  blockchain: 'litecoin',
229
252
  symbol: 'LTC',
230
253
  symbolSwapKit: 'LTC',
231
- network: 'bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2',
254
+ network: 'bip122:12a765e31ffd4059bada1e25190f6e98',
232
255
  };
233
256
  if (isTestnet) {
234
257
  entry.testnet = true;
@@ -240,7 +263,7 @@ function getPaths(blockchains, isTestnet) {
240
263
  blockchain: 'litecoin',
241
264
  symbol: 'LTC',
242
265
  symbolSwapKit: 'LTC',
243
- network: 'bip122:12a765e31ffd4059bada1e25190f6e98/slip44:2',
266
+ network: 'bip122:12a765e31ffd4059bada1e25190f6e98',
244
267
  script_type: "p2wpkh",
245
268
  available_scripts_types: ['p2pkh', 'p2sh', 'p2wpkh', 'p2sh-p2wpkh'],
246
269
  type: "zpub",
@@ -251,7 +274,7 @@ function getPaths(blockchains, isTestnet) {
251
274
  });
252
275
  output.push(entry);
253
276
  }
254
- if (blockchains.indexOf('bip122:00000000001a91e3dace36e2be3bf030/slip44:3') >= 0) {
277
+ if (blockchains.indexOf('bip122:00000000001a91e3dace36e2be3bf030') >= 0) {
255
278
  var entry = {
256
279
  note: "Dogecoin Default path",
257
280
  type: "xpub",
@@ -264,21 +287,21 @@ function getPaths(blockchains, isTestnet) {
264
287
  blockchain: 'dogecoin',
265
288
  symbol: 'DOGE',
266
289
  symbolSwapKit: 'DOGE',
267
- network: 'bip122:00000000001a91e3dace36e2be3bf030/slip44:3',
290
+ network: 'bip122:00000000001a91e3dace36e2be3bf030',
268
291
  };
269
292
  if (isTestnet) {
270
293
  entry.testnet = true;
271
294
  }
272
295
  output.push(entry);
273
296
  }
274
- if (blockchains.indexOf('bip122:dash-hash/slip44:5') >= 0) {
297
+ if (blockchains.indexOf('bip122:dash-hash') >= 0) {
275
298
  var entry = {
276
299
  note: "Default dash path",
277
300
  type: "xpub",
278
301
  coin: 'Dash',
279
302
  symbol: 'DASH',
280
303
  symbolSwapKit: 'DASH',
281
- network: 'bip122:dash-hash/slip44:5',
304
+ network: 'bip122:dash-hash',
282
305
  blockchain: 'dash',
283
306
  script_type: "p2pkh",
284
307
  available_scripts_types: ['p2pkh'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/pioneer-coins",
3
- "version": "9.0.1",
3
+ "version": "9.0.3",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/main.d.ts",
6
6
  "_moduleAliases": {