@ledgerhq/live-common 21.12.0 → 21.13.2-btcjs.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.
Files changed (52) hide show
  1. package/lib/__tests__/currencies.js +2 -0
  2. package/lib/__tests__/currencies.js.map +1 -1
  3. package/lib/api/explorerConfig/index.d.ts.map +1 -1
  4. package/lib/api/explorerConfig/index.js +7 -8
  5. package/lib/api/explorerConfig/index.js.map +1 -1
  6. package/lib/env.js +1 -1
  7. package/lib/env.js.map +1 -1
  8. package/lib/families/bitcoin/js-synchronisation.js +2 -2
  9. package/lib/families/bitcoin/js-synchronisation.js.map +1 -1
  10. package/lib/families/bitcoin/specs.js +2 -1
  11. package/lib/families/bitcoin/specs.js.map +1 -1
  12. package/lib/families/bitcoin/speculos-deviceActions.d.ts.map +1 -1
  13. package/lib/families/bitcoin/speculos-deviceActions.js +4 -0
  14. package/lib/families/bitcoin/speculos-deviceActions.js.map +1 -1
  15. package/lib/families/bitcoin/wallet-btc/crypto/base.d.ts +3 -0
  16. package/lib/families/bitcoin/wallet-btc/crypto/base.d.ts.map +1 -1
  17. package/lib/families/bitcoin/wallet-btc/crypto/base.js +32 -5
  18. package/lib/families/bitcoin/wallet-btc/crypto/base.js.map +1 -1
  19. package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.d.ts.map +1 -1
  20. package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.js +7 -2
  21. package/lib/families/bitcoin/wallet-btc/crypto/bitcoin.js.map +1 -1
  22. package/lib/families/bitcoin/wallet-btc/explorer/index.d.ts.map +1 -1
  23. package/lib/families/bitcoin/wallet-btc/explorer/index.js +0 -3
  24. package/lib/families/bitcoin/wallet-btc/explorer/index.js.map +1 -1
  25. package/lib/families/bitcoin/wallet-btc/xpub.d.ts +2 -6
  26. package/lib/families/bitcoin/wallet-btc/xpub.d.ts.map +1 -1
  27. package/lib/families/bitcoin/wallet-btc/xpub.js +62 -52
  28. package/lib/families/bitcoin/wallet-btc/xpub.js.map +1 -1
  29. package/lib/families/elrond/test-dataset.js +2 -2
  30. package/lib/families/elrond/test-dataset.js.map +1 -1
  31. package/lib/families/ethereum/specs.d.ts +1 -0
  32. package/lib/families/ethereum/specs.d.ts.map +1 -1
  33. package/lib/families/ethereum/specs.js +41 -0
  34. package/lib/families/ethereum/specs.js.map +1 -1
  35. package/lib/families/polkadot/js-buildTransaction.d.ts +7 -7
  36. package/lib/generated/specs.d.ts +1 -0
  37. package/lib/generated/specs.d.ts.map +1 -1
  38. package/package.json +8 -8
  39. package/src/__tests__/__snapshots__/all.libcore.ts.snap +181461 -0
  40. package/src/__tests__/currencies.ts +2 -0
  41. package/src/api/explorerConfig/index.ts +7 -8
  42. package/src/currencies/__snapshots__/sortByMarketcap.test.ts.snap +229 -2
  43. package/src/env.ts +1 -1
  44. package/src/families/bitcoin/js-synchronisation.ts +2 -2
  45. package/src/families/bitcoin/specs.ts +1 -1
  46. package/src/families/bitcoin/speculos-deviceActions.ts +4 -0
  47. package/src/families/bitcoin/wallet-btc/crypto/base.ts +35 -5
  48. package/src/families/bitcoin/wallet-btc/crypto/bitcoin.ts +9 -2
  49. package/src/families/bitcoin/wallet-btc/explorer/index.ts +0 -5
  50. package/src/families/bitcoin/wallet-btc/xpub.ts +37 -53
  51. package/src/families/elrond/test-dataset.ts +1 -1
  52. package/src/families/ethereum/specs.ts +47 -0
@@ -69,6 +69,8 @@ test("sort by marketcap", () => {
69
69
  "ethereum/erc20/xstable.protocol",
70
70
  "ethereum/erc20/hydro_protocol",
71
71
  "ethereum/erc20/xensor",
72
+ "polygon/erc20/holotoken",
73
+ "polygon/erc20/zrx",
72
74
  ]);
73
75
  });
74
76
  test("can format a currency unit", () => {
@@ -82,10 +82,6 @@ const initialExplorerConfig: FullConfig = {
82
82
  komodo: {
83
83
  id: "kmd",
84
84
  stable: {
85
- base: "EXPLORER",
86
- version: "v2",
87
- },
88
- experimental: {
89
85
  base: "EXPLORER",
90
86
  version: "v3",
91
87
  },
@@ -129,10 +125,6 @@ const initialExplorerConfig: FullConfig = {
129
125
  stakenet: {
130
126
  id: "xsn",
131
127
  stable: {
132
- base: "EXPLORER",
133
- version: "v2",
134
- },
135
- experimental: {
136
128
  base: "EXPLORER",
137
129
  version: "v3",
138
130
  },
@@ -214,6 +206,13 @@ const initialExplorerConfig: FullConfig = {
214
206
  version: "v3",
215
207
  },
216
208
  },
209
+ polygon: {
210
+ id: "matic",
211
+ stable: {
212
+ base: "EXPLORER",
213
+ version: "v3",
214
+ },
215
+ },
217
216
  };
218
217
  let explorerConfig: FullConfig = initialExplorerConfig;
219
218
  export function getExplorerConfig(): FullConfig {
@@ -49,6 +49,7 @@ Array [
49
49
  "ethereum/erc20/trueusd",
50
50
  "ethereum/erc20/kyber_network_crystal_v2",
51
51
  "ravencoin",
52
+ "polygon/erc20/theta_token_(pos)",
52
53
  "ethereum/erc20/enjin",
53
54
  "waves",
54
55
  "ethereum/erc20/omg",
@@ -67,7 +68,7 @@ Array [
67
68
  "ethereum/erc20/aave_",
68
69
  "ethereum/erc20/republic_protocol",
69
70
  "zencash",
70
- "ethereum/erc20/matic",
71
+ "polygon",
71
72
  "ethereum/erc20/nmr",
72
73
  "ethereum/erc20/streamr",
73
74
  "ethereum/erc20/mana",
@@ -94,6 +95,7 @@ Array [
94
95
  "ethereum/erc20/iexec_rlc",
95
96
  "tomo",
96
97
  "elastos",
98
+ "polygon/erc20/bandtoken",
97
99
  "ethereum/erc20/ocean",
98
100
  "ethereum/erc20/healthcare_administration_token",
99
101
  "ark",
@@ -129,6 +131,7 @@ Array [
129
131
  "ethereum/erc20/kan",
130
132
  "ethereum/erc20/bnet_token",
131
133
  "ethereum/erc20/populous",
134
+ "polygon/erc20/iotex_network",
132
135
  "ethereum/erc20/funfair",
133
136
  "kusama",
134
137
  "ethereum/erc20/machine_xchange_coin",
@@ -167,6 +170,7 @@ Array [
167
170
  "ethereum/erc20/zeon",
168
171
  "ethereum/erc20/gaptoken",
169
172
  "ethereum/erc20/cryptoindex_100",
173
+ "polygon/erc20/usdk",
170
174
  "ethereum/erc20/qubitica_",
171
175
  "ethereum/erc20/ethereum_meta",
172
176
  "ethereum/erc20/bitforex_token",
@@ -209,6 +213,7 @@ Array [
209
213
  "ethereum/erc20/credits",
210
214
  "ethereum/erc20/xactoken",
211
215
  "ethereum/erc20/lto_network_token",
216
+ "polygon/erc20/polywolf",
212
217
  "ethereum/erc20/thetimeschain_coin",
213
218
  "ethereum/erc20/cashaa",
214
219
  "ethereum/erc20/invictus_hyperion",
@@ -216,6 +221,7 @@ Array [
216
221
  "ethereum/erc20/idex_token",
217
222
  "ethereum/erc20/request_network",
218
223
  "ethereum/erc20/minebee",
224
+ "polygon/erc20/fantom_token",
219
225
  "ethereum/erc20/bix_token",
220
226
  "kin",
221
227
  "ethereum/erc20/pinakion",
@@ -261,6 +267,7 @@ Array [
261
267
  "ethereum/erc20/tenx",
262
268
  "ethereum/erc20/internet_node_token",
263
269
  "ethereum/erc20/levolution.io_token",
270
+ "polygon/erc20/decentr",
264
271
  "ethereum/erc20/iqeon",
265
272
  "peercoin",
266
273
  "ethereum/erc20/united_traders_token",
@@ -871,6 +878,7 @@ Array [
871
878
  "ethereum/erc20/thrivetoken",
872
879
  "ethereum/erc20/tesla",
873
880
  "ethereum/erc20/mainstream_for_the_underground",
881
+ "polygon/erc20/safedollar.fi_share_2.0",
874
882
  "ethereum/erc20/cdx",
875
883
  "ethereum/erc20/dropil",
876
884
  "ethereum/erc20/savedroid",
@@ -1104,6 +1112,7 @@ Array [
1104
1112
  "ethereum/erc20/aax_token",
1105
1113
  "ethereum/erc20/cybertronchain",
1106
1114
  "ethereum/erc20/deapcoin",
1115
+ "polygon/erc20/ong",
1107
1116
  "ethereum/erc20/ethbear",
1108
1117
  "ethereum/erc20/all_sports_coin",
1109
1118
  "ethereum/erc20/bkex_chain",
@@ -1242,6 +1251,7 @@ Array [
1242
1251
  "ethereum/erc20/volt",
1243
1252
  "ethereum/erc20/map_protocol",
1244
1253
  "ethereum/erc20/crypto_boss_coin",
1254
+ "polygon/erc20/beefy.finance",
1245
1255
  "ethereum/erc20/future1coin",
1246
1256
  "ethereum/erc20/ptokens_btc",
1247
1257
  "ethereum/erc20/charg_coin",
@@ -1558,6 +1568,7 @@ Array [
1558
1568
  "ethereum/erc20/arcane_bear",
1559
1569
  "ethereum/erc20/archer_dao_governance_token",
1560
1570
  "ethereum/erc20/archetypal_network",
1571
+ "ethereum/erc20/arcoin",
1561
1572
  "ethereum/erc20/arcona_distribution_contract",
1562
1573
  "ethereum/erc20/arcx_governance_token",
1563
1574
  "ethereum/erc20/ares_protocol",
@@ -2069,6 +2080,7 @@ Array [
2069
2080
  "ethereum/erc20/clink",
2070
2081
  "ethereum/erc20/clipper_coin_capital",
2071
2082
  "ethereum/erc20/cliq",
2083
+ "ethereum/erc20/cloutcontracts",
2072
2084
  "ethereum/erc20/clover",
2073
2085
  "ethereum/erc20/clt",
2074
2086
  "ethereum/erc20/cm_collection",
@@ -2304,10 +2316,10 @@ Array [
2304
2316
  "ethereum/erc20/darktoken",
2305
2317
  "ethereum/erc20/dart_token",
2306
2318
  "ethereum/erc20/darwinia_commitment_token",
2319
+ "ethereum/erc20/data_economy_index",
2307
2320
  "ethereum/erc20/data_exchange_token",
2308
2321
  "ethereum/erc20/data_know_your_customer",
2309
2322
  "ethereum/erc20/databroker",
2310
- "ethereum/erc20/datacoin",
2311
2323
  "ethereum/erc20/datamine",
2312
2324
  "ethereum/erc20/datbit_token",
2313
2325
  "ethereum/erc20/davecoin",
@@ -2401,6 +2413,7 @@ Array [
2401
2413
  "ethereum/erc20/dexter",
2402
2414
  "ethereum/erc20/dextf_token",
2403
2415
  "ethereum/erc20/dextoken_governance",
2416
+ "ethereum/erc20/dextools",
2404
2417
  "ethereum/erc20/dextrust",
2405
2418
  "ethereum/erc20/dfe.finance",
2406
2419
  "ethereum/erc20/dfinance",
@@ -2527,6 +2540,7 @@ Array [
2527
2540
  "ethereum/erc20/dtop_token",
2528
2541
  "ethereum/erc20/dualchain",
2529
2542
  "ethereum/erc20/dubi",
2543
+ "ethereum/erc20/ducato_finance_token",
2530
2544
  "ethereum/erc20/duckdaodime",
2531
2545
  "ethereum/erc20/duet_governance_token",
2532
2546
  "ethereum/erc20/dukascoin",
@@ -2601,6 +2615,8 @@ Array [
2601
2615
  "ethereum/erc20/enreachdao",
2602
2616
  "ethereum/erc20/entanmo",
2603
2617
  "ethereum/erc20/entone",
2618
+ "ethereum/erc20/entropy",
2619
+ "ethereum/erc20/envicoin",
2604
2620
  "ethereum/erc20/epanus",
2605
2621
  "ethereum/erc20/epay_coin_plus",
2606
2622
  "ethereum/erc20/epik_prime",
@@ -3498,6 +3514,7 @@ Array [
3498
3514
  "ethereum/erc20/masq",
3499
3515
  "ethereum/erc20/master_usd",
3500
3516
  "ethereum/erc20/math_token",
3517
+ "ethereum/erc20/matic",
3501
3518
  "ethereum/erc20/maya_coin",
3502
3519
  "ethereum/erc20/mbcash",
3503
3520
  "ethereum/erc20/mcap",
@@ -3551,6 +3568,7 @@ Array [
3551
3568
  "ethereum/erc20/metis_token",
3552
3569
  "ethereum/erc20/metric.exchange",
3553
3570
  "ethereum/erc20/mfi_erc20",
3571
+ "ethereum/erc20/mia_neko",
3554
3572
  "ethereum/erc20/miami",
3555
3573
  "ethereum/erc20/mic",
3556
3574
  "ethereum/erc20/micro_launchpad_token",
@@ -3739,6 +3757,7 @@ Array [
3739
3757
  "ethereum/erc20/nodeseeds.com_token",
3740
3758
  "ethereum/erc20/noia_token",
3741
3759
  "ethereum/erc20/nollya_coin",
3760
+ "ethereum/erc20/nomad_coin",
3742
3761
  "ethereum/erc20/non-fungible_toke",
3743
3762
  "ethereum/erc20/non-fungible_yearn",
3744
3763
  "ethereum/erc20/noob.finance",
@@ -3870,6 +3889,7 @@ Array [
3870
3889
  "ethereum/erc20/paralink_network",
3871
3890
  "ethereum/erc20/parallelchain_token",
3872
3891
  "ethereum/erc20/pareto",
3892
+ "ethereum/erc20/paribus",
3873
3893
  "ethereum/erc20/parsec_finance",
3874
3894
  "ethereum/erc20/parsiq_boost",
3875
3895
  "ethereum/erc20/parsiq_token_",
@@ -3969,6 +3989,7 @@ Array [
3969
3989
  "ethereum/erc20/pocc_token",
3970
3990
  "ethereum/erc20/podo",
3971
3991
  "ethereum/erc20/pofid_dao_token",
3992
+ "ethereum/erc20/poken",
3972
3993
  "ethereum/erc20/poker_io",
3973
3994
  "ethereum/erc20/polar_chain",
3974
3995
  "ethereum/erc20/polaris_share",
@@ -4490,6 +4511,7 @@ Array [
4490
4511
  "ethereum/erc20/stake_pool",
4491
4512
  "ethereum/erc20/staked_aave",
4492
4513
  "ethereum/erc20/staked_aave_balance_pool_token",
4514
+ "ethereum/erc20/staked_olympus",
4493
4515
  "ethereum/erc20/stakeddvf",
4494
4516
  "ethereum/erc20/stakedfiro",
4495
4517
  "ethereum/erc20/stakedxem",
@@ -5370,12 +5392,217 @@ Array [
5370
5392
  "ethereum_ropsten/erc20/compound_ether",
5371
5393
  "ethereum_ropsten/erc20/dai_stablecoin_v2_0",
5372
5394
  "ethereum_ropsten/erc20/gigcoin",
5395
+ "ethereum_ropsten/erc20/ledgercoin18",
5373
5396
  "ethereum_ropsten/erc20/nangalanga",
5374
5397
  "ethereum_ropsten/erc20/tk19",
5375
5398
  "ethereum_ropsten/erc20/tk20",
5376
5399
  "ethereum_ropsten/erc20/toko24",
5377
5400
  "ethereum_ropsten/erc20/toko25",
5378
5401
  "ethereum_ropsten/erc20/usd_tether__erc20_",
5402
+ "polygon/erc20/(pos)_compound",
5403
+ "polygon/erc20/(pos)_dai_stablecoin",
5404
+ "polygon/erc20/(pos)_tether_usd",
5405
+ "polygon/erc20/(pos)_wrapped_btc",
5406
+ "polygon/erc20/(pos)_yearn.finance",
5407
+ "polygon/erc20/0xbitcoin_token",
5408
+ "polygon/erc20/1inch_token",
5409
+ "polygon/erc20/aave_(pos)",
5410
+ "polygon/erc20/aave_matic_market_aave",
5411
+ "polygon/erc20/aave_matic_market_dai",
5412
+ "polygon/erc20/aave_matic_market_usdc",
5413
+ "polygon/erc20/aave_matic_market_usdt",
5414
+ "polygon/erc20/aave_matic_market_wbtc",
5415
+ "polygon/erc20/aave_matic_market_weth",
5416
+ "polygon/erc20/aave_matic_market_wmatic",
5417
+ "polygon/erc20/adamant",
5418
+ "polygon/erc20/aioz_network",
5419
+ "polygon/erc20/aluna",
5420
+ "polygon/erc20/amp",
5421
+ "polygon/erc20/ampleforth_governance",
5422
+ "polygon/erc20/ankr_eth2_reward_bearing_certificate",
5423
+ "polygon/erc20/armor",
5424
+ "polygon/erc20/augury_finance",
5425
+ "polygon/erc20/bac",
5426
+ "polygon/erc20/balancer",
5427
+ "polygon/erc20/bancor",
5428
+ "polygon/erc20/bat",
5429
+ "polygon/erc20/betprotocoltoken",
5430
+ "polygon/erc20/binance-usd",
5431
+ "polygon/erc20/bitfinex_leo_token",
5432
+ "polygon/erc20/blockv",
5433
+ "polygon/erc20/bluzelle",
5434
+ "polygon/erc20/bnb",
5435
+ "polygon/erc20/bone_token_(boneswap)",
5436
+ "polygon/erc20/boringdao_(pos)",
5437
+ "polygon/erc20/bounty0x",
5438
+ "polygon/erc20/btc_2x_flexible_leverage_index",
5439
+ "polygon/erc20/btu_protocol",
5440
+ "polygon/erc20/bzx_protocol_token",
5441
+ "polygon/erc20/cardstack",
5442
+ "polygon/erc20/cargox",
5443
+ "polygon/erc20/celsius",
5444
+ "polygon/erc20/chainlink_token",
5445
+ "polygon/erc20/chiliz",
5446
+ "polygon/erc20/clintex",
5447
+ "polygon/erc20/crv_(pos)",
5448
+ "polygon/erc20/cryption_network_token",
5449
+ "polygon/erc20/crypto.com_coin",
5450
+ "polygon/erc20/decentraland",
5451
+ "polygon/erc20/deri",
5452
+ "polygon/erc20/dfyn_token_(pos)",
5453
+ "polygon/erc20/dhedge_dao_token",
5454
+ "polygon/erc20/dogelon",
5455
+ "polygon/erc20/dovu",
5456
+ "polygon/erc20/dragon_quick",
5457
+ "polygon/erc20/dsla",
5458
+ "polygon/erc20/endor_protocol_token",
5459
+ "polygon/erc20/energy_web_token_bridged",
5460
+ "polygon/erc20/enjincoin",
5461
+ "polygon/erc20/eth_2x_flexible_leverage_index",
5462
+ "polygon/erc20/ethereum_blue",
5463
+ "polygon/erc20/ethermontoken",
5464
+ "polygon/erc20/ethlend",
5465
+ "polygon/erc20/everipedia_iq_(pos)",
5466
+ "polygon/erc20/fegtoken",
5467
+ "polygon/erc20/fetch",
5468
+ "polygon/erc20/fish",
5469
+ "polygon/erc20/foam_token",
5470
+ "polygon/erc20/fox",
5471
+ "polygon/erc20/fractal_protocol_token",
5472
+ "polygon/erc20/free_coin",
5473
+ "polygon/erc20/frontier_token",
5474
+ "polygon/erc20/furucombo",
5475
+ "polygon/erc20/fusion",
5476
+ "polygon/erc20/gemini_dollar",
5477
+ "polygon/erc20/gitcoin_(pos)",
5478
+ "polygon/erc20/gnosis",
5479
+ "polygon/erc20/golem_network_token",
5480
+ "polygon/erc20/graph_token",
5481
+ "polygon/erc20/gravity_finance",
5482
+ "polygon/erc20/grumpy_cat",
5483
+ "polygon/erc20/guaranteed_entrance_token",
5484
+ "polygon/erc20/hashgard",
5485
+ "polygon/erc20/hex",
5486
+ "polygon/erc20/holotoken",
5487
+ "polygon/erc20/honor",
5488
+ "polygon/erc20/hopr_token",
5489
+ "polygon/erc20/huobitoken",
5490
+ "polygon/erc20/husd",
5491
+ "polygon/erc20/impermax",
5492
+ "polygon/erc20/injective_token",
5493
+ "polygon/erc20/internxt",
5494
+ "polygon/erc20/inverse",
5495
+ "polygon/erc20/iron_finance_ice_token",
5496
+ "polygon/erc20/iron_stablecoin",
5497
+ "polygon/erc20/iron_titanium_token",
5498
+ "polygon/erc20/jarvis_reward_token",
5499
+ "polygon/erc20/keep_token",
5500
+ "polygon/erc20/krill",
5501
+ "polygon/erc20/kyber_network_crystal_v2_(pos)",
5502
+ "polygon/erc20/launchpool_token",
5503
+ "polygon/erc20/lcx",
5504
+ "polygon/erc20/litentry",
5505
+ "polygon/erc20/livepeer_token",
5506
+ "polygon/erc20/loopringcoin_v2",
5507
+ "polygon/erc20/mainframe_token",
5508
+ "polygon/erc20/maker",
5509
+ "polygon/erc20/mantra_dao",
5510
+ "polygon/erc20/marlin_pond",
5511
+ "polygon/erc20/mask_network",
5512
+ "polygon/erc20/matic_aave_interest_bearing_usdc",
5513
+ "polygon/erc20/meta",
5514
+ "polygon/erc20/mimatic",
5515
+ "polygon/erc20/moonwolf.io",
5516
+ "polygon/erc20/mover",
5517
+ "polygon/erc20/napoleonx",
5518
+ "polygon/erc20/nexo",
5519
+ "polygon/erc20/occ",
5520
+ "polygon/erc20/ocean_token",
5521
+ "polygon/erc20/oiler",
5522
+ "polygon/erc20/omg_network",
5523
+ "polygon/erc20/oraichain_token",
5524
+ "polygon/erc20/orbs",
5525
+ "polygon/erc20/orchid",
5526
+ "polygon/erc20/origintoken",
5527
+ "polygon/erc20/ovr",
5528
+ "polygon/erc20/paid_network",
5529
+ "polygon/erc20/par_stablecoin",
5530
+ "polygon/erc20/parsiq_token",
5531
+ "polygon/erc20/paxos_gold",
5532
+ "polygon/erc20/paxos_standard",
5533
+ "polygon/erc20/pepedex",
5534
+ "polygon/erc20/piedao_dough_v2",
5535
+ "polygon/erc20/pinakion",
5536
+ "polygon/erc20/pinknode_token",
5537
+ "polygon/erc20/pluton",
5538
+ "polygon/erc20/polydoge",
5539
+ "polygon/erc20/polygaj_token",
5540
+ "polygon/erc20/polygon_bunny_token",
5541
+ "polygon/erc20/polymath",
5542
+ "polygon/erc20/polyroll_token",
5543
+ "polygon/erc20/polyyeld_token",
5544
+ "polygon/erc20/pooltogether",
5545
+ "polygon/erc20/powerledger",
5546
+ "polygon/erc20/ptokens_btc",
5547
+ "polygon/erc20/pup_token",
5548
+ "polygon/erc20/pusd",
5549
+ "polygon/erc20/pyq",
5550
+ "polygon/erc20/qi_dao",
5551
+ "polygon/erc20/quickswap",
5552
+ "polygon/erc20/rarible",
5553
+ "polygon/erc20/renbtc",
5554
+ "polygon/erc20/render_token",
5555
+ "polygon/erc20/rendoge",
5556
+ "polygon/erc20/renfil",
5557
+ "polygon/erc20/ripiocreditnetwork",
5558
+ "polygon/erc20/rlc",
5559
+ "polygon/erc20/rocket_pool",
5560
+ "polygon/erc20/route",
5561
+ "polygon/erc20/safedollar.fi_dollar_2.0",
5562
+ "polygon/erc20/sand",
5563
+ "polygon/erc20/sapien_network",
5564
+ "polygon/erc20/sentinel",
5565
+ "polygon/erc20/serum",
5566
+ "polygon/erc20/shopping.io",
5567
+ "polygon/erc20/singularitynet_token",
5568
+ "polygon/erc20/spacerat",
5569
+ "polygon/erc20/stacker_ventures_token_(pos)",
5570
+ "polygon/erc20/stake",
5571
+ "polygon/erc20/stakewise",
5572
+ "polygon/erc20/stasis_eurs_token",
5573
+ "polygon/erc20/student_coin",
5574
+ "polygon/erc20/sushitoken_(pos)",
5575
+ "polygon/erc20/swipe",
5576
+ "polygon/erc20/swissborg",
5577
+ "polygon/erc20/synth_susd",
5578
+ "polygon/erc20/synthetix_network_token_(pos)",
5579
+ "polygon/erc20/tapmydata",
5580
+ "polygon/erc20/telcoin",
5581
+ "polygon/erc20/tellor_tributes",
5582
+ "polygon/erc20/tidal_token",
5583
+ "polygon/erc20/torn_token",
5584
+ "polygon/erc20/trueusd",
5585
+ "polygon/erc20/uma_voting_token_v1",
5586
+ "polygon/erc20/unfederalreservetoken",
5587
+ "polygon/erc20/unibright",
5588
+ "polygon/erc20/unifund",
5589
+ "polygon/erc20/unimex.network",
5590
+ "polygon/erc20/uniswap_(pos)",
5591
+ "polygon/erc20/usd_coin_(pos)",
5592
+ "polygon/erc20/vespertoken",
5593
+ "polygon/erc20/voyager",
5594
+ "polygon/erc20/waultswap_polygon",
5595
+ "polygon/erc20/wepower",
5596
+ "polygon/erc20/woofy",
5597
+ "polygon/erc20/wootrade_network",
5598
+ "polygon/erc20/wrapped_celo",
5599
+ "polygon/erc20/wrapped_filecoin_(pos)",
5600
+ "polygon/erc20/wrapped_matic",
5601
+ "polygon/erc20/wrapped_ust_token",
5602
+ "polygon/erc20/xtoken",
5603
+ "polygon/erc20/xy_oracle",
5604
+ "polygon/erc20/yop",
5605
+ "polygon/erc20/zrx",
5379
5606
  "tron/trc10/1002670",
5380
5607
  "tron/trc10/1002413",
5381
5608
  "tron/trc10/1001943",
package/src/env.ts CHANGED
@@ -67,7 +67,7 @@ const envDefinitions = {
67
67
  },
68
68
  API_RIPPLE_WS: {
69
69
  parser: stringParser,
70
- def: "wss://xrplcluster.com",
70
+ def: "wss://xrplcluster.com/ledgerlive",
71
71
  desc: "XRP Ledger full history open WebSocket endpoint",
72
72
  },
73
73
  API_FILECOIN_ENDPOINT: {
@@ -342,8 +342,8 @@ const getAccountShape: GetAccountShape = async (info) => {
342
342
  spendableBalance: balance,
343
343
  operations,
344
344
  operationsCount: operations.length,
345
- freshAddress: walletAccount.xpub.freshAddress[0],
346
- freshAddressPath: `${accountPath}/0/${walletAccount.xpub.freshAddressIndex[0]}`,
345
+ freshAddress: walletAccount.xpub.freshAddress,
346
+ freshAddressPath: `${accountPath}/0/${walletAccount.xpub.freshAddressIndex}`,
347
347
  blockHeight,
348
348
  bitcoinResources: {
349
349
  utxos,
@@ -277,7 +277,7 @@ const bitcoinTestnet: AppSpec<Transaction> = {
277
277
  appQuery: {
278
278
  model: DeviceModelId.nanoS,
279
279
  appName: "Bitcoin Test",
280
- // appVersion: "2.0.0-alpha",
280
+ appVersion: "2.0.0-beta",
281
281
  },
282
282
  test: genericTest,
283
283
  mutations: bitcoinLikeMutations({
@@ -66,6 +66,10 @@ const acceptTransaction: DeviceAction<Transaction, any> = deviceActionFlow({
66
66
  title: "Accept",
67
67
  button: "LRlr",
68
68
  },
69
+ {
70
+ title: "Approve",
71
+ button: "LRlr",
72
+ },
69
73
  ],
70
74
  });
71
75
  export default {
@@ -27,6 +27,9 @@ export function fallbackValidateAddress(address: string): boolean {
27
27
  class Base implements ICrypto {
28
28
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
29
29
  network: any;
30
+ protected static publickeyCache = {}; // xpub + account + index to publicKey
31
+ protected static addressCache = {}; // derivationMode + xpub + account + index to address
32
+ protected static bech32Cache = {}; // xpub to bech32 interface
30
33
 
31
34
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
35
  constructor({ network }: { network: any }) {
@@ -37,9 +40,26 @@ class Base implements ICrypto {
37
40
  }
38
41
 
39
42
  protected getPubkeyAt(xpub: string, account: number, index: number): Buffer {
40
- return bip32.fromBase58(xpub, this.network).derive(account).derive(index)
41
- .publicKey;
43
+ if (!Base.bech32Cache[xpub]) {
44
+ Base.bech32Cache[xpub] = bip32.fromBase58(xpub, this.network);
45
+ }
46
+ if (Base.publickeyCache[`${xpub}-${account}-${index}`]) {
47
+ return Base.publickeyCache[`${xpub}-${account}-${index}`];
48
+ }
49
+ if (Base.publickeyCache[`${xpub}-${account}`]) {
50
+ const publicKey =
51
+ Base.publickeyCache[`${xpub}-${account}`].derive(index).publicKey;
52
+ Base.publickeyCache[`${xpub}-${account}-${index}`] = publicKey;
53
+ return publicKey;
54
+ }
55
+ Base.publickeyCache[`${xpub}-${account}`] =
56
+ Base.bech32Cache[xpub].derive(account);
57
+ const publicKey =
58
+ Base.publickeyCache[`${xpub}-${account}`].derive(index).publicKey;
59
+ Base.publickeyCache[`${xpub}-${account}-${index}`] = publicKey;
60
+ return publicKey;
42
61
  }
62
+
43
63
  // derive legacy address at account and index positions
44
64
  getLegacyAddress(xpub: string, account: number, index: number): string {
45
65
  const { address } = bjs.payments.p2pkh({
@@ -78,16 +98,26 @@ class Base implements ICrypto {
78
98
  account: number,
79
99
  index: number
80
100
  ): string {
101
+ if (Base.addressCache[`${derivationMode}-${xpub}-${account}-${index}`]) {
102
+ return Base.addressCache[`${derivationMode}-${xpub}-${account}-${index}`];
103
+ }
81
104
  switch (derivationMode) {
82
105
  case DerivationModes.LEGACY:
83
- return this.getLegacyAddress(xpub, account, index);
106
+ Base.addressCache[`${derivationMode}-${xpub}-${account}-${index}`] =
107
+ this.getLegacyAddress(xpub, account, index);
108
+ break;
84
109
  case DerivationModes.SEGWIT:
85
- return this.getSegWitAddress(xpub, account, index);
110
+ Base.addressCache[`${derivationMode}-${xpub}-${account}-${index}`] =
111
+ this.getSegWitAddress(xpub, account, index);
112
+ break;
86
113
  case DerivationModes.NATIVE_SEGWIT:
87
- return this.getNativeSegWitAddress(xpub, account, index);
114
+ Base.addressCache[`${derivationMode}-${xpub}-${account}-${index}`] =
115
+ this.getNativeSegWitAddress(xpub, account, index);
116
+ break;
88
117
  default:
89
118
  throw new Error(`Invalid derivation Mode: ${derivationMode}`);
90
119
  }
120
+ return Base.addressCache[`${derivationMode}-${xpub}-${account}-${index}`];
91
121
  }
92
122
 
93
123
  // infer address type from its syntax
@@ -124,9 +124,16 @@ class Bitcoin extends Base {
124
124
  account: number,
125
125
  index: number
126
126
  ): string {
127
+ if (Base.addressCache[`${derivationMode}-${xpub}-${account}-${index}`]) {
128
+ return Base.addressCache[`${derivationMode}-${xpub}-${account}-${index}`];
129
+ }
127
130
  switch (derivationMode) {
128
131
  case DerivationModes.TAPROOT:
129
- return this.getTaprootAddress(xpub, account, index);
132
+ Base.addressCache[`${derivationMode}-${xpub}-${account}-${index}`] =
133
+ this.getTaprootAddress(xpub, account, index);
134
+ return Base.addressCache[
135
+ `${derivationMode}-${xpub}-${account}-${index}`
136
+ ];
130
137
  default:
131
138
  return super.getAddress(derivationMode, xpub, account, index);
132
139
  }
@@ -188,7 +195,7 @@ class Bitcoin extends Base {
188
195
  const schnorrInternalPubkey = ecdsaPubkey.slice(1);
189
196
 
190
197
  const evenEcdsaPubkey = Buffer.concat([
191
- Buffer.of(0x02),
198
+ Buffer.from([0x02]),
192
199
  schnorrInternalPubkey,
193
200
  ]);
194
201
  const tweak = this.hashTapTweak(schnorrInternalPubkey);
@@ -285,12 +285,7 @@ class BitcoinLikeExplorer extends EventEmitter implements IExplorer {
285
285
 
286
286
  // faster than mapping
287
287
  res.txs.forEach((tx) => {
288
- if (!tx.block) {
289
- return;
290
- }
291
-
292
288
  this.hydrateTx(address, tx);
293
-
294
289
  hydratedTxs.push(tx);
295
290
  });
296
291