@bitgo/public-types 6.1.0 → 6.3.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/aptStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/aptUnstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/aptWithdrawStakeIntent.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/baseBridgeFundsIntent.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/cantonPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferAcceptIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferAcknowledgeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferOfferWithdrawnIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferRejectIntent.d.ts +2 -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/defiDepositIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/defiRedeemIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/delegateIntent.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/hbarUpdateAccountIntent.d.ts +77 -0
- package/dist/src/schema/transactionRequest/intents/hbarUpdateAccountIntent.js +37 -0
- package/dist/src/schema/transactionRequest/intents/hbarUpdateAccountIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/hypeevmBridgeFundsIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/hypeevmEnableBridgingIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/hypeevmSpotTransferIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/icpPaymentIntent.d.ts +2 -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 +476 -0
- package/dist/src/schema/transactionRequest/intents/intent.js +6 -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/iotaBuildOptions.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/iotaConsolidateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/iotaPaymentIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/irysPledgeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/irysStakeIntent.d.ts +2 -0
- 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 +2 -0
- 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/taoTransferStakeIntent.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/tonMultiNominatorDelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tonMultiNominatorUndelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tonPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tonSingleNominatorDelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tonSingleNominatorUndelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tonWhalesDelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tonWhalesUndelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/transferTokenIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/trxClaimRewardsIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/trxDelegateResourceIntent.d.ts +78 -0
- package/dist/src/schema/transactionRequest/intents/trxDelegateResourceIntent.js +41 -0
- package/dist/src/schema/transactionRequest/intents/trxDelegateResourceIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/trxFreezeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/trxUndelegateResourceIntent.d.ts +78 -0
- package/dist/src/schema/transactionRequest/intents/trxUndelegateResourceIntent.js +41 -0
- package/dist/src/schema/transactionRequest/intents/trxUndelegateResourceIntent.js.map +1 -0
- package/dist/src/schema/transactionRequest/intents/trxUnfreezeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/trxVoteIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/trxWithdrawExpireUnfreezeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/undelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/unstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/validatorRegistrationIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/vetDecreaseStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/vetDelegateIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/vetIncreaseStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/vetSignalExitIntent.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/vetValidatorRegistrationIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/vetWithdrawStakeIntent.d.ts +2 -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/intents/xdcStakingIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/intents/xdcUnstakingIntent.d.ts +4 -0
- package/dist/src/schema/transactionRequest/transactionRequest.d.ts +952 -0
- package/package.json +1 -1
- package/src/schema/transactionRequest/intents/hbarUpdateAccountIntent.ts +20 -0
- package/src/schema/transactionRequest/intents/index.ts +3 -0
- package/src/schema/transactionRequest/intents/intent.ts +6 -0
- package/src/schema/transactionRequest/intents/intentType.ts +2 -0
- package/src/schema/transactionRequest/intents/trxDelegateResourceIntent.ts +22 -0
- package/src/schema/transactionRequest/intents/trxUndelegateResourceIntent.ts +22 -0
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { AccountBaseUpdateAccountIntent } from "./accountBaseUpdateAccountIntent";
|
|
3
|
+
import { optionalNumber, optionalBoolean } from "../../../utils";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @title HBAR Update Account Intent
|
|
7
|
+
*
|
|
8
|
+
* Extends the base updateAccount intent with Hedera-specific staking fields.
|
|
9
|
+
* Used for stake (stakedNodeId >= 0), unstake (stakedNodeId = -1), and
|
|
10
|
+
* switch validator (stakedNodeId = new node) operations.
|
|
11
|
+
*/
|
|
12
|
+
export const HbarUpdateAccountIntent = t.intersection([
|
|
13
|
+
AccountBaseUpdateAccountIntent,
|
|
14
|
+
t.partial({
|
|
15
|
+
stakedNodeId: optionalNumber,
|
|
16
|
+
declineStakingReward: optionalBoolean,
|
|
17
|
+
}),
|
|
18
|
+
]);
|
|
19
|
+
|
|
20
|
+
export type HbarUpdateAccountIntent = t.TypeOf<typeof HbarUpdateAccountIntent>;
|
|
@@ -80,6 +80,7 @@ export * from "./fillNonceIntent";
|
|
|
80
80
|
export * from "./flrpContext";
|
|
81
81
|
export * from "./flrpFeeState";
|
|
82
82
|
export * from "./goUnstakeIntent";
|
|
83
|
+
export * from "./hbarUpdateAccountIntent";
|
|
83
84
|
export * from "./hopParams";
|
|
84
85
|
export * from "./hypeevmBridgeFundsIntent";
|
|
85
86
|
export * from "./hypeevmSpotTransferIntent";
|
|
@@ -166,7 +167,9 @@ export * from "./tonWhalesDelegateIntent";
|
|
|
166
167
|
export * from "./tonWhalesUndelegateIntent";
|
|
167
168
|
export * from "./transferTokenIntent";
|
|
168
169
|
export * from "./trxClaimRewardsIntent";
|
|
170
|
+
export * from "./trxDelegateResourceIntent";
|
|
169
171
|
export * from "./trxFreezeIntent";
|
|
172
|
+
export * from "./trxUndelegateResourceIntent";
|
|
170
173
|
export * from "./trxUnfreezeIntent";
|
|
171
174
|
export * from "./trxVoteIntent";
|
|
172
175
|
export * from "./trxWithdrawExpireUnfreezeIntent";
|
|
@@ -34,6 +34,7 @@ import { EthFillNonceIntent } from "./ethFillNonceIntent";
|
|
|
34
34
|
import { EthPaymentIntent } from "./ethPaymentIntent";
|
|
35
35
|
import { EthStakingIntent } from "./ethStakingIntent";
|
|
36
36
|
import { FeeAddressTransferIntent } from "./feeAddressTransferIntent";
|
|
37
|
+
import { HbarUpdateAccountIntent } from "./hbarUpdateAccountIntent";
|
|
37
38
|
import { HypeevmSpotTransferIntent } from "./hypeevmSpotTransferIntent";
|
|
38
39
|
import { IcpPaymentIntent } from "./icpPaymentIntent";
|
|
39
40
|
import { IrysPledgeIntent } from "./irysPledgeIntent";
|
|
@@ -116,7 +117,9 @@ import { CantonTransferRejectIntent } from "./cantonTransferRejectIntent";
|
|
|
116
117
|
import { TonWhalesDelegateIntent } from "./tonWhalesDelegateIntent";
|
|
117
118
|
import { TonWhalesUndelegateIntent } from "./tonWhalesUndelegateIntent";
|
|
118
119
|
import { TrxClaimRewardsIntent } from "./trxClaimRewardsIntent";
|
|
120
|
+
import { TrxDelegateResourceIntent } from "./trxDelegateResourceIntent";
|
|
119
121
|
import { TrxFreezeIntent } from "./trxFreezeIntent";
|
|
122
|
+
import { TrxUndelegateResourceIntent } from "./trxUndelegateResourceIntent";
|
|
120
123
|
import { TrxUnfreezeIntent } from "./trxUnfreezeIntent";
|
|
121
124
|
import { TrxVoteIntent } from "./trxVoteIntent";
|
|
122
125
|
import { TrxWithdrawExpireUnfreezeIntent } from "./trxWithdrawExpireUnfreezeIntent";
|
|
@@ -170,6 +173,7 @@ export const TransactionIntent = t.union([
|
|
|
170
173
|
EthStakingIntent,
|
|
171
174
|
EthTransferTokenIntent,
|
|
172
175
|
FeeAddressTransferIntent,
|
|
176
|
+
HbarUpdateAccountIntent,
|
|
173
177
|
HypeevmBridgeFundsIntent,
|
|
174
178
|
HypeevmSpotTransferIntent,
|
|
175
179
|
HypeevmEnableBridgingIntent,
|
|
@@ -224,7 +228,9 @@ export const TransactionIntent = t.union([
|
|
|
224
228
|
TonWhalesDelegateIntent,
|
|
225
229
|
TonWhalesUndelegateIntent,
|
|
226
230
|
TrxClaimRewardsIntent,
|
|
231
|
+
TrxDelegateResourceIntent,
|
|
227
232
|
TrxFreezeIntent,
|
|
233
|
+
TrxUndelegateResourceIntent,
|
|
228
234
|
TrxUnfreezeIntent,
|
|
229
235
|
TrxVoteIntent,
|
|
230
236
|
TrxWithdrawExpireUnfreezeIntent,
|
|
@@ -65,6 +65,8 @@ export const intentTypes = {
|
|
|
65
65
|
* Redeem vault shares from a DeFi protocol vault (e.g. ctUSD1cx → USD1).
|
|
66
66
|
*/
|
|
67
67
|
"defi-redeem": t.literal("defi-redeem"),
|
|
68
|
+
delegateResource: t.literal("delegateResource"),
|
|
69
|
+
undelegateResource: t.literal("undelegateResource"),
|
|
68
70
|
};
|
|
69
71
|
|
|
70
72
|
export const IntentType = t.keyof(intentTypes);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { BaseIntentWithAmount } from "./baseIntent";
|
|
3
|
+
import { BaseStakeIntent } from "./baseStakeIntent";
|
|
4
|
+
import { intentTypes } from "./intentType";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @title TRX Delegate Resource Intent
|
|
8
|
+
*/
|
|
9
|
+
export const TrxDelegateResourceIntent = t.intersection([
|
|
10
|
+
BaseStakeIntent,
|
|
11
|
+
BaseIntentWithAmount,
|
|
12
|
+
t.type({
|
|
13
|
+
intentType: intentTypes.delegateResource,
|
|
14
|
+
ownerAddress: t.string,
|
|
15
|
+
receiverAddress: t.string,
|
|
16
|
+
resource: t.union([t.literal("BANDWIDTH"), t.literal("ENERGY")]),
|
|
17
|
+
}),
|
|
18
|
+
]);
|
|
19
|
+
|
|
20
|
+
export type TrxDelegateResourceIntent = t.TypeOf<
|
|
21
|
+
typeof TrxDelegateResourceIntent
|
|
22
|
+
>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { BaseIntentWithAmount } from "./baseIntent";
|
|
3
|
+
import { BaseStakeIntent } from "./baseStakeIntent";
|
|
4
|
+
import { intentTypes } from "./intentType";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @title TRX Undelegate Resource Intent
|
|
8
|
+
*/
|
|
9
|
+
export const TrxUndelegateResourceIntent = t.intersection([
|
|
10
|
+
BaseStakeIntent,
|
|
11
|
+
BaseIntentWithAmount,
|
|
12
|
+
t.type({
|
|
13
|
+
intentType: intentTypes.undelegateResource,
|
|
14
|
+
ownerAddress: t.string,
|
|
15
|
+
receiverAddress: t.string,
|
|
16
|
+
resource: t.union([t.literal("BANDWIDTH"), t.literal("ENERGY")]),
|
|
17
|
+
}),
|
|
18
|
+
]);
|
|
19
|
+
|
|
20
|
+
export type TrxUndelegateResourceIntent = t.TypeOf<
|
|
21
|
+
typeof TrxUndelegateResourceIntent
|
|
22
|
+
>;
|