@proton/wrap-constants 0.0.47 → 0.0.50
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/coins.d.ts +5 -1
- package/dist/parsers/actions.d.ts +725 -289
- package/dist/parsers/address.d.ts +571 -112
- package/dist/parsers/auth.d.ts +1268 -356
- package/dist/parsers/base.d.ts +10 -7
- package/dist/parsers/currency.d.ts +48 -13
- package/dist/parsers/deposit.d.ts +23 -9
- package/dist/parsers/otc.d.ts +15 -8
- package/dist/parsers/withdraw.d.ts +646 -130
- package/dist/parsers/withdrawalHistory.d.ts +37 -9
- package/dist/parsers/wrap.d.ts +35 -11
- package/dist/wrap-constants.cjs.development.js +112 -56
- package/dist/wrap-constants.cjs.development.js.map +1 -1
- package/dist/wrap-constants.cjs.production.min.js +1 -1
- package/dist/wrap-constants.cjs.production.min.js.map +1 -1
- package/dist/wrap-constants.esm.js +112 -56
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +9 -5
- package/src/coins.ts +107 -59
- package/src/parsers/actions.ts +21 -7
- package/src/parsers/auth.ts +1 -2
|
@@ -30,6 +30,8 @@ var Chains;
|
|
|
30
30
|
Chains["AvalancheCChain"] = "Avalanche C-Chain";
|
|
31
31
|
Chains["PolygonMainnet"] = "Polygon";
|
|
32
32
|
Chains["TerraMainnet"] = "Terra";
|
|
33
|
+
Chains["RippleMainnet"] = "Ripple";
|
|
34
|
+
Chains["SolanaMainnet"] = "Solana";
|
|
33
35
|
})(Chains || (Chains = {}));
|
|
34
36
|
|
|
35
37
|
var Networks;
|
|
@@ -94,7 +96,12 @@ var explorerLinkByChain = (_explorerLinkByChain = {}, _explorerLinkByChain[Chain
|
|
|
94
96
|
return "https://polygonscan.com/tx/" + txid;
|
|
95
97
|
}, _explorerLinkByChain[Chains.TerraMainnet] = function (txid) {
|
|
96
98
|
return "https://terra.stake.id/?#/tx/" + txid;
|
|
97
|
-
}, _explorerLinkByChain)
|
|
99
|
+
}, _explorerLinkByChain[Chains.RippleMainnet] = function (txid) {
|
|
100
|
+
return "https://xrpscan.com/tx/" + txid;
|
|
101
|
+
}, _explorerLinkByChain[Chains.SolanaMainnet] = function (txid) {
|
|
102
|
+
return "https://explorer.solana.com/tx/" + txid;
|
|
103
|
+
}, _explorerLinkByChain); // Initialize
|
|
104
|
+
|
|
98
105
|
var initializeCoins = function initializeCoins(protonChain) {
|
|
99
106
|
var IS_MAINNET = protonChain === 'proton';
|
|
100
107
|
var IS_TESTNET = protonChain === 'proton-test';
|
|
@@ -265,7 +272,7 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
265
272
|
image: 'https://www.protonchain.com/images/tokens/loan.tokenLOAN.png',
|
|
266
273
|
coingeckoId: 'proton-loan'
|
|
267
274
|
}, {
|
|
268
|
-
allowSwap:
|
|
275
|
+
allowSwap: true,
|
|
269
276
|
allowBridge: true,
|
|
270
277
|
allowLend: false,
|
|
271
278
|
allowBorrow: false,
|
|
@@ -648,7 +655,93 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
648
655
|
}] : []),
|
|
649
656
|
image: 'https://www.protonchain.com/images/tokens/xtokensXADA.png',
|
|
650
657
|
coingeckoId: 'cardano'
|
|
658
|
+
}, // Adding
|
|
659
|
+
{
|
|
660
|
+
allowSwap: false,
|
|
661
|
+
allowBridge: IS_MAINNET,
|
|
662
|
+
allowLend: false,
|
|
663
|
+
allowBorrow: false,
|
|
664
|
+
name: 'Terra',
|
|
665
|
+
coin: 'LUNA',
|
|
666
|
+
xtokenSymbol: 'XLUNA',
|
|
667
|
+
xtokenPrecision: 6,
|
|
668
|
+
xtokenContract: 'xtokens',
|
|
669
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
670
|
+
wallet: 'LUNA',
|
|
671
|
+
symbol: 'LUNA',
|
|
672
|
+
chain: Chains.TerraMainnet,
|
|
673
|
+
network: Networks.Mainnet,
|
|
674
|
+
precision: 6,
|
|
675
|
+
contract: undefined,
|
|
676
|
+
hasWithdrawMemo: true
|
|
677
|
+
}] : []),
|
|
678
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXLUNA.png',
|
|
679
|
+
coingeckoId: 'terra-luna'
|
|
680
|
+
}, {
|
|
681
|
+
allowSwap: false,
|
|
682
|
+
allowBridge: IS_MAINNET,
|
|
683
|
+
allowLend: false,
|
|
684
|
+
allowBorrow: false,
|
|
685
|
+
name: 'TerraUSD',
|
|
686
|
+
coin: 'UST',
|
|
687
|
+
xtokenSymbol: 'XUST',
|
|
688
|
+
xtokenPrecision: 6,
|
|
689
|
+
xtokenContract: 'xtokens',
|
|
690
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
691
|
+
wallet: 'UST',
|
|
692
|
+
symbol: 'UST',
|
|
693
|
+
chain: Chains.TerraMainnet,
|
|
694
|
+
network: Networks.Mainnet,
|
|
695
|
+
precision: 6,
|
|
696
|
+
contract: undefined,
|
|
697
|
+
hasWithdrawMemo: true
|
|
698
|
+
}] : []),
|
|
699
|
+
image: 'https://www.protonchain.com/images/tokens/xtokensXUST.png',
|
|
700
|
+
coingeckoId: 'terrausd'
|
|
701
|
+
}, {
|
|
702
|
+
allowSwap: false,
|
|
703
|
+
allowBridge: IS_MAINNET,
|
|
704
|
+
allowLend: false,
|
|
705
|
+
allowBorrow: false,
|
|
706
|
+
name: 'Solana',
|
|
707
|
+
coin: 'SOL',
|
|
708
|
+
xtokenSymbol: 'XSOL',
|
|
709
|
+
xtokenPrecision: 6,
|
|
710
|
+
xtokenContract: 'xtokens',
|
|
711
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
712
|
+
wallet: 'SOL',
|
|
713
|
+
symbol: 'SOL',
|
|
714
|
+
chain: Chains.SolanaMainnet,
|
|
715
|
+
network: Networks.Mainnet,
|
|
716
|
+
precision: 9,
|
|
717
|
+
contract: undefined,
|
|
718
|
+
hasWithdrawMemo: false
|
|
719
|
+
}] : []),
|
|
720
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xsol.png',
|
|
721
|
+
coingeckoId: 'solana'
|
|
651
722
|
}, {
|
|
723
|
+
allowSwap: false,
|
|
724
|
+
allowBridge: IS_MAINNET,
|
|
725
|
+
allowLend: false,
|
|
726
|
+
allowBorrow: false,
|
|
727
|
+
name: 'Ripple',
|
|
728
|
+
coin: 'XRP',
|
|
729
|
+
xtokenSymbol: 'XXRP',
|
|
730
|
+
xtokenPrecision: 6,
|
|
731
|
+
xtokenContract: 'xtokens',
|
|
732
|
+
wallets: [].concat(IS_MAINNET ? [{
|
|
733
|
+
wallet: 'XRP',
|
|
734
|
+
symbol: 'XRP',
|
|
735
|
+
chain: Chains.RippleMainnet,
|
|
736
|
+
network: Networks.Mainnet,
|
|
737
|
+
precision: 6,
|
|
738
|
+
contract: undefined,
|
|
739
|
+
hasWithdrawMemo: true
|
|
740
|
+
}] : []),
|
|
741
|
+
image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xxrp.png',
|
|
742
|
+
coingeckoId: 'ripple'
|
|
743
|
+
}, // Future
|
|
744
|
+
{
|
|
652
745
|
allowSwap: false,
|
|
653
746
|
allowBridge: false,
|
|
654
747
|
allowLend: false,
|
|
@@ -659,14 +752,6 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
659
752
|
xtokenPrecision: 9,
|
|
660
753
|
xtokenContract: 'xtokens',
|
|
661
754
|
wallets: [].concat(IS_MAINNET ? [{
|
|
662
|
-
wallet: 'AVAX',
|
|
663
|
-
symbol: 'AVAX',
|
|
664
|
-
chain: Chains.AvalancheXChain,
|
|
665
|
-
network: Networks.Mainnet,
|
|
666
|
-
precision: 9,
|
|
667
|
-
contract: undefined,
|
|
668
|
-
hasWithdrawMemo: false
|
|
669
|
-
}, {
|
|
670
755
|
wallet: 'AVAX',
|
|
671
756
|
symbol: 'AVAX',
|
|
672
757
|
chain: Chains.AvalancheCChain,
|
|
@@ -698,48 +783,6 @@ var initializeCoins = function initializeCoins(protonChain) {
|
|
|
698
783
|
}] : []),
|
|
699
784
|
image: 'https://www.protonchain.com/images/tokens/xtokensXMATIC.png',
|
|
700
785
|
coingeckoId: 'matic-network'
|
|
701
|
-
}, {
|
|
702
|
-
allowSwap: false,
|
|
703
|
-
allowBridge: false,
|
|
704
|
-
allowLend: false,
|
|
705
|
-
allowBorrow: false,
|
|
706
|
-
name: 'Luna',
|
|
707
|
-
coin: 'LUNA',
|
|
708
|
-
xtokenSymbol: 'XLUNA',
|
|
709
|
-
xtokenPrecision: 6,
|
|
710
|
-
xtokenContract: 'xtokens',
|
|
711
|
-
wallets: [].concat(IS_MAINNET ? [{
|
|
712
|
-
wallet: 'LUNA',
|
|
713
|
-
symbol: 'LUNA',
|
|
714
|
-
chain: Chains.TerraMainnet,
|
|
715
|
-
network: Networks.Mainnet,
|
|
716
|
-
precision: 6,
|
|
717
|
-
contract: undefined,
|
|
718
|
-
hasWithdrawMemo: true
|
|
719
|
-
}] : []),
|
|
720
|
-
image: 'https://www.protonchain.com/images/tokens/xtokensXLUNA.png',
|
|
721
|
-
coingeckoId: 'terra-luna'
|
|
722
|
-
}, {
|
|
723
|
-
allowSwap: false,
|
|
724
|
-
allowBridge: false,
|
|
725
|
-
allowLend: false,
|
|
726
|
-
allowBorrow: false,
|
|
727
|
-
name: 'TerraUSD',
|
|
728
|
-
coin: 'UST',
|
|
729
|
-
xtokenSymbol: 'XUST',
|
|
730
|
-
xtokenPrecision: 6,
|
|
731
|
-
xtokenContract: 'xtokens',
|
|
732
|
-
wallets: [].concat(IS_MAINNET ? [{
|
|
733
|
-
wallet: 'UST',
|
|
734
|
-
symbol: 'UST',
|
|
735
|
-
chain: Chains.TerraMainnet,
|
|
736
|
-
network: Networks.Mainnet,
|
|
737
|
-
precision: 6,
|
|
738
|
-
contract: undefined,
|
|
739
|
-
hasWithdrawMemo: true
|
|
740
|
-
}] : []),
|
|
741
|
-
image: 'https://www.protonchain.com/images/tokens/xtokensXUST.png',
|
|
742
|
-
coingeckoId: 'terrausd'
|
|
743
786
|
}, {
|
|
744
787
|
allowSwap: false,
|
|
745
788
|
allowBridge: IS_TESTNET,
|
|
@@ -808,6 +851,17 @@ var ExtendedAssetParser = /*#__PURE__*/object({
|
|
|
808
851
|
contract: accountParser
|
|
809
852
|
});
|
|
810
853
|
|
|
854
|
+
var actionParser = /*#__PURE__*/object({
|
|
855
|
+
account: /*#__PURE__*/string(),
|
|
856
|
+
name: /*#__PURE__*/string(),
|
|
857
|
+
authorization: /*#__PURE__*/array( /*#__PURE__*/object({
|
|
858
|
+
actor: /*#__PURE__*/string(),
|
|
859
|
+
permission: /*#__PURE__*/string()
|
|
860
|
+
})),
|
|
861
|
+
data: /*#__PURE__*/any(),
|
|
862
|
+
hex_data: /*#__PURE__*/string().optional()
|
|
863
|
+
});
|
|
864
|
+
var transactionExtensionsParser = /*#__PURE__*/array(number().or(string())).optional();
|
|
811
865
|
var rawTransactionParser = /*#__PURE__*/object({
|
|
812
866
|
expiration: /*#__PURE__*/string(),
|
|
813
867
|
ref_block_num: /*#__PURE__*/number(),
|
|
@@ -815,8 +869,8 @@ var rawTransactionParser = /*#__PURE__*/object({
|
|
|
815
869
|
max_net_usage_words: /*#__PURE__*/number(),
|
|
816
870
|
max_cpu_usage_ms: /*#__PURE__*/number(),
|
|
817
871
|
delay_sec: /*#__PURE__*/number(),
|
|
818
|
-
context_free_actions: /*#__PURE__*/array(
|
|
819
|
-
transaction_extensions: /*#__PURE__*/array(
|
|
872
|
+
context_free_actions: /*#__PURE__*/array(actionParser),
|
|
873
|
+
transaction_extensions: /*#__PURE__*/array(transactionExtensionsParser)
|
|
820
874
|
});
|
|
821
875
|
var baseActionParser = function baseActionParser(contract, action, data) {
|
|
822
876
|
return object({
|
|
@@ -1043,7 +1097,8 @@ var depositBodyParser = /*#__PURE__*/object({
|
|
|
1043
1097
|
type: /*#__PURE__*/nativeEnum(Type),
|
|
1044
1098
|
hash: /*#__PURE__*/string(),
|
|
1045
1099
|
coin: /*#__PURE__*/string(),
|
|
1046
|
-
wallet: /*#__PURE__*/string()
|
|
1100
|
+
wallet: /*#__PURE__*/string() // "ETH-ROPSTEN" or "XPR-MAINNET"
|
|
1101
|
+
|
|
1047
1102
|
});
|
|
1048
1103
|
var transactionParser = /*#__PURE__*/object({
|
|
1049
1104
|
id: /*#__PURE__*/string(),
|
|
@@ -1056,7 +1111,8 @@ var transactionParser = /*#__PURE__*/object({
|
|
|
1056
1111
|
confirmations: /*#__PURE__*/number(),
|
|
1057
1112
|
hash: /*#__PURE__*/string(),
|
|
1058
1113
|
blockHash: /*#__PURE__*/string().optional().nullable(),
|
|
1059
|
-
blockHeight: /*#__PURE__*/number().optional().nullable()
|
|
1114
|
+
blockHeight: /*#__PURE__*/number().optional().nullable() // 643159
|
|
1115
|
+
|
|
1060
1116
|
});
|
|
1061
1117
|
|
|
1062
1118
|
var otcOrderResponseParser = /*#__PURE__*/object({
|