@bitgo/public-types 6.78.4 → 6.80.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/mpcv2/signing/index.d.ts +1 -0
- package/dist/src/schema/mpcv2/signing/index.js +1 -0
- package/dist/src/schema/mpcv2/signing/index.js.map +1 -1
- package/dist/src/schema/mpcv2/signing/redpallasRerandRound.d.ts +49 -0
- package/dist/src/schema/mpcv2/signing/redpallasRerandRound.js +66 -0
- package/dist/src/schema/mpcv2/signing/redpallasRerandRound.js.map +1 -0
- 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/adaCancelIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/adaClaimTimelockIntent.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/adaUnstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/adaVoteDelegationIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/aptCustomTxIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/aptStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/aptUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/aptWithdrawStakeIntent.d.ts +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/babyCreateBtcDelegationIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/babyWithdrawRewardIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/baseBridgeFundsIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/baseGoStakeIntent.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/beraDelegateIntent.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/cantonAllocationAllocateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonAllocationOfferWithdrawnIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonAllocationRejectIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonAllocationRequestIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonCommandIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonCosignDelegationAcceptIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonCosignDelegationProposalIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonEndInvestorOnboardingAcceptIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonEndInvestorOnboardingOfferIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonEndInvestorOnboardingRejectIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonParticipantOnboardingRequestIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferAcceptIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferAcknowledgeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferOfferWithdrawnIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cantonTransferRejectIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/claimIntent.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/cosmosContractCallIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cosmosPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/cosmosStakeClaimRewardsIntent.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/defiApproveIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/defiDepositIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/defiRedeemIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/defiWithdrawIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/delegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/disableTokenIntent.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/ethLikeStakeIntent.d.ts +2 -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/feeAddressTransferIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/fillNonceIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/goUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/hbarUpdateAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/hypeevmBridgeFundsIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/hypeevmEnableBridgingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/hypeevmSpotTransferIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/icpPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/index.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/index.js +1 -0
- package/dist/src/schema/transactionRequest/intents/index.js.map +1 -1
- package/dist/src/schema/transactionRequest/intents/intent.d.ts +262 -0
- package/dist/src/schema/transactionRequest/intents/intent.js +2 -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/iotaBuildOptions.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/iotaConsolidateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/iotaPaymentIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/lightningPaymentIntent.d.ts +2 -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/polyxBaseIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/polyxCreateAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/polyxPreApproveAssetIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/polyxStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/polyxSwitchValidatorIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/polyxUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/polyxWithdrawIntent.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/solCustomTxIntent.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/solGoUnstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/solStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/solUnstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/solVersionedCustomTxIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/stacksRegisterForBondIntent.d.ts +105 -0
- package/dist/src/schema/transactionRequest/intents/stacksRegisterForBondIntent.js +48 -0
- package/dist/src/schema/transactionRequest/intents/stacksRegisterForBondIntent.js.map +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/stakeWithCallDataIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/substrateBaseIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/substratePaymentIntent.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/suiGoUnstakeIntent.d.ts +3 -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/switchValidatorWithCallDataIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/taoClaimRootIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/taoStakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/taoStakingBaseIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/taoSwitchValidatorIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/taoTransferStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/taoUnstakeIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/tokenApprovalIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonMultiNominatorDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonMultiNominatorUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonPaymentIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonSingleNominatorDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonSingleNominatorUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonWhalesDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/tonWhalesUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/transferTokenIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/trxClaimRewardsIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/trxCreateAccountIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/trxDelegateResourceIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/trxFreezeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/trxUndelegateResourceIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/trxUnfreezeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/trxVoteIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/trxWithdrawExpireUnfreezeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/undelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/unstakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/unwrapNativeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/validatorRegistrationIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/vetDecreaseStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/vetDelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/vetIncreaseStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/vetSignalExitIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/vetStakeClaimRewardsIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/vetStakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/vetUnstakingIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/vetValidatorRegistrationIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/vetWithdrawStakeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/voteDelegationIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/walletRecoveryIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/walrusStakingIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/walrusUndelegateIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/walrusWithdrawIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/withdrawIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/wrapApproveIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/wrapNativeIntent.d.ts +1 -0
- package/dist/src/schema/transactionRequest/intents/xdcStakingIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/intents/xdcUnstakingIntent.d.ts +2 -0
- package/dist/src/schema/transactionRequest/transactionRequest.d.ts +524 -0
- package/package.json +1 -1
- package/src/schema/mpcv2/signing/index.ts +1 -0
- package/src/schema/mpcv2/signing/redpallasRerandRound.ts +100 -0
- package/src/schema/transactionRequest/intents/index.ts +1 -0
- package/src/schema/transactionRequest/intents/intent.ts +2 -0
- package/src/schema/transactionRequest/intents/intentType.ts +5 -0
- package/src/schema/transactionRequest/intents/stacksRegisterForBondIntent.ts +57 -0
package/package.json
CHANGED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { EddsaMPCv2SignedMessage } from "../common";
|
|
3
|
+
import { MPCv2SignatureShareBase } from "./signingRound";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* RedPallas MPCv2 rerand — User to BitGo round 1
|
|
7
|
+
*
|
|
8
|
+
* RedPallas DSG rerand exchanges signed messages over two wire rounds:
|
|
9
|
+
* the producer's `getFirstMessage()` yields the round 1 payload and
|
|
10
|
+
* `handleIncomingMessages` in `WaitMsg1` yields the round 2 payload, each
|
|
11
|
+
* carrying WASM-serialized bytes with a rerand prefix. Round 0 is computed
|
|
12
|
+
* locally and never crosses the wire, and there is no round 3.
|
|
13
|
+
*
|
|
14
|
+
* The wire literals reuse the shared signing-round states; disambiguation
|
|
15
|
+
* from DSG signing is by which codec is passed to `decodeWithCodec`, not by
|
|
16
|
+
* the payload. Like DSG signing, the envelope is the shared
|
|
17
|
+
* `EddsaMPCv2SignedMessage` GPG material.
|
|
18
|
+
*/
|
|
19
|
+
export const RedpallasMPCv2RerandShareRound1Input = t.intersection([
|
|
20
|
+
MPCv2SignatureShareBase,
|
|
21
|
+
t.type(
|
|
22
|
+
{
|
|
23
|
+
type: t.literal("round1Input"),
|
|
24
|
+
data: t.type({
|
|
25
|
+
msg1: EddsaMPCv2SignedMessage,
|
|
26
|
+
}),
|
|
27
|
+
},
|
|
28
|
+
"RedpallasMPCv2RerandShareRound1Input",
|
|
29
|
+
),
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
export type RedpallasMPCv2RerandShareRound1Input = t.TypeOf<
|
|
33
|
+
typeof RedpallasMPCv2RerandShareRound1Input
|
|
34
|
+
>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* RedPallas MPCv2 rerand — BitGo to User round 1
|
|
38
|
+
*
|
|
39
|
+
* BitGo returns its first rerand message.
|
|
40
|
+
*/
|
|
41
|
+
export const RedpallasMPCv2RerandShareRound1Output = t.intersection([
|
|
42
|
+
MPCv2SignatureShareBase,
|
|
43
|
+
t.type(
|
|
44
|
+
{
|
|
45
|
+
type: t.literal("round1Output"),
|
|
46
|
+
data: t.type({
|
|
47
|
+
msg1: EddsaMPCv2SignedMessage,
|
|
48
|
+
}),
|
|
49
|
+
},
|
|
50
|
+
"RedpallasMPCv2RerandShareRound1Output",
|
|
51
|
+
),
|
|
52
|
+
]);
|
|
53
|
+
|
|
54
|
+
export type RedpallasMPCv2RerandShareRound1Output = t.TypeOf<
|
|
55
|
+
typeof RedpallasMPCv2RerandShareRound1Output
|
|
56
|
+
>;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* RedPallas MPCv2 rerand — User to BitGo round 2
|
|
60
|
+
*
|
|
61
|
+
* User sends their second rerand message.
|
|
62
|
+
*/
|
|
63
|
+
export const RedpallasMPCv2RerandShareRound2Input = t.intersection([
|
|
64
|
+
MPCv2SignatureShareBase,
|
|
65
|
+
t.type(
|
|
66
|
+
{
|
|
67
|
+
type: t.literal("round2Input"),
|
|
68
|
+
data: t.type({
|
|
69
|
+
msg2: EddsaMPCv2SignedMessage,
|
|
70
|
+
}),
|
|
71
|
+
},
|
|
72
|
+
"RedpallasMPCv2RerandShareRound2Input",
|
|
73
|
+
),
|
|
74
|
+
]);
|
|
75
|
+
|
|
76
|
+
export type RedpallasMPCv2RerandShareRound2Input = t.TypeOf<
|
|
77
|
+
typeof RedpallasMPCv2RerandShareRound2Input
|
|
78
|
+
>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* RedPallas MPCv2 rerand — BitGo to User round 2
|
|
82
|
+
*
|
|
83
|
+
* BitGo returns its second rerand message.
|
|
84
|
+
*/
|
|
85
|
+
export const RedpallasMPCv2RerandShareRound2Output = t.intersection([
|
|
86
|
+
MPCv2SignatureShareBase,
|
|
87
|
+
t.type(
|
|
88
|
+
{
|
|
89
|
+
type: t.literal("round2Output"),
|
|
90
|
+
data: t.type({
|
|
91
|
+
msg2: EddsaMPCv2SignedMessage,
|
|
92
|
+
}),
|
|
93
|
+
},
|
|
94
|
+
"RedpallasMPCv2RerandShareRound2Output",
|
|
95
|
+
),
|
|
96
|
+
]);
|
|
97
|
+
|
|
98
|
+
export type RedpallasMPCv2RerandShareRound2Output = t.TypeOf<
|
|
99
|
+
typeof RedpallasMPCv2RerandShareRound2Output
|
|
100
|
+
>;
|
|
@@ -147,6 +147,7 @@ export * from "./solStakeIntent";
|
|
|
147
147
|
export * from "./solStakingType";
|
|
148
148
|
export * from "./solUnstakeIntent";
|
|
149
149
|
export * from "./solVersionedCustomTxIntent";
|
|
150
|
+
export * from "./stacksRegisterForBondIntent";
|
|
150
151
|
export * from "./stakeClaimRewardsIntent";
|
|
151
152
|
export * from "./stakeIntent";
|
|
152
153
|
export * from "./stakeSwitchValidatorIntent";
|
|
@@ -102,6 +102,7 @@ import { DotConsolidateIntent } from "./dotConsolidateIntent";
|
|
|
102
102
|
import { SolCloseAssociatedTokenAccountIntent } from "./solCloseAssociatedTokenAccountIntent";
|
|
103
103
|
import { BaseStakeIntentWithCalldata } from "./baseStakeIntentWithCalldata";
|
|
104
104
|
import { StakeWithCallDataIntent } from "./stakeWithCallDataIntent";
|
|
105
|
+
import { StacksRegisterForBondIntent } from "./stacksRegisterForBondIntent";
|
|
105
106
|
import { SwitchValidatorWithCallDataIntent } from "./switchValidatorWithCallDataIntent";
|
|
106
107
|
import { CoreDaoDelegateIntent } from "./coredaoDelegateIntent";
|
|
107
108
|
import { CoreDaoUndelegateIntent } from "./coredaoUndelegateIntent";
|
|
@@ -314,6 +315,7 @@ export const TransactionIntent = t.union([
|
|
|
314
315
|
XdcProposeIntent,
|
|
315
316
|
XdcResignIntent,
|
|
316
317
|
XdcWithdrawIntent,
|
|
318
|
+
StacksRegisterForBondIntent,
|
|
317
319
|
|
|
318
320
|
/**
|
|
319
321
|
* Catch all for past intents that have not been converted to codecs
|
|
@@ -129,6 +129,11 @@ export const intentTypes = {
|
|
|
129
129
|
finalizeUnwrap: t.literal("finalizeUnwrap"),
|
|
130
130
|
delegateResource: t.literal("delegateResource"),
|
|
131
131
|
undelegateResource: t.literal("undelegateResource"),
|
|
132
|
+
/**
|
|
133
|
+
* TXN 2 of Stacks PoX-5 staking: submit `register-for-bond` against the STX
|
|
134
|
+
* wallet that signs the registration (the BTC lock is TXN 1).
|
|
135
|
+
*/
|
|
136
|
+
stacksRegisterForBond: t.literal("stacksRegisterForBond"),
|
|
132
137
|
/**
|
|
133
138
|
* Cross-chain export transaction (e.g. C-chain → P-chain or P-chain → C-chain on Flare/Avalanche).
|
|
134
139
|
*/
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as t from "io-ts";
|
|
2
|
+
import { intentTypes } from "./intentType";
|
|
3
|
+
import { BaseStakeIntent } from "./baseStakeIntent";
|
|
4
|
+
import { optionalString } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @title Stacks Register For Bond Intent
|
|
8
|
+
*
|
|
9
|
+
* @description TXN 2 of the Stacks PoX-5 BTC staking flow: submit `register-for-bond`
|
|
10
|
+
* against the STX wallet that signs and broadcasts the registration. The BTC-family
|
|
11
|
+
* staking wallet only carries the lock (TXN 1).
|
|
12
|
+
*
|
|
13
|
+
* The caller builds the Clarity arguments, so `functionArgs` carries **hex-encoded
|
|
14
|
+
* Clarity values in contract-argument order**. Wallet Platform decodes them into Clarity
|
|
15
|
+
* values and calls the contract — it does not need to know the `register-for-bond` ABI.
|
|
16
|
+
*
|
|
17
|
+
* ```clarity
|
|
18
|
+
* (register-for-bond
|
|
19
|
+
* (bond-index uint)
|
|
20
|
+
* (signer-manager <signer-manager-trait>)
|
|
21
|
+
* (amount-ustx uint)
|
|
22
|
+
* (btc-lockup (ok { outputs: (list 10 {...}), staker-unlock-bytes: (buff 683) }))
|
|
23
|
+
* (signer-calldata (optional (buff 500))))
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @param {string} intentType - The type of intent (always set to stacksRegisterForBond)
|
|
27
|
+
* @param {string} stxWalletId - The Stacks wallet that signs and submits the registration
|
|
28
|
+
* @param {string} stxAddress - The resolved STX staker address (also the allowlist/membership key)
|
|
29
|
+
* @param {string | number} bondIndex - Bond index to register for
|
|
30
|
+
* @param {string} signerManager - The signer-manager contract principal
|
|
31
|
+
* @param {string | number} amountUstx - Stake amount in uSTX (the Clarity args carry the authoritative value)
|
|
32
|
+
* @param {string} contractName - Stacks contract name (e.g. "pox-5")
|
|
33
|
+
* @param {string} functionName - Contract function name (e.g. "register-for-bond")
|
|
34
|
+
* @param {string[]} functionArgs - Hex-encoded Clarity values in contract-argument order
|
|
35
|
+
* @param {string} [signerCalldata] - Optional `(buff 500)` calldata for the signer-manager's `validate-stake!`
|
|
36
|
+
*/
|
|
37
|
+
export const StacksRegisterForBondIntent = t.intersection([
|
|
38
|
+
BaseStakeIntent,
|
|
39
|
+
t.type({
|
|
40
|
+
intentType: intentTypes.stacksRegisterForBond,
|
|
41
|
+
stxWalletId: t.string,
|
|
42
|
+
stxAddress: t.string,
|
|
43
|
+
bondIndex: t.union([t.string, t.number]),
|
|
44
|
+
signerManager: t.string,
|
|
45
|
+
amountUstx: t.union([t.string, t.number]),
|
|
46
|
+
contractName: t.string,
|
|
47
|
+
functionName: t.string,
|
|
48
|
+
functionArgs: t.array(t.string),
|
|
49
|
+
}),
|
|
50
|
+
t.partial({
|
|
51
|
+
signerCalldata: optionalString,
|
|
52
|
+
}),
|
|
53
|
+
]);
|
|
54
|
+
|
|
55
|
+
export type StacksRegisterForBondIntent = t.TypeOf<
|
|
56
|
+
typeof StacksRegisterForBondIntent
|
|
57
|
+
>;
|