@bitgo/public-types 6.15.0 → 6.17.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.
Files changed (193) hide show
  1. package/dist/src/schema/mpcv2/smc/eddsaKeygenRound.d.ts +241 -0
  2. package/dist/src/schema/mpcv2/smc/eddsaKeygenRound.js +131 -0
  3. package/dist/src/schema/mpcv2/smc/eddsaKeygenRound.js.map +1 -0
  4. package/dist/src/schema/mpcv2/smc/eddsaKeygenState.d.ts +15 -0
  5. package/dist/src/schema/mpcv2/smc/eddsaKeygenState.js +53 -0
  6. package/dist/src/schema/mpcv2/smc/eddsaKeygenState.js.map +1 -0
  7. package/dist/src/schema/mpcv2/smc/index.d.ts +2 -0
  8. package/dist/src/schema/mpcv2/smc/index.js +2 -0
  9. package/dist/src/schema/mpcv2/smc/index.js.map +1 -1
  10. package/dist/src/schema/transactionRequest/intents/accelerationIntent.d.ts +1 -0
  11. package/dist/src/schema/transactionRequest/intents/accountBaseCreateAccountIntent.d.ts +1 -0
  12. package/dist/src/schema/transactionRequest/intents/accountBaseUpdateAccountIntent.d.ts +1 -0
  13. package/dist/src/schema/transactionRequest/intents/adaPaymentIntent.d.ts +1 -0
  14. package/dist/src/schema/transactionRequest/intents/adaPledgeIntent.d.ts +1 -0
  15. package/dist/src/schema/transactionRequest/intents/adaStakeClaimRewardsIntent.d.ts +1 -0
  16. package/dist/src/schema/transactionRequest/intents/adaStakeIntent.d.ts +1 -0
  17. package/dist/src/schema/transactionRequest/intents/adaUnstakeIntent.d.ts +1 -0
  18. package/dist/src/schema/transactionRequest/intents/adaVoteDelegationIntent.d.ts +1 -0
  19. package/dist/src/schema/transactionRequest/intents/aptCustomTxIntent.d.ts +1 -0
  20. package/dist/src/schema/transactionRequest/intents/aptStakeIntent.d.ts +1 -0
  21. package/dist/src/schema/transactionRequest/intents/aptUnstakeIntent.d.ts +1 -0
  22. package/dist/src/schema/transactionRequest/intents/aptWithdrawStakeIntent.d.ts +1 -0
  23. package/dist/src/schema/transactionRequest/intents/atomPaymentIntent.d.ts +1 -0
  24. package/dist/src/schema/transactionRequest/intents/atomStakeIntent.d.ts +1 -0
  25. package/dist/src/schema/transactionRequest/intents/atomUnstakeIntent.d.ts +1 -0
  26. package/dist/src/schema/transactionRequest/intents/atomWithdrawIntent.d.ts +1 -0
  27. package/dist/src/schema/transactionRequest/intents/babyCreateBtcDelegationIntent.d.ts +1 -0
  28. package/dist/src/schema/transactionRequest/intents/babyWithdrawRewardIntent.d.ts +1 -0
  29. package/dist/src/schema/transactionRequest/intents/baseBridgeFundsIntent.d.ts +1 -0
  30. package/dist/src/schema/transactionRequest/intents/baseGoStakeIntent.d.ts +1 -0
  31. package/dist/src/schema/transactionRequest/intents/baseIntent.d.ts +2 -0
  32. package/dist/src/schema/transactionRequest/intents/baseStakeIntent.d.ts +1 -0
  33. package/dist/src/schema/transactionRequest/intents/baseStakeIntentWithCalldata.d.ts +1 -0
  34. package/dist/src/schema/transactionRequest/intents/beraDelegateIntent.d.ts +1 -0
  35. package/dist/src/schema/transactionRequest/intents/bscDelegateIntent.d.ts +1 -0
  36. package/dist/src/schema/transactionRequest/intents/bscStakeClaimRewardsIntent.d.ts +1 -0
  37. package/dist/src/schema/transactionRequest/intents/bscUndelegateIntent.d.ts +1 -0
  38. package/dist/src/schema/transactionRequest/intents/bscWithdrawUndelegateIntent.d.ts +1 -0
  39. package/dist/src/schema/transactionRequest/intents/cantonAllocationRequestIntent.d.ts +1 -0
  40. package/dist/src/schema/transactionRequest/intents/cantonCommandIntent.d.ts +100 -0
  41. package/dist/src/schema/transactionRequest/intents/cantonCommandIntent.js +77 -0
  42. package/dist/src/schema/transactionRequest/intents/cantonCommandIntent.js.map +1 -0
  43. package/dist/src/schema/transactionRequest/intents/cantonCosignDelegationAcceptIntent.d.ts +1 -0
  44. package/dist/src/schema/transactionRequest/intents/cantonCosignDelegationProposalIntent.d.ts +1 -0
  45. package/dist/src/schema/transactionRequest/intents/cantonPaymentIntent.d.ts +1 -0
  46. package/dist/src/schema/transactionRequest/intents/cantonTransferAcceptIntent.d.ts +1 -0
  47. package/dist/src/schema/transactionRequest/intents/cantonTransferAcknowledgeIntent.d.ts +1 -0
  48. package/dist/src/schema/transactionRequest/intents/cantonTransferOfferWithdrawnIntent.d.ts +1 -0
  49. package/dist/src/schema/transactionRequest/intents/cantonTransferRejectIntent.d.ts +1 -0
  50. package/dist/src/schema/transactionRequest/intents/claimIntent.d.ts +1 -0
  51. package/dist/src/schema/transactionRequest/intents/consolidateTokenIntent.d.ts +1 -0
  52. package/dist/src/schema/transactionRequest/intents/coredaoClaimIntent.d.ts +1 -0
  53. package/dist/src/schema/transactionRequest/intents/coredaoDelegateIntent.d.ts +1 -0
  54. package/dist/src/schema/transactionRequest/intents/coredaoUndelegateIntent.d.ts +1 -0
  55. package/dist/src/schema/transactionRequest/intents/cosmosContractCallIntent.d.ts +1 -0
  56. package/dist/src/schema/transactionRequest/intents/cosmosPaymentIntent.d.ts +1 -0
  57. package/dist/src/schema/transactionRequest/intents/cosmosStakeClaimRewardsIntent.d.ts +1 -0
  58. package/dist/src/schema/transactionRequest/intents/cosmosStakeIntent.d.ts +1 -0
  59. package/dist/src/schema/transactionRequest/intents/cosmosSwitchValidatorIntent.d.ts +1 -0
  60. package/dist/src/schema/transactionRequest/intents/cosmosUnstakeIntent.d.ts +1 -0
  61. package/dist/src/schema/transactionRequest/intents/cosmosWithdrawIntent.d.ts +1 -0
  62. package/dist/src/schema/transactionRequest/intents/defiDepositIntent.d.ts +1 -0
  63. package/dist/src/schema/transactionRequest/intents/defiRedeemIntent.d.ts +1 -0
  64. package/dist/src/schema/transactionRequest/intents/delegateIntent.d.ts +1 -0
  65. package/dist/src/schema/transactionRequest/intents/dotBaseIntent.d.ts +1 -0
  66. package/dist/src/schema/transactionRequest/intents/dotCreateAccountIntent.d.ts +1 -0
  67. package/dist/src/schema/transactionRequest/intents/dotPaymentIntent.d.ts +1 -0
  68. package/dist/src/schema/transactionRequest/intents/dotStakingIntent.d.ts +1 -0
  69. package/dist/src/schema/transactionRequest/intents/dotUnstakingIntent.d.ts +1 -0
  70. package/dist/src/schema/transactionRequest/intents/dotWithdrawStakeIntent.d.ts +1 -0
  71. package/dist/src/schema/transactionRequest/intents/enableTokenIntent.d.ts +1 -0
  72. package/dist/src/schema/transactionRequest/intents/ethAccelerationIntent.d.ts +1 -0
  73. package/dist/src/schema/transactionRequest/intents/ethConsolidateTokenIntent.d.ts +1 -0
  74. package/dist/src/schema/transactionRequest/intents/ethFillNonceIntent.d.ts +1 -0
  75. package/dist/src/schema/transactionRequest/intents/ethLikeStakeIntent.d.ts +2 -0
  76. package/dist/src/schema/transactionRequest/intents/ethPaymentIntent.d.ts +1 -0
  77. package/dist/src/schema/transactionRequest/intents/ethStakingIntent.d.ts +1 -0
  78. package/dist/src/schema/transactionRequest/intents/ethTransferTokenIntent.d.ts +1 -0
  79. package/dist/src/schema/transactionRequest/intents/feeAddressTransferIntent.d.ts +1 -0
  80. package/dist/src/schema/transactionRequest/intents/fillNonceIntent.d.ts +1 -0
  81. package/dist/src/schema/transactionRequest/intents/goUnstakeIntent.d.ts +1 -0
  82. package/dist/src/schema/transactionRequest/intents/hbarUpdateAccountIntent.d.ts +1 -0
  83. package/dist/src/schema/transactionRequest/intents/hypeevmBridgeFundsIntent.d.ts +1 -0
  84. package/dist/src/schema/transactionRequest/intents/hypeevmEnableBridgingIntent.d.ts +1 -0
  85. package/dist/src/schema/transactionRequest/intents/hypeevmSpotTransferIntent.d.ts +1 -0
  86. package/dist/src/schema/transactionRequest/intents/icpPaymentIntent.d.ts +1 -0
  87. package/dist/src/schema/transactionRequest/intents/index.d.ts +1 -0
  88. package/dist/src/schema/transactionRequest/intents/index.js +1 -0
  89. package/dist/src/schema/transactionRequest/intents/index.js.map +1 -1
  90. package/dist/src/schema/transactionRequest/intents/intent.d.ts +235 -0
  91. package/dist/src/schema/transactionRequest/intents/intent.js +2 -0
  92. package/dist/src/schema/transactionRequest/intents/intent.js.map +1 -1
  93. package/dist/src/schema/transactionRequest/intents/intentType.d.ts +2 -0
  94. package/dist/src/schema/transactionRequest/intents/intentType.js +1 -0
  95. package/dist/src/schema/transactionRequest/intents/intentType.js.map +1 -1
  96. package/dist/src/schema/transactionRequest/intents/iotaBuildOptions.d.ts +1 -0
  97. package/dist/src/schema/transactionRequest/intents/iotaConsolidateIntent.d.ts +1 -0
  98. package/dist/src/schema/transactionRequest/intents/iotaPaymentIntent.d.ts +2 -0
  99. package/dist/src/schema/transactionRequest/intents/irysPledgeIntent.d.ts +1 -0
  100. package/dist/src/schema/transactionRequest/intents/irysStakeIntent.d.ts +1 -0
  101. package/dist/src/schema/transactionRequest/intents/lightningPaymentIntent.d.ts +2 -0
  102. package/dist/src/schema/transactionRequest/intents/mmiSignMessageIntent.d.ts +1 -0
  103. package/dist/src/schema/transactionRequest/intents/mmiSignTransactionIntent.d.ts +1 -0
  104. package/dist/src/schema/transactionRequest/intents/nearStakeIntent.d.ts +1 -0
  105. package/dist/src/schema/transactionRequest/intents/nearUnstakeIntent.d.ts +1 -0
  106. package/dist/src/schema/transactionRequest/intents/nearWithdrawIntent.d.ts +1 -0
  107. package/dist/src/schema/transactionRequest/intents/paymentIntent.d.ts +1 -0
  108. package/dist/src/schema/transactionRequest/intents/polyxBaseIntent.d.ts +1 -0
  109. package/dist/src/schema/transactionRequest/intents/polyxCreateAccountIntent.d.ts +1 -0
  110. package/dist/src/schema/transactionRequest/intents/polyxPreApproveAssetIntent.d.ts +1 -0
  111. package/dist/src/schema/transactionRequest/intents/polyxStakeIntent.d.ts +1 -0
  112. package/dist/src/schema/transactionRequest/intents/polyxUnstakeIntent.d.ts +1 -0
  113. package/dist/src/schema/transactionRequest/intents/polyxWithdrawIntent.d.ts +1 -0
  114. package/dist/src/schema/transactionRequest/intents/signMessageIntent.d.ts +1 -0
  115. package/dist/src/schema/transactionRequest/intents/solAuthorizeIntent.d.ts +1 -0
  116. package/dist/src/schema/transactionRequest/intents/solClaimIntent.d.ts +1 -0
  117. package/dist/src/schema/transactionRequest/intents/solCloseAssociatedTokenAccountIntent.d.ts +1 -0
  118. package/dist/src/schema/transactionRequest/intents/solCreateAssociatedTokenAccountIntent.d.ts +1 -0
  119. package/dist/src/schema/transactionRequest/intents/solCustomTxIntent.d.ts +1 -0
  120. package/dist/src/schema/transactionRequest/intents/solDeactivateIntent.d.ts +1 -0
  121. package/dist/src/schema/transactionRequest/intents/solDelegateIntent.d.ts +1 -0
  122. package/dist/src/schema/transactionRequest/intents/solGoUnstakeIntent.d.ts +1 -0
  123. package/dist/src/schema/transactionRequest/intents/solPaymentIntent.d.ts +1 -0
  124. package/dist/src/schema/transactionRequest/intents/solStakeIntent.d.ts +2 -0
  125. package/dist/src/schema/transactionRequest/intents/solUnstakeIntent.d.ts +2 -0
  126. package/dist/src/schema/transactionRequest/intents/solVersionedCustomTxIntent.d.ts +1 -0
  127. package/dist/src/schema/transactionRequest/intents/stakeClaimRewardsIntent.d.ts +1 -0
  128. package/dist/src/schema/transactionRequest/intents/stakeIntent.d.ts +1 -0
  129. package/dist/src/schema/transactionRequest/intents/stakeSwitchValidatorIntent.d.ts +1 -0
  130. package/dist/src/schema/transactionRequest/intents/stakeWithCallDataIntent.d.ts +1 -0
  131. package/dist/src/schema/transactionRequest/intents/substrateBaseIntent.d.ts +1 -0
  132. package/dist/src/schema/transactionRequest/intents/substratePaymentIntent.d.ts +1 -0
  133. package/dist/src/schema/transactionRequest/intents/suiBuildOptions.d.ts +1 -0
  134. package/dist/src/schema/transactionRequest/intents/suiConsolidateIntent.d.ts +1 -0
  135. package/dist/src/schema/transactionRequest/intents/suiCustomTxIntent.d.ts +2 -0
  136. package/dist/src/schema/transactionRequest/intents/suiGoUnstakeIntent.d.ts +2 -0
  137. package/dist/src/schema/transactionRequest/intents/suiPaymentIntent.d.ts +2 -0
  138. package/dist/src/schema/transactionRequest/intents/suiStakingIntent.d.ts +1 -0
  139. package/dist/src/schema/transactionRequest/intents/suiUnstakingIntent.d.ts +1 -0
  140. package/dist/src/schema/transactionRequest/intents/switchValidatorWithCallDataIntent.d.ts +1 -0
  141. package/dist/src/schema/transactionRequest/intents/taoStakeIntent.d.ts +2 -0
  142. package/dist/src/schema/transactionRequest/intents/taoStakingBaseIntent.d.ts +1 -0
  143. package/dist/src/schema/transactionRequest/intents/taoSwitchValidatorIntent.d.ts +1 -0
  144. package/dist/src/schema/transactionRequest/intents/taoTransferStakeIntent.d.ts +1 -0
  145. package/dist/src/schema/transactionRequest/intents/taoUnstakeIntent.d.ts +2 -0
  146. package/dist/src/schema/transactionRequest/intents/tokenApprovalIntent.d.ts +1 -0
  147. package/dist/src/schema/transactionRequest/intents/tonDelegateIntent.d.ts +1 -0
  148. package/dist/src/schema/transactionRequest/intents/tonMultiNominatorDelegateIntent.d.ts +1 -0
  149. package/dist/src/schema/transactionRequest/intents/tonMultiNominatorUndelegateIntent.d.ts +1 -0
  150. package/dist/src/schema/transactionRequest/intents/tonPaymentIntent.d.ts +1 -0
  151. package/dist/src/schema/transactionRequest/intents/tonSingleNominatorDelegateIntent.d.ts +1 -0
  152. package/dist/src/schema/transactionRequest/intents/tonSingleNominatorUndelegateIntent.d.ts +1 -0
  153. package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.d.ts +1 -0
  154. package/dist/src/schema/transactionRequest/intents/tonWhalesDelegateIntent.d.ts +1 -0
  155. package/dist/src/schema/transactionRequest/intents/tonWhalesUndelegateIntent.d.ts +1 -0
  156. package/dist/src/schema/transactionRequest/intents/transferTokenIntent.d.ts +1 -0
  157. package/dist/src/schema/transactionRequest/intents/trxClaimRewardsIntent.d.ts +1 -0
  158. package/dist/src/schema/transactionRequest/intents/trxCreateAccountIntent.d.ts +1 -0
  159. package/dist/src/schema/transactionRequest/intents/trxDelegateResourceIntent.d.ts +1 -0
  160. package/dist/src/schema/transactionRequest/intents/trxFreezeIntent.d.ts +1 -0
  161. package/dist/src/schema/transactionRequest/intents/trxUndelegateResourceIntent.d.ts +1 -0
  162. package/dist/src/schema/transactionRequest/intents/trxUnfreezeIntent.d.ts +1 -0
  163. package/dist/src/schema/transactionRequest/intents/trxVoteIntent.d.ts +1 -0
  164. package/dist/src/schema/transactionRequest/intents/trxWithdrawExpireUnfreezeIntent.d.ts +1 -0
  165. package/dist/src/schema/transactionRequest/intents/undelegateIntent.d.ts +1 -0
  166. package/dist/src/schema/transactionRequest/intents/unstakeIntent.d.ts +1 -0
  167. package/dist/src/schema/transactionRequest/intents/validatorRegistrationIntent.d.ts +1 -0
  168. package/dist/src/schema/transactionRequest/intents/vetDecreaseStakeIntent.d.ts +1 -0
  169. package/dist/src/schema/transactionRequest/intents/vetDelegateIntent.d.ts +1 -0
  170. package/dist/src/schema/transactionRequest/intents/vetIncreaseStakeIntent.d.ts +1 -0
  171. package/dist/src/schema/transactionRequest/intents/vetSignalExitIntent.d.ts +1 -0
  172. package/dist/src/schema/transactionRequest/intents/vetStakeClaimRewardsIntent.d.ts +1 -0
  173. package/dist/src/schema/transactionRequest/intents/vetStakingIntent.d.ts +1 -0
  174. package/dist/src/schema/transactionRequest/intents/vetUnstakingIntent.d.ts +2 -0
  175. package/dist/src/schema/transactionRequest/intents/vetValidatorRegistrationIntent.d.ts +1 -0
  176. package/dist/src/schema/transactionRequest/intents/vetWithdrawStakeIntent.d.ts +1 -0
  177. package/dist/src/schema/transactionRequest/intents/voteDelegationIntent.d.ts +1 -0
  178. package/dist/src/schema/transactionRequest/intents/walletRecoveryIntent.d.ts +1 -0
  179. package/dist/src/schema/transactionRequest/intents/walrusStakingIntent.d.ts +1 -0
  180. package/dist/src/schema/transactionRequest/intents/walrusUndelegateIntent.d.ts +1 -0
  181. package/dist/src/schema/transactionRequest/intents/walrusWithdrawIntent.d.ts +1 -0
  182. package/dist/src/schema/transactionRequest/intents/withdrawIntent.d.ts +1 -0
  183. package/dist/src/schema/transactionRequest/intents/xdcStakingIntent.d.ts +2 -0
  184. package/dist/src/schema/transactionRequest/intents/xdcUnstakingIntent.d.ts +2 -0
  185. package/dist/src/schema/transactionRequest/transactionRequest.d.ts +470 -0
  186. package/package.json +1 -1
  187. package/src/schema/mpcv2/smc/eddsaKeygenRound.ts +148 -0
  188. package/src/schema/mpcv2/smc/eddsaKeygenState.ts +31 -0
  189. package/src/schema/mpcv2/smc/index.ts +2 -0
  190. package/src/schema/transactionRequest/intents/cantonCommandIntent.ts +80 -0
  191. package/src/schema/transactionRequest/intents/index.ts +1 -0
  192. package/src/schema/transactionRequest/intents/intent.ts +2 -0
  193. package/src/schema/transactionRequest/intents/intentType.ts +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "6.15.0",
3
+ "version": "6.17.0",
4
4
  "description": "Collection of types exposed externally as part of the BitGo public API",
5
5
  "license": "UNLICENSED",
6
6
  "author": "",
@@ -0,0 +1,148 @@
1
+ import * as t from "io-ts";
2
+ import { NonEmptyString } from "io-ts-types";
3
+
4
+ import { EddsaMPCv2SignedMessage } from "../common";
5
+ import { EddsaKeyCreationMPCv2State } from "./eddsaKeygenState";
6
+ import { OVCIndexEnum } from "./keygenRound";
7
+ import { WalletType } from "./walletType";
8
+
9
+ const BaseRoundPayload = t.type({
10
+ state: EddsaKeyCreationMPCv2State,
11
+ tssVersion: NonEmptyString,
12
+ walletType: WalletType,
13
+ coin: NonEmptyString,
14
+ });
15
+
16
+ type BaseRoundPayload = t.TypeOf<typeof BaseRoundPayload>;
17
+
18
+ export const EddsaOVC1ToOVC2Round1Payload = t.intersection([
19
+ BaseRoundPayload,
20
+ t.type({
21
+ ovc: t.type({
22
+ [OVCIndexEnum.ONE]: t.type({
23
+ gpgPubKey: NonEmptyString,
24
+ ovcMsg1: EddsaMPCv2SignedMessage,
25
+ }),
26
+ }),
27
+ }),
28
+ ]);
29
+
30
+ export type EddsaOVC1ToOVC2Round1Payload = t.TypeOf<
31
+ typeof EddsaOVC1ToOVC2Round1Payload
32
+ >;
33
+
34
+ export const EddsaOVC1ToBitgoRound1Payload = t.intersection([
35
+ BaseRoundPayload,
36
+ t.type({
37
+ ovc: t.type({
38
+ [OVCIndexEnum.ONE]: t.type({
39
+ gpgPubKey: NonEmptyString,
40
+ ovcMsg1: EddsaMPCv2SignedMessage,
41
+ }),
42
+ [OVCIndexEnum.TWO]: t.type({
43
+ gpgPubKey: NonEmptyString,
44
+ ovcMsg1: EddsaMPCv2SignedMessage,
45
+ }),
46
+ }),
47
+ }),
48
+ ]);
49
+
50
+ export type EddsaOVC1ToBitgoRound1Payload = t.TypeOf<
51
+ typeof EddsaOVC1ToBitgoRound1Payload
52
+ >;
53
+
54
+ export const EddsaPlatformRound1Payload = t.type({
55
+ walletGpgPubKeySigs: NonEmptyString,
56
+ sessionId: NonEmptyString,
57
+ bitgoMsg1: EddsaMPCv2SignedMessage,
58
+ });
59
+
60
+ export type EddsaPlatformRound1Payload = t.TypeOf<
61
+ typeof EddsaPlatformRound1Payload
62
+ >;
63
+
64
+ export const EddsaBitgoToOVC1Round1Response = t.intersection([
65
+ EddsaOVC1ToBitgoRound1Payload,
66
+ t.type({ platform: EddsaPlatformRound1Payload }),
67
+ ]);
68
+
69
+ export type EddsaBitgoToOVC1Round1Response = t.TypeOf<
70
+ typeof EddsaBitgoToOVC1Round1Response
71
+ >;
72
+
73
+ export const EddsaOVC1ToOVC2Round2Payload = t.intersection([
74
+ BaseRoundPayload,
75
+ t.type({
76
+ ovc: t.type({
77
+ [OVCIndexEnum.ONE]: t.type({
78
+ gpgPubKey: NonEmptyString,
79
+ ovcMsg1: EddsaMPCv2SignedMessage,
80
+ ovcMsg2: EddsaMPCv2SignedMessage,
81
+ }),
82
+ [OVCIndexEnum.TWO]: t.type({
83
+ gpgPubKey: NonEmptyString,
84
+ ovcMsg1: EddsaMPCv2SignedMessage,
85
+ }),
86
+ }),
87
+ platform: EddsaPlatformRound1Payload,
88
+ }),
89
+ ]);
90
+
91
+ export type EddsaOVC1ToOVC2Round2Payload = t.TypeOf<
92
+ typeof EddsaOVC1ToOVC2Round2Payload
93
+ >;
94
+
95
+ export const EddsaOVC2ToBitgoRound2Payload = t.intersection([
96
+ BaseRoundPayload,
97
+ t.type({
98
+ ovc: t.type({
99
+ [OVCIndexEnum.ONE]: t.type({
100
+ gpgPubKey: NonEmptyString,
101
+ ovcMsg1: EddsaMPCv2SignedMessage,
102
+ ovcMsg2: EddsaMPCv2SignedMessage,
103
+ }),
104
+ [OVCIndexEnum.TWO]: t.type({
105
+ gpgPubKey: NonEmptyString,
106
+ ovcMsg1: EddsaMPCv2SignedMessage,
107
+ ovcMsg2: EddsaMPCv2SignedMessage,
108
+ }),
109
+ }),
110
+ platform: EddsaPlatformRound1Payload,
111
+ }),
112
+ ]);
113
+
114
+ export type EddsaOVC2ToBitgoRound2Payload = t.TypeOf<
115
+ typeof EddsaOVC2ToBitgoRound2Payload
116
+ >;
117
+
118
+ export const EddsaPlatformRound2Payload = t.intersection([
119
+ EddsaPlatformRound1Payload,
120
+ t.type({
121
+ commonPublicKeychain: NonEmptyString,
122
+ bitgoMsg2: EddsaMPCv2SignedMessage,
123
+ }),
124
+ ]);
125
+
126
+ export type EddsaPlatformRound2Payload = t.TypeOf<
127
+ typeof EddsaPlatformRound2Payload
128
+ >;
129
+
130
+ export const EddsaBitgoToOVC1Round2Response = t.intersection([
131
+ t.type({ bitGoKeyId: NonEmptyString }),
132
+ EddsaOVC2ToBitgoRound2Payload,
133
+ t.type({ platform: EddsaPlatformRound2Payload }),
134
+ t.partial({
135
+ ovc: t.type({
136
+ [OVCIndexEnum.ONE]: t.partial({
137
+ commonKeyChainSignature: NonEmptyString,
138
+ }),
139
+ [OVCIndexEnum.TWO]: t.partial({
140
+ commonKeyChainSignature: NonEmptyString,
141
+ }),
142
+ }),
143
+ }),
144
+ ]);
145
+
146
+ export type EddsaBitgoToOVC1Round2Response = t.TypeOf<
147
+ typeof EddsaBitgoToOVC1Round2Response
148
+ >;
@@ -0,0 +1,31 @@
1
+ import * as t from "io-ts";
2
+
3
+ export enum EddsaKeyCreationMPCv2StateEnum {
4
+ WaitingForOVC1Round0Data = -1,
5
+ WaitingForOVC2Round1Data,
6
+ WaitingForOVC1Round1Data,
7
+ WaitingForBitgoRound1Data,
8
+ WaitingForOVC1Round2Data,
9
+ WaitingForOVC2Round2Data,
10
+ WaitingForBitgoRound2Data,
11
+ WaitingForOVC1GenerateKey,
12
+ WaitingForOVC2GenerateKey,
13
+ KeyGenerationComplete,
14
+ }
15
+
16
+ export const EddsaKeyCreationMPCv2State = t.union([
17
+ t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round0Data),
18
+ t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round1Data),
19
+ t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round1Data),
20
+ t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound1Data),
21
+ t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1Round2Data),
22
+ t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2Round2Data),
23
+ t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForBitgoRound2Data),
24
+ t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC1GenerateKey),
25
+ t.literal(EddsaKeyCreationMPCv2StateEnum.WaitingForOVC2GenerateKey),
26
+ t.literal(EddsaKeyCreationMPCv2StateEnum.KeyGenerationComplete),
27
+ ]);
28
+
29
+ export type EddsaKeyCreationMPCv2State = t.TypeOf<
30
+ typeof EddsaKeyCreationMPCv2State
31
+ >;
@@ -1,4 +1,6 @@
1
1
  export * from "./keygenRound";
2
2
  export * from "./keygenState";
3
+ export * from "./eddsaKeygenRound";
4
+ export * from "./eddsaKeygenState";
3
5
  export * from "./walletType";
4
6
  export * from "./dsgType";
@@ -0,0 +1,80 @@
1
+ import * as t from "io-ts";
2
+ import { BaseIntent } from "./baseIntent";
3
+ import { intentTypes } from "./intentType";
4
+
5
+ /**
6
+ * @title Canton Command Intent
7
+ *
8
+ * Generic intent for executing any allowlisted DAML command on Canton.
9
+ *
10
+ * All command-specific fields are grouped under {@link cantonCommandParams} to keep the
11
+ * top-level intent shape lean
12
+ *
13
+ * @param {String} intentType - The type of intent (always set to cantonCommand)
14
+ * @param {Object} cantonCommandParams - Canton-specific command payload
15
+ * @param {Object} cantonCommandParams.command - The DAML command to execute (CreateCommand or ExerciseCommand)
16
+ * @param {Array} cantonCommandParams.actAs - Canton parties that must sign the transaction
17
+ * @param {Array} [cantonCommandParams.readAs] - Canton parties used for read-only ACS visibility
18
+ * @param {Array} [cantonCommandParams.resolveContracts] - ACS resolution specs; each entry resolves a contractId and injects it at injectAs path
19
+ *
20
+ * For ExerciseCommand, either supply `contractId` directly or provide `resolveContracts` to inject it via ACS — enforced by IMS at build time, not the codec.
21
+ * `CantonCommand` uses open codecs per intents layer convention; one-of is enforced by Canton's API at execution time.
22
+ */
23
+
24
+ const CreateCommand = t.type({
25
+ CreateCommand: t.type({
26
+ templateId: t.string,
27
+ createArguments: t.record(t.string, t.unknown),
28
+ }),
29
+ });
30
+
31
+ const ExerciseCommand = t.type({
32
+ ExerciseCommand: t.intersection([
33
+ t.type({
34
+ templateId: t.string,
35
+ choice: t.string,
36
+ choiceArgument: t.record(t.string, t.unknown),
37
+ }),
38
+ t.partial({
39
+ // omit when contractId will be injected via resolveContracts at build time
40
+ contractId: t.string,
41
+ }),
42
+ ]),
43
+ });
44
+
45
+ const CantonCommand = t.union([CreateCommand, ExerciseCommand]);
46
+
47
+ const ResolveContractSpec = t.intersection([
48
+ t.type({
49
+ templateId: t.string,
50
+ actAs: t.array(t.string),
51
+ // dot-notation path where the resolved contractId is written, e.g. "command.ExerciseCommand.contractId"
52
+ injectAs: t.string,
53
+ }),
54
+ t.partial({
55
+ readAs: t.array(t.string),
56
+ // if true, resolves all active contracts for the templateId instead of just the first match
57
+ resolveAll: t.boolean,
58
+ }),
59
+ ]);
60
+
61
+ const CantonCommandParams = t.intersection([
62
+ t.type({
63
+ command: CantonCommand,
64
+ actAs: t.array(t.string),
65
+ }),
66
+ t.partial({
67
+ readAs: t.array(t.string),
68
+ resolveContracts: t.array(ResolveContractSpec),
69
+ }),
70
+ ]);
71
+
72
+ export const CantonCommandIntent = t.intersection([
73
+ BaseIntent,
74
+ t.type({
75
+ intentType: intentTypes.cantonCommand,
76
+ cantonCommandParams: CantonCommandParams,
77
+ }),
78
+ ]);
79
+
80
+ export type CantonCommandIntent = t.TypeOf<typeof CantonCommandIntent>;
@@ -34,6 +34,7 @@ export * from "./bscStakeClaimRewardsIntent";
34
34
  export * from "./bscUndelegateIntent";
35
35
  export * from "./bscWithdrawUndelegateIntent";
36
36
  export * from "./cantonAllocationRequestIntent";
37
+ export * from "./cantonCommandIntent";
37
38
  export * from "./cantonCosignDelegationAcceptIntent";
38
39
  export * from "./cantonCosignDelegationProposalIntent";
39
40
  export * from "./cantonPaymentIntent";
@@ -114,6 +114,7 @@ import { VetSignalExitIntent } from "./vetSignalExitIntent";
114
114
  import { VetWithdrawStakeIntent } from "./vetWithdrawStakeIntent";
115
115
  import { CantonCosignDelegationAcceptIntent } from "./cantonCosignDelegationAcceptIntent";
116
116
  import { CantonCosignDelegationProposalIntent } from "./cantonCosignDelegationProposalIntent";
117
+ import { CantonCommandIntent } from "./cantonCommandIntent";
117
118
  import { CantonPaymentIntent } from "./cantonPaymentIntent";
118
119
  import { CantonTransferAcceptIntent } from "./cantonTransferAcceptIntent";
119
120
  import { CantonTransferAcknowledgeIntent } from "./cantonTransferAcknowledgeIntent";
@@ -157,6 +158,7 @@ export const TransactionIntent = t.union([
157
158
  BscWithdrawUndelegateIntent,
158
159
  CantonCosignDelegationAcceptIntent,
159
160
  CantonCosignDelegationProposalIntent,
161
+ CantonCommandIntent,
160
162
  CantonPaymentIntent,
161
163
  CantonTransferAcceptIntent,
162
164
  CantonTransferAcknowledgeIntent,
@@ -60,6 +60,7 @@ export const intentTypes = {
60
60
  cosignDelegationProposal: t.literal("cosignDelegationProposal"),
61
61
  cosignDelegationAccept: t.literal("cosignDelegationAccept"),
62
62
  allocationRequest: t.literal("allocationRequest"),
63
+ cantonCommand: t.literal("cantonCommand"),
63
64
  /**
64
65
  * Deposit assets into a DeFi protocol vault (e.g. Concrete USD1 → ctUSD1cx).
65
66
  */