@proton/wrap-constants 0.2.181 → 0.2.183

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/dist/index.js CHANGED
@@ -159,6 +159,7 @@ var Chains = /* @__PURE__ */ ((Chains2) => {
159
159
  Chains2["BitcoinTestnet"] = "Bitcoin (Testnet)";
160
160
  Chains2["EthereumMainnet"] = "Ethereum";
161
161
  Chains2["EthereumRopsten"] = "Ethereum (Ropsten)";
162
+ Chains2["EthereumSepolia"] = "Ethereum (Sepolia)";
162
163
  Chains2["LitecoinMainnet"] = "Litecoin";
163
164
  Chains2["LitecoinTestnet"] = "Litecoin (Testnet)";
164
165
  Chains2["BitcoinCashMainnet"] = "Bitcoin Cash";
@@ -200,6 +201,7 @@ var Networks = /* @__PURE__ */ ((Networks2) => {
200
201
  Networks2["AVM"] = "avm";
201
202
  Networks2["EVM"] = "evm";
202
203
  Networks2["METALL2"] = "metall2";
204
+ Networks2["Sepolia"] = "sepolia";
203
205
  return Networks2;
204
206
  })(Networks || {});
205
207
  var similarChains = {
@@ -217,6 +219,7 @@ var explorerLinkByChain = {
217
219
  ["Bitcoin (Testnet)" /* BitcoinTestnet */]: (txid) => `https://blockstream.info/testnet/tx/${txid}`,
218
220
  ["Ethereum" /* EthereumMainnet */]: (txid) => `https://etherscan.io/tx/${txid}`,
219
221
  ["Ethereum (Ropsten)" /* EthereumRopsten */]: (txid) => `https://ropsten.etherscan.io/tx/${txid}`,
222
+ ["Ethereum (Sepolia)" /* EthereumSepolia */]: (txid) => `https://sepolia.etherscan.io/tx/${txid}`,
220
223
  ["Litecoin" /* LitecoinMainnet */]: (txid) => `https://blockchair.com/litecoin/transaction/${txid}`,
221
224
  ["Litecoin (Testnet)" /* LitecoinTestnet */]: (txid) => `https://blockexplorer.one/litecoin/testnet/blockHash/${txid}`,
222
225
  ["Bitcoin Cash" /* BitcoinCashMainnet */]: (txid) => `https://blockchair.com/bitcoin-cash/transaction/${txid}`,
@@ -372,6 +375,16 @@ var initializeCoins = (protonChain) => {
372
375
  xtokenContract: "xtokens",
373
376
  wallets: [
374
377
  ...IS_MAINNET ? [
378
+ {
379
+ wallet: "MTL-METALL2",
380
+ symbol: "MTL",
381
+ chain: "Metal L2" /* MetalL2Mainnet */,
382
+ network: "metall2" /* METALL2 */,
383
+ precision: 8,
384
+ contract: "0xBCFc435d8F276585f6431Fc1b9EE9A850B5C00A9",
385
+ provider: "metall2" /* METALL2 */,
386
+ hasWithdrawMemo: false
387
+ }
375
388
  // {
376
389
  // wallet: "MTL",
377
390
  // symbol: "MTL",
@@ -516,8 +529,8 @@ var initializeCoins = (protonChain) => {
516
529
  {
517
530
  wallet: "ETH",
518
531
  symbol: "ETH",
519
- chain: "Ethereum (Ropsten)" /* EthereumRopsten */,
520
- network: "ropsten" /* Ropsten */,
532
+ chain: "Ethereum (Sepolia)" /* EthereumSepolia */,
533
+ network: "sepolia" /* Sepolia */,
521
534
  precision: 18,
522
535
  contract: "0x0000000000000000000000000000000000000000",
523
536
  provider: "fireblocks" /* FIREBLOCKS */,
@@ -2925,10 +2938,10 @@ function clone(configObject) {
2925
2938
  throw Error(bignumberError + "Invalid BigNumber: " + v);
2926
2939
  };
2927
2940
  BigNumber2.maximum = BigNumber2.max = function() {
2928
- return maxOrMin(arguments, P.lt);
2941
+ return maxOrMin(arguments, -1);
2929
2942
  };
2930
2943
  BigNumber2.minimum = BigNumber2.min = function() {
2931
- return maxOrMin(arguments, P.gt);
2944
+ return maxOrMin(arguments, 1);
2932
2945
  };
2933
2946
  BigNumber2.random = function() {
2934
2947
  var pow2_53 = 9007199254740992;
@@ -3287,18 +3300,15 @@ function clone(configObject) {
3287
3300
  }
3288
3301
  return n.s < 0 && c0 ? "-" + str : str;
3289
3302
  }
3290
- function maxOrMin(args, method) {
3291
- var n, i = 1, m = new BigNumber2(args[0]);
3303
+ function maxOrMin(args, n) {
3304
+ var k, y, i = 1, x = new BigNumber2(args[0]);
3292
3305
  for (; i < args.length; i++) {
3293
- n = new BigNumber2(args[i]);
3294
- if (!n.s) {
3295
- m = n;
3296
- break;
3297
- } else if (method.call(m, n)) {
3298
- m = n;
3306
+ y = new BigNumber2(args[i]);
3307
+ if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {
3308
+ x = y;
3299
3309
  }
3300
3310
  }
3301
- return m;
3311
+ return x;
3302
3312
  }
3303
3313
  function normalise(n, c, e) {
3304
3314
  var i = 1, j = c.length;
@@ -3354,7 +3364,7 @@ function clone(configObject) {
3354
3364
  i += LOG_BASE;
3355
3365
  j = sd;
3356
3366
  n = xc[ni = 0];
3357
- rd = n / pows10[d - j - 1] % 10 | 0;
3367
+ rd = mathfloor(n / pows10[d - j - 1] % 10);
3358
3368
  } else {
3359
3369
  ni = mathceil((i + 1) / LOG_BASE);
3360
3370
  if (ni >= xc.length) {
@@ -3374,7 +3384,7 @@ function clone(configObject) {
3374
3384
  ;
3375
3385
  i %= LOG_BASE;
3376
3386
  j = i - LOG_BASE + d;
3377
- rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;
3387
+ rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10);
3378
3388
  }
3379
3389
  }
3380
3390
  r = r || sd < 0 || // Are there any non-zero digits after the rounding digit?
@@ -3647,8 +3657,12 @@ function clone(configObject) {
3647
3657
  }
3648
3658
  }
3649
3659
  }
3650
- if (xLTy)
3651
- t = xc, xc = yc, yc = t, y.s = -y.s;
3660
+ if (xLTy) {
3661
+ t = xc;
3662
+ xc = yc;
3663
+ yc = t;
3664
+ y.s = -y.s;
3665
+ }
3652
3666
  b = (j = yc.length) - (i = xc.length);
3653
3667
  if (b > 0)
3654
3668
  for (; b--; xc[i++] = 0)
@@ -3714,8 +3728,14 @@ function clone(configObject) {
3714
3728
  y.s *= x.s;
3715
3729
  xcL = xc.length;
3716
3730
  ycL = yc.length;
3717
- if (xcL < ycL)
3718
- zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;
3731
+ if (xcL < ycL) {
3732
+ zc = xc;
3733
+ xc = yc;
3734
+ yc = zc;
3735
+ i = xcL;
3736
+ xcL = ycL;
3737
+ ycL = i;
3738
+ }
3719
3739
  for (i = xcL + ycL, zc = []; i--; zc.push(0))
3720
3740
  ;
3721
3741
  base = BASE;
@@ -3781,8 +3801,12 @@ function clone(configObject) {
3781
3801
  }
3782
3802
  a = xc.length;
3783
3803
  b = yc.length;
3784
- if (a - b < 0)
3785
- t = yc, yc = xc, xc = t, b = a;
3804
+ if (a - b < 0) {
3805
+ t = yc;
3806
+ yc = xc;
3807
+ xc = t;
3808
+ b = a;
3809
+ }
3786
3810
  for (a = 0; b; ) {
3787
3811
  a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;
3788
3812
  xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;
@@ -3910,8 +3934,12 @@ function clone(configObject) {
3910
3934
  str = x.toFixed(dp, rm);
3911
3935
  if (x.c) {
3912
3936
  var i, arr = str.split("."), g1 = +format2.groupSize, g2 = +format2.secondaryGroupSize, groupSeparator = format2.groupSeparator || "", intPart = arr[0], fractionPart = arr[1], isNeg = x.s < 0, intDigits = isNeg ? intPart.slice(1) : intPart, len = intDigits.length;
3913
- if (g2)
3914
- i = g1, g1 = g2, g2 = i, len -= i;
3937
+ if (g2) {
3938
+ i = g1;
3939
+ g1 = g2;
3940
+ g2 = i;
3941
+ len -= i;
3942
+ }
3915
3943
  if (g1 > 0 && len > 0) {
3916
3944
  i = len % g1 || g1;
3917
3945
  intPart = intDigits.substr(0, i);
package/dist/index.mjs CHANGED
@@ -4,6 +4,7 @@ var Chains = /* @__PURE__ */ ((Chains2) => {
4
4
  Chains2["BitcoinTestnet"] = "Bitcoin (Testnet)";
5
5
  Chains2["EthereumMainnet"] = "Ethereum";
6
6
  Chains2["EthereumRopsten"] = "Ethereum (Ropsten)";
7
+ Chains2["EthereumSepolia"] = "Ethereum (Sepolia)";
7
8
  Chains2["LitecoinMainnet"] = "Litecoin";
8
9
  Chains2["LitecoinTestnet"] = "Litecoin (Testnet)";
9
10
  Chains2["BitcoinCashMainnet"] = "Bitcoin Cash";
@@ -45,6 +46,7 @@ var Networks = /* @__PURE__ */ ((Networks2) => {
45
46
  Networks2["AVM"] = "avm";
46
47
  Networks2["EVM"] = "evm";
47
48
  Networks2["METALL2"] = "metall2";
49
+ Networks2["Sepolia"] = "sepolia";
48
50
  return Networks2;
49
51
  })(Networks || {});
50
52
  var similarChains = {
@@ -62,6 +64,7 @@ var explorerLinkByChain = {
62
64
  ["Bitcoin (Testnet)" /* BitcoinTestnet */]: (txid) => `https://blockstream.info/testnet/tx/${txid}`,
63
65
  ["Ethereum" /* EthereumMainnet */]: (txid) => `https://etherscan.io/tx/${txid}`,
64
66
  ["Ethereum (Ropsten)" /* EthereumRopsten */]: (txid) => `https://ropsten.etherscan.io/tx/${txid}`,
67
+ ["Ethereum (Sepolia)" /* EthereumSepolia */]: (txid) => `https://sepolia.etherscan.io/tx/${txid}`,
65
68
  ["Litecoin" /* LitecoinMainnet */]: (txid) => `https://blockchair.com/litecoin/transaction/${txid}`,
66
69
  ["Litecoin (Testnet)" /* LitecoinTestnet */]: (txid) => `https://blockexplorer.one/litecoin/testnet/blockHash/${txid}`,
67
70
  ["Bitcoin Cash" /* BitcoinCashMainnet */]: (txid) => `https://blockchair.com/bitcoin-cash/transaction/${txid}`,
@@ -217,6 +220,16 @@ var initializeCoins = (protonChain) => {
217
220
  xtokenContract: "xtokens",
218
221
  wallets: [
219
222
  ...IS_MAINNET ? [
223
+ {
224
+ wallet: "MTL-METALL2",
225
+ symbol: "MTL",
226
+ chain: "Metal L2" /* MetalL2Mainnet */,
227
+ network: "metall2" /* METALL2 */,
228
+ precision: 8,
229
+ contract: "0xBCFc435d8F276585f6431Fc1b9EE9A850B5C00A9",
230
+ provider: "metall2" /* METALL2 */,
231
+ hasWithdrawMemo: false
232
+ }
220
233
  // {
221
234
  // wallet: "MTL",
222
235
  // symbol: "MTL",
@@ -361,8 +374,8 @@ var initializeCoins = (protonChain) => {
361
374
  {
362
375
  wallet: "ETH",
363
376
  symbol: "ETH",
364
- chain: "Ethereum (Ropsten)" /* EthereumRopsten */,
365
- network: "ropsten" /* Ropsten */,
377
+ chain: "Ethereum (Sepolia)" /* EthereumSepolia */,
378
+ network: "sepolia" /* Sepolia */,
366
379
  precision: 18,
367
380
  contract: "0x0000000000000000000000000000000000000000",
368
381
  provider: "fireblocks" /* FIREBLOCKS */,
@@ -2770,10 +2783,10 @@ function clone(configObject) {
2770
2783
  throw Error(bignumberError + "Invalid BigNumber: " + v);
2771
2784
  };
2772
2785
  BigNumber2.maximum = BigNumber2.max = function() {
2773
- return maxOrMin(arguments, P.lt);
2786
+ return maxOrMin(arguments, -1);
2774
2787
  };
2775
2788
  BigNumber2.minimum = BigNumber2.min = function() {
2776
- return maxOrMin(arguments, P.gt);
2789
+ return maxOrMin(arguments, 1);
2777
2790
  };
2778
2791
  BigNumber2.random = function() {
2779
2792
  var pow2_53 = 9007199254740992;
@@ -3132,18 +3145,15 @@ function clone(configObject) {
3132
3145
  }
3133
3146
  return n.s < 0 && c0 ? "-" + str : str;
3134
3147
  }
3135
- function maxOrMin(args, method) {
3136
- var n, i = 1, m = new BigNumber2(args[0]);
3148
+ function maxOrMin(args, n) {
3149
+ var k, y, i = 1, x = new BigNumber2(args[0]);
3137
3150
  for (; i < args.length; i++) {
3138
- n = new BigNumber2(args[i]);
3139
- if (!n.s) {
3140
- m = n;
3141
- break;
3142
- } else if (method.call(m, n)) {
3143
- m = n;
3151
+ y = new BigNumber2(args[i]);
3152
+ if (!y.s || (k = compare(x, y)) === n || k === 0 && x.s === n) {
3153
+ x = y;
3144
3154
  }
3145
3155
  }
3146
- return m;
3156
+ return x;
3147
3157
  }
3148
3158
  function normalise(n, c, e) {
3149
3159
  var i = 1, j = c.length;
@@ -3199,7 +3209,7 @@ function clone(configObject) {
3199
3209
  i += LOG_BASE;
3200
3210
  j = sd;
3201
3211
  n = xc[ni = 0];
3202
- rd = n / pows10[d - j - 1] % 10 | 0;
3212
+ rd = mathfloor(n / pows10[d - j - 1] % 10);
3203
3213
  } else {
3204
3214
  ni = mathceil((i + 1) / LOG_BASE);
3205
3215
  if (ni >= xc.length) {
@@ -3219,7 +3229,7 @@ function clone(configObject) {
3219
3229
  ;
3220
3230
  i %= LOG_BASE;
3221
3231
  j = i - LOG_BASE + d;
3222
- rd = j < 0 ? 0 : n / pows10[d - j - 1] % 10 | 0;
3232
+ rd = j < 0 ? 0 : mathfloor(n / pows10[d - j - 1] % 10);
3223
3233
  }
3224
3234
  }
3225
3235
  r = r || sd < 0 || // Are there any non-zero digits after the rounding digit?
@@ -3492,8 +3502,12 @@ function clone(configObject) {
3492
3502
  }
3493
3503
  }
3494
3504
  }
3495
- if (xLTy)
3496
- t = xc, xc = yc, yc = t, y.s = -y.s;
3505
+ if (xLTy) {
3506
+ t = xc;
3507
+ xc = yc;
3508
+ yc = t;
3509
+ y.s = -y.s;
3510
+ }
3497
3511
  b = (j = yc.length) - (i = xc.length);
3498
3512
  if (b > 0)
3499
3513
  for (; b--; xc[i++] = 0)
@@ -3559,8 +3573,14 @@ function clone(configObject) {
3559
3573
  y.s *= x.s;
3560
3574
  xcL = xc.length;
3561
3575
  ycL = yc.length;
3562
- if (xcL < ycL)
3563
- zc = xc, xc = yc, yc = zc, i = xcL, xcL = ycL, ycL = i;
3576
+ if (xcL < ycL) {
3577
+ zc = xc;
3578
+ xc = yc;
3579
+ yc = zc;
3580
+ i = xcL;
3581
+ xcL = ycL;
3582
+ ycL = i;
3583
+ }
3564
3584
  for (i = xcL + ycL, zc = []; i--; zc.push(0))
3565
3585
  ;
3566
3586
  base = BASE;
@@ -3626,8 +3646,12 @@ function clone(configObject) {
3626
3646
  }
3627
3647
  a = xc.length;
3628
3648
  b = yc.length;
3629
- if (a - b < 0)
3630
- t = yc, yc = xc, xc = t, b = a;
3649
+ if (a - b < 0) {
3650
+ t = yc;
3651
+ yc = xc;
3652
+ xc = t;
3653
+ b = a;
3654
+ }
3631
3655
  for (a = 0; b; ) {
3632
3656
  a = (xc[--b] = xc[b] + yc[b] + a) / BASE | 0;
3633
3657
  xc[b] = BASE === xc[b] ? 0 : xc[b] % BASE;
@@ -3755,8 +3779,12 @@ function clone(configObject) {
3755
3779
  str = x.toFixed(dp, rm);
3756
3780
  if (x.c) {
3757
3781
  var i, arr = str.split("."), g1 = +format2.groupSize, g2 = +format2.secondaryGroupSize, groupSeparator = format2.groupSeparator || "", intPart = arr[0], fractionPart = arr[1], isNeg = x.s < 0, intDigits = isNeg ? intPart.slice(1) : intPart, len = intDigits.length;
3758
- if (g2)
3759
- i = g1, g1 = g2, g2 = i, len -= i;
3782
+ if (g2) {
3783
+ i = g1;
3784
+ g1 = g2;
3785
+ g2 = i;
3786
+ len -= i;
3787
+ }
3760
3788
  if (g1 > 0 && len > 0) {
3761
3789
  i = len % g1 || g1;
3762
3790
  intPart = intDigits.substr(0, i);
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
- "version": "0.2.181",
8
+ "version": "0.2.183",
9
9
  "license": "MIT",
10
10
  "main": "dist/index.js",
11
11
  "typings": "dist/index.d.ts",
@@ -40,5 +40,5 @@
40
40
  "resolutions": {
41
41
  "typescript": "4.5"
42
42
  },
43
- "gitHead": "731b31a59be8bb7490477313a2b18622febe1064"
43
+ "gitHead": "88555c5fb8a463f5e0d8af0e6976025739398ba3"
44
44
  }