@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
@@ -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
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
22
|
-
|
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
|
26
|
-
|
27
|
-
t.
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
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
|
-
|
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.
|
75
|
-
|
76
|
-
t.
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
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.
|
86
|
-
|
87
|
-
t.
|
88
|
-
|
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.
|
94
|
-
|
95
|
-
t.
|
96
|
-
|
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({
|