@bitgo/public-types 4.3.1 → 4.5.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 +1 -0
- package/dist/src/schema/transactionRequest/intents/accountBaseCreateAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/accountBaseUpdateAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/adaPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/adaPledgeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/adaStakeClaimRewardsIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/adaStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/adaStakeIntent.js +1 -0
- package/dist/src/schema/transactionRequest/intents/adaStakeIntent.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/adaUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/adaVoteDelegationIntent.d.ts +46 -0
- package/dist/src/schema/transactionRequest/intents/adaVoteDelegationIntent.js +35 -0
- package/dist/src/schema/transactionRequest/intents/adaVoteDelegationIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/atomPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/atomStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/atomUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/atomWithdrawIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/baseIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/baseStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/baseStakeIntentWithCalldata.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/bscDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/bscStakeClaimRewardsIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/bscUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/bscWithdrawUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/consolidateTokenIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/coredaoClaimIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/coredaoDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/coredaoUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cosmosPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cosmosStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cosmosSwitchValidatorIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cosmosUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cosmosWithdrawIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/dotBaseIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/dotCreateAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/dotPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/dotStakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/dotUnstakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/dotWithdrawStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/enableTokenIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/ethAccelerationIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/ethConsolidateTokenIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/ethFillNonceIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/ethLikeClaimIntent.d.ts +72 -0
- package/dist/src/schema/transactionRequest/intents/ethLikeClaimIntent.js +41 -0
- package/dist/src/schema/transactionRequest/intents/ethLikeClaimIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/ethLikeDelegateIntent.d.ts +77 -0
- package/dist/src/schema/transactionRequest/intents/ethLikeDelegateIntent.js +44 -0
- package/dist/src/schema/transactionRequest/intents/ethLikeDelegateIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/ethLikeUndelegateIntent.d.ts +77 -0
- package/dist/src/schema/transactionRequest/intents/ethLikeUndelegateIntent.js +44 -0
- package/dist/src/schema/transactionRequest/intents/ethLikeUndelegateIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/ethPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/ethStakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/ethTransferTokenIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/fillNonceIntent.d.ts +1 -0
- 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 +319 -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/intentType.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/intentType.js +1 -0
- package/dist/src/schema/transactionRequest/intents/intentType.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/lightningPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/mmiSignMessageIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/mmiSignTransactionIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/nearStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/nearUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/nearWithdrawIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/paymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/signMessageIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solAuthorizeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solClaimIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solCloseAssociatedTokenAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solCreateAssociatedTokenAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solDeactivateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/stakeClaimRewardsIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/stakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/stakeSwitchValidatorIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/suiBuildOptions.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/suiConsolidateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/suiCustomTxIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/suiPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/suiStakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/suiUnstakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/transferTokenIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/unstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/voteDelegationIntent.d.ts +44 -0
- package/dist/src/schema/transactionRequest/intents/voteDelegationIntent.js +36 -0
- package/dist/src/schema/transactionRequest/intents/voteDelegationIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/walletRecoveryIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/withdrawIntent.d.ts +1 -0
- package/package.json +1 -1
- package/src/schema/transactionRequest/intents/adaStakeIntent.ts +7 -0
- package/src/schema/transactionRequest/intents/adaVoteDelegationIntent.ts +18 -0
- package/src/schema/transactionRequest/intents/ethLikeClaimIntent.ts +25 -0
- package/src/schema/transactionRequest/intents/ethLikeDelegateIntent.ts +30 -0
- package/src/schema/transactionRequest/intents/ethLikeUndelegateIntent.ts +30 -0
- package/src/schema/transactionRequest/intents/index.ts +3 -0
- package/src/schema/transactionRequest/intents/intent.ts +9 -0
- package/src/schema/transactionRequest/intents/intentType.ts +1 -0
- package/src/schema/transactionRequest/intents/voteDelegationIntent.ts +19 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { BaseStakeIntent } from "./baseStakeIntent";
|
|
3
|
+
import { Amount } from "./amount";
|
|
4
|
+
import { intentTypes } from "./intentType";
|
|
5
|
+
import { Optional } from "../../../utils";
|
|
6
|
+
import { RecipientEntry } from "./recipientEntry";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @title EthLike Undelegate Intent
|
|
10
|
+
*
|
|
11
|
+
* @description The intent for undelegate (unstake) requests and transactions for Eth Like
|
|
12
|
+
*
|
|
13
|
+
* @param {string} intentType The type of intent (always set to undelegate)
|
|
14
|
+
* @param {string} validatorAddress The address of the validator
|
|
15
|
+
* @param {Amonut} amount The amount to undelegate from the validator
|
|
16
|
+
* @param {RecipientEntry[]} recipients The recipients of the undelegated amount
|
|
17
|
+
*/
|
|
18
|
+
export const EthLikeUndelegateIntent = t.intersection([
|
|
19
|
+
BaseStakeIntent,
|
|
20
|
+
t.type({
|
|
21
|
+
intentType: intentTypes.undelegate,
|
|
22
|
+
validatorAddress: t.string,
|
|
23
|
+
amount: Amount,
|
|
24
|
+
}),
|
|
25
|
+
t.partial({
|
|
26
|
+
recipients: Optional(t.array(RecipientEntry)),
|
|
27
|
+
}),
|
|
28
|
+
]);
|
|
29
|
+
|
|
30
|
+
export type EthLikeUndelegateIntent = t.TypeOf<typeof EthLikeUndelegateIntent>;
|
|
@@ -52,6 +52,9 @@ export * from "./ethFillNonceIntent";
|
|
|
52
52
|
export * from "./ethPaymentIntent";
|
|
53
53
|
export * from "./ethStakingIntent";
|
|
54
54
|
export * from "./ethTransferTokenIntent";
|
|
55
|
+
export * from "./ethLikeDelegateIntent";
|
|
56
|
+
export * from "./ethLikeUndelegateIntent";
|
|
57
|
+
export * from "./ethLikeClaimIntent";
|
|
55
58
|
export * from "./feeOption";
|
|
56
59
|
export * from "./feeOptionFeeType";
|
|
57
60
|
export * from "./feeOptionFormula";
|
|
@@ -2,6 +2,7 @@ import * as t from "io-ts";
|
|
|
2
2
|
import { AdaConsolidateIntent } from "./adaConsolidateIntent";
|
|
3
3
|
import { AdaPaymentIntent } from "./adaPaymentIntent";
|
|
4
4
|
import { AdaStakeIntent } from "./adaStakeIntent";
|
|
5
|
+
import { AdaVoteDelegationIntent } from "./adaVoteDelegationIntent";
|
|
5
6
|
import { AtomPaymentIntent } from "./atomPaymentIntent";
|
|
6
7
|
import { AtomStakeIntent } from "./atomStakeIntent";
|
|
7
8
|
import { AtomUnstakeIntent } from "./atomUnstakeIntent";
|
|
@@ -60,6 +61,9 @@ import { BaseStakeIntentWithCalldata } from "./baseStakeIntentWithCalldata";
|
|
|
60
61
|
import { CoreDaoDelegateIntent } from "./coredaoDelegateIntent";
|
|
61
62
|
import { CoreDaoUndelegateIntent } from "./coredaoUndelegateIntent";
|
|
62
63
|
import { CoreDaoClaimIntent } from "./coredaoClaimIntent";
|
|
64
|
+
import { EthLikeDelegateIntent } from "./ethLikeDelegateIntent";
|
|
65
|
+
import { EthLikeUndelegateIntent } from "./ethLikeUndelegateIntent";
|
|
66
|
+
import { EthLikeClaimIntent } from "./ethLikeClaimIntent";
|
|
63
67
|
|
|
64
68
|
export const TransactionIntent = t.union([
|
|
65
69
|
AdaConsolidateIntent,
|
|
@@ -67,6 +71,7 @@ export const TransactionIntent = t.union([
|
|
|
67
71
|
AdaStakeClaimRewardsIntent,
|
|
68
72
|
AdaStakeIntent,
|
|
69
73
|
AdaUnstakeIntent,
|
|
74
|
+
AdaVoteDelegationIntent,
|
|
70
75
|
AtomPaymentIntent,
|
|
71
76
|
AtomStakeIntent,
|
|
72
77
|
AtomUnstakeIntent,
|
|
@@ -122,6 +127,10 @@ export const TransactionIntent = t.union([
|
|
|
122
127
|
CoreDaoDelegateIntent,
|
|
123
128
|
CoreDaoUndelegateIntent,
|
|
124
129
|
CoreDaoClaimIntent,
|
|
130
|
+
EthLikeDelegateIntent,
|
|
131
|
+
EthLikeUndelegateIntent,
|
|
132
|
+
EthLikeClaimIntent,
|
|
133
|
+
|
|
125
134
|
/**
|
|
126
135
|
* Catch all for past intents that have not been converted to codecs
|
|
127
136
|
*/
|
|
@@ -14,6 +14,7 @@ export const intentTypes = {
|
|
|
14
14
|
claim: t.literal("claim"),
|
|
15
15
|
stakeClaimRewards: t.literal("stakeClaimRewards"),
|
|
16
16
|
pledge: t.literal("pledge"),
|
|
17
|
+
voteDelegation: t.literal("voteDelegation"),
|
|
17
18
|
vote: t.literal("vote"),
|
|
18
19
|
createAccount: t.literal("createAccount"),
|
|
19
20
|
updateAccount: t.literal("updateAccount"),
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { BaseStakeIntent } from "./baseStakeIntent";
|
|
3
|
+
import { intentTypes } from "./intentType";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @title Vote Delegation Intent
|
|
7
|
+
*
|
|
8
|
+
* @description The intent used for staking requests that delegate voting power to representative
|
|
9
|
+
*
|
|
10
|
+
* @param {string} intentType The type of intent (always set to voteDelegation)
|
|
11
|
+
*/
|
|
12
|
+
export const VoteDelegationIntent = t.intersection([
|
|
13
|
+
BaseStakeIntent,
|
|
14
|
+
t.type({
|
|
15
|
+
intentType: intentTypes.voteDelegation,
|
|
16
|
+
}),
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
export type VoteDelegationIntent = t.TypeOf<typeof VoteDelegationIntent>;
|