@kamino-finance/klend-sdk 2.10.6

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 (369) hide show
  1. package/README.md +85 -0
  2. package/dist/classes/action.d.ts +154 -0
  3. package/dist/classes/action.js +1505 -0
  4. package/dist/classes/action.js.map +1 -0
  5. package/dist/classes/curve.d.ts +15 -0
  6. package/dist/classes/curve.js +32 -0
  7. package/dist/classes/curve.js.map +1 -0
  8. package/dist/classes/fraction.d.ts +23 -0
  9. package/dist/classes/fraction.js +60 -0
  10. package/dist/classes/fraction.js.map +1 -0
  11. package/dist/classes/index.d.ts +8 -0
  12. package/dist/classes/index.js +25 -0
  13. package/dist/classes/index.js.map +1 -0
  14. package/dist/classes/jupiterPerps.d.ts +2 -0
  15. package/dist/classes/jupiterPerps.js +25 -0
  16. package/dist/classes/jupiterPerps.js.map +1 -0
  17. package/dist/classes/market.d.ts +140 -0
  18. package/dist/classes/market.js +901 -0
  19. package/dist/classes/market.js.map +1 -0
  20. package/dist/classes/obligation.d.ts +170 -0
  21. package/dist/classes/obligation.js +610 -0
  22. package/dist/classes/obligation.js.map +1 -0
  23. package/dist/classes/reserve.d.ts +161 -0
  24. package/dist/classes/reserve.js +474 -0
  25. package/dist/classes/reserve.js.map +1 -0
  26. package/dist/classes/shared.d.ts +41 -0
  27. package/dist/classes/shared.js +10 -0
  28. package/dist/classes/shared.js.map +1 -0
  29. package/dist/classes/utils.d.ts +40 -0
  30. package/dist/classes/utils.js +129 -0
  31. package/dist/classes/utils.js.map +1 -0
  32. package/dist/idl.json +4102 -0
  33. package/dist/idl_codegen/accounts/LendingMarket.d.ts +153 -0
  34. package/dist/idl_codegen/accounts/LendingMarket.js +204 -0
  35. package/dist/idl_codegen/accounts/LendingMarket.js.map +1 -0
  36. package/dist/idl_codegen/accounts/Obligation.d.ts +139 -0
  37. package/dist/idl_codegen/accounts/Obligation.js +193 -0
  38. package/dist/idl_codegen/accounts/Obligation.js.map +1 -0
  39. package/dist/idl_codegen/accounts/ReferrerState.d.ts +22 -0
  40. package/dist/idl_codegen/accounts/ReferrerState.js +101 -0
  41. package/dist/idl_codegen/accounts/ReferrerState.js.map +1 -0
  42. package/dist/idl_codegen/accounts/ReferrerTokenState.d.ts +51 -0
  43. package/dist/idl_codegen/accounts/ReferrerTokenState.js +126 -0
  44. package/dist/idl_codegen/accounts/ReferrerTokenState.js.map +1 -0
  45. package/dist/idl_codegen/accounts/Reserve.d.ts +72 -0
  46. package/dist/idl_codegen/accounts/Reserve.js +156 -0
  47. package/dist/idl_codegen/accounts/Reserve.js.map +1 -0
  48. package/dist/idl_codegen/accounts/ShortUrl.d.ts +22 -0
  49. package/dist/idl_codegen/accounts/ShortUrl.js +101 -0
  50. package/dist/idl_codegen/accounts/ShortUrl.js.map +1 -0
  51. package/dist/idl_codegen/accounts/UserMetadata.d.ts +48 -0
  52. package/dist/idl_codegen/accounts/UserMetadata.js +126 -0
  53. package/dist/idl_codegen/accounts/UserMetadata.js.map +1 -0
  54. package/dist/idl_codegen/accounts/UserState.d.ts +143 -0
  55. package/dist/idl_codegen/accounts/UserState.js +180 -0
  56. package/dist/idl_codegen/accounts/UserState.js.map +1 -0
  57. package/dist/idl_codegen/accounts/index.d.ts +16 -0
  58. package/dist/idl_codegen/accounts/index.js +20 -0
  59. package/dist/idl_codegen/accounts/index.js.map +1 -0
  60. package/dist/idl_codegen/errors/anchor.d.ts +434 -0
  61. package/dist/idl_codegen/errors/anchor.js +713 -0
  62. package/dist/idl_codegen/errors/anchor.js.map +1 -0
  63. package/dist/idl_codegen/errors/custom.d.ts +730 -0
  64. package/dist/idl_codegen/errors/custom.js +1194 -0
  65. package/dist/idl_codegen/errors/custom.js.map +1 -0
  66. package/dist/idl_codegen/errors/index.d.ts +5 -0
  67. package/dist/idl_codegen/errors/index.js +71 -0
  68. package/dist/idl_codegen/errors/index.js.map +1 -0
  69. package/dist/idl_codegen/instructions/borrowObligationLiquidity.d.ts +20 -0
  70. package/dist/idl_codegen/instructions/borrowObligationLiquidity.js +75 -0
  71. package/dist/idl_codegen/instructions/borrowObligationLiquidity.js.map +1 -0
  72. package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.d.ts +9 -0
  73. package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.js +20 -0
  74. package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.js.map +1 -0
  75. package/dist/idl_codegen/instructions/depositObligationCollateral.d.ts +17 -0
  76. package/dist/idl_codegen/instructions/depositObligationCollateral.js +64 -0
  77. package/dist/idl_codegen/instructions/depositObligationCollateral.js.map +1 -0
  78. package/dist/idl_codegen/instructions/depositReserveLiquidity.d.ts +19 -0
  79. package/dist/idl_codegen/instructions/depositReserveLiquidity.js +74 -0
  80. package/dist/idl_codegen/instructions/depositReserveLiquidity.js.map +1 -0
  81. package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.d.ts +21 -0
  82. package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.js +80 -0
  83. package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.js.map +1 -0
  84. package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.d.ts +20 -0
  85. package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.js +75 -0
  86. package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.js.map +1 -0
  87. package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.d.ts +21 -0
  88. package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.js +75 -0
  89. package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.js.map +1 -0
  90. package/dist/idl_codegen/instructions/idlMissingTypes.d.ts +18 -0
  91. package/dist/idl_codegen/instructions/idlMissingTypes.js +62 -0
  92. package/dist/idl_codegen/instructions/idlMissingTypes.js.map +1 -0
  93. package/dist/idl_codegen/instructions/index.d.ts +66 -0
  94. package/dist/idl_codegen/instructions/index.js +70 -0
  95. package/dist/idl_codegen/instructions/index.js.map +1 -0
  96. package/dist/idl_codegen/instructions/initFarmsForReserve.d.ts +19 -0
  97. package/dist/idl_codegen/instructions/initFarmsForReserve.js +63 -0
  98. package/dist/idl_codegen/instructions/initFarmsForReserve.js.map +1 -0
  99. package/dist/idl_codegen/instructions/initLendingMarket.d.ts +13 -0
  100. package/dist/idl_codegen/instructions/initLendingMarket.js +55 -0
  101. package/dist/idl_codegen/instructions/initLendingMarket.js.map +1 -0
  102. package/dist/idl_codegen/instructions/initObligation.d.ts +19 -0
  103. package/dist/idl_codegen/instructions/initObligation.js +55 -0
  104. package/dist/idl_codegen/instructions/initObligation.js.map +1 -0
  105. package/dist/idl_codegen/instructions/initObligationFarmsForReserve.d.ts +20 -0
  106. package/dist/idl_codegen/instructions/initObligationFarmsForReserve.js +60 -0
  107. package/dist/idl_codegen/instructions/initObligationFarmsForReserve.js.map +1 -0
  108. package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.d.ts +14 -0
  109. package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.js +54 -0
  110. package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.js.map +1 -0
  111. package/dist/idl_codegen/instructions/initReferrerTokenState.d.ts +14 -0
  112. package/dist/idl_codegen/instructions/initReferrerTokenState.js +50 -0
  113. package/dist/idl_codegen/instructions/initReferrerTokenState.js.map +1 -0
  114. package/dist/idl_codegen/instructions/initReserve.d.ts +16 -0
  115. package/dist/idl_codegen/instructions/initReserve.js +47 -0
  116. package/dist/idl_codegen/instructions/initReserve.js.map +1 -0
  117. package/dist/idl_codegen/instructions/initUserMetadata.d.ts +14 -0
  118. package/dist/idl_codegen/instructions/initUserMetadata.js +54 -0
  119. package/dist/idl_codegen/instructions/initUserMetadata.js.map +1 -0
  120. package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts +27 -0
  121. package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.js +102 -0
  122. package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.js.map +1 -0
  123. package/dist/idl_codegen/instructions/redeemFees.d.ts +10 -0
  124. package/dist/idl_codegen/instructions/redeemFees.js +33 -0
  125. package/dist/idl_codegen/instructions/redeemFees.js.map +1 -0
  126. package/dist/idl_codegen/instructions/redeemReserveCollateral.d.ts +19 -0
  127. package/dist/idl_codegen/instructions/redeemReserveCollateral.js +78 -0
  128. package/dist/idl_codegen/instructions/redeemReserveCollateral.js.map +1 -0
  129. package/dist/idl_codegen/instructions/refreshObligation.d.ts +6 -0
  130. package/dist/idl_codegen/instructions/refreshObligation.js +17 -0
  131. package/dist/idl_codegen/instructions/refreshObligation.js.map +1 -0
  132. package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.d.ts +19 -0
  133. package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.js +63 -0
  134. package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.js.map +1 -0
  135. package/dist/idl_codegen/instructions/refreshReserve.d.ts +10 -0
  136. package/dist/idl_codegen/instructions/refreshReserve.js +29 -0
  137. package/dist/idl_codegen/instructions/refreshReserve.js.map +1 -0
  138. package/dist/idl_codegen/instructions/repayObligationLiquidity.d.ts +17 -0
  139. package/dist/idl_codegen/instructions/repayObligationLiquidity.js +60 -0
  140. package/dist/idl_codegen/instructions/repayObligationLiquidity.js.map +1 -0
  141. package/dist/idl_codegen/instructions/requestElevationGroup.d.ts +11 -0
  142. package/dist/idl_codegen/instructions/requestElevationGroup.js +47 -0
  143. package/dist/idl_codegen/instructions/requestElevationGroup.js.map +1 -0
  144. package/dist/idl_codegen/instructions/socializeLoss.d.ts +14 -0
  145. package/dist/idl_codegen/instructions/socializeLoss.js +53 -0
  146. package/dist/idl_codegen/instructions/socializeLoss.js.map +1 -0
  147. package/dist/idl_codegen/instructions/updateEntireReserveConfig.d.ts +13 -0
  148. package/dist/idl_codegen/instructions/updateEntireReserveConfig.js +51 -0
  149. package/dist/idl_codegen/instructions/updateEntireReserveConfig.js.map +1 -0
  150. package/dist/idl_codegen/instructions/updateLendingMarket.d.ts +12 -0
  151. package/dist/idl_codegen/instructions/updateLendingMarket.js +50 -0
  152. package/dist/idl_codegen/instructions/updateLendingMarket.js.map +1 -0
  153. package/dist/idl_codegen/instructions/updateLendingMarketOwner.d.ts +6 -0
  154. package/dist/idl_codegen/instructions/updateLendingMarketOwner.js +21 -0
  155. package/dist/idl_codegen/instructions/updateLendingMarketOwner.js.map +1 -0
  156. package/dist/idl_codegen/instructions/updateReserveConfig.d.ts +13 -0
  157. package/dist/idl_codegen/instructions/updateReserveConfig.js +51 -0
  158. package/dist/idl_codegen/instructions/updateReserveConfig.js.map +1 -0
  159. package/dist/idl_codegen/instructions/updateSingleReserveConfig.d.ts +13 -0
  160. package/dist/idl_codegen/instructions/updateSingleReserveConfig.js +51 -0
  161. package/dist/idl_codegen/instructions/updateSingleReserveConfig.js.map +1 -0
  162. package/dist/idl_codegen/instructions/withdrawObligationCollateral.d.ts +18 -0
  163. package/dist/idl_codegen/instructions/withdrawObligationCollateral.js +69 -0
  164. package/dist/idl_codegen/instructions/withdrawObligationCollateral.js.map +1 -0
  165. package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts +21 -0
  166. package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js +84 -0
  167. package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js.map +1 -0
  168. package/dist/idl_codegen/instructions/withdrawProtocolFee.d.ts +16 -0
  169. package/dist/idl_codegen/instructions/withdrawProtocolFee.js +59 -0
  170. package/dist/idl_codegen/instructions/withdrawProtocolFee.js.map +1 -0
  171. package/dist/idl_codegen/instructions/withdrawReferrerFees.d.ts +12 -0
  172. package/dist/idl_codegen/instructions/withdrawReferrerFees.js +35 -0
  173. package/dist/idl_codegen/instructions/withdrawReferrerFees.js.map +1 -0
  174. package/dist/idl_codegen/programId.d.ts +4 -0
  175. package/dist/idl_codegen/programId.js +13 -0
  176. package/dist/idl_codegen/programId.js.map +1 -0
  177. package/dist/idl_codegen/types/AssetTier.d.ts +44 -0
  178. package/dist/idl_codegen/types/AssetTier.js +128 -0
  179. package/dist/idl_codegen/types/AssetTier.js.map +1 -0
  180. package/dist/idl_codegen/types/BigFractionBytes.d.ts +27 -0
  181. package/dist/idl_codegen/types/BigFractionBytes.js +73 -0
  182. package/dist/idl_codegen/types/BigFractionBytes.js.map +1 -0
  183. package/dist/idl_codegen/types/BorrowRateCurve.d.ts +27 -0
  184. package/dist/idl_codegen/types/BorrowRateCurve.js +62 -0
  185. package/dist/idl_codegen/types/BorrowRateCurve.js.map +1 -0
  186. package/dist/idl_codegen/types/CurvePoint.d.ts +26 -0
  187. package/dist/idl_codegen/types/CurvePoint.js +66 -0
  188. package/dist/idl_codegen/types/CurvePoint.js.map +1 -0
  189. package/dist/idl_codegen/types/ElevationGroup.d.ts +52 -0
  190. package/dist/idl_codegen/types/ElevationGroup.js +103 -0
  191. package/dist/idl_codegen/types/ElevationGroup.js.map +1 -0
  192. package/dist/idl_codegen/types/FeeCalculation.d.ts +31 -0
  193. package/dist/idl_codegen/types/FeeCalculation.js +102 -0
  194. package/dist/idl_codegen/types/FeeCalculation.js.map +1 -0
  195. package/dist/idl_codegen/types/InitObligationArgs.d.ts +26 -0
  196. package/dist/idl_codegen/types/InitObligationArgs.js +66 -0
  197. package/dist/idl_codegen/types/InitObligationArgs.js.map +1 -0
  198. package/dist/idl_codegen/types/LastUpdate.d.ts +47 -0
  199. package/dist/idl_codegen/types/LastUpdate.js +86 -0
  200. package/dist/idl_codegen/types/LastUpdate.js.map +1 -0
  201. package/dist/idl_codegen/types/ObligationCollateral.d.ts +48 -0
  202. package/dist/idl_codegen/types/ObligationCollateral.js +87 -0
  203. package/dist/idl_codegen/types/ObligationCollateral.js.map +1 -0
  204. package/dist/idl_codegen/types/ObligationLiquidity.d.ts +75 -0
  205. package/dist/idl_codegen/types/ObligationLiquidity.js +107 -0
  206. package/dist/idl_codegen/types/ObligationLiquidity.js.map +1 -0
  207. package/dist/idl_codegen/types/PriceHeuristic.d.ts +41 -0
  208. package/dist/idl_codegen/types/PriceHeuristic.js +75 -0
  209. package/dist/idl_codegen/types/PriceHeuristic.js.map +1 -0
  210. package/dist/idl_codegen/types/PythConfiguration.d.ts +25 -0
  211. package/dist/idl_codegen/types/PythConfiguration.js +62 -0
  212. package/dist/idl_codegen/types/PythConfiguration.js.map +1 -0
  213. package/dist/idl_codegen/types/ReserveCollateral.d.ts +53 -0
  214. package/dist/idl_codegen/types/ReserveCollateral.js +93 -0
  215. package/dist/idl_codegen/types/ReserveCollateral.js.map +1 -0
  216. package/dist/idl_codegen/types/ReserveConfig.d.ts +304 -0
  217. package/dist/idl_codegen/types/ReserveConfig.js +209 -0
  218. package/dist/idl_codegen/types/ReserveConfig.js.map +1 -0
  219. package/dist/idl_codegen/types/ReserveFarmKind.d.ts +31 -0
  220. package/dist/idl_codegen/types/ReserveFarmKind.js +102 -0
  221. package/dist/idl_codegen/types/ReserveFarmKind.js.map +1 -0
  222. package/dist/idl_codegen/types/ReserveFees.d.ts +78 -0
  223. package/dist/idl_codegen/types/ReserveFees.js +86 -0
  224. package/dist/idl_codegen/types/ReserveFees.js.map +1 -0
  225. package/dist/idl_codegen/types/ReserveLiquidity.d.ts +173 -0
  226. package/dist/idl_codegen/types/ReserveLiquidity.js +166 -0
  227. package/dist/idl_codegen/types/ReserveLiquidity.js.map +1 -0
  228. package/dist/idl_codegen/types/ReserveStatus.d.ts +44 -0
  229. package/dist/idl_codegen/types/ReserveStatus.js +128 -0
  230. package/dist/idl_codegen/types/ReserveStatus.js.map +1 -0
  231. package/dist/idl_codegen/types/ScopeConfiguration.d.ts +41 -0
  232. package/dist/idl_codegen/types/ScopeConfiguration.js +76 -0
  233. package/dist/idl_codegen/types/ScopeConfiguration.js.map +1 -0
  234. package/dist/idl_codegen/types/SwitchboardConfiguration.d.ts +30 -0
  235. package/dist/idl_codegen/types/SwitchboardConfiguration.js +67 -0
  236. package/dist/idl_codegen/types/SwitchboardConfiguration.js.map +1 -0
  237. package/dist/idl_codegen/types/TokenInfo.d.ts +109 -0
  238. package/dist/idl_codegen/types/TokenInfo.js +116 -0
  239. package/dist/idl_codegen/types/TokenInfo.js.map +1 -0
  240. package/dist/idl_codegen/types/UpdateConfigMode.d.ts +538 -0
  241. package/dist/idl_codegen/types/UpdateConfigMode.js +1116 -0
  242. package/dist/idl_codegen/types/UpdateConfigMode.js.map +1 -0
  243. package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts +155 -0
  244. package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js +273 -0
  245. package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js.map +1 -0
  246. package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts +200 -0
  247. package/dist/idl_codegen/types/UpdateLendingMarketMode.js +440 -0
  248. package/dist/idl_codegen/types/UpdateLendingMarketMode.js.map +1 -0
  249. package/dist/idl_codegen/types/WithdrawalCaps.d.ts +38 -0
  250. package/dist/idl_codegen/types/WithdrawalCaps.js +86 -0
  251. package/dist/idl_codegen/types/WithdrawalCaps.js.map +1 -0
  252. package/dist/idl_codegen/types/index.d.ts +65 -0
  253. package/dist/idl_codegen/types/index.js +77 -0
  254. package/dist/idl_codegen/types/index.js.map +1 -0
  255. package/dist/idl_codegen/zero_padding/ObligationZP.d.ts +53 -0
  256. package/dist/idl_codegen/zero_padding/ObligationZP.js +140 -0
  257. package/dist/idl_codegen/zero_padding/ObligationZP.js.map +1 -0
  258. package/dist/idl_codegen/zero_padding/index.d.ts +1 -0
  259. package/dist/idl_codegen/zero_padding/index.js +6 -0
  260. package/dist/idl_codegen/zero_padding/index.js.map +1 -0
  261. package/dist/idl_codegen_jupiter_perps/accounts/Pool.d.ts +48 -0
  262. package/dist/idl_codegen_jupiter_perps/accounts/Pool.js +144 -0
  263. package/dist/idl_codegen_jupiter_perps/accounts/Pool.js.map +1 -0
  264. package/dist/idl_codegen_jupiter_perps/accounts/index.d.ts +2 -0
  265. package/dist/idl_codegen_jupiter_perps/accounts/index.js +6 -0
  266. package/dist/idl_codegen_jupiter_perps/accounts/index.js.map +1 -0
  267. package/dist/idl_codegen_jupiter_perps/programId.d.ts +3 -0
  268. package/dist/idl_codegen_jupiter_perps/programId.js +9 -0
  269. package/dist/idl_codegen_jupiter_perps/programId.js.map +1 -0
  270. package/dist/idl_codegen_jupiter_perps/types/Fees.d.ts +62 -0
  271. package/dist/idl_codegen_jupiter_perps/types/Fees.js +115 -0
  272. package/dist/idl_codegen_jupiter_perps/types/Fees.js.map +1 -0
  273. package/dist/idl_codegen_jupiter_perps/types/Limit.d.ts +32 -0
  274. package/dist/idl_codegen_jupiter_perps/types/Limit.js +75 -0
  275. package/dist/idl_codegen_jupiter_perps/types/Limit.js.map +1 -0
  276. package/dist/idl_codegen_jupiter_perps/types/PoolApr.d.ts +32 -0
  277. package/dist/idl_codegen_jupiter_perps/types/PoolApr.js +75 -0
  278. package/dist/idl_codegen_jupiter_perps/types/PoolApr.js.map +1 -0
  279. package/dist/idl_codegen_jupiter_perps/types/index.d.ts +6 -0
  280. package/dist/idl_codegen_jupiter_perps/types/index.js +10 -0
  281. package/dist/idl_codegen_jupiter_perps/types/index.js.map +1 -0
  282. package/dist/index.d.ts +1 -0
  283. package/dist/index.js +18 -0
  284. package/dist/index.js.map +1 -0
  285. package/dist/lending_operations/index.d.ts +2 -0
  286. package/dist/lending_operations/index.js +19 -0
  287. package/dist/lending_operations/index.js.map +1 -0
  288. package/dist/lending_operations/repay_with_collateral_calcs.d.ts +5 -0
  289. package/dist/lending_operations/repay_with_collateral_calcs.js +26 -0
  290. package/dist/lending_operations/repay_with_collateral_calcs.js.map +1 -0
  291. package/dist/lending_operations/repay_with_collateral_operations.d.ts +47 -0
  292. package/dist/lending_operations/repay_with_collateral_operations.js +163 -0
  293. package/dist/lending_operations/repay_with_collateral_operations.js.map +1 -0
  294. package/dist/leverage/calcs.d.ts +132 -0
  295. package/dist/leverage/calcs.js +291 -0
  296. package/dist/leverage/calcs.js.map +1 -0
  297. package/dist/leverage/index.d.ts +4 -0
  298. package/dist/leverage/index.js +21 -0
  299. package/dist/leverage/index.js.map +1 -0
  300. package/dist/leverage/instructions.d.ts +43 -0
  301. package/dist/leverage/instructions.js +103 -0
  302. package/dist/leverage/instructions.js.map +1 -0
  303. package/dist/leverage/operations.d.ts +231 -0
  304. package/dist/leverage/operations.js +1058 -0
  305. package/dist/leverage/operations.js.map +1 -0
  306. package/dist/leverage/utils.d.ts +22 -0
  307. package/dist/leverage/utils.js +144 -0
  308. package/dist/leverage/utils.js.map +1 -0
  309. package/dist/lib.d.ts +9 -0
  310. package/dist/lib.js +26 -0
  311. package/dist/lib.js.map +1 -0
  312. package/dist/referrals/index.d.ts +2 -0
  313. package/dist/referrals/index.js +19 -0
  314. package/dist/referrals/index.js.map +1 -0
  315. package/dist/referrals/instructions.d.ts +16 -0
  316. package/dist/referrals/instructions.js +76 -0
  317. package/dist/referrals/instructions.js.map +1 -0
  318. package/dist/referrals/operations.d.ts +97 -0
  319. package/dist/referrals/operations.js +258 -0
  320. package/dist/referrals/operations.js.map +1 -0
  321. package/dist/utils/ObligationType.d.ts +49 -0
  322. package/dist/utils/ObligationType.js +129 -0
  323. package/dist/utils/ObligationType.js.map +1 -0
  324. package/dist/utils/api.d.ts +6 -0
  325. package/dist/utils/api.js +61 -0
  326. package/dist/utils/api.js.map +1 -0
  327. package/dist/utils/ata.d.ts +25 -0
  328. package/dist/utils/ata.js +155 -0
  329. package/dist/utils/ata.js.map +1 -0
  330. package/dist/utils/constants.d.ts +48 -0
  331. package/dist/utils/constants.js +75 -0
  332. package/dist/utils/constants.js.map +1 -0
  333. package/dist/utils/idl.d.ts +2 -0
  334. package/dist/utils/idl.js +9 -0
  335. package/dist/utils/idl.js.map +1 -0
  336. package/dist/utils/index.d.ts +14 -0
  337. package/dist/utils/index.js +31 -0
  338. package/dist/utils/index.js.map +1 -0
  339. package/dist/utils/instruction.d.ts +22 -0
  340. package/dist/utils/instruction.js +202 -0
  341. package/dist/utils/instruction.js.map +1 -0
  342. package/dist/utils/kamino.d.ts +3 -0
  343. package/dist/utils/kamino.js +45 -0
  344. package/dist/utils/kamino.js.map +1 -0
  345. package/dist/utils/layout.d.ts +13 -0
  346. package/dist/utils/layout.js +123 -0
  347. package/dist/utils/layout.js.map +1 -0
  348. package/dist/utils/lookupTable.d.ts +5 -0
  349. package/dist/utils/lookupTable.js +57 -0
  350. package/dist/utils/lookupTable.js.map +1 -0
  351. package/dist/utils/oracle.d.ts +51 -0
  352. package/dist/utils/oracle.js +295 -0
  353. package/dist/utils/oracle.js.map +1 -0
  354. package/dist/utils/pubkey.d.ts +74 -0
  355. package/dist/utils/pubkey.js +229 -0
  356. package/dist/utils/pubkey.js.map +1 -0
  357. package/dist/utils/seeds.d.ts +122 -0
  358. package/dist/utils/seeds.js +153 -0
  359. package/dist/utils/seeds.js.map +1 -0
  360. package/dist/utils/slots.d.ts +18 -0
  361. package/dist/utils/slots.js +32 -0
  362. package/dist/utils/slots.js.map +1 -0
  363. package/dist/utils/syncNative.d.ts +10 -0
  364. package/dist/utils/syncNative.js +46 -0
  365. package/dist/utils/syncNative.js.map +1 -0
  366. package/dist/utils/userMetadata.d.ts +15 -0
  367. package/dist/utils/userMetadata.js +259 -0
  368. package/dist/utils/userMetadata.js.map +1 -0
  369. package/package.json +94 -0
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.initFarmsForReserve = exports.layout = void 0;
27
+ const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
28
+ const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
29
+ const programId_1 = require("../programId");
30
+ exports.layout = borsh.struct([borsh.u8("mode")]);
31
+ function initFarmsForReserve(args, accounts, programId = programId_1.PROGRAM_ID) {
32
+ const keys = [
33
+ { pubkey: accounts.lendingMarketOwner, isSigner: true, isWritable: true },
34
+ { pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },
35
+ {
36
+ pubkey: accounts.lendingMarketAuthority,
37
+ isSigner: false,
38
+ isWritable: true,
39
+ },
40
+ { pubkey: accounts.reserve, isSigner: false, isWritable: true },
41
+ { pubkey: accounts.farmsProgram, isSigner: false, isWritable: false },
42
+ { pubkey: accounts.farmsGlobalConfig, isSigner: false, isWritable: false },
43
+ { pubkey: accounts.farmState, isSigner: false, isWritable: true },
44
+ {
45
+ pubkey: accounts.farmsVaultAuthority,
46
+ isSigner: false,
47
+ isWritable: false,
48
+ },
49
+ { pubkey: accounts.rent, isSigner: false, isWritable: false },
50
+ { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false },
51
+ { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
52
+ ];
53
+ const identifier = Buffer.from([218, 6, 62, 233, 1, 33, 232, 82]);
54
+ const buffer = Buffer.alloc(1000);
55
+ const len = exports.layout.encode({
56
+ mode: args.mode,
57
+ }, buffer);
58
+ const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
59
+ const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
60
+ return ix;
61
+ }
62
+ exports.initFarmsForReserve = initFarmsForReserve;
63
+ //# sourceMappingURL=initFarmsForReserve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initFarmsForReserve.js","sourceRoot":"","sources":["../../../src/idl_codegen/instructions/initFarmsForReserve.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgF,CAAC,wDAAwD;AAEzI,wDAAyC,CAAC,wDAAwD;AAElG,4CAAyC;AAoB5B,QAAA,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAEtD,SAAgB,mBAAmB,CACjC,IAA6B,EAC7B,QAAqC,EACrC,YAAuB,sBAAU;IAEjC,MAAM,IAAI,GAAuB;QAC/B,EAAE,MAAM,EAAE,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;QACzE,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACtE;YACE,MAAM,EAAE,QAAQ,CAAC,sBAAsB;YACvC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,IAAI;SACjB;QACD,EAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QAC/D,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACrE,EAAE,MAAM,EAAE,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QAC1E,EAAE,MAAM,EAAE,QAAQ,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QACjE;YACE,MAAM,EAAE,QAAQ,CAAC,mBAAmB;YACpC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,KAAK;SAClB;QACD,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QAC7D,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACrE,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;KACvE,CAAA;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,CAAA;IACjE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,GAAG,GAAG,cAAM,CAAC,MAAM,CACvB;QACE,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,EACD,MAAM,CACP,CAAA;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;IAClE,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AArCD,kDAqCC","sourcesContent":["import { TransactionInstruction, PublicKey, AccountMeta } from \"@solana/web3.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport BN from \"bn.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as borsh from \"@coral-xyz/borsh\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as types from \"../types\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { PROGRAM_ID } from \"../programId\"\n\nexport interface InitFarmsForReserveArgs {\n mode: number\n}\n\nexport interface InitFarmsForReserveAccounts {\n lendingMarketOwner: PublicKey\n lendingMarket: PublicKey\n lendingMarketAuthority: PublicKey\n reserve: PublicKey\n farmsProgram: PublicKey\n farmsGlobalConfig: PublicKey\n farmState: PublicKey\n farmsVaultAuthority: PublicKey\n rent: PublicKey\n tokenProgram: PublicKey\n systemProgram: PublicKey\n}\n\nexport const layout = borsh.struct([borsh.u8(\"mode\")])\n\nexport function initFarmsForReserve(\n args: InitFarmsForReserveArgs,\n accounts: InitFarmsForReserveAccounts,\n programId: PublicKey = PROGRAM_ID\n) {\n const keys: Array<AccountMeta> = [\n { pubkey: accounts.lendingMarketOwner, isSigner: true, isWritable: true },\n { pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },\n {\n pubkey: accounts.lendingMarketAuthority,\n isSigner: false,\n isWritable: true,\n },\n { pubkey: accounts.reserve, isSigner: false, isWritable: true },\n { pubkey: accounts.farmsProgram, isSigner: false, isWritable: false },\n { pubkey: accounts.farmsGlobalConfig, isSigner: false, isWritable: false },\n { pubkey: accounts.farmState, isSigner: false, isWritable: true },\n {\n pubkey: accounts.farmsVaultAuthority,\n isSigner: false,\n isWritable: false,\n },\n { pubkey: accounts.rent, isSigner: false, isWritable: false },\n { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false },\n { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },\n ]\n const identifier = Buffer.from([218, 6, 62, 233, 1, 33, 232, 82])\n const buffer = Buffer.alloc(1000)\n const len = layout.encode(\n {\n mode: args.mode,\n },\n buffer\n )\n const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len)\n const ix = new TransactionInstruction({ keys, programId, data })\n return ix\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import { TransactionInstruction, PublicKey } from "@solana/web3.js";
2
+ export interface InitLendingMarketArgs {
3
+ quoteCurrency: Array<number>;
4
+ }
5
+ export interface InitLendingMarketAccounts {
6
+ lendingMarketOwner: PublicKey;
7
+ lendingMarket: PublicKey;
8
+ lendingMarketAuthority: PublicKey;
9
+ systemProgram: PublicKey;
10
+ rent: PublicKey;
11
+ }
12
+ export declare const layout: any;
13
+ export declare function initLendingMarket(args: InitLendingMarketArgs, accounts: InitLendingMarketAccounts, programId?: PublicKey): TransactionInstruction;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.initLendingMarket = exports.layout = void 0;
27
+ const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
28
+ const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
29
+ const programId_1 = require("../programId");
30
+ exports.layout = borsh.struct([
31
+ borsh.array(borsh.u8(), 32, "quoteCurrency"),
32
+ ]);
33
+ function initLendingMarket(args, accounts, programId = programId_1.PROGRAM_ID) {
34
+ const keys = [
35
+ { pubkey: accounts.lendingMarketOwner, isSigner: true, isWritable: true },
36
+ { pubkey: accounts.lendingMarket, isSigner: false, isWritable: true },
37
+ {
38
+ pubkey: accounts.lendingMarketAuthority,
39
+ isSigner: false,
40
+ isWritable: false,
41
+ },
42
+ { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
43
+ { pubkey: accounts.rent, isSigner: false, isWritable: false },
44
+ ];
45
+ const identifier = Buffer.from([34, 162, 116, 14, 101, 137, 94, 239]);
46
+ const buffer = Buffer.alloc(1000);
47
+ const len = exports.layout.encode({
48
+ quoteCurrency: args.quoteCurrency,
49
+ }, buffer);
50
+ const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
51
+ const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
52
+ return ix;
53
+ }
54
+ exports.initLendingMarket = initLendingMarket;
55
+ //# sourceMappingURL=initLendingMarket.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initLendingMarket.js","sourceRoot":"","sources":["../../../src/idl_codegen/instructions/initLendingMarket.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgF,CAAC,wDAAwD;AAEzI,wDAAyC,CAAC,wDAAwD;AAElG,4CAAyC;AAc5B,QAAA,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;IACjC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,eAAe,CAAC;CAC7C,CAAC,CAAA;AAEF,SAAgB,iBAAiB,CAC/B,IAA2B,EAC3B,QAAmC,EACnC,YAAuB,sBAAU;IAEjC,MAAM,IAAI,GAAuB;QAC/B,EAAE,MAAM,EAAE,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;QACzE,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QACrE;YACE,MAAM,EAAE,QAAQ,CAAC,sBAAsB;YACvC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,KAAK;SAClB;QACD,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACtE,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;KAC9D,CAAA;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,CAAA;IACrE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,GAAG,GAAG,cAAM,CAAC,MAAM,CACvB;QACE,aAAa,EAAE,IAAI,CAAC,aAAa;KAClC,EACD,MAAM,CACP,CAAA;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;IAClE,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AA3BD,8CA2BC","sourcesContent":["import { TransactionInstruction, PublicKey, AccountMeta } from \"@solana/web3.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport BN from \"bn.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as borsh from \"@coral-xyz/borsh\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as types from \"../types\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { PROGRAM_ID } from \"../programId\"\n\nexport interface InitLendingMarketArgs {\n quoteCurrency: Array<number>\n}\n\nexport interface InitLendingMarketAccounts {\n lendingMarketOwner: PublicKey\n lendingMarket: PublicKey\n lendingMarketAuthority: PublicKey\n systemProgram: PublicKey\n rent: PublicKey\n}\n\nexport const layout = borsh.struct([\n borsh.array(borsh.u8(), 32, \"quoteCurrency\"),\n])\n\nexport function initLendingMarket(\n args: InitLendingMarketArgs,\n accounts: InitLendingMarketAccounts,\n programId: PublicKey = PROGRAM_ID\n) {\n const keys: Array<AccountMeta> = [\n { pubkey: accounts.lendingMarketOwner, isSigner: true, isWritable: true },\n { pubkey: accounts.lendingMarket, isSigner: false, isWritable: true },\n {\n pubkey: accounts.lendingMarketAuthority,\n isSigner: false,\n isWritable: false,\n },\n { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },\n { pubkey: accounts.rent, isSigner: false, isWritable: false },\n ]\n const identifier = Buffer.from([34, 162, 116, 14, 101, 137, 94, 239])\n const buffer = Buffer.alloc(1000)\n const len = layout.encode(\n {\n quoteCurrency: args.quoteCurrency,\n },\n buffer\n )\n const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len)\n const ix = new TransactionInstruction({ keys, programId, data })\n return ix\n}\n"]}
@@ -0,0 +1,19 @@
1
+ import { TransactionInstruction, PublicKey } from "@solana/web3.js";
2
+ import * as types from "../types";
3
+ export interface InitObligationArgs {
4
+ args: types.InitObligationArgsFields;
5
+ }
6
+ export interface InitObligationAccounts {
7
+ obligationOwner: PublicKey;
8
+ feePayer: PublicKey;
9
+ obligation: PublicKey;
10
+ lendingMarket: PublicKey;
11
+ seed1Account: PublicKey;
12
+ seed2Account: PublicKey;
13
+ ownerUserMetadata: PublicKey;
14
+ rent: PublicKey;
15
+ tokenProgram: PublicKey;
16
+ systemProgram: PublicKey;
17
+ }
18
+ export declare const layout: any;
19
+ export declare function initObligation(args: InitObligationArgs, accounts: InitObligationAccounts, programId?: PublicKey): TransactionInstruction;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.initObligation = exports.layout = void 0;
27
+ const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
28
+ const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
29
+ const types = __importStar(require("../types")); // eslint-disable-line @typescript-eslint/no-unused-vars
30
+ const programId_1 = require("../programId");
31
+ exports.layout = borsh.struct([types.InitObligationArgs.layout("args")]);
32
+ function initObligation(args, accounts, programId = programId_1.PROGRAM_ID) {
33
+ const keys = [
34
+ { pubkey: accounts.obligationOwner, isSigner: true, isWritable: false },
35
+ { pubkey: accounts.feePayer, isSigner: true, isWritable: true },
36
+ { pubkey: accounts.obligation, isSigner: false, isWritable: true },
37
+ { pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },
38
+ { pubkey: accounts.seed1Account, isSigner: false, isWritable: false },
39
+ { pubkey: accounts.seed2Account, isSigner: false, isWritable: false },
40
+ { pubkey: accounts.ownerUserMetadata, isSigner: false, isWritable: false },
41
+ { pubkey: accounts.rent, isSigner: false, isWritable: false },
42
+ { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false },
43
+ { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
44
+ ];
45
+ const identifier = Buffer.from([251, 10, 231, 76, 27, 11, 159, 96]);
46
+ const buffer = Buffer.alloc(1000);
47
+ const len = exports.layout.encode({
48
+ args: types.InitObligationArgs.toEncodable(args.args),
49
+ }, buffer);
50
+ const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
51
+ const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
52
+ return ix;
53
+ }
54
+ exports.initObligation = initObligation;
55
+ //# sourceMappingURL=initObligation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initObligation.js","sourceRoot":"","sources":["../../../src/idl_codegen/instructions/initObligation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgF,CAAC,wDAAwD;AAEzI,wDAAyC,CAAC,wDAAwD;AAClG,gDAAiC,CAAC,wDAAwD;AAC1F,4CAAyC;AAmB5B,QAAA,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAE7E,SAAgB,cAAc,CAC5B,IAAwB,EACxB,QAAgC,EAChC,YAAuB,sBAAU;IAEjC,MAAM,IAAI,GAAuB;QAC/B,EAAE,MAAM,EAAE,QAAQ,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;QACvE,EAAE,MAAM,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;QAC/D,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QAClE,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACtE,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACrE,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACrE,EAAE,MAAM,EAAE,QAAQ,CAAC,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QAC1E,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QAC7D,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACrE,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;KACvE,CAAA;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,CAAA;IACnE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,GAAG,GAAG,cAAM,CAAC,MAAM,CACvB;QACE,IAAI,EAAE,KAAK,CAAC,kBAAkB,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC;KACtD,EACD,MAAM,CACP,CAAA;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;IAClE,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AA5BD,wCA4BC","sourcesContent":["import { TransactionInstruction, PublicKey, AccountMeta } from \"@solana/web3.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport BN from \"bn.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as borsh from \"@coral-xyz/borsh\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as types from \"../types\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { PROGRAM_ID } from \"../programId\"\n\nexport interface InitObligationArgs {\n args: types.InitObligationArgsFields\n}\n\nexport interface InitObligationAccounts {\n obligationOwner: PublicKey\n feePayer: PublicKey\n obligation: PublicKey\n lendingMarket: PublicKey\n seed1Account: PublicKey\n seed2Account: PublicKey\n ownerUserMetadata: PublicKey\n rent: PublicKey\n tokenProgram: PublicKey\n systemProgram: PublicKey\n}\n\nexport const layout = borsh.struct([types.InitObligationArgs.layout(\"args\")])\n\nexport function initObligation(\n args: InitObligationArgs,\n accounts: InitObligationAccounts,\n programId: PublicKey = PROGRAM_ID\n) {\n const keys: Array<AccountMeta> = [\n { pubkey: accounts.obligationOwner, isSigner: true, isWritable: false },\n { pubkey: accounts.feePayer, isSigner: true, isWritable: true },\n { pubkey: accounts.obligation, isSigner: false, isWritable: true },\n { pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },\n { pubkey: accounts.seed1Account, isSigner: false, isWritable: false },\n { pubkey: accounts.seed2Account, isSigner: false, isWritable: false },\n { pubkey: accounts.ownerUserMetadata, isSigner: false, isWritable: false },\n { pubkey: accounts.rent, isSigner: false, isWritable: false },\n { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false },\n { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },\n ]\n const identifier = Buffer.from([251, 10, 231, 76, 27, 11, 159, 96])\n const buffer = Buffer.alloc(1000)\n const len = layout.encode(\n {\n args: types.InitObligationArgs.toEncodable(args.args),\n },\n buffer\n )\n const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len)\n const ix = new TransactionInstruction({ keys, programId, data })\n return ix\n}\n"]}
@@ -0,0 +1,20 @@
1
+ import { TransactionInstruction, PublicKey } from "@solana/web3.js";
2
+ export interface InitObligationFarmsForReserveArgs {
3
+ mode: number;
4
+ }
5
+ export interface InitObligationFarmsForReserveAccounts {
6
+ payer: PublicKey;
7
+ owner: PublicKey;
8
+ obligation: PublicKey;
9
+ lendingMarketAuthority: PublicKey;
10
+ reserve: PublicKey;
11
+ reserveFarmState: PublicKey;
12
+ obligationFarm: PublicKey;
13
+ lendingMarket: PublicKey;
14
+ farmsProgram: PublicKey;
15
+ rent: PublicKey;
16
+ tokenProgram: PublicKey;
17
+ systemProgram: PublicKey;
18
+ }
19
+ export declare const layout: any;
20
+ export declare function initObligationFarmsForReserve(args: InitObligationFarmsForReserveArgs, accounts: InitObligationFarmsForReserveAccounts, programId?: PublicKey): TransactionInstruction;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.initObligationFarmsForReserve = exports.layout = void 0;
27
+ const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
28
+ const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
29
+ const programId_1 = require("../programId");
30
+ exports.layout = borsh.struct([borsh.u8("mode")]);
31
+ function initObligationFarmsForReserve(args, accounts, programId = programId_1.PROGRAM_ID) {
32
+ const keys = [
33
+ { pubkey: accounts.payer, isSigner: true, isWritable: true },
34
+ { pubkey: accounts.owner, isSigner: false, isWritable: false },
35
+ { pubkey: accounts.obligation, isSigner: false, isWritable: true },
36
+ {
37
+ pubkey: accounts.lendingMarketAuthority,
38
+ isSigner: false,
39
+ isWritable: true,
40
+ },
41
+ { pubkey: accounts.reserve, isSigner: false, isWritable: true },
42
+ { pubkey: accounts.reserveFarmState, isSigner: false, isWritable: true },
43
+ { pubkey: accounts.obligationFarm, isSigner: false, isWritable: true },
44
+ { pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },
45
+ { pubkey: accounts.farmsProgram, isSigner: false, isWritable: false },
46
+ { pubkey: accounts.rent, isSigner: false, isWritable: false },
47
+ { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false },
48
+ { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
49
+ ];
50
+ const identifier = Buffer.from([136, 63, 15, 186, 211, 152, 168, 164]);
51
+ const buffer = Buffer.alloc(1000);
52
+ const len = exports.layout.encode({
53
+ mode: args.mode,
54
+ }, buffer);
55
+ const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
56
+ const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
57
+ return ix;
58
+ }
59
+ exports.initObligationFarmsForReserve = initObligationFarmsForReserve;
60
+ //# sourceMappingURL=initObligationFarmsForReserve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initObligationFarmsForReserve.js","sourceRoot":"","sources":["../../../src/idl_codegen/instructions/initObligationFarmsForReserve.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgF,CAAC,wDAAwD;AAEzI,wDAAyC,CAAC,wDAAwD;AAElG,4CAAyC;AAqB5B,QAAA,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAEtD,SAAgB,6BAA6B,CAC3C,IAAuC,EACvC,QAA+C,EAC/C,YAAuB,sBAAU;IAEjC,MAAM,IAAI,GAAuB;QAC/B,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;QAC5D,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QAC9D,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QAClE;YACE,MAAM,EAAE,QAAQ,CAAC,sBAAsB;YACvC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,IAAI;SACjB;QACD,EAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QAC/D,EAAE,MAAM,EAAE,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QACxE,EAAE,MAAM,EAAE,QAAQ,CAAC,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QACtE,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACtE,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACrE,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QAC7D,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACrE,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;KACvE,CAAA;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;IACtE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,GAAG,GAAG,cAAM,CAAC,MAAM,CACvB;QACE,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,EACD,MAAM,CACP,CAAA;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;IAClE,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AAlCD,sEAkCC","sourcesContent":["import { TransactionInstruction, PublicKey, AccountMeta } from \"@solana/web3.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport BN from \"bn.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as borsh from \"@coral-xyz/borsh\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as types from \"../types\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { PROGRAM_ID } from \"../programId\"\n\nexport interface InitObligationFarmsForReserveArgs {\n mode: number\n}\n\nexport interface InitObligationFarmsForReserveAccounts {\n payer: PublicKey\n owner: PublicKey\n obligation: PublicKey\n lendingMarketAuthority: PublicKey\n reserve: PublicKey\n reserveFarmState: PublicKey\n obligationFarm: PublicKey\n lendingMarket: PublicKey\n farmsProgram: PublicKey\n rent: PublicKey\n tokenProgram: PublicKey\n systemProgram: PublicKey\n}\n\nexport const layout = borsh.struct([borsh.u8(\"mode\")])\n\nexport function initObligationFarmsForReserve(\n args: InitObligationFarmsForReserveArgs,\n accounts: InitObligationFarmsForReserveAccounts,\n programId: PublicKey = PROGRAM_ID\n) {\n const keys: Array<AccountMeta> = [\n { pubkey: accounts.payer, isSigner: true, isWritable: true },\n { pubkey: accounts.owner, isSigner: false, isWritable: false },\n { pubkey: accounts.obligation, isSigner: false, isWritable: true },\n {\n pubkey: accounts.lendingMarketAuthority,\n isSigner: false,\n isWritable: true,\n },\n { pubkey: accounts.reserve, isSigner: false, isWritable: true },\n { pubkey: accounts.reserveFarmState, isSigner: false, isWritable: true },\n { pubkey: accounts.obligationFarm, isSigner: false, isWritable: true },\n { pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },\n { pubkey: accounts.farmsProgram, isSigner: false, isWritable: false },\n { pubkey: accounts.rent, isSigner: false, isWritable: false },\n { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false },\n { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },\n ]\n const identifier = Buffer.from([136, 63, 15, 186, 211, 152, 168, 164])\n const buffer = Buffer.alloc(1000)\n const len = layout.encode(\n {\n mode: args.mode,\n },\n buffer\n )\n const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len)\n const ix = new TransactionInstruction({ keys, programId, data })\n return ix\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { TransactionInstruction, PublicKey } from "@solana/web3.js";
2
+ export interface InitReferrerStateAndShortUrlArgs {
3
+ shortUrl: string;
4
+ }
5
+ export interface InitReferrerStateAndShortUrlAccounts {
6
+ referrer: PublicKey;
7
+ referrerState: PublicKey;
8
+ referrerShortUrl: PublicKey;
9
+ referrerUserMetadata: PublicKey;
10
+ rent: PublicKey;
11
+ systemProgram: PublicKey;
12
+ }
13
+ export declare const layout: any;
14
+ export declare function initReferrerStateAndShortUrl(args: InitReferrerStateAndShortUrlArgs, accounts: InitReferrerStateAndShortUrlAccounts, programId?: PublicKey): TransactionInstruction;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.initReferrerStateAndShortUrl = exports.layout = void 0;
27
+ const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
28
+ const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
29
+ const programId_1 = require("../programId");
30
+ exports.layout = borsh.struct([borsh.str("shortUrl")]);
31
+ function initReferrerStateAndShortUrl(args, accounts, programId = programId_1.PROGRAM_ID) {
32
+ const keys = [
33
+ { pubkey: accounts.referrer, isSigner: true, isWritable: true },
34
+ { pubkey: accounts.referrerState, isSigner: false, isWritable: true },
35
+ { pubkey: accounts.referrerShortUrl, isSigner: false, isWritable: true },
36
+ {
37
+ pubkey: accounts.referrerUserMetadata,
38
+ isSigner: false,
39
+ isWritable: false,
40
+ },
41
+ { pubkey: accounts.rent, isSigner: false, isWritable: false },
42
+ { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
43
+ ];
44
+ const identifier = Buffer.from([165, 19, 25, 127, 100, 55, 31, 90]);
45
+ const buffer = Buffer.alloc(1000);
46
+ const len = exports.layout.encode({
47
+ shortUrl: args.shortUrl,
48
+ }, buffer);
49
+ const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
50
+ const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
51
+ return ix;
52
+ }
53
+ exports.initReferrerStateAndShortUrl = initReferrerStateAndShortUrl;
54
+ //# sourceMappingURL=initReferrerStateAndShortUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initReferrerStateAndShortUrl.js","sourceRoot":"","sources":["../../../src/idl_codegen/instructions/initReferrerStateAndShortUrl.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgF,CAAC,wDAAwD;AAEzI,wDAAyC,CAAC,wDAAwD;AAElG,4CAAyC;AAe5B,QAAA,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;AAE3D,SAAgB,4BAA4B,CAC1C,IAAsC,EACtC,QAA8C,EAC9C,YAAuB,sBAAU;IAEjC,MAAM,IAAI,GAAuB;QAC/B,EAAE,MAAM,EAAE,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;QAC/D,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QACrE,EAAE,MAAM,EAAE,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QACxE;YACE,MAAM,EAAE,QAAQ,CAAC,oBAAoB;YACrC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,KAAK;SAClB;QACD,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QAC7D,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;KACvE,CAAA;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAA;IACnE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,GAAG,GAAG,cAAM,CAAC,MAAM,CACvB;QACE,QAAQ,EAAE,IAAI,CAAC,QAAQ;KACxB,EACD,MAAM,CACP,CAAA;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;IAClE,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AA5BD,oEA4BC","sourcesContent":["import { TransactionInstruction, PublicKey, AccountMeta } from \"@solana/web3.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport BN from \"bn.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as borsh from \"@coral-xyz/borsh\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as types from \"../types\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { PROGRAM_ID } from \"../programId\"\n\nexport interface InitReferrerStateAndShortUrlArgs {\n shortUrl: string\n}\n\nexport interface InitReferrerStateAndShortUrlAccounts {\n referrer: PublicKey\n referrerState: PublicKey\n referrerShortUrl: PublicKey\n referrerUserMetadata: PublicKey\n rent: PublicKey\n systemProgram: PublicKey\n}\n\nexport const layout = borsh.struct([borsh.str(\"shortUrl\")])\n\nexport function initReferrerStateAndShortUrl(\n args: InitReferrerStateAndShortUrlArgs,\n accounts: InitReferrerStateAndShortUrlAccounts,\n programId: PublicKey = PROGRAM_ID\n) {\n const keys: Array<AccountMeta> = [\n { pubkey: accounts.referrer, isSigner: true, isWritable: true },\n { pubkey: accounts.referrerState, isSigner: false, isWritable: true },\n { pubkey: accounts.referrerShortUrl, isSigner: false, isWritable: true },\n {\n pubkey: accounts.referrerUserMetadata,\n isSigner: false,\n isWritable: false,\n },\n { pubkey: accounts.rent, isSigner: false, isWritable: false },\n { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },\n ]\n const identifier = Buffer.from([165, 19, 25, 127, 100, 55, 31, 90])\n const buffer = Buffer.alloc(1000)\n const len = layout.encode(\n {\n shortUrl: args.shortUrl,\n },\n buffer\n )\n const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len)\n const ix = new TransactionInstruction({ keys, programId, data })\n return ix\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { TransactionInstruction, PublicKey } from "@solana/web3.js";
2
+ export interface InitReferrerTokenStateArgs {
3
+ referrer: PublicKey;
4
+ }
5
+ export interface InitReferrerTokenStateAccounts {
6
+ payer: PublicKey;
7
+ lendingMarket: PublicKey;
8
+ reserve: PublicKey;
9
+ referrerTokenState: PublicKey;
10
+ rent: PublicKey;
11
+ systemProgram: PublicKey;
12
+ }
13
+ export declare const layout: any;
14
+ export declare function initReferrerTokenState(args: InitReferrerTokenStateArgs, accounts: InitReferrerTokenStateAccounts, programId?: PublicKey): TransactionInstruction;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.initReferrerTokenState = exports.layout = void 0;
27
+ const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
28
+ const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
29
+ const programId_1 = require("../programId");
30
+ exports.layout = borsh.struct([borsh.publicKey("referrer")]);
31
+ function initReferrerTokenState(args, accounts, programId = programId_1.PROGRAM_ID) {
32
+ const keys = [
33
+ { pubkey: accounts.payer, isSigner: true, isWritable: true },
34
+ { pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },
35
+ { pubkey: accounts.reserve, isSigner: false, isWritable: false },
36
+ { pubkey: accounts.referrerTokenState, isSigner: false, isWritable: true },
37
+ { pubkey: accounts.rent, isSigner: false, isWritable: false },
38
+ { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
39
+ ];
40
+ const identifier = Buffer.from([116, 45, 66, 148, 58, 13, 218, 115]);
41
+ const buffer = Buffer.alloc(1000);
42
+ const len = exports.layout.encode({
43
+ referrer: args.referrer,
44
+ }, buffer);
45
+ const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
46
+ const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
47
+ return ix;
48
+ }
49
+ exports.initReferrerTokenState = initReferrerTokenState;
50
+ //# sourceMappingURL=initReferrerTokenState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initReferrerTokenState.js","sourceRoot":"","sources":["../../../src/idl_codegen/instructions/initReferrerTokenState.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgF,CAAC,wDAAwD;AAEzI,wDAAyC,CAAC,wDAAwD;AAElG,4CAAyC;AAe5B,QAAA,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;AAEjE,SAAgB,sBAAsB,CACpC,IAAgC,EAChC,QAAwC,EACxC,YAAuB,sBAAU;IAEjC,MAAM,IAAI,GAAuB;QAC/B,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;QAC5D,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACtE,EAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QAChE,EAAE,MAAM,EAAE,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QAC1E,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QAC7D,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;KACvE,CAAA;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;IACpE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,GAAG,GAAG,cAAM,CAAC,MAAM,CACvB;QACE,QAAQ,EAAE,IAAI,CAAC,QAAQ;KACxB,EACD,MAAM,CACP,CAAA;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;IAClE,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AAxBD,wDAwBC","sourcesContent":["import { TransactionInstruction, PublicKey, AccountMeta } from \"@solana/web3.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport BN from \"bn.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as borsh from \"@coral-xyz/borsh\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as types from \"../types\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { PROGRAM_ID } from \"../programId\"\n\nexport interface InitReferrerTokenStateArgs {\n referrer: PublicKey\n}\n\nexport interface InitReferrerTokenStateAccounts {\n payer: PublicKey\n lendingMarket: PublicKey\n reserve: PublicKey\n referrerTokenState: PublicKey\n rent: PublicKey\n systemProgram: PublicKey\n}\n\nexport const layout = borsh.struct([borsh.publicKey(\"referrer\")])\n\nexport function initReferrerTokenState(\n args: InitReferrerTokenStateArgs,\n accounts: InitReferrerTokenStateAccounts,\n programId: PublicKey = PROGRAM_ID\n) {\n const keys: Array<AccountMeta> = [\n { pubkey: accounts.payer, isSigner: true, isWritable: true },\n { pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },\n { pubkey: accounts.reserve, isSigner: false, isWritable: false },\n { pubkey: accounts.referrerTokenState, isSigner: false, isWritable: true },\n { pubkey: accounts.rent, isSigner: false, isWritable: false },\n { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },\n ]\n const identifier = Buffer.from([116, 45, 66, 148, 58, 13, 218, 115])\n const buffer = Buffer.alloc(1000)\n const len = layout.encode(\n {\n referrer: args.referrer,\n },\n buffer\n )\n const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len)\n const ix = new TransactionInstruction({ keys, programId, data })\n return ix\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import { TransactionInstruction, PublicKey } from "@solana/web3.js";
2
+ export interface InitReserveAccounts {
3
+ lendingMarketOwner: PublicKey;
4
+ lendingMarket: PublicKey;
5
+ lendingMarketAuthority: PublicKey;
6
+ reserve: PublicKey;
7
+ reserveLiquidityMint: PublicKey;
8
+ reserveLiquiditySupply: PublicKey;
9
+ feeReceiver: PublicKey;
10
+ reserveCollateralMint: PublicKey;
11
+ reserveCollateralSupply: PublicKey;
12
+ rent: PublicKey;
13
+ tokenProgram: PublicKey;
14
+ systemProgram: PublicKey;
15
+ }
16
+ export declare function initReserve(accounts: InitReserveAccounts, programId?: PublicKey): TransactionInstruction;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.initReserve = void 0;
4
+ const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
5
+ const programId_1 = require("../programId");
6
+ function initReserve(accounts, programId = programId_1.PROGRAM_ID) {
7
+ const keys = [
8
+ { pubkey: accounts.lendingMarketOwner, isSigner: true, isWritable: true },
9
+ { pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },
10
+ {
11
+ pubkey: accounts.lendingMarketAuthority,
12
+ isSigner: false,
13
+ isWritable: false,
14
+ },
15
+ { pubkey: accounts.reserve, isSigner: false, isWritable: true },
16
+ {
17
+ pubkey: accounts.reserveLiquidityMint,
18
+ isSigner: false,
19
+ isWritable: false,
20
+ },
21
+ {
22
+ pubkey: accounts.reserveLiquiditySupply,
23
+ isSigner: false,
24
+ isWritable: true,
25
+ },
26
+ { pubkey: accounts.feeReceiver, isSigner: false, isWritable: true },
27
+ {
28
+ pubkey: accounts.reserveCollateralMint,
29
+ isSigner: false,
30
+ isWritable: true,
31
+ },
32
+ {
33
+ pubkey: accounts.reserveCollateralSupply,
34
+ isSigner: false,
35
+ isWritable: true,
36
+ },
37
+ { pubkey: accounts.rent, isSigner: false, isWritable: false },
38
+ { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false },
39
+ { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
40
+ ];
41
+ const identifier = Buffer.from([138, 245, 71, 225, 153, 4, 3, 43]);
42
+ const data = identifier;
43
+ const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
44
+ return ix;
45
+ }
46
+ exports.initReserve = initReserve;
47
+ //# sourceMappingURL=initReserve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initReserve.js","sourceRoot":"","sources":["../../../src/idl_codegen/instructions/initReserve.ts"],"names":[],"mappings":";;;AAAA,6CAAgF,CAAC,wDAAwD;AAIzI,4CAAyC;AAiBzC,SAAgB,WAAW,CACzB,QAA6B,EAC7B,YAAuB,sBAAU;IAEjC,MAAM,IAAI,GAAuB;QAC/B,EAAE,MAAM,EAAE,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;QACzE,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACtE;YACE,MAAM,EAAE,QAAQ,CAAC,sBAAsB;YACvC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,KAAK;SAClB;QACD,EAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QAC/D;YACE,MAAM,EAAE,QAAQ,CAAC,oBAAoB;YACrC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,KAAK;SAClB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,sBAAsB;YACvC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,IAAI;SACjB;QACD,EAAE,MAAM,EAAE,QAAQ,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QACnE;YACE,MAAM,EAAE,QAAQ,CAAC,qBAAqB;YACtC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,IAAI;SACjB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,uBAAuB;YACxC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,IAAI;SACjB;QACD,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QAC7D,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACrE,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;KACvE,CAAA;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;IAClE,MAAM,IAAI,GAAG,UAAU,CAAA;IACvB,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AA1CD,kCA0CC","sourcesContent":["import { TransactionInstruction, PublicKey, AccountMeta } from \"@solana/web3.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport BN from \"bn.js\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as borsh from \"@coral-xyz/borsh\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport * as types from \"../types\" // eslint-disable-line @typescript-eslint/no-unused-vars\nimport { PROGRAM_ID } from \"../programId\"\n\nexport interface InitReserveAccounts {\n lendingMarketOwner: PublicKey\n lendingMarket: PublicKey\n lendingMarketAuthority: PublicKey\n reserve: PublicKey\n reserveLiquidityMint: PublicKey\n reserveLiquiditySupply: PublicKey\n feeReceiver: PublicKey\n reserveCollateralMint: PublicKey\n reserveCollateralSupply: PublicKey\n rent: PublicKey\n tokenProgram: PublicKey\n systemProgram: PublicKey\n}\n\nexport function initReserve(\n accounts: InitReserveAccounts,\n programId: PublicKey = PROGRAM_ID\n) {\n const keys: Array<AccountMeta> = [\n { pubkey: accounts.lendingMarketOwner, isSigner: true, isWritable: true },\n { pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },\n {\n pubkey: accounts.lendingMarketAuthority,\n isSigner: false,\n isWritable: false,\n },\n { pubkey: accounts.reserve, isSigner: false, isWritable: true },\n {\n pubkey: accounts.reserveLiquidityMint,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: accounts.reserveLiquiditySupply,\n isSigner: false,\n isWritable: true,\n },\n { pubkey: accounts.feeReceiver, isSigner: false, isWritable: true },\n {\n pubkey: accounts.reserveCollateralMint,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: accounts.reserveCollateralSupply,\n isSigner: false,\n isWritable: true,\n },\n { pubkey: accounts.rent, isSigner: false, isWritable: false },\n { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false },\n { pubkey: accounts.systemProgram, isSigner: false, isWritable: false },\n ]\n const identifier = Buffer.from([138, 245, 71, 225, 153, 4, 3, 43])\n const data = identifier\n const ix = new TransactionInstruction({ keys, programId, data })\n return ix\n}\n"]}
@@ -0,0 +1,14 @@
1
+ import { TransactionInstruction, PublicKey } from "@solana/web3.js";
2
+ export interface InitUserMetadataArgs {
3
+ userLookupTable: PublicKey;
4
+ }
5
+ export interface InitUserMetadataAccounts {
6
+ owner: PublicKey;
7
+ feePayer: PublicKey;
8
+ userMetadata: PublicKey;
9
+ referrerUserMetadata: PublicKey;
10
+ rent: PublicKey;
11
+ systemProgram: PublicKey;
12
+ }
13
+ export declare const layout: any;
14
+ export declare function initUserMetadata(args: InitUserMetadataArgs, accounts: InitUserMetadataAccounts, programId?: PublicKey): TransactionInstruction;