@proton/wrap-constants 0.0.48 → 0.0.51

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>;
@@ -100,7 +100,8 @@ var explorerLinkByChain = (_explorerLinkByChain = {}, _explorerLinkByChain[expor
100
100
  return "https://xrpscan.com/tx/" + txid;
101
101
  }, _explorerLinkByChain[exports.Chains.SolanaMainnet] = function (txid) {
102
102
  return "https://explorer.solana.com/tx/" + txid;
103
- }, _explorerLinkByChain);
103
+ }, _explorerLinkByChain); // Initialize
104
+
104
105
  var initializeCoins = function initializeCoins(protonChain) {
105
106
  var IS_MAINNET = protonChain === 'proton';
106
107
  var IS_TESTNET = protonChain === 'proton-test';
@@ -271,7 +272,7 @@ var initializeCoins = function initializeCoins(protonChain) {
271
272
  image: 'https://www.protonchain.com/images/tokens/loan.tokenLOAN.png',
272
273
  coingeckoId: 'proton-loan'
273
274
  }, {
274
- allowSwap: IS_MAINNET,
275
+ allowSwap: true,
275
276
  allowBridge: true,
276
277
  allowLend: false,
277
278
  allowBorrow: false,
@@ -850,6 +851,17 @@ var ExtendedAssetParser = /*#__PURE__*/z.object({
850
851
  contract: accountParser
851
852
  });
852
853
 
854
+ var actionParser = /*#__PURE__*/z.object({
855
+ account: /*#__PURE__*/z.string(),
856
+ name: /*#__PURE__*/z.string(),
857
+ authorization: /*#__PURE__*/z.array( /*#__PURE__*/z.object({
858
+ actor: /*#__PURE__*/z.string(),
859
+ permission: /*#__PURE__*/z.string()
860
+ })),
861
+ data: /*#__PURE__*/z.any(),
862
+ hex_data: /*#__PURE__*/z.string().optional()
863
+ });
864
+ var transactionExtensionsParser = /*#__PURE__*/z.array(z.number().or(z.string())).optional();
853
865
  var rawTransactionParser = /*#__PURE__*/z.object({
854
866
  expiration: /*#__PURE__*/z.string(),
855
867
  ref_block_num: /*#__PURE__*/z.number(),
@@ -857,8 +869,8 @@ var rawTransactionParser = /*#__PURE__*/z.object({
857
869
  max_net_usage_words: /*#__PURE__*/z.number(),
858
870
  max_cpu_usage_ms: /*#__PURE__*/z.number(),
859
871
  delay_sec: /*#__PURE__*/z.number(),
860
- context_free_actions: /*#__PURE__*/z.array( /*#__PURE__*/z.any()),
861
- transaction_extensions: /*#__PURE__*/z.array( /*#__PURE__*/z.any())
872
+ context_free_actions: /*#__PURE__*/z.array(actionParser),
873
+ transaction_extensions: /*#__PURE__*/z.array(transactionExtensionsParser)
862
874
  });
863
875
  var baseActionParser = function baseActionParser(contract, action, data) {
864
876
  return z.object({
@@ -1083,7 +1095,8 @@ var depositBodyParser = /*#__PURE__*/z.object({
1083
1095
  type: /*#__PURE__*/z.nativeEnum(exports.Type),
1084
1096
  hash: /*#__PURE__*/z.string(),
1085
1097
  coin: /*#__PURE__*/z.string(),
1086
- wallet: /*#__PURE__*/z.string()
1098
+ wallet: /*#__PURE__*/z.string() // "ETH-ROPSTEN" or "XPR-MAINNET"
1099
+
1087
1100
  });
1088
1101
  var transactionParser = /*#__PURE__*/z.object({
1089
1102
  id: /*#__PURE__*/z.string(),
@@ -1096,7 +1109,8 @@ var transactionParser = /*#__PURE__*/z.object({
1096
1109
  confirmations: /*#__PURE__*/z.number(),
1097
1110
  hash: /*#__PURE__*/z.string(),
1098
1111
  blockHash: /*#__PURE__*/z.string().optional().nullable(),
1099
- blockHeight: /*#__PURE__*/z.number().optional().nullable()
1112
+ blockHeight: /*#__PURE__*/z.number().optional().nullable() // 643159
1113
+
1100
1114
  });
1101
1115
 
1102
1116
  var otcOrderResponseParser = /*#__PURE__*/z.object({