@bitgo/public-types 6.7.0 → 6.8.1

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 (185) hide show
  1. package/dist/src/schema/transactionRequest/intents/accelerationIntent.d.ts +2 -0
  2. package/dist/src/schema/transactionRequest/intents/accountBaseCreateAccountIntent.d.ts +2 -0
  3. package/dist/src/schema/transactionRequest/intents/accountBaseUpdateAccountIntent.d.ts +2 -0
  4. package/dist/src/schema/transactionRequest/intents/adaPaymentIntent.d.ts +2 -0
  5. package/dist/src/schema/transactionRequest/intents/adaPledgeIntent.d.ts +2 -0
  6. package/dist/src/schema/transactionRequest/intents/adaStakeClaimRewardsIntent.d.ts +2 -0
  7. package/dist/src/schema/transactionRequest/intents/adaStakeIntent.d.ts +2 -0
  8. package/dist/src/schema/transactionRequest/intents/adaUnstakeIntent.d.ts +2 -0
  9. package/dist/src/schema/transactionRequest/intents/adaVoteDelegationIntent.d.ts +2 -0
  10. package/dist/src/schema/transactionRequest/intents/aptCustomTxIntent.d.ts +2 -0
  11. package/dist/src/schema/transactionRequest/intents/aptStakeIntent.d.ts +2 -0
  12. package/dist/src/schema/transactionRequest/intents/aptUnstakeIntent.d.ts +2 -0
  13. package/dist/src/schema/transactionRequest/intents/aptWithdrawStakeIntent.d.ts +2 -0
  14. package/dist/src/schema/transactionRequest/intents/atomPaymentIntent.d.ts +2 -0
  15. package/dist/src/schema/transactionRequest/intents/atomStakeIntent.d.ts +2 -0
  16. package/dist/src/schema/transactionRequest/intents/atomUnstakeIntent.d.ts +2 -0
  17. package/dist/src/schema/transactionRequest/intents/atomWithdrawIntent.d.ts +2 -0
  18. package/dist/src/schema/transactionRequest/intents/babyCreateBtcDelegationIntent.d.ts +2 -0
  19. package/dist/src/schema/transactionRequest/intents/babyWithdrawRewardIntent.d.ts +2 -0
  20. package/dist/src/schema/transactionRequest/intents/baseBridgeFundsIntent.d.ts +2 -0
  21. package/dist/src/schema/transactionRequest/intents/baseGoStakeIntent.d.ts +2 -0
  22. package/dist/src/schema/transactionRequest/intents/baseIntent.d.ts +4 -0
  23. package/dist/src/schema/transactionRequest/intents/baseStakeIntent.d.ts +2 -0
  24. package/dist/src/schema/transactionRequest/intents/baseStakeIntentWithCalldata.d.ts +2 -0
  25. package/dist/src/schema/transactionRequest/intents/beraDelegateIntent.d.ts +2 -0
  26. package/dist/src/schema/transactionRequest/intents/bscDelegateIntent.d.ts +2 -0
  27. package/dist/src/schema/transactionRequest/intents/bscStakeClaimRewardsIntent.d.ts +2 -0
  28. package/dist/src/schema/transactionRequest/intents/bscUndelegateIntent.d.ts +2 -0
  29. package/dist/src/schema/transactionRequest/intents/bscWithdrawUndelegateIntent.d.ts +2 -0
  30. package/dist/src/schema/transactionRequest/intents/cantonCosignDelegationAcceptIntent.d.ts +69 -0
  31. package/dist/src/schema/transactionRequest/intents/cantonCosignDelegationAcceptIntent.js +37 -0
  32. package/dist/src/schema/transactionRequest/intents/cantonCosignDelegationAcceptIntent.js.map +1 -0
  33. package/dist/src/schema/transactionRequest/intents/cantonCosignDelegationProposalIntent.d.ts +72 -0
  34. package/dist/src/schema/transactionRequest/intents/cantonCosignDelegationProposalIntent.js +41 -0
  35. package/dist/src/schema/transactionRequest/intents/cantonCosignDelegationProposalIntent.js.map +1 -0
  36. package/dist/src/schema/transactionRequest/intents/cantonPaymentIntent.d.ts +2 -0
  37. package/dist/src/schema/transactionRequest/intents/cantonTransferAcceptIntent.d.ts +2 -0
  38. package/dist/src/schema/transactionRequest/intents/cantonTransferAcknowledgeIntent.d.ts +2 -0
  39. package/dist/src/schema/transactionRequest/intents/cantonTransferOfferWithdrawnIntent.d.ts +2 -0
  40. package/dist/src/schema/transactionRequest/intents/cantonTransferRejectIntent.d.ts +2 -0
  41. package/dist/src/schema/transactionRequest/intents/claimIntent.d.ts +2 -0
  42. package/dist/src/schema/transactionRequest/intents/consolidateTokenIntent.d.ts +2 -0
  43. package/dist/src/schema/transactionRequest/intents/coredaoClaimIntent.d.ts +2 -0
  44. package/dist/src/schema/transactionRequest/intents/coredaoDelegateIntent.d.ts +2 -0
  45. package/dist/src/schema/transactionRequest/intents/coredaoUndelegateIntent.d.ts +2 -0
  46. package/dist/src/schema/transactionRequest/intents/cosmosContractCallIntent.d.ts +2 -0
  47. package/dist/src/schema/transactionRequest/intents/cosmosPaymentIntent.d.ts +2 -0
  48. package/dist/src/schema/transactionRequest/intents/cosmosStakeClaimRewardsIntent.d.ts +2 -0
  49. package/dist/src/schema/transactionRequest/intents/cosmosStakeIntent.d.ts +2 -0
  50. package/dist/src/schema/transactionRequest/intents/cosmosSwitchValidatorIntent.d.ts +2 -0
  51. package/dist/src/schema/transactionRequest/intents/cosmosUnstakeIntent.d.ts +2 -0
  52. package/dist/src/schema/transactionRequest/intents/cosmosWithdrawIntent.d.ts +2 -0
  53. package/dist/src/schema/transactionRequest/intents/defiDepositIntent.d.ts +2 -0
  54. package/dist/src/schema/transactionRequest/intents/defiRedeemIntent.d.ts +2 -0
  55. package/dist/src/schema/transactionRequest/intents/delegateIntent.d.ts +2 -0
  56. package/dist/src/schema/transactionRequest/intents/dotBaseIntent.d.ts +2 -0
  57. package/dist/src/schema/transactionRequest/intents/dotCreateAccountIntent.d.ts +2 -0
  58. package/dist/src/schema/transactionRequest/intents/dotPaymentIntent.d.ts +2 -0
  59. package/dist/src/schema/transactionRequest/intents/dotStakingIntent.d.ts +2 -0
  60. package/dist/src/schema/transactionRequest/intents/dotUnstakingIntent.d.ts +2 -0
  61. package/dist/src/schema/transactionRequest/intents/dotWithdrawStakeIntent.d.ts +2 -0
  62. package/dist/src/schema/transactionRequest/intents/enableTokenIntent.d.ts +2 -0
  63. package/dist/src/schema/transactionRequest/intents/ethAccelerationIntent.d.ts +2 -0
  64. package/dist/src/schema/transactionRequest/intents/ethConsolidateTokenIntent.d.ts +2 -0
  65. package/dist/src/schema/transactionRequest/intents/ethFillNonceIntent.d.ts +2 -0
  66. package/dist/src/schema/transactionRequest/intents/ethLikeStakeIntent.d.ts +4 -0
  67. package/dist/src/schema/transactionRequest/intents/ethPaymentIntent.d.ts +2 -0
  68. package/dist/src/schema/transactionRequest/intents/ethStakingIntent.d.ts +2 -0
  69. package/dist/src/schema/transactionRequest/intents/ethTransferTokenIntent.d.ts +2 -0
  70. package/dist/src/schema/transactionRequest/intents/feeAddressTransferIntent.d.ts +2 -0
  71. package/dist/src/schema/transactionRequest/intents/fillNonceIntent.d.ts +2 -0
  72. package/dist/src/schema/transactionRequest/intents/goUnstakeIntent.d.ts +2 -0
  73. package/dist/src/schema/transactionRequest/intents/hbarUpdateAccountIntent.d.ts +2 -0
  74. package/dist/src/schema/transactionRequest/intents/hypeevmBridgeFundsIntent.d.ts +2 -0
  75. package/dist/src/schema/transactionRequest/intents/hypeevmEnableBridgingIntent.d.ts +2 -0
  76. package/dist/src/schema/transactionRequest/intents/hypeevmSpotTransferIntent.d.ts +2 -0
  77. package/dist/src/schema/transactionRequest/intents/icpPaymentIntent.d.ts +2 -0
  78. package/dist/src/schema/transactionRequest/intents/index.d.ts +2 -0
  79. package/dist/src/schema/transactionRequest/intents/index.js +2 -0
  80. package/dist/src/schema/transactionRequest/intents/index.js.map +1 -1
  81. package/dist/src/schema/transactionRequest/intents/intent.d.ts +431 -24
  82. package/dist/src/schema/transactionRequest/intents/intent.js +4 -0
  83. package/dist/src/schema/transactionRequest/intents/intent.js.map +1 -1
  84. package/dist/src/schema/transactionRequest/intents/intentType.d.ts +4 -0
  85. package/dist/src/schema/transactionRequest/intents/intentType.js +2 -0
  86. package/dist/src/schema/transactionRequest/intents/intentType.js.map +1 -1
  87. package/dist/src/schema/transactionRequest/intents/iotaBuildOptions.d.ts +2 -0
  88. package/dist/src/schema/transactionRequest/intents/iotaConsolidateIntent.d.ts +2 -0
  89. package/dist/src/schema/transactionRequest/intents/iotaPaymentIntent.d.ts +4 -0
  90. package/dist/src/schema/transactionRequest/intents/irysPledgeIntent.d.ts +2 -0
  91. package/dist/src/schema/transactionRequest/intents/irysStakeIntent.d.ts +2 -0
  92. package/dist/src/schema/transactionRequest/intents/lightningPaymentIntent.d.ts +4 -0
  93. package/dist/src/schema/transactionRequest/intents/mmiSignMessageIntent.d.ts +2 -0
  94. package/dist/src/schema/transactionRequest/intents/mmiSignTransactionIntent.d.ts +2 -0
  95. package/dist/src/schema/transactionRequest/intents/nearStakeIntent.d.ts +2 -0
  96. package/dist/src/schema/transactionRequest/intents/nearUnstakeIntent.d.ts +2 -0
  97. package/dist/src/schema/transactionRequest/intents/nearWithdrawIntent.d.ts +2 -0
  98. package/dist/src/schema/transactionRequest/intents/paymentIntent.d.ts +2 -0
  99. package/dist/src/schema/transactionRequest/intents/polyxBaseIntent.d.ts +2 -0
  100. package/dist/src/schema/transactionRequest/intents/polyxCreateAccountIntent.d.ts +2 -0
  101. package/dist/src/schema/transactionRequest/intents/polyxPreApproveAssetIntent.d.ts +2 -0
  102. package/dist/src/schema/transactionRequest/intents/polyxStakeIntent.d.ts +2 -0
  103. package/dist/src/schema/transactionRequest/intents/polyxUnstakeIntent.d.ts +2 -0
  104. package/dist/src/schema/transactionRequest/intents/polyxWithdrawIntent.d.ts +2 -0
  105. package/dist/src/schema/transactionRequest/intents/signMessageIntent.d.ts +2 -0
  106. package/dist/src/schema/transactionRequest/intents/solAuthorizeIntent.d.ts +4 -2
  107. package/dist/src/schema/transactionRequest/intents/solBuildOptions.d.ts +2 -2
  108. package/dist/src/schema/transactionRequest/intents/solBuildOptions.js +3 -2
  109. package/dist/src/schema/transactionRequest/intents/solBuildOptions.js.map +1 -1
  110. package/dist/src/schema/transactionRequest/intents/solClaimIntent.d.ts +4 -2
  111. package/dist/src/schema/transactionRequest/intents/solCloseAssociatedTokenAccountIntent.d.ts +4 -2
  112. package/dist/src/schema/transactionRequest/intents/solCreateAssociatedTokenAccountIntent.d.ts +4 -2
  113. package/dist/src/schema/transactionRequest/intents/solCustomTxIntent.d.ts +4 -2
  114. package/dist/src/schema/transactionRequest/intents/solDeactivateIntent.d.ts +4 -2
  115. package/dist/src/schema/transactionRequest/intents/solDelegateIntent.d.ts +4 -2
  116. package/dist/src/schema/transactionRequest/intents/solGoUnstakeIntent.d.ts +4 -2
  117. package/dist/src/schema/transactionRequest/intents/solPaymentIntent.d.ts +4 -2
  118. package/dist/src/schema/transactionRequest/intents/solStakeIntent.d.ts +8 -4
  119. package/dist/src/schema/transactionRequest/intents/solUnstakeIntent.d.ts +8 -4
  120. package/dist/src/schema/transactionRequest/intents/solVersionedCustomTxIntent.d.ts +4 -2
  121. package/dist/src/schema/transactionRequest/intents/stakeClaimRewardsIntent.d.ts +2 -0
  122. package/dist/src/schema/transactionRequest/intents/stakeIntent.d.ts +2 -0
  123. package/dist/src/schema/transactionRequest/intents/stakeSwitchValidatorIntent.d.ts +2 -0
  124. package/dist/src/schema/transactionRequest/intents/stakeWithCallDataIntent.d.ts +2 -0
  125. package/dist/src/schema/transactionRequest/intents/substrateBaseIntent.d.ts +2 -0
  126. package/dist/src/schema/transactionRequest/intents/substratePaymentIntent.d.ts +2 -0
  127. package/dist/src/schema/transactionRequest/intents/suiBuildOptions.d.ts +2 -0
  128. package/dist/src/schema/transactionRequest/intents/suiConsolidateIntent.d.ts +2 -0
  129. package/dist/src/schema/transactionRequest/intents/suiCustomTxIntent.d.ts +4 -0
  130. package/dist/src/schema/transactionRequest/intents/suiGoUnstakeIntent.d.ts +4 -0
  131. package/dist/src/schema/transactionRequest/intents/suiPaymentIntent.d.ts +4 -0
  132. package/dist/src/schema/transactionRequest/intents/suiStakingIntent.d.ts +2 -0
  133. package/dist/src/schema/transactionRequest/intents/suiUnstakingIntent.d.ts +2 -0
  134. package/dist/src/schema/transactionRequest/intents/switchValidatorWithCallDataIntent.d.ts +2 -0
  135. package/dist/src/schema/transactionRequest/intents/taoStakeIntent.d.ts +4 -0
  136. package/dist/src/schema/transactionRequest/intents/taoStakingBaseIntent.d.ts +2 -0
  137. package/dist/src/schema/transactionRequest/intents/taoSwitchValidatorIntent.d.ts +2 -0
  138. package/dist/src/schema/transactionRequest/intents/taoTransferStakeIntent.d.ts +2 -0
  139. package/dist/src/schema/transactionRequest/intents/taoUnstakeIntent.d.ts +4 -0
  140. package/dist/src/schema/transactionRequest/intents/tokenApprovalIntent.d.ts +2 -0
  141. package/dist/src/schema/transactionRequest/intents/tonDelegateIntent.d.ts +2 -0
  142. package/dist/src/schema/transactionRequest/intents/tonMultiNominatorDelegateIntent.d.ts +2 -0
  143. package/dist/src/schema/transactionRequest/intents/tonMultiNominatorUndelegateIntent.d.ts +2 -0
  144. package/dist/src/schema/transactionRequest/intents/tonPaymentIntent.d.ts +2 -0
  145. package/dist/src/schema/transactionRequest/intents/tonSingleNominatorDelegateIntent.d.ts +2 -0
  146. package/dist/src/schema/transactionRequest/intents/tonSingleNominatorUndelegateIntent.d.ts +2 -0
  147. package/dist/src/schema/transactionRequest/intents/tonUndelegateIntent.d.ts +2 -0
  148. package/dist/src/schema/transactionRequest/intents/tonWhalesDelegateIntent.d.ts +2 -0
  149. package/dist/src/schema/transactionRequest/intents/tonWhalesUndelegateIntent.d.ts +2 -0
  150. package/dist/src/schema/transactionRequest/intents/transferTokenIntent.d.ts +2 -0
  151. package/dist/src/schema/transactionRequest/intents/trxClaimRewardsIntent.d.ts +2 -0
  152. package/dist/src/schema/transactionRequest/intents/trxDelegateResourceIntent.d.ts +2 -0
  153. package/dist/src/schema/transactionRequest/intents/trxFreezeIntent.d.ts +2 -0
  154. package/dist/src/schema/transactionRequest/intents/trxUndelegateResourceIntent.d.ts +2 -0
  155. package/dist/src/schema/transactionRequest/intents/trxUnfreezeIntent.d.ts +2 -0
  156. package/dist/src/schema/transactionRequest/intents/trxVoteIntent.d.ts +2 -0
  157. package/dist/src/schema/transactionRequest/intents/trxWithdrawExpireUnfreezeIntent.d.ts +2 -0
  158. package/dist/src/schema/transactionRequest/intents/undelegateIntent.d.ts +2 -0
  159. package/dist/src/schema/transactionRequest/intents/unstakeIntent.d.ts +2 -0
  160. package/dist/src/schema/transactionRequest/intents/validatorRegistrationIntent.d.ts +2 -0
  161. package/dist/src/schema/transactionRequest/intents/vetDecreaseStakeIntent.d.ts +2 -0
  162. package/dist/src/schema/transactionRequest/intents/vetDelegateIntent.d.ts +2 -0
  163. package/dist/src/schema/transactionRequest/intents/vetIncreaseStakeIntent.d.ts +2 -0
  164. package/dist/src/schema/transactionRequest/intents/vetSignalExitIntent.d.ts +2 -0
  165. package/dist/src/schema/transactionRequest/intents/vetStakeClaimRewardsIntent.d.ts +2 -0
  166. package/dist/src/schema/transactionRequest/intents/vetStakingIntent.d.ts +2 -0
  167. package/dist/src/schema/transactionRequest/intents/vetUnstakingIntent.d.ts +4 -0
  168. package/dist/src/schema/transactionRequest/intents/vetValidatorRegistrationIntent.d.ts +2 -0
  169. package/dist/src/schema/transactionRequest/intents/vetWithdrawStakeIntent.d.ts +2 -0
  170. package/dist/src/schema/transactionRequest/intents/voteDelegationIntent.d.ts +2 -0
  171. package/dist/src/schema/transactionRequest/intents/walletRecoveryIntent.d.ts +2 -0
  172. package/dist/src/schema/transactionRequest/intents/walrusStakingIntent.d.ts +2 -0
  173. package/dist/src/schema/transactionRequest/intents/walrusUndelegateIntent.d.ts +2 -0
  174. package/dist/src/schema/transactionRequest/intents/walrusWithdrawIntent.d.ts +2 -0
  175. package/dist/src/schema/transactionRequest/intents/withdrawIntent.d.ts +2 -0
  176. package/dist/src/schema/transactionRequest/intents/xdcStakingIntent.d.ts +4 -0
  177. package/dist/src/schema/transactionRequest/intents/xdcUnstakingIntent.d.ts +4 -0
  178. package/dist/src/schema/transactionRequest/transactionRequest.d.ts +862 -48
  179. package/package.json +1 -1
  180. package/src/schema/transactionRequest/intents/cantonCosignDelegationAcceptIntent.ts +23 -0
  181. package/src/schema/transactionRequest/intents/cantonCosignDelegationProposalIntent.ts +29 -0
  182. package/src/schema/transactionRequest/intents/index.ts +2 -0
  183. package/src/schema/transactionRequest/intents/intent.ts +4 -0
  184. package/src/schema/transactionRequest/intents/intentType.ts +2 -0
  185. package/src/schema/transactionRequest/intents/solBuildOptions.ts +11 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitgo/public-types",
3
- "version": "6.7.0",
3
+ "version": "6.8.1",
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,23 @@
1
+ import * as t from "io-ts";
2
+ import { BaseIntent } from "./baseIntent";
3
+ import { intentTypes } from "./intentType";
4
+
5
+ /**
6
+ * @title Canton Cosign Delegation Accept Intent
7
+ *
8
+ * Intent for accepting a cosign delegation on the `Canton` chain.
9
+ *
10
+ * @param {String} intentType - The type of intent (always set to cosignDelegationAccept)
11
+ * @param {String} txRequestId - The cosignDelegationProposal txRequestId
12
+ */
13
+ export const CantonCosignDelegationAcceptIntent = t.intersection([
14
+ BaseIntent,
15
+ t.type({
16
+ intentType: intentTypes.cosignDelegationAccept,
17
+ txRequestId: t.string,
18
+ }),
19
+ ]);
20
+
21
+ export type CantonCosignDelegationAcceptIntent = t.TypeOf<
22
+ typeof CantonCosignDelegationAcceptIntent
23
+ >;
@@ -0,0 +1,29 @@
1
+ import * as t from "io-ts";
2
+ import { BaseIntent } from "./baseIntent";
3
+ import { intentTypes } from "./intentType";
4
+
5
+ /**
6
+ * @title Canton Cosign Delegation Proposal Intent
7
+ *
8
+ * Intent for cosigning a delegation proposal on the `Canton` chain.
9
+ *
10
+ * @param {String} intentType - The type of intent (always set to cosignDelegationProposal)
11
+ * @param {String} contractId - The contract id of the delegation proposal to cosign
12
+ * @param {String} operatorId - The operator id associated with the delegation proposal
13
+ * @param {String} [packageName] - The optional package name
14
+ */
15
+ export const CantonCosignDelegationProposalIntent = t.intersection([
16
+ BaseIntent,
17
+ t.type({
18
+ intentType: intentTypes.cosignDelegationProposal,
19
+ contractId: t.string,
20
+ operatorId: t.string,
21
+ }),
22
+ t.partial({
23
+ packageName: t.string,
24
+ }),
25
+ ]);
26
+
27
+ export type CantonCosignDelegationProposalIntent = t.TypeOf<
28
+ typeof CantonCosignDelegationProposalIntent
29
+ >;
@@ -33,6 +33,8 @@ export * from "./bscDelegateIntent";
33
33
  export * from "./bscStakeClaimRewardsIntent";
34
34
  export * from "./bscUndelegateIntent";
35
35
  export * from "./bscWithdrawUndelegateIntent";
36
+ export * from "./cantonCosignDelegationAcceptIntent";
37
+ export * from "./cantonCosignDelegationProposalIntent";
36
38
  export * from "./cantonPaymentIntent";
37
39
  export * from "./cantonTransferAcceptIntent";
38
40
  export * from "./cantonTransferAcknowledgeIntent";
@@ -112,6 +112,8 @@ import { VetIncreaseStakeIntent } from "./vetIncreaseStakeIntent";
112
112
  import { VetDecreaseStakeIntent } from "./vetDecreaseStakeIntent";
113
113
  import { VetSignalExitIntent } from "./vetSignalExitIntent";
114
114
  import { VetWithdrawStakeIntent } from "./vetWithdrawStakeIntent";
115
+ import { CantonCosignDelegationAcceptIntent } from "./cantonCosignDelegationAcceptIntent";
116
+ import { CantonCosignDelegationProposalIntent } from "./cantonCosignDelegationProposalIntent";
115
117
  import { CantonPaymentIntent } from "./cantonPaymentIntent";
116
118
  import { CantonTransferAcceptIntent } from "./cantonTransferAcceptIntent";
117
119
  import { CantonTransferAcknowledgeIntent } from "./cantonTransferAcknowledgeIntent";
@@ -153,6 +155,8 @@ export const TransactionIntent = t.union([
153
155
  BscDelegateIntent,
154
156
  BscUnDelegateIntent,
155
157
  BscWithdrawUndelegateIntent,
158
+ CantonCosignDelegationAcceptIntent,
159
+ CantonCosignDelegationProposalIntent,
156
160
  CantonPaymentIntent,
157
161
  CantonTransferAcceptIntent,
158
162
  CantonTransferAcknowledgeIntent,
@@ -57,6 +57,8 @@ export const intentTypes = {
57
57
  transferReject: t.literal("transferReject"),
58
58
  transferAcknowledge: t.literal("transferAcknowledge"),
59
59
  transferOfferWithdrawn: t.literal("transferOfferWithdrawn"),
60
+ cosignDelegationProposal: t.literal("cosignDelegationProposal"),
61
+ cosignDelegationAccept: t.literal("cosignDelegationAccept"),
60
62
  /**
61
63
  * Deposit assets into a DeFi protocol vault (e.g. Concrete USD1 → ctUSD1cx).
62
64
  */
@@ -1,28 +1,25 @@
1
1
  import * as t from "io-ts";
2
+ import { optionalString } from "../../../utils";
2
3
  import { AccountBaseBuildOptions } from "./accountBaseBuildOptions";
3
4
 
4
5
  /**
5
6
  * Solana build fragment intersected by **every** Sol intent codec that composes
6
7
  * `SolBuildOptions` (e.g. payment, stake, consolidate, close-ATA, etc.).
7
8
  *
8
- * **`memo` change is a wire-format alignment, not a type-narrowing change.**
9
- * Switching from `t.type({ memo: optionalString })` to
10
- * `t.partial({ memo: t.string })` lets the **key be omitted** on the wire — real
11
- * prebuild payloads frequently leave `memo` out, and the previous `t.type` form
12
- * required the key for `.is()` even when the value would have been `undefined`.
13
- * When `memo` is present, the value is validated as a `string`; if a caller
14
- * passes `memo: undefined`, `t.partial` does not run the inner codec (the key
15
- * is treated as absent), so runtime stays compatible with spreads.
9
+ * **`memo` is part of the legacy wire contract:** `t.type({ memo: optionalString })`
10
+ * keeps the **`memo` key structurally present** for `.is()` / `decode` (value may
11
+ * be a string or `undefined` per `optionalString`). Payloads that omit `memo`
12
+ * entirely are not accepted by this codec.
16
13
  *
17
- * Inferred TS types are effectively unchanged: optional-key inference for
18
- * `t.partial` already produces `memo?: string | undefined`, the same shape
19
- * `t.TypeOf` would have given with `optionalString`. Package-wide Solana intent
20
- * fix, not limited to close-ATA.
14
+ * Upstream services (for example wallet-platform when persisting
15
+ * `closeAssociatedTokenAccount` intents) may normalize a missing `memo` to
16
+ * `""` before validation so stored objects match this shape. Other Sol flows
17
+ * should send `memo` or apply the same normalization if they share this path.
21
18
  */
22
19
  export const SolBuildOptions = t.intersection([
23
20
  AccountBaseBuildOptions,
24
- t.partial({
25
- memo: t.string,
21
+ t.type({
22
+ memo: optionalString,
26
23
  }),
27
24
  ]);
28
25