@reflectmoney/stable.ts 1.0.0 → 1.0.2

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 (304) hide show
  1. package/README.md +178 -7
  2. package/dist/classes/PdaClient.d.ts +112 -0
  3. package/dist/classes/PdaClient.js +112 -0
  4. package/dist/classes/ReflectAdmin.d.ts +87 -2
  5. package/dist/classes/ReflectAdmin.js +84 -1
  6. package/dist/classes/ReflectTokenisedBond.d.ts +57 -0
  7. package/dist/classes/ReflectTokenisedBond.js +56 -0
  8. package/dist/classes/Stablecoin.d.ts +139 -1
  9. package/dist/classes/Stablecoin.js +83 -1
  10. package/dist/stablecoins/LstStablecoin.d.ts +47 -0
  11. package/dist/stablecoins/LstStablecoin.js +46 -0
  12. package/package.json +1 -1
  13. package/dist/classes/Strategy.d.ts +0 -30
  14. package/dist/classes/Strategy.js +0 -196
  15. package/dist/generated/accounts/DriftJlpController.d.ts +0 -114
  16. package/dist/generated/accounts/DriftJlpController.js +0 -169
  17. package/dist/generated/accounts/DriftLstController.d.ts +0 -108
  18. package/dist/generated/accounts/DriftLstController.js +0 -165
  19. package/dist/generated/accounts/DriftUsdcController.d.ts +0 -102
  20. package/dist/generated/accounts/DriftUsdcController.js +0 -158
  21. package/dist/generated/accounts/Main.d.ts +0 -110
  22. package/dist/generated/accounts/Main.js +0 -165
  23. package/dist/generated/accounts/PerpMarket.d.ts +0 -226
  24. package/dist/generated/accounts/PerpMarket.js +0 -307
  25. package/dist/generated/accounts/PrelaunchOracle.d.ts +0 -130
  26. package/dist/generated/accounts/PrelaunchOracle.js +0 -224
  27. package/dist/generated/accounts/PythLazerOracle.d.ts +0 -124
  28. package/dist/generated/accounts/PythLazerOracle.js +0 -210
  29. package/dist/generated/accounts/RebalanceLst.d.ts +0 -111
  30. package/dist/generated/accounts/RebalanceLst.js +0 -175
  31. package/dist/generated/accounts/SpotMarket.d.ts +0 -377
  32. package/dist/generated/accounts/SpotMarket.js +0 -601
  33. package/dist/generated/accounts/User.d.ts +0 -221
  34. package/dist/generated/accounts/User.js +0 -331
  35. package/dist/generated/accounts/UserPermissions.d.ts +0 -106
  36. package/dist/generated/accounts/UserPermissions.js +0 -161
  37. package/dist/generated/accounts/UserStats.d.ts +0 -211
  38. package/dist/generated/accounts/UserStats.js +0 -323
  39. package/dist/generated/accounts/index.d.ts +0 -38
  40. package/dist/generated/accounts/index.js +0 -55
  41. package/dist/generated/errors/index.d.ts +0 -1024
  42. package/dist/generated/errors/index.js +0 -1761
  43. package/dist/generated/index.d.ts +0 -19
  44. package/dist/generated/index.js +0 -36
  45. package/dist/generated/instructions/addLstDrift.d.ts +0 -49
  46. package/dist/generated/instructions/addLstDrift.js +0 -106
  47. package/dist/generated/instructions/addSubAccount.d.ts +0 -54
  48. package/dist/generated/instructions/addSubAccount.js +0 -121
  49. package/dist/generated/instructions/adjustHedgeS2.d.ts +0 -69
  50. package/dist/generated/instructions/adjustHedgeS2.js +0 -157
  51. package/dist/generated/instructions/captureSpreadDrift.d.ts +0 -56
  52. package/dist/generated/instructions/captureSpreadDrift.js +0 -120
  53. package/dist/generated/instructions/createAdminAccount.d.ts +0 -53
  54. package/dist/generated/instructions/createAdminAccount.js +0 -95
  55. package/dist/generated/instructions/createUserStatsAccount.d.ts +0 -54
  56. package/dist/generated/instructions/createUserStatsAccount.js +0 -121
  57. package/dist/generated/instructions/depositDrift.d.ts +0 -73
  58. package/dist/generated/instructions/depositDrift.js +0 -142
  59. package/dist/generated/instructions/freezeProgram.d.ts +0 -54
  60. package/dist/generated/instructions/freezeProgram.js +0 -95
  61. package/dist/generated/instructions/freezeProtocolAction.d.ts +0 -55
  62. package/dist/generated/instructions/freezeProtocolAction.js +0 -96
  63. package/dist/generated/instructions/freezeStrategyAction.d.ts +0 -58
  64. package/dist/generated/instructions/freezeStrategyAction.js +0 -102
  65. package/dist/generated/instructions/index.d.ts +0 -41
  66. package/dist/generated/instructions/index.js +0 -57
  67. package/dist/generated/instructions/initDriftAccountsS1.d.ts +0 -56
  68. package/dist/generated/instructions/initDriftAccountsS1.js +0 -126
  69. package/dist/generated/instructions/initDriftControllerS1.d.ts +0 -60
  70. package/dist/generated/instructions/initDriftControllerS1.js +0 -108
  71. package/dist/generated/instructions/initDriftControllerS2.d.ts +0 -66
  72. package/dist/generated/instructions/initDriftControllerS2.js +0 -125
  73. package/dist/generated/instructions/initDriftControllerS3.d.ts +0 -58
  74. package/dist/generated/instructions/initDriftControllerS3.js +0 -103
  75. package/dist/generated/instructions/initMain.d.ts +0 -43
  76. package/dist/generated/instructions/initMain.js +0 -91
  77. package/dist/generated/instructions/mintDriftS1.d.ts +0 -90
  78. package/dist/generated/instructions/mintDriftS1.js +0 -184
  79. package/dist/generated/instructions/mintDriftS2.d.ts +0 -80
  80. package/dist/generated/instructions/mintDriftS2.js +0 -161
  81. package/dist/generated/instructions/mintDriftS3.d.ts +0 -86
  82. package/dist/generated/instructions/mintDriftS3.js +0 -174
  83. package/dist/generated/instructions/processSwapDeposit.d.ts +0 -79
  84. package/dist/generated/instructions/processSwapDeposit.js +0 -161
  85. package/dist/generated/instructions/processSwapDepositIntrospection.d.ts +0 -79
  86. package/dist/generated/instructions/processSwapDepositIntrospection.js +0 -161
  87. package/dist/generated/instructions/processSwapWithdraw.d.ts +0 -68
  88. package/dist/generated/instructions/processSwapWithdraw.js +0 -157
  89. package/dist/generated/instructions/processSwapWithdrawIntrospection.d.ts +0 -68
  90. package/dist/generated/instructions/processSwapWithdrawIntrospection.js +0 -157
  91. package/dist/generated/instructions/rebalanceJlp.d.ts +0 -81
  92. package/dist/generated/instructions/rebalanceJlp.js +0 -187
  93. package/dist/generated/instructions/redeem2DriftS2.d.ts +0 -80
  94. package/dist/generated/instructions/redeem2DriftS2.js +0 -161
  95. package/dist/generated/instructions/redeemDriftS1.d.ts +0 -91
  96. package/dist/generated/instructions/redeemDriftS1.js +0 -185
  97. package/dist/generated/instructions/redeemDriftS2.d.ts +0 -80
  98. package/dist/generated/instructions/redeemDriftS2.js +0 -161
  99. package/dist/generated/instructions/redeemDriftS3.d.ts +0 -87
  100. package/dist/generated/instructions/redeemDriftS3.js +0 -175
  101. package/dist/generated/instructions/settlePnl.d.ts +0 -55
  102. package/dist/generated/instructions/settlePnl.js +0 -114
  103. package/dist/generated/instructions/settlePnlMulti.d.ts +0 -65
  104. package/dist/generated/instructions/settlePnlMulti.js +0 -117
  105. package/dist/generated/instructions/suspendLstProtocol.d.ts +0 -54
  106. package/dist/generated/instructions/suspendLstProtocol.js +0 -96
  107. package/dist/generated/instructions/suspendLstStrategy.d.ts +0 -56
  108. package/dist/generated/instructions/suspendLstStrategy.js +0 -101
  109. package/dist/generated/instructions/swapOrca.d.ts +0 -78
  110. package/dist/generated/instructions/swapOrca.js +0 -153
  111. package/dist/generated/instructions/swapOrcaTwoHop.d.ts +0 -98
  112. package/dist/generated/instructions/swapOrcaTwoHop.js +0 -200
  113. package/dist/generated/instructions/updateActionRoleProtocol.d.ts +0 -58
  114. package/dist/generated/instructions/updateActionRoleProtocol.js +0 -99
  115. package/dist/generated/instructions/updateActionRoleStrategy.d.ts +0 -61
  116. package/dist/generated/instructions/updateActionRoleStrategy.js +0 -105
  117. package/dist/generated/instructions/updateAttenuation.d.ts +0 -56
  118. package/dist/generated/instructions/updateAttenuation.js +0 -100
  119. package/dist/generated/instructions/updateCap.d.ts +0 -55
  120. package/dist/generated/instructions/updateCap.js +0 -99
  121. package/dist/generated/instructions/updateRebalanceSlippage.d.ts +0 -55
  122. package/dist/generated/instructions/updateRebalanceSlippage.js +0 -99
  123. package/dist/generated/instructions/updateRecipients.d.ts +0 -56
  124. package/dist/generated/instructions/updateRecipients.js +0 -101
  125. package/dist/generated/instructions/updateRoleHolderProtocol.d.ts +0 -61
  126. package/dist/generated/instructions/updateRoleHolderProtocol.js +0 -109
  127. package/dist/generated/instructions/updateRoleHolderStrategy.d.ts +0 -62
  128. package/dist/generated/instructions/updateRoleHolderStrategy.js +0 -110
  129. package/dist/generated/types/AMM.d.ts +0 -102
  130. package/dist/generated/types/AMM.js +0 -127
  131. package/dist/generated/types/AccKey.d.ts +0 -15
  132. package/dist/generated/types/AccKey.js +0 -38
  133. package/dist/generated/types/AccessControl.d.ts +0 -18
  134. package/dist/generated/types/AccessControl.js +0 -43
  135. package/dist/generated/types/AccessMap.d.ts +0 -17
  136. package/dist/generated/types/AccessMap.js +0 -42
  137. package/dist/generated/types/Action.d.ts +0 -36
  138. package/dist/generated/types/Action.js +0 -63
  139. package/dist/generated/types/ActionMapping.d.ts +0 -19
  140. package/dist/generated/types/ActionMapping.js +0 -44
  141. package/dist/generated/types/AssetTier.d.ts +0 -23
  142. package/dist/generated/types/AssetTier.js +0 -50
  143. package/dist/generated/types/Attenuation.d.ts +0 -16
  144. package/dist/generated/types/Attenuation.js +0 -41
  145. package/dist/generated/types/BalanceType.d.ts +0 -20
  146. package/dist/generated/types/BalanceType.js +0 -47
  147. package/dist/generated/types/ContractTier.d.ts +0 -24
  148. package/dist/generated/types/ContractTier.js +0 -51
  149. package/dist/generated/types/ContractType.d.ts +0 -20
  150. package/dist/generated/types/ContractType.js +0 -47
  151. package/dist/generated/types/CorpAction.d.ts +0 -19
  152. package/dist/generated/types/CorpAction.js +0 -46
  153. package/dist/generated/types/CustodyInfo.d.ts +0 -20
  154. package/dist/generated/types/CustodyInfo.js +0 -45
  155. package/dist/generated/types/DirectionCollateral.d.ts +0 -20
  156. package/dist/generated/types/DirectionCollateral.js +0 -47
  157. package/dist/generated/types/DirectionPosition.d.ts +0 -20
  158. package/dist/generated/types/DirectionPosition.js +0 -47
  159. package/dist/generated/types/DriftControllerBase.d.ts +0 -15
  160. package/dist/generated/types/DriftControllerBase.js +0 -38
  161. package/dist/generated/types/DriftJlpControllerFixedAccounts.d.ts +0 -18
  162. package/dist/generated/types/DriftJlpControllerFixedAccounts.js +0 -43
  163. package/dist/generated/types/DriftLstData.d.ts +0 -17
  164. package/dist/generated/types/DriftLstData.js +0 -42
  165. package/dist/generated/types/Ema.d.ts +0 -17
  166. package/dist/generated/types/Ema.js +0 -42
  167. package/dist/generated/types/Externals.d.ts +0 -16
  168. package/dist/generated/types/Externals.js +0 -39
  169. package/dist/generated/types/HistoricalIndexData.d.ts +0 -19
  170. package/dist/generated/types/HistoricalIndexData.js +0 -44
  171. package/dist/generated/types/HistoricalOracleData.d.ts +0 -20
  172. package/dist/generated/types/HistoricalOracleData.js +0 -45
  173. package/dist/generated/types/Holding.d.ts +0 -21
  174. package/dist/generated/types/Holding.js +0 -46
  175. package/dist/generated/types/Holdings.d.ts +0 -17
  176. package/dist/generated/types/Holdings.js +0 -42
  177. package/dist/generated/types/InitControllerS2Args.d.ts +0 -23
  178. package/dist/generated/types/InitControllerS2Args.js +0 -48
  179. package/dist/generated/types/InsuranceClaim.d.ts +0 -19
  180. package/dist/generated/types/InsuranceClaim.js +0 -44
  181. package/dist/generated/types/InsuranceFund.d.ts +0 -24
  182. package/dist/generated/types/InsuranceFund.js +0 -49
  183. package/dist/generated/types/JlpRebalanceSettings.d.ts +0 -15
  184. package/dist/generated/types/JlpRebalanceSettings.js +0 -38
  185. package/dist/generated/types/KillSwitch.d.ts +0 -15
  186. package/dist/generated/types/KillSwitch.js +0 -38
  187. package/dist/generated/types/LevelRoles.d.ts +0 -16
  188. package/dist/generated/types/LevelRoles.js +0 -39
  189. package/dist/generated/types/MarketStatus.d.ts +0 -27
  190. package/dist/generated/types/MarketStatus.js +0 -54
  191. package/dist/generated/types/MarketType.d.ts +0 -20
  192. package/dist/generated/types/MarketType.js +0 -47
  193. package/dist/generated/types/MintJlpArgs.d.ts +0 -15
  194. package/dist/generated/types/MintJlpArgs.js +0 -38
  195. package/dist/generated/types/ModifyOrderParams.d.ts +0 -32
  196. package/dist/generated/types/ModifyOrderParams.js +0 -57
  197. package/dist/generated/types/ModifyOrderPolicy.d.ts +0 -20
  198. package/dist/generated/types/ModifyOrderPolicy.js +0 -47
  199. package/dist/generated/types/Movements.d.ts +0 -19
  200. package/dist/generated/types/Movements.js +0 -44
  201. package/dist/generated/types/OracleGuardRails.d.ts +0 -18
  202. package/dist/generated/types/OracleGuardRails.js +0 -43
  203. package/dist/generated/types/OracleSource.d.ts +0 -34
  204. package/dist/generated/types/OracleSource.js +0 -61
  205. package/dist/generated/types/OracleValidity.d.ts +0 -25
  206. package/dist/generated/types/OracleValidity.js +0 -52
  207. package/dist/generated/types/Order.d.ts +0 -43
  208. package/dist/generated/types/Order.js +0 -68
  209. package/dist/generated/types/OrderDirection.d.ts +0 -20
  210. package/dist/generated/types/OrderDirection.js +0 -47
  211. package/dist/generated/types/OrderParams.d.ts +0 -36
  212. package/dist/generated/types/OrderParams.js +0 -61
  213. package/dist/generated/types/OrderStatus.d.ts +0 -22
  214. package/dist/generated/types/OrderStatus.js +0 -49
  215. package/dist/generated/types/OrderTriggerCondition.d.ts +0 -22
  216. package/dist/generated/types/OrderTriggerCondition.js +0 -49
  217. package/dist/generated/types/OrderType.d.ts +0 -23
  218. package/dist/generated/types/OrderType.js +0 -50
  219. package/dist/generated/types/PermissionLevel.d.ts +0 -45
  220. package/dist/generated/types/PermissionLevel.js +0 -48
  221. package/dist/generated/types/PerpHedge.d.ts +0 -17
  222. package/dist/generated/types/PerpHedge.js +0 -42
  223. package/dist/generated/types/PerpPosition.d.ts +0 -29
  224. package/dist/generated/types/PerpPosition.js +0 -54
  225. package/dist/generated/types/PoolBalance.d.ts +0 -17
  226. package/dist/generated/types/PoolBalance.js +0 -42
  227. package/dist/generated/types/Position.d.ts +0 -20
  228. package/dist/generated/types/Position.js +0 -45
  229. package/dist/generated/types/PositionDirection.d.ts +0 -20
  230. package/dist/generated/types/PositionDirection.js +0 -47
  231. package/dist/generated/types/PositionDrift.d.ts +0 -18
  232. package/dist/generated/types/PositionDrift.js +0 -43
  233. package/dist/generated/types/PostOnlyParam.d.ts +0 -22
  234. package/dist/generated/types/PostOnlyParam.js +0 -49
  235. package/dist/generated/types/Price.d.ts +0 -41
  236. package/dist/generated/types/Price.js +0 -66
  237. package/dist/generated/types/PriceComp.d.ts +0 -19
  238. package/dist/generated/types/PriceComp.js +0 -44
  239. package/dist/generated/types/PriceDivergenceGuardRails.d.ts +0 -16
  240. package/dist/generated/types/PriceDivergenceGuardRails.js +0 -41
  241. package/dist/generated/types/PriceInfo.d.ts +0 -21
  242. package/dist/generated/types/PriceInfo.js +0 -46
  243. package/dist/generated/types/PriceStatus.d.ts +0 -22
  244. package/dist/generated/types/PriceStatus.js +0 -49
  245. package/dist/generated/types/PriceType.d.ts +0 -20
  246. package/dist/generated/types/PriceType.js +0 -47
  247. package/dist/generated/types/ProcessSwapDepositArgs.d.ts +0 -15
  248. package/dist/generated/types/ProcessSwapDepositArgs.js +0 -38
  249. package/dist/generated/types/ProcessSwapDepositIntrospectionArgs.d.ts +0 -15
  250. package/dist/generated/types/ProcessSwapDepositIntrospectionArgs.js +0 -38
  251. package/dist/generated/types/Program.d.ts +0 -19
  252. package/dist/generated/types/Program.js +0 -44
  253. package/dist/generated/types/ProgramStatus.d.ts +0 -20
  254. package/dist/generated/types/ProgramStatus.js +0 -47
  255. package/dist/generated/types/RebalanceConfig.d.ts +0 -15
  256. package/dist/generated/types/RebalanceConfig.js +0 -38
  257. package/dist/generated/types/Recipient.d.ts +0 -17
  258. package/dist/generated/types/Recipient.js +0 -42
  259. package/dist/generated/types/Recipients.d.ts +0 -17
  260. package/dist/generated/types/Recipients.js +0 -42
  261. package/dist/generated/types/RedeemJlpArgs.d.ts +0 -15
  262. package/dist/generated/types/RedeemJlpArgs.js +0 -38
  263. package/dist/generated/types/Role.d.ts +0 -25
  264. package/dist/generated/types/Role.js +0 -52
  265. package/dist/generated/types/ShiftCollateral.d.ts +0 -19
  266. package/dist/generated/types/ShiftCollateral.js +0 -44
  267. package/dist/generated/types/ShiftPosition.d.ts +0 -17
  268. package/dist/generated/types/ShiftPosition.js +0 -42
  269. package/dist/generated/types/ShortHolding.d.ts +0 -17
  270. package/dist/generated/types/ShortHolding.js +0 -42
  271. package/dist/generated/types/SplBase.d.ts +0 -17
  272. package/dist/generated/types/SplBase.js +0 -42
  273. package/dist/generated/types/SplMain.d.ts +0 -22
  274. package/dist/generated/types/SplMain.js +0 -47
  275. package/dist/generated/types/Spls.d.ts +0 -17
  276. package/dist/generated/types/Spls.js +0 -42
  277. package/dist/generated/types/SpotBalanceType.d.ts +0 -20
  278. package/dist/generated/types/SpotBalanceType.js +0 -47
  279. package/dist/generated/types/SpotPosition.d.ts +0 -23
  280. package/dist/generated/types/SpotPosition.js +0 -48
  281. package/dist/generated/types/Status.d.ts +0 -20
  282. package/dist/generated/types/Status.js +0 -47
  283. package/dist/generated/types/Strategy.d.ts +0 -31
  284. package/dist/generated/types/Strategy.js +0 -56
  285. package/dist/generated/types/StrategyRoleEntry.d.ts +0 -17
  286. package/dist/generated/types/StrategyRoleEntry.js +0 -42
  287. package/dist/generated/types/SubAccount.d.ts +0 -17
  288. package/dist/generated/types/SubAccount.js +0 -42
  289. package/dist/generated/types/Update.d.ts +0 -20
  290. package/dist/generated/types/Update.js +0 -47
  291. package/dist/generated/types/UserFees.d.ts +0 -20
  292. package/dist/generated/types/UserFees.js +0 -45
  293. package/dist/generated/types/ValidityGuardRails.d.ts +0 -18
  294. package/dist/generated/types/ValidityGuardRails.js +0 -43
  295. package/dist/generated/types/index.d.ts +0 -83
  296. package/dist/generated/types/index.js +0 -99
  297. package/dist/strategies/JlpStrategy.d.ts +0 -17
  298. package/dist/strategies/JlpStrategy.js +0 -337
  299. package/dist/strategies/LstStrategy.d.ts +0 -19
  300. package/dist/strategies/LstStrategy.js +0 -169
  301. package/dist/strategies/UsdcStrategy.d.ts +0 -12
  302. package/dist/strategies/UsdcStrategy.js +0 -89
  303. package/dist/strategies/index.d.ts +0 -3
  304. package/dist/strategies/index.js +0 -19
@@ -1,153 +0,0 @@
1
- "use strict";
2
- /**
3
- * This code was GENERATED using the solita package.
4
- * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
5
- *
6
- * See: https://github.com/metaplex-foundation/solita
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
- Object.defineProperty(o, "default", { enumerable: true, value: v });
21
- }) : function(o, v) {
22
- o["default"] = v;
23
- });
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
- __setModuleDefault(result, mod);
29
- return result;
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- exports.swapOrcaInstructionDiscriminator = exports.swapOrcaStruct = void 0;
33
- exports.createSwapOrcaInstruction = createSwapOrcaInstruction;
34
- const splToken = __importStar(require("@solana/spl-token"));
35
- const beet = __importStar(require("@metaplex-foundation/beet"));
36
- const web3 = __importStar(require("@solana/web3.js"));
37
- /**
38
- * @category Instructions
39
- * @category SwapOrca
40
- * @category generated
41
- */
42
- exports.swapOrcaStruct = new beet.BeetArgsStruct([
43
- ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
44
- ['amount', beet.u64],
45
- ['otherAmountThreshold', beet.u64],
46
- ['sqrtPriceLimit', beet.u128],
47
- ['aToB', beet.bool],
48
- ], 'SwapOrcaInstructionArgs');
49
- exports.swapOrcaInstructionDiscriminator = [
50
- 40, 245, 11, 107, 43, 203, 151, 127,
51
- ];
52
- /**
53
- * Creates a _SwapOrca_ instruction.
54
- *
55
- * @param accounts that will be accessed while the instruction is processed
56
- * @param args to provide as instruction data to the program
57
- *
58
- * @category Instructions
59
- * @category SwapOrca
60
- * @category generated
61
- */
62
- function createSwapOrcaInstruction(accounts, args, programId = new web3.PublicKey('9CtYQNCz3LaQ9DnqXa83q6gdHGwMeN6aQ7KqqotBmeke')) {
63
- var _a;
64
- const [data] = exports.swapOrcaStruct.serialize(Object.assign({ instructionDiscriminator: exports.swapOrcaInstructionDiscriminator }, args));
65
- const keys = [
66
- {
67
- pubkey: accounts.admin,
68
- isWritable: true,
69
- isSigner: true,
70
- },
71
- {
72
- pubkey: accounts.main,
73
- isWritable: false,
74
- isSigner: false,
75
- },
76
- {
77
- pubkey: accounts.strategyController,
78
- isWritable: false,
79
- isSigner: false,
80
- },
81
- {
82
- pubkey: accounts.adminPermissions,
83
- isWritable: false,
84
- isSigner: false,
85
- },
86
- {
87
- pubkey: accounts.whirlpool,
88
- isWritable: true,
89
- isSigner: false,
90
- },
91
- {
92
- pubkey: accounts.whirlpoolProgram,
93
- isWritable: false,
94
- isSigner: false,
95
- },
96
- {
97
- pubkey: (_a = accounts.tokenProgram) !== null && _a !== void 0 ? _a : splToken.TOKEN_PROGRAM_ID,
98
- isWritable: false,
99
- isSigner: false,
100
- },
101
- {
102
- pubkey: accounts.tokenOwnerAccountA,
103
- isWritable: true,
104
- isSigner: false,
105
- },
106
- {
107
- pubkey: accounts.tokenVaultA,
108
- isWritable: true,
109
- isSigner: false,
110
- },
111
- {
112
- pubkey: accounts.tokenOwnerAccountB,
113
- isWritable: true,
114
- isSigner: false,
115
- },
116
- {
117
- pubkey: accounts.tokenVaultB,
118
- isWritable: true,
119
- isSigner: false,
120
- },
121
- {
122
- pubkey: accounts.tickArray0,
123
- isWritable: true,
124
- isSigner: false,
125
- },
126
- {
127
- pubkey: accounts.tickArray1,
128
- isWritable: true,
129
- isSigner: false,
130
- },
131
- {
132
- pubkey: accounts.tickArray2,
133
- isWritable: true,
134
- isSigner: false,
135
- },
136
- {
137
- pubkey: accounts.oracle,
138
- isWritable: true,
139
- isSigner: false,
140
- },
141
- ];
142
- if (accounts.anchorRemainingAccounts != null) {
143
- for (const acc of accounts.anchorRemainingAccounts) {
144
- keys.push(acc);
145
- }
146
- }
147
- const ix = new web3.TransactionInstruction({
148
- programId,
149
- keys,
150
- data,
151
- });
152
- return ix;
153
- }
@@ -1,98 +0,0 @@
1
- /**
2
- * This code was GENERATED using the solita package.
3
- * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
- *
5
- * See: https://github.com/metaplex-foundation/solita
6
- */
7
- import * as beet from '@metaplex-foundation/beet';
8
- import * as web3 from '@solana/web3.js';
9
- /**
10
- * @category Instructions
11
- * @category SwapOrcaTwoHop
12
- * @category generated
13
- */
14
- export type SwapOrcaTwoHopInstructionArgs = {
15
- amount: beet.bignum;
16
- otherAmountThreshold: beet.bignum;
17
- aToBOne: boolean;
18
- aToBTwo: boolean;
19
- sqrtPriceLimitOne: beet.bignum;
20
- sqrtPriceLimitTwo: beet.bignum;
21
- };
22
- /**
23
- * @category Instructions
24
- * @category SwapOrcaTwoHop
25
- * @category generated
26
- */
27
- export declare const swapOrcaTwoHopStruct: beet.BeetArgsStruct<SwapOrcaTwoHopInstructionArgs & {
28
- instructionDiscriminator: number[];
29
- }>;
30
- /**
31
- * Accounts required by the _swapOrcaTwoHop_ instruction
32
- *
33
- * @property [_writable_, **signer**] admin
34
- * @property [] main
35
- * @property [] strategyController
36
- * @property [] adminPermissions
37
- * @property [] whirlpoolProgram
38
- * @property [_writable_] whirlpoolOne
39
- * @property [_writable_] whirlpoolTwo
40
- * @property [_writable_] tokenOwnerAccountOneA
41
- * @property [_writable_] tokenVaultOneA
42
- * @property [_writable_] tokenOwnerAccountOneB
43
- * @property [_writable_] tokenVaultOneB
44
- * @property [_writable_] tokenOwnerAccountTwoA
45
- * @property [_writable_] tokenVaultTwoA
46
- * @property [_writable_] tokenOwnerAccountTwoB
47
- * @property [_writable_] tokenVaultTwoB
48
- * @property [_writable_] tickArrayOne0
49
- * @property [_writable_] tickArrayOne1
50
- * @property [_writable_] tickArrayOne2
51
- * @property [_writable_] tickArrayTwo0
52
- * @property [_writable_] tickArrayTwo1
53
- * @property [_writable_] tickArrayTwo2
54
- * @property [_writable_] oracleOne
55
- * @property [_writable_] oracleTwo
56
- * @category Instructions
57
- * @category SwapOrcaTwoHop
58
- * @category generated
59
- */
60
- export type SwapOrcaTwoHopInstructionAccounts = {
61
- admin: web3.PublicKey;
62
- main: web3.PublicKey;
63
- strategyController: web3.PublicKey;
64
- adminPermissions: web3.PublicKey;
65
- whirlpoolProgram: web3.PublicKey;
66
- tokenProgram?: web3.PublicKey;
67
- whirlpoolOne: web3.PublicKey;
68
- whirlpoolTwo: web3.PublicKey;
69
- tokenOwnerAccountOneA: web3.PublicKey;
70
- tokenVaultOneA: web3.PublicKey;
71
- tokenOwnerAccountOneB: web3.PublicKey;
72
- tokenVaultOneB: web3.PublicKey;
73
- tokenOwnerAccountTwoA: web3.PublicKey;
74
- tokenVaultTwoA: web3.PublicKey;
75
- tokenOwnerAccountTwoB: web3.PublicKey;
76
- tokenVaultTwoB: web3.PublicKey;
77
- tickArrayOne0: web3.PublicKey;
78
- tickArrayOne1: web3.PublicKey;
79
- tickArrayOne2: web3.PublicKey;
80
- tickArrayTwo0: web3.PublicKey;
81
- tickArrayTwo1: web3.PublicKey;
82
- tickArrayTwo2: web3.PublicKey;
83
- oracleOne: web3.PublicKey;
84
- oracleTwo: web3.PublicKey;
85
- anchorRemainingAccounts?: web3.AccountMeta[];
86
- };
87
- export declare const swapOrcaTwoHopInstructionDiscriminator: number[];
88
- /**
89
- * Creates a _SwapOrcaTwoHop_ instruction.
90
- *
91
- * @param accounts that will be accessed while the instruction is processed
92
- * @param args to provide as instruction data to the program
93
- *
94
- * @category Instructions
95
- * @category SwapOrcaTwoHop
96
- * @category generated
97
- */
98
- export declare function createSwapOrcaTwoHopInstruction(accounts: SwapOrcaTwoHopInstructionAccounts, args: SwapOrcaTwoHopInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction;
@@ -1,200 +0,0 @@
1
- "use strict";
2
- /**
3
- * This code was GENERATED using the solita package.
4
- * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
5
- *
6
- * See: https://github.com/metaplex-foundation/solita
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
- Object.defineProperty(o, "default", { enumerable: true, value: v });
21
- }) : function(o, v) {
22
- o["default"] = v;
23
- });
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
- __setModuleDefault(result, mod);
29
- return result;
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- exports.swapOrcaTwoHopInstructionDiscriminator = exports.swapOrcaTwoHopStruct = void 0;
33
- exports.createSwapOrcaTwoHopInstruction = createSwapOrcaTwoHopInstruction;
34
- const splToken = __importStar(require("@solana/spl-token"));
35
- const beet = __importStar(require("@metaplex-foundation/beet"));
36
- const web3 = __importStar(require("@solana/web3.js"));
37
- /**
38
- * @category Instructions
39
- * @category SwapOrcaTwoHop
40
- * @category generated
41
- */
42
- exports.swapOrcaTwoHopStruct = new beet.BeetArgsStruct([
43
- ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
44
- ['amount', beet.u64],
45
- ['otherAmountThreshold', beet.u64],
46
- ['aToBOne', beet.bool],
47
- ['aToBTwo', beet.bool],
48
- ['sqrtPriceLimitOne', beet.u128],
49
- ['sqrtPriceLimitTwo', beet.u128],
50
- ], 'SwapOrcaTwoHopInstructionArgs');
51
- exports.swapOrcaTwoHopInstructionDiscriminator = [
52
- 71, 39, 64, 164, 244, 244, 202, 180,
53
- ];
54
- /**
55
- * Creates a _SwapOrcaTwoHop_ instruction.
56
- *
57
- * @param accounts that will be accessed while the instruction is processed
58
- * @param args to provide as instruction data to the program
59
- *
60
- * @category Instructions
61
- * @category SwapOrcaTwoHop
62
- * @category generated
63
- */
64
- function createSwapOrcaTwoHopInstruction(accounts, args, programId = new web3.PublicKey('9CtYQNCz3LaQ9DnqXa83q6gdHGwMeN6aQ7KqqotBmeke')) {
65
- var _a;
66
- const [data] = exports.swapOrcaTwoHopStruct.serialize(Object.assign({ instructionDiscriminator: exports.swapOrcaTwoHopInstructionDiscriminator }, args));
67
- const keys = [
68
- {
69
- pubkey: accounts.admin,
70
- isWritable: true,
71
- isSigner: true,
72
- },
73
- {
74
- pubkey: accounts.main,
75
- isWritable: false,
76
- isSigner: false,
77
- },
78
- {
79
- pubkey: accounts.strategyController,
80
- isWritable: false,
81
- isSigner: false,
82
- },
83
- {
84
- pubkey: accounts.adminPermissions,
85
- isWritable: false,
86
- isSigner: false,
87
- },
88
- {
89
- pubkey: accounts.whirlpoolProgram,
90
- isWritable: false,
91
- isSigner: false,
92
- },
93
- {
94
- pubkey: (_a = accounts.tokenProgram) !== null && _a !== void 0 ? _a : splToken.TOKEN_PROGRAM_ID,
95
- isWritable: false,
96
- isSigner: false,
97
- },
98
- {
99
- pubkey: accounts.whirlpoolOne,
100
- isWritable: true,
101
- isSigner: false,
102
- },
103
- {
104
- pubkey: accounts.whirlpoolTwo,
105
- isWritable: true,
106
- isSigner: false,
107
- },
108
- {
109
- pubkey: accounts.tokenOwnerAccountOneA,
110
- isWritable: true,
111
- isSigner: false,
112
- },
113
- {
114
- pubkey: accounts.tokenVaultOneA,
115
- isWritable: true,
116
- isSigner: false,
117
- },
118
- {
119
- pubkey: accounts.tokenOwnerAccountOneB,
120
- isWritable: true,
121
- isSigner: false,
122
- },
123
- {
124
- pubkey: accounts.tokenVaultOneB,
125
- isWritable: true,
126
- isSigner: false,
127
- },
128
- {
129
- pubkey: accounts.tokenOwnerAccountTwoA,
130
- isWritable: true,
131
- isSigner: false,
132
- },
133
- {
134
- pubkey: accounts.tokenVaultTwoA,
135
- isWritable: true,
136
- isSigner: false,
137
- },
138
- {
139
- pubkey: accounts.tokenOwnerAccountTwoB,
140
- isWritable: true,
141
- isSigner: false,
142
- },
143
- {
144
- pubkey: accounts.tokenVaultTwoB,
145
- isWritable: true,
146
- isSigner: false,
147
- },
148
- {
149
- pubkey: accounts.tickArrayOne0,
150
- isWritable: true,
151
- isSigner: false,
152
- },
153
- {
154
- pubkey: accounts.tickArrayOne1,
155
- isWritable: true,
156
- isSigner: false,
157
- },
158
- {
159
- pubkey: accounts.tickArrayOne2,
160
- isWritable: true,
161
- isSigner: false,
162
- },
163
- {
164
- pubkey: accounts.tickArrayTwo0,
165
- isWritable: true,
166
- isSigner: false,
167
- },
168
- {
169
- pubkey: accounts.tickArrayTwo1,
170
- isWritable: true,
171
- isSigner: false,
172
- },
173
- {
174
- pubkey: accounts.tickArrayTwo2,
175
- isWritable: true,
176
- isSigner: false,
177
- },
178
- {
179
- pubkey: accounts.oracleOne,
180
- isWritable: true,
181
- isSigner: false,
182
- },
183
- {
184
- pubkey: accounts.oracleTwo,
185
- isWritable: true,
186
- isSigner: false,
187
- },
188
- ];
189
- if (accounts.anchorRemainingAccounts != null) {
190
- for (const acc of accounts.anchorRemainingAccounts) {
191
- keys.push(acc);
192
- }
193
- }
194
- const ix = new web3.TransactionInstruction({
195
- programId,
196
- keys,
197
- data,
198
- });
199
- return ix;
200
- }
@@ -1,58 +0,0 @@
1
- /**
2
- * This code was GENERATED using the solita package.
3
- * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
- *
5
- * See: https://github.com/metaplex-foundation/solita
6
- */
7
- import * as beet from '@metaplex-foundation/beet';
8
- import * as web3 from '@solana/web3.js';
9
- import { Action } from '../types/Action';
10
- import { Role } from '../types/Role';
11
- import { Update } from '../types/Update';
12
- /**
13
- * @category Instructions
14
- * @category UpdateActionRoleProtocol
15
- * @category generated
16
- */
17
- export type UpdateActionRoleProtocolInstructionArgs = {
18
- action: Action;
19
- role: Role;
20
- update: Update;
21
- };
22
- /**
23
- * @category Instructions
24
- * @category UpdateActionRoleProtocol
25
- * @category generated
26
- */
27
- export declare const updateActionRoleProtocolStruct: beet.BeetArgsStruct<UpdateActionRoleProtocolInstructionArgs & {
28
- instructionDiscriminator: number[];
29
- }>;
30
- /**
31
- * Accounts required by the _updateActionRoleProtocol_ instruction
32
- *
33
- * @property [_writable_] main
34
- * @property [_writable_, **signer**] admin
35
- * @property [_writable_] adminPermissions
36
- * @category Instructions
37
- * @category UpdateActionRoleProtocol
38
- * @category generated
39
- */
40
- export type UpdateActionRoleProtocolInstructionAccounts = {
41
- main: web3.PublicKey;
42
- admin: web3.PublicKey;
43
- systemProgram?: web3.PublicKey;
44
- adminPermissions: web3.PublicKey;
45
- anchorRemainingAccounts?: web3.AccountMeta[];
46
- };
47
- export declare const updateActionRoleProtocolInstructionDiscriminator: number[];
48
- /**
49
- * Creates a _UpdateActionRoleProtocol_ instruction.
50
- *
51
- * @param accounts that will be accessed while the instruction is processed
52
- * @param args to provide as instruction data to the program
53
- *
54
- * @category Instructions
55
- * @category UpdateActionRoleProtocol
56
- * @category generated
57
- */
58
- export declare function createUpdateActionRoleProtocolInstruction(accounts: UpdateActionRoleProtocolInstructionAccounts, args: UpdateActionRoleProtocolInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction;
@@ -1,99 +0,0 @@
1
- "use strict";
2
- /**
3
- * This code was GENERATED using the solita package.
4
- * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
5
- *
6
- * See: https://github.com/metaplex-foundation/solita
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
- Object.defineProperty(o, "default", { enumerable: true, value: v });
21
- }) : function(o, v) {
22
- o["default"] = v;
23
- });
24
- var __importStar = (this && this.__importStar) || function (mod) {
25
- if (mod && mod.__esModule) return mod;
26
- var result = {};
27
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
- __setModuleDefault(result, mod);
29
- return result;
30
- };
31
- Object.defineProperty(exports, "__esModule", { value: true });
32
- exports.updateActionRoleProtocolInstructionDiscriminator = exports.updateActionRoleProtocolStruct = void 0;
33
- exports.createUpdateActionRoleProtocolInstruction = createUpdateActionRoleProtocolInstruction;
34
- const beet = __importStar(require("@metaplex-foundation/beet"));
35
- const web3 = __importStar(require("@solana/web3.js"));
36
- const Action_1 = require("../types/Action");
37
- const Role_1 = require("../types/Role");
38
- const Update_1 = require("../types/Update");
39
- /**
40
- * @category Instructions
41
- * @category UpdateActionRoleProtocol
42
- * @category generated
43
- */
44
- exports.updateActionRoleProtocolStruct = new beet.BeetArgsStruct([
45
- ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)],
46
- ['action', Action_1.actionBeet],
47
- ['role', Role_1.roleBeet],
48
- ['update', Update_1.updateBeet],
49
- ], 'UpdateActionRoleProtocolInstructionArgs');
50
- exports.updateActionRoleProtocolInstructionDiscriminator = [
51
- 48, 71, 125, 156, 34, 88, 138, 156,
52
- ];
53
- /**
54
- * Creates a _UpdateActionRoleProtocol_ instruction.
55
- *
56
- * @param accounts that will be accessed while the instruction is processed
57
- * @param args to provide as instruction data to the program
58
- *
59
- * @category Instructions
60
- * @category UpdateActionRoleProtocol
61
- * @category generated
62
- */
63
- function createUpdateActionRoleProtocolInstruction(accounts, args, programId = new web3.PublicKey('9CtYQNCz3LaQ9DnqXa83q6gdHGwMeN6aQ7KqqotBmeke')) {
64
- var _a;
65
- const [data] = exports.updateActionRoleProtocolStruct.serialize(Object.assign({ instructionDiscriminator: exports.updateActionRoleProtocolInstructionDiscriminator }, args));
66
- const keys = [
67
- {
68
- pubkey: accounts.main,
69
- isWritable: true,
70
- isSigner: false,
71
- },
72
- {
73
- pubkey: accounts.admin,
74
- isWritable: true,
75
- isSigner: true,
76
- },
77
- {
78
- pubkey: (_a = accounts.systemProgram) !== null && _a !== void 0 ? _a : web3.SystemProgram.programId,
79
- isWritable: false,
80
- isSigner: false,
81
- },
82
- {
83
- pubkey: accounts.adminPermissions,
84
- isWritable: true,
85
- isSigner: false,
86
- },
87
- ];
88
- if (accounts.anchorRemainingAccounts != null) {
89
- for (const acc of accounts.anchorRemainingAccounts) {
90
- keys.push(acc);
91
- }
92
- }
93
- const ix = new web3.TransactionInstruction({
94
- programId,
95
- keys,
96
- data,
97
- });
98
- return ix;
99
- }
@@ -1,61 +0,0 @@
1
- /**
2
- * This code was GENERATED using the solita package.
3
- * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality.
4
- *
5
- * See: https://github.com/metaplex-foundation/solita
6
- */
7
- import * as beet from '@metaplex-foundation/beet';
8
- import * as web3 from '@solana/web3.js';
9
- import { Action } from '../types/Action';
10
- import { Role } from '../types/Role';
11
- import { Update } from '../types/Update';
12
- /**
13
- * @category Instructions
14
- * @category UpdateActionRoleStrategy
15
- * @category generated
16
- */
17
- export type UpdateActionRoleStrategyInstructionArgs = {
18
- action: Action;
19
- role: Role;
20
- update: Update;
21
- strategyId: number;
22
- };
23
- /**
24
- * @category Instructions
25
- * @category UpdateActionRoleStrategy
26
- * @category generated
27
- */
28
- export declare const updateActionRoleStrategyStruct: beet.BeetArgsStruct<UpdateActionRoleStrategyInstructionArgs & {
29
- instructionDiscriminator: number[];
30
- }>;
31
- /**
32
- * Accounts required by the _updateActionRoleStrategy_ instruction
33
- *
34
- * @property [_writable_] main
35
- * @property [_writable_, **signer**] admin
36
- * @property [_writable_] strategy
37
- * @property [_writable_] adminPermissions
38
- * @category Instructions
39
- * @category UpdateActionRoleStrategy
40
- * @category generated
41
- */
42
- export type UpdateActionRoleStrategyInstructionAccounts = {
43
- main: web3.PublicKey;
44
- admin: web3.PublicKey;
45
- systemProgram?: web3.PublicKey;
46
- strategy: web3.PublicKey;
47
- adminPermissions: web3.PublicKey;
48
- anchorRemainingAccounts?: web3.AccountMeta[];
49
- };
50
- export declare const updateActionRoleStrategyInstructionDiscriminator: number[];
51
- /**
52
- * Creates a _UpdateActionRoleStrategy_ instruction.
53
- *
54
- * @param accounts that will be accessed while the instruction is processed
55
- * @param args to provide as instruction data to the program
56
- *
57
- * @category Instructions
58
- * @category UpdateActionRoleStrategy
59
- * @category generated
60
- */
61
- export declare function createUpdateActionRoleStrategyInstruction(accounts: UpdateActionRoleStrategyInstructionAccounts, args: UpdateActionRoleStrategyInstructionArgs, programId?: web3.PublicKey): web3.TransactionInstruction;