@drift-labs/sdk 2.97.0-beta.9 → 2.98.0-beta.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 (754) hide show
  1. package/README.md +11 -4
  2. package/VERSION +1 -1
  3. package/bun.lockb +0 -0
  4. package/lib/{accounts → browser/accounts}/bulkAccountLoader.d.ts +1 -0
  5. package/lib/browser/accounts/grpcAccountSubscriber.d.ts +16 -0
  6. package/lib/browser/accounts/grpcAccountSubscriber.js +154 -0
  7. package/lib/browser/accounts/grpcDriftClientAccountSubscriber.d.ts +12 -0
  8. package/lib/browser/accounts/grpcDriftClientAccountSubscriber.js +97 -0
  9. package/lib/browser/accounts/grpcInsuranceFundStakeAccountSubscriber.d.ts +10 -0
  10. package/lib/browser/accounts/grpcInsuranceFundStakeAccountSubscriber.js +30 -0
  11. package/lib/browser/accounts/grpcProgramAccountSubscriber.d.ts +18 -0
  12. package/lib/browser/accounts/grpcProgramAccountSubscriber.js +171 -0
  13. package/lib/browser/accounts/grpcUserAccountSubscriber.d.ts +10 -0
  14. package/lib/browser/accounts/grpcUserAccountSubscriber.js +28 -0
  15. package/lib/browser/accounts/grpcUserStatsAccountSubscriber.d.ts +10 -0
  16. package/lib/browser/accounts/grpcUserStatsAccountSubscriber.js +28 -0
  17. package/lib/{accounts → browser/accounts}/types.d.ts +8 -0
  18. package/lib/{accounts → browser/accounts}/webSocketAccountSubscriber.d.ts +2 -1
  19. package/lib/{accounts → browser/accounts}/webSocketDriftClientAccountSubscriber.d.ts +3 -3
  20. package/lib/{accounts → browser/accounts}/webSocketProgramAccountSubscriber.d.ts +2 -1
  21. package/lib/{addresses → browser/addresses}/pda.d.ts +1 -0
  22. package/lib/{addresses → browser/addresses}/pda.js +8 -1
  23. package/lib/browser/auctionSubscriber/auctionSubscriberGrpc.d.ts +15 -0
  24. package/lib/browser/auctionSubscriber/auctionSubscriberGrpc.js +32 -0
  25. package/lib/{auctionSubscriber → browser/auctionSubscriber}/index.d.ts +1 -0
  26. package/lib/browser/auctionSubscriber/index.js +19 -0
  27. package/lib/{auctionSubscriber → browser/auctionSubscriber}/types.d.ts +2 -0
  28. package/lib/{bankrun → browser/bankrun}/bankrunConnection.d.ts +1 -0
  29. package/lib/{config.js → browser/config.js} +1 -1
  30. package/lib/{constants → browser/constants}/perpMarkets.js +25 -4
  31. package/lib/{constants → browser/constants}/spotMarkets.js +6 -6
  32. package/lib/{decode → browser/decode}/phoenix.d.ts +1 -0
  33. package/lib/{decode → browser/decode}/user.d.ts +1 -0
  34. package/lib/{decode → browser/decode}/user.js +10 -0
  35. package/lib/{dlob → browser/dlob}/DLOBOrders.d.ts +1 -0
  36. package/lib/{driftClient.d.ts → browser/driftClient.d.ts} +25 -7
  37. package/lib/{driftClient.js → browser/driftClient.js} +177 -40
  38. package/lib/{driftClientConfig.d.ts → browser/driftClientConfig.d.ts} +6 -1
  39. package/lib/{idl → browser/idl}/drift.json +281 -4
  40. package/lib/{idl → browser/idl}/switchboard_on_demand_30.json +195 -37
  41. package/lib/{index.d.ts → browser/index.d.ts} +8 -0
  42. package/lib/{index.js → browser/index.js} +8 -0
  43. package/lib/browser/isomorphic/grpc.browser.d.ts +1 -0
  44. package/lib/browser/isomorphic/grpc.browser.js +8 -0
  45. package/lib/browser/isomorphic/grpc.d.ts +1 -0
  46. package/lib/browser/isomorphic/grpc.js +8 -0
  47. package/lib/browser/isomorphic/grpc.node.d.ts +5 -0
  48. package/lib/{math → browser/math}/auction.js +9 -6
  49. package/lib/{math → browser/math}/margin.d.ts +3 -3
  50. package/lib/{math → browser/math}/margin.js +9 -9
  51. package/lib/{math → browser/math}/oracles.d.ts +1 -0
  52. package/lib/{math → browser/math}/position.d.ts +16 -0
  53. package/lib/{math → browser/math}/position.js +30 -3
  54. package/lib/{oracles → browser/oracles}/prelaunchOracleClient.d.ts +1 -0
  55. package/lib/{oracles → browser/oracles}/pythClient.d.ts +1 -1
  56. package/lib/{oracles → browser/oracles}/pythClient.js +1 -2
  57. package/lib/{oracles → browser/oracles}/pythPullClient.d.ts +1 -0
  58. package/lib/{oracles → browser/oracles}/quoteAssetOracleClient.d.ts +1 -0
  59. package/lib/{oracles → browser/oracles}/switchboardClient.d.ts +1 -0
  60. package/lib/{oracles → browser/oracles}/switchboardOnDemandClient.d.ts +1 -0
  61. package/lib/{oracles → browser/oracles}/types.d.ts +1 -0
  62. package/lib/{orderSubscriber → browser/orderSubscriber}/OrderSubscriber.d.ts +3 -1
  63. package/lib/{orderSubscriber → browser/orderSubscriber}/OrderSubscriber.js +18 -13
  64. package/lib/browser/orderSubscriber/grpcSubscription.d.ts +22 -0
  65. package/lib/browser/orderSubscriber/grpcSubscription.js +66 -0
  66. package/lib/{orderSubscriber → browser/orderSubscriber}/types.d.ts +9 -0
  67. package/lib/{token → browser/token}/index.d.ts +1 -0
  68. package/lib/{tx → browser/tx}/baseTxSender.d.ts +4 -1
  69. package/lib/{tx → browser/tx}/baseTxSender.js +9 -4
  70. package/lib/{tx → browser/tx}/fastSingleTxSender.d.ts +3 -1
  71. package/lib/{tx → browser/tx}/fastSingleTxSender.js +6 -5
  72. package/lib/{tx → browser/tx}/forwardOnlyTxSender.d.ts +3 -1
  73. package/lib/{tx → browser/tx}/forwardOnlyTxSender.js +5 -4
  74. package/lib/{tx → browser/tx}/retryTxSender.d.ts +3 -1
  75. package/lib/{tx → browser/tx}/retryTxSender.js +5 -4
  76. package/lib/{tx → browser/tx}/types.d.ts +1 -0
  77. package/lib/{tx → browser/tx}/whileValidTxSender.d.ts +3 -1
  78. package/lib/{tx → browser/tx}/whileValidTxSender.js +5 -4
  79. package/lib/{types.d.ts → browser/types.d.ts} +30 -1
  80. package/lib/{types.js → browser/types.js} +6 -1
  81. package/lib/{user.d.ts → browser/user.d.ts} +1 -1
  82. package/lib/{user.js → browser/user.js} +16 -9
  83. package/lib/{userConfig.d.ts → browser/userConfig.d.ts} +6 -1
  84. package/lib/{userMap → browser/userMap}/WebsocketSubscription.d.ts +1 -0
  85. package/lib/browser/userMap/grpcSubscription.d.ts +24 -0
  86. package/lib/browser/userMap/grpcSubscription.js +40 -0
  87. package/lib/{userMap → browser/userMap}/userMap.js +17 -1
  88. package/lib/{userMap → browser/userMap}/userMapConfig.d.ts +6 -0
  89. package/lib/{userStats.js → browser/userStats.js} +11 -4
  90. package/lib/{userStatsConfig.d.ts → browser/userStatsConfig.d.ts} +6 -0
  91. package/lib/node/accounts/basicUserAccountSubscriber.d.ts +27 -0
  92. package/lib/node/accounts/basicUserAccountSubscriber.js +38 -0
  93. package/lib/node/accounts/bulkAccountLoader.d.ts +37 -0
  94. package/lib/node/accounts/bulkAccountLoader.js +222 -0
  95. package/lib/node/accounts/bulkUserStatsSubscription.d.ts +7 -0
  96. package/lib/node/accounts/bulkUserStatsSubscription.js +21 -0
  97. package/lib/node/accounts/bulkUserSubscription.d.ts +7 -0
  98. package/lib/node/accounts/bulkUserSubscription.js +21 -0
  99. package/lib/node/accounts/fetch.d.ts +6 -0
  100. package/lib/node/accounts/fetch.js +30 -0
  101. package/lib/node/accounts/grpcAccountSubscriber.d.ts +16 -0
  102. package/lib/node/accounts/grpcAccountSubscriber.js +154 -0
  103. package/lib/node/accounts/grpcDriftClientAccountSubscriber.d.ts +12 -0
  104. package/lib/node/accounts/grpcDriftClientAccountSubscriber.js +97 -0
  105. package/lib/node/accounts/grpcInsuranceFundStakeAccountSubscriber.d.ts +10 -0
  106. package/lib/node/accounts/grpcInsuranceFundStakeAccountSubscriber.js +30 -0
  107. package/lib/node/accounts/grpcProgramAccountSubscriber.d.ts +18 -0
  108. package/lib/node/accounts/grpcProgramAccountSubscriber.js +171 -0
  109. package/lib/node/accounts/grpcUserAccountSubscriber.d.ts +10 -0
  110. package/lib/node/accounts/grpcUserAccountSubscriber.js +28 -0
  111. package/lib/node/accounts/grpcUserStatsAccountSubscriber.d.ts +10 -0
  112. package/lib/node/accounts/grpcUserStatsAccountSubscriber.js +28 -0
  113. package/lib/node/accounts/oneShotUserAccountSubscriber.d.ts +18 -0
  114. package/lib/node/accounts/oneShotUserAccountSubscriber.js +48 -0
  115. package/lib/node/accounts/pollingDriftClientAccountSubscriber.d.ts +69 -0
  116. package/lib/node/accounts/pollingDriftClientAccountSubscriber.js +415 -0
  117. package/lib/node/accounts/pollingInsuranceFundStakeAccountSubscriber.d.ts +29 -0
  118. package/lib/node/accounts/pollingInsuranceFundStakeAccountSubscriber.js +110 -0
  119. package/lib/node/accounts/pollingOracleAccountSubscriber.d.ts +27 -0
  120. package/lib/node/accounts/pollingOracleAccountSubscriber.js +78 -0
  121. package/lib/node/accounts/pollingTokenAccountSubscriber.d.ts +26 -0
  122. package/lib/node/accounts/pollingTokenAccountSubscriber.js +78 -0
  123. package/lib/node/accounts/pollingUserAccountSubscriber.d.ts +29 -0
  124. package/lib/node/accounts/pollingUserAccountSubscriber.js +102 -0
  125. package/lib/node/accounts/pollingUserStatsAccountSubscriber.d.ts +27 -0
  126. package/lib/node/accounts/pollingUserStatsAccountSubscriber.js +94 -0
  127. package/lib/node/accounts/testBulkAccountLoader.d.ts +4 -0
  128. package/lib/node/accounts/testBulkAccountLoader.js +45 -0
  129. package/lib/node/accounts/types.d.ts +155 -0
  130. package/lib/node/accounts/types.js +16 -0
  131. package/lib/node/accounts/utils.d.ts +8 -0
  132. package/lib/node/accounts/utils.js +39 -0
  133. package/lib/node/accounts/webSocketAccountSubscriber.d.ts +29 -0
  134. package/lib/node/accounts/webSocketAccountSubscriber.js +149 -0
  135. package/lib/node/accounts/webSocketDriftClientAccountSubscriber.d.ts +66 -0
  136. package/lib/node/accounts/webSocketDriftClientAccountSubscriber.js +352 -0
  137. package/lib/node/accounts/webSocketInsuranceFundStakeAccountSubscriber.d.ts +23 -0
  138. package/lib/node/accounts/webSocketInsuranceFundStakeAccountSubscriber.js +67 -0
  139. package/lib/node/accounts/webSocketProgramAccountSubscriber.d.ts +34 -0
  140. package/lib/node/accounts/webSocketProgramAccountSubscriber.js +127 -0
  141. package/lib/node/accounts/webSocketUserAccountSubscriber.d.ts +23 -0
  142. package/lib/node/accounts/webSocketUserAccountSubscriber.js +61 -0
  143. package/lib/node/accounts/webSocketUserStatsAccountSubsriber.d.ts +22 -0
  144. package/lib/node/accounts/webSocketUserStatsAccountSubsriber.js +52 -0
  145. package/lib/node/addresses/marketAddresses.d.ts +2 -0
  146. package/lib/node/addresses/marketAddresses.js +15 -0
  147. package/lib/node/addresses/pda.d.ts +30 -0
  148. package/lib/node/addresses/pda.js +193 -0
  149. package/lib/node/adminClient.d.ts +202 -0
  150. package/lib/node/adminClient.js +1826 -0
  151. package/lib/node/assert/assert.d.ts +1 -0
  152. package/lib/node/assert/assert.js +9 -0
  153. package/lib/node/auctionSubscriber/auctionSubscriber.d.ts +14 -0
  154. package/lib/node/auctionSubscriber/auctionSubscriber.js +32 -0
  155. package/lib/node/auctionSubscriber/auctionSubscriberGrpc.d.ts +15 -0
  156. package/lib/node/auctionSubscriber/auctionSubscriberGrpc.js +32 -0
  157. package/lib/node/auctionSubscriber/index.d.ts +3 -0
  158. package/lib/node/auctionSubscriber/index.js +19 -0
  159. package/lib/node/auctionSubscriber/types.d.ts +14 -0
  160. package/lib/node/auctionSubscriber/types.js +2 -0
  161. package/lib/node/bankrun/bankrunConnection.d.ts +74 -0
  162. package/lib/node/bankrun/bankrunConnection.js +318 -0
  163. package/lib/node/blockhashSubscriber/BlockhashSubscriber.d.ts +27 -0
  164. package/lib/node/blockhashSubscriber/BlockhashSubscriber.js +89 -0
  165. package/lib/node/blockhashSubscriber/index.d.ts +1 -0
  166. package/lib/node/blockhashSubscriber/index.js +17 -0
  167. package/lib/node/blockhashSubscriber/types.d.ts +7 -0
  168. package/lib/node/blockhashSubscriber/types.js +2 -0
  169. package/lib/node/clock/clockSubscriber.d.ts +31 -0
  170. package/lib/node/clock/clockSubscriber.js +80 -0
  171. package/lib/node/config.d.ts +58 -0
  172. package/lib/node/config.js +126 -0
  173. package/lib/node/constants/numericConstants.d.ts +71 -0
  174. package/lib/node/constants/numericConstants.js +75 -0
  175. package/lib/node/constants/perpMarkets.d.ts +19 -0
  176. package/lib/node/constants/perpMarkets.js +868 -0
  177. package/lib/node/constants/spotMarkets.d.ts +23 -0
  178. package/lib/node/constants/spotMarkets.js +361 -0
  179. package/lib/node/constants/txConstants.d.ts +1 -0
  180. package/lib/node/constants/txConstants.js +4 -0
  181. package/lib/node/decode/phoenix.d.ts +7 -0
  182. package/lib/node/decode/phoenix.js +159 -0
  183. package/lib/node/decode/user.d.ts +4 -0
  184. package/lib/node/decode/user.js +339 -0
  185. package/lib/node/dlob/DLOB.d.ts +166 -0
  186. package/lib/node/dlob/DLOB.js +1142 -0
  187. package/lib/node/dlob/DLOBApiClient.d.ts +14 -0
  188. package/lib/node/dlob/DLOBApiClient.js +34 -0
  189. package/lib/node/dlob/DLOBNode.d.ts +57 -0
  190. package/lib/node/dlob/DLOBNode.js +86 -0
  191. package/lib/node/dlob/DLOBOrders.d.ts +17 -0
  192. package/lib/node/dlob/DLOBOrders.js +40 -0
  193. package/lib/node/dlob/DLOBSubscriber.d.ts +54 -0
  194. package/lib/node/dlob/DLOBSubscriber.js +139 -0
  195. package/lib/node/dlob/NodeList.d.ts +27 -0
  196. package/lib/node/dlob/NodeList.js +141 -0
  197. package/lib/node/dlob/dlobIdl.json +248 -0
  198. package/lib/node/dlob/orderBookLevels.d.ts +72 -0
  199. package/lib/node/dlob/orderBookLevels.js +438 -0
  200. package/lib/node/dlob/types.d.ts +18 -0
  201. package/lib/node/dlob/types.js +2 -0
  202. package/lib/node/driftClient.d.ts +829 -0
  203. package/lib/node/driftClient.js +4496 -0
  204. package/lib/node/driftClientConfig.d.ts +49 -0
  205. package/lib/node/driftClientConfig.js +2 -0
  206. package/lib/node/events/eventList.d.ts +22 -0
  207. package/lib/node/events/eventList.js +80 -0
  208. package/lib/node/events/eventSubscriber.d.ts +46 -0
  209. package/lib/node/events/eventSubscriber.js +223 -0
  210. package/lib/node/events/eventsServerLogProvider.d.ts +21 -0
  211. package/lib/node/events/eventsServerLogProvider.js +121 -0
  212. package/lib/node/events/fetchLogs.d.ts +25 -0
  213. package/lib/node/events/fetchLogs.js +99 -0
  214. package/lib/node/events/parse.d.ts +6 -0
  215. package/lib/node/events/parse.js +106 -0
  216. package/lib/node/events/pollingLogProvider.d.ts +17 -0
  217. package/lib/node/events/pollingLogProvider.js +58 -0
  218. package/lib/node/events/sort.d.ts +2 -0
  219. package/lib/node/events/sort.js +24 -0
  220. package/lib/node/events/txEventCache.d.ts +24 -0
  221. package/lib/node/events/txEventCache.js +71 -0
  222. package/lib/node/events/types.d.ts +77 -0
  223. package/lib/node/events/types.js +30 -0
  224. package/lib/node/events/webSocketLogProvider.d.ts +24 -0
  225. package/lib/node/events/webSocketLogProvider.js +96 -0
  226. package/lib/node/factory/bigNum.d.ts +122 -0
  227. package/lib/node/factory/bigNum.js +457 -0
  228. package/lib/node/factory/oracleClient.d.ts +5 -0
  229. package/lib/node/factory/oracleClient.js +52 -0
  230. package/lib/node/idl/drift.json +13656 -0
  231. package/lib/node/idl/openbook.json +3854 -0
  232. package/lib/node/idl/pyth_solana_receiver.json +628 -0
  233. package/lib/node/idl/switchboard.json +8354 -0
  234. package/lib/node/idl/switchboard_on_demand_30.json +4541 -0
  235. package/lib/node/idl/token_faucet.json +142 -0
  236. package/lib/node/index.d.ts +120 -0
  237. package/lib/node/index.js +142 -0
  238. package/lib/node/isomorphic/grpc.browser.d.ts +1 -0
  239. package/lib/node/isomorphic/grpc.d.ts +1 -0
  240. package/lib/node/isomorphic/grpc.js +17 -0
  241. package/lib/node/isomorphic/grpc.node.d.ts +5 -0
  242. package/lib/node/isomorphic/grpc.node.js +17 -0
  243. package/lib/node/jupiter/jupiterClient.d.ts +296 -0
  244. package/lib/node/jupiter/jupiterClient.js +178 -0
  245. package/lib/node/keypair.d.ts +2 -0
  246. package/lib/node/keypair.js +28 -0
  247. package/lib/node/marinade/index.d.ts +12 -0
  248. package/lib/node/marinade/index.js +36 -0
  249. package/lib/node/marinade/types.d.ts +1963 -0
  250. package/lib/node/marinade/types.js +1965 -0
  251. package/lib/node/math/amm.d.ts +98 -0
  252. package/lib/node/math/amm.js +626 -0
  253. package/lib/node/math/auction.d.ts +23 -0
  254. package/lib/node/math/auction.js +130 -0
  255. package/lib/node/math/bankruptcy.d.ts +2 -0
  256. package/lib/node/math/bankruptcy.js +31 -0
  257. package/lib/node/math/conversion.d.ts +2 -0
  258. package/lib/node/math/conversion.js +11 -0
  259. package/lib/node/math/exchangeStatus.d.ts +6 -0
  260. package/lib/node/math/exchangeStatus.js +77 -0
  261. package/lib/node/math/fuel.d.ts +6 -0
  262. package/lib/node/math/fuel.js +55 -0
  263. package/lib/node/math/funding.d.ts +34 -0
  264. package/lib/node/math/funding.js +209 -0
  265. package/lib/node/math/insurance.d.ts +7 -0
  266. package/lib/node/math/insurance.js +73 -0
  267. package/lib/node/math/margin.d.ts +39 -0
  268. package/lib/node/math/margin.js +184 -0
  269. package/lib/node/math/market.d.ts +39 -0
  270. package/lib/node/math/market.js +163 -0
  271. package/lib/node/math/oracles.d.ts +14 -0
  272. package/lib/node/math/oracles.js +134 -0
  273. package/lib/node/math/orders.d.ts +23 -0
  274. package/lib/node/math/orders.js +216 -0
  275. package/lib/node/math/position.d.ts +70 -0
  276. package/lib/node/math/position.js +225 -0
  277. package/lib/node/math/repeg.d.ts +22 -0
  278. package/lib/node/math/repeg.js +164 -0
  279. package/lib/node/math/spotBalance.d.ts +83 -0
  280. package/lib/node/math/spotBalance.js +373 -0
  281. package/lib/node/math/spotMarket.d.ts +11 -0
  282. package/lib/node/math/spotMarket.js +49 -0
  283. package/lib/node/math/spotPosition.d.ts +19 -0
  284. package/lib/node/math/spotPosition.js +78 -0
  285. package/lib/node/math/state.d.ts +5 -0
  286. package/lib/node/math/state.js +30 -0
  287. package/lib/node/math/superStake.d.ts +167 -0
  288. package/lib/node/math/superStake.js +306 -0
  289. package/lib/node/math/tiers.d.ts +4 -0
  290. package/lib/node/math/tiers.js +52 -0
  291. package/lib/node/math/trade.d.ts +117 -0
  292. package/lib/node/math/trade.js +637 -0
  293. package/lib/node/math/utils.d.ts +23 -0
  294. package/lib/node/math/utils.js +112 -0
  295. package/lib/node/memcmp.d.ts +7 -0
  296. package/lib/node/memcmp.js +63 -0
  297. package/lib/node/openbook/openbookV2FulfillmentConfigMap.d.ts +10 -0
  298. package/lib/node/openbook/openbookV2FulfillmentConfigMap.js +17 -0
  299. package/lib/node/openbook/openbookV2Subscriber.d.ts +36 -0
  300. package/lib/node/openbook/openbookV2Subscriber.js +104 -0
  301. package/lib/node/oracles/oracleClientCache.d.ts +9 -0
  302. package/lib/node/oracles/oracleClientCache.js +19 -0
  303. package/lib/node/oracles/prelaunchOracleClient.d.ts +12 -0
  304. package/lib/node/oracles/prelaunchOracleClient.js +24 -0
  305. package/lib/node/oracles/pythClient.d.ts +14 -0
  306. package/lib/node/oracles/pythClient.js +51 -0
  307. package/lib/node/oracles/pythPullClient.d.ts +19 -0
  308. package/lib/node/oracles/pythPullClient.js +60 -0
  309. package/lib/node/oracles/quoteAssetOracleClient.d.ts +10 -0
  310. package/lib/node/oracles/quoteAssetOracleClient.js +21 -0
  311. package/lib/node/oracles/strictOraclePrice.d.ts +9 -0
  312. package/lib/node/oracles/strictOraclePrice.js +17 -0
  313. package/lib/node/oracles/switchboardClient.d.ts +12 -0
  314. package/lib/node/oracles/switchboardClient.js +40 -0
  315. package/lib/node/oracles/switchboardOnDemandClient.d.ts +12 -0
  316. package/lib/node/oracles/switchboardOnDemandClient.js +32 -0
  317. package/lib/node/oracles/types.d.ts +23 -0
  318. package/lib/node/oracles/types.js +2 -0
  319. package/lib/node/orderParams.d.ts +29 -0
  320. package/lib/node/orderParams.js +44 -0
  321. package/lib/node/orderSubscriber/OrderSubscriber.d.ts +42 -0
  322. package/lib/node/orderSubscriber/OrderSubscriber.js +170 -0
  323. package/lib/node/orderSubscriber/PollingSubscription.d.ts +12 -0
  324. package/lib/node/orderSubscriber/PollingSubscription.js +23 -0
  325. package/lib/node/orderSubscriber/WebsocketSubscription.d.ts +23 -0
  326. package/lib/node/orderSubscriber/WebsocketSubscription.js +67 -0
  327. package/lib/node/orderSubscriber/grpcSubscription.d.ts +22 -0
  328. package/lib/node/orderSubscriber/grpcSubscription.js +66 -0
  329. package/lib/node/orderSubscriber/index.d.ts +2 -0
  330. package/lib/{auctionSubscriber → node/orderSubscriber}/index.js +1 -1
  331. package/lib/node/orderSubscriber/types.d.ts +34 -0
  332. package/lib/node/orderSubscriber/types.js +2 -0
  333. package/lib/node/phoenix/phoenixFulfillmentConfigMap.d.ts +10 -0
  334. package/lib/node/phoenix/phoenixFulfillmentConfigMap.js +17 -0
  335. package/lib/node/phoenix/phoenixSubscriber.d.ts +41 -0
  336. package/lib/node/phoenix/phoenixSubscriber.js +152 -0
  337. package/lib/node/priorityFee/averageOverSlotsStrategy.d.ts +5 -0
  338. package/lib/node/priorityFee/averageOverSlotsStrategy.js +16 -0
  339. package/lib/node/priorityFee/averageStrategy.d.ts +5 -0
  340. package/lib/node/priorityFee/averageStrategy.js +11 -0
  341. package/lib/node/priorityFee/driftPriorityFeeMethod.d.ts +13 -0
  342. package/lib/node/priorityFee/driftPriorityFeeMethod.js +26 -0
  343. package/lib/node/priorityFee/ewmaStrategy.d.ts +11 -0
  344. package/lib/node/priorityFee/ewmaStrategy.js +33 -0
  345. package/lib/node/priorityFee/heliusPriorityFeeMethod.d.ts +20 -0
  346. package/lib/node/priorityFee/heliusPriorityFeeMethod.js +46 -0
  347. package/lib/node/priorityFee/index.d.ts +11 -0
  348. package/lib/node/priorityFee/index.js +27 -0
  349. package/lib/node/priorityFee/maxOverSlotsStrategy.d.ts +5 -0
  350. package/lib/node/priorityFee/maxOverSlotsStrategy.js +17 -0
  351. package/lib/node/priorityFee/maxStrategy.d.ts +7 -0
  352. package/lib/node/priorityFee/maxStrategy.js +9 -0
  353. package/lib/node/priorityFee/priorityFeeSubscriber.d.ts +46 -0
  354. package/lib/node/priorityFee/priorityFeeSubscriber.js +188 -0
  355. package/lib/node/priorityFee/priorityFeeSubscriberMap.d.ts +48 -0
  356. package/lib/node/priorityFee/priorityFeeSubscriberMap.js +88 -0
  357. package/lib/node/priorityFee/solanaPriorityFeeMethod.d.ts +6 -0
  358. package/lib/node/priorityFee/solanaPriorityFeeMethod.js +21 -0
  359. package/lib/node/priorityFee/types.d.ts +31 -0
  360. package/lib/node/priorityFee/types.js +10 -0
  361. package/lib/node/serum/serumFulfillmentConfigMap.d.ts +10 -0
  362. package/lib/node/serum/serumFulfillmentConfigMap.js +17 -0
  363. package/lib/node/serum/serumSubscriber.d.ts +32 -0
  364. package/lib/node/serum/serumSubscriber.js +107 -0
  365. package/lib/node/serum/types.d.ts +13 -0
  366. package/lib/node/serum/types.js +2 -0
  367. package/lib/node/slot/SlotSubscriber.d.ts +27 -0
  368. package/lib/node/slot/SlotSubscriber.js +71 -0
  369. package/lib/node/testClient.d.ts +8 -0
  370. package/lib/node/testClient.js +23 -0
  371. package/lib/node/token/index.d.ts +5 -0
  372. package/lib/node/token/index.js +15 -0
  373. package/lib/node/tokenFaucet.d.ts +41 -0
  374. package/lib/node/tokenFaucet.js +188 -0
  375. package/lib/node/tx/baseTxSender.d.ts +57 -0
  376. package/lib/node/tx/baseTxSender.js +293 -0
  377. package/lib/node/tx/blockhashFetcher/baseBlockhashFetcher.d.ts +8 -0
  378. package/lib/node/tx/blockhashFetcher/baseBlockhashFetcher.js +13 -0
  379. package/lib/node/tx/blockhashFetcher/cachedBlockhashFetcher.d.ts +28 -0
  380. package/lib/node/tx/blockhashFetcher/cachedBlockhashFetcher.js +73 -0
  381. package/lib/node/tx/blockhashFetcher/types.d.ts +4 -0
  382. package/lib/node/tx/blockhashFetcher/types.js +2 -0
  383. package/lib/node/tx/fastSingleTxSender.d.ts +41 -0
  384. package/lib/node/tx/fastSingleTxSender.js +86 -0
  385. package/lib/node/tx/forwardOnlyTxSender.d.ts +37 -0
  386. package/lib/node/tx/forwardOnlyTxSender.js +92 -0
  387. package/lib/node/tx/priorityFeeCalculator.d.ts +44 -0
  388. package/lib/node/tx/priorityFeeCalculator.js +85 -0
  389. package/lib/node/tx/reportTransactionError.d.ts +20 -0
  390. package/lib/node/tx/reportTransactionError.js +103 -0
  391. package/lib/node/tx/retryTxSender.d.ts +37 -0
  392. package/lib/node/tx/retryTxSender.js +86 -0
  393. package/lib/node/tx/txHandler.d.ts +154 -0
  394. package/lib/node/tx/txHandler.js +453 -0
  395. package/lib/node/tx/txParamProcessor.d.ts +25 -0
  396. package/lib/node/tx/txParamProcessor.js +88 -0
  397. package/lib/node/tx/types.d.ts +29 -0
  398. package/lib/node/tx/types.js +20 -0
  399. package/lib/node/tx/utils.d.ts +2 -0
  400. package/lib/node/tx/utils.js +10 -0
  401. package/lib/node/tx/whileValidTxSender.d.ts +44 -0
  402. package/lib/node/tx/whileValidTxSender.js +166 -0
  403. package/lib/node/types.d.ts +1351 -0
  404. package/lib/node/types.js +347 -0
  405. package/lib/node/user.d.ts +411 -0
  406. package/lib/node/user.js +2161 -0
  407. package/lib/node/userConfig.d.ts +26 -0
  408. package/lib/node/userConfig.js +2 -0
  409. package/lib/node/userMap/PollingSubscription.d.ts +16 -0
  410. package/lib/node/userMap/PollingSubscription.js +30 -0
  411. package/lib/node/userMap/WebsocketSubscription.d.ts +25 -0
  412. package/lib/node/userMap/WebsocketSubscription.js +41 -0
  413. package/lib/node/userMap/grpcSubscription.d.ts +24 -0
  414. package/lib/node/userMap/grpcSubscription.js +40 -0
  415. package/lib/node/userMap/userMap.d.ts +88 -0
  416. package/lib/node/userMap/userMap.js +455 -0
  417. package/lib/node/userMap/userMapConfig.d.ts +37 -0
  418. package/lib/node/userMap/userMapConfig.js +2 -0
  419. package/lib/node/userMap/userStatsMap.d.ts +46 -0
  420. package/lib/node/userMap/userStatsMap.js +165 -0
  421. package/lib/node/userName.d.ts +5 -0
  422. package/lib/node/userName.js +21 -0
  423. package/lib/node/userStats.d.ts +19 -0
  424. package/lib/node/userStats.js +65 -0
  425. package/lib/node/userStatsConfig.d.ts +25 -0
  426. package/lib/node/userStatsConfig.js +2 -0
  427. package/lib/node/util/TransactionConfirmationManager.d.ts +16 -0
  428. package/lib/node/util/TransactionConfirmationManager.js +174 -0
  429. package/lib/node/util/chainClock.d.ts +17 -0
  430. package/lib/node/util/chainClock.js +29 -0
  431. package/lib/node/util/computeUnits.d.ts +8 -0
  432. package/lib/node/util/computeUnits.js +46 -0
  433. package/lib/node/util/promiseTimeout.d.ts +1 -0
  434. package/lib/node/util/promiseTimeout.js +14 -0
  435. package/lib/node/util/pythPullOracleUtils.d.ts +2 -0
  436. package/lib/node/util/pythPullOracleUtils.js +15 -0
  437. package/lib/node/util/tps.d.ts +2 -0
  438. package/lib/node/util/tps.js +16 -0
  439. package/lib/node/wallet.d.ts +11 -0
  440. package/lib/node/wallet.js +32 -0
  441. package/package.json +8 -4
  442. package/scripts/postbuild.js +61 -0
  443. package/src/accounts/grpcAccountSubscriber.ts +160 -0
  444. package/src/accounts/grpcDriftClientAccountSubscriber.ts +197 -0
  445. package/src/accounts/grpcInsuranceFundStakeAccountSubscriber.ts +56 -0
  446. package/src/accounts/grpcProgramAccountSubscriber.ts +190 -0
  447. package/src/accounts/grpcUserAccountSubscriber.ts +48 -0
  448. package/src/accounts/grpcUserStatsAccountSubscriber.ts +50 -0
  449. package/src/accounts/types.ts +8 -0
  450. package/src/accounts/webSocketAccountSubscriber.ts +1 -1
  451. package/src/accounts/webSocketDriftClientAccountSubscriber.ts +3 -3
  452. package/src/accounts/webSocketProgramAccountSubscriber.ts +1 -1
  453. package/src/addresses/pda.ts +13 -0
  454. package/src/auctionSubscriber/auctionSubscriberGrpc.ts +70 -0
  455. package/src/auctionSubscriber/index.ts +1 -0
  456. package/src/auctionSubscriber/types.ts +2 -0
  457. package/src/config.ts +1 -1
  458. package/src/constants/perpMarkets.ts +26 -4
  459. package/src/constants/spotMarkets.ts +6 -6
  460. package/src/decode/user.ts +11 -1
  461. package/src/driftClient.ts +243 -29
  462. package/src/driftClientConfig.ts +7 -1
  463. package/src/idl/drift.json +281 -4
  464. package/src/idl/switchboard_on_demand_30.json +195 -37
  465. package/src/index.ts +8 -0
  466. package/src/isomorphic/README.md +19 -0
  467. package/src/isomorphic/grpc.browser.ts +4 -0
  468. package/src/isomorphic/grpc.node.ts +23 -0
  469. package/src/isomorphic/grpc.ts +1 -0
  470. package/src/math/auction.ts +7 -6
  471. package/src/math/margin.ts +15 -11
  472. package/src/math/position.ts +44 -2
  473. package/src/oracles/pythClient.ts +1 -5
  474. package/src/orderSubscriber/OrderSubscriber.ts +14 -11
  475. package/src/orderSubscriber/grpcSubscription.ts +121 -0
  476. package/src/orderSubscriber/types.ts +10 -0
  477. package/src/tx/baseTxSender.ts +21 -13
  478. package/src/tx/fastSingleTxSender.ts +6 -3
  479. package/src/tx/forwardOnlyTxSender.ts +4 -1
  480. package/src/tx/retryTxSender.ts +5 -2
  481. package/src/tx/whileValidTxSender.ts +5 -2
  482. package/src/types.ts +35 -1
  483. package/src/user.ts +24 -7
  484. package/src/userConfig.ts +7 -1
  485. package/src/userMap/grpcSubscription.ts +78 -0
  486. package/src/userMap/userMap.ts +21 -2
  487. package/src/userMap/userMapConfig.ts +7 -0
  488. package/src/userStats.ts +11 -0
  489. package/src/userStatsConfig.ts +7 -0
  490. package/tsconfig.browser.json +13 -0
  491. package/tsconfig.json +1 -1
  492. /package/lib/{accounts → browser/accounts}/basicUserAccountSubscriber.d.ts +0 -0
  493. /package/lib/{accounts → browser/accounts}/basicUserAccountSubscriber.js +0 -0
  494. /package/lib/{accounts → browser/accounts}/bulkAccountLoader.js +0 -0
  495. /package/lib/{accounts → browser/accounts}/bulkUserStatsSubscription.d.ts +0 -0
  496. /package/lib/{accounts → browser/accounts}/bulkUserStatsSubscription.js +0 -0
  497. /package/lib/{accounts → browser/accounts}/bulkUserSubscription.d.ts +0 -0
  498. /package/lib/{accounts → browser/accounts}/bulkUserSubscription.js +0 -0
  499. /package/lib/{accounts → browser/accounts}/fetch.d.ts +0 -0
  500. /package/lib/{accounts → browser/accounts}/fetch.js +0 -0
  501. /package/lib/{accounts → browser/accounts}/oneShotUserAccountSubscriber.d.ts +0 -0
  502. /package/lib/{accounts → browser/accounts}/oneShotUserAccountSubscriber.js +0 -0
  503. /package/lib/{accounts → browser/accounts}/pollingDriftClientAccountSubscriber.d.ts +0 -0
  504. /package/lib/{accounts → browser/accounts}/pollingDriftClientAccountSubscriber.js +0 -0
  505. /package/lib/{accounts → browser/accounts}/pollingInsuranceFundStakeAccountSubscriber.d.ts +0 -0
  506. /package/lib/{accounts → browser/accounts}/pollingInsuranceFundStakeAccountSubscriber.js +0 -0
  507. /package/lib/{accounts → browser/accounts}/pollingOracleAccountSubscriber.d.ts +0 -0
  508. /package/lib/{accounts → browser/accounts}/pollingOracleAccountSubscriber.js +0 -0
  509. /package/lib/{accounts → browser/accounts}/pollingTokenAccountSubscriber.d.ts +0 -0
  510. /package/lib/{accounts → browser/accounts}/pollingTokenAccountSubscriber.js +0 -0
  511. /package/lib/{accounts → browser/accounts}/pollingUserAccountSubscriber.d.ts +0 -0
  512. /package/lib/{accounts → browser/accounts}/pollingUserAccountSubscriber.js +0 -0
  513. /package/lib/{accounts → browser/accounts}/pollingUserStatsAccountSubscriber.d.ts +0 -0
  514. /package/lib/{accounts → browser/accounts}/pollingUserStatsAccountSubscriber.js +0 -0
  515. /package/lib/{accounts → browser/accounts}/testBulkAccountLoader.d.ts +0 -0
  516. /package/lib/{accounts → browser/accounts}/testBulkAccountLoader.js +0 -0
  517. /package/lib/{accounts → browser/accounts}/types.js +0 -0
  518. /package/lib/{accounts → browser/accounts}/utils.d.ts +0 -0
  519. /package/lib/{accounts → browser/accounts}/utils.js +0 -0
  520. /package/lib/{accounts → browser/accounts}/webSocketAccountSubscriber.js +0 -0
  521. /package/lib/{accounts → browser/accounts}/webSocketDriftClientAccountSubscriber.js +0 -0
  522. /package/lib/{accounts → browser/accounts}/webSocketInsuranceFundStakeAccountSubscriber.d.ts +0 -0
  523. /package/lib/{accounts → browser/accounts}/webSocketInsuranceFundStakeAccountSubscriber.js +0 -0
  524. /package/lib/{accounts → browser/accounts}/webSocketProgramAccountSubscriber.js +0 -0
  525. /package/lib/{accounts → browser/accounts}/webSocketUserAccountSubscriber.d.ts +0 -0
  526. /package/lib/{accounts → browser/accounts}/webSocketUserAccountSubscriber.js +0 -0
  527. /package/lib/{accounts → browser/accounts}/webSocketUserStatsAccountSubsriber.d.ts +0 -0
  528. /package/lib/{accounts → browser/accounts}/webSocketUserStatsAccountSubsriber.js +0 -0
  529. /package/lib/{addresses → browser/addresses}/marketAddresses.d.ts +0 -0
  530. /package/lib/{addresses → browser/addresses}/marketAddresses.js +0 -0
  531. /package/lib/{adminClient.d.ts → browser/adminClient.d.ts} +0 -0
  532. /package/lib/{adminClient.js → browser/adminClient.js} +0 -0
  533. /package/lib/{assert → browser/assert}/assert.d.ts +0 -0
  534. /package/lib/{assert → browser/assert}/assert.js +0 -0
  535. /package/lib/{auctionSubscriber → browser/auctionSubscriber}/auctionSubscriber.d.ts +0 -0
  536. /package/lib/{auctionSubscriber → browser/auctionSubscriber}/auctionSubscriber.js +0 -0
  537. /package/lib/{auctionSubscriber → browser/auctionSubscriber}/types.js +0 -0
  538. /package/lib/{bankrun → browser/bankrun}/bankrunConnection.js +0 -0
  539. /package/lib/{blockhashSubscriber → browser/blockhashSubscriber}/BlockhashSubscriber.d.ts +0 -0
  540. /package/lib/{blockhashSubscriber → browser/blockhashSubscriber}/BlockhashSubscriber.js +0 -0
  541. /package/lib/{blockhashSubscriber → browser/blockhashSubscriber}/index.d.ts +0 -0
  542. /package/lib/{blockhashSubscriber → browser/blockhashSubscriber}/index.js +0 -0
  543. /package/lib/{blockhashSubscriber → browser/blockhashSubscriber}/types.d.ts +0 -0
  544. /package/lib/{blockhashSubscriber → browser/blockhashSubscriber}/types.js +0 -0
  545. /package/lib/{clock → browser/clock}/clockSubscriber.d.ts +0 -0
  546. /package/lib/{clock → browser/clock}/clockSubscriber.js +0 -0
  547. /package/lib/{config.d.ts → browser/config.d.ts} +0 -0
  548. /package/lib/{constants → browser/constants}/numericConstants.d.ts +0 -0
  549. /package/lib/{constants → browser/constants}/numericConstants.js +0 -0
  550. /package/lib/{constants → browser/constants}/perpMarkets.d.ts +0 -0
  551. /package/lib/{constants → browser/constants}/spotMarkets.d.ts +0 -0
  552. /package/lib/{constants → browser/constants}/txConstants.d.ts +0 -0
  553. /package/lib/{constants → browser/constants}/txConstants.js +0 -0
  554. /package/lib/{decode → browser/decode}/phoenix.js +0 -0
  555. /package/lib/{dlob → browser/dlob}/DLOB.d.ts +0 -0
  556. /package/lib/{dlob → browser/dlob}/DLOB.js +0 -0
  557. /package/lib/{dlob → browser/dlob}/DLOBApiClient.d.ts +0 -0
  558. /package/lib/{dlob → browser/dlob}/DLOBApiClient.js +0 -0
  559. /package/lib/{dlob → browser/dlob}/DLOBNode.d.ts +0 -0
  560. /package/lib/{dlob → browser/dlob}/DLOBNode.js +0 -0
  561. /package/lib/{dlob → browser/dlob}/DLOBOrders.js +0 -0
  562. /package/lib/{dlob → browser/dlob}/DLOBSubscriber.d.ts +0 -0
  563. /package/lib/{dlob → browser/dlob}/DLOBSubscriber.js +0 -0
  564. /package/lib/{dlob → browser/dlob}/NodeList.d.ts +0 -0
  565. /package/lib/{dlob → browser/dlob}/NodeList.js +0 -0
  566. /package/lib/{dlob → browser/dlob}/dlobIdl.json +0 -0
  567. /package/lib/{dlob → browser/dlob}/orderBookLevels.d.ts +0 -0
  568. /package/lib/{dlob → browser/dlob}/orderBookLevels.js +0 -0
  569. /package/lib/{dlob → browser/dlob}/types.d.ts +0 -0
  570. /package/lib/{dlob → browser/dlob}/types.js +0 -0
  571. /package/lib/{driftClientConfig.js → browser/driftClientConfig.js} +0 -0
  572. /package/lib/{events → browser/events}/eventList.d.ts +0 -0
  573. /package/lib/{events → browser/events}/eventList.js +0 -0
  574. /package/lib/{events → browser/events}/eventSubscriber.d.ts +0 -0
  575. /package/lib/{events → browser/events}/eventSubscriber.js +0 -0
  576. /package/lib/{events → browser/events}/eventsServerLogProvider.d.ts +0 -0
  577. /package/lib/{events → browser/events}/eventsServerLogProvider.js +0 -0
  578. /package/lib/{events → browser/events}/fetchLogs.d.ts +0 -0
  579. /package/lib/{events → browser/events}/fetchLogs.js +0 -0
  580. /package/lib/{events → browser/events}/parse.d.ts +0 -0
  581. /package/lib/{events → browser/events}/parse.js +0 -0
  582. /package/lib/{events → browser/events}/pollingLogProvider.d.ts +0 -0
  583. /package/lib/{events → browser/events}/pollingLogProvider.js +0 -0
  584. /package/lib/{events → browser/events}/sort.d.ts +0 -0
  585. /package/lib/{events → browser/events}/sort.js +0 -0
  586. /package/lib/{events → browser/events}/txEventCache.d.ts +0 -0
  587. /package/lib/{events → browser/events}/txEventCache.js +0 -0
  588. /package/lib/{events → browser/events}/types.d.ts +0 -0
  589. /package/lib/{events → browser/events}/types.js +0 -0
  590. /package/lib/{events → browser/events}/webSocketLogProvider.d.ts +0 -0
  591. /package/lib/{events → browser/events}/webSocketLogProvider.js +0 -0
  592. /package/lib/{factory → browser/factory}/bigNum.d.ts +0 -0
  593. /package/lib/{factory → browser/factory}/bigNum.js +0 -0
  594. /package/lib/{factory → browser/factory}/oracleClient.d.ts +0 -0
  595. /package/lib/{factory → browser/factory}/oracleClient.js +0 -0
  596. /package/lib/{idl → browser/idl}/openbook.json +0 -0
  597. /package/lib/{idl → browser/idl}/pyth_solana_receiver.json +0 -0
  598. /package/lib/{idl → browser/idl}/switchboard.json +0 -0
  599. /package/lib/{idl → browser/idl}/token_faucet.json +0 -0
  600. /package/lib/{jupiter → browser/jupiter}/jupiterClient.d.ts +0 -0
  601. /package/lib/{jupiter → browser/jupiter}/jupiterClient.js +0 -0
  602. /package/lib/{keypair.d.ts → browser/keypair.d.ts} +0 -0
  603. /package/lib/{keypair.js → browser/keypair.js} +0 -0
  604. /package/lib/{marinade → browser/marinade}/index.d.ts +0 -0
  605. /package/lib/{marinade → browser/marinade}/index.js +0 -0
  606. /package/lib/{marinade → browser/marinade}/types.d.ts +0 -0
  607. /package/lib/{marinade → browser/marinade}/types.js +0 -0
  608. /package/lib/{math → browser/math}/amm.d.ts +0 -0
  609. /package/lib/{math → browser/math}/amm.js +0 -0
  610. /package/lib/{math → browser/math}/auction.d.ts +0 -0
  611. /package/lib/{math → browser/math}/bankruptcy.d.ts +0 -0
  612. /package/lib/{math → browser/math}/bankruptcy.js +0 -0
  613. /package/lib/{math → browser/math}/conversion.d.ts +0 -0
  614. /package/lib/{math → browser/math}/conversion.js +0 -0
  615. /package/lib/{math → browser/math}/exchangeStatus.d.ts +0 -0
  616. /package/lib/{math → browser/math}/exchangeStatus.js +0 -0
  617. /package/lib/{math → browser/math}/fuel.d.ts +0 -0
  618. /package/lib/{math → browser/math}/fuel.js +0 -0
  619. /package/lib/{math → browser/math}/funding.d.ts +0 -0
  620. /package/lib/{math → browser/math}/funding.js +0 -0
  621. /package/lib/{math → browser/math}/insurance.d.ts +0 -0
  622. /package/lib/{math → browser/math}/insurance.js +0 -0
  623. /package/lib/{math → browser/math}/market.d.ts +0 -0
  624. /package/lib/{math → browser/math}/market.js +0 -0
  625. /package/lib/{math → browser/math}/oracles.js +0 -0
  626. /package/lib/{math → browser/math}/orders.d.ts +0 -0
  627. /package/lib/{math → browser/math}/orders.js +0 -0
  628. /package/lib/{math → browser/math}/repeg.d.ts +0 -0
  629. /package/lib/{math → browser/math}/repeg.js +0 -0
  630. /package/lib/{math → browser/math}/spotBalance.d.ts +0 -0
  631. /package/lib/{math → browser/math}/spotBalance.js +0 -0
  632. /package/lib/{math → browser/math}/spotMarket.d.ts +0 -0
  633. /package/lib/{math → browser/math}/spotMarket.js +0 -0
  634. /package/lib/{math → browser/math}/spotPosition.d.ts +0 -0
  635. /package/lib/{math → browser/math}/spotPosition.js +0 -0
  636. /package/lib/{math → browser/math}/state.d.ts +0 -0
  637. /package/lib/{math → browser/math}/state.js +0 -0
  638. /package/lib/{math → browser/math}/superStake.d.ts +0 -0
  639. /package/lib/{math → browser/math}/superStake.js +0 -0
  640. /package/lib/{math → browser/math}/tiers.d.ts +0 -0
  641. /package/lib/{math → browser/math}/tiers.js +0 -0
  642. /package/lib/{math → browser/math}/trade.d.ts +0 -0
  643. /package/lib/{math → browser/math}/trade.js +0 -0
  644. /package/lib/{math → browser/math}/utils.d.ts +0 -0
  645. /package/lib/{math → browser/math}/utils.js +0 -0
  646. /package/lib/{memcmp.d.ts → browser/memcmp.d.ts} +0 -0
  647. /package/lib/{memcmp.js → browser/memcmp.js} +0 -0
  648. /package/lib/{openbook → browser/openbook}/openbookV2FulfillmentConfigMap.d.ts +0 -0
  649. /package/lib/{openbook → browser/openbook}/openbookV2FulfillmentConfigMap.js +0 -0
  650. /package/lib/{openbook → browser/openbook}/openbookV2Subscriber.d.ts +0 -0
  651. /package/lib/{openbook → browser/openbook}/openbookV2Subscriber.js +0 -0
  652. /package/lib/{oracles → browser/oracles}/oracleClientCache.d.ts +0 -0
  653. /package/lib/{oracles → browser/oracles}/oracleClientCache.js +0 -0
  654. /package/lib/{oracles → browser/oracles}/prelaunchOracleClient.js +0 -0
  655. /package/lib/{oracles → browser/oracles}/pythPullClient.js +0 -0
  656. /package/lib/{oracles → browser/oracles}/quoteAssetOracleClient.js +0 -0
  657. /package/lib/{oracles → browser/oracles}/strictOraclePrice.d.ts +0 -0
  658. /package/lib/{oracles → browser/oracles}/strictOraclePrice.js +0 -0
  659. /package/lib/{oracles → browser/oracles}/switchboardClient.js +0 -0
  660. /package/lib/{oracles → browser/oracles}/switchboardOnDemandClient.js +0 -0
  661. /package/lib/{oracles → browser/oracles}/types.js +0 -0
  662. /package/lib/{orderParams.d.ts → browser/orderParams.d.ts} +0 -0
  663. /package/lib/{orderParams.js → browser/orderParams.js} +0 -0
  664. /package/lib/{orderSubscriber → browser/orderSubscriber}/PollingSubscription.d.ts +0 -0
  665. /package/lib/{orderSubscriber → browser/orderSubscriber}/PollingSubscription.js +0 -0
  666. /package/lib/{orderSubscriber → browser/orderSubscriber}/WebsocketSubscription.d.ts +0 -0
  667. /package/lib/{orderSubscriber → browser/orderSubscriber}/WebsocketSubscription.js +0 -0
  668. /package/lib/{orderSubscriber → browser/orderSubscriber}/index.d.ts +0 -0
  669. /package/lib/{orderSubscriber → browser/orderSubscriber}/index.js +0 -0
  670. /package/lib/{orderSubscriber → browser/orderSubscriber}/types.js +0 -0
  671. /package/lib/{phoenix → browser/phoenix}/phoenixFulfillmentConfigMap.d.ts +0 -0
  672. /package/lib/{phoenix → browser/phoenix}/phoenixFulfillmentConfigMap.js +0 -0
  673. /package/lib/{phoenix → browser/phoenix}/phoenixSubscriber.d.ts +0 -0
  674. /package/lib/{phoenix → browser/phoenix}/phoenixSubscriber.js +0 -0
  675. /package/lib/{priorityFee → browser/priorityFee}/averageOverSlotsStrategy.d.ts +0 -0
  676. /package/lib/{priorityFee → browser/priorityFee}/averageOverSlotsStrategy.js +0 -0
  677. /package/lib/{priorityFee → browser/priorityFee}/averageStrategy.d.ts +0 -0
  678. /package/lib/{priorityFee → browser/priorityFee}/averageStrategy.js +0 -0
  679. /package/lib/{priorityFee → browser/priorityFee}/driftPriorityFeeMethod.d.ts +0 -0
  680. /package/lib/{priorityFee → browser/priorityFee}/driftPriorityFeeMethod.js +0 -0
  681. /package/lib/{priorityFee → browser/priorityFee}/ewmaStrategy.d.ts +0 -0
  682. /package/lib/{priorityFee → browser/priorityFee}/ewmaStrategy.js +0 -0
  683. /package/lib/{priorityFee → browser/priorityFee}/heliusPriorityFeeMethod.d.ts +0 -0
  684. /package/lib/{priorityFee → browser/priorityFee}/heliusPriorityFeeMethod.js +0 -0
  685. /package/lib/{priorityFee → browser/priorityFee}/index.d.ts +0 -0
  686. /package/lib/{priorityFee → browser/priorityFee}/index.js +0 -0
  687. /package/lib/{priorityFee → browser/priorityFee}/maxOverSlotsStrategy.d.ts +0 -0
  688. /package/lib/{priorityFee → browser/priorityFee}/maxOverSlotsStrategy.js +0 -0
  689. /package/lib/{priorityFee → browser/priorityFee}/maxStrategy.d.ts +0 -0
  690. /package/lib/{priorityFee → browser/priorityFee}/maxStrategy.js +0 -0
  691. /package/lib/{priorityFee → browser/priorityFee}/priorityFeeSubscriber.d.ts +0 -0
  692. /package/lib/{priorityFee → browser/priorityFee}/priorityFeeSubscriber.js +0 -0
  693. /package/lib/{priorityFee → browser/priorityFee}/priorityFeeSubscriberMap.d.ts +0 -0
  694. /package/lib/{priorityFee → browser/priorityFee}/priorityFeeSubscriberMap.js +0 -0
  695. /package/lib/{priorityFee → browser/priorityFee}/solanaPriorityFeeMethod.d.ts +0 -0
  696. /package/lib/{priorityFee → browser/priorityFee}/solanaPriorityFeeMethod.js +0 -0
  697. /package/lib/{priorityFee → browser/priorityFee}/types.d.ts +0 -0
  698. /package/lib/{priorityFee → browser/priorityFee}/types.js +0 -0
  699. /package/lib/{serum → browser/serum}/serumFulfillmentConfigMap.d.ts +0 -0
  700. /package/lib/{serum → browser/serum}/serumFulfillmentConfigMap.js +0 -0
  701. /package/lib/{serum → browser/serum}/serumSubscriber.d.ts +0 -0
  702. /package/lib/{serum → browser/serum}/serumSubscriber.js +0 -0
  703. /package/lib/{serum → browser/serum}/types.d.ts +0 -0
  704. /package/lib/{serum → browser/serum}/types.js +0 -0
  705. /package/lib/{slot → browser/slot}/SlotSubscriber.d.ts +0 -0
  706. /package/lib/{slot → browser/slot}/SlotSubscriber.js +0 -0
  707. /package/lib/{testClient.d.ts → browser/testClient.d.ts} +0 -0
  708. /package/lib/{testClient.js → browser/testClient.js} +0 -0
  709. /package/lib/{token → browser/token}/index.js +0 -0
  710. /package/lib/{tokenFaucet.d.ts → browser/tokenFaucet.d.ts} +0 -0
  711. /package/lib/{tokenFaucet.js → browser/tokenFaucet.js} +0 -0
  712. /package/lib/{tx → browser/tx}/blockhashFetcher/baseBlockhashFetcher.d.ts +0 -0
  713. /package/lib/{tx → browser/tx}/blockhashFetcher/baseBlockhashFetcher.js +0 -0
  714. /package/lib/{tx → browser/tx}/blockhashFetcher/cachedBlockhashFetcher.d.ts +0 -0
  715. /package/lib/{tx → browser/tx}/blockhashFetcher/cachedBlockhashFetcher.js +0 -0
  716. /package/lib/{tx → browser/tx}/blockhashFetcher/types.d.ts +0 -0
  717. /package/lib/{tx → browser/tx}/blockhashFetcher/types.js +0 -0
  718. /package/lib/{tx → browser/tx}/priorityFeeCalculator.d.ts +0 -0
  719. /package/lib/{tx → browser/tx}/priorityFeeCalculator.js +0 -0
  720. /package/lib/{tx → browser/tx}/reportTransactionError.d.ts +0 -0
  721. /package/lib/{tx → browser/tx}/reportTransactionError.js +0 -0
  722. /package/lib/{tx → browser/tx}/txHandler.d.ts +0 -0
  723. /package/lib/{tx → browser/tx}/txHandler.js +0 -0
  724. /package/lib/{tx → browser/tx}/txParamProcessor.d.ts +0 -0
  725. /package/lib/{tx → browser/tx}/txParamProcessor.js +0 -0
  726. /package/lib/{tx → browser/tx}/types.js +0 -0
  727. /package/lib/{tx → browser/tx}/utils.d.ts +0 -0
  728. /package/lib/{tx → browser/tx}/utils.js +0 -0
  729. /package/lib/{userConfig.js → browser/userConfig.js} +0 -0
  730. /package/lib/{userMap → browser/userMap}/PollingSubscription.d.ts +0 -0
  731. /package/lib/{userMap → browser/userMap}/PollingSubscription.js +0 -0
  732. /package/lib/{userMap → browser/userMap}/WebsocketSubscription.js +0 -0
  733. /package/lib/{userMap → browser/userMap}/userMap.d.ts +0 -0
  734. /package/lib/{userMap → browser/userMap}/userMapConfig.js +0 -0
  735. /package/lib/{userMap → browser/userMap}/userStatsMap.d.ts +0 -0
  736. /package/lib/{userMap → browser/userMap}/userStatsMap.js +0 -0
  737. /package/lib/{userName.d.ts → browser/userName.d.ts} +0 -0
  738. /package/lib/{userName.js → browser/userName.js} +0 -0
  739. /package/lib/{userStats.d.ts → browser/userStats.d.ts} +0 -0
  740. /package/lib/{userStatsConfig.js → browser/userStatsConfig.js} +0 -0
  741. /package/lib/{util → browser/util}/TransactionConfirmationManager.d.ts +0 -0
  742. /package/lib/{util → browser/util}/TransactionConfirmationManager.js +0 -0
  743. /package/lib/{util → browser/util}/chainClock.d.ts +0 -0
  744. /package/lib/{util → browser/util}/chainClock.js +0 -0
  745. /package/lib/{util → browser/util}/computeUnits.d.ts +0 -0
  746. /package/lib/{util → browser/util}/computeUnits.js +0 -0
  747. /package/lib/{util → browser/util}/promiseTimeout.d.ts +0 -0
  748. /package/lib/{util → browser/util}/promiseTimeout.js +0 -0
  749. /package/lib/{util → browser/util}/pythPullOracleUtils.d.ts +0 -0
  750. /package/lib/{util → browser/util}/pythPullOracleUtils.js +0 -0
  751. /package/lib/{util → browser/util}/tps.d.ts +0 -0
  752. /package/lib/{util → browser/util}/tps.js +0 -0
  753. /package/lib/{wallet.d.ts → browser/wallet.d.ts} +0 -0
  754. /package/lib/{wallet.js → browser/wallet.js} +0 -0
@@ -0,0 +1,1963 @@
1
+ export type MarinadeFinance = {
2
+ version: '0.1.0';
3
+ name: 'marinade_finance';
4
+ instructions: [
5
+ {
6
+ name: 'initialize';
7
+ accounts: [
8
+ {
9
+ name: 'creatorAuthority';
10
+ isMut: false;
11
+ isSigner: true;
12
+ },
13
+ {
14
+ name: 'state';
15
+ isMut: true;
16
+ isSigner: false;
17
+ },
18
+ {
19
+ name: 'reservePda';
20
+ isMut: false;
21
+ isSigner: false;
22
+ },
23
+ {
24
+ name: 'stakeList';
25
+ isMut: true;
26
+ isSigner: false;
27
+ },
28
+ {
29
+ name: 'validatorList';
30
+ isMut: true;
31
+ isSigner: false;
32
+ },
33
+ {
34
+ name: 'msolMint';
35
+ isMut: false;
36
+ isSigner: false;
37
+ },
38
+ {
39
+ name: 'operationalSolAccount';
40
+ isMut: false;
41
+ isSigner: false;
42
+ },
43
+ {
44
+ name: 'liqPool';
45
+ accounts: [
46
+ {
47
+ name: 'lpMint';
48
+ isMut: false;
49
+ isSigner: false;
50
+ },
51
+ {
52
+ name: 'solLegPda';
53
+ isMut: false;
54
+ isSigner: false;
55
+ },
56
+ {
57
+ name: 'msolLeg';
58
+ isMut: false;
59
+ isSigner: false;
60
+ }
61
+ ];
62
+ },
63
+ {
64
+ name: 'treasuryMsolAccount';
65
+ isMut: false;
66
+ isSigner: false;
67
+ },
68
+ {
69
+ name: 'clock';
70
+ isMut: false;
71
+ isSigner: false;
72
+ },
73
+ {
74
+ name: 'rent';
75
+ isMut: false;
76
+ isSigner: false;
77
+ }
78
+ ];
79
+ args: [
80
+ {
81
+ name: 'data';
82
+ type: {
83
+ defined: 'InitializeData';
84
+ };
85
+ }
86
+ ];
87
+ },
88
+ {
89
+ name: 'changeAuthority';
90
+ accounts: [
91
+ {
92
+ name: 'state';
93
+ isMut: true;
94
+ isSigner: false;
95
+ },
96
+ {
97
+ name: 'adminAuthority';
98
+ isMut: false;
99
+ isSigner: true;
100
+ }
101
+ ];
102
+ args: [
103
+ {
104
+ name: 'data';
105
+ type: {
106
+ defined: 'ChangeAuthorityData';
107
+ };
108
+ }
109
+ ];
110
+ },
111
+ {
112
+ name: 'addValidator';
113
+ accounts: [
114
+ {
115
+ name: 'state';
116
+ isMut: true;
117
+ isSigner: false;
118
+ },
119
+ {
120
+ name: 'managerAuthority';
121
+ isMut: false;
122
+ isSigner: true;
123
+ },
124
+ {
125
+ name: 'validatorList';
126
+ isMut: true;
127
+ isSigner: false;
128
+ },
129
+ {
130
+ name: 'validatorVote';
131
+ isMut: false;
132
+ isSigner: false;
133
+ },
134
+ {
135
+ name: 'duplicationFlag';
136
+ isMut: true;
137
+ isSigner: false;
138
+ },
139
+ {
140
+ name: 'rentPayer';
141
+ isMut: true;
142
+ isSigner: true;
143
+ },
144
+ {
145
+ name: 'clock';
146
+ isMut: false;
147
+ isSigner: false;
148
+ },
149
+ {
150
+ name: 'rent';
151
+ isMut: false;
152
+ isSigner: false;
153
+ },
154
+ {
155
+ name: 'systemProgram';
156
+ isMut: false;
157
+ isSigner: false;
158
+ }
159
+ ];
160
+ args: [
161
+ {
162
+ name: 'score';
163
+ type: 'u32';
164
+ }
165
+ ];
166
+ },
167
+ {
168
+ name: 'removeValidator';
169
+ accounts: [
170
+ {
171
+ name: 'state';
172
+ isMut: true;
173
+ isSigner: false;
174
+ },
175
+ {
176
+ name: 'managerAuthority';
177
+ isMut: false;
178
+ isSigner: true;
179
+ },
180
+ {
181
+ name: 'validatorList';
182
+ isMut: true;
183
+ isSigner: false;
184
+ },
185
+ {
186
+ name: 'duplicationFlag';
187
+ isMut: true;
188
+ isSigner: false;
189
+ },
190
+ {
191
+ name: 'operationalSolAccount';
192
+ isMut: true;
193
+ isSigner: false;
194
+ }
195
+ ];
196
+ args: [
197
+ {
198
+ name: 'index';
199
+ type: 'u32';
200
+ },
201
+ {
202
+ name: 'validatorVote';
203
+ type: 'publicKey';
204
+ }
205
+ ];
206
+ },
207
+ {
208
+ name: 'setValidatorScore';
209
+ accounts: [
210
+ {
211
+ name: 'state';
212
+ isMut: true;
213
+ isSigner: false;
214
+ },
215
+ {
216
+ name: 'managerAuthority';
217
+ isMut: false;
218
+ isSigner: true;
219
+ },
220
+ {
221
+ name: 'validatorList';
222
+ isMut: true;
223
+ isSigner: false;
224
+ }
225
+ ];
226
+ args: [
227
+ {
228
+ name: 'index';
229
+ type: 'u32';
230
+ },
231
+ {
232
+ name: 'validatorVote';
233
+ type: 'publicKey';
234
+ },
235
+ {
236
+ name: 'score';
237
+ type: 'u32';
238
+ }
239
+ ];
240
+ },
241
+ {
242
+ name: 'configValidatorSystem';
243
+ accounts: [
244
+ {
245
+ name: 'state';
246
+ isMut: true;
247
+ isSigner: false;
248
+ },
249
+ {
250
+ name: 'managerAuthority';
251
+ isMut: false;
252
+ isSigner: true;
253
+ }
254
+ ];
255
+ args: [
256
+ {
257
+ name: 'extraRuns';
258
+ type: 'u32';
259
+ }
260
+ ];
261
+ },
262
+ {
263
+ name: 'deposit';
264
+ accounts: [
265
+ {
266
+ name: 'state';
267
+ isMut: true;
268
+ isSigner: false;
269
+ },
270
+ {
271
+ name: 'msolMint';
272
+ isMut: true;
273
+ isSigner: false;
274
+ },
275
+ {
276
+ name: 'liqPoolSolLegPda';
277
+ isMut: true;
278
+ isSigner: false;
279
+ },
280
+ {
281
+ name: 'liqPoolMsolLeg';
282
+ isMut: true;
283
+ isSigner: false;
284
+ },
285
+ {
286
+ name: 'liqPoolMsolLegAuthority';
287
+ isMut: false;
288
+ isSigner: false;
289
+ },
290
+ {
291
+ name: 'reservePda';
292
+ isMut: true;
293
+ isSigner: false;
294
+ },
295
+ {
296
+ name: 'transferFrom';
297
+ isMut: true;
298
+ isSigner: true;
299
+ },
300
+ {
301
+ name: 'mintTo';
302
+ isMut: true;
303
+ isSigner: false;
304
+ },
305
+ {
306
+ name: 'msolMintAuthority';
307
+ isMut: false;
308
+ isSigner: false;
309
+ },
310
+ {
311
+ name: 'systemProgram';
312
+ isMut: false;
313
+ isSigner: false;
314
+ },
315
+ {
316
+ name: 'tokenProgram';
317
+ isMut: false;
318
+ isSigner: false;
319
+ }
320
+ ];
321
+ args: [
322
+ {
323
+ name: 'lamports';
324
+ type: 'u64';
325
+ }
326
+ ];
327
+ },
328
+ {
329
+ name: 'depositStakeAccount';
330
+ accounts: [
331
+ {
332
+ name: 'state';
333
+ isMut: true;
334
+ isSigner: false;
335
+ },
336
+ {
337
+ name: 'validatorList';
338
+ isMut: true;
339
+ isSigner: false;
340
+ },
341
+ {
342
+ name: 'stakeList';
343
+ isMut: true;
344
+ isSigner: false;
345
+ },
346
+ {
347
+ name: 'stakeAccount';
348
+ isMut: true;
349
+ isSigner: false;
350
+ },
351
+ {
352
+ name: 'stakeAuthority';
353
+ isMut: false;
354
+ isSigner: true;
355
+ },
356
+ {
357
+ name: 'duplicationFlag';
358
+ isMut: true;
359
+ isSigner: false;
360
+ },
361
+ {
362
+ name: 'rentPayer';
363
+ isMut: true;
364
+ isSigner: true;
365
+ },
366
+ {
367
+ name: 'msolMint';
368
+ isMut: true;
369
+ isSigner: false;
370
+ },
371
+ {
372
+ name: 'mintTo';
373
+ isMut: true;
374
+ isSigner: false;
375
+ },
376
+ {
377
+ name: 'msolMintAuthority';
378
+ isMut: false;
379
+ isSigner: false;
380
+ },
381
+ {
382
+ name: 'clock';
383
+ isMut: false;
384
+ isSigner: false;
385
+ },
386
+ {
387
+ name: 'rent';
388
+ isMut: false;
389
+ isSigner: false;
390
+ },
391
+ {
392
+ name: 'systemProgram';
393
+ isMut: false;
394
+ isSigner: false;
395
+ },
396
+ {
397
+ name: 'tokenProgram';
398
+ isMut: false;
399
+ isSigner: false;
400
+ },
401
+ {
402
+ name: 'stakeProgram';
403
+ isMut: false;
404
+ isSigner: false;
405
+ }
406
+ ];
407
+ args: [
408
+ {
409
+ name: 'validatorIndex';
410
+ type: 'u32';
411
+ }
412
+ ];
413
+ },
414
+ {
415
+ name: 'liquidUnstake';
416
+ accounts: [
417
+ {
418
+ name: 'state';
419
+ isMut: true;
420
+ isSigner: false;
421
+ },
422
+ {
423
+ name: 'msolMint';
424
+ isMut: true;
425
+ isSigner: false;
426
+ },
427
+ {
428
+ name: 'liqPoolSolLegPda';
429
+ isMut: true;
430
+ isSigner: false;
431
+ },
432
+ {
433
+ name: 'liqPoolMsolLeg';
434
+ isMut: true;
435
+ isSigner: false;
436
+ },
437
+ {
438
+ name: 'treasuryMsolAccount';
439
+ isMut: true;
440
+ isSigner: false;
441
+ },
442
+ {
443
+ name: 'getMsolFrom';
444
+ isMut: true;
445
+ isSigner: false;
446
+ },
447
+ {
448
+ name: 'getMsolFromAuthority';
449
+ isMut: false;
450
+ isSigner: true;
451
+ },
452
+ {
453
+ name: 'transferSolTo';
454
+ isMut: true;
455
+ isSigner: false;
456
+ },
457
+ {
458
+ name: 'systemProgram';
459
+ isMut: false;
460
+ isSigner: false;
461
+ },
462
+ {
463
+ name: 'tokenProgram';
464
+ isMut: false;
465
+ isSigner: false;
466
+ }
467
+ ];
468
+ args: [
469
+ {
470
+ name: 'msolAmount';
471
+ type: 'u64';
472
+ }
473
+ ];
474
+ },
475
+ {
476
+ name: 'addLiquidity';
477
+ accounts: [
478
+ {
479
+ name: 'state';
480
+ isMut: true;
481
+ isSigner: false;
482
+ },
483
+ {
484
+ name: 'lpMint';
485
+ isMut: true;
486
+ isSigner: false;
487
+ },
488
+ {
489
+ name: 'lpMintAuthority';
490
+ isMut: false;
491
+ isSigner: false;
492
+ },
493
+ {
494
+ name: 'liqPoolMsolLeg';
495
+ isMut: false;
496
+ isSigner: false;
497
+ },
498
+ {
499
+ name: 'liqPoolSolLegPda';
500
+ isMut: true;
501
+ isSigner: false;
502
+ },
503
+ {
504
+ name: 'transferFrom';
505
+ isMut: true;
506
+ isSigner: true;
507
+ },
508
+ {
509
+ name: 'mintTo';
510
+ isMut: true;
511
+ isSigner: false;
512
+ },
513
+ {
514
+ name: 'systemProgram';
515
+ isMut: false;
516
+ isSigner: false;
517
+ },
518
+ {
519
+ name: 'tokenProgram';
520
+ isMut: false;
521
+ isSigner: false;
522
+ }
523
+ ];
524
+ args: [
525
+ {
526
+ name: 'lamports';
527
+ type: 'u64';
528
+ }
529
+ ];
530
+ },
531
+ {
532
+ name: 'removeLiquidity';
533
+ accounts: [
534
+ {
535
+ name: 'state';
536
+ isMut: true;
537
+ isSigner: false;
538
+ },
539
+ {
540
+ name: 'lpMint';
541
+ isMut: true;
542
+ isSigner: false;
543
+ },
544
+ {
545
+ name: 'burnFrom';
546
+ isMut: true;
547
+ isSigner: false;
548
+ },
549
+ {
550
+ name: 'burnFromAuthority';
551
+ isMut: false;
552
+ isSigner: true;
553
+ },
554
+ {
555
+ name: 'transferSolTo';
556
+ isMut: true;
557
+ isSigner: false;
558
+ },
559
+ {
560
+ name: 'transferMsolTo';
561
+ isMut: true;
562
+ isSigner: false;
563
+ },
564
+ {
565
+ name: 'liqPoolSolLegPda';
566
+ isMut: true;
567
+ isSigner: false;
568
+ },
569
+ {
570
+ name: 'liqPoolMsolLeg';
571
+ isMut: true;
572
+ isSigner: false;
573
+ },
574
+ {
575
+ name: 'liqPoolMsolLegAuthority';
576
+ isMut: false;
577
+ isSigner: false;
578
+ },
579
+ {
580
+ name: 'systemProgram';
581
+ isMut: false;
582
+ isSigner: false;
583
+ },
584
+ {
585
+ name: 'tokenProgram';
586
+ isMut: false;
587
+ isSigner: false;
588
+ }
589
+ ];
590
+ args: [
591
+ {
592
+ name: 'tokens';
593
+ type: 'u64';
594
+ }
595
+ ];
596
+ },
597
+ {
598
+ name: 'configLp';
599
+ accounts: [
600
+ {
601
+ name: 'state';
602
+ isMut: true;
603
+ isSigner: false;
604
+ },
605
+ {
606
+ name: 'adminAuthority';
607
+ isMut: false;
608
+ isSigner: true;
609
+ }
610
+ ];
611
+ args: [
612
+ {
613
+ name: 'params';
614
+ type: {
615
+ defined: 'ConfigLpParams';
616
+ };
617
+ }
618
+ ];
619
+ },
620
+ {
621
+ name: 'configMarinade';
622
+ accounts: [
623
+ {
624
+ name: 'state';
625
+ isMut: true;
626
+ isSigner: false;
627
+ },
628
+ {
629
+ name: 'adminAuthority';
630
+ isMut: false;
631
+ isSigner: true;
632
+ }
633
+ ];
634
+ args: [
635
+ {
636
+ name: 'params';
637
+ type: {
638
+ defined: 'ConfigMarinadeParams';
639
+ };
640
+ }
641
+ ];
642
+ },
643
+ {
644
+ name: 'orderUnstake';
645
+ accounts: [
646
+ {
647
+ name: 'state';
648
+ isMut: true;
649
+ isSigner: false;
650
+ },
651
+ {
652
+ name: 'msolMint';
653
+ isMut: true;
654
+ isSigner: false;
655
+ },
656
+ {
657
+ name: 'burnMsolFrom';
658
+ isMut: true;
659
+ isSigner: false;
660
+ },
661
+ {
662
+ name: 'burnMsolAuthority';
663
+ isMut: false;
664
+ isSigner: true;
665
+ },
666
+ {
667
+ name: 'newTicketAccount';
668
+ isMut: true;
669
+ isSigner: false;
670
+ },
671
+ {
672
+ name: 'clock';
673
+ isMut: false;
674
+ isSigner: false;
675
+ },
676
+ {
677
+ name: 'rent';
678
+ isMut: false;
679
+ isSigner: false;
680
+ },
681
+ {
682
+ name: 'tokenProgram';
683
+ isMut: false;
684
+ isSigner: false;
685
+ }
686
+ ];
687
+ args: [
688
+ {
689
+ name: 'msolAmount';
690
+ type: 'u64';
691
+ }
692
+ ];
693
+ },
694
+ {
695
+ name: 'claim';
696
+ accounts: [
697
+ {
698
+ name: 'state';
699
+ isMut: true;
700
+ isSigner: false;
701
+ },
702
+ {
703
+ name: 'reservePda';
704
+ isMut: true;
705
+ isSigner: false;
706
+ },
707
+ {
708
+ name: 'ticketAccount';
709
+ isMut: true;
710
+ isSigner: false;
711
+ },
712
+ {
713
+ name: 'transferSolTo';
714
+ isMut: true;
715
+ isSigner: false;
716
+ },
717
+ {
718
+ name: 'clock';
719
+ isMut: false;
720
+ isSigner: false;
721
+ },
722
+ {
723
+ name: 'systemProgram';
724
+ isMut: false;
725
+ isSigner: false;
726
+ }
727
+ ];
728
+ args: [];
729
+ },
730
+ {
731
+ name: 'stakeReserve';
732
+ accounts: [
733
+ {
734
+ name: 'state';
735
+ isMut: true;
736
+ isSigner: false;
737
+ },
738
+ {
739
+ name: 'validatorList';
740
+ isMut: true;
741
+ isSigner: false;
742
+ },
743
+ {
744
+ name: 'stakeList';
745
+ isMut: true;
746
+ isSigner: false;
747
+ },
748
+ {
749
+ name: 'validatorVote';
750
+ isMut: true;
751
+ isSigner: false;
752
+ },
753
+ {
754
+ name: 'reservePda';
755
+ isMut: true;
756
+ isSigner: false;
757
+ },
758
+ {
759
+ name: 'stakeAccount';
760
+ isMut: true;
761
+ isSigner: false;
762
+ },
763
+ {
764
+ name: 'stakeDepositAuthority';
765
+ isMut: false;
766
+ isSigner: false;
767
+ },
768
+ {
769
+ name: 'clock';
770
+ isMut: false;
771
+ isSigner: false;
772
+ },
773
+ {
774
+ name: 'epochSchedule';
775
+ isMut: false;
776
+ isSigner: false;
777
+ },
778
+ {
779
+ name: 'rent';
780
+ isMut: false;
781
+ isSigner: false;
782
+ },
783
+ {
784
+ name: 'stakeHistory';
785
+ isMut: false;
786
+ isSigner: false;
787
+ },
788
+ {
789
+ name: 'stakeConfig';
790
+ isMut: false;
791
+ isSigner: false;
792
+ },
793
+ {
794
+ name: 'systemProgram';
795
+ isMut: false;
796
+ isSigner: false;
797
+ },
798
+ {
799
+ name: 'stakeProgram';
800
+ isMut: false;
801
+ isSigner: false;
802
+ }
803
+ ];
804
+ args: [
805
+ {
806
+ name: 'validatorIndex';
807
+ type: 'u32';
808
+ }
809
+ ];
810
+ },
811
+ {
812
+ name: 'updateActive';
813
+ accounts: [
814
+ {
815
+ name: 'common';
816
+ accounts: [
817
+ {
818
+ name: 'state';
819
+ isMut: true;
820
+ isSigner: false;
821
+ },
822
+ {
823
+ name: 'stakeList';
824
+ isMut: true;
825
+ isSigner: false;
826
+ },
827
+ {
828
+ name: 'stakeAccount';
829
+ isMut: true;
830
+ isSigner: false;
831
+ },
832
+ {
833
+ name: 'stakeWithdrawAuthority';
834
+ isMut: false;
835
+ isSigner: false;
836
+ },
837
+ {
838
+ name: 'reservePda';
839
+ isMut: true;
840
+ isSigner: false;
841
+ },
842
+ {
843
+ name: 'msolMint';
844
+ isMut: true;
845
+ isSigner: false;
846
+ },
847
+ {
848
+ name: 'msolMintAuthority';
849
+ isMut: false;
850
+ isSigner: false;
851
+ },
852
+ {
853
+ name: 'treasuryMsolAccount';
854
+ isMut: true;
855
+ isSigner: false;
856
+ },
857
+ {
858
+ name: 'clock';
859
+ isMut: false;
860
+ isSigner: false;
861
+ },
862
+ {
863
+ name: 'stakeHistory';
864
+ isMut: false;
865
+ isSigner: false;
866
+ },
867
+ {
868
+ name: 'stakeProgram';
869
+ isMut: false;
870
+ isSigner: false;
871
+ },
872
+ {
873
+ name: 'tokenProgram';
874
+ isMut: false;
875
+ isSigner: false;
876
+ }
877
+ ];
878
+ },
879
+ {
880
+ name: 'validatorList';
881
+ isMut: true;
882
+ isSigner: false;
883
+ }
884
+ ];
885
+ args: [
886
+ {
887
+ name: 'stakeIndex';
888
+ type: 'u32';
889
+ },
890
+ {
891
+ name: 'validatorIndex';
892
+ type: 'u32';
893
+ }
894
+ ];
895
+ },
896
+ {
897
+ name: 'updateDeactivated';
898
+ accounts: [
899
+ {
900
+ name: 'common';
901
+ accounts: [
902
+ {
903
+ name: 'state';
904
+ isMut: true;
905
+ isSigner: false;
906
+ },
907
+ {
908
+ name: 'stakeList';
909
+ isMut: true;
910
+ isSigner: false;
911
+ },
912
+ {
913
+ name: 'stakeAccount';
914
+ isMut: true;
915
+ isSigner: false;
916
+ },
917
+ {
918
+ name: 'stakeWithdrawAuthority';
919
+ isMut: false;
920
+ isSigner: false;
921
+ },
922
+ {
923
+ name: 'reservePda';
924
+ isMut: true;
925
+ isSigner: false;
926
+ },
927
+ {
928
+ name: 'msolMint';
929
+ isMut: true;
930
+ isSigner: false;
931
+ },
932
+ {
933
+ name: 'msolMintAuthority';
934
+ isMut: false;
935
+ isSigner: false;
936
+ },
937
+ {
938
+ name: 'treasuryMsolAccount';
939
+ isMut: true;
940
+ isSigner: false;
941
+ },
942
+ {
943
+ name: 'clock';
944
+ isMut: false;
945
+ isSigner: false;
946
+ },
947
+ {
948
+ name: 'stakeHistory';
949
+ isMut: false;
950
+ isSigner: false;
951
+ },
952
+ {
953
+ name: 'stakeProgram';
954
+ isMut: false;
955
+ isSigner: false;
956
+ },
957
+ {
958
+ name: 'tokenProgram';
959
+ isMut: false;
960
+ isSigner: false;
961
+ }
962
+ ];
963
+ },
964
+ {
965
+ name: 'operationalSolAccount';
966
+ isMut: true;
967
+ isSigner: false;
968
+ },
969
+ {
970
+ name: 'systemProgram';
971
+ isMut: false;
972
+ isSigner: false;
973
+ }
974
+ ];
975
+ args: [
976
+ {
977
+ name: 'stakeIndex';
978
+ type: 'u32';
979
+ }
980
+ ];
981
+ },
982
+ {
983
+ name: 'deactivateStake';
984
+ accounts: [
985
+ {
986
+ name: 'state';
987
+ isMut: true;
988
+ isSigner: false;
989
+ },
990
+ {
991
+ name: 'reservePda';
992
+ isMut: false;
993
+ isSigner: false;
994
+ },
995
+ {
996
+ name: 'validatorList';
997
+ isMut: true;
998
+ isSigner: false;
999
+ },
1000
+ {
1001
+ name: 'stakeList';
1002
+ isMut: true;
1003
+ isSigner: false;
1004
+ },
1005
+ {
1006
+ name: 'stakeAccount';
1007
+ isMut: true;
1008
+ isSigner: false;
1009
+ },
1010
+ {
1011
+ name: 'stakeDepositAuthority';
1012
+ isMut: false;
1013
+ isSigner: false;
1014
+ },
1015
+ {
1016
+ name: 'splitStakeAccount';
1017
+ isMut: true;
1018
+ isSigner: true;
1019
+ },
1020
+ {
1021
+ name: 'splitStakeRentPayer';
1022
+ isMut: true;
1023
+ isSigner: true;
1024
+ },
1025
+ {
1026
+ name: 'clock';
1027
+ isMut: false;
1028
+ isSigner: false;
1029
+ },
1030
+ {
1031
+ name: 'rent';
1032
+ isMut: false;
1033
+ isSigner: false;
1034
+ },
1035
+ {
1036
+ name: 'epochSchedule';
1037
+ isMut: false;
1038
+ isSigner: false;
1039
+ },
1040
+ {
1041
+ name: 'stakeHistory';
1042
+ isMut: false;
1043
+ isSigner: false;
1044
+ },
1045
+ {
1046
+ name: 'systemProgram';
1047
+ isMut: false;
1048
+ isSigner: false;
1049
+ },
1050
+ {
1051
+ name: 'stakeProgram';
1052
+ isMut: false;
1053
+ isSigner: false;
1054
+ }
1055
+ ];
1056
+ args: [
1057
+ {
1058
+ name: 'stakeIndex';
1059
+ type: 'u32';
1060
+ },
1061
+ {
1062
+ name: 'validatorIndex';
1063
+ type: 'u32';
1064
+ }
1065
+ ];
1066
+ },
1067
+ {
1068
+ name: 'emergencyUnstake';
1069
+ accounts: [
1070
+ {
1071
+ name: 'state';
1072
+ isMut: true;
1073
+ isSigner: false;
1074
+ },
1075
+ {
1076
+ name: 'validatorManagerAuthority';
1077
+ isMut: false;
1078
+ isSigner: true;
1079
+ },
1080
+ {
1081
+ name: 'validatorList';
1082
+ isMut: true;
1083
+ isSigner: false;
1084
+ },
1085
+ {
1086
+ name: 'stakeList';
1087
+ isMut: true;
1088
+ isSigner: false;
1089
+ },
1090
+ {
1091
+ name: 'stakeAccount';
1092
+ isMut: true;
1093
+ isSigner: false;
1094
+ },
1095
+ {
1096
+ name: 'stakeDepositAuthority';
1097
+ isMut: false;
1098
+ isSigner: false;
1099
+ },
1100
+ {
1101
+ name: 'clock';
1102
+ isMut: false;
1103
+ isSigner: false;
1104
+ },
1105
+ {
1106
+ name: 'stakeProgram';
1107
+ isMut: false;
1108
+ isSigner: false;
1109
+ }
1110
+ ];
1111
+ args: [
1112
+ {
1113
+ name: 'stakeIndex';
1114
+ type: 'u32';
1115
+ },
1116
+ {
1117
+ name: 'validatorIndex';
1118
+ type: 'u32';
1119
+ }
1120
+ ];
1121
+ },
1122
+ {
1123
+ name: 'partialUnstake';
1124
+ accounts: [
1125
+ {
1126
+ name: 'state';
1127
+ isMut: true;
1128
+ isSigner: false;
1129
+ },
1130
+ {
1131
+ name: 'validatorManagerAuthority';
1132
+ isMut: false;
1133
+ isSigner: true;
1134
+ },
1135
+ {
1136
+ name: 'validatorList';
1137
+ isMut: true;
1138
+ isSigner: false;
1139
+ },
1140
+ {
1141
+ name: 'stakeList';
1142
+ isMut: true;
1143
+ isSigner: false;
1144
+ },
1145
+ {
1146
+ name: 'stakeAccount';
1147
+ isMut: true;
1148
+ isSigner: false;
1149
+ },
1150
+ {
1151
+ name: 'stakeDepositAuthority';
1152
+ isMut: false;
1153
+ isSigner: false;
1154
+ },
1155
+ {
1156
+ name: 'reservePda';
1157
+ isMut: false;
1158
+ isSigner: false;
1159
+ },
1160
+ {
1161
+ name: 'splitStakeAccount';
1162
+ isMut: true;
1163
+ isSigner: true;
1164
+ },
1165
+ {
1166
+ name: 'splitStakeRentPayer';
1167
+ isMut: true;
1168
+ isSigner: true;
1169
+ },
1170
+ {
1171
+ name: 'clock';
1172
+ isMut: false;
1173
+ isSigner: false;
1174
+ },
1175
+ {
1176
+ name: 'rent';
1177
+ isMut: false;
1178
+ isSigner: false;
1179
+ },
1180
+ {
1181
+ name: 'stakeHistory';
1182
+ isMut: false;
1183
+ isSigner: false;
1184
+ },
1185
+ {
1186
+ name: 'systemProgram';
1187
+ isMut: false;
1188
+ isSigner: false;
1189
+ },
1190
+ {
1191
+ name: 'stakeProgram';
1192
+ isMut: false;
1193
+ isSigner: false;
1194
+ }
1195
+ ];
1196
+ args: [
1197
+ {
1198
+ name: 'stakeIndex';
1199
+ type: 'u32';
1200
+ },
1201
+ {
1202
+ name: 'validatorIndex';
1203
+ type: 'u32';
1204
+ },
1205
+ {
1206
+ name: 'desiredUnstakeAmount';
1207
+ type: 'u64';
1208
+ }
1209
+ ];
1210
+ },
1211
+ {
1212
+ name: 'mergeStakes';
1213
+ accounts: [
1214
+ {
1215
+ name: 'state';
1216
+ isMut: true;
1217
+ isSigner: false;
1218
+ },
1219
+ {
1220
+ name: 'stakeList';
1221
+ isMut: true;
1222
+ isSigner: false;
1223
+ },
1224
+ {
1225
+ name: 'validatorList';
1226
+ isMut: true;
1227
+ isSigner: false;
1228
+ },
1229
+ {
1230
+ name: 'destinationStake';
1231
+ isMut: true;
1232
+ isSigner: false;
1233
+ },
1234
+ {
1235
+ name: 'sourceStake';
1236
+ isMut: true;
1237
+ isSigner: false;
1238
+ },
1239
+ {
1240
+ name: 'stakeDepositAuthority';
1241
+ isMut: false;
1242
+ isSigner: false;
1243
+ },
1244
+ {
1245
+ name: 'stakeWithdrawAuthority';
1246
+ isMut: false;
1247
+ isSigner: false;
1248
+ },
1249
+ {
1250
+ name: 'operationalSolAccount';
1251
+ isMut: true;
1252
+ isSigner: false;
1253
+ },
1254
+ {
1255
+ name: 'clock';
1256
+ isMut: false;
1257
+ isSigner: false;
1258
+ },
1259
+ {
1260
+ name: 'stakeHistory';
1261
+ isMut: false;
1262
+ isSigner: false;
1263
+ },
1264
+ {
1265
+ name: 'stakeProgram';
1266
+ isMut: false;
1267
+ isSigner: false;
1268
+ }
1269
+ ];
1270
+ args: [
1271
+ {
1272
+ name: 'destinationStakeIndex';
1273
+ type: 'u32';
1274
+ },
1275
+ {
1276
+ name: 'sourceStakeIndex';
1277
+ type: 'u32';
1278
+ },
1279
+ {
1280
+ name: 'validatorIndex';
1281
+ type: 'u32';
1282
+ }
1283
+ ];
1284
+ }
1285
+ ];
1286
+ accounts: [
1287
+ {
1288
+ name: 'state';
1289
+ type: {
1290
+ kind: 'struct';
1291
+ fields: [
1292
+ {
1293
+ name: 'msolMint';
1294
+ type: 'publicKey';
1295
+ },
1296
+ {
1297
+ name: 'adminAuthority';
1298
+ type: 'publicKey';
1299
+ },
1300
+ {
1301
+ name: 'operationalSolAccount';
1302
+ type: 'publicKey';
1303
+ },
1304
+ {
1305
+ name: 'treasuryMsolAccount';
1306
+ type: 'publicKey';
1307
+ },
1308
+ {
1309
+ name: 'reserveBumpSeed';
1310
+ type: 'u8';
1311
+ },
1312
+ {
1313
+ name: 'msolMintAuthorityBumpSeed';
1314
+ type: 'u8';
1315
+ },
1316
+ {
1317
+ name: 'rentExemptForTokenAcc';
1318
+ type: 'u64';
1319
+ },
1320
+ {
1321
+ name: 'rewardFee';
1322
+ type: {
1323
+ defined: 'Fee';
1324
+ };
1325
+ },
1326
+ {
1327
+ name: 'stakeSystem';
1328
+ type: {
1329
+ defined: 'StakeSystem';
1330
+ };
1331
+ },
1332
+ {
1333
+ name: 'validatorSystem';
1334
+ type: {
1335
+ defined: 'ValidatorSystem';
1336
+ };
1337
+ },
1338
+ {
1339
+ name: 'liqPool';
1340
+ type: {
1341
+ defined: 'LiqPool';
1342
+ };
1343
+ },
1344
+ {
1345
+ name: 'availableReserveBalance';
1346
+ type: 'u64';
1347
+ },
1348
+ {
1349
+ name: 'msolSupply';
1350
+ type: 'u64';
1351
+ },
1352
+ {
1353
+ name: 'msolPrice';
1354
+ type: 'u64';
1355
+ },
1356
+ {
1357
+ name: 'circulatingTicketCount';
1358
+ docs: ['count tickets for delayed-unstake'];
1359
+ type: 'u64';
1360
+ },
1361
+ {
1362
+ name: 'circulatingTicketBalance';
1363
+ docs: [
1364
+ 'total lamports amount of generated and not claimed yet tickets'
1365
+ ];
1366
+ type: 'u64';
1367
+ },
1368
+ {
1369
+ name: 'lentFromReserve';
1370
+ type: 'u64';
1371
+ },
1372
+ {
1373
+ name: 'minDeposit';
1374
+ type: 'u64';
1375
+ },
1376
+ {
1377
+ name: 'minWithdraw';
1378
+ type: 'u64';
1379
+ },
1380
+ {
1381
+ name: 'stakingSolCap';
1382
+ type: 'u64';
1383
+ },
1384
+ {
1385
+ name: 'emergencyCoolingDown';
1386
+ type: 'u64';
1387
+ }
1388
+ ];
1389
+ };
1390
+ },
1391
+ {
1392
+ name: 'ticketAccountData';
1393
+ type: {
1394
+ kind: 'struct';
1395
+ fields: [
1396
+ {
1397
+ name: 'stateAddress';
1398
+ type: 'publicKey';
1399
+ },
1400
+ {
1401
+ name: 'beneficiary';
1402
+ type: 'publicKey';
1403
+ },
1404
+ {
1405
+ name: 'lamportsAmount';
1406
+ type: 'u64';
1407
+ },
1408
+ {
1409
+ name: 'createdEpoch';
1410
+ type: 'u64';
1411
+ }
1412
+ ];
1413
+ };
1414
+ }
1415
+ ];
1416
+ types: [
1417
+ {
1418
+ name: 'LiqPool';
1419
+ type: {
1420
+ kind: 'struct';
1421
+ fields: [
1422
+ {
1423
+ name: 'lpMint';
1424
+ type: 'publicKey';
1425
+ },
1426
+ {
1427
+ name: 'lpMintAuthorityBumpSeed';
1428
+ type: 'u8';
1429
+ },
1430
+ {
1431
+ name: 'solLegBumpSeed';
1432
+ type: 'u8';
1433
+ },
1434
+ {
1435
+ name: 'msolLegAuthorityBumpSeed';
1436
+ type: 'u8';
1437
+ },
1438
+ {
1439
+ name: 'msolLeg';
1440
+ type: 'publicKey';
1441
+ },
1442
+ {
1443
+ name: 'lpLiquidityTarget';
1444
+ docs: [
1445
+ 'Liquidity target. If the Liquidity reach this amount, the fee reaches lp_min_discount_fee'
1446
+ ];
1447
+ type: 'u64';
1448
+ },
1449
+ {
1450
+ name: 'lpMaxFee';
1451
+ docs: ['Liquidity pool max fee'];
1452
+ type: {
1453
+ defined: 'Fee';
1454
+ };
1455
+ },
1456
+ {
1457
+ name: 'lpMinFee';
1458
+ docs: ['SOL/mSOL Liquidity pool min fee'];
1459
+ type: {
1460
+ defined: 'Fee';
1461
+ };
1462
+ },
1463
+ {
1464
+ name: 'treasuryCut';
1465
+ docs: ['Treasury cut'];
1466
+ type: {
1467
+ defined: 'Fee';
1468
+ };
1469
+ },
1470
+ {
1471
+ name: 'lpSupply';
1472
+ type: 'u64';
1473
+ },
1474
+ {
1475
+ name: 'lentFromSolLeg';
1476
+ type: 'u64';
1477
+ },
1478
+ {
1479
+ name: 'liquiditySolCap';
1480
+ type: 'u64';
1481
+ }
1482
+ ];
1483
+ };
1484
+ },
1485
+ {
1486
+ name: 'List';
1487
+ type: {
1488
+ kind: 'struct';
1489
+ fields: [
1490
+ {
1491
+ name: 'account';
1492
+ type: 'publicKey';
1493
+ },
1494
+ {
1495
+ name: 'itemSize';
1496
+ type: 'u32';
1497
+ },
1498
+ {
1499
+ name: 'count';
1500
+ type: 'u32';
1501
+ },
1502
+ {
1503
+ name: 'newAccount';
1504
+ type: 'publicKey';
1505
+ },
1506
+ {
1507
+ name: 'copiedCount';
1508
+ type: 'u32';
1509
+ }
1510
+ ];
1511
+ };
1512
+ },
1513
+ {
1514
+ name: 'StakeRecord';
1515
+ type: {
1516
+ kind: 'struct';
1517
+ fields: [
1518
+ {
1519
+ name: 'stakeAccount';
1520
+ type: 'publicKey';
1521
+ },
1522
+ {
1523
+ name: 'lastUpdateDelegatedLamports';
1524
+ type: 'u64';
1525
+ },
1526
+ {
1527
+ name: 'lastUpdateEpoch';
1528
+ type: 'u64';
1529
+ },
1530
+ {
1531
+ name: 'isEmergencyUnstaking';
1532
+ type: 'u8';
1533
+ }
1534
+ ];
1535
+ };
1536
+ },
1537
+ {
1538
+ name: 'StakeSystem';
1539
+ type: {
1540
+ kind: 'struct';
1541
+ fields: [
1542
+ {
1543
+ name: 'stakeList';
1544
+ type: {
1545
+ defined: 'List';
1546
+ };
1547
+ },
1548
+ {
1549
+ name: 'delayedUnstakeCoolingDown';
1550
+ type: 'u64';
1551
+ },
1552
+ {
1553
+ name: 'stakeDepositBumpSeed';
1554
+ type: 'u8';
1555
+ },
1556
+ {
1557
+ name: 'stakeWithdrawBumpSeed';
1558
+ type: 'u8';
1559
+ },
1560
+ {
1561
+ name: 'slotsForStakeDelta';
1562
+ docs: [
1563
+ 'set by admin, how much slots before the end of the epoch, stake-delta can start'
1564
+ ];
1565
+ type: 'u64';
1566
+ },
1567
+ {
1568
+ name: 'lastStakeDeltaEpoch';
1569
+ docs: [
1570
+ 'Marks the start of stake-delta operations, meaning that if somebody starts a delayed-unstake ticket',
1571
+ 'after this var is set with epoch_num the ticket will have epoch_created = current_epoch+1',
1572
+ '(the user must wait one more epoch, because their unstake-delta will be execute in this epoch)'
1573
+ ];
1574
+ type: 'u64';
1575
+ },
1576
+ {
1577
+ name: 'minStake';
1578
+ type: 'u64';
1579
+ },
1580
+ {
1581
+ name: 'extraStakeDeltaRuns';
1582
+ docs: [
1583
+ 'can be set by validator-manager-auth to allow a second run of stake-delta to stake late stakers in the last minute of the epoch',
1584
+ "so we maximize user's rewards"
1585
+ ];
1586
+ type: 'u32';
1587
+ }
1588
+ ];
1589
+ };
1590
+ },
1591
+ {
1592
+ name: 'ValidatorRecord';
1593
+ type: {
1594
+ kind: 'struct';
1595
+ fields: [
1596
+ {
1597
+ name: 'validatorAccount';
1598
+ docs: ['Validator vote pubkey'];
1599
+ type: 'publicKey';
1600
+ },
1601
+ {
1602
+ name: 'activeBalance';
1603
+ docs: ['Validator total balance in lamports'];
1604
+ type: 'u64';
1605
+ },
1606
+ {
1607
+ name: 'score';
1608
+ type: 'u32';
1609
+ },
1610
+ {
1611
+ name: 'lastStakeDeltaEpoch';
1612
+ type: 'u64';
1613
+ },
1614
+ {
1615
+ name: 'duplicationFlagBumpSeed';
1616
+ type: 'u8';
1617
+ }
1618
+ ];
1619
+ };
1620
+ },
1621
+ {
1622
+ name: 'ValidatorSystem';
1623
+ type: {
1624
+ kind: 'struct';
1625
+ fields: [
1626
+ {
1627
+ name: 'validatorList';
1628
+ type: {
1629
+ defined: 'List';
1630
+ };
1631
+ },
1632
+ {
1633
+ name: 'managerAuthority';
1634
+ type: 'publicKey';
1635
+ },
1636
+ {
1637
+ name: 'totalValidatorScore';
1638
+ type: 'u32';
1639
+ },
1640
+ {
1641
+ name: 'totalActiveBalance';
1642
+ docs: ['sum of all active lamports staked'];
1643
+ type: 'u64';
1644
+ },
1645
+ {
1646
+ name: 'autoAddValidatorEnabled';
1647
+ docs: [
1648
+ 'allow & auto-add validator when a user deposits a stake-account of a non-listed validator'
1649
+ ];
1650
+ type: 'u8';
1651
+ }
1652
+ ];
1653
+ };
1654
+ },
1655
+ {
1656
+ name: 'Fee';
1657
+ type: {
1658
+ kind: 'struct';
1659
+ fields: [
1660
+ {
1661
+ name: 'basisPoints';
1662
+ type: 'u32';
1663
+ }
1664
+ ];
1665
+ };
1666
+ },
1667
+ {
1668
+ name: 'InitializeData';
1669
+ type: {
1670
+ kind: 'struct';
1671
+ fields: [
1672
+ {
1673
+ name: 'adminAuthority';
1674
+ type: 'publicKey';
1675
+ },
1676
+ {
1677
+ name: 'validatorManagerAuthority';
1678
+ type: 'publicKey';
1679
+ },
1680
+ {
1681
+ name: 'minStake';
1682
+ type: 'u64';
1683
+ },
1684
+ {
1685
+ name: 'rewardFee';
1686
+ type: {
1687
+ defined: 'Fee';
1688
+ };
1689
+ },
1690
+ {
1691
+ name: 'liqPool';
1692
+ type: {
1693
+ defined: 'LiqPoolInitializeData';
1694
+ };
1695
+ },
1696
+ {
1697
+ name: 'additionalStakeRecordSpace';
1698
+ type: 'u32';
1699
+ },
1700
+ {
1701
+ name: 'additionalValidatorRecordSpace';
1702
+ type: 'u32';
1703
+ },
1704
+ {
1705
+ name: 'slotsForStakeDelta';
1706
+ type: 'u64';
1707
+ }
1708
+ ];
1709
+ };
1710
+ },
1711
+ {
1712
+ name: 'LiqPoolInitializeData';
1713
+ type: {
1714
+ kind: 'struct';
1715
+ fields: [
1716
+ {
1717
+ name: 'lpLiquidityTarget';
1718
+ type: 'u64';
1719
+ },
1720
+ {
1721
+ name: 'lpMaxFee';
1722
+ type: {
1723
+ defined: 'Fee';
1724
+ };
1725
+ },
1726
+ {
1727
+ name: 'lpMinFee';
1728
+ type: {
1729
+ defined: 'Fee';
1730
+ };
1731
+ },
1732
+ {
1733
+ name: 'lpTreasuryCut';
1734
+ type: {
1735
+ defined: 'Fee';
1736
+ };
1737
+ }
1738
+ ];
1739
+ };
1740
+ },
1741
+ {
1742
+ name: 'ChangeAuthorityData';
1743
+ type: {
1744
+ kind: 'struct';
1745
+ fields: [
1746
+ {
1747
+ name: 'admin';
1748
+ type: {
1749
+ option: 'publicKey';
1750
+ };
1751
+ },
1752
+ {
1753
+ name: 'validatorManager';
1754
+ type: {
1755
+ option: 'publicKey';
1756
+ };
1757
+ },
1758
+ {
1759
+ name: 'operationalSolAccount';
1760
+ type: {
1761
+ option: 'publicKey';
1762
+ };
1763
+ },
1764
+ {
1765
+ name: 'treasuryMsolAccount';
1766
+ type: {
1767
+ option: 'publicKey';
1768
+ };
1769
+ }
1770
+ ];
1771
+ };
1772
+ },
1773
+ {
1774
+ name: 'ConfigLpParams';
1775
+ type: {
1776
+ kind: 'struct';
1777
+ fields: [
1778
+ {
1779
+ name: 'minFee';
1780
+ type: {
1781
+ option: {
1782
+ defined: 'Fee';
1783
+ };
1784
+ };
1785
+ },
1786
+ {
1787
+ name: 'maxFee';
1788
+ type: {
1789
+ option: {
1790
+ defined: 'Fee';
1791
+ };
1792
+ };
1793
+ },
1794
+ {
1795
+ name: 'liquidityTarget';
1796
+ type: {
1797
+ option: 'u64';
1798
+ };
1799
+ },
1800
+ {
1801
+ name: 'treasuryCut';
1802
+ type: {
1803
+ option: {
1804
+ defined: 'Fee';
1805
+ };
1806
+ };
1807
+ }
1808
+ ];
1809
+ };
1810
+ },
1811
+ {
1812
+ name: 'ConfigMarinadeParams';
1813
+ type: {
1814
+ kind: 'struct';
1815
+ fields: [
1816
+ {
1817
+ name: 'rewardsFee';
1818
+ type: {
1819
+ option: {
1820
+ defined: 'Fee';
1821
+ };
1822
+ };
1823
+ },
1824
+ {
1825
+ name: 'slotsForStakeDelta';
1826
+ type: {
1827
+ option: 'u64';
1828
+ };
1829
+ },
1830
+ {
1831
+ name: 'minStake';
1832
+ type: {
1833
+ option: 'u64';
1834
+ };
1835
+ },
1836
+ {
1837
+ name: 'minDeposit';
1838
+ type: {
1839
+ option: 'u64';
1840
+ };
1841
+ },
1842
+ {
1843
+ name: 'minWithdraw';
1844
+ type: {
1845
+ option: 'u64';
1846
+ };
1847
+ },
1848
+ {
1849
+ name: 'stakingSolCap';
1850
+ type: {
1851
+ option: 'u64';
1852
+ };
1853
+ },
1854
+ {
1855
+ name: 'liquiditySolCap';
1856
+ type: {
1857
+ option: 'u64';
1858
+ };
1859
+ },
1860
+ {
1861
+ name: 'autoAddValidatorEnabled';
1862
+ type: {
1863
+ option: 'bool';
1864
+ };
1865
+ }
1866
+ ];
1867
+ };
1868
+ },
1869
+ {
1870
+ name: 'CommonError';
1871
+ type: {
1872
+ kind: 'enum';
1873
+ variants: [
1874
+ {
1875
+ name: 'WrongReserveOwner';
1876
+ },
1877
+ {
1878
+ name: 'NonEmptyReserveData';
1879
+ },
1880
+ {
1881
+ name: 'InvalidInitialReserveLamports';
1882
+ },
1883
+ {
1884
+ name: 'ZeroValidatorChunkSize';
1885
+ },
1886
+ {
1887
+ name: 'TooBigValidatorChunkSize';
1888
+ },
1889
+ {
1890
+ name: 'ZeroCreditChunkSize';
1891
+ },
1892
+ {
1893
+ name: 'TooBigCreditChunkSize';
1894
+ },
1895
+ {
1896
+ name: 'TooLowCreditFee';
1897
+ },
1898
+ {
1899
+ name: 'InvalidMintAuthority';
1900
+ },
1901
+ {
1902
+ name: 'MintHasInitialSupply';
1903
+ },
1904
+ {
1905
+ name: 'InvalidOwnerFeeState';
1906
+ },
1907
+ {
1908
+ name: 'InvalidProgramId';
1909
+ },
1910
+ {
1911
+ name: 'UnexpectedAccount';
1912
+ },
1913
+ {
1914
+ name: 'CalculationFailure';
1915
+ },
1916
+ {
1917
+ name: 'AccountWithLockup';
1918
+ },
1919
+ {
1920
+ name: 'NumberTooLow';
1921
+ },
1922
+ {
1923
+ name: 'NumberTooHigh';
1924
+ },
1925
+ {
1926
+ name: 'FeeTooHigh';
1927
+ },
1928
+ {
1929
+ name: 'FeesWrongWayRound';
1930
+ },
1931
+ {
1932
+ name: 'LiquidityTargetTooLow';
1933
+ },
1934
+ {
1935
+ name: 'TicketNotDue';
1936
+ },
1937
+ {
1938
+ name: 'TicketNotReady';
1939
+ },
1940
+ {
1941
+ name: 'WrongBeneficiary';
1942
+ },
1943
+ {
1944
+ name: 'StakeAccountNotUpdatedYet';
1945
+ },
1946
+ {
1947
+ name: 'StakeNotDelegated';
1948
+ },
1949
+ {
1950
+ name: 'StakeAccountIsEmergencyUnstaking';
1951
+ },
1952
+ {
1953
+ name: 'InsufficientLiquidity';
1954
+ },
1955
+ {
1956
+ name: 'InvalidValidator';
1957
+ }
1958
+ ];
1959
+ };
1960
+ }
1961
+ ];
1962
+ };
1963
+ export declare const IDL: MarinadeFinance;