@bitgo/public-types 5.33.0 → 5.35.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/accelerationIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/accountBaseCreateAccountIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/accountBaseUpdateAccountIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/adaPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/adaPledgeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/adaStakeClaimRewardsIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/adaStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/adaUnstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/adaVoteDelegationIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/aptCustomTxIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/atomPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/atomStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/atomUnstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/atomWithdrawIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/babyCreateBtcDelegationIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/babyWithdrawRewardIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/baseGoStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/baseIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/baseStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/baseStakeIntentWithCalldata.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/beraDelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/bscDelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/bscStakeClaimRewardsIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/bscUndelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/bscWithdrawUndelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferAcceptIntent.d.ts +51 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferAcceptIntent.js +37 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferAcceptIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferRejectIntent.d.ts +51 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferRejectIntent.js +37 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferRejectIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/consolidateTokenIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/coredaoClaimIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/coredaoDelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/coredaoUndelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/cosmosPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/cosmosStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/cosmosSwitchValidatorIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/cosmosUnstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/cosmosWithdrawIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/dotBaseIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/dotCreateAccountIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/dotPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/dotStakingIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/dotUnstakingIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/dotWithdrawStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/enableTokenIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/ethAccelerationIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/ethConsolidateTokenIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/ethFillNonceIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/ethLikeStakeIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/ethPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/ethStakingIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/ethTransferTokenIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/feeAddressTransferIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/fillNonceIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/goUnstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/icpPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/index.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/index.js +2 -0
- package/dist/src/schema/transactionRequest/intents/index.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/intent.d.ts +284 -2
- 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/intentType.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/intentType.js +2 -0
- package/dist/src/schema/transactionRequest/intents/intentType.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/lightningPaymentIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/mmiSignMessageIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/mmiSignTransactionIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/nearStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/nearUnstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/nearWithdrawIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/paymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/polyxBaseIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/polyxCreateAccountIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/polyxPreApproveAssetIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/polyxStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/polyxUnstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/polyxWithdrawIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/signMessageIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/solAuthorizeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/solClaimIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/solCloseAssociatedTokenAccountIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/solCreateAssociatedTokenAccountIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/solCustomTxIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/solDeactivateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/solDelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/solGoUnstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/solPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/solStakeIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/solUnstakeIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/solVersionedCustomTxIntent.d.ts +6 -2
- package/dist/src/schema/transactionRequest/intents/solVersionedCustomTxIntent.js +22 -17
- package/dist/src/schema/transactionRequest/intents/solVersionedCustomTxIntent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/stakeClaimRewardsIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/stakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/stakeSwitchValidatorIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/substrateBaseIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/substratePaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/suiBuildOptions.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/suiConsolidateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/suiCustomTxIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/suiGoUnstakeIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/suiPaymentIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/suiStakingIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/suiUnstakingIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/taoStakeIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/taoStakingBaseIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/taoSwitchValidatorIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/taoUnstakeIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/tokenApprovalIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tonDelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tonPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/transferTokenIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/unstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/vetStakeClaimRewardsIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/vetStakingIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/vetUnstakingIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/voteDelegationIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/walletRecoveryIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/walrusStakingIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/walrusUndelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/walrusWithdrawIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/withdrawIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/transactionRequest.d.ts +568 -4
- package/package.json +1 -1
- package/src/schema/transactionRequest/intents/cantonTransferAcceptIntent.ts +25 -0
- package/src/schema/transactionRequest/intents/cantonTransferRejectIntent.ts +25 -0
- package/src/schema/transactionRequest/intents/index.ts +2 -0
- package/src/schema/transactionRequest/intents/intent.ts +4 -0
- package/src/schema/transactionRequest/intents/intentType.ts +2 -0
- package/src/schema/transactionRequest/intents/solVersionedCustomTxIntent.ts +25 -20
package/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { BaseIntent } from "./baseIntent";
|
|
3
|
+
import { intentTypes } from "./intentType";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @title Canton Transfer Accept Intent
|
|
7
|
+
*
|
|
8
|
+
* Intent for accepting the incoming deposit 2-step transfers
|
|
9
|
+
* 2-step transfer in `Canton` chain means that the receiver has to explicitly accept/reject the deposit
|
|
10
|
+
* by sending out an acceptance/rejection transaction on-chain
|
|
11
|
+
*
|
|
12
|
+
* @param {String} intentType - The type of intent (always set to transferAccept)
|
|
13
|
+
* @param {string} contractId - The contract id that needs to be accepted by the receiver
|
|
14
|
+
*/
|
|
15
|
+
export const CantonTransferAcceptIntent = t.intersection([
|
|
16
|
+
BaseIntent,
|
|
17
|
+
t.type({
|
|
18
|
+
intentType: intentTypes.transferAccept,
|
|
19
|
+
contractId: t.string,
|
|
20
|
+
}),
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
export type CantonTransferAcceptIntent = t.TypeOf<
|
|
24
|
+
typeof CantonTransferAcceptIntent
|
|
25
|
+
>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { BaseIntent } from "./baseIntent";
|
|
3
|
+
import { intentTypes } from "./intentType";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @title Canton Transfer Reject Intent
|
|
7
|
+
*
|
|
8
|
+
* Intent for rejecting the incoming deposit 2-step transfers
|
|
9
|
+
* 2-step transfer in `Canton` chain means that the receiver has to explicitly accept/reject the deposit
|
|
10
|
+
* by sending out an acceptance/rejection transaction on-chain
|
|
11
|
+
*
|
|
12
|
+
* @param {String} intentType - The type of intent (always set to transferReject)
|
|
13
|
+
* @param {string} contractId - The contract id that needs to be rejected by the receiver
|
|
14
|
+
*/
|
|
15
|
+
export const CantonTransferRejectIntent = t.intersection([
|
|
16
|
+
BaseIntent,
|
|
17
|
+
t.type({
|
|
18
|
+
intentType: intentTypes.transferReject,
|
|
19
|
+
contractId: t.string,
|
|
20
|
+
}),
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
export type CantonTransferRejectIntent = t.TypeOf<
|
|
24
|
+
typeof CantonTransferRejectIntent
|
|
25
|
+
>;
|
|
@@ -27,6 +27,8 @@ export * from "./bscDelegateIntent";
|
|
|
27
27
|
export * from "./bscStakeClaimRewardsIntent";
|
|
28
28
|
export * from "./bscUndelegateIntent";
|
|
29
29
|
export * from "./bscWithdrawUndelegateIntent";
|
|
30
|
+
export * from "./cantonTransferAcceptIntent";
|
|
31
|
+
export * from "./cantonTransferRejectIntent";
|
|
30
32
|
export * from "./consolidateTokenIntent";
|
|
31
33
|
export * from "./coredaoClaimIntent";
|
|
32
34
|
export * from "./coredaoDelegateIntent";
|
|
@@ -92,6 +92,8 @@ import { SolGoUnstakeIntent } from "./solGoUnstakeIntent";
|
|
|
92
92
|
import { SuiGoUnstakeIntent } from "./suiGoUnstakeIntent";
|
|
93
93
|
import { VetStakingIntent } from "./vetStakingIntent";
|
|
94
94
|
import { VetStakeClaimRewardsIntent } from "./vetStakeClaimRewardsIntent";
|
|
95
|
+
import { CantonTransferAcceptIntent } from "./cantonTransferAcceptIntent";
|
|
96
|
+
import { CantonTransferRejectIntent } from "./cantonTransferRejectIntent";
|
|
95
97
|
|
|
96
98
|
export const TransactionIntent = t.union([
|
|
97
99
|
AdaConsolidateIntent,
|
|
@@ -110,6 +112,8 @@ export const TransactionIntent = t.union([
|
|
|
110
112
|
BscDelegateIntent,
|
|
111
113
|
BscUnDelegateIntent,
|
|
112
114
|
BscWithdrawUndelegateIntent,
|
|
115
|
+
CantonTransferAcceptIntent,
|
|
116
|
+
CantonTransferRejectIntent,
|
|
113
117
|
CosmosPaymentIntent,
|
|
114
118
|
CosmosStakeIntent,
|
|
115
119
|
CosmosSwitchValidatorIntent,
|
|
@@ -43,6 +43,8 @@ export const intentTypes = {
|
|
|
43
43
|
* Register a BTC delegation on the Babylon chain for Baby BTC staking.
|
|
44
44
|
*/
|
|
45
45
|
createBtcDelegation: t.literal("createBtcDelegation"),
|
|
46
|
+
transferAccept: t.literal("transferAccept"),
|
|
47
|
+
transferReject: t.literal("transferReject"),
|
|
46
48
|
};
|
|
47
49
|
|
|
48
50
|
export const IntentType = t.keyof(intentTypes);
|
|
@@ -11,28 +11,33 @@ export const SolVersionedCustomTxIntent = t.intersection([
|
|
|
11
11
|
SolBuildOptions,
|
|
12
12
|
t.type({
|
|
13
13
|
intentType: intentTypes.customTx,
|
|
14
|
-
solVersionedTransactionData: t.
|
|
15
|
-
|
|
16
|
-
t.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
solVersionedTransactionData: t.intersection([
|
|
15
|
+
t.type({
|
|
16
|
+
versionedInstructions: t.array(
|
|
17
|
+
t.type({
|
|
18
|
+
programIdIndex: t.number,
|
|
19
|
+
accountKeyIndexes: t.array(t.number),
|
|
20
|
+
data: t.string,
|
|
21
|
+
}),
|
|
22
|
+
),
|
|
23
|
+
addressLookupTables: t.array(
|
|
24
|
+
t.type({
|
|
25
|
+
accountKey: t.string,
|
|
26
|
+
writableIndexes: t.array(t.number),
|
|
27
|
+
readonlyIndexes: t.array(t.number),
|
|
28
|
+
}),
|
|
29
|
+
),
|
|
30
|
+
staticAccountKeys: t.array(t.string),
|
|
31
|
+
messageHeader: t.type({
|
|
32
|
+
numRequiredSignatures: t.number,
|
|
33
|
+
numReadonlySignedAccounts: t.number,
|
|
34
|
+
numReadonlyUnsignedAccounts: t.number,
|
|
20
35
|
}),
|
|
21
|
-
),
|
|
22
|
-
addressLookupTables: t.array(
|
|
23
|
-
t.type({
|
|
24
|
-
accountKey: t.string,
|
|
25
|
-
writableIndexes: t.array(t.number),
|
|
26
|
-
readonlyIndexes: t.array(t.number),
|
|
27
|
-
}),
|
|
28
|
-
),
|
|
29
|
-
staticAccountKeys: t.array(t.string),
|
|
30
|
-
messageHeader: t.type({
|
|
31
|
-
numRequiredSignatures: t.number,
|
|
32
|
-
numReadonlySignedAccounts: t.number,
|
|
33
|
-
numReadonlyUnsignedAccounts: t.number,
|
|
34
36
|
}),
|
|
35
|
-
|
|
37
|
+
t.partial({
|
|
38
|
+
recentBlockhash: t.string,
|
|
39
|
+
}),
|
|
40
|
+
]),
|
|
36
41
|
}),
|
|
37
42
|
]);
|
|
38
43
|
|