@reflectmoney/stable.ts 2.8.4 → 2.9.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 (234) hide show
  1. package/dist/helpers/drift/accounts/index.d.ts +10 -0
  2. package/dist/helpers/drift/accounts/index.js +26 -0
  3. package/dist/helpers/drift/accounts/spotMarket.d.ts +541 -0
  4. package/dist/helpers/drift/accounts/spotMarket.js +213 -0
  5. package/dist/helpers/drift/accounts/user.d.ts +193 -0
  6. package/dist/helpers/drift/accounts/user.js +147 -0
  7. package/dist/helpers/drift/accounts/userStats.d.ts +165 -0
  8. package/dist/helpers/drift/accounts/userStats.js +137 -0
  9. package/dist/helpers/drift/index.d.ts +10 -0
  10. package/dist/helpers/drift/index.js +26 -0
  11. package/dist/helpers/drift/mappers.d.ts +14 -0
  12. package/dist/helpers/drift/mappers.js +137 -0
  13. package/dist/helpers/drift/types/aMM.d.ts +656 -0
  14. package/dist/helpers/drift/types/aMM.js +199 -0
  15. package/dist/helpers/drift/types/addAmmConstituentMappingDatum.d.ts +21 -0
  16. package/dist/helpers/drift/types/addAmmConstituentMappingDatum.js +30 -0
  17. package/dist/helpers/drift/types/ammCacheFixed.d.ts +17 -0
  18. package/dist/helpers/drift/types/ammCacheFixed.js +30 -0
  19. package/dist/helpers/drift/types/ammConstituentDatum.d.ts +27 -0
  20. package/dist/helpers/drift/types/ammConstituentDatum.js +34 -0
  21. package/dist/helpers/drift/types/ammConstituentMappingFixed.d.ts +18 -0
  22. package/dist/helpers/drift/types/ammConstituentMappingFixed.js +32 -0
  23. package/dist/helpers/drift/types/assetTier.d.ts +19 -0
  24. package/dist/helpers/drift/types/assetTier.js +31 -0
  25. package/dist/helpers/drift/types/assetType.d.ts +16 -0
  26. package/dist/helpers/drift/types/assetType.js +28 -0
  27. package/dist/helpers/drift/types/builderInfo.d.ts +17 -0
  28. package/dist/helpers/drift/types/builderInfo.js +30 -0
  29. package/dist/helpers/drift/types/cacheInfo.d.ts +59 -0
  30. package/dist/helpers/drift/types/cacheInfo.js +66 -0
  31. package/dist/helpers/drift/types/constituentCorrelationsFixed.d.ts +19 -0
  32. package/dist/helpers/drift/types/constituentCorrelationsFixed.js +32 -0
  33. package/dist/helpers/drift/types/constituentLpOperation.d.ts +17 -0
  34. package/dist/helpers/drift/types/constituentLpOperation.js +29 -0
  35. package/dist/helpers/drift/types/constituentSpotBalance.d.ts +48 -0
  36. package/dist/helpers/drift/types/constituentSpotBalance.js +35 -0
  37. package/dist/helpers/drift/types/constituentStatus.d.ts +16 -0
  38. package/dist/helpers/drift/types/constituentStatus.js +28 -0
  39. package/dist/helpers/drift/types/constituentTargetBaseFixed.d.ts +19 -0
  40. package/dist/helpers/drift/types/constituentTargetBaseFixed.js +32 -0
  41. package/dist/helpers/drift/types/contractTier.d.ts +20 -0
  42. package/dist/helpers/drift/types/contractTier.js +32 -0
  43. package/dist/helpers/drift/types/contractType.d.ts +17 -0
  44. package/dist/helpers/drift/types/contractType.js +29 -0
  45. package/dist/helpers/drift/types/depositDirection.d.ts +16 -0
  46. package/dist/helpers/drift/types/depositDirection.js +28 -0
  47. package/dist/helpers/drift/types/depositExplanation.d.ts +19 -0
  48. package/dist/helpers/drift/types/depositExplanation.js +31 -0
  49. package/dist/helpers/drift/types/driftAction.d.ts +29 -0
  50. package/dist/helpers/drift/types/driftAction.js +41 -0
  51. package/dist/helpers/drift/types/exchangeStatus.d.ts +22 -0
  52. package/dist/helpers/drift/types/exchangeStatus.js +34 -0
  53. package/dist/helpers/drift/types/featureBitFlags.d.ts +18 -0
  54. package/dist/helpers/drift/types/featureBitFlags.js +30 -0
  55. package/dist/helpers/drift/types/feeStructure.d.ts +24 -0
  56. package/dist/helpers/drift/types/feeStructure.js +33 -0
  57. package/dist/helpers/drift/types/feeTier.d.ts +22 -0
  58. package/dist/helpers/drift/types/feeTier.js +40 -0
  59. package/dist/helpers/drift/types/fillMode.d.ts +29 -0
  60. package/dist/helpers/drift/types/fillMode.js +52 -0
  61. package/dist/helpers/drift/types/fuelOverflowStatus.d.ts +15 -0
  62. package/dist/helpers/drift/types/fuelOverflowStatus.js +27 -0
  63. package/dist/helpers/drift/types/historicalIndexData.d.ts +35 -0
  64. package/dist/helpers/drift/types/historicalIndexData.js +34 -0
  65. package/dist/helpers/drift/types/historicalOracleData.d.ts +39 -0
  66. package/dist/helpers/drift/types/historicalOracleData.js +36 -0
  67. package/dist/helpers/drift/types/ifRebalanceConfigParams.d.ts +31 -0
  68. package/dist/helpers/drift/types/ifRebalanceConfigParams.js +40 -0
  69. package/dist/helpers/drift/types/index.d.ts +114 -0
  70. package/dist/helpers/drift/types/index.js +130 -0
  71. package/dist/helpers/drift/types/insuranceClaim.d.ts +63 -0
  72. package/dist/helpers/drift/types/insuranceClaim.js +34 -0
  73. package/dist/helpers/drift/types/insuranceFund.d.ts +33 -0
  74. package/dist/helpers/drift/types/insuranceFund.js +42 -0
  75. package/dist/helpers/drift/types/insuranceFundOperation.d.ts +18 -0
  76. package/dist/helpers/drift/types/insuranceFundOperation.js +30 -0
  77. package/dist/helpers/drift/types/lPAction.d.ts +18 -0
  78. package/dist/helpers/drift/types/lPAction.js +30 -0
  79. package/dist/helpers/drift/types/liquidateBorrowForPerpPnlRecord.d.ts +27 -0
  80. package/dist/helpers/drift/types/liquidateBorrowForPerpPnlRecord.js +36 -0
  81. package/dist/helpers/drift/types/liquidatePerpPnlForDepositRecord.d.ts +27 -0
  82. package/dist/helpers/drift/types/liquidatePerpPnlForDepositRecord.js +36 -0
  83. package/dist/helpers/drift/types/liquidatePerpRecord.d.ts +41 -0
  84. package/dist/helpers/drift/types/liquidatePerpRecord.js +44 -0
  85. package/dist/helpers/drift/types/liquidateSpotRecord.d.ts +33 -0
  86. package/dist/helpers/drift/types/liquidateSpotRecord.js +38 -0
  87. package/dist/helpers/drift/types/liquidationBitFlag.d.ts +15 -0
  88. package/dist/helpers/drift/types/liquidationBitFlag.js +27 -0
  89. package/dist/helpers/drift/types/liquidationMultiplierType.d.ts +16 -0
  90. package/dist/helpers/drift/types/liquidationMultiplierType.js +28 -0
  91. package/dist/helpers/drift/types/liquidationType.d.ts +20 -0
  92. package/dist/helpers/drift/types/liquidationType.js +32 -0
  93. package/dist/helpers/drift/types/logMode.d.ts +19 -0
  94. package/dist/helpers/drift/types/logMode.js +31 -0
  95. package/dist/helpers/drift/types/lpPoolFeatureBitFlags.d.ts +17 -0
  96. package/dist/helpers/drift/types/lpPoolFeatureBitFlags.js +29 -0
  97. package/dist/helpers/drift/types/lpStatus.d.ts +17 -0
  98. package/dist/helpers/drift/types/lpStatus.js +29 -0
  99. package/dist/helpers/drift/types/marginCalculationMode.d.ts +29 -0
  100. package/dist/helpers/drift/types/marginCalculationMode.js +55 -0
  101. package/dist/helpers/drift/types/marginMode.d.ts +17 -0
  102. package/dist/helpers/drift/types/marginMode.js +29 -0
  103. package/dist/helpers/drift/types/marginRequirementType.d.ts +17 -0
  104. package/dist/helpers/drift/types/marginRequirementType.js +29 -0
  105. package/dist/helpers/drift/types/marketIdentifier.d.ts +20 -0
  106. package/dist/helpers/drift/types/marketIdentifier.js +29 -0
  107. package/dist/helpers/drift/types/marketStatus.d.ts +23 -0
  108. package/dist/helpers/drift/types/marketStatus.js +35 -0
  109. package/dist/helpers/drift/types/marketType.d.ts +16 -0
  110. package/dist/helpers/drift/types/marketType.js +28 -0
  111. package/dist/helpers/drift/types/modifyOrderId.d.ts +24 -0
  112. package/dist/helpers/drift/types/modifyOrderId.js +50 -0
  113. package/dist/helpers/drift/types/modifyOrderParams.d.ts +44 -0
  114. package/dist/helpers/drift/types/modifyOrderParams.js +53 -0
  115. package/dist/helpers/drift/types/modifyOrderPolicy.d.ts +16 -0
  116. package/dist/helpers/drift/types/modifyOrderPolicy.js +28 -0
  117. package/dist/helpers/drift/types/oracleGuardRails.d.ts +20 -0
  118. package/dist/helpers/drift/types/oracleGuardRails.js +29 -0
  119. package/dist/helpers/drift/types/oracleSource.d.ts +30 -0
  120. package/dist/helpers/drift/types/oracleSource.js +42 -0
  121. package/dist/helpers/drift/types/oracleValidity.d.ts +39 -0
  122. package/dist/helpers/drift/types/oracleValidity.js +60 -0
  123. package/dist/helpers/drift/types/order.d.ts +178 -0
  124. package/dist/helpers/drift/types/order.js +77 -0
  125. package/dist/helpers/drift/types/orderAction.d.ts +19 -0
  126. package/dist/helpers/drift/types/orderAction.js +31 -0
  127. package/dist/helpers/drift/types/orderActionExplanation.d.ts +35 -0
  128. package/dist/helpers/drift/types/orderActionExplanation.js +47 -0
  129. package/dist/helpers/drift/types/orderBitFlag.d.ts +20 -0
  130. package/dist/helpers/drift/types/orderBitFlag.js +32 -0
  131. package/dist/helpers/drift/types/orderFillerRewardStructure.d.ts +21 -0
  132. package/dist/helpers/drift/types/orderFillerRewardStructure.js +30 -0
  133. package/dist/helpers/drift/types/orderParams.d.ts +50 -0
  134. package/dist/helpers/drift/types/orderParams.js +59 -0
  135. package/dist/helpers/drift/types/orderParamsBitFlag.d.ts +16 -0
  136. package/dist/helpers/drift/types/orderParamsBitFlag.js +28 -0
  137. package/dist/helpers/drift/types/orderStatus.d.ts +18 -0
  138. package/dist/helpers/drift/types/orderStatus.js +30 -0
  139. package/dist/helpers/drift/types/orderTriggerCondition.d.ts +18 -0
  140. package/dist/helpers/drift/types/orderTriggerCondition.js +30 -0
  141. package/dist/helpers/drift/types/orderType.d.ts +19 -0
  142. package/dist/helpers/drift/types/orderType.js +31 -0
  143. package/dist/helpers/drift/types/perpBankruptcyRecord.d.ts +27 -0
  144. package/dist/helpers/drift/types/perpBankruptcyRecord.js +36 -0
  145. package/dist/helpers/drift/types/perpFulfillmentMethod.d.ts +30 -0
  146. package/dist/helpers/drift/types/perpFulfillmentMethod.js +72 -0
  147. package/dist/helpers/drift/types/perpLpOperation.d.ts +16 -0
  148. package/dist/helpers/drift/types/perpLpOperation.js +28 -0
  149. package/dist/helpers/drift/types/perpOperation.d.ts +22 -0
  150. package/dist/helpers/drift/types/perpOperation.js +34 -0
  151. package/dist/helpers/drift/types/perpPosition.d.ts +149 -0
  152. package/dist/helpers/drift/types/perpPosition.js +56 -0
  153. package/dist/helpers/drift/types/placeAndTakeOrderSuccessCondition.d.ts +16 -0
  154. package/dist/helpers/drift/types/placeAndTakeOrderSuccessCondition.js +28 -0
  155. package/dist/helpers/drift/types/poolBalance.d.ts +33 -0
  156. package/dist/helpers/drift/types/poolBalance.js +30 -0
  157. package/dist/helpers/drift/types/positionDirection.d.ts +16 -0
  158. package/dist/helpers/drift/types/positionDirection.js +28 -0
  159. package/dist/helpers/drift/types/positionFlag.d.ts +17 -0
  160. package/dist/helpers/drift/types/positionFlag.js +29 -0
  161. package/dist/helpers/drift/types/positionUpdateType.d.ts +19 -0
  162. package/dist/helpers/drift/types/positionUpdateType.js +31 -0
  163. package/dist/helpers/drift/types/postOnlyParam.d.ts +18 -0
  164. package/dist/helpers/drift/types/postOnlyParam.js +30 -0
  165. package/dist/helpers/drift/types/prelaunchOracleParams.d.ts +21 -0
  166. package/dist/helpers/drift/types/prelaunchOracleParams.js +30 -0
  167. package/dist/helpers/drift/types/priceDivergenceGuardRails.d.ts +19 -0
  168. package/dist/helpers/drift/types/priceDivergenceGuardRails.js +28 -0
  169. package/dist/helpers/drift/types/referrerStatus.d.ts +17 -0
  170. package/dist/helpers/drift/types/referrerStatus.js +29 -0
  171. package/dist/helpers/drift/types/revenueShareEscrowFixed.d.ts +21 -0
  172. package/dist/helpers/drift/types/revenueShareEscrowFixed.js +38 -0
  173. package/dist/helpers/drift/types/revenueShareOrder.d.ts +80 -0
  174. package/dist/helpers/drift/types/revenueShareOrder.js +45 -0
  175. package/dist/helpers/drift/types/revenueShareOrderBitFlag.d.ts +18 -0
  176. package/dist/helpers/drift/types/revenueShareOrderBitFlag.js +30 -0
  177. package/dist/helpers/drift/types/settlePnlExplanation.d.ts +16 -0
  178. package/dist/helpers/drift/types/settlePnlExplanation.js +28 -0
  179. package/dist/helpers/drift/types/settlePnlMode.d.ts +16 -0
  180. package/dist/helpers/drift/types/settlePnlMode.js +28 -0
  181. package/dist/helpers/drift/types/settlementDirection.d.ts +17 -0
  182. package/dist/helpers/drift/types/settlementDirection.js +29 -0
  183. package/dist/helpers/drift/types/signatureVerificationError.d.ts +26 -0
  184. package/dist/helpers/drift/types/signatureVerificationError.js +38 -0
  185. package/dist/helpers/drift/types/signedMsgOrderId.d.ts +23 -0
  186. package/dist/helpers/drift/types/signedMsgOrderId.js +32 -0
  187. package/dist/helpers/drift/types/signedMsgOrderParamsDelegateMessage.d.ts +36 -0
  188. package/dist/helpers/drift/types/signedMsgOrderParamsDelegateMessage.js +57 -0
  189. package/dist/helpers/drift/types/signedMsgOrderParamsMessage.d.ts +36 -0
  190. package/dist/helpers/drift/types/signedMsgOrderParamsMessage.js +57 -0
  191. package/dist/helpers/drift/types/signedMsgTriggerOrderParams.d.ts +19 -0
  192. package/dist/helpers/drift/types/signedMsgTriggerOrderParams.js +28 -0
  193. package/dist/helpers/drift/types/signedMsgUserOrdersFixed.d.ts +17 -0
  194. package/dist/helpers/drift/types/signedMsgUserOrdersFixed.js +30 -0
  195. package/dist/helpers/drift/types/spotBalanceType.d.ts +16 -0
  196. package/dist/helpers/drift/types/spotBalanceType.js +28 -0
  197. package/dist/helpers/drift/types/spotBankruptcyRecord.d.ts +23 -0
  198. package/dist/helpers/drift/types/spotBankruptcyRecord.js +32 -0
  199. package/dist/helpers/drift/types/spotFulfillmentConfigStatus.d.ts +16 -0
  200. package/dist/helpers/drift/types/spotFulfillmentConfigStatus.js +28 -0
  201. package/dist/helpers/drift/types/spotFulfillmentMethod.d.ts +23 -0
  202. package/dist/helpers/drift/types/spotFulfillmentMethod.js +48 -0
  203. package/dist/helpers/drift/types/spotFulfillmentType.d.ts +18 -0
  204. package/dist/helpers/drift/types/spotFulfillmentType.js +30 -0
  205. package/dist/helpers/drift/types/spotOperation.d.ts +19 -0
  206. package/dist/helpers/drift/types/spotOperation.js +31 -0
  207. package/dist/helpers/drift/types/spotPosition.d.ts +72 -0
  208. package/dist/helpers/drift/types/spotPosition.js +41 -0
  209. package/dist/helpers/drift/types/stakeAction.d.ts +21 -0
  210. package/dist/helpers/drift/types/stakeAction.js +33 -0
  211. package/dist/helpers/drift/types/swapDirection.d.ts +16 -0
  212. package/dist/helpers/drift/types/swapDirection.js +28 -0
  213. package/dist/helpers/drift/types/swapReduceOnly.d.ts +16 -0
  214. package/dist/helpers/drift/types/swapReduceOnly.js +28 -0
  215. package/dist/helpers/drift/types/targetsDatum.d.ts +25 -0
  216. package/dist/helpers/drift/types/targetsDatum.js +34 -0
  217. package/dist/helpers/drift/types/tokenProgramFlag.d.ts +16 -0
  218. package/dist/helpers/drift/types/tokenProgramFlag.js +28 -0
  219. package/dist/helpers/drift/types/twapPeriod.d.ts +16 -0
  220. package/dist/helpers/drift/types/twapPeriod.js +28 -0
  221. package/dist/helpers/drift/types/userFees.d.ts +75 -0
  222. package/dist/helpers/drift/types/userFees.js +36 -0
  223. package/dist/helpers/drift/types/userStatsPausedOperations.d.ts +17 -0
  224. package/dist/helpers/drift/types/userStatsPausedOperations.js +29 -0
  225. package/dist/helpers/drift/types/userStatus.d.ts +19 -0
  226. package/dist/helpers/drift/types/userStatus.js +31 -0
  227. package/dist/helpers/drift/types/validityGuardRails.d.ts +23 -0
  228. package/dist/helpers/drift/types/validityGuardRails.js +32 -0
  229. package/dist/helpers/index.d.ts +1 -0
  230. package/dist/helpers/index.js +17 -0
  231. package/dist/stablecoins/UsdcPlusStablecoin.d.ts +2 -1
  232. package/dist/stablecoins/UsdcPlusStablecoin.js +19 -23
  233. package/dist/tsconfig.tsbuildinfo +1 -1
  234. package/package.json +3 -2
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.getCacheInfoEncoder = getCacheInfoEncoder;
11
+ exports.getCacheInfoDecoder = getCacheInfoDecoder;
12
+ exports.getCacheInfoCodec = getCacheInfoCodec;
13
+ const kit_1 = require("@solana/kit");
14
+ function getCacheInfoEncoder() {
15
+ return (0, kit_1.getStructEncoder)([
16
+ ["oracle", (0, kit_1.getAddressEncoder)()],
17
+ ["lastFeePoolTokenAmount", (0, kit_1.getU128Encoder)()],
18
+ ["lastNetPnlPoolTokenAmount", (0, kit_1.getI128Encoder)()],
19
+ ["lastExchangeFees", (0, kit_1.getU128Encoder)()],
20
+ ["lastSettleAmmExFees", (0, kit_1.getU128Encoder)()],
21
+ ["lastSettleAmmPnl", (0, kit_1.getI128Encoder)()],
22
+ ["position", (0, kit_1.getI64Encoder)()],
23
+ ["slot", (0, kit_1.getU64Encoder)()],
24
+ ["lastSettleAmount", (0, kit_1.getU64Encoder)()],
25
+ ["lastSettleSlot", (0, kit_1.getU64Encoder)()],
26
+ ["lastSettleTs", (0, kit_1.getI64Encoder)()],
27
+ ["quoteOwedFromLpPool", (0, kit_1.getI64Encoder)()],
28
+ ["ammInventoryLimit", (0, kit_1.getI64Encoder)()],
29
+ ["oraclePrice", (0, kit_1.getI64Encoder)()],
30
+ ["oracleSlot", (0, kit_1.getU64Encoder)()],
31
+ ["marketIndex", (0, kit_1.getU16Encoder)()],
32
+ ["oracleSource", (0, kit_1.getU8Encoder)()],
33
+ ["oracleValidity", (0, kit_1.getU8Encoder)()],
34
+ ["lpStatusForPerpMarket", (0, kit_1.getU8Encoder)()],
35
+ ["ammPositionScalar", (0, kit_1.getU8Encoder)()],
36
+ ["padding", (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 34)],
37
+ ]);
38
+ }
39
+ function getCacheInfoDecoder() {
40
+ return (0, kit_1.getStructDecoder)([
41
+ ["oracle", (0, kit_1.getAddressDecoder)()],
42
+ ["lastFeePoolTokenAmount", (0, kit_1.getU128Decoder)()],
43
+ ["lastNetPnlPoolTokenAmount", (0, kit_1.getI128Decoder)()],
44
+ ["lastExchangeFees", (0, kit_1.getU128Decoder)()],
45
+ ["lastSettleAmmExFees", (0, kit_1.getU128Decoder)()],
46
+ ["lastSettleAmmPnl", (0, kit_1.getI128Decoder)()],
47
+ ["position", (0, kit_1.getI64Decoder)()],
48
+ ["slot", (0, kit_1.getU64Decoder)()],
49
+ ["lastSettleAmount", (0, kit_1.getU64Decoder)()],
50
+ ["lastSettleSlot", (0, kit_1.getU64Decoder)()],
51
+ ["lastSettleTs", (0, kit_1.getI64Decoder)()],
52
+ ["quoteOwedFromLpPool", (0, kit_1.getI64Decoder)()],
53
+ ["ammInventoryLimit", (0, kit_1.getI64Decoder)()],
54
+ ["oraclePrice", (0, kit_1.getI64Decoder)()],
55
+ ["oracleSlot", (0, kit_1.getU64Decoder)()],
56
+ ["marketIndex", (0, kit_1.getU16Decoder)()],
57
+ ["oracleSource", (0, kit_1.getU8Decoder)()],
58
+ ["oracleValidity", (0, kit_1.getU8Decoder)()],
59
+ ["lpStatusForPerpMarket", (0, kit_1.getU8Decoder)()],
60
+ ["ammPositionScalar", (0, kit_1.getU8Decoder)()],
61
+ ["padding", (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 34)],
62
+ ]);
63
+ }
64
+ function getCacheInfoCodec() {
65
+ return (0, kit_1.combineCodec)(getCacheInfoEncoder(), getCacheInfoDecoder());
66
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from "@solana/kit";
9
+ export type ConstituentCorrelationsFixed = {
10
+ lpPool: Address;
11
+ bump: number;
12
+ pad: ReadonlyUint8Array;
13
+ /** total elements in the flattened `data` vec */
14
+ len: number;
15
+ };
16
+ export type ConstituentCorrelationsFixedArgs = ConstituentCorrelationsFixed;
17
+ export declare function getConstituentCorrelationsFixedEncoder(): FixedSizeEncoder<ConstituentCorrelationsFixedArgs>;
18
+ export declare function getConstituentCorrelationsFixedDecoder(): FixedSizeDecoder<ConstituentCorrelationsFixed>;
19
+ export declare function getConstituentCorrelationsFixedCodec(): FixedSizeCodec<ConstituentCorrelationsFixedArgs, ConstituentCorrelationsFixed>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.getConstituentCorrelationsFixedEncoder = getConstituentCorrelationsFixedEncoder;
11
+ exports.getConstituentCorrelationsFixedDecoder = getConstituentCorrelationsFixedDecoder;
12
+ exports.getConstituentCorrelationsFixedCodec = getConstituentCorrelationsFixedCodec;
13
+ const kit_1 = require("@solana/kit");
14
+ function getConstituentCorrelationsFixedEncoder() {
15
+ return (0, kit_1.getStructEncoder)([
16
+ ["lpPool", (0, kit_1.getAddressEncoder)()],
17
+ ["bump", (0, kit_1.getU8Encoder)()],
18
+ ["pad", (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 3)],
19
+ ["len", (0, kit_1.getU32Encoder)()],
20
+ ]);
21
+ }
22
+ function getConstituentCorrelationsFixedDecoder() {
23
+ return (0, kit_1.getStructDecoder)([
24
+ ["lpPool", (0, kit_1.getAddressDecoder)()],
25
+ ["bump", (0, kit_1.getU8Decoder)()],
26
+ ["pad", (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 3)],
27
+ ["len", (0, kit_1.getU32Decoder)()],
28
+ ]);
29
+ }
30
+ function getConstituentCorrelationsFixedCodec() {
31
+ return (0, kit_1.combineCodec)(getConstituentCorrelationsFixedEncoder(), getConstituentCorrelationsFixedDecoder());
32
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
9
+ export declare enum ConstituentLpOperation {
10
+ Swap = 0,
11
+ Deposit = 1,
12
+ Withdraw = 2
13
+ }
14
+ export type ConstituentLpOperationArgs = ConstituentLpOperation;
15
+ export declare function getConstituentLpOperationEncoder(): FixedSizeEncoder<ConstituentLpOperationArgs>;
16
+ export declare function getConstituentLpOperationDecoder(): FixedSizeDecoder<ConstituentLpOperation>;
17
+ export declare function getConstituentLpOperationCodec(): FixedSizeCodec<ConstituentLpOperationArgs, ConstituentLpOperation>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ConstituentLpOperation = void 0;
11
+ exports.getConstituentLpOperationEncoder = getConstituentLpOperationEncoder;
12
+ exports.getConstituentLpOperationDecoder = getConstituentLpOperationDecoder;
13
+ exports.getConstituentLpOperationCodec = getConstituentLpOperationCodec;
14
+ const kit_1 = require("@solana/kit");
15
+ var ConstituentLpOperation;
16
+ (function (ConstituentLpOperation) {
17
+ ConstituentLpOperation[ConstituentLpOperation["Swap"] = 0] = "Swap";
18
+ ConstituentLpOperation[ConstituentLpOperation["Deposit"] = 1] = "Deposit";
19
+ ConstituentLpOperation[ConstituentLpOperation["Withdraw"] = 2] = "Withdraw";
20
+ })(ConstituentLpOperation || (exports.ConstituentLpOperation = ConstituentLpOperation = {}));
21
+ function getConstituentLpOperationEncoder() {
22
+ return (0, kit_1.getEnumEncoder)(ConstituentLpOperation);
23
+ }
24
+ function getConstituentLpOperationDecoder() {
25
+ return (0, kit_1.getEnumDecoder)(ConstituentLpOperation);
26
+ }
27
+ function getConstituentLpOperationCodec() {
28
+ return (0, kit_1.combineCodec)(getConstituentLpOperationEncoder(), getConstituentLpOperationDecoder());
29
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from "@solana/kit";
9
+ import { type SpotBalanceType, type SpotBalanceTypeArgs } from ".";
10
+ export type ConstituentSpotBalance = {
11
+ /**
12
+ * The scaled balance of the position. To get the token amount, multiply by the cumulative deposit/borrow
13
+ * interest of corresponding market.
14
+ * precision: token precision
15
+ */
16
+ scaledBalance: bigint;
17
+ /**
18
+ * The cumulative deposits/borrows a user has made into a market
19
+ * precision: token mint precision
20
+ */
21
+ cumulativeDeposits: bigint;
22
+ /** The market index of the corresponding spot market */
23
+ marketIndex: number;
24
+ /** Whether the position is deposit or borrow */
25
+ balanceType: SpotBalanceType;
26
+ padding: ReadonlyUint8Array;
27
+ };
28
+ export type ConstituentSpotBalanceArgs = {
29
+ /**
30
+ * The scaled balance of the position. To get the token amount, multiply by the cumulative deposit/borrow
31
+ * interest of corresponding market.
32
+ * precision: token precision
33
+ */
34
+ scaledBalance: number | bigint;
35
+ /**
36
+ * The cumulative deposits/borrows a user has made into a market
37
+ * precision: token mint precision
38
+ */
39
+ cumulativeDeposits: number | bigint;
40
+ /** The market index of the corresponding spot market */
41
+ marketIndex: number;
42
+ /** Whether the position is deposit or borrow */
43
+ balanceType: SpotBalanceTypeArgs;
44
+ padding: ReadonlyUint8Array;
45
+ };
46
+ export declare function getConstituentSpotBalanceEncoder(): FixedSizeEncoder<ConstituentSpotBalanceArgs>;
47
+ export declare function getConstituentSpotBalanceDecoder(): FixedSizeDecoder<ConstituentSpotBalance>;
48
+ export declare function getConstituentSpotBalanceCodec(): FixedSizeCodec<ConstituentSpotBalanceArgs, ConstituentSpotBalance>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.getConstituentSpotBalanceEncoder = getConstituentSpotBalanceEncoder;
11
+ exports.getConstituentSpotBalanceDecoder = getConstituentSpotBalanceDecoder;
12
+ exports.getConstituentSpotBalanceCodec = getConstituentSpotBalanceCodec;
13
+ const kit_1 = require("@solana/kit");
14
+ const _1 = require(".");
15
+ function getConstituentSpotBalanceEncoder() {
16
+ return (0, kit_1.getStructEncoder)([
17
+ ["scaledBalance", (0, kit_1.getU128Encoder)()],
18
+ ["cumulativeDeposits", (0, kit_1.getI64Encoder)()],
19
+ ["marketIndex", (0, kit_1.getU16Encoder)()],
20
+ ["balanceType", (0, _1.getSpotBalanceTypeEncoder)()],
21
+ ["padding", (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 5)],
22
+ ]);
23
+ }
24
+ function getConstituentSpotBalanceDecoder() {
25
+ return (0, kit_1.getStructDecoder)([
26
+ ["scaledBalance", (0, kit_1.getU128Decoder)()],
27
+ ["cumulativeDeposits", (0, kit_1.getI64Decoder)()],
28
+ ["marketIndex", (0, kit_1.getU16Decoder)()],
29
+ ["balanceType", (0, _1.getSpotBalanceTypeDecoder)()],
30
+ ["padding", (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 5)],
31
+ ]);
32
+ }
33
+ function getConstituentSpotBalanceCodec() {
34
+ return (0, kit_1.combineCodec)(getConstituentSpotBalanceEncoder(), getConstituentSpotBalanceDecoder());
35
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
9
+ export declare enum ConstituentStatus {
10
+ ReduceOnly = 0,
11
+ Decommissioned = 1
12
+ }
13
+ export type ConstituentStatusArgs = ConstituentStatus;
14
+ export declare function getConstituentStatusEncoder(): FixedSizeEncoder<ConstituentStatusArgs>;
15
+ export declare function getConstituentStatusDecoder(): FixedSizeDecoder<ConstituentStatus>;
16
+ export declare function getConstituentStatusCodec(): FixedSizeCodec<ConstituentStatusArgs, ConstituentStatus>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ConstituentStatus = void 0;
11
+ exports.getConstituentStatusEncoder = getConstituentStatusEncoder;
12
+ exports.getConstituentStatusDecoder = getConstituentStatusDecoder;
13
+ exports.getConstituentStatusCodec = getConstituentStatusCodec;
14
+ const kit_1 = require("@solana/kit");
15
+ var ConstituentStatus;
16
+ (function (ConstituentStatus) {
17
+ ConstituentStatus[ConstituentStatus["ReduceOnly"] = 0] = "ReduceOnly";
18
+ ConstituentStatus[ConstituentStatus["Decommissioned"] = 1] = "Decommissioned";
19
+ })(ConstituentStatus || (exports.ConstituentStatus = ConstituentStatus = {}));
20
+ function getConstituentStatusEncoder() {
21
+ return (0, kit_1.getEnumEncoder)(ConstituentStatus);
22
+ }
23
+ function getConstituentStatusDecoder() {
24
+ return (0, kit_1.getEnumDecoder)(ConstituentStatus);
25
+ }
26
+ function getConstituentStatusCodec() {
27
+ return (0, kit_1.combineCodec)(getConstituentStatusEncoder(), getConstituentStatusDecoder());
28
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from "@solana/kit";
9
+ export type ConstituentTargetBaseFixed = {
10
+ lpPool: Address;
11
+ bump: number;
12
+ pad: ReadonlyUint8Array;
13
+ /** total elements in the flattened `data` vec */
14
+ len: number;
15
+ };
16
+ export type ConstituentTargetBaseFixedArgs = ConstituentTargetBaseFixed;
17
+ export declare function getConstituentTargetBaseFixedEncoder(): FixedSizeEncoder<ConstituentTargetBaseFixedArgs>;
18
+ export declare function getConstituentTargetBaseFixedDecoder(): FixedSizeDecoder<ConstituentTargetBaseFixed>;
19
+ export declare function getConstituentTargetBaseFixedCodec(): FixedSizeCodec<ConstituentTargetBaseFixedArgs, ConstituentTargetBaseFixed>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.getConstituentTargetBaseFixedEncoder = getConstituentTargetBaseFixedEncoder;
11
+ exports.getConstituentTargetBaseFixedDecoder = getConstituentTargetBaseFixedDecoder;
12
+ exports.getConstituentTargetBaseFixedCodec = getConstituentTargetBaseFixedCodec;
13
+ const kit_1 = require("@solana/kit");
14
+ function getConstituentTargetBaseFixedEncoder() {
15
+ return (0, kit_1.getStructEncoder)([
16
+ ["lpPool", (0, kit_1.getAddressEncoder)()],
17
+ ["bump", (0, kit_1.getU8Encoder)()],
18
+ ["pad", (0, kit_1.fixEncoderSize)((0, kit_1.getBytesEncoder)(), 3)],
19
+ ["len", (0, kit_1.getU32Encoder)()],
20
+ ]);
21
+ }
22
+ function getConstituentTargetBaseFixedDecoder() {
23
+ return (0, kit_1.getStructDecoder)([
24
+ ["lpPool", (0, kit_1.getAddressDecoder)()],
25
+ ["bump", (0, kit_1.getU8Decoder)()],
26
+ ["pad", (0, kit_1.fixDecoderSize)((0, kit_1.getBytesDecoder)(), 3)],
27
+ ["len", (0, kit_1.getU32Decoder)()],
28
+ ]);
29
+ }
30
+ function getConstituentTargetBaseFixedCodec() {
31
+ return (0, kit_1.combineCodec)(getConstituentTargetBaseFixedEncoder(), getConstituentTargetBaseFixedDecoder());
32
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
9
+ export declare enum ContractTier {
10
+ A = 0,
11
+ B = 1,
12
+ C = 2,
13
+ Speculative = 3,
14
+ HighlySpeculative = 4,
15
+ Isolated = 5
16
+ }
17
+ export type ContractTierArgs = ContractTier;
18
+ export declare function getContractTierEncoder(): FixedSizeEncoder<ContractTierArgs>;
19
+ export declare function getContractTierDecoder(): FixedSizeDecoder<ContractTier>;
20
+ export declare function getContractTierCodec(): FixedSizeCodec<ContractTierArgs, ContractTier>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ContractTier = void 0;
11
+ exports.getContractTierEncoder = getContractTierEncoder;
12
+ exports.getContractTierDecoder = getContractTierDecoder;
13
+ exports.getContractTierCodec = getContractTierCodec;
14
+ const kit_1 = require("@solana/kit");
15
+ var ContractTier;
16
+ (function (ContractTier) {
17
+ ContractTier[ContractTier["A"] = 0] = "A";
18
+ ContractTier[ContractTier["B"] = 1] = "B";
19
+ ContractTier[ContractTier["C"] = 2] = "C";
20
+ ContractTier[ContractTier["Speculative"] = 3] = "Speculative";
21
+ ContractTier[ContractTier["HighlySpeculative"] = 4] = "HighlySpeculative";
22
+ ContractTier[ContractTier["Isolated"] = 5] = "Isolated";
23
+ })(ContractTier || (exports.ContractTier = ContractTier = {}));
24
+ function getContractTierEncoder() {
25
+ return (0, kit_1.getEnumEncoder)(ContractTier);
26
+ }
27
+ function getContractTierDecoder() {
28
+ return (0, kit_1.getEnumDecoder)(ContractTier);
29
+ }
30
+ function getContractTierCodec() {
31
+ return (0, kit_1.combineCodec)(getContractTierEncoder(), getContractTierDecoder());
32
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
9
+ export declare enum ContractType {
10
+ Perpetual = 0,
11
+ Future = 1,
12
+ Prediction = 2
13
+ }
14
+ export type ContractTypeArgs = ContractType;
15
+ export declare function getContractTypeEncoder(): FixedSizeEncoder<ContractTypeArgs>;
16
+ export declare function getContractTypeDecoder(): FixedSizeDecoder<ContractType>;
17
+ export declare function getContractTypeCodec(): FixedSizeCodec<ContractTypeArgs, ContractType>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.ContractType = void 0;
11
+ exports.getContractTypeEncoder = getContractTypeEncoder;
12
+ exports.getContractTypeDecoder = getContractTypeDecoder;
13
+ exports.getContractTypeCodec = getContractTypeCodec;
14
+ const kit_1 = require("@solana/kit");
15
+ var ContractType;
16
+ (function (ContractType) {
17
+ ContractType[ContractType["Perpetual"] = 0] = "Perpetual";
18
+ ContractType[ContractType["Future"] = 1] = "Future";
19
+ ContractType[ContractType["Prediction"] = 2] = "Prediction";
20
+ })(ContractType || (exports.ContractType = ContractType = {}));
21
+ function getContractTypeEncoder() {
22
+ return (0, kit_1.getEnumEncoder)(ContractType);
23
+ }
24
+ function getContractTypeDecoder() {
25
+ return (0, kit_1.getEnumDecoder)(ContractType);
26
+ }
27
+ function getContractTypeCodec() {
28
+ return (0, kit_1.combineCodec)(getContractTypeEncoder(), getContractTypeDecoder());
29
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
9
+ export declare enum DepositDirection {
10
+ Deposit = 0,
11
+ Withdraw = 1
12
+ }
13
+ export type DepositDirectionArgs = DepositDirection;
14
+ export declare function getDepositDirectionEncoder(): FixedSizeEncoder<DepositDirectionArgs>;
15
+ export declare function getDepositDirectionDecoder(): FixedSizeDecoder<DepositDirection>;
16
+ export declare function getDepositDirectionCodec(): FixedSizeCodec<DepositDirectionArgs, DepositDirection>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.DepositDirection = void 0;
11
+ exports.getDepositDirectionEncoder = getDepositDirectionEncoder;
12
+ exports.getDepositDirectionDecoder = getDepositDirectionDecoder;
13
+ exports.getDepositDirectionCodec = getDepositDirectionCodec;
14
+ const kit_1 = require("@solana/kit");
15
+ var DepositDirection;
16
+ (function (DepositDirection) {
17
+ DepositDirection[DepositDirection["Deposit"] = 0] = "Deposit";
18
+ DepositDirection[DepositDirection["Withdraw"] = 1] = "Withdraw";
19
+ })(DepositDirection || (exports.DepositDirection = DepositDirection = {}));
20
+ function getDepositDirectionEncoder() {
21
+ return (0, kit_1.getEnumEncoder)(DepositDirection);
22
+ }
23
+ function getDepositDirectionDecoder() {
24
+ return (0, kit_1.getEnumDecoder)(DepositDirection);
25
+ }
26
+ function getDepositDirectionCodec() {
27
+ return (0, kit_1.combineCodec)(getDepositDirectionEncoder(), getDepositDirectionDecoder());
28
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
9
+ export declare enum DepositExplanation {
10
+ None = 0,
11
+ Transfer = 1,
12
+ Borrow = 2,
13
+ RepayBorrow = 3,
14
+ Reward = 4
15
+ }
16
+ export type DepositExplanationArgs = DepositExplanation;
17
+ export declare function getDepositExplanationEncoder(): FixedSizeEncoder<DepositExplanationArgs>;
18
+ export declare function getDepositExplanationDecoder(): FixedSizeDecoder<DepositExplanation>;
19
+ export declare function getDepositExplanationCodec(): FixedSizeCodec<DepositExplanationArgs, DepositExplanation>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.DepositExplanation = void 0;
11
+ exports.getDepositExplanationEncoder = getDepositExplanationEncoder;
12
+ exports.getDepositExplanationDecoder = getDepositExplanationDecoder;
13
+ exports.getDepositExplanationCodec = getDepositExplanationCodec;
14
+ const kit_1 = require("@solana/kit");
15
+ var DepositExplanation;
16
+ (function (DepositExplanation) {
17
+ DepositExplanation[DepositExplanation["None"] = 0] = "None";
18
+ DepositExplanation[DepositExplanation["Transfer"] = 1] = "Transfer";
19
+ DepositExplanation[DepositExplanation["Borrow"] = 2] = "Borrow";
20
+ DepositExplanation[DepositExplanation["RepayBorrow"] = 3] = "RepayBorrow";
21
+ DepositExplanation[DepositExplanation["Reward"] = 4] = "Reward";
22
+ })(DepositExplanation || (exports.DepositExplanation = DepositExplanation = {}));
23
+ function getDepositExplanationEncoder() {
24
+ return (0, kit_1.getEnumEncoder)(DepositExplanation);
25
+ }
26
+ function getDepositExplanationDecoder() {
27
+ return (0, kit_1.getEnumDecoder)(DepositExplanation);
28
+ }
29
+ function getDepositExplanationCodec() {
30
+ return (0, kit_1.combineCodec)(getDepositExplanationEncoder(), getDepositExplanationDecoder());
31
+ }
@@ -0,0 +1,29 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
9
+ export declare enum DriftAction {
10
+ UpdateFunding = 0,
11
+ SettlePnl = 1,
12
+ TriggerOrder = 2,
13
+ FillOrderMatch = 3,
14
+ FillOrderAmmLowRisk = 4,
15
+ FillOrderAmmImmediate = 5,
16
+ Liquidate = 6,
17
+ MarginCalc = 7,
18
+ UpdateTwap = 8,
19
+ UpdateAMMCurve = 9,
20
+ OracleOrderPrice = 10,
21
+ UseMMOraclePrice = 11,
22
+ UpdateAmmCache = 12,
23
+ UpdateLpPoolAum = 13,
24
+ LpPoolSwap = 14
25
+ }
26
+ export type DriftActionArgs = DriftAction;
27
+ export declare function getDriftActionEncoder(): FixedSizeEncoder<DriftActionArgs>;
28
+ export declare function getDriftActionDecoder(): FixedSizeDecoder<DriftAction>;
29
+ export declare function getDriftActionCodec(): FixedSizeCodec<DriftActionArgs, DriftAction>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This code was AUTOGENERATED using the Codama library.
4
+ * Please DO NOT EDIT THIS FILE, instead use visitors
5
+ * to add features, then rerun Codama to update it.
6
+ *
7
+ * @see https://github.com/codama-idl/codama
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.DriftAction = void 0;
11
+ exports.getDriftActionEncoder = getDriftActionEncoder;
12
+ exports.getDriftActionDecoder = getDriftActionDecoder;
13
+ exports.getDriftActionCodec = getDriftActionCodec;
14
+ const kit_1 = require("@solana/kit");
15
+ var DriftAction;
16
+ (function (DriftAction) {
17
+ DriftAction[DriftAction["UpdateFunding"] = 0] = "UpdateFunding";
18
+ DriftAction[DriftAction["SettlePnl"] = 1] = "SettlePnl";
19
+ DriftAction[DriftAction["TriggerOrder"] = 2] = "TriggerOrder";
20
+ DriftAction[DriftAction["FillOrderMatch"] = 3] = "FillOrderMatch";
21
+ DriftAction[DriftAction["FillOrderAmmLowRisk"] = 4] = "FillOrderAmmLowRisk";
22
+ DriftAction[DriftAction["FillOrderAmmImmediate"] = 5] = "FillOrderAmmImmediate";
23
+ DriftAction[DriftAction["Liquidate"] = 6] = "Liquidate";
24
+ DriftAction[DriftAction["MarginCalc"] = 7] = "MarginCalc";
25
+ DriftAction[DriftAction["UpdateTwap"] = 8] = "UpdateTwap";
26
+ DriftAction[DriftAction["UpdateAMMCurve"] = 9] = "UpdateAMMCurve";
27
+ DriftAction[DriftAction["OracleOrderPrice"] = 10] = "OracleOrderPrice";
28
+ DriftAction[DriftAction["UseMMOraclePrice"] = 11] = "UseMMOraclePrice";
29
+ DriftAction[DriftAction["UpdateAmmCache"] = 12] = "UpdateAmmCache";
30
+ DriftAction[DriftAction["UpdateLpPoolAum"] = 13] = "UpdateLpPoolAum";
31
+ DriftAction[DriftAction["LpPoolSwap"] = 14] = "LpPoolSwap";
32
+ })(DriftAction || (exports.DriftAction = DriftAction = {}));
33
+ function getDriftActionEncoder() {
34
+ return (0, kit_1.getEnumEncoder)(DriftAction);
35
+ }
36
+ function getDriftActionDecoder() {
37
+ return (0, kit_1.getEnumDecoder)(DriftAction);
38
+ }
39
+ function getDriftActionCodec() {
40
+ return (0, kit_1.combineCodec)(getDriftActionEncoder(), getDriftActionDecoder());
41
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This code was AUTOGENERATED using the Codama library.
3
+ * Please DO NOT EDIT THIS FILE, instead use visitors
4
+ * to add features, then rerun Codama to update it.
5
+ *
6
+ * @see https://github.com/codama-idl/codama
7
+ */
8
+ import { type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from "@solana/kit";
9
+ export declare enum ExchangeStatus {
10
+ DepositPaused = 0,
11
+ WithdrawPaused = 1,
12
+ AmmPaused = 2,
13
+ FillPaused = 3,
14
+ LiqPaused = 4,
15
+ FundingPaused = 5,
16
+ SettlePnlPaused = 6,
17
+ AmmImmediateFillPaused = 7
18
+ }
19
+ export type ExchangeStatusArgs = ExchangeStatus;
20
+ export declare function getExchangeStatusEncoder(): FixedSizeEncoder<ExchangeStatusArgs>;
21
+ export declare function getExchangeStatusDecoder(): FixedSizeDecoder<ExchangeStatus>;
22
+ export declare function getExchangeStatusCodec(): FixedSizeCodec<ExchangeStatusArgs, ExchangeStatus>;