@bitgo/public-types 5.4.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.
- package/dist/src/schema/transactionRequest/intents/index.d.ts +3 -0
- package/dist/src/schema/transactionRequest/intents/index.js +3 -0
- package/dist/src/schema/transactionRequest/intents/index.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/intent.d.ts +157 -1
- package/dist/src/schema/transactionRequest/intents/intent.js +4 -0
- package/dist/src/schema/transactionRequest/intents/intent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/polyxBaseIntent.d.ts +79 -0
- package/dist/src/schema/transactionRequest/intents/polyxBaseIntent.js +38 -0
- package/dist/src/schema/transactionRequest/intents/polyxBaseIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/polyxStakeIntent.d.ts +2 -2
- package/dist/src/schema/transactionRequest/intents/polyxStakeIntent.js +4 -6
- package/dist/src/schema/transactionRequest/intents/polyxStakeIntent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/polyxUnstakeIntent.d.ts +81 -0
- package/dist/src/schema/transactionRequest/intents/polyxUnstakeIntent.js +36 -0
- package/dist/src/schema/transactionRequest/intents/polyxUnstakeIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/polyxWithdrawIntent.d.ts +81 -0
- package/dist/src/schema/transactionRequest/intents/polyxWithdrawIntent.js +36 -0
- package/dist/src/schema/transactionRequest/intents/polyxWithdrawIntent.js.map +1 -0
- package/dist/src/schema/transactions/tronTransaction.d.ts +30 -192
- package/dist/src/schema/transactions/tronTransaction.js +35 -66
- package/dist/src/schema/transactions/tronTransaction.js.map +1 -1
- package/dist/src/schema/webhook/addWalletWebhookRequest.js.map +1 -1
- package/package.json +1 -1
- package/src/schema/transactionRequest/intents/index.ts +3 -0
- package/src/schema/transactionRequest/intents/intent.ts +4 -0
- package/src/schema/transactionRequest/intents/polyxBaseIntent.ts +18 -0
- package/src/schema/transactionRequest/intents/polyxStakeIntent.ts +4 -6
- package/src/schema/transactionRequest/intents/polyxUnstakeIntent.ts +15 -0
- package/src/schema/transactionRequest/intents/polyxWithdrawIntent.ts +15 -0
- package/src/schema/transactions/tronTransaction.ts +36 -71
- package/src/schema/webhook/addWalletWebhookRequest.ts +3 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
+
}) : function(o, v) {
|
16
|
+
o["default"] = v;
|
17
|
+
});
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
+
if (mod && mod.__esModule) return mod;
|
20
|
+
var result = {};
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
+
__setModuleDefault(result, mod);
|
23
|
+
return result;
|
24
|
+
};
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
+
exports.PolyxWithdrawIntent = void 0;
|
27
|
+
const t = __importStar(require("io-ts"));
|
28
|
+
const polyxBaseIntent_1 = require("./polyxBaseIntent");
|
29
|
+
const intentType_1 = require("./intentType");
|
30
|
+
exports.PolyxWithdrawIntent = t.intersection([
|
31
|
+
polyxBaseIntent_1.PolyxBaseIntent,
|
32
|
+
t.type({
|
33
|
+
intentType: intentType_1.intentTypes.claim,
|
34
|
+
}),
|
35
|
+
]);
|
36
|
+
//# sourceMappingURL=polyxWithdrawIntent.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"polyxWithdrawIntent.js","sourceRoot":"","sources":["../../../../../src/schema/transactionRequest/intents/polyxWithdrawIntent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,uDAAoD;AACpD,6CAA2C;AAK9B,QAAA,mBAAmB,GAAG,CAAC,CAAC,YAAY,CAAC;IAChD,iCAAe;IACf,CAAC,CAAC,IAAI,CAAC;QACL,UAAU,EAAE,wBAAW,CAAC,KAAK;KAC9B,CAAC;CACH,CAAC,CAAC"}
|
@@ -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
|
8
|
-
|
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.
|
48
|
-
|
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.
|
67
|
-
|
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
|
-
|
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.
|
108
|
-
|
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.
|
128
|
-
|
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.
|
142
|
-
|
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.
|
156
|
-
|
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
|
-
|
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
|
-
|
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
|
-
}
|
209
|
-
|
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.
|
231
|
-
|
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
|
-
|
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
|
-
|
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.
|
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.
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
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.
|
43
|
-
|
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
|
-
|
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.
|
89
|
-
|
90
|
-
t.
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
t.
|
101
|
-
|
102
|
-
|
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,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CAAC,CAAC,MAAM;QACvB,QAAQ,EAAE,wBAAgB;QAC1B,gBAAgB,EAAE,CAAC,CAAC,MAAM;QAC1B,OAAO,EAAE,CAAC,CAAC,MAAM;KAClB,CAAC;IACF,CAAC,CAAC,OAAO,CAAC;QACR,IAAI,EAAE,CAAC,CAAC,OAAO;QACf,WAAW,EAAE,sBAAc;KAC5B,CAAC;CACH,CAAC,CAAC;AAEU,QAAA,iCAAiC,GAAG,CAAC,CAAC,IAAI,CAAC;IACtD,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC;IACrC,aAAa,EAAE,CAAC,CAAC,MAAM;IACvB,QAAQ,EAAE,wBAAgB;IAC1B,gBAAgB,EAAE,CAAC,CAAC,MAAM;IAC1B,OAAO,EAAE,CAAC,CAAC,MAAM;CAClB,CAAC,CAAC;AAEU,QAAA,2BAA2B,GAAG,CAAC,CAAC,IAAI,CAAC;IAChD,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC;IAC/B,aAAa,EAAE,CAAC,CAAC,MAAM;CACxB,CAAC,CAAC;AAEU,QAAA,qCAAqC,GAAG,CAAC,CAAC,IAAI,CAAC;IAC1D,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,wBAAwB,CAAC;IACzC,aAAa,EAAE,CAAC,CAAC,MAAM;CACxB,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 +1 @@
|
|
1
|
-
{"version":3,"file":"addWalletWebhookRequest.js","sourceRoot":"","sources":["../../../../src/schema/webhook/addWalletWebhookRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAC3B,6CAA+D;AAC/D,mDAAgD;AAChD,2FAAwF;AACxF,6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A,mBAAQ,EAAC,CAAC,CAAC,KAAK,CAAC,iDAAuB,CAAC,CAAC;IAC3D,0BAA0B,EAAE,IAAA,mBAAQ,EAAC,CAAC,CAAC,KAAK,CAAC,mCAAgB,CAAC,CAAC;IAI/D,iBAAiB,EAAE,IAAA,mBAAQ,EAAC,CAAC,CAAC,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
@@ -74,7 +74,10 @@ export * from "./mmiSignTransactionIntent";
|
|
74
74
|
export * from "./nearStakeIntent";
|
75
75
|
export * from "./nearUnstakeIntent";
|
76
76
|
export * from "./nearWithdrawIntent";
|
77
|
+
export * from "./polyxBaseIntent";
|
77
78
|
export * from "./polyxStakeIntent";
|
79
|
+
export * from "./polyxUnstakeIntent";
|
80
|
+
export * from "./polyxWithdrawIntent";
|
78
81
|
export * from "./paymentIntent";
|
79
82
|
export * from "./recipientEntry";
|
80
83
|
export * from "./signMessageIntent";
|
@@ -35,6 +35,8 @@ import { NearUnstakeIntent } from "./nearUnstakeIntent";
|
|
35
35
|
import { NearWithdrawIntent } from "./nearWithdrawIntent";
|
36
36
|
import { PolyxCreateAccountIntent } from "./polyxCreateAccountIntent";
|
37
37
|
import { PolyxStakeIntent } from "./polyxStakeIntent";
|
38
|
+
import { PolyxUnstakeIntent } from "./polyxUnstakeIntent";
|
39
|
+
import { PolyxWithdrawIntent } from "./polyxWithdrawIntent";
|
38
40
|
import { SolAuthorizeIntent } from "./solAuthorizeIntent";
|
39
41
|
import { SolClaimIntent } from "./solClaimIntent";
|
40
42
|
import { SolCreateAssociatedTokenAccountIntent } from "./solCreateAssociatedTokenAccountIntent";
|
@@ -122,6 +124,8 @@ export const TransactionIntent = t.union([
|
|
122
124
|
NearWithdrawIntent,
|
123
125
|
PolyxCreateAccountIntent,
|
124
126
|
PolyxStakeIntent,
|
127
|
+
PolyxUnstakeIntent,
|
128
|
+
PolyxWithdrawIntent,
|
125
129
|
SolAuthorizeIntent,
|
126
130
|
SolClaimIntent,
|
127
131
|
SolCloseAssociatedTokenAccountIntent,
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import * as t from "io-ts";
|
2
|
+
import { SubstrateAccountBaseBuildOptions } from "./substrateAccountBaseBuildOptions";
|
3
|
+
import { RecipientEntry } from "./recipientEntry";
|
4
|
+
import { BaseStakeIntent } from "./baseStakeIntent";
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @title POLYX Base Intent
|
8
|
+
* Common base for all POLYX staking-related intents
|
9
|
+
*/
|
10
|
+
export const PolyxBaseIntent = t.intersection([
|
11
|
+
BaseStakeIntent,
|
12
|
+
SubstrateAccountBaseBuildOptions,
|
13
|
+
t.type({
|
14
|
+
recipients: t.array(RecipientEntry),
|
15
|
+
}),
|
16
|
+
]);
|
17
|
+
|
18
|
+
export type PolyxBaseIntent = t.TypeOf<typeof PolyxBaseIntent>;
|
@@ -1,17 +1,15 @@
|
|
1
1
|
import * as t from "io-ts";
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { RecipientEntry } from "./recipientEntry";
|
2
|
+
import { PolyxBaseIntent } from "./polyxBaseIntent";
|
3
|
+
import { intentTypes } from "./intentType";
|
5
4
|
import { optionalBoolean } from "../../../utils";
|
6
5
|
|
7
6
|
/**
|
8
7
|
* @title POLYX Stake Intent
|
9
8
|
*/
|
10
9
|
export const PolyxStakeIntent = t.intersection([
|
11
|
-
|
12
|
-
SubstrateAccountBaseBuildOptions,
|
10
|
+
PolyxBaseIntent,
|
13
11
|
t.type({
|
14
|
-
|
12
|
+
intentType: intentTypes.stake,
|
15
13
|
}),
|
16
14
|
t.partial({
|
17
15
|
addToStake: optionalBoolean,
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import * as t from "io-ts";
|
2
|
+
import { PolyxBaseIntent } from "./polyxBaseIntent";
|
3
|
+
import { intentTypes } from "./intentType";
|
4
|
+
|
5
|
+
/**
|
6
|
+
* @title POLYX Unstake Intent
|
7
|
+
*/
|
8
|
+
export const PolyxUnstakeIntent = t.intersection([
|
9
|
+
PolyxBaseIntent,
|
10
|
+
t.type({
|
11
|
+
intentType: intentTypes.unstake,
|
12
|
+
}),
|
13
|
+
]);
|
14
|
+
|
15
|
+
export type PolyxUnstakeIntent = t.TypeOf<typeof PolyxUnstakeIntent>;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import * as t from "io-ts";
|
2
|
+
import { PolyxBaseIntent } from "./polyxBaseIntent";
|
3
|
+
import { intentTypes } from "./intentType";
|
4
|
+
|
5
|
+
/**
|
6
|
+
* @title POLYX Withdraw Intent
|
7
|
+
*/
|
8
|
+
export const PolyxWithdrawIntent = t.intersection([
|
9
|
+
PolyxBaseIntent,
|
10
|
+
t.type({
|
11
|
+
intentType: intentTypes.claim,
|
12
|
+
}),
|
13
|
+
]);
|
14
|
+
|
15
|
+
export type PolyxWithdrawIntent = t.TypeOf<typeof PolyxWithdrawIntent>;
|