@reflectmoney/stable.ts 2.8.4 → 2.9.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 (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,114 @@
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
+ export * from "./addAmmConstituentMappingDatum";
9
+ export * from "./aMM";
10
+ export * from "./ammCacheFixed";
11
+ export * from "./ammConstituentDatum";
12
+ export * from "./ammConstituentMappingFixed";
13
+ export * from "./assetTier";
14
+ export * from "./assetType";
15
+ export * from "./builderInfo";
16
+ export * from "./cacheInfo";
17
+ export * from "./constituentCorrelationsFixed";
18
+ export * from "./constituentLpOperation";
19
+ export * from "./constituentSpotBalance";
20
+ export * from "./constituentStatus";
21
+ export * from "./constituentTargetBaseFixed";
22
+ export * from "./contractTier";
23
+ export * from "./contractType";
24
+ export * from "./depositDirection";
25
+ export * from "./depositExplanation";
26
+ export * from "./driftAction";
27
+ export * from "./exchangeStatus";
28
+ export * from "./featureBitFlags";
29
+ export * from "./feeStructure";
30
+ export * from "./feeTier";
31
+ export * from "./fillMode";
32
+ export * from "./fuelOverflowStatus";
33
+ export * from "./historicalIndexData";
34
+ export * from "./historicalOracleData";
35
+ export * from "./ifRebalanceConfigParams";
36
+ export * from "./insuranceClaim";
37
+ export * from "./insuranceFund";
38
+ export * from "./insuranceFundOperation";
39
+ export * from "./liquidateBorrowForPerpPnlRecord";
40
+ export * from "./liquidatePerpPnlForDepositRecord";
41
+ export * from "./liquidatePerpRecord";
42
+ export * from "./liquidateSpotRecord";
43
+ export * from "./liquidationBitFlag";
44
+ export * from "./liquidationMultiplierType";
45
+ export * from "./liquidationType";
46
+ export * from "./logMode";
47
+ export * from "./lPAction";
48
+ export * from "./lpPoolFeatureBitFlags";
49
+ export * from "./lpStatus";
50
+ export * from "./marginCalculationMode";
51
+ export * from "./marginMode";
52
+ export * from "./marginRequirementType";
53
+ export * from "./marketIdentifier";
54
+ export * from "./marketStatus";
55
+ export * from "./marketType";
56
+ export * from "./modifyOrderId";
57
+ export * from "./modifyOrderParams";
58
+ export * from "./modifyOrderPolicy";
59
+ export * from "./oracleGuardRails";
60
+ export * from "./oracleSource";
61
+ export * from "./oracleValidity";
62
+ export * from "./order";
63
+ export * from "./orderAction";
64
+ export * from "./orderActionExplanation";
65
+ export * from "./orderBitFlag";
66
+ export * from "./orderFillerRewardStructure";
67
+ export * from "./orderParams";
68
+ export * from "./orderParamsBitFlag";
69
+ export * from "./orderStatus";
70
+ export * from "./orderTriggerCondition";
71
+ export * from "./orderType";
72
+ export * from "./perpBankruptcyRecord";
73
+ export * from "./perpFulfillmentMethod";
74
+ export * from "./perpLpOperation";
75
+ export * from "./perpOperation";
76
+ export * from "./perpPosition";
77
+ export * from "./placeAndTakeOrderSuccessCondition";
78
+ export * from "./poolBalance";
79
+ export * from "./positionDirection";
80
+ export * from "./positionFlag";
81
+ export * from "./positionUpdateType";
82
+ export * from "./postOnlyParam";
83
+ export * from "./prelaunchOracleParams";
84
+ export * from "./priceDivergenceGuardRails";
85
+ export * from "./referrerStatus";
86
+ export * from "./revenueShareEscrowFixed";
87
+ export * from "./revenueShareOrder";
88
+ export * from "./revenueShareOrderBitFlag";
89
+ export * from "./settlementDirection";
90
+ export * from "./settlePnlExplanation";
91
+ export * from "./settlePnlMode";
92
+ export * from "./signatureVerificationError";
93
+ export * from "./signedMsgOrderId";
94
+ export * from "./signedMsgOrderParamsDelegateMessage";
95
+ export * from "./signedMsgOrderParamsMessage";
96
+ export * from "./signedMsgTriggerOrderParams";
97
+ export * from "./signedMsgUserOrdersFixed";
98
+ export * from "./spotBalanceType";
99
+ export * from "./spotBankruptcyRecord";
100
+ export * from "./spotFulfillmentConfigStatus";
101
+ export * from "./spotFulfillmentMethod";
102
+ export * from "./spotFulfillmentType";
103
+ export * from "./spotOperation";
104
+ export * from "./spotPosition";
105
+ export * from "./stakeAction";
106
+ export * from "./swapDirection";
107
+ export * from "./swapReduceOnly";
108
+ export * from "./targetsDatum";
109
+ export * from "./tokenProgramFlag";
110
+ export * from "./twapPeriod";
111
+ export * from "./userFees";
112
+ export * from "./userStatsPausedOperations";
113
+ export * from "./userStatus";
114
+ export * from "./validityGuardRails";
@@ -0,0 +1,130 @@
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
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
21
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ __exportStar(require("./addAmmConstituentMappingDatum"), exports);
25
+ __exportStar(require("./aMM"), exports);
26
+ __exportStar(require("./ammCacheFixed"), exports);
27
+ __exportStar(require("./ammConstituentDatum"), exports);
28
+ __exportStar(require("./ammConstituentMappingFixed"), exports);
29
+ __exportStar(require("./assetTier"), exports);
30
+ __exportStar(require("./assetType"), exports);
31
+ __exportStar(require("./builderInfo"), exports);
32
+ __exportStar(require("./cacheInfo"), exports);
33
+ __exportStar(require("./constituentCorrelationsFixed"), exports);
34
+ __exportStar(require("./constituentLpOperation"), exports);
35
+ __exportStar(require("./constituentSpotBalance"), exports);
36
+ __exportStar(require("./constituentStatus"), exports);
37
+ __exportStar(require("./constituentTargetBaseFixed"), exports);
38
+ __exportStar(require("./contractTier"), exports);
39
+ __exportStar(require("./contractType"), exports);
40
+ __exportStar(require("./depositDirection"), exports);
41
+ __exportStar(require("./depositExplanation"), exports);
42
+ __exportStar(require("./driftAction"), exports);
43
+ __exportStar(require("./exchangeStatus"), exports);
44
+ __exportStar(require("./featureBitFlags"), exports);
45
+ __exportStar(require("./feeStructure"), exports);
46
+ __exportStar(require("./feeTier"), exports);
47
+ __exportStar(require("./fillMode"), exports);
48
+ __exportStar(require("./fuelOverflowStatus"), exports);
49
+ __exportStar(require("./historicalIndexData"), exports);
50
+ __exportStar(require("./historicalOracleData"), exports);
51
+ __exportStar(require("./ifRebalanceConfigParams"), exports);
52
+ __exportStar(require("./insuranceClaim"), exports);
53
+ __exportStar(require("./insuranceFund"), exports);
54
+ __exportStar(require("./insuranceFundOperation"), exports);
55
+ __exportStar(require("./liquidateBorrowForPerpPnlRecord"), exports);
56
+ __exportStar(require("./liquidatePerpPnlForDepositRecord"), exports);
57
+ __exportStar(require("./liquidatePerpRecord"), exports);
58
+ __exportStar(require("./liquidateSpotRecord"), exports);
59
+ __exportStar(require("./liquidationBitFlag"), exports);
60
+ __exportStar(require("./liquidationMultiplierType"), exports);
61
+ __exportStar(require("./liquidationType"), exports);
62
+ __exportStar(require("./logMode"), exports);
63
+ __exportStar(require("./lPAction"), exports);
64
+ __exportStar(require("./lpPoolFeatureBitFlags"), exports);
65
+ __exportStar(require("./lpStatus"), exports);
66
+ __exportStar(require("./marginCalculationMode"), exports);
67
+ __exportStar(require("./marginMode"), exports);
68
+ __exportStar(require("./marginRequirementType"), exports);
69
+ __exportStar(require("./marketIdentifier"), exports);
70
+ __exportStar(require("./marketStatus"), exports);
71
+ __exportStar(require("./marketType"), exports);
72
+ __exportStar(require("./modifyOrderId"), exports);
73
+ __exportStar(require("./modifyOrderParams"), exports);
74
+ __exportStar(require("./modifyOrderPolicy"), exports);
75
+ __exportStar(require("./oracleGuardRails"), exports);
76
+ __exportStar(require("./oracleSource"), exports);
77
+ __exportStar(require("./oracleValidity"), exports);
78
+ __exportStar(require("./order"), exports);
79
+ __exportStar(require("./orderAction"), exports);
80
+ __exportStar(require("./orderActionExplanation"), exports);
81
+ __exportStar(require("./orderBitFlag"), exports);
82
+ __exportStar(require("./orderFillerRewardStructure"), exports);
83
+ __exportStar(require("./orderParams"), exports);
84
+ __exportStar(require("./orderParamsBitFlag"), exports);
85
+ __exportStar(require("./orderStatus"), exports);
86
+ __exportStar(require("./orderTriggerCondition"), exports);
87
+ __exportStar(require("./orderType"), exports);
88
+ __exportStar(require("./perpBankruptcyRecord"), exports);
89
+ __exportStar(require("./perpFulfillmentMethod"), exports);
90
+ __exportStar(require("./perpLpOperation"), exports);
91
+ __exportStar(require("./perpOperation"), exports);
92
+ __exportStar(require("./perpPosition"), exports);
93
+ __exportStar(require("./placeAndTakeOrderSuccessCondition"), exports);
94
+ __exportStar(require("./poolBalance"), exports);
95
+ __exportStar(require("./positionDirection"), exports);
96
+ __exportStar(require("./positionFlag"), exports);
97
+ __exportStar(require("./positionUpdateType"), exports);
98
+ __exportStar(require("./postOnlyParam"), exports);
99
+ __exportStar(require("./prelaunchOracleParams"), exports);
100
+ __exportStar(require("./priceDivergenceGuardRails"), exports);
101
+ __exportStar(require("./referrerStatus"), exports);
102
+ __exportStar(require("./revenueShareEscrowFixed"), exports);
103
+ __exportStar(require("./revenueShareOrder"), exports);
104
+ __exportStar(require("./revenueShareOrderBitFlag"), exports);
105
+ __exportStar(require("./settlementDirection"), exports);
106
+ __exportStar(require("./settlePnlExplanation"), exports);
107
+ __exportStar(require("./settlePnlMode"), exports);
108
+ __exportStar(require("./signatureVerificationError"), exports);
109
+ __exportStar(require("./signedMsgOrderId"), exports);
110
+ __exportStar(require("./signedMsgOrderParamsDelegateMessage"), exports);
111
+ __exportStar(require("./signedMsgOrderParamsMessage"), exports);
112
+ __exportStar(require("./signedMsgTriggerOrderParams"), exports);
113
+ __exportStar(require("./signedMsgUserOrdersFixed"), exports);
114
+ __exportStar(require("./spotBalanceType"), exports);
115
+ __exportStar(require("./spotBankruptcyRecord"), exports);
116
+ __exportStar(require("./spotFulfillmentConfigStatus"), exports);
117
+ __exportStar(require("./spotFulfillmentMethod"), exports);
118
+ __exportStar(require("./spotFulfillmentType"), exports);
119
+ __exportStar(require("./spotOperation"), exports);
120
+ __exportStar(require("./spotPosition"), exports);
121
+ __exportStar(require("./stakeAction"), exports);
122
+ __exportStar(require("./swapDirection"), exports);
123
+ __exportStar(require("./swapReduceOnly"), exports);
124
+ __exportStar(require("./targetsDatum"), exports);
125
+ __exportStar(require("./tokenProgramFlag"), exports);
126
+ __exportStar(require("./twapPeriod"), exports);
127
+ __exportStar(require("./userFees"), exports);
128
+ __exportStar(require("./userStatsPausedOperations"), exports);
129
+ __exportStar(require("./userStatus"), exports);
130
+ __exportStar(require("./validityGuardRails"), exports);
@@ -0,0 +1,63 @@
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 type InsuranceClaim = {
10
+ /**
11
+ * The amount of revenue last settled
12
+ * Positive if funds left the perp market,
13
+ * negative if funds were pulled into the perp market
14
+ * precision: QUOTE_PRECISION
15
+ */
16
+ revenueWithdrawSinceLastSettle: bigint;
17
+ /**
18
+ * The max amount of revenue that can be withdrawn per period
19
+ * precision: QUOTE_PRECISION
20
+ */
21
+ maxRevenueWithdrawPerPeriod: bigint;
22
+ /**
23
+ * The max amount of insurance that perp market can use to resolve bankruptcy and pnl deficits
24
+ * precision: QUOTE_PRECISION
25
+ */
26
+ quoteMaxInsurance: bigint;
27
+ /**
28
+ * The amount of insurance that has been used to resolve bankruptcy and pnl deficits
29
+ * precision: QUOTE_PRECISION
30
+ */
31
+ quoteSettledInsurance: bigint;
32
+ /** The last time revenue was settled in/out of market */
33
+ lastRevenueWithdrawTs: bigint;
34
+ };
35
+ export type InsuranceClaimArgs = {
36
+ /**
37
+ * The amount of revenue last settled
38
+ * Positive if funds left the perp market,
39
+ * negative if funds were pulled into the perp market
40
+ * precision: QUOTE_PRECISION
41
+ */
42
+ revenueWithdrawSinceLastSettle: number | bigint;
43
+ /**
44
+ * The max amount of revenue that can be withdrawn per period
45
+ * precision: QUOTE_PRECISION
46
+ */
47
+ maxRevenueWithdrawPerPeriod: number | bigint;
48
+ /**
49
+ * The max amount of insurance that perp market can use to resolve bankruptcy and pnl deficits
50
+ * precision: QUOTE_PRECISION
51
+ */
52
+ quoteMaxInsurance: number | bigint;
53
+ /**
54
+ * The amount of insurance that has been used to resolve bankruptcy and pnl deficits
55
+ * precision: QUOTE_PRECISION
56
+ */
57
+ quoteSettledInsurance: number | bigint;
58
+ /** The last time revenue was settled in/out of market */
59
+ lastRevenueWithdrawTs: number | bigint;
60
+ };
61
+ export declare function getInsuranceClaimEncoder(): FixedSizeEncoder<InsuranceClaimArgs>;
62
+ export declare function getInsuranceClaimDecoder(): FixedSizeDecoder<InsuranceClaim>;
63
+ export declare function getInsuranceClaimCodec(): FixedSizeCodec<InsuranceClaimArgs, InsuranceClaim>;
@@ -0,0 +1,34 @@
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.getInsuranceClaimEncoder = getInsuranceClaimEncoder;
11
+ exports.getInsuranceClaimDecoder = getInsuranceClaimDecoder;
12
+ exports.getInsuranceClaimCodec = getInsuranceClaimCodec;
13
+ const kit_1 = require("@solana/kit");
14
+ function getInsuranceClaimEncoder() {
15
+ return (0, kit_1.getStructEncoder)([
16
+ ["revenueWithdrawSinceLastSettle", (0, kit_1.getI64Encoder)()],
17
+ ["maxRevenueWithdrawPerPeriod", (0, kit_1.getU64Encoder)()],
18
+ ["quoteMaxInsurance", (0, kit_1.getU64Encoder)()],
19
+ ["quoteSettledInsurance", (0, kit_1.getU64Encoder)()],
20
+ ["lastRevenueWithdrawTs", (0, kit_1.getI64Encoder)()],
21
+ ]);
22
+ }
23
+ function getInsuranceClaimDecoder() {
24
+ return (0, kit_1.getStructDecoder)([
25
+ ["revenueWithdrawSinceLastSettle", (0, kit_1.getI64Decoder)()],
26
+ ["maxRevenueWithdrawPerPeriod", (0, kit_1.getU64Decoder)()],
27
+ ["quoteMaxInsurance", (0, kit_1.getU64Decoder)()],
28
+ ["quoteSettledInsurance", (0, kit_1.getU64Decoder)()],
29
+ ["lastRevenueWithdrawTs", (0, kit_1.getI64Decoder)()],
30
+ ]);
31
+ }
32
+ function getInsuranceClaimCodec() {
33
+ return (0, kit_1.combineCodec)(getInsuranceClaimEncoder(), getInsuranceClaimDecoder());
34
+ }
@@ -0,0 +1,33 @@
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 } from "@solana/kit";
9
+ export type InsuranceFund = {
10
+ vault: Address;
11
+ totalShares: bigint;
12
+ userShares: bigint;
13
+ sharesBase: bigint;
14
+ unstakingPeriod: bigint;
15
+ lastRevenueSettleTs: bigint;
16
+ revenueSettlePeriod: bigint;
17
+ totalFactor: number;
18
+ userFactor: number;
19
+ };
20
+ export type InsuranceFundArgs = {
21
+ vault: Address;
22
+ totalShares: number | bigint;
23
+ userShares: number | bigint;
24
+ sharesBase: number | bigint;
25
+ unstakingPeriod: number | bigint;
26
+ lastRevenueSettleTs: number | bigint;
27
+ revenueSettlePeriod: number | bigint;
28
+ totalFactor: number;
29
+ userFactor: number;
30
+ };
31
+ export declare function getInsuranceFundEncoder(): FixedSizeEncoder<InsuranceFundArgs>;
32
+ export declare function getInsuranceFundDecoder(): FixedSizeDecoder<InsuranceFund>;
33
+ export declare function getInsuranceFundCodec(): FixedSizeCodec<InsuranceFundArgs, InsuranceFund>;
@@ -0,0 +1,42 @@
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.getInsuranceFundEncoder = getInsuranceFundEncoder;
11
+ exports.getInsuranceFundDecoder = getInsuranceFundDecoder;
12
+ exports.getInsuranceFundCodec = getInsuranceFundCodec;
13
+ const kit_1 = require("@solana/kit");
14
+ function getInsuranceFundEncoder() {
15
+ return (0, kit_1.getStructEncoder)([
16
+ ["vault", (0, kit_1.getAddressEncoder)()],
17
+ ["totalShares", (0, kit_1.getU128Encoder)()],
18
+ ["userShares", (0, kit_1.getU128Encoder)()],
19
+ ["sharesBase", (0, kit_1.getU128Encoder)()],
20
+ ["unstakingPeriod", (0, kit_1.getI64Encoder)()],
21
+ ["lastRevenueSettleTs", (0, kit_1.getI64Encoder)()],
22
+ ["revenueSettlePeriod", (0, kit_1.getI64Encoder)()],
23
+ ["totalFactor", (0, kit_1.getU32Encoder)()],
24
+ ["userFactor", (0, kit_1.getU32Encoder)()],
25
+ ]);
26
+ }
27
+ function getInsuranceFundDecoder() {
28
+ return (0, kit_1.getStructDecoder)([
29
+ ["vault", (0, kit_1.getAddressDecoder)()],
30
+ ["totalShares", (0, kit_1.getU128Decoder)()],
31
+ ["userShares", (0, kit_1.getU128Decoder)()],
32
+ ["sharesBase", (0, kit_1.getU128Decoder)()],
33
+ ["unstakingPeriod", (0, kit_1.getI64Decoder)()],
34
+ ["lastRevenueSettleTs", (0, kit_1.getI64Decoder)()],
35
+ ["revenueSettlePeriod", (0, kit_1.getI64Decoder)()],
36
+ ["totalFactor", (0, kit_1.getU32Decoder)()],
37
+ ["userFactor", (0, kit_1.getU32Decoder)()],
38
+ ]);
39
+ }
40
+ function getInsuranceFundCodec() {
41
+ return (0, kit_1.combineCodec)(getInsuranceFundEncoder(), getInsuranceFundDecoder());
42
+ }
@@ -0,0 +1,18 @@
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 InsuranceFundOperation {
10
+ Init = 0,
11
+ Add = 1,
12
+ RequestRemove = 2,
13
+ Remove = 3
14
+ }
15
+ export type InsuranceFundOperationArgs = InsuranceFundOperation;
16
+ export declare function getInsuranceFundOperationEncoder(): FixedSizeEncoder<InsuranceFundOperationArgs>;
17
+ export declare function getInsuranceFundOperationDecoder(): FixedSizeDecoder<InsuranceFundOperation>;
18
+ export declare function getInsuranceFundOperationCodec(): FixedSizeCodec<InsuranceFundOperationArgs, InsuranceFundOperation>;
@@ -0,0 +1,30 @@
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.InsuranceFundOperation = void 0;
11
+ exports.getInsuranceFundOperationEncoder = getInsuranceFundOperationEncoder;
12
+ exports.getInsuranceFundOperationDecoder = getInsuranceFundOperationDecoder;
13
+ exports.getInsuranceFundOperationCodec = getInsuranceFundOperationCodec;
14
+ const kit_1 = require("@solana/kit");
15
+ var InsuranceFundOperation;
16
+ (function (InsuranceFundOperation) {
17
+ InsuranceFundOperation[InsuranceFundOperation["Init"] = 0] = "Init";
18
+ InsuranceFundOperation[InsuranceFundOperation["Add"] = 1] = "Add";
19
+ InsuranceFundOperation[InsuranceFundOperation["RequestRemove"] = 2] = "RequestRemove";
20
+ InsuranceFundOperation[InsuranceFundOperation["Remove"] = 3] = "Remove";
21
+ })(InsuranceFundOperation || (exports.InsuranceFundOperation = InsuranceFundOperation = {}));
22
+ function getInsuranceFundOperationEncoder() {
23
+ return (0, kit_1.getEnumEncoder)(InsuranceFundOperation);
24
+ }
25
+ function getInsuranceFundOperationDecoder() {
26
+ return (0, kit_1.getEnumDecoder)(InsuranceFundOperation);
27
+ }
28
+ function getInsuranceFundOperationCodec() {
29
+ return (0, kit_1.combineCodec)(getInsuranceFundOperationEncoder(), getInsuranceFundOperationDecoder());
30
+ }
@@ -0,0 +1,18 @@
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 LPAction {
10
+ AddLiquidity = 0,
11
+ RemoveLiquidity = 1,
12
+ SettleLiquidity = 2,
13
+ RemoveLiquidityDerisk = 3
14
+ }
15
+ export type LPActionArgs = LPAction;
16
+ export declare function getLPActionEncoder(): FixedSizeEncoder<LPActionArgs>;
17
+ export declare function getLPActionDecoder(): FixedSizeDecoder<LPAction>;
18
+ export declare function getLPActionCodec(): FixedSizeCodec<LPActionArgs, LPAction>;
@@ -0,0 +1,30 @@
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.LPAction = void 0;
11
+ exports.getLPActionEncoder = getLPActionEncoder;
12
+ exports.getLPActionDecoder = getLPActionDecoder;
13
+ exports.getLPActionCodec = getLPActionCodec;
14
+ const kit_1 = require("@solana/kit");
15
+ var LPAction;
16
+ (function (LPAction) {
17
+ LPAction[LPAction["AddLiquidity"] = 0] = "AddLiquidity";
18
+ LPAction[LPAction["RemoveLiquidity"] = 1] = "RemoveLiquidity";
19
+ LPAction[LPAction["SettleLiquidity"] = 2] = "SettleLiquidity";
20
+ LPAction[LPAction["RemoveLiquidityDerisk"] = 3] = "RemoveLiquidityDerisk";
21
+ })(LPAction || (exports.LPAction = LPAction = {}));
22
+ function getLPActionEncoder() {
23
+ return (0, kit_1.getEnumEncoder)(LPAction);
24
+ }
25
+ function getLPActionDecoder() {
26
+ return (0, kit_1.getEnumDecoder)(LPAction);
27
+ }
28
+ function getLPActionCodec() {
29
+ return (0, kit_1.combineCodec)(getLPActionEncoder(), getLPActionDecoder());
30
+ }
@@ -0,0 +1,27 @@
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 type LiquidateBorrowForPerpPnlRecord = {
10
+ perpMarketIndex: number;
11
+ marketOraclePrice: bigint;
12
+ pnlTransfer: bigint;
13
+ liabilityMarketIndex: number;
14
+ liabilityPrice: bigint;
15
+ liabilityTransfer: bigint;
16
+ };
17
+ export type LiquidateBorrowForPerpPnlRecordArgs = {
18
+ perpMarketIndex: number;
19
+ marketOraclePrice: number | bigint;
20
+ pnlTransfer: number | bigint;
21
+ liabilityMarketIndex: number;
22
+ liabilityPrice: number | bigint;
23
+ liabilityTransfer: number | bigint;
24
+ };
25
+ export declare function getLiquidateBorrowForPerpPnlRecordEncoder(): FixedSizeEncoder<LiquidateBorrowForPerpPnlRecordArgs>;
26
+ export declare function getLiquidateBorrowForPerpPnlRecordDecoder(): FixedSizeDecoder<LiquidateBorrowForPerpPnlRecord>;
27
+ export declare function getLiquidateBorrowForPerpPnlRecordCodec(): FixedSizeCodec<LiquidateBorrowForPerpPnlRecordArgs, LiquidateBorrowForPerpPnlRecord>;
@@ -0,0 +1,36 @@
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.getLiquidateBorrowForPerpPnlRecordEncoder = getLiquidateBorrowForPerpPnlRecordEncoder;
11
+ exports.getLiquidateBorrowForPerpPnlRecordDecoder = getLiquidateBorrowForPerpPnlRecordDecoder;
12
+ exports.getLiquidateBorrowForPerpPnlRecordCodec = getLiquidateBorrowForPerpPnlRecordCodec;
13
+ const kit_1 = require("@solana/kit");
14
+ function getLiquidateBorrowForPerpPnlRecordEncoder() {
15
+ return (0, kit_1.getStructEncoder)([
16
+ ["perpMarketIndex", (0, kit_1.getU16Encoder)()],
17
+ ["marketOraclePrice", (0, kit_1.getI64Encoder)()],
18
+ ["pnlTransfer", (0, kit_1.getU128Encoder)()],
19
+ ["liabilityMarketIndex", (0, kit_1.getU16Encoder)()],
20
+ ["liabilityPrice", (0, kit_1.getI64Encoder)()],
21
+ ["liabilityTransfer", (0, kit_1.getU128Encoder)()],
22
+ ]);
23
+ }
24
+ function getLiquidateBorrowForPerpPnlRecordDecoder() {
25
+ return (0, kit_1.getStructDecoder)([
26
+ ["perpMarketIndex", (0, kit_1.getU16Decoder)()],
27
+ ["marketOraclePrice", (0, kit_1.getI64Decoder)()],
28
+ ["pnlTransfer", (0, kit_1.getU128Decoder)()],
29
+ ["liabilityMarketIndex", (0, kit_1.getU16Decoder)()],
30
+ ["liabilityPrice", (0, kit_1.getI64Decoder)()],
31
+ ["liabilityTransfer", (0, kit_1.getU128Decoder)()],
32
+ ]);
33
+ }
34
+ function getLiquidateBorrowForPerpPnlRecordCodec() {
35
+ return (0, kit_1.combineCodec)(getLiquidateBorrowForPerpPnlRecordEncoder(), getLiquidateBorrowForPerpPnlRecordDecoder());
36
+ }
@@ -0,0 +1,27 @@
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 type LiquidatePerpPnlForDepositRecord = {
10
+ perpMarketIndex: number;
11
+ marketOraclePrice: bigint;
12
+ pnlTransfer: bigint;
13
+ assetMarketIndex: number;
14
+ assetPrice: bigint;
15
+ assetTransfer: bigint;
16
+ };
17
+ export type LiquidatePerpPnlForDepositRecordArgs = {
18
+ perpMarketIndex: number;
19
+ marketOraclePrice: number | bigint;
20
+ pnlTransfer: number | bigint;
21
+ assetMarketIndex: number;
22
+ assetPrice: number | bigint;
23
+ assetTransfer: number | bigint;
24
+ };
25
+ export declare function getLiquidatePerpPnlForDepositRecordEncoder(): FixedSizeEncoder<LiquidatePerpPnlForDepositRecordArgs>;
26
+ export declare function getLiquidatePerpPnlForDepositRecordDecoder(): FixedSizeDecoder<LiquidatePerpPnlForDepositRecord>;
27
+ export declare function getLiquidatePerpPnlForDepositRecordCodec(): FixedSizeCodec<LiquidatePerpPnlForDepositRecordArgs, LiquidatePerpPnlForDepositRecord>;
@@ -0,0 +1,36 @@
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.getLiquidatePerpPnlForDepositRecordEncoder = getLiquidatePerpPnlForDepositRecordEncoder;
11
+ exports.getLiquidatePerpPnlForDepositRecordDecoder = getLiquidatePerpPnlForDepositRecordDecoder;
12
+ exports.getLiquidatePerpPnlForDepositRecordCodec = getLiquidatePerpPnlForDepositRecordCodec;
13
+ const kit_1 = require("@solana/kit");
14
+ function getLiquidatePerpPnlForDepositRecordEncoder() {
15
+ return (0, kit_1.getStructEncoder)([
16
+ ["perpMarketIndex", (0, kit_1.getU16Encoder)()],
17
+ ["marketOraclePrice", (0, kit_1.getI64Encoder)()],
18
+ ["pnlTransfer", (0, kit_1.getU128Encoder)()],
19
+ ["assetMarketIndex", (0, kit_1.getU16Encoder)()],
20
+ ["assetPrice", (0, kit_1.getI64Encoder)()],
21
+ ["assetTransfer", (0, kit_1.getU128Encoder)()],
22
+ ]);
23
+ }
24
+ function getLiquidatePerpPnlForDepositRecordDecoder() {
25
+ return (0, kit_1.getStructDecoder)([
26
+ ["perpMarketIndex", (0, kit_1.getU16Decoder)()],
27
+ ["marketOraclePrice", (0, kit_1.getI64Decoder)()],
28
+ ["pnlTransfer", (0, kit_1.getU128Decoder)()],
29
+ ["assetMarketIndex", (0, kit_1.getU16Decoder)()],
30
+ ["assetPrice", (0, kit_1.getI64Decoder)()],
31
+ ["assetTransfer", (0, kit_1.getU128Decoder)()],
32
+ ]);
33
+ }
34
+ function getLiquidatePerpPnlForDepositRecordCodec() {
35
+ return (0, kit_1.combineCodec)(getLiquidatePerpPnlForDepositRecordEncoder(), getLiquidatePerpPnlForDepositRecordDecoder());
36
+ }