@bitgo/public-types 5.5.0 → 5.5.1

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.
@@ -4,95 +4,34 @@ export declare const TronResourceType: t.KeyofC<{
4
4
  ENERGY: number;
5
5
  }>;
6
6
  export type TronResourceType = t.TypeOf<typeof TronResourceType>;
7
- export declare const TronTransactionType: t.KeyofC<{
8
- freeze: number;
9
- unfreeze: number;
10
- vote: number;
11
- claimRewards: number;
12
- delegateResource: number;
13
- undelegateResource: number;
14
- withdrawExpireUnfreeze: number;
15
- }>;
16
- export type TronTransactionType = t.TypeOf<typeof TronTransactionType>;
17
- export declare const TronTransactionBase: t.TypeC<{
18
- transactionType: t.KeyofC<{
19
- freeze: number;
20
- unfreeze: number;
21
- vote: number;
22
- claimRewards: number;
23
- delegateResource: number;
24
- undelegateResource: number;
25
- withdrawExpireUnfreeze: number;
26
- }>;
27
- }>;
28
- export declare const TronFreezeTransaction: t.IntersectionC<[t.TypeC<{
29
- transactionType: t.KeyofC<{
30
- freeze: number;
31
- unfreeze: number;
32
- vote: number;
33
- claimRewards: number;
34
- delegateResource: number;
35
- undelegateResource: number;
36
- withdrawExpireUnfreeze: number;
37
- }>;
38
- }>, t.TypeC<{
39
- transactionType: t.LiteralC<"freeze">;
7
+ export declare const TronFreezeTransaction: t.TypeC<{
8
+ type: t.LiteralC<"freeze">;
40
9
  owner_address: t.StringC;
41
10
  frozen_balance: t.StringC;
42
11
  resource: t.KeyofC<{
43
12
  BANDWIDTH: number;
44
13
  ENERGY: number;
45
14
  }>;
46
- }>]>;
47
- export declare const TronUnfreezeTransaction: t.IntersectionC<[t.TypeC<{
48
- transactionType: t.KeyofC<{
49
- freeze: number;
50
- unfreeze: number;
51
- vote: number;
52
- claimRewards: number;
53
- delegateResource: number;
54
- undelegateResource: number;
55
- withdrawExpireUnfreeze: number;
56
- }>;
57
- }>, t.TypeC<{
58
- transactionType: t.LiteralC<"unfreeze">;
15
+ }>;
16
+ export declare const TronUnfreezeTransaction: t.TypeC<{
17
+ type: t.LiteralC<"unfreeze">;
59
18
  owner_address: t.StringC;
60
19
  unfreeze_balance: t.StringC;
61
20
  resource: t.KeyofC<{
62
21
  BANDWIDTH: number;
63
22
  ENERGY: number;
64
23
  }>;
65
- }>]>;
66
- export declare const TronVoteTransaction: t.IntersectionC<[t.TypeC<{
67
- transactionType: t.KeyofC<{
68
- freeze: number;
69
- unfreeze: number;
70
- vote: number;
71
- claimRewards: number;
72
- delegateResource: number;
73
- undelegateResource: number;
74
- withdrawExpireUnfreeze: number;
75
- }>;
76
- }>, t.TypeC<{
77
- transactionType: t.LiteralC<"vote">;
24
+ }>;
25
+ export declare const TronVoteTransaction: t.TypeC<{
26
+ type: t.LiteralC<"vote">;
78
27
  owner_address: t.StringC;
79
28
  votes: t.ArrayC<t.TypeC<{
80
29
  vote_address: t.StringC;
81
30
  vote_count: t.StringC;
82
31
  }>>;
83
- }>]>;
32
+ }>;
84
33
  export declare const TronDelegateResourceTransaction: t.IntersectionC<[t.TypeC<{
85
- transactionType: t.KeyofC<{
86
- freeze: number;
87
- unfreeze: number;
88
- vote: number;
89
- claimRewards: number;
90
- delegateResource: number;
91
- undelegateResource: number;
92
- withdrawExpireUnfreeze: number;
93
- }>;
94
- }>, t.TypeC<{
95
- transactionType: t.LiteralC<"delegateResource">;
34
+ type: t.LiteralC<"delegateResource">;
96
35
  owner_address: t.StringC;
97
36
  resource: t.KeyofC<{
98
37
  BANDWIDTH: number;
@@ -104,18 +43,8 @@ export declare const TronDelegateResourceTransaction: t.IntersectionC<[t.TypeC<{
104
43
  lock: t.BooleanC;
105
44
  lock_period: t.UnionC<[t.Type<number, number, unknown>, t.UndefinedC]>;
106
45
  }>]>;
107
- export declare const TronUndelegateResourceTransaction: t.IntersectionC<[t.TypeC<{
108
- transactionType: t.KeyofC<{
109
- freeze: number;
110
- unfreeze: number;
111
- vote: number;
112
- claimRewards: number;
113
- delegateResource: number;
114
- undelegateResource: number;
115
- withdrawExpireUnfreeze: number;
116
- }>;
117
- }>, t.TypeC<{
118
- transactionType: t.LiteralC<"undelegateResource">;
46
+ export declare const TronUndelegateResourceTransaction: t.TypeC<{
47
+ type: t.LiteralC<"undelegateResource">;
119
48
  owner_address: t.StringC;
120
49
  resource: t.KeyofC<{
121
50
  BANDWIDTH: number;
@@ -123,100 +52,40 @@ export declare const TronUndelegateResourceTransaction: t.IntersectionC<[t.TypeC
123
52
  }>;
124
53
  receiver_address: t.StringC;
125
54
  balance: t.StringC;
126
- }>]>;
127
- export declare const TronClaimRewardsTransaction: t.IntersectionC<[t.TypeC<{
128
- transactionType: t.KeyofC<{
129
- freeze: number;
130
- unfreeze: number;
131
- vote: number;
132
- claimRewards: number;
133
- delegateResource: number;
134
- undelegateResource: number;
135
- withdrawExpireUnfreeze: number;
136
- }>;
137
- }>, t.TypeC<{
138
- transactionType: t.LiteralC<"claimRewards">;
55
+ }>;
56
+ export declare const TronClaimRewardsTransaction: t.TypeC<{
57
+ type: t.LiteralC<"claimRewards">;
139
58
  owner_address: t.StringC;
140
- }>]>;
141
- export declare const TronWithdrawExpireUnfreezeTransaction: t.IntersectionC<[t.TypeC<{
142
- transactionType: t.KeyofC<{
143
- freeze: number;
144
- unfreeze: number;
145
- vote: number;
146
- claimRewards: number;
147
- delegateResource: number;
148
- undelegateResource: number;
149
- withdrawExpireUnfreeze: number;
150
- }>;
151
- }>, t.TypeC<{
152
- transactionType: t.LiteralC<"withdrawExpireUnfreeze">;
59
+ }>;
60
+ export declare const TronWithdrawExpireUnfreezeTransaction: t.TypeC<{
61
+ type: t.LiteralC<"withdrawExpireUnfreeze">;
153
62
  owner_address: t.StringC;
154
- }>]>;
155
- export declare const TronTransaction: t.UnionC<[t.IntersectionC<[t.TypeC<{
156
- transactionType: t.KeyofC<{
157
- freeze: number;
158
- unfreeze: number;
159
- vote: number;
160
- claimRewards: number;
161
- delegateResource: number;
162
- undelegateResource: number;
163
- withdrawExpireUnfreeze: number;
164
- }>;
165
- }>, t.TypeC<{
166
- transactionType: t.LiteralC<"freeze">;
63
+ }>;
64
+ export declare const TronTransaction: t.UnionC<[t.TypeC<{
65
+ type: t.LiteralC<"freeze">;
167
66
  owner_address: t.StringC;
168
67
  frozen_balance: t.StringC;
169
68
  resource: t.KeyofC<{
170
69
  BANDWIDTH: number;
171
70
  ENERGY: number;
172
71
  }>;
173
- }>]>, t.IntersectionC<[t.TypeC<{
174
- transactionType: t.KeyofC<{
175
- freeze: number;
176
- unfreeze: number;
177
- vote: number;
178
- claimRewards: number;
179
- delegateResource: number;
180
- undelegateResource: number;
181
- withdrawExpireUnfreeze: number;
182
- }>;
183
72
  }>, t.TypeC<{
184
- transactionType: t.LiteralC<"unfreeze">;
73
+ type: t.LiteralC<"unfreeze">;
185
74
  owner_address: t.StringC;
186
75
  unfreeze_balance: t.StringC;
187
76
  resource: t.KeyofC<{
188
77
  BANDWIDTH: number;
189
78
  ENERGY: number;
190
79
  }>;
191
- }>]>, t.IntersectionC<[t.TypeC<{
192
- transactionType: t.KeyofC<{
193
- freeze: number;
194
- unfreeze: number;
195
- vote: number;
196
- claimRewards: number;
197
- delegateResource: number;
198
- undelegateResource: number;
199
- withdrawExpireUnfreeze: number;
200
- }>;
201
80
  }>, t.TypeC<{
202
- transactionType: t.LiteralC<"vote">;
81
+ type: t.LiteralC<"vote">;
203
82
  owner_address: t.StringC;
204
83
  votes: t.ArrayC<t.TypeC<{
205
84
  vote_address: t.StringC;
206
85
  vote_count: t.StringC;
207
86
  }>>;
208
- }>]>, t.IntersectionC<[t.TypeC<{
209
- transactionType: t.KeyofC<{
210
- freeze: number;
211
- unfreeze: number;
212
- vote: number;
213
- claimRewards: number;
214
- delegateResource: number;
215
- undelegateResource: number;
216
- withdrawExpireUnfreeze: number;
217
- }>;
218
- }>, t.TypeC<{
219
- transactionType: t.LiteralC<"delegateResource">;
87
+ }>, t.IntersectionC<[t.TypeC<{
88
+ type: t.LiteralC<"delegateResource">;
220
89
  owner_address: t.StringC;
221
90
  resource: t.KeyofC<{
222
91
  BANDWIDTH: number;
@@ -227,18 +96,8 @@ export declare const TronTransaction: t.UnionC<[t.IntersectionC<[t.TypeC<{
227
96
  }>, t.PartialC<{
228
97
  lock: t.BooleanC;
229
98
  lock_period: t.UnionC<[t.Type<number, number, unknown>, t.UndefinedC]>;
230
- }>]>, t.IntersectionC<[t.TypeC<{
231
- transactionType: t.KeyofC<{
232
- freeze: number;
233
- unfreeze: number;
234
- vote: number;
235
- claimRewards: number;
236
- delegateResource: number;
237
- undelegateResource: number;
238
- withdrawExpireUnfreeze: number;
239
- }>;
240
- }>, t.TypeC<{
241
- transactionType: t.LiteralC<"undelegateResource">;
99
+ }>]>, t.TypeC<{
100
+ type: t.LiteralC<"undelegateResource">;
242
101
  owner_address: t.StringC;
243
102
  resource: t.KeyofC<{
244
103
  BANDWIDTH: number;
@@ -246,34 +105,13 @@ export declare const TronTransaction: t.UnionC<[t.IntersectionC<[t.TypeC<{
246
105
  }>;
247
106
  receiver_address: t.StringC;
248
107
  balance: t.StringC;
249
- }>]>, t.IntersectionC<[t.TypeC<{
250
- transactionType: t.KeyofC<{
251
- freeze: number;
252
- unfreeze: number;
253
- vote: number;
254
- claimRewards: number;
255
- delegateResource: number;
256
- undelegateResource: number;
257
- withdrawExpireUnfreeze: number;
258
- }>;
259
108
  }>, t.TypeC<{
260
- transactionType: t.LiteralC<"claimRewards">;
109
+ type: t.LiteralC<"claimRewards">;
261
110
  owner_address: t.StringC;
262
- }>]>, t.IntersectionC<[t.TypeC<{
263
- transactionType: t.KeyofC<{
264
- freeze: number;
265
- unfreeze: number;
266
- vote: number;
267
- claimRewards: number;
268
- delegateResource: number;
269
- undelegateResource: number;
270
- withdrawExpireUnfreeze: number;
271
- }>;
272
111
  }>, t.TypeC<{
273
- transactionType: t.LiteralC<"withdrawExpireUnfreeze">;
112
+ type: t.LiteralC<"withdrawExpireUnfreeze">;
274
113
  owner_address: t.StringC;
275
- }>]>]>;
276
- export type TronTransactionBase = t.TypeOf<typeof TronTransactionBase>;
114
+ }>]>;
277
115
  export type TronFreezeTransaction = t.TypeOf<typeof TronFreezeTransaction>;
278
116
  export type TronUnfreezeTransaction = t.TypeOf<typeof TronUnfreezeTransaction>;
279
117
  export type TronVoteTransaction = t.TypeOf<typeof TronVoteTransaction>;
@@ -23,58 +23,36 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.TronTransaction = exports.TronWithdrawExpireUnfreezeTransaction = exports.TronClaimRewardsTransaction = exports.TronUndelegateResourceTransaction = exports.TronDelegateResourceTransaction = exports.TronVoteTransaction = exports.TronUnfreezeTransaction = exports.TronFreezeTransaction = exports.TronTransactionBase = exports.TronTransactionType = exports.TronResourceType = void 0;
26
+ exports.TronTransaction = exports.TronWithdrawExpireUnfreezeTransaction = exports.TronClaimRewardsTransaction = exports.TronUndelegateResourceTransaction = exports.TronDelegateResourceTransaction = exports.TronVoteTransaction = exports.TronUnfreezeTransaction = exports.TronFreezeTransaction = exports.TronResourceType = void 0;
27
27
  const t = __importStar(require("io-ts"));
28
28
  const utils_1 = require("../../utils");
29
29
  exports.TronResourceType = t.keyof({
30
30
  BANDWIDTH: 1,
31
31
  ENERGY: 1,
32
32
  });
33
- exports.TronTransactionType = t.keyof({
34
- freeze: 1,
35
- unfreeze: 1,
36
- vote: 1,
37
- claimRewards: 1,
38
- delegateResource: 1,
39
- undelegateResource: 1,
40
- withdrawExpireUnfreeze: 1,
33
+ exports.TronFreezeTransaction = t.type({
34
+ type: t.literal("freeze"),
35
+ owner_address: t.string,
36
+ frozen_balance: t.string,
37
+ resource: exports.TronResourceType,
41
38
  });
42
- exports.TronTransactionBase = t.type({
43
- transactionType: exports.TronTransactionType,
39
+ exports.TronUnfreezeTransaction = t.type({
40
+ type: t.literal("unfreeze"),
41
+ owner_address: t.string,
42
+ unfreeze_balance: t.string,
43
+ resource: exports.TronResourceType,
44
+ });
45
+ exports.TronVoteTransaction = t.type({
46
+ type: t.literal("vote"),
47
+ owner_address: t.string,
48
+ votes: t.array(t.type({
49
+ vote_address: t.string,
50
+ vote_count: t.string,
51
+ })),
44
52
  });
45
- exports.TronFreezeTransaction = t.intersection([
46
- exports.TronTransactionBase,
47
- t.type({
48
- transactionType: t.literal("freeze"),
49
- owner_address: t.string,
50
- frozen_balance: t.string,
51
- resource: exports.TronResourceType,
52
- }),
53
- ]);
54
- exports.TronUnfreezeTransaction = t.intersection([
55
- exports.TronTransactionBase,
56
- t.type({
57
- transactionType: t.literal("unfreeze"),
58
- owner_address: t.string,
59
- unfreeze_balance: t.string,
60
- resource: exports.TronResourceType,
61
- }),
62
- ]);
63
- exports.TronVoteTransaction = t.intersection([
64
- exports.TronTransactionBase,
65
- t.type({
66
- transactionType: t.literal("vote"),
67
- owner_address: t.string,
68
- votes: t.array(t.type({
69
- vote_address: t.string,
70
- vote_count: t.string,
71
- })),
72
- }),
73
- ]);
74
53
  exports.TronDelegateResourceTransaction = t.intersection([
75
- exports.TronTransactionBase,
76
54
  t.type({
77
- transactionType: t.literal("delegateResource"),
55
+ type: t.literal("delegateResource"),
78
56
  owner_address: t.string,
79
57
  resource: exports.TronResourceType,
80
58
  receiver_address: t.string,
@@ -85,30 +63,21 @@ exports.TronDelegateResourceTransaction = t.intersection([
85
63
  lock_period: utils_1.optionalNumber,
86
64
  }),
87
65
  ]);
88
- exports.TronUndelegateResourceTransaction = t.intersection([
89
- exports.TronTransactionBase,
90
- t.type({
91
- transactionType: t.literal("undelegateResource"),
92
- owner_address: t.string,
93
- resource: exports.TronResourceType,
94
- receiver_address: t.string,
95
- balance: t.string,
96
- }),
97
- ]);
98
- exports.TronClaimRewardsTransaction = t.intersection([
99
- exports.TronTransactionBase,
100
- t.type({
101
- transactionType: t.literal("claimRewards"),
102
- owner_address: t.string,
103
- }),
104
- ]);
105
- exports.TronWithdrawExpireUnfreezeTransaction = t.intersection([
106
- exports.TronTransactionBase,
107
- t.type({
108
- transactionType: t.literal("withdrawExpireUnfreeze"),
109
- owner_address: t.string,
110
- }),
111
- ]);
66
+ exports.TronUndelegateResourceTransaction = t.type({
67
+ type: t.literal("undelegateResource"),
68
+ owner_address: t.string,
69
+ resource: exports.TronResourceType,
70
+ receiver_address: t.string,
71
+ balance: t.string,
72
+ });
73
+ exports.TronClaimRewardsTransaction = t.type({
74
+ type: t.literal("claimRewards"),
75
+ owner_address: t.string,
76
+ });
77
+ exports.TronWithdrawExpireUnfreezeTransaction = t.type({
78
+ type: t.literal("withdrawExpireUnfreeze"),
79
+ owner_address: t.string,
80
+ });
112
81
  exports.TronTransaction = t.union([
113
82
  exports.TronFreezeTransaction,
114
83
  exports.TronUnfreezeTransaction,
@@ -1 +1 @@
1
- {"version":3,"file":"tronTransaction.js","sourceRoot":"","sources":["../../../../src/schema/transactions/tronTransaction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uCAA6C;AAEhC,QAAA,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC;IACtC,SAAS,EAAE,CAAC;IACZ,MAAM,EAAE,CAAC;CACV,CAAC,CAAC;AAGU,QAAA,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC;IACzC,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,CAAC;IACX,IAAI,EAAE,CAAC;IACP,YAAY,EAAE,CAAC;IACf,gBAAgB,EAAE,CAAC;IACnB,kBAAkB,EAAE,CAAC;IACrB,sBAAsB,EAAE,CAAC;CAC1B,CAAC,CAAC;AAGU,QAAA,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC;IACxC,eAAe,EAAE,2BAAmB;CACrC,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAAG,CAAC,CAAC,YAAY,CAAC;IAClD,2BAAmB;IACnB,CAAC,CAAC,IAAI,CAAC;QACL,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;QACpC,aAAa,EAAE,CA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AC9D,2BAAmB;IACnB,CAAC,CAAC,IAAI,CAAC;QACL,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC;QAChD,aAAa,EAAE,CAAC,CAAC,MAAM;QACvB,QAAQ,EAAE,wBAAgB;QAC1B,gBAAgB,EAAE,CAAC,CAAC,MAAM;QAC1B,OAAO,EAAE,CAAC,CAAC,MAAM;KAClB,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG,CAAC,CAAC,YAAY,CAAC;IACxD,2BAAmB;IACnB,CAAC,CAAC,IAAI,CAAC;QACL,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;QAC1C,aAAa,EAAE,CAAC,CAAC,MAAM;KACxB,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,qCAAqC,GAAG,CAAC,CAAC,YAAY,CAAC;IAClE,2BAAmB;IACnB,CAAC,CAAC,IAAI,CAAC;QACL,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,wBAAwB,CAAC;QACpD,aAAa,EAAE,CAAC,CAAC,MAAM;KACxB,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC;IACrC,6BAAqB;IACrB,+BAAuB;IACvB,2BAAmB;IACnB,uCAA+B;IAC/B,yCAAiC;IACjC,mCAA2B;IAC3B,6CAAqC;CACtC,CAAC,CAAC"}
1
+ {"version":3,"file":"tronTransaction.js","sourceRoot":"","sources":["../../../../src/schema/transactions/tronTransaction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uCAA6C;AAEhC,QAAA,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC;IACtC,SAAS,EAAE,CAAC;IACZ,MAAM,EAAE,CAAC;CACV,CAAC,CAAC;AAGU,QAAA,qBAAqB,GAAG,CAAC,CAAC,IAAI,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ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C,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;CAC1D,CAAC;AACW,QAAA,4BAA4B,GAAG,CAAC,CAAC,IAAI,CAAC;IACjD,GAAG,mCAA2B;CAC/B,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -7,59 +7,34 @@ export const TronResourceType = t.keyof({
7
7
  });
8
8
  export type TronResourceType = t.TypeOf<typeof TronResourceType>;
9
9
 
10
- export const TronTransactionType = t.keyof({
11
- freeze: 1,
12
- unfreeze: 1,
13
- vote: 1,
14
- claimRewards: 1,
15
- delegateResource: 1,
16
- undelegateResource: 1,
17
- withdrawExpireUnfreeze: 1,
10
+ export const TronFreezeTransaction = t.type({
11
+ type: t.literal("freeze"),
12
+ owner_address: t.string,
13
+ frozen_balance: t.string,
14
+ resource: TronResourceType,
18
15
  });
19
- export type TronTransactionType = t.TypeOf<typeof TronTransactionType>;
20
16
 
21
- export const TronTransactionBase = t.type({
22
- transactionType: TronTransactionType,
17
+ export const TronUnfreezeTransaction = t.type({
18
+ type: t.literal("unfreeze"),
19
+ owner_address: t.string,
20
+ unfreeze_balance: t.string,
21
+ resource: TronResourceType,
23
22
  });
24
23
 
25
- export const TronFreezeTransaction = t.intersection([
26
- TronTransactionBase,
27
- t.type({
28
- transactionType: t.literal("freeze"),
29
- owner_address: t.string,
30
- frozen_balance: t.string,
31
- resource: TronResourceType,
32
- }),
33
- ]);
34
-
35
- export const TronUnfreezeTransaction = t.intersection([
36
- TronTransactionBase,
37
- t.type({
38
- transactionType: t.literal("unfreeze"),
39
- owner_address: t.string,
40
- unfreeze_balance: t.string,
41
- resource: TronResourceType,
42
- }),
43
- ]);
44
-
45
- export const TronVoteTransaction = t.intersection([
46
- TronTransactionBase,
47
- t.type({
48
- transactionType: t.literal("vote"),
49
- owner_address: t.string,
50
- votes: t.array(
51
- t.type({
52
- vote_address: t.string,
53
- vote_count: t.string,
54
- }),
55
- ),
56
- }),
57
- ]);
24
+ export const TronVoteTransaction = t.type({
25
+ type: t.literal("vote"),
26
+ owner_address: t.string,
27
+ votes: t.array(
28
+ t.type({
29
+ vote_address: t.string,
30
+ vote_count: t.string,
31
+ }),
32
+ ),
33
+ });
58
34
 
59
35
  export const TronDelegateResourceTransaction = t.intersection([
60
- TronTransactionBase,
61
36
  t.type({
62
- transactionType: t.literal("delegateResource"),
37
+ type: t.literal("delegateResource"),
63
38
  owner_address: t.string,
64
39
  resource: TronResourceType,
65
40
  receiver_address: t.string,
@@ -71,32 +46,23 @@ export const TronDelegateResourceTransaction = t.intersection([
71
46
  }),
72
47
  ]);
73
48
 
74
- export const TronUndelegateResourceTransaction = t.intersection([
75
- TronTransactionBase,
76
- t.type({
77
- transactionType: t.literal("undelegateResource"),
78
- owner_address: t.string,
79
- resource: TronResourceType,
80
- receiver_address: t.string,
81
- balance: t.string,
82
- }),
83
- ]);
49
+ export const TronUndelegateResourceTransaction = t.type({
50
+ type: t.literal("undelegateResource"),
51
+ owner_address: t.string,
52
+ resource: TronResourceType,
53
+ receiver_address: t.string,
54
+ balance: t.string,
55
+ });
84
56
 
85
- export const TronClaimRewardsTransaction = t.intersection([
86
- TronTransactionBase,
87
- t.type({
88
- transactionType: t.literal("claimRewards"),
89
- owner_address: t.string,
90
- }),
91
- ]);
57
+ export const TronClaimRewardsTransaction = t.type({
58
+ type: t.literal("claimRewards"),
59
+ owner_address: t.string,
60
+ });
92
61
 
93
- export const TronWithdrawExpireUnfreezeTransaction = t.intersection([
94
- TronTransactionBase,
95
- t.type({
96
- transactionType: t.literal("withdrawExpireUnfreeze"),
97
- owner_address: t.string,
98
- }),
99
- ]);
62
+ export const TronWithdrawExpireUnfreezeTransaction = t.type({
63
+ type: t.literal("withdrawExpireUnfreeze"),
64
+ owner_address: t.string,
65
+ });
100
66
 
101
67
  export const TronTransaction = t.union([
102
68
  TronFreezeTransaction,
@@ -108,7 +74,6 @@ export const TronTransaction = t.union([
108
74
  TronWithdrawExpireUnfreezeTransaction,
109
75
  ]);
110
76
 
111
- export type TronTransactionBase = t.TypeOf<typeof TronTransactionBase>;
112
77
  export type TronFreezeTransaction = t.TypeOf<typeof TronFreezeTransaction>;
113
78
  export type TronUnfreezeTransaction = t.TypeOf<typeof TronUnfreezeTransaction>;
114
79
  export type TronVoteTransaction = t.TypeOf<typeof TronVoteTransaction>;
@@ -33,6 +33,9 @@ export const AddWalletWebhookRequestBody = {
33
33
  listenToFailureStates: Optional(t.boolean),
34
34
  txRequestStates: Optional(t.array(TransactionRequestState)),
35
35
  txRequestTransactionStates: Optional(t.array(TransactionState)),
36
+ /**
37
+ * Custom HTTP header key/values to be included with every notification for the webhook.
38
+ */
36
39
  customHttpHeaders: Optional(t.record(t.string, t.string)),
37
40
  };
38
41
  export const AddWalletWebhookRequestBodyC = t.type({