@proton/wrap-constants 0.0.48 → 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.
- package/dist/parsers/actions.d.ts +725 -289
- package/dist/parsers/address.d.ts +582 -101
- package/dist/parsers/auth.d.ts +1296 -340
- 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 +17 -4
- 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 +17 -4
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +6 -5
- package/src/parsers/actions.ts +21 -7
- package/src/parsers/auth.ts +1 -2
|
@@ -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.
|
|
11
|
-
}, {
|
|
12
|
-
|
|
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.
|
|
34
|
-
}, {
|
|
35
|
-
|
|
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
|
-
|
|
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;
|
package/dist/parsers/wrap.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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>;
|
|
@@ -850,6 +850,17 @@ var ExtendedAssetParser = /*#__PURE__*/z.object({
|
|
|
850
850
|
contract: accountParser
|
|
851
851
|
});
|
|
852
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();
|
|
853
864
|
var rawTransactionParser = /*#__PURE__*/z.object({
|
|
854
865
|
expiration: /*#__PURE__*/z.string(),
|
|
855
866
|
ref_block_num: /*#__PURE__*/z.number(),
|
|
@@ -857,8 +868,8 @@ var rawTransactionParser = /*#__PURE__*/z.object({
|
|
|
857
868
|
max_net_usage_words: /*#__PURE__*/z.number(),
|
|
858
869
|
max_cpu_usage_ms: /*#__PURE__*/z.number(),
|
|
859
870
|
delay_sec: /*#__PURE__*/z.number(),
|
|
860
|
-
context_free_actions: /*#__PURE__*/z.array(
|
|
861
|
-
transaction_extensions: /*#__PURE__*/z.array(
|
|
871
|
+
context_free_actions: /*#__PURE__*/z.array(actionParser),
|
|
872
|
+
transaction_extensions: /*#__PURE__*/z.array(transactionExtensionsParser)
|
|
862
873
|
});
|
|
863
874
|
var baseActionParser = function baseActionParser(contract, action, data) {
|
|
864
875
|
return z.object({
|
|
@@ -1083,7 +1094,8 @@ var depositBodyParser = /*#__PURE__*/z.object({
|
|
|
1083
1094
|
type: /*#__PURE__*/z.nativeEnum(exports.Type),
|
|
1084
1095
|
hash: /*#__PURE__*/z.string(),
|
|
1085
1096
|
coin: /*#__PURE__*/z.string(),
|
|
1086
|
-
wallet: /*#__PURE__*/z.string()
|
|
1097
|
+
wallet: /*#__PURE__*/z.string() // "ETH-ROPSTEN" or "XPR-MAINNET"
|
|
1098
|
+
|
|
1087
1099
|
});
|
|
1088
1100
|
var transactionParser = /*#__PURE__*/z.object({
|
|
1089
1101
|
id: /*#__PURE__*/z.string(),
|
|
@@ -1096,7 +1108,8 @@ var transactionParser = /*#__PURE__*/z.object({
|
|
|
1096
1108
|
confirmations: /*#__PURE__*/z.number(),
|
|
1097
1109
|
hash: /*#__PURE__*/z.string(),
|
|
1098
1110
|
blockHash: /*#__PURE__*/z.string().optional().nullable(),
|
|
1099
|
-
blockHeight: /*#__PURE__*/z.number().optional().nullable()
|
|
1111
|
+
blockHeight: /*#__PURE__*/z.number().optional().nullable() // 643159
|
|
1112
|
+
|
|
1100
1113
|
});
|
|
1101
1114
|
|
|
1102
1115
|
var otcOrderResponseParser = /*#__PURE__*/z.object({
|