@proton/wrap-constants 0.0.46 → 0.0.49

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.
@@ -7,9 +7,16 @@ export declare const withdrawHistoryMetalSwapParser: z.ZodObject<{
7
7
  network: z.ZodString;
8
8
  created: z.ZodString;
9
9
  withdrawalAddress: z.ZodString;
10
- withdrawalHash: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
11
- }, {
12
- strict: true;
10
+ withdrawalHash: z.ZodOptional<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ withdrawalHash?: string | undefined;
13
+ id: string;
14
+ status: string;
15
+ amount: string;
16
+ currency: string;
17
+ network: string;
18
+ created: string;
19
+ withdrawalAddress: string;
13
20
  }, {
14
21
  withdrawalHash?: string | undefined;
15
22
  id: string;
@@ -30,9 +37,16 @@ export declare const withdrawHistoryMetalResponseParser: z.ZodObject<{
30
37
  network: z.ZodString;
31
38
  created: z.ZodString;
32
39
  withdrawalAddress: z.ZodString;
33
- withdrawalHash: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
34
- }, {
35
- strict: true;
40
+ withdrawalHash: z.ZodOptional<z.ZodString>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ withdrawalHash?: string | undefined;
43
+ id: string;
44
+ status: string;
45
+ amount: string;
46
+ currency: string;
47
+ network: string;
48
+ created: string;
49
+ withdrawalAddress: string;
36
50
  }, {
37
51
  withdrawalHash?: string | undefined;
38
52
  id: string;
@@ -42,14 +56,28 @@ export declare const withdrawHistoryMetalResponseParser: z.ZodObject<{
42
56
  network: string;
43
57
  created: string;
44
58
  withdrawalAddress: string;
45
- }>>;
59
+ }>, "many">;
46
60
  page: z.ZodNumber;
47
61
  pageSize: z.ZodNumber;
48
62
  numberOfElements: z.ZodNumber;
49
63
  totalPages: z.ZodNumber;
50
64
  totalElements: z.ZodNumber;
51
- }, {
52
- strict: true;
65
+ }, "strip", z.ZodTypeAny, {
66
+ swaps: {
67
+ withdrawalHash?: string | undefined;
68
+ id: string;
69
+ status: string;
70
+ amount: string;
71
+ currency: string;
72
+ network: string;
73
+ created: string;
74
+ withdrawalAddress: string;
75
+ }[];
76
+ page: number;
77
+ pageSize: number;
78
+ numberOfElements: number;
79
+ totalPages: number;
80
+ totalElements: number;
53
81
  }, {
54
82
  swaps: {
55
83
  withdrawalHash?: string | undefined;
@@ -9,8 +9,9 @@ export declare const wrapStartParser: z.ZodObject<{
9
9
  balance: z.ZodObject<{
10
10
  quantity: z.ZodString;
11
11
  contract: z.ZodString;
12
- }, {
13
- strict: true;
12
+ }, "strip", z.ZodTypeAny, {
13
+ quantity: string;
14
+ contract: string;
14
15
  }, {
15
16
  quantity: string;
16
17
  contract: string;
@@ -20,8 +21,16 @@ export declare const wrapStartParser: z.ZodObject<{
20
21
  chain: z.ZodString;
21
22
  deposit_address: z.ZodString;
22
23
  confirmations: z.ZodNumber;
23
- }, {
24
- strict: true;
24
+ }, "strip", z.ZodTypeAny, {
25
+ balance: {
26
+ quantity: string;
27
+ contract: string;
28
+ };
29
+ id: string;
30
+ txid: string;
31
+ chain: string;
32
+ deposit_address: string;
33
+ confirmations: number;
25
34
  }, {
26
35
  balance: {
27
36
  quantity: string;
@@ -37,8 +46,9 @@ export declare type WrapStart = z.infer<typeof wrapStartParser>;
37
46
  export declare const wrapSetConfParser: z.ZodObject<{
38
47
  wrap_hash: z.ZodString;
39
48
  confirmations: z.ZodNumber;
40
- }, {
41
- strict: true;
49
+ }, "strip", z.ZodTypeAny, {
50
+ confirmations: number;
51
+ wrap_hash: string;
42
52
  }, {
43
53
  confirmations: number;
44
54
  wrap_hash: string;
@@ -50,8 +60,9 @@ export declare const wrapParser: z.ZodObject<{
50
60
  balance: z.ZodObject<{
51
61
  quantity: z.ZodString;
52
62
  contract: z.ZodString;
53
- }, {
54
- strict: true;
63
+ }, "strip", z.ZodTypeAny, {
64
+ quantity: string;
65
+ contract: string;
55
66
  }, {
56
67
  quantity: string;
57
68
  contract: string;
@@ -64,9 +75,8 @@ export declare const wrapParser: z.ZodObject<{
64
75
  finish_txid: z.ZodString;
65
76
  wrap_hash: z.ZodString;
66
77
  confirmations: z.ZodNumber;
67
- }, {
68
- strict: true;
69
- }, {
78
+ }, "strip", z.ZodTypeAny, {
79
+ status: Status;
70
80
  balance: {
71
81
  quantity: string;
72
82
  contract: string;
@@ -79,7 +89,21 @@ export declare const wrapParser: z.ZodObject<{
79
89
  wrap_hash: string;
80
90
  index: number;
81
91
  proton_account: string;
92
+ finish_txid: string;
93
+ }, {
82
94
  status: Status;
95
+ balance: {
96
+ quantity: string;
97
+ contract: string;
98
+ };
99
+ id: string;
100
+ txid: string;
101
+ chain: string;
102
+ deposit_address: string;
103
+ confirmations: number;
104
+ wrap_hash: string;
105
+ index: number;
106
+ proton_account: string;
83
107
  finish_txid: string;
84
108
  }>;
85
109
  export declare type Wrap = z.infer<typeof wrapParser>;
@@ -32,6 +32,8 @@ var _similarChains, _explorerLinkByChain;
32
32
  Chains["AvalancheCChain"] = "Avalanche C-Chain";
33
33
  Chains["PolygonMainnet"] = "Polygon";
34
34
  Chains["TerraMainnet"] = "Terra";
35
+ Chains["RippleMainnet"] = "Ripple";
36
+ Chains["SolanaMainnet"] = "Solana";
35
37
  })(exports.Chains || (exports.Chains = {}));
36
38
 
37
39
  (function (Networks) {
@@ -94,6 +96,10 @@ var explorerLinkByChain = (_explorerLinkByChain = {}, _explorerLinkByChain[expor
94
96
  return "https://polygonscan.com/tx/" + txid;
95
97
  }, _explorerLinkByChain[exports.Chains.TerraMainnet] = function (txid) {
96
98
  return "https://terra.stake.id/?#/tx/" + txid;
99
+ }, _explorerLinkByChain[exports.Chains.RippleMainnet] = function (txid) {
100
+ return "https://xrpscan.com/tx/" + txid;
101
+ }, _explorerLinkByChain[exports.Chains.SolanaMainnet] = function (txid) {
102
+ return "https://explorer.solana.com/tx/" + txid;
97
103
  }, _explorerLinkByChain);
98
104
  var initializeCoins = function initializeCoins(protonChain) {
99
105
  var IS_MAINNET = protonChain === 'proton';
@@ -334,7 +340,7 @@ var initializeCoins = function initializeCoins(protonChain) {
334
340
  hasWithdrawMemo: false
335
341
  }] : []),
336
342
  image: 'https://www.protonchain.com/images/tokens/xtokensXPAX.png',
337
- coingeckoId: 'usdp'
343
+ coingeckoId: 'paxos-standard'
338
344
  }, {
339
345
  allowSwap: false,
340
346
  allowBridge: true,
@@ -648,7 +654,93 @@ var initializeCoins = function initializeCoins(protonChain) {
648
654
  }] : []),
649
655
  image: 'https://www.protonchain.com/images/tokens/xtokensXADA.png',
650
656
  coingeckoId: 'cardano'
657
+ }, // Adding
658
+ {
659
+ allowSwap: false,
660
+ allowBridge: IS_MAINNET,
661
+ allowLend: false,
662
+ allowBorrow: false,
663
+ name: 'Terra',
664
+ coin: 'LUNA',
665
+ xtokenSymbol: 'XLUNA',
666
+ xtokenPrecision: 6,
667
+ xtokenContract: 'xtokens',
668
+ wallets: [].concat(IS_MAINNET ? [{
669
+ wallet: 'LUNA',
670
+ symbol: 'LUNA',
671
+ chain: exports.Chains.TerraMainnet,
672
+ network: exports.Networks.Mainnet,
673
+ precision: 6,
674
+ contract: undefined,
675
+ hasWithdrawMemo: true
676
+ }] : []),
677
+ image: 'https://www.protonchain.com/images/tokens/xtokensXLUNA.png',
678
+ coingeckoId: 'terra-luna'
679
+ }, {
680
+ allowSwap: false,
681
+ allowBridge: IS_MAINNET,
682
+ allowLend: false,
683
+ allowBorrow: false,
684
+ name: 'TerraUSD',
685
+ coin: 'UST',
686
+ xtokenSymbol: 'XUST',
687
+ xtokenPrecision: 6,
688
+ xtokenContract: 'xtokens',
689
+ wallets: [].concat(IS_MAINNET ? [{
690
+ wallet: 'UST',
691
+ symbol: 'UST',
692
+ chain: exports.Chains.TerraMainnet,
693
+ network: exports.Networks.Mainnet,
694
+ precision: 6,
695
+ contract: undefined,
696
+ hasWithdrawMemo: true
697
+ }] : []),
698
+ image: 'https://www.protonchain.com/images/tokens/xtokensXUST.png',
699
+ coingeckoId: 'terrausd'
651
700
  }, {
701
+ allowSwap: false,
702
+ allowBridge: IS_MAINNET,
703
+ allowLend: false,
704
+ allowBorrow: false,
705
+ name: 'Solana',
706
+ coin: 'SOL',
707
+ xtokenSymbol: 'XSOL',
708
+ xtokenPrecision: 6,
709
+ xtokenContract: 'xtokens',
710
+ wallets: [].concat(IS_MAINNET ? [{
711
+ wallet: 'SOL',
712
+ symbol: 'SOL',
713
+ chain: exports.Chains.SolanaMainnet,
714
+ network: exports.Networks.Mainnet,
715
+ precision: 9,
716
+ contract: undefined,
717
+ hasWithdrawMemo: false
718
+ }] : []),
719
+ image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xsol.png',
720
+ coingeckoId: 'solana'
721
+ }, {
722
+ allowSwap: false,
723
+ allowBridge: IS_MAINNET,
724
+ allowLend: false,
725
+ allowBorrow: false,
726
+ name: 'Ripple',
727
+ coin: 'XRP',
728
+ xtokenSymbol: 'XXRP',
729
+ xtokenPrecision: 6,
730
+ xtokenContract: 'xtokens',
731
+ wallets: [].concat(IS_MAINNET ? [{
732
+ wallet: 'XRP',
733
+ symbol: 'XRP',
734
+ chain: exports.Chains.RippleMainnet,
735
+ network: exports.Networks.Mainnet,
736
+ precision: 6,
737
+ contract: undefined,
738
+ hasWithdrawMemo: true
739
+ }] : []),
740
+ image: 'https://raw.githubusercontent.com/eoscafe/eos-airdrops/master/logos/xxrp.png',
741
+ coingeckoId: 'ripple'
742
+ }, // Future
743
+ {
652
744
  allowSwap: false,
653
745
  allowBridge: false,
654
746
  allowLend: false,
@@ -659,14 +751,6 @@ var initializeCoins = function initializeCoins(protonChain) {
659
751
  xtokenPrecision: 9,
660
752
  xtokenContract: 'xtokens',
661
753
  wallets: [].concat(IS_MAINNET ? [{
662
- wallet: 'AVAX',
663
- symbol: 'AVAX',
664
- chain: exports.Chains.AvalancheXChain,
665
- network: exports.Networks.Mainnet,
666
- precision: 9,
667
- contract: undefined,
668
- hasWithdrawMemo: false
669
- }, {
670
754
  wallet: 'AVAX',
671
755
  symbol: 'AVAX',
672
756
  chain: exports.Chains.AvalancheCChain,
@@ -698,48 +782,6 @@ var initializeCoins = function initializeCoins(protonChain) {
698
782
  }] : []),
699
783
  image: 'https://www.protonchain.com/images/tokens/xtokensXMATIC.png',
700
784
  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: exports.Chains.TerraMainnet,
715
- network: exports.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: exports.Chains.TerraMainnet,
736
- network: exports.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
785
  }, {
744
786
  allowSwap: false,
745
787
  allowBridge: IS_TESTNET,
@@ -808,6 +850,17 @@ var ExtendedAssetParser = /*#__PURE__*/z.object({
808
850
  contract: accountParser
809
851
  });
810
852
 
853
+ var actionParser = /*#__PURE__*/z.object({
854
+ account: /*#__PURE__*/z.string(),
855
+ name: /*#__PURE__*/z.string(),
856
+ authorization: /*#__PURE__*/z.array( /*#__PURE__*/z.object({
857
+ actor: /*#__PURE__*/z.string(),
858
+ permission: /*#__PURE__*/z.string()
859
+ })),
860
+ data: /*#__PURE__*/z.any(),
861
+ hex_data: /*#__PURE__*/z.string().optional()
862
+ });
863
+ var transactionExtensionsParser = /*#__PURE__*/z.array(z.number().or(z.string())).optional();
811
864
  var rawTransactionParser = /*#__PURE__*/z.object({
812
865
  expiration: /*#__PURE__*/z.string(),
813
866
  ref_block_num: /*#__PURE__*/z.number(),
@@ -815,8 +868,8 @@ var rawTransactionParser = /*#__PURE__*/z.object({
815
868
  max_net_usage_words: /*#__PURE__*/z.number(),
816
869
  max_cpu_usage_ms: /*#__PURE__*/z.number(),
817
870
  delay_sec: /*#__PURE__*/z.number(),
818
- context_free_actions: /*#__PURE__*/z.array( /*#__PURE__*/z.any()),
819
- transaction_extensions: /*#__PURE__*/z.array( /*#__PURE__*/z.any())
871
+ context_free_actions: /*#__PURE__*/z.array(actionParser),
872
+ transaction_extensions: /*#__PURE__*/z.array(transactionExtensionsParser)
820
873
  });
821
874
  var baseActionParser = function baseActionParser(contract, action, data) {
822
875
  return z.object({
@@ -1041,7 +1094,8 @@ var depositBodyParser = /*#__PURE__*/z.object({
1041
1094
  type: /*#__PURE__*/z.nativeEnum(exports.Type),
1042
1095
  hash: /*#__PURE__*/z.string(),
1043
1096
  coin: /*#__PURE__*/z.string(),
1044
- wallet: /*#__PURE__*/z.string()
1097
+ wallet: /*#__PURE__*/z.string() // "ETH-ROPSTEN" or "XPR-MAINNET"
1098
+
1045
1099
  });
1046
1100
  var transactionParser = /*#__PURE__*/z.object({
1047
1101
  id: /*#__PURE__*/z.string(),
@@ -1054,7 +1108,8 @@ var transactionParser = /*#__PURE__*/z.object({
1054
1108
  confirmations: /*#__PURE__*/z.number(),
1055
1109
  hash: /*#__PURE__*/z.string(),
1056
1110
  blockHash: /*#__PURE__*/z.string().optional().nullable(),
1057
- blockHeight: /*#__PURE__*/z.number().optional().nullable()
1111
+ blockHeight: /*#__PURE__*/z.number().optional().nullable() // 643159
1112
+
1058
1113
  });
1059
1114
 
1060
1115
  var otcOrderResponseParser = /*#__PURE__*/z.object({