@bitgo/public-types 5.71.0 → 5.73.0
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 +4 -0
- package/dist/src/schema/transactionRequest/intents/index.js +4 -0
- package/dist/src/schema/transactionRequest/intents/index.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/intent.d.ts +236 -0
- package/dist/src/schema/transactionRequest/intents/intent.js +8 -0
- package/dist/src/schema/transactionRequest/intents/intent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/tonMultiNominatorDelegateIntent.d.ts +64 -0
- package/dist/src/schema/transactionRequest/intents/tonMultiNominatorDelegateIntent.js +40 -0
- package/dist/src/schema/transactionRequest/intents/tonMultiNominatorDelegateIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/tonMultiNominatorUndelegateIntent.d.ts +59 -0
- package/dist/src/schema/transactionRequest/intents/tonMultiNominatorUndelegateIntent.js +39 -0
- package/dist/src/schema/transactionRequest/intents/tonMultiNominatorUndelegateIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/tonSingleNominatorDelegateIntent.d.ts +65 -0
- package/dist/src/schema/transactionRequest/intents/tonSingleNominatorDelegateIntent.js +41 -0
- package/dist/src/schema/transactionRequest/intents/tonSingleNominatorDelegateIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/tonSingleNominatorUndelegateIntent.d.ts +64 -0
- package/dist/src/schema/transactionRequest/intents/tonSingleNominatorUndelegateIntent.js +40 -0
- package/dist/src/schema/transactionRequest/intents/tonSingleNominatorUndelegateIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/transactionRequest.d.ts +472 -0
- package/dist/src/schema/webhook/webhookType.d.ts +2 -1
- package/dist/src/schema/webhook/webhookType.js +1 -0
- package/dist/src/schema/webhook/webhookType.js.map +1 -1
- package/package.json +1 -1
- package/src/schema/transactionRequest/intents/index.ts +4 -0
- package/src/schema/transactionRequest/intents/intent.ts +8 -0
- package/src/schema/transactionRequest/intents/tonMultiNominatorDelegateIntent.ts +27 -0
- package/src/schema/transactionRequest/intents/tonMultiNominatorUndelegateIntent.ts +26 -0
- package/src/schema/transactionRequest/intents/tonSingleNominatorDelegateIntent.ts +29 -0
- package/src/schema/transactionRequest/intents/tonSingleNominatorUndelegateIntent.ts +27 -0
- package/src/schema/webhook/webhookType.ts +3 -0
|
@@ -26,7 +26,8 @@ export declare enum WebhookTypeEnum {
|
|
|
26
26
|
"policyBalanceChange" = "policyBalanceChange",
|
|
27
27
|
"reversal" = "reversal",
|
|
28
28
|
"transaction_finality_on_l1" = "transaction_finality_on_l1",
|
|
29
|
-
"stuckTx" = "stuckTx"
|
|
29
|
+
"stuckTx" = "stuckTx",
|
|
30
|
+
"tradeOrder" = "tradeOrder"
|
|
30
31
|
}
|
|
31
32
|
export declare const WebhookType: t.KeyofC<typeof WebhookTypeEnum>;
|
|
32
33
|
export type WebhookType = t.TypeOf<typeof WebhookType>;
|
|
@@ -54,6 +54,7 @@ var WebhookTypeEnum;
|
|
|
54
54
|
WebhookTypeEnum["reversal"] = "reversal";
|
|
55
55
|
WebhookTypeEnum["transaction_finality_on_l1"] = "transaction_finality_on_l1";
|
|
56
56
|
WebhookTypeEnum["stuckTx"] = "stuckTx";
|
|
57
|
+
WebhookTypeEnum["tradeOrder"] = "tradeOrder";
|
|
57
58
|
})(WebhookTypeEnum || (exports.WebhookTypeEnum = WebhookTypeEnum = {}));
|
|
58
59
|
exports.WebhookType = t.keyof(WebhookTypeEnum, "WebhookType");
|
|
59
60
|
var WalletWebhookTypeEnum;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhookType.js","sourceRoot":"","sources":["../../../../src/schema/webhook/webhookType.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA2B;AAE3B,IAAY,
|
|
1
|
+
{"version":3,"file":"webhookType.js","sourceRoot":"","sources":["../../../../src/schema/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,qBAAqB,qCAArB,qBAAqB,QAiBhC;AAEY,QAAA,iBAAiB,GAAG,CAAC,CAAC,KAAK,CACtC,qBAAqB,EACrB,mBAAmB,CACpB,CAAC;AAGF,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACnC,wDAA6B,CAAA;IAC7B,wDAA6B,CAAA;IAC7B,wEAA6C,CAAA;IAC7C,kDAAuB,CAAA;AACzB,CAAC,EALW,yBAAyB,yCAAzB,yBAAyB,QAKpC;AACY,QAAA,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAC1C,yBAAyB,EACzB,uBAAuB,CACxB,CAAC;AAGF,IAAY,2BAYX;AAZD,WAAY,2BAA2B;IACrC,oDAAuB,CAAA;IACvB,sDAAyB,CAAA;IACzB,kEAAqC,CAAA;IACrC,4EAA+C,CAAA;IAC/C,0DAA6B,CAAA;IAC7B,gEAAmC,CAAA;IACnC,4DAA+B,CAAA;IAC/B,wEAA2C,CAAA;IAC3C,0DAA6B,CAAA;IAC7B,oDAAuB,CAAA;IACvB,wDAA2B,CAAA;AAC7B,CAAC,EAZW,2BAA2B,2CAA3B,2BAA2B,QAYtC;AACY,QAAA,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC5C,2BAA2B,EAC3B,yBAAyB,CAC1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -147,7 +147,11 @@ export * from "./tokenRecipientEntry";
|
|
|
147
147
|
export * from "./tokenRecipientEntryItem";
|
|
148
148
|
export * from "./tonConsolidateIntent";
|
|
149
149
|
export * from "./tonDelegateIntent";
|
|
150
|
+
export * from "./tonMultiNominatorDelegateIntent";
|
|
151
|
+
export * from "./tonMultiNominatorUndelegateIntent";
|
|
150
152
|
export * from "./tonPaymentIntent";
|
|
153
|
+
export * from "./tonSingleNominatorDelegateIntent";
|
|
154
|
+
export * from "./tonSingleNominatorUndelegateIntent";
|
|
151
155
|
export * from "./tonStakingType";
|
|
152
156
|
export * from "./tonUndelegateIntent";
|
|
153
157
|
export * from "./tonWhalesDelegateIntent";
|
|
@@ -65,7 +65,11 @@ import { TaoTransferStakeIntent } from "./taoTransferStakeIntent";
|
|
|
65
65
|
import { TaoUnstakeIntent } from "./taoUnstakeIntent";
|
|
66
66
|
import { TokenApprovalIntent } from "./tokenApprovalIntent";
|
|
67
67
|
import { TonDelegateIntent } from "./tonDelegateIntent";
|
|
68
|
+
import { TonMultiNominatorDelegateIntent } from "./tonMultiNominatorDelegateIntent";
|
|
69
|
+
import { TonMultiNominatorUndelegateIntent } from "./tonMultiNominatorUndelegateIntent";
|
|
68
70
|
import { TonPaymentIntent } from "./tonPaymentIntent";
|
|
71
|
+
import { TonSingleNominatorDelegateIntent } from "./tonSingleNominatorDelegateIntent";
|
|
72
|
+
import { TonSingleNominatorUndelegateIntent } from "./tonSingleNominatorUndelegateIntent";
|
|
69
73
|
import { TonUndelegateIntent } from "./tonUndelegateIntent";
|
|
70
74
|
import { WalletRecoveryIntent } from "./walletRecoveryIntent";
|
|
71
75
|
import { SolConsolidateIntent } from "./solConsolidateIntent";
|
|
@@ -186,7 +190,11 @@ export const TransactionIntent = t.union([
|
|
|
186
190
|
TokenApprovalIntent,
|
|
187
191
|
TonConsolidateIntent,
|
|
188
192
|
TonDelegateIntent,
|
|
193
|
+
TonMultiNominatorDelegateIntent,
|
|
194
|
+
TonMultiNominatorUndelegateIntent,
|
|
189
195
|
TonPaymentIntent,
|
|
196
|
+
TonSingleNominatorDelegateIntent,
|
|
197
|
+
TonSingleNominatorUndelegateIntent,
|
|
190
198
|
TonUndelegateIntent,
|
|
191
199
|
TonWhalesDelegateIntent,
|
|
192
200
|
TonWhalesUndelegateIntent,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { intentTypes } from "./intentType";
|
|
3
|
+
import { TonStakingTypeEnum } from "./tonStakingType";
|
|
4
|
+
import { BaseIntent, BaseIntentWithAmount } from "./baseIntent";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @title TON Multi Nominator Delegate Intent
|
|
8
|
+
*
|
|
9
|
+
* @description The intent for delegate/stake requests to TON Multi-Nominator pools
|
|
10
|
+
*
|
|
11
|
+
* @param {string} intentType The type of intent (always set to delegate)
|
|
12
|
+
* @param {string} validatorAddress The address of the validator
|
|
13
|
+
* @param {string} tonStakingType The type of TON staking (always set to MULTI_NOMINATOR)
|
|
14
|
+
*/
|
|
15
|
+
export const TonMultiNominatorDelegateIntent = t.intersection([
|
|
16
|
+
BaseIntent,
|
|
17
|
+
BaseIntentWithAmount,
|
|
18
|
+
t.type({
|
|
19
|
+
intentType: intentTypes.delegate,
|
|
20
|
+
validatorAddress: t.string,
|
|
21
|
+
tonStakingType: t.literal(TonStakingTypeEnum.MULTI_NOMINATOR),
|
|
22
|
+
}),
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
export type TonMultiNominatorDelegateIntent = t.TypeOf<
|
|
26
|
+
typeof TonMultiNominatorDelegateIntent
|
|
27
|
+
>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { intentTypes } from "./intentType";
|
|
3
|
+
import { TonStakingTypeEnum } from "./tonStakingType";
|
|
4
|
+
import { BaseIntent } from "./baseIntent";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @title TON Multi Nominator Undelegate Intent
|
|
8
|
+
*
|
|
9
|
+
* @description The intent for undelegate/unstake requests from TON Multi-Nominator pools
|
|
10
|
+
*
|
|
11
|
+
* @param {string} intentType The type of intent (always set to undelegate)
|
|
12
|
+
* @param {string} validatorAddress The address of the validator
|
|
13
|
+
* @param {string} tonStakingType The type of TON staking (always set to MULTI_NOMINATOR)
|
|
14
|
+
*/
|
|
15
|
+
export const TonMultiNominatorUndelegateIntent = t.intersection([
|
|
16
|
+
BaseIntent,
|
|
17
|
+
t.type({
|
|
18
|
+
intentType: intentTypes.undelegate,
|
|
19
|
+
validatorAddress: t.string,
|
|
20
|
+
tonStakingType: t.literal(TonStakingTypeEnum.MULTI_NOMINATOR),
|
|
21
|
+
}),
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
export type TonMultiNominatorUndelegateIntent = t.TypeOf<
|
|
25
|
+
typeof TonMultiNominatorUndelegateIntent
|
|
26
|
+
>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { intentTypes } from "./intentType";
|
|
3
|
+
import { TonStakingTypeEnum } from "./tonStakingType";
|
|
4
|
+
import { BaseIntent, BaseIntentWithAmount } from "./baseIntent";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @title TON Single Nominator Delegate Intent
|
|
8
|
+
*
|
|
9
|
+
* @description The intent for delegate/stake requests to TON Single Nominator pools
|
|
10
|
+
*
|
|
11
|
+
* @param {string} intentType The type of intent (always set to delegate)
|
|
12
|
+
* @param {string} validatorAddress The address of the validator
|
|
13
|
+
* @param {string} ownerAddress The owner wallet address of the single nominator pool
|
|
14
|
+
* @param {string} tonStakingType The type of TON staking (always set to SINGLE_NOMINATOR)
|
|
15
|
+
*/
|
|
16
|
+
export const TonSingleNominatorDelegateIntent = t.intersection([
|
|
17
|
+
BaseIntent,
|
|
18
|
+
BaseIntentWithAmount,
|
|
19
|
+
t.type({
|
|
20
|
+
intentType: intentTypes.delegate,
|
|
21
|
+
validatorAddress: t.string,
|
|
22
|
+
ownerAddress: t.string,
|
|
23
|
+
tonStakingType: t.literal(TonStakingTypeEnum.SINGLE_NOMINATOR),
|
|
24
|
+
}),
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
export type TonSingleNominatorDelegateIntent = t.TypeOf<
|
|
28
|
+
typeof TonSingleNominatorDelegateIntent
|
|
29
|
+
>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { intentTypes } from "./intentType";
|
|
3
|
+
import { TonStakingTypeEnum } from "./tonStakingType";
|
|
4
|
+
import { BaseIntent, BaseIntentWithAmount } from "./baseIntent";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @title TON Single Nominator Undelegate Intent
|
|
8
|
+
*
|
|
9
|
+
* @description The intent for undelegate/unstake requests from TON Single Nominator pools
|
|
10
|
+
*
|
|
11
|
+
* @param {string} intentType The type of intent (always set to undelegate)
|
|
12
|
+
* @param {string} validatorAddress The address of the validator
|
|
13
|
+
* @param {string} tonStakingType The type of TON staking (always set to SINGLE_NOMINATOR)
|
|
14
|
+
*/
|
|
15
|
+
export const TonSingleNominatorUndelegateIntent = t.intersection([
|
|
16
|
+
BaseIntent,
|
|
17
|
+
BaseIntentWithAmount,
|
|
18
|
+
t.type({
|
|
19
|
+
intentType: intentTypes.undelegate,
|
|
20
|
+
validatorAddress: t.string,
|
|
21
|
+
tonStakingType: t.literal(TonStakingTypeEnum.SINGLE_NOMINATOR),
|
|
22
|
+
}),
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
export type TonSingleNominatorUndelegateIntent = t.TypeOf<
|
|
26
|
+
typeof TonSingleNominatorUndelegateIntent
|
|
27
|
+
>;
|
|
@@ -42,6 +42,9 @@ export enum WebhookTypeEnum {
|
|
|
42
42
|
|
|
43
43
|
// Webhook for stuck transaction notification
|
|
44
44
|
"stuckTx" = "stuckTx",
|
|
45
|
+
|
|
46
|
+
// Webhook for trade order events
|
|
47
|
+
"tradeOrder" = "tradeOrder",
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
export const WebhookType = t.keyof(WebhookTypeEnum, "WebhookType");
|