@kamino-finance/klend-sdk 6.1.0-beta.0 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README_KAMINO_MANAGER.md +1 -1
- package/dist/@codegen/jupiter_perps/accounts/Custody.d.ts +57 -0
- package/dist/@codegen/jupiter_perps/accounts/Custody.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/Custody.js +176 -0
- package/dist/@codegen/jupiter_perps/accounts/Custody.js.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/Perpetuals.d.ts +36 -0
- package/dist/@codegen/jupiter_perps/accounts/Perpetuals.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/Perpetuals.js +132 -0
- package/dist/@codegen/jupiter_perps/accounts/Perpetuals.js.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/Pool.d.ts +48 -0
- package/dist/@codegen/jupiter_perps/accounts/Pool.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/Pool.js +156 -0
- package/dist/@codegen/jupiter_perps/accounts/Pool.js.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/Position.d.ts +60 -0
- package/dist/@codegen/jupiter_perps/accounts/Position.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/Position.js +180 -0
- package/dist/@codegen/jupiter_perps/accounts/Position.js.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/PositionRequest.d.ts +84 -0
- package/dist/@codegen/jupiter_perps/accounts/PositionRequest.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/PositionRequest.js +228 -0
- package/dist/@codegen/jupiter_perps/accounts/PositionRequest.js.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/TestOracle.d.ts +29 -0
- package/dist/@codegen/jupiter_perps/accounts/TestOracle.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/TestOracle.js +118 -0
- package/dist/@codegen/jupiter_perps/accounts/TestOracle.js.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/index.d.ts +13 -0
- package/dist/@codegen/jupiter_perps/accounts/index.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/accounts/index.js +16 -0
- package/dist/@codegen/jupiter_perps/accounts/index.js.map +1 -0
- package/dist/@codegen/jupiter_perps/errors/anchor.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/errors/anchor.js.map +1 -0
- package/dist/@codegen/jupiter_perps/errors/custom.d.ts +339 -0
- package/dist/@codegen/jupiter_perps/errors/custom.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/errors/custom.js +598 -0
- package/dist/@codegen/jupiter_perps/errors/custom.js.map +1 -0
- package/dist/@codegen/jupiter_perps/errors/index.d.ts +6 -0
- package/dist/@codegen/jupiter_perps/errors/index.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/errors/index.js +86 -0
- package/dist/@codegen/jupiter_perps/errors/index.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/addCustody.d.ts +20 -0
- package/dist/@codegen/jupiter_perps/instructions/addCustody.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/addCustody.js +64 -0
- package/dist/@codegen/jupiter_perps/instructions/addCustody.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/addLiquidity.d.ts +23 -0
- package/dist/@codegen/jupiter_perps/instructions/addLiquidity.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/addLiquidity.js +67 -0
- package/dist/@codegen/jupiter_perps/instructions/addLiquidity.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/addPool.d.ts +18 -0
- package/dist/@codegen/jupiter_perps/instructions/addPool.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/addPool.js +62 -0
- package/dist/@codegen/jupiter_perps/instructions/addPool.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/closePositionRequest.d.ts +20 -0
- package/dist/@codegen/jupiter_perps/instructions/closePositionRequest.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/closePositionRequest.js +76 -0
- package/dist/@codegen/jupiter_perps/instructions/closePositionRequest.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.d.ts +27 -0
- package/dist/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.js +77 -0
- package/dist/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.d.ts +27 -0
- package/dist/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.js +77 -0
- package/dist/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/decreasePosition.d.ts +28 -0
- package/dist/@codegen/jupiter_perps/instructions/decreasePosition.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/decreasePosition.js +78 -0
- package/dist/@codegen/jupiter_perps/instructions/decreasePosition.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.js +61 -0
- package/dist/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.js +61 -0
- package/dist/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getDecreasePosition.d.ts +17 -0
- package/dist/@codegen/jupiter_perps/instructions/getDecreasePosition.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getDecreasePosition.js +63 -0
- package/dist/@codegen/jupiter_perps/instructions/getDecreasePosition.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.d.ts +16 -0
- package/dist/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.js +62 -0
- package/dist/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getIncreasePosition.d.ts +17 -0
- package/dist/@codegen/jupiter_perps/instructions/getIncreasePosition.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getIncreasePosition.js +67 -0
- package/dist/@codegen/jupiter_perps/instructions/getIncreasePosition.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getLiquidationState.d.ts +16 -0
- package/dist/@codegen/jupiter_perps/instructions/getLiquidationState.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getLiquidationState.js +62 -0
- package/dist/@codegen/jupiter_perps/instructions/getLiquidationState.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getOraclePrice.d.ts +9 -0
- package/dist/@codegen/jupiter_perps/instructions/getOraclePrice.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getOraclePrice.js +17 -0
- package/dist/@codegen/jupiter_perps/instructions/getOraclePrice.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getPnl.d.ts +16 -0
- package/dist/@codegen/jupiter_perps/instructions/getPnl.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getPnl.js +60 -0
- package/dist/@codegen/jupiter_perps/instructions/getPnl.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.js +61 -0
- package/dist/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.d.ts +16 -0
- package/dist/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.js +62 -0
- package/dist/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/increasePosition.d.ts +24 -0
- package/dist/@codegen/jupiter_perps/instructions/increasePosition.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/increasePosition.js +70 -0
- package/dist/@codegen/jupiter_perps/instructions/increasePosition.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/increasePositionPreSwap.d.ts +21 -0
- package/dist/@codegen/jupiter_perps/instructions/increasePositionPreSwap.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/increasePositionPreSwap.js +67 -0
- package/dist/@codegen/jupiter_perps/instructions/increasePositionPreSwap.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/index.d.ts +71 -0
- package/dist/@codegen/jupiter_perps/instructions/index.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/index.js +74 -0
- package/dist/@codegen/jupiter_perps/instructions/index.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/init.d.ts +18 -0
- package/dist/@codegen/jupiter_perps/instructions/init.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/init.js +66 -0
- package/dist/@codegen/jupiter_perps/instructions/init.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/liquidatePosition.d.ts +25 -0
- package/dist/@codegen/jupiter_perps/instructions/liquidatePosition.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/liquidatePosition.js +71 -0
- package/dist/@codegen/jupiter_perps/instructions/liquidatePosition.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/removeLiquidity.d.ts +23 -0
- package/dist/@codegen/jupiter_perps/instructions/removeLiquidity.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/removeLiquidity.js +69 -0
- package/dist/@codegen/jupiter_perps/instructions/removeLiquidity.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/setCustodyConfig.d.ts +13 -0
- package/dist/@codegen/jupiter_perps/instructions/setCustodyConfig.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/setCustodyConfig.js +59 -0
- package/dist/@codegen/jupiter_perps/instructions/setCustodyConfig.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.d.ts +12 -0
- package/dist/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.js +58 -0
- package/dist/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/setPerpetualsConfig.d.ts +12 -0
- package/dist/@codegen/jupiter_perps/instructions/setPerpetualsConfig.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/setPerpetualsConfig.js +58 -0
- package/dist/@codegen/jupiter_perps/instructions/setPerpetualsConfig.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/setPoolConfig.d.ts +13 -0
- package/dist/@codegen/jupiter_perps/instructions/setPoolConfig.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/setPoolConfig.js +57 -0
- package/dist/@codegen/jupiter_perps/instructions/setPoolConfig.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/setTestOraclePrice.d.ts +16 -0
- package/dist/@codegen/jupiter_perps/instructions/setTestOraclePrice.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/setTestOraclePrice.js +62 -0
- package/dist/@codegen/jupiter_perps/instructions/setTestOraclePrice.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/setTestTime.d.ts +12 -0
- package/dist/@codegen/jupiter_perps/instructions/setTestTime.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/setTestTime.js +56 -0
- package/dist/@codegen/jupiter_perps/instructions/setTestTime.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/swap.d.ts +25 -0
- package/dist/@codegen/jupiter_perps/instructions/swap.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/swap.js +69 -0
- package/dist/@codegen/jupiter_perps/instructions/swap.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/swapExactOut.d.ts +25 -0
- package/dist/@codegen/jupiter_perps/instructions/swapExactOut.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/swapExactOut.js +69 -0
- package/dist/@codegen/jupiter_perps/instructions/swapExactOut.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/testInit.d.ts +16 -0
- package/dist/@codegen/jupiter_perps/instructions/testInit.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/testInit.js +64 -0
- package/dist/@codegen/jupiter_perps/instructions/testInit.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/transferAdmin.d.ts +13 -0
- package/dist/@codegen/jupiter_perps/instructions/transferAdmin.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/transferAdmin.js +57 -0
- package/dist/@codegen/jupiter_perps/instructions/transferAdmin.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.d.ts +17 -0
- package/dist/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.js +63 -0
- package/dist/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.d.ts +17 -0
- package/dist/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.js +63 -0
- package/dist/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.js.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/withdrawFees.d.ts +19 -0
- package/dist/@codegen/jupiter_perps/instructions/withdrawFees.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/instructions/withdrawFees.js +63 -0
- package/dist/@codegen/jupiter_perps/instructions/withdrawFees.js.map +1 -0
- package/dist/@codegen/jupiter_perps/programId.d.ts +4 -0
- package/dist/@codegen/jupiter_perps/programId.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/programId.js +9 -0
- package/dist/@codegen/jupiter_perps/programId.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/AddCustodyParams.d.ts +101 -0
- package/dist/@codegen/jupiter_perps/types/AddCustodyParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/AddCustodyParams.js +114 -0
- package/dist/@codegen/jupiter_perps/types/AddCustodyParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/AddLiquidityParams.d.ts +33 -0
- package/dist/@codegen/jupiter_perps/types/AddLiquidityParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/AddLiquidityParams.js +92 -0
- package/dist/@codegen/jupiter_perps/types/AddLiquidityParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/AddPoolParams.d.ts +66 -0
- package/dist/@codegen/jupiter_perps/types/AddPoolParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/AddPoolParams.js +100 -0
- package/dist/@codegen/jupiter_perps/types/AddPoolParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/AmountAndFee.d.ts +33 -0
- package/dist/@codegen/jupiter_perps/types/AmountAndFee.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/AmountAndFee.js +88 -0
- package/dist/@codegen/jupiter_perps/types/AmountAndFee.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/Assets.d.ts +48 -0
- package/dist/@codegen/jupiter_perps/types/Assets.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/Assets.js +113 -0
- package/dist/@codegen/jupiter_perps/types/Assets.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/ClosePositionRequestParams.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/types/ClosePositionRequestParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/ClosePositionRequestParams.js +61 -0
- package/dist/@codegen/jupiter_perps/types/ClosePositionRequestParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/CreateDecreasePositionRequestParams.d.ts +71 -0
- package/dist/@codegen/jupiter_perps/types/CreateDecreasePositionRequestParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/CreateDecreasePositionRequestParams.js +135 -0
- package/dist/@codegen/jupiter_perps/types/CreateDecreasePositionRequestParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/CreateIncreasePositionRequestParams.d.ts +83 -0
- package/dist/@codegen/jupiter_perps/types/CreateIncreasePositionRequestParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/CreateIncreasePositionRequestParams.js +135 -0
- package/dist/@codegen/jupiter_perps/types/CreateIncreasePositionRequestParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/DecreasePositionInfo.d.ts +58 -0
- package/dist/@codegen/jupiter_perps/types/DecreasePositionInfo.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/DecreasePositionInfo.js +127 -0
- package/dist/@codegen/jupiter_perps/types/DecreasePositionInfo.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/DecreasePositionParams.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/types/DecreasePositionParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/DecreasePositionParams.js +61 -0
- package/dist/@codegen/jupiter_perps/types/DecreasePositionParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/DecreasePositionPostSwapParams.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/types/DecreasePositionPostSwapParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/DecreasePositionPostSwapParams.js +61 -0
- package/dist/@codegen/jupiter_perps/types/DecreasePositionPostSwapParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/Fees.d.ts +63 -0
- package/dist/@codegen/jupiter_perps/types/Fees.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/Fees.js +134 -0
- package/dist/@codegen/jupiter_perps/types/Fees.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/FundingRateState.d.ts +33 -0
- package/dist/@codegen/jupiter_perps/types/FundingRateState.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/FundingRateState.js +92 -0
- package/dist/@codegen/jupiter_perps/types/FundingRateState.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetAddLiquidityAmountAndFeeParams.d.ts +23 -0
- package/dist/@codegen/jupiter_perps/types/GetAddLiquidityAmountAndFeeParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetAddLiquidityAmountAndFeeParams.js +76 -0
- package/dist/@codegen/jupiter_perps/types/GetAddLiquidityAmountAndFeeParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetDecreasePositionParams.d.ts +28 -0
- package/dist/@codegen/jupiter_perps/types/GetDecreasePositionParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetDecreasePositionParams.js +82 -0
- package/dist/@codegen/jupiter_perps/types/GetDecreasePositionParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetExactOutSwapAmountAndFeesParams.d.ts +23 -0
- package/dist/@codegen/jupiter_perps/types/GetExactOutSwapAmountAndFeesParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetExactOutSwapAmountAndFeesParams.js +76 -0
- package/dist/@codegen/jupiter_perps/types/GetExactOutSwapAmountAndFeesParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetIncreasePositionParams.d.ts +45 -0
- package/dist/@codegen/jupiter_perps/types/GetIncreasePositionParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetIncreasePositionParams.js +93 -0
- package/dist/@codegen/jupiter_perps/types/GetIncreasePositionParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetLiquidationStateParams.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/types/GetLiquidationStateParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetLiquidationStateParams.js +61 -0
- package/dist/@codegen/jupiter_perps/types/GetLiquidationStateParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetPnlAndFeeParams.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/types/GetPnlAndFeeParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetPnlAndFeeParams.js +61 -0
- package/dist/@codegen/jupiter_perps/types/GetPnlAndFeeParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetRemoveLiquidityAmountAndFeeParams.d.ts +23 -0
- package/dist/@codegen/jupiter_perps/types/GetRemoveLiquidityAmountAndFeeParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetRemoveLiquidityAmountAndFeeParams.js +76 -0
- package/dist/@codegen/jupiter_perps/types/GetRemoveLiquidityAmountAndFeeParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetSwapAmountAndFeesParams.d.ts +23 -0
- package/dist/@codegen/jupiter_perps/types/GetSwapAmountAndFeesParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/GetSwapAmountAndFeesParams.js +76 -0
- package/dist/@codegen/jupiter_perps/types/GetSwapAmountAndFeesParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/IncreasePositionInfo.d.ts +38 -0
- package/dist/@codegen/jupiter_perps/types/IncreasePositionInfo.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/IncreasePositionInfo.js +99 -0
- package/dist/@codegen/jupiter_perps/types/IncreasePositionInfo.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/IncreasePositionParams.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/types/IncreasePositionParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/IncreasePositionParams.js +61 -0
- package/dist/@codegen/jupiter_perps/types/IncreasePositionParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/IncreasePositionPreSwapParams.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/types/IncreasePositionPreSwapParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/IncreasePositionPreSwapParams.js +61 -0
- package/dist/@codegen/jupiter_perps/types/IncreasePositionPreSwapParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/InitParams.d.ts +52 -0
- package/dist/@codegen/jupiter_perps/types/InitParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/InitParams.js +116 -0
- package/dist/@codegen/jupiter_perps/types/InitParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/Limit.d.ts +33 -0
- package/dist/@codegen/jupiter_perps/types/Limit.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/Limit.js +92 -0
- package/dist/@codegen/jupiter_perps/types/Limit.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/LiquidatePositionParams.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/types/LiquidatePositionParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/LiquidatePositionParams.js +61 -0
- package/dist/@codegen/jupiter_perps/types/LiquidatePositionParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/OracleParams.d.ts +51 -0
- package/dist/@codegen/jupiter_perps/types/OracleParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/OracleParams.js +102 -0
- package/dist/@codegen/jupiter_perps/types/OracleParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/OraclePrice.d.ts +28 -0
- package/dist/@codegen/jupiter_perps/types/OraclePrice.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/OraclePrice.js +82 -0
- package/dist/@codegen/jupiter_perps/types/OraclePrice.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/OraclePriceInfo.d.ts +48 -0
- package/dist/@codegen/jupiter_perps/types/OraclePriceInfo.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/OraclePriceInfo.js +113 -0
- package/dist/@codegen/jupiter_perps/types/OraclePriceInfo.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/OracleType.d.ts +45 -0
- package/dist/@codegen/jupiter_perps/types/OracleType.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/OracleType.js +132 -0
- package/dist/@codegen/jupiter_perps/types/OracleType.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/Permissions.d.ts +52 -0
- package/dist/@codegen/jupiter_perps/types/Permissions.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/Permissions.js +116 -0
- package/dist/@codegen/jupiter_perps/types/Permissions.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/PnlAndFee.d.ts +48 -0
- package/dist/@codegen/jupiter_perps/types/PnlAndFee.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/PnlAndFee.js +113 -0
- package/dist/@codegen/jupiter_perps/types/PnlAndFee.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/PoolApr.d.ts +33 -0
- package/dist/@codegen/jupiter_perps/types/PoolApr.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/PoolApr.js +92 -0
- package/dist/@codegen/jupiter_perps/types/PoolApr.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/PriceCalcMode.d.ts +45 -0
- package/dist/@codegen/jupiter_perps/types/PriceCalcMode.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/PriceCalcMode.js +132 -0
- package/dist/@codegen/jupiter_perps/types/PriceCalcMode.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/PricingParams.d.ts +48 -0
- package/dist/@codegen/jupiter_perps/types/PricingParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/PricingParams.js +113 -0
- package/dist/@codegen/jupiter_perps/types/PricingParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/RemoveLiquidityParams.d.ts +28 -0
- package/dist/@codegen/jupiter_perps/types/RemoveLiquidityParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/RemoveLiquidityParams.js +82 -0
- package/dist/@codegen/jupiter_perps/types/RemoveLiquidityParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/RequestChange.d.ts +45 -0
- package/dist/@codegen/jupiter_perps/types/RequestChange.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/RequestChange.js +132 -0
- package/dist/@codegen/jupiter_perps/types/RequestChange.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/RequestType.d.ts +32 -0
- package/dist/@codegen/jupiter_perps/types/RequestType.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/RequestType.js +108 -0
- package/dist/@codegen/jupiter_perps/types/RequestType.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SetCustodyConfigParams.d.ts +96 -0
- package/dist/@codegen/jupiter_perps/types/SetCustodyConfigParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SetCustodyConfigParams.js +107 -0
- package/dist/@codegen/jupiter_perps/types/SetCustodyConfigParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SetCustodyGlobalLimitParams.d.ts +28 -0
- package/dist/@codegen/jupiter_perps/types/SetCustodyGlobalLimitParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SetCustodyGlobalLimitParams.js +82 -0
- package/dist/@codegen/jupiter_perps/types/SetCustodyGlobalLimitParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SetPerpetualsConfigParams.d.ts +38 -0
- package/dist/@codegen/jupiter_perps/types/SetPerpetualsConfigParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SetPerpetualsConfigParams.js +73 -0
- package/dist/@codegen/jupiter_perps/types/SetPerpetualsConfigParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SetPoolConfigParams.d.ts +61 -0
- package/dist/@codegen/jupiter_perps/types/SetPoolConfigParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SetPoolConfigParams.js +93 -0
- package/dist/@codegen/jupiter_perps/types/SetPoolConfigParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SetTestOraclePriceParams.d.ts +38 -0
- package/dist/@codegen/jupiter_perps/types/SetTestOraclePriceParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SetTestOraclePriceParams.js +99 -0
- package/dist/@codegen/jupiter_perps/types/SetTestOraclePriceParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SetTestTimeParams.d.ts +23 -0
- package/dist/@codegen/jupiter_perps/types/SetTestTimeParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SetTestTimeParams.js +76 -0
- package/dist/@codegen/jupiter_perps/types/SetTestTimeParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/Side.d.ts +45 -0
- package/dist/@codegen/jupiter_perps/types/Side.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/Side.js +132 -0
- package/dist/@codegen/jupiter_perps/types/Side.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SwapAmountAndFees.d.ts +38 -0
- package/dist/@codegen/jupiter_perps/types/SwapAmountAndFees.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SwapAmountAndFees.js +99 -0
- package/dist/@codegen/jupiter_perps/types/SwapAmountAndFees.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SwapExactOutParams.d.ts +28 -0
- package/dist/@codegen/jupiter_perps/types/SwapExactOutParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SwapExactOutParams.js +82 -0
- package/dist/@codegen/jupiter_perps/types/SwapExactOutParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SwapParams.d.ts +28 -0
- package/dist/@codegen/jupiter_perps/types/SwapParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/SwapParams.js +82 -0
- package/dist/@codegen/jupiter_perps/types/SwapParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/TestInitParams.d.ts +52 -0
- package/dist/@codegen/jupiter_perps/types/TestInitParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/TestInitParams.js +116 -0
- package/dist/@codegen/jupiter_perps/types/TestInitParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/TransferAdminParams.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/types/TransferAdminParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/TransferAdminParams.js +61 -0
- package/dist/@codegen/jupiter_perps/types/TransferAdminParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/UpdateDecreasePositionRequestParams.d.ts +28 -0
- package/dist/@codegen/jupiter_perps/types/UpdateDecreasePositionRequestParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/UpdateDecreasePositionRequestParams.js +82 -0
- package/dist/@codegen/jupiter_perps/types/UpdateDecreasePositionRequestParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/UpdateIncreasePositionRequestParams.d.ts +28 -0
- package/dist/@codegen/jupiter_perps/types/UpdateIncreasePositionRequestParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/UpdateIncreasePositionRequestParams.js +82 -0
- package/dist/@codegen/jupiter_perps/types/UpdateIncreasePositionRequestParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/WithdrawFeesParams.d.ts +15 -0
- package/dist/@codegen/jupiter_perps/types/WithdrawFeesParams.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/WithdrawFeesParams.js +61 -0
- package/dist/@codegen/jupiter_perps/types/WithdrawFeesParams.js.map +1 -0
- package/dist/@codegen/jupiter_perps/types/index.d.ts +119 -0
- package/dist/@codegen/jupiter_perps/types/index.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/types/index.js +146 -0
- package/dist/@codegen/jupiter_perps/types/index.js.map +1 -0
- package/dist/@codegen/jupiter_perps/utils/borshAddress.d.ts +4 -0
- package/dist/@codegen/jupiter_perps/utils/borshAddress.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/utils/borshAddress.js +30 -0
- package/dist/@codegen/jupiter_perps/utils/borshAddress.js.map +1 -0
- package/dist/@codegen/jupiter_perps/utils/index.d.ts +2 -0
- package/dist/@codegen/jupiter_perps/utils/index.d.ts.map +1 -0
- package/dist/@codegen/jupiter_perps/utils/index.js +18 -0
- package/dist/@codegen/jupiter_perps/utils/index.js.map +1 -0
- package/dist/@codegen/klend/accounts/GlobalConfig.d.ts +40 -0
- package/dist/@codegen/klend/accounts/GlobalConfig.d.ts.map +1 -0
- package/dist/@codegen/klend/accounts/GlobalConfig.js +118 -0
- package/dist/@codegen/klend/accounts/GlobalConfig.js.map +1 -0
- package/dist/@codegen/klend/accounts/LendingMarket.d.ts +252 -0
- package/dist/@codegen/klend/accounts/LendingMarket.d.ts.map +1 -0
- package/dist/@codegen/klend/accounts/LendingMarket.js +336 -0
- package/dist/@codegen/klend/accounts/LendingMarket.js.map +1 -0
- package/dist/@codegen/klend/accounts/Obligation.d.ts +199 -0
- package/dist/@codegen/klend/accounts/Obligation.d.ts.map +1 -0
- package/dist/@codegen/klend/accounts/Obligation.js +295 -0
- package/dist/@codegen/klend/accounts/Obligation.js.map +1 -0
- package/dist/@codegen/klend/accounts/ReferrerState.d.ts +22 -0
- package/dist/@codegen/klend/accounts/ReferrerState.d.ts.map +1 -0
- package/dist/@codegen/klend/accounts/ReferrerState.js +102 -0
- package/dist/@codegen/klend/accounts/ReferrerState.js.map +1 -0
- package/dist/@codegen/klend/accounts/ReferrerTokenState.d.ts +51 -0
- package/dist/@codegen/klend/accounts/ReferrerTokenState.d.ts.map +1 -0
- package/dist/@codegen/klend/accounts/ReferrerTokenState.js +137 -0
- package/dist/@codegen/klend/accounts/ReferrerTokenState.js.map +1 -0
- package/dist/@codegen/klend/accounts/Reserve.d.ts +90 -0
- package/dist/@codegen/klend/accounts/Reserve.d.ts.map +1 -0
- package/dist/@codegen/klend/accounts/Reserve.js +192 -0
- package/dist/@codegen/klend/accounts/Reserve.js.map +1 -0
- package/dist/@codegen/klend/accounts/ShortUrl.d.ts +22 -0
- package/dist/@codegen/klend/accounts/ShortUrl.d.ts.map +1 -0
- package/dist/@codegen/klend/accounts/ShortUrl.js +102 -0
- package/dist/@codegen/klend/accounts/ShortUrl.js.map +1 -0
- package/dist/@codegen/klend/accounts/UserMetadata.d.ts +48 -0
- package/dist/@codegen/klend/accounts/UserMetadata.d.ts.map +1 -0
- package/dist/@codegen/klend/accounts/UserMetadata.js +136 -0
- package/dist/@codegen/klend/accounts/UserMetadata.js.map +1 -0
- package/dist/@codegen/klend/accounts/UserState.d.ts +143 -0
- package/dist/@codegen/klend/accounts/UserState.d.ts.map +1 -0
- package/dist/@codegen/klend/accounts/UserState.js +222 -0
- package/dist/@codegen/klend/accounts/UserState.js.map +1 -0
- package/dist/@codegen/klend/accounts/index.d.ts.map +1 -0
- package/dist/@codegen/klend/accounts/index.js.map +1 -0
- package/dist/@codegen/klend/errors/anchor.d.ts.map +1 -0
- package/dist/@codegen/klend/errors/anchor.js.map +1 -0
- package/dist/@codegen/klend/errors/custom.d.ts.map +1 -0
- package/dist/@codegen/klend/errors/custom.js.map +1 -0
- package/dist/@codegen/klend/errors/index.d.ts +6 -0
- package/dist/@codegen/klend/errors/index.d.ts.map +1 -0
- package/dist/@codegen/klend/errors/index.js +86 -0
- package/dist/@codegen/klend/errors/index.js.map +1 -0
- package/dist/@codegen/klend/instructions/borrowObligationLiquidity.d.ts +22 -0
- package/dist/@codegen/klend/instructions/borrowObligationLiquidity.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/borrowObligationLiquidity.js +69 -0
- package/dist/@codegen/klend/instructions/borrowObligationLiquidity.js.map +1 -0
- package/dist/@codegen/klend/instructions/borrowObligationLiquidityV2.d.ts +29 -0
- package/dist/@codegen/klend/instructions/borrowObligationLiquidityV2.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/borrowObligationLiquidityV2.js +86 -0
- package/dist/@codegen/klend/instructions/borrowObligationLiquidityV2.js.map +1 -0
- package/dist/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.d.ts +10 -0
- package/dist/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.js +18 -0
- package/dist/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.js.map +1 -0
- package/dist/@codegen/klend/instructions/depositAndWithdraw.d.ts +52 -0
- package/dist/@codegen/klend/instructions/depositAndWithdraw.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/depositAndWithdraw.js +134 -0
- package/dist/@codegen/klend/instructions/depositAndWithdraw.js.map +1 -0
- package/dist/@codegen/klend/instructions/depositObligationCollateral.d.ts +18 -0
- package/dist/@codegen/klend/instructions/depositObligationCollateral.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/depositObligationCollateral.js +61 -0
- package/dist/@codegen/klend/instructions/depositObligationCollateral.js.map +1 -0
- package/dist/@codegen/klend/instructions/depositObligationCollateralV2.d.ts +26 -0
- package/dist/@codegen/klend/instructions/depositObligationCollateralV2.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/depositObligationCollateralV2.js +78 -0
- package/dist/@codegen/klend/instructions/depositObligationCollateralV2.js.map +1 -0
- package/dist/@codegen/klend/instructions/depositReserveLiquidity.d.ts +22 -0
- package/dist/@codegen/klend/instructions/depositReserveLiquidity.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/depositReserveLiquidity.js +65 -0
- package/dist/@codegen/klend/instructions/depositReserveLiquidity.js.map +1 -0
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.d.ts +24 -0
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.js +74 -0
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.js.map +1 -0
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts +31 -0
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.js +91 -0
- package/dist/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.js.map +1 -0
- package/dist/@codegen/klend/instructions/flashBorrowReserveLiquidity.d.ts +22 -0
- package/dist/@codegen/klend/instructions/flashBorrowReserveLiquidity.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/flashBorrowReserveLiquidity.js +75 -0
- package/dist/@codegen/klend/instructions/flashBorrowReserveLiquidity.js.map +1 -0
- package/dist/@codegen/klend/instructions/flashRepayReserveLiquidity.d.ts +23 -0
- package/dist/@codegen/klend/instructions/flashRepayReserveLiquidity.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/flashRepayReserveLiquidity.js +79 -0
- package/dist/@codegen/klend/instructions/flashRepayReserveLiquidity.js.map +1 -0
- package/dist/@codegen/klend/instructions/idlMissingTypes.d.ts +20 -0
- package/dist/@codegen/klend/instructions/idlMissingTypes.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/idlMissingTypes.js +72 -0
- package/dist/@codegen/klend/instructions/idlMissingTypes.js.map +1 -0
- package/dist/@codegen/klend/instructions/index.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/index.js.map +1 -0
- package/dist/@codegen/klend/instructions/initFarmsForReserve.d.ts +19 -0
- package/dist/@codegen/klend/instructions/initFarmsForReserve.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/initFarmsForReserve.js +67 -0
- package/dist/@codegen/klend/instructions/initFarmsForReserve.js.map +1 -0
- package/dist/@codegen/klend/instructions/initGlobalConfig.d.ts +10 -0
- package/dist/@codegen/klend/instructions/initGlobalConfig.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/initGlobalConfig.js +18 -0
- package/dist/@codegen/klend/instructions/initGlobalConfig.js.map +1 -0
- package/dist/@codegen/klend/instructions/initLendingMarket.d.ts +14 -0
- package/dist/@codegen/klend/instructions/initLendingMarket.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/initLendingMarket.js +64 -0
- package/dist/@codegen/klend/instructions/initLendingMarket.js.map +1 -0
- package/dist/@codegen/klend/instructions/initObligation.d.ts +19 -0
- package/dist/@codegen/klend/instructions/initObligation.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/initObligation.js +67 -0
- package/dist/@codegen/klend/instructions/initObligation.js.map +1 -0
- package/dist/@codegen/klend/instructions/initObligationFarmsForReserve.d.ts +20 -0
- package/dist/@codegen/klend/instructions/initObligationFarmsForReserve.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/initObligationFarmsForReserve.js +64 -0
- package/dist/@codegen/klend/instructions/initObligationFarmsForReserve.js.map +1 -0
- package/dist/@codegen/klend/instructions/initReferrerStateAndShortUrl.d.ts +15 -0
- package/dist/@codegen/klend/instructions/initReferrerStateAndShortUrl.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/initReferrerStateAndShortUrl.js +59 -0
- package/dist/@codegen/klend/instructions/initReferrerStateAndShortUrl.js.map +1 -0
- package/dist/@codegen/klend/instructions/initReferrerTokenState.d.ts +12 -0
- package/dist/@codegen/klend/instructions/initReferrerTokenState.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/initReferrerTokenState.js +20 -0
- package/dist/@codegen/klend/instructions/initReferrerTokenState.js.map +1 -0
- package/dist/@codegen/klend/instructions/initReserve.d.ts +19 -0
- package/dist/@codegen/klend/instructions/initReserve.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/initReserve.js +31 -0
- package/dist/@codegen/klend/instructions/initReserve.js.map +1 -0
- package/dist/@codegen/klend/instructions/initUserMetadata.d.ts +15 -0
- package/dist/@codegen/klend/instructions/initUserMetadata.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/initUserMetadata.js +64 -0
- package/dist/@codegen/klend/instructions/initUserMetadata.js.map +1 -0
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts +32 -0
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.js +83 -0
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.js.map +1 -0
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts +43 -0
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.js +137 -0
- package/dist/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.js.map +1 -0
- package/dist/@codegen/klend/instructions/markObligationForDeleveraging.d.ts +12 -0
- package/dist/@codegen/klend/instructions/markObligationForDeleveraging.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/markObligationForDeleveraging.js +60 -0
- package/dist/@codegen/klend/instructions/markObligationForDeleveraging.js.map +1 -0
- package/dist/@codegen/klend/instructions/redeemFees.d.ts +12 -0
- package/dist/@codegen/klend/instructions/redeemFees.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/redeemFees.js +20 -0
- package/dist/@codegen/klend/instructions/redeemFees.js.map +1 -0
- package/dist/@codegen/klend/instructions/redeemReserveCollateral.d.ts +22 -0
- package/dist/@codegen/klend/instructions/redeemReserveCollateral.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/redeemReserveCollateral.js +65 -0
- package/dist/@codegen/klend/instructions/redeemReserveCollateral.js.map +1 -0
- package/dist/@codegen/klend/instructions/refreshObligation.d.ts +7 -0
- package/dist/@codegen/klend/instructions/refreshObligation.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/refreshObligation.js +15 -0
- package/dist/@codegen/klend/instructions/refreshObligation.js.map +1 -0
- package/dist/@codegen/klend/instructions/refreshObligationFarmsForReserve.d.ts +21 -0
- package/dist/@codegen/klend/instructions/refreshObligationFarmsForReserve.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/refreshObligationFarmsForReserve.js +63 -0
- package/dist/@codegen/klend/instructions/refreshObligationFarmsForReserve.js.map +1 -0
- package/dist/@codegen/klend/instructions/refreshReserve.d.ts +11 -0
- package/dist/@codegen/klend/instructions/refreshReserve.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/refreshReserve.js +29 -0
- package/dist/@codegen/klend/instructions/refreshReserve.js.map +1 -0
- package/dist/@codegen/klend/instructions/refreshReservesBatch.d.ts +7 -0
- package/dist/@codegen/klend/instructions/refreshReservesBatch.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/refreshReservesBatch.js +52 -0
- package/dist/@codegen/klend/instructions/refreshReservesBatch.js.map +1 -0
- package/dist/@codegen/klend/instructions/repayAndWithdrawAndRedeem.d.ts +47 -0
- package/dist/@codegen/klend/instructions/repayAndWithdrawAndRedeem.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/repayAndWithdrawAndRedeem.js +118 -0
- package/dist/@codegen/klend/instructions/repayAndWithdrawAndRedeem.js.map +1 -0
- package/dist/@codegen/klend/instructions/repayObligationLiquidity.d.ts +19 -0
- package/dist/@codegen/klend/instructions/repayObligationLiquidity.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/repayObligationLiquidity.js +62 -0
- package/dist/@codegen/klend/instructions/repayObligationLiquidity.js.map +1 -0
- package/dist/@codegen/klend/instructions/repayObligationLiquidityV2.d.ts +27 -0
- package/dist/@codegen/klend/instructions/repayObligationLiquidityV2.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/repayObligationLiquidityV2.js +79 -0
- package/dist/@codegen/klend/instructions/repayObligationLiquidityV2.js.map +1 -0
- package/dist/@codegen/klend/instructions/requestElevationGroup.d.ts +12 -0
- package/dist/@codegen/klend/instructions/requestElevationGroup.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/requestElevationGroup.js +56 -0
- package/dist/@codegen/klend/instructions/requestElevationGroup.js.map +1 -0
- package/dist/@codegen/klend/instructions/setObligationOrder.d.ts +14 -0
- package/dist/@codegen/klend/instructions/setObligationOrder.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/setObligationOrder.js +61 -0
- package/dist/@codegen/klend/instructions/setObligationOrder.js.map +1 -0
- package/dist/@codegen/klend/instructions/socializeLoss.d.ts +15 -0
- package/dist/@codegen/klend/instructions/socializeLoss.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/socializeLoss.js +62 -0
- package/dist/@codegen/klend/instructions/socializeLoss.js.map +1 -0
- package/dist/@codegen/klend/instructions/socializeLossV2.d.ts +23 -0
- package/dist/@codegen/klend/instructions/socializeLossV2.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/socializeLossV2.js +78 -0
- package/dist/@codegen/klend/instructions/socializeLossV2.js.map +1 -0
- package/dist/@codegen/klend/instructions/updateGlobalConfig.d.ts +13 -0
- package/dist/@codegen/klend/instructions/updateGlobalConfig.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/updateGlobalConfig.js +64 -0
- package/dist/@codegen/klend/instructions/updateGlobalConfig.js.map +1 -0
- package/dist/@codegen/klend/instructions/updateGlobalConfigAdmin.d.ts +7 -0
- package/dist/@codegen/klend/instructions/updateGlobalConfigAdmin.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/updateGlobalConfigAdmin.js +19 -0
- package/dist/@codegen/klend/instructions/updateGlobalConfigAdmin.js.map +1 -0
- package/dist/@codegen/klend/instructions/updateLendingMarket.d.ts +13 -0
- package/dist/@codegen/klend/instructions/updateLendingMarket.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/updateLendingMarket.js +63 -0
- package/dist/@codegen/klend/instructions/updateLendingMarket.js.map +1 -0
- package/dist/@codegen/klend/instructions/updateLendingMarketOwner.d.ts +7 -0
- package/dist/@codegen/klend/instructions/updateLendingMarketOwner.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/updateLendingMarketOwner.js +19 -0
- package/dist/@codegen/klend/instructions/updateLendingMarketOwner.js.map +1 -0
- package/dist/@codegen/klend/instructions/updateReserveConfig.d.ts +16 -0
- package/dist/@codegen/klend/instructions/updateReserveConfig.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/updateReserveConfig.js +64 -0
- package/dist/@codegen/klend/instructions/updateReserveConfig.js.map +1 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateral.d.ts +19 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateral.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateral.js +62 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateral.js.map +1 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts +24 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js +74 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js.map +1 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts +31 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.js +89 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.js.map +1 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.d.ts +26 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.js +78 -0
- package/dist/@codegen/klend/instructions/withdrawObligationCollateralV2.js.map +1 -0
- package/dist/@codegen/klend/instructions/withdrawProtocolFee.d.ts +18 -0
- package/dist/@codegen/klend/instructions/withdrawProtocolFee.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/withdrawProtocolFee.js +61 -0
- package/dist/@codegen/klend/instructions/withdrawProtocolFee.js.map +1 -0
- package/dist/@codegen/klend/instructions/withdrawReferrerFees.d.ts +14 -0
- package/dist/@codegen/klend/instructions/withdrawReferrerFees.d.ts.map +1 -0
- package/dist/@codegen/klend/instructions/withdrawReferrerFees.js +22 -0
- package/dist/@codegen/klend/instructions/withdrawReferrerFees.js.map +1 -0
- package/dist/@codegen/klend/programId.d.ts +4 -0
- package/dist/@codegen/klend/programId.d.ts.map +1 -0
- package/dist/@codegen/klend/programId.js +9 -0
- package/dist/@codegen/klend/programId.js.map +1 -0
- package/dist/@codegen/klend/types/AssetTier.d.ts.map +1 -0
- package/dist/@codegen/klend/types/AssetTier.js.map +1 -0
- package/dist/@codegen/klend/types/BigFractionBytes.d.ts +28 -0
- package/dist/@codegen/klend/types/BigFractionBytes.d.ts.map +1 -0
- package/dist/@codegen/klend/types/BigFractionBytes.js.map +1 -0
- package/dist/@codegen/klend/types/BorrowRateCurve.d.ts +28 -0
- package/dist/@codegen/klend/types/BorrowRateCurve.d.ts.map +1 -0
- package/dist/@codegen/klend/types/BorrowRateCurve.js.map +1 -0
- package/dist/@codegen/klend/types/CurvePoint.d.ts +27 -0
- package/dist/@codegen/klend/types/CurvePoint.d.ts.map +1 -0
- package/dist/@codegen/klend/types/CurvePoint.js.map +1 -0
- package/dist/@codegen/klend/types/ElevationGroup.d.ts +67 -0
- package/dist/@codegen/klend/types/ElevationGroup.d.ts.map +1 -0
- package/dist/@codegen/klend/types/ElevationGroup.js +137 -0
- package/dist/@codegen/klend/types/ElevationGroup.js.map +1 -0
- package/dist/@codegen/klend/types/FeeCalculation.d.ts.map +1 -0
- package/dist/@codegen/klend/types/FeeCalculation.js.map +1 -0
- package/dist/@codegen/klend/types/InitObligationArgs.d.ts +27 -0
- package/dist/@codegen/klend/types/InitObligationArgs.d.ts.map +1 -0
- package/dist/@codegen/klend/types/InitObligationArgs.js.map +1 -0
- package/dist/@codegen/klend/types/LastUpdate.d.ts +48 -0
- package/dist/@codegen/klend/types/LastUpdate.d.ts.map +1 -0
- package/dist/@codegen/klend/types/LastUpdate.js.map +1 -0
- package/dist/@codegen/klend/types/ObligationCollateral.d.ts +72 -0
- package/dist/@codegen/klend/types/ObligationCollateral.d.ts.map +1 -0
- package/dist/@codegen/klend/types/ObligationCollateral.js +119 -0
- package/dist/@codegen/klend/types/ObligationCollateral.js.map +1 -0
- package/dist/@codegen/klend/types/ObligationLiquidity.d.ts +84 -0
- package/dist/@codegen/klend/types/ObligationLiquidity.d.ts.map +1 -0
- package/dist/@codegen/klend/types/ObligationLiquidity.js +141 -0
- package/dist/@codegen/klend/types/ObligationLiquidity.js.map +1 -0
- package/dist/@codegen/klend/types/ObligationOrder.d.ts +284 -0
- package/dist/@codegen/klend/types/ObligationOrder.d.ts.map +1 -0
- package/dist/@codegen/klend/types/ObligationOrder.js.map +1 -0
- package/dist/@codegen/klend/types/PriceHeuristic.d.ts +42 -0
- package/dist/@codegen/klend/types/PriceHeuristic.d.ts.map +1 -0
- package/dist/@codegen/klend/types/PriceHeuristic.js.map +1 -0
- package/dist/@codegen/klend/types/PythConfiguration.d.ts +26 -0
- package/dist/@codegen/klend/types/PythConfiguration.d.ts.map +1 -0
- package/dist/@codegen/klend/types/PythConfiguration.js +75 -0
- package/dist/@codegen/klend/types/PythConfiguration.js.map +1 -0
- package/dist/@codegen/klend/types/ReserveCollateral.d.ts +54 -0
- package/dist/@codegen/klend/types/ReserveCollateral.d.ts.map +1 -0
- package/dist/@codegen/klend/types/ReserveCollateral.js +112 -0
- package/dist/@codegen/klend/types/ReserveCollateral.js.map +1 -0
- package/dist/@codegen/klend/types/ReserveConfig.d.ts +438 -0
- package/dist/@codegen/klend/types/ReserveConfig.d.ts.map +1 -0
- package/dist/@codegen/klend/types/ReserveConfig.js.map +1 -0
- package/dist/@codegen/klend/types/ReserveFarmKind.d.ts.map +1 -0
- package/dist/@codegen/klend/types/ReserveFarmKind.js.map +1 -0
- package/dist/@codegen/klend/types/ReserveFees.d.ts +79 -0
- package/dist/@codegen/klend/types/ReserveFees.d.ts.map +1 -0
- package/dist/@codegen/klend/types/ReserveFees.js.map +1 -0
- package/dist/@codegen/klend/types/ReserveLiquidity.d.ts +182 -0
- package/dist/@codegen/klend/types/ReserveLiquidity.d.ts.map +1 -0
- package/dist/@codegen/klend/types/ReserveLiquidity.js +225 -0
- package/dist/@codegen/klend/types/ReserveLiquidity.js.map +1 -0
- package/dist/@codegen/klend/types/ReserveStatus.d.ts.map +1 -0
- package/dist/@codegen/klend/types/ReserveStatus.js.map +1 -0
- package/dist/@codegen/klend/types/ScopeConfiguration.d.ts +42 -0
- package/dist/@codegen/klend/types/ScopeConfiguration.d.ts.map +1 -0
- package/dist/@codegen/klend/types/ScopeConfiguration.js +93 -0
- package/dist/@codegen/klend/types/ScopeConfiguration.js.map +1 -0
- package/dist/@codegen/klend/types/SwitchboardConfiguration.d.ts +31 -0
- package/dist/@codegen/klend/types/SwitchboardConfiguration.d.ts.map +1 -0
- package/dist/@codegen/klend/types/SwitchboardConfiguration.js +81 -0
- package/dist/@codegen/klend/types/SwitchboardConfiguration.js.map +1 -0
- package/dist/@codegen/klend/types/TokenInfo.d.ts +118 -0
- package/dist/@codegen/klend/types/TokenInfo.d.ts.map +1 -0
- package/dist/@codegen/klend/types/TokenInfo.js.map +1 -0
- package/dist/@codegen/klend/types/UpdateConfigMode.d.ts.map +1 -0
- package/dist/@codegen/klend/types/UpdateConfigMode.js.map +1 -0
- package/dist/@codegen/klend/types/UpdateGlobalConfigMode.d.ts.map +1 -0
- package/dist/@codegen/klend/types/UpdateGlobalConfigMode.js.map +1 -0
- package/dist/@codegen/klend/types/UpdateLendingMarketConfigValue.d.ts +198 -0
- package/dist/@codegen/klend/types/UpdateLendingMarketConfigValue.d.ts.map +1 -0
- package/dist/@codegen/klend/types/UpdateLendingMarketConfigValue.js +355 -0
- package/dist/@codegen/klend/types/UpdateLendingMarketConfigValue.js.map +1 -0
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.d.ts.map +1 -0
- package/dist/@codegen/klend/types/UpdateLendingMarketMode.js.map +1 -0
- package/dist/@codegen/klend/types/WithdrawalCaps.d.ts +39 -0
- package/dist/@codegen/klend/types/WithdrawalCaps.d.ts.map +1 -0
- package/dist/@codegen/klend/types/WithdrawalCaps.js.map +1 -0
- package/dist/@codegen/klend/types/index.d.ts.map +1 -0
- package/dist/@codegen/klend/types/index.js.map +1 -0
- package/dist/@codegen/klend/utils/borshAddress.d.ts +4 -0
- package/dist/@codegen/klend/utils/borshAddress.d.ts.map +1 -0
- package/dist/@codegen/klend/utils/borshAddress.js +30 -0
- package/dist/@codegen/klend/utils/borshAddress.js.map +1 -0
- package/dist/@codegen/klend/utils/index.d.ts +2 -0
- package/dist/@codegen/klend/utils/index.d.ts.map +1 -0
- package/dist/@codegen/klend/utils/index.js +18 -0
- package/dist/@codegen/klend/utils/index.js.map +1 -0
- package/dist/@codegen/klend/zero_padding/ObligationZP.d.ts +73 -0
- package/dist/@codegen/klend/zero_padding/ObligationZP.d.ts.map +1 -0
- package/dist/@codegen/klend/zero_padding/ObligationZP.js +225 -0
- package/dist/@codegen/klend/zero_padding/ObligationZP.js.map +1 -0
- package/dist/@codegen/klend/zero_padding/index.d.ts.map +1 -0
- package/dist/@codegen/klend/zero_padding/index.js.map +1 -0
- package/dist/@codegen/kvault/accounts/Reserve.d.ts +90 -0
- package/dist/@codegen/kvault/accounts/Reserve.d.ts.map +1 -0
- package/dist/@codegen/kvault/accounts/Reserve.js +192 -0
- package/dist/@codegen/kvault/accounts/Reserve.js.map +1 -0
- package/dist/@codegen/kvault/accounts/VaultState.d.ts +126 -0
- package/dist/@codegen/kvault/accounts/VaultState.d.ts.map +1 -0
- package/dist/@codegen/kvault/accounts/VaultState.js +312 -0
- package/dist/@codegen/kvault/accounts/VaultState.js.map +1 -0
- package/dist/@codegen/kvault/accounts/index.d.ts.map +1 -0
- package/dist/@codegen/kvault/accounts/index.js.map +1 -0
- package/dist/@codegen/kvault/errors/anchor.d.ts +435 -0
- package/dist/@codegen/kvault/errors/anchor.d.ts.map +1 -0
- package/dist/@codegen/kvault/errors/anchor.js +767 -0
- package/dist/@codegen/kvault/errors/anchor.js.map +1 -0
- package/dist/@codegen/kvault/errors/custom.d.ts +395 -0
- package/dist/@codegen/kvault/errors/custom.d.ts.map +1 -0
- package/dist/@codegen/kvault/errors/custom.js +696 -0
- package/dist/@codegen/kvault/errors/custom.js.map +1 -0
- package/dist/@codegen/kvault/errors/index.d.ts +6 -0
- package/dist/@codegen/kvault/errors/index.d.ts.map +1 -0
- package/dist/@codegen/kvault/errors/index.js +86 -0
- package/dist/@codegen/kvault/errors/index.js.map +1 -0
- package/dist/@codegen/kvault/instructions/deposit.d.ts +23 -0
- package/dist/@codegen/kvault/instructions/deposit.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/deposit.js +66 -0
- package/dist/@codegen/kvault/instructions/deposit.js.map +1 -0
- package/dist/@codegen/kvault/instructions/giveUpPendingFees.d.ts +13 -0
- package/dist/@codegen/kvault/instructions/giveUpPendingFees.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/giveUpPendingFees.js +60 -0
- package/dist/@codegen/kvault/instructions/giveUpPendingFees.js.map +1 -0
- package/dist/@codegen/kvault/instructions/index.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/index.js.map +1 -0
- package/dist/@codegen/kvault/instructions/initVault.d.ts +16 -0
- package/dist/@codegen/kvault/instructions/initVault.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/initVault.js +28 -0
- package/dist/@codegen/kvault/instructions/initVault.js.map +1 -0
- package/dist/@codegen/kvault/instructions/initializeSharesMetadata.d.ts +19 -0
- package/dist/@codegen/kvault/instructions/initializeSharesMetadata.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/initializeSharesMetadata.js +71 -0
- package/dist/@codegen/kvault/instructions/initializeSharesMetadata.js.map +1 -0
- package/dist/@codegen/kvault/instructions/invest.d.ts +22 -0
- package/dist/@codegen/kvault/instructions/invest.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/invest.js +29 -0
- package/dist/@codegen/kvault/instructions/invest.js.map +1 -0
- package/dist/@codegen/kvault/instructions/removeAllocation.d.ts +8 -0
- package/dist/@codegen/kvault/instructions/removeAllocation.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/removeAllocation.js +20 -0
- package/dist/@codegen/kvault/instructions/removeAllocation.js.map +1 -0
- package/dist/@codegen/kvault/instructions/updateAdmin.d.ts +7 -0
- package/dist/@codegen/kvault/instructions/updateAdmin.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/updateAdmin.js +19 -0
- package/dist/@codegen/kvault/instructions/updateAdmin.js.map +1 -0
- package/dist/@codegen/kvault/instructions/updateReserveAllocation.d.ts +20 -0
- package/dist/@codegen/kvault/instructions/updateReserveAllocation.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/updateReserveAllocation.js +63 -0
- package/dist/@codegen/kvault/instructions/updateReserveAllocation.js.map +1 -0
- package/dist/@codegen/kvault/instructions/updateSharesMetadata.d.ts +16 -0
- package/dist/@codegen/kvault/instructions/updateSharesMetadata.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/updateSharesMetadata.js +68 -0
- package/dist/@codegen/kvault/instructions/updateSharesMetadata.js.map +1 -0
- package/dist/@codegen/kvault/instructions/updateVaultConfig.d.ts +14 -0
- package/dist/@codegen/kvault/instructions/updateVaultConfig.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/updateVaultConfig.js +65 -0
- package/dist/@codegen/kvault/instructions/updateVaultConfig.js.map +1 -0
- package/dist/@codegen/kvault/instructions/withdraw.d.ts +38 -0
- package/dist/@codegen/kvault/instructions/withdraw.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/withdraw.js +96 -0
- package/dist/@codegen/kvault/instructions/withdraw.js.map +1 -0
- package/dist/@codegen/kvault/instructions/withdrawFromAvailable.d.ts +23 -0
- package/dist/@codegen/kvault/instructions/withdrawFromAvailable.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/withdrawFromAvailable.js +66 -0
- package/dist/@codegen/kvault/instructions/withdrawFromAvailable.js.map +1 -0
- package/dist/@codegen/kvault/instructions/withdrawPendingFees.d.ts +22 -0
- package/dist/@codegen/kvault/instructions/withdrawPendingFees.d.ts.map +1 -0
- package/dist/@codegen/kvault/instructions/withdrawPendingFees.js +33 -0
- package/dist/@codegen/kvault/instructions/withdrawPendingFees.js.map +1 -0
- package/dist/@codegen/kvault/programId.d.ts +4 -0
- package/dist/@codegen/kvault/programId.d.ts.map +1 -0
- package/dist/@codegen/kvault/programId.js +9 -0
- package/dist/@codegen/kvault/programId.js.map +1 -0
- package/dist/@codegen/kvault/types/BigFractionBytes.d.ts +28 -0
- package/dist/@codegen/kvault/types/BigFractionBytes.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/BigFractionBytes.js.map +1 -0
- package/dist/@codegen/kvault/types/BorrowRateCurve.d.ts +28 -0
- package/dist/@codegen/kvault/types/BorrowRateCurve.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/BorrowRateCurve.js.map +1 -0
- package/dist/@codegen/kvault/types/CurvePoint.d.ts +27 -0
- package/dist/@codegen/kvault/types/CurvePoint.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/CurvePoint.js.map +1 -0
- package/dist/@codegen/kvault/types/LastUpdate.d.ts +48 -0
- package/dist/@codegen/kvault/types/LastUpdate.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/LastUpdate.js.map +1 -0
- package/dist/@codegen/kvault/types/PriceHeuristic.d.ts +42 -0
- package/dist/@codegen/kvault/types/PriceHeuristic.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/PriceHeuristic.js.map +1 -0
- package/dist/@codegen/kvault/types/PythConfiguration.d.ts +26 -0
- package/dist/@codegen/kvault/types/PythConfiguration.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/PythConfiguration.js +75 -0
- package/dist/@codegen/kvault/types/PythConfiguration.js.map +1 -0
- package/dist/@codegen/kvault/types/ReserveCollateral.d.ts +54 -0
- package/dist/@codegen/kvault/types/ReserveCollateral.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/ReserveCollateral.js +112 -0
- package/dist/@codegen/kvault/types/ReserveCollateral.js.map +1 -0
- package/dist/@codegen/kvault/types/ReserveConfig.d.ts +438 -0
- package/dist/@codegen/kvault/types/ReserveConfig.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/ReserveConfig.js.map +1 -0
- package/dist/@codegen/kvault/types/ReserveFees.d.ts +79 -0
- package/dist/@codegen/kvault/types/ReserveFees.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/ReserveFees.js.map +1 -0
- package/dist/@codegen/kvault/types/ReserveLiquidity.d.ts +182 -0
- package/dist/@codegen/kvault/types/ReserveLiquidity.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/ReserveLiquidity.js +225 -0
- package/dist/@codegen/kvault/types/ReserveLiquidity.js.map +1 -0
- package/dist/@codegen/kvault/types/ScopeConfiguration.d.ts +42 -0
- package/dist/@codegen/kvault/types/ScopeConfiguration.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/ScopeConfiguration.js +93 -0
- package/dist/@codegen/kvault/types/ScopeConfiguration.js.map +1 -0
- package/dist/@codegen/kvault/types/SwitchboardConfiguration.d.ts +31 -0
- package/dist/@codegen/kvault/types/SwitchboardConfiguration.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/SwitchboardConfiguration.js +81 -0
- package/dist/@codegen/kvault/types/SwitchboardConfiguration.js.map +1 -0
- package/dist/@codegen/kvault/types/TokenInfo.d.ts +118 -0
- package/dist/@codegen/kvault/types/TokenInfo.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/TokenInfo.js.map +1 -0
- package/dist/@codegen/kvault/types/VaultAllocation.d.ts +72 -0
- package/dist/@codegen/kvault/types/VaultAllocation.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/VaultAllocation.js +144 -0
- package/dist/@codegen/kvault/types/VaultAllocation.js.map +1 -0
- package/dist/@codegen/kvault/types/VaultConfigField.d.ts +188 -0
- package/dist/@codegen/kvault/types/VaultConfigField.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/VaultConfigField.js +396 -0
- package/dist/@codegen/kvault/types/VaultConfigField.js.map +1 -0
- package/dist/@codegen/kvault/types/WithdrawalCaps.d.ts +39 -0
- package/dist/@codegen/kvault/types/WithdrawalCaps.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/WithdrawalCaps.js.map +1 -0
- package/dist/@codegen/kvault/types/index.d.ts +35 -0
- package/dist/@codegen/kvault/types/index.d.ts.map +1 -0
- package/dist/@codegen/kvault/types/index.js.map +1 -0
- package/dist/@codegen/kvault/utils/borshAddress.d.ts +4 -0
- package/dist/@codegen/kvault/utils/borshAddress.d.ts.map +1 -0
- package/dist/@codegen/kvault/utils/borshAddress.js +30 -0
- package/dist/@codegen/kvault/utils/borshAddress.js.map +1 -0
- package/dist/@codegen/kvault/utils/index.d.ts +2 -0
- package/dist/@codegen/kvault/utils/index.d.ts.map +1 -0
- package/dist/@codegen/kvault/utils/index.js +18 -0
- package/dist/@codegen/kvault/utils/index.js.map +1 -0
- package/dist/@codegen/pyth_rec/accounts/Config.d.ts +36 -0
- package/dist/@codegen/pyth_rec/accounts/Config.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/accounts/Config.js +134 -0
- package/dist/@codegen/pyth_rec/accounts/Config.js.map +1 -0
- package/dist/@codegen/pyth_rec/accounts/index.d.ts +7 -0
- package/dist/@codegen/pyth_rec/accounts/index.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/accounts/index.js +10 -0
- package/dist/@codegen/pyth_rec/accounts/index.js.map +1 -0
- package/dist/@codegen/pyth_rec/accounts/priceUpdateV2.d.ts +30 -0
- package/dist/@codegen/pyth_rec/accounts/priceUpdateV2.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/accounts/priceUpdateV2.js +120 -0
- package/dist/@codegen/pyth_rec/accounts/priceUpdateV2.js.map +1 -0
- package/dist/@codegen/pyth_rec/accounts/twapUpdate.d.ts +23 -0
- package/dist/@codegen/pyth_rec/accounts/twapUpdate.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/accounts/twapUpdate.js +103 -0
- package/dist/@codegen/pyth_rec/accounts/twapUpdate.js.map +1 -0
- package/dist/@codegen/pyth_rec/errors/anchor.d.ts +435 -0
- package/dist/@codegen/pyth_rec/errors/anchor.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/errors/anchor.js +767 -0
- package/dist/@codegen/pyth_rec/errors/anchor.js.map +1 -0
- package/dist/@codegen/pyth_rec/errors/custom.d.ts +179 -0
- package/dist/@codegen/pyth_rec/errors/custom.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/errors/custom.js +318 -0
- package/dist/@codegen/pyth_rec/errors/custom.js.map +1 -0
- package/dist/@codegen/pyth_rec/errors/index.d.ts +6 -0
- package/dist/@codegen/pyth_rec/errors/index.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/errors/index.js +86 -0
- package/dist/@codegen/pyth_rec/errors/index.js.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.d.ts +7 -0
- package/dist/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.js +15 -0
- package/dist/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.js.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/index.d.ts +17 -0
- package/dist/@codegen/pyth_rec/instructions/index.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/index.js +20 -0
- package/dist/@codegen/pyth_rec/instructions/index.js.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/reclaimRent.d.ts +7 -0
- package/dist/@codegen/pyth_rec/instructions/reclaimRent.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/reclaimRent.js +15 -0
- package/dist/@codegen/pyth_rec/instructions/reclaimRent.js.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/reclaimTwapRent.d.ts +7 -0
- package/dist/@codegen/pyth_rec/instructions/reclaimTwapRent.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/reclaimTwapRent.js +15 -0
- package/dist/@codegen/pyth_rec/instructions/reclaimTwapRent.js.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.d.ts +11 -0
- package/dist/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.js +56 -0
- package/dist/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.js.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/setDataSources.d.ts +12 -0
- package/dist/@codegen/pyth_rec/instructions/setDataSources.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/setDataSources.js +58 -0
- package/dist/@codegen/pyth_rec/instructions/setDataSources.js.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/setFee.d.ts +12 -0
- package/dist/@codegen/pyth_rec/instructions/setFee.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/setFee.js +55 -0
- package/dist/@codegen/pyth_rec/instructions/setFee.js.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/setMinimumSignatures.d.ts +11 -0
- package/dist/@codegen/pyth_rec/instructions/setMinimumSignatures.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/setMinimumSignatures.js +55 -0
- package/dist/@codegen/pyth_rec/instructions/setMinimumSignatures.js.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/setWormholeAddress.d.ts +11 -0
- package/dist/@codegen/pyth_rec/instructions/setWormholeAddress.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/instructions/setWormholeAddress.js +56 -0
- package/dist/@codegen/pyth_rec/instructions/setWormholeAddress.js.map +1 -0
- package/dist/@codegen/pyth_rec/programId.d.ts +4 -0
- package/dist/@codegen/pyth_rec/programId.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/programId.js +9 -0
- package/dist/@codegen/pyth_rec/programId.js.map +1 -0
- package/dist/@codegen/pyth_rec/types/DataSource.d.ts +28 -0
- package/dist/@codegen/pyth_rec/types/DataSource.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/types/DataSource.js +80 -0
- package/dist/@codegen/pyth_rec/types/DataSource.js.map +1 -0
- package/dist/@codegen/pyth_rec/types/MerklePriceUpdate.d.ts +27 -0
- package/dist/@codegen/pyth_rec/types/MerklePriceUpdate.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/types/MerklePriceUpdate.js +78 -0
- package/dist/@codegen/pyth_rec/types/MerklePriceUpdate.js.map +1 -0
- package/dist/@codegen/pyth_rec/types/PostTwapUpdateParams.d.ts +44 -0
- package/dist/@codegen/pyth_rec/types/PostTwapUpdateParams.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/types/PostTwapUpdateParams.js +93 -0
- package/dist/@codegen/pyth_rec/types/PostTwapUpdateParams.js.map +1 -0
- package/dist/@codegen/pyth_rec/types/PostUpdateAtomicParams.d.ts +38 -0
- package/dist/@codegen/pyth_rec/types/PostUpdateAtomicParams.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/types/PostUpdateAtomicParams.js +91 -0
- package/dist/@codegen/pyth_rec/types/PostUpdateAtomicParams.js.map +1 -0
- package/dist/@codegen/pyth_rec/types/PostUpdateParams.d.ts +33 -0
- package/dist/@codegen/pyth_rec/types/PostUpdateParams.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/types/PostUpdateParams.js +84 -0
- package/dist/@codegen/pyth_rec/types/PostUpdateParams.js.map +1 -0
- package/dist/@codegen/pyth_rec/types/PriceFeedMessage.d.ts +58 -0
- package/dist/@codegen/pyth_rec/types/PriceFeedMessage.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/types/PriceFeedMessage.js +127 -0
- package/dist/@codegen/pyth_rec/types/PriceFeedMessage.js.map +1 -0
- package/dist/@codegen/pyth_rec/types/TwapPrice.d.ts +69 -0
- package/dist/@codegen/pyth_rec/types/TwapPrice.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/types/TwapPrice.js +128 -0
- package/dist/@codegen/pyth_rec/types/TwapPrice.js.map +1 -0
- package/dist/@codegen/pyth_rec/types/VerificationLevel.d.ts +45 -0
- package/dist/@codegen/pyth_rec/types/VerificationLevel.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/types/VerificationLevel.js +124 -0
- package/dist/@codegen/pyth_rec/types/VerificationLevel.js.map +1 -0
- package/dist/@codegen/pyth_rec/types/index.d.ts +24 -0
- package/dist/@codegen/pyth_rec/types/index.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/types/index.js +53 -0
- package/dist/@codegen/pyth_rec/types/index.js.map +1 -0
- package/dist/@codegen/pyth_rec/utils/borshAddress.d.ts +4 -0
- package/dist/@codegen/pyth_rec/utils/borshAddress.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/utils/borshAddress.js +30 -0
- package/dist/@codegen/pyth_rec/utils/borshAddress.js.map +1 -0
- package/dist/@codegen/pyth_rec/utils/index.d.ts +2 -0
- package/dist/@codegen/pyth_rec/utils/index.d.ts.map +1 -0
- package/dist/@codegen/pyth_rec/utils/index.js +18 -0
- package/dist/@codegen/pyth_rec/utils/index.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/AggregatorAccountData.d.ts +123 -0
- package/dist/@codegen/switchboard_v2/accounts/AggregatorAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/AggregatorAccountData.js +312 -0
- package/dist/@codegen/switchboard_v2/accounts/AggregatorAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/BufferRelayerAccountData.d.ts +50 -0
- package/dist/@codegen/switchboard_v2/accounts/BufferRelayerAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/BufferRelayerAccountData.js +159 -0
- package/dist/@codegen/switchboard_v2/accounts/BufferRelayerAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/CrankAccountData.d.ts +40 -0
- package/dist/@codegen/switchboard_v2/accounts/CrankAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/CrankAccountData.js +138 -0
- package/dist/@codegen/switchboard_v2/accounts/CrankAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/JobAccountData.d.ts +47 -0
- package/dist/@codegen/switchboard_v2/accounts/JobAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/JobAccountData.js +155 -0
- package/dist/@codegen/switchboard_v2/accounts/JobAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/LeaseAccountData.d.ts +47 -0
- package/dist/@codegen/switchboard_v2/accounts/LeaseAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/LeaseAccountData.js +155 -0
- package/dist/@codegen/switchboard_v2/accounts/LeaseAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/OracleAccountData.d.ts +45 -0
- package/dist/@codegen/switchboard_v2/accounts/OracleAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/OracleAccountData.js +150 -0
- package/dist/@codegen/switchboard_v2/accounts/OracleAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/OracleQueueAccountData.d.ts +87 -0
- package/dist/@codegen/switchboard_v2/accounts/OracleQueueAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/OracleQueueAccountData.js +238 -0
- package/dist/@codegen/switchboard_v2/accounts/OracleQueueAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/PermissionAccountData.d.ts +35 -0
- package/dist/@codegen/switchboard_v2/accounts/PermissionAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/PermissionAccountData.js +131 -0
- package/dist/@codegen/switchboard_v2/accounts/PermissionAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/RealmSpawnRecordAccountData.d.ts +19 -0
- package/dist/@codegen/switchboard_v2/accounts/RealmSpawnRecordAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/RealmSpawnRecordAccountData.js +93 -0
- package/dist/@codegen/switchboard_v2/accounts/RealmSpawnRecordAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/SbState.d.ts +31 -0
- package/dist/@codegen/switchboard_v2/accounts/SbState.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/SbState.js +120 -0
- package/dist/@codegen/switchboard_v2/accounts/SbState.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/SlidingResultAccountData.d.ts +26 -0
- package/dist/@codegen/switchboard_v2/accounts/SlidingResultAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/SlidingResultAccountData.js +108 -0
- package/dist/@codegen/switchboard_v2/accounts/SlidingResultAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/TaskSpecRecord.d.ts +20 -0
- package/dist/@codegen/switchboard_v2/accounts/TaskSpecRecord.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/TaskSpecRecord.js +96 -0
- package/dist/@codegen/switchboard_v2/accounts/TaskSpecRecord.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/VrfAccountData.d.ts +54 -0
- package/dist/@codegen/switchboard_v2/accounts/VrfAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/VrfAccountData.js +168 -0
- package/dist/@codegen/switchboard_v2/accounts/VrfAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/VrfLiteAccountData.d.ts +69 -0
- package/dist/@codegen/switchboard_v2/accounts/VrfLiteAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/VrfLiteAccountData.js +198 -0
- package/dist/@codegen/switchboard_v2/accounts/VrfLiteAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/VrfPoolAccountData.d.ts +43 -0
- package/dist/@codegen/switchboard_v2/accounts/VrfPoolAccountData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/VrfPoolAccountData.js +142 -0
- package/dist/@codegen/switchboard_v2/accounts/VrfPoolAccountData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/index.d.ts +31 -0
- package/dist/@codegen/switchboard_v2/accounts/index.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/accounts/index.js +34 -0
- package/dist/@codegen/switchboard_v2/accounts/index.js.map +1 -0
- package/dist/@codegen/switchboard_v2/errors/anchor.d.ts +435 -0
- package/dist/@codegen/switchboard_v2/errors/anchor.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/errors/anchor.js +767 -0
- package/dist/@codegen/switchboard_v2/errors/anchor.js.map +1 -0
- package/dist/@codegen/switchboard_v2/errors/custom.d.ts +801 -0
- package/dist/@codegen/switchboard_v2/errors/custom.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/errors/custom.js +1409 -0
- package/dist/@codegen/switchboard_v2/errors/custom.js.map +1 -0
- package/dist/@codegen/switchboard_v2/errors/index.d.ts +6 -0
- package/dist/@codegen/switchboard_v2/errors/index.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/errors/index.js +86 -0
- package/dist/@codegen/switchboard_v2/errors/index.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorAddJob.d.ts +13 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorAddJob.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorAddJob.js +63 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorAddJob.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorInit.d.ts +14 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorInit.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorInit.js +60 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorInit.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorLock.d.ts +12 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorLock.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorLock.js +62 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorLock.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorOpenRound.d.ts +21 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorOpenRound.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorOpenRound.js +67 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorOpenRound.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.d.ts +13 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.js +63 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResult.d.ts +23 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResult.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResult.js +73 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResult.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.d.ts +23 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.js +73 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.d.ts +13 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.js +63 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetConfig.d.ts +12 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetConfig.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetConfig.js +62 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetConfig.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.d.ts +13 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.js +63 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetQueue.d.ts +13 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetQueue.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetQueue.js +63 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetQueue.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.js +65 -0
- package/dist/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerInit.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerInit.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerInit.js +68 -0
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerInit.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.d.ts +16 -0
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.js +62 -0
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.d.ts +21 -0
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.js +71 -0
- package/dist/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/crankInit.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/instructions/crankInit.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/crankInit.js +59 -0
- package/dist/@codegen/switchboard_v2/instructions/crankInit.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/crankPop.d.ts +19 -0
- package/dist/@codegen/switchboard_v2/instructions/crankPop.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/crankPop.js +63 -0
- package/dist/@codegen/switchboard_v2/instructions/crankPop.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/crankPopV2.d.ts +19 -0
- package/dist/@codegen/switchboard_v2/instructions/crankPopV2.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/crankPopV2.js +63 -0
- package/dist/@codegen/switchboard_v2/instructions/crankPopV2.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/crankPush.d.ts +19 -0
- package/dist/@codegen/switchboard_v2/instructions/crankPush.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/crankPush.js +63 -0
- package/dist/@codegen/switchboard_v2/instructions/crankPush.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/index.d.ts +97 -0
- package/dist/@codegen/switchboard_v2/instructions/index.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/index.js +100 -0
- package/dist/@codegen/switchboard_v2/instructions/index.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/jobInit.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/instructions/jobInit.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/jobInit.js +63 -0
- package/dist/@codegen/switchboard_v2/instructions/jobInit.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/jobSetData.d.ts +12 -0
- package/dist/@codegen/switchboard_v2/instructions/jobSetData.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/jobSetData.js +60 -0
- package/dist/@codegen/switchboard_v2/instructions/jobSetData.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseExtend.d.ts +19 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseExtend.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseExtend.js +63 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseExtend.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseInit.d.ts +21 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseInit.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseInit.js +65 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseInit.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseSetAuthority.d.ts +13 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseSetAuthority.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseSetAuthority.js +63 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseSetAuthority.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseWithdraw.d.ts +19 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseWithdraw.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseWithdraw.js +67 -0
- package/dist/@codegen/switchboard_v2/instructions/leaseWithdraw.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleHeartbeat.d.ts +17 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleHeartbeat.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleHeartbeat.js +67 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleHeartbeat.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleInit.d.ts +17 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleInit.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleInit.js +61 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleInit.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueInit.d.ts +16 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueInit.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueInit.js +66 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueInit.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.d.ts +12 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.js +62 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleWithdraw.d.ts +20 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleWithdraw.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleWithdraw.js +70 -0
- package/dist/@codegen/switchboard_v2/instructions/oracleWithdraw.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/permissionInit.d.ts +16 -0
- package/dist/@codegen/switchboard_v2/instructions/permissionInit.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/permissionInit.js +62 -0
- package/dist/@codegen/switchboard_v2/instructions/permissionInit.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/permissionSet.d.ts +12 -0
- package/dist/@codegen/switchboard_v2/instructions/permissionSet.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/permissionSet.js +60 -0
- package/dist/@codegen/switchboard_v2/instructions/permissionSet.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/programConfig.d.ts +13 -0
- package/dist/@codegen/switchboard_v2/instructions/programConfig.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/programConfig.js +61 -0
- package/dist/@codegen/switchboard_v2/instructions/programConfig.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/programInit.d.ts +18 -0
- package/dist/@codegen/switchboard_v2/instructions/programInit.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/programInit.js +62 -0
- package/dist/@codegen/switchboard_v2/instructions/programInit.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vaultTransfer.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/instructions/vaultTransfer.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vaultTransfer.js +63 -0
- package/dist/@codegen/switchboard_v2/instructions/vaultTransfer.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfCloseAction.d.ts +20 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfCloseAction.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfCloseAction.js +68 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfCloseAction.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfInit.d.ts +16 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfInit.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfInit.js +60 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfInit.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.d.ts +20 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.js +68 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteInit.d.ts +23 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteInit.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteInit.js +67 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteInit.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.d.ts +19 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.js +69 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.d.ts +20 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.js +70 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolAdd.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolAdd.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolAdd.js +59 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolAdd.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolInit.d.ts +21 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolInit.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolInit.js +65 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolInit.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRemove.d.ts +13 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRemove.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRemove.js +61 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRemove.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRequest.d.ts +20 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRequest.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRequest.js +70 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfPoolRequest.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfProveAndVerify.d.ts +19 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfProveAndVerify.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfProveAndVerify.js +69 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfProveAndVerify.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfRequestRandomness.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfRequestRandomness.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfRequestRandomness.js +76 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfRequestRandomness.js.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfSetCallback.d.ts +12 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfSetCallback.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfSetCallback.js +62 -0
- package/dist/@codegen/switchboard_v2/instructions/vrfSetCallback.js.map +1 -0
- package/dist/@codegen/switchboard_v2/programId.d.ts +4 -0
- package/dist/@codegen/switchboard_v2/programId.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/programId.js +9 -0
- package/dist/@codegen/switchboard_v2/programId.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AccountMetaBorsh.d.ts +33 -0
- package/dist/@codegen/switchboard_v2/types/AccountMetaBorsh.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AccountMetaBorsh.js +90 -0
- package/dist/@codegen/switchboard_v2/types/AccountMetaBorsh.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AccountMetaZC.d.ts +33 -0
- package/dist/@codegen/switchboard_v2/types/AccountMetaZC.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AccountMetaZC.js +90 -0
- package/dist/@codegen/switchboard_v2/types/AccountMetaZC.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorAddJobParams.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorAddJobParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorAddJobParams.js +72 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorAddJobParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorHistoryRow.d.ts +34 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorHistoryRow.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorHistoryRow.js +83 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorHistoryRow.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorInitParams.d.ts +84 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorInitParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorInitParams.js +158 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorInitParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorLockParams.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorLockParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorLockParams.js +61 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorLockParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorOpenRoundParams.d.ts +37 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorOpenRoundParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorOpenRoundParams.js +95 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorOpenRoundParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorRemoveJobParams.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorRemoveJobParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorRemoveJobParams.js +72 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorRemoveJobParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorResolutionMode.d.ts +32 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorResolutionMode.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorResolutionMode.js +108 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorResolutionMode.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorRound.d.ts +119 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorRound.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorRound.js +172 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorRound.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParams.d.ts +86 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParams.js +138 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParamsV2.d.ts +97 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParamsV2.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParamsV2.js +145 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSaveResultParamsV2.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetAuthorityParams.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetAuthorityParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetAuthorityParams.js +61 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetAuthorityParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetBatchSizeParams.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetBatchSizeParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetBatchSizeParams.js +72 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetBatchSizeParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetConfigParams.d.ts +84 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetConfigParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetConfigParams.js +161 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetConfigParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetForceReportPeriodParams.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetForceReportPeriodParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetForceReportPeriodParams.js +72 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetForceReportPeriodParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetHistoryBufferParams.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetHistoryBufferParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetHistoryBufferParams.js +61 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetHistoryBufferParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinJobsParams.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinJobsParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinJobsParams.js +72 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinJobsParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinOraclesParams.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinOraclesParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinOraclesParams.js +72 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetMinOraclesParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetQueueParams.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetQueueParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetQueueParams.js +61 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetQueueParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetResolutionModeParams.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetResolutionModeParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetResolutionModeParams.js +72 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetResolutionModeParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetUpdateIntervalParams.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetUpdateIntervalParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetUpdateIntervalParams.js +72 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetUpdateIntervalParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetVarianceThresholdParams.d.ts +29 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetVarianceThresholdParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetVarianceThresholdParams.js +75 -0
- package/dist/@codegen/switchboard_v2/types/AggregatorSetVarianceThresholdParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/BorshDecimal.d.ts +28 -0
- package/dist/@codegen/switchboard_v2/types/BorshDecimal.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/BorshDecimal.js +82 -0
- package/dist/@codegen/switchboard_v2/types/BorshDecimal.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerInitParams.d.ts +32 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerInitParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerInitParams.js +88 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerInitParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerOpenRoundParams.d.ts +27 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerOpenRoundParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerOpenRoundParams.js +78 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerOpenRoundParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerRound.d.ts +44 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerRound.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerRound.js +108 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerRound.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerSaveResultParams.d.ts +37 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerSaveResultParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerSaveResultParams.js +95 -0
- package/dist/@codegen/switchboard_v2/types/BufferRelayerSaveResultParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/Callback.d.ts +41 -0
- package/dist/@codegen/switchboard_v2/types/Callback.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/Callback.js +91 -0
- package/dist/@codegen/switchboard_v2/types/Callback.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CallbackZC.d.ts +51 -0
- package/dist/@codegen/switchboard_v2/types/CallbackZC.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CallbackZC.js +105 -0
- package/dist/@codegen/switchboard_v2/types/CallbackZC.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CompletedPointZC.d.ts +54 -0
- package/dist/@codegen/switchboard_v2/types/CompletedPointZC.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CompletedPointZC.js +96 -0
- package/dist/@codegen/switchboard_v2/types/CompletedPointZC.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CrankInitParams.d.ts +32 -0
- package/dist/@codegen/switchboard_v2/types/CrankInitParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CrankInitParams.js +84 -0
- package/dist/@codegen/switchboard_v2/types/CrankInitParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CrankPopParams.d.ts +42 -0
- package/dist/@codegen/switchboard_v2/types/CrankPopParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CrankPopParams.js +102 -0
- package/dist/@codegen/switchboard_v2/types/CrankPopParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CrankPopParamsV2.d.ts +47 -0
- package/dist/@codegen/switchboard_v2/types/CrankPopParamsV2.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CrankPopParamsV2.js +109 -0
- package/dist/@codegen/switchboard_v2/types/CrankPopParamsV2.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CrankPushParams.d.ts +32 -0
- package/dist/@codegen/switchboard_v2/types/CrankPushParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CrankPushParams.js +88 -0
- package/dist/@codegen/switchboard_v2/types/CrankPushParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CrankRow.d.ts +29 -0
- package/dist/@codegen/switchboard_v2/types/CrankRow.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/CrankRow.js +84 -0
- package/dist/@codegen/switchboard_v2/types/CrankRow.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/EcvrfIntermediate.d.ts +63 -0
- package/dist/@codegen/switchboard_v2/types/EcvrfIntermediate.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/EcvrfIntermediate.js +103 -0
- package/dist/@codegen/switchboard_v2/types/EcvrfIntermediate.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/EcvrfProofZC.d.ts +67 -0
- package/dist/@codegen/switchboard_v2/types/EcvrfProofZC.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/EcvrfProofZC.js +89 -0
- package/dist/@codegen/switchboard_v2/types/EcvrfProofZC.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/EdwardsPointZC.d.ts +54 -0
- package/dist/@codegen/switchboard_v2/types/EdwardsPointZC.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/EdwardsPointZC.js +96 -0
- package/dist/@codegen/switchboard_v2/types/EdwardsPointZC.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/Error.d.ts +58 -0
- package/dist/@codegen/switchboard_v2/types/Error.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/Error.js +156 -0
- package/dist/@codegen/switchboard_v2/types/Error.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/FieldElementZC.d.ts +23 -0
- package/dist/@codegen/switchboard_v2/types/FieldElementZC.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/FieldElementZC.js +76 -0
- package/dist/@codegen/switchboard_v2/types/FieldElementZC.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/Hash.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/types/Hash.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/Hash.js +72 -0
- package/dist/@codegen/switchboard_v2/types/Hash.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/JobInitParams.d.ts +43 -0
- package/dist/@codegen/switchboard_v2/types/JobInitParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/JobInitParams.js +106 -0
- package/dist/@codegen/switchboard_v2/types/JobInitParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/JobSetDataParams.d.ts +27 -0
- package/dist/@codegen/switchboard_v2/types/JobSetDataParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/JobSetDataParams.js +78 -0
- package/dist/@codegen/switchboard_v2/types/JobSetDataParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/LeaseExtendParams.d.ts +38 -0
- package/dist/@codegen/switchboard_v2/types/LeaseExtendParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/LeaseExtendParams.js +99 -0
- package/dist/@codegen/switchboard_v2/types/LeaseExtendParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/LeaseInitParams.d.ts +44 -0
- package/dist/@codegen/switchboard_v2/types/LeaseInitParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/LeaseInitParams.js +108 -0
- package/dist/@codegen/switchboard_v2/types/LeaseInitParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/LeaseSetAuthorityParams.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/types/LeaseSetAuthorityParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/LeaseSetAuthorityParams.js +61 -0
- package/dist/@codegen/switchboard_v2/types/LeaseSetAuthorityParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/LeaseWithdrawParams.d.ts +33 -0
- package/dist/@codegen/switchboard_v2/types/LeaseWithdrawParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/LeaseWithdrawParams.js +88 -0
- package/dist/@codegen/switchboard_v2/types/LeaseWithdrawParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleHeartbeatParams.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/types/OracleHeartbeatParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleHeartbeatParams.js +72 -0
- package/dist/@codegen/switchboard_v2/types/OracleHeartbeatParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleInitParams.d.ts +37 -0
- package/dist/@codegen/switchboard_v2/types/OracleInitParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleInitParams.js +95 -0
- package/dist/@codegen/switchboard_v2/types/OracleInitParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleMetrics.d.ts +63 -0
- package/dist/@codegen/switchboard_v2/types/OracleMetrics.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleMetrics.js +134 -0
- package/dist/@codegen/switchboard_v2/types/OracleMetrics.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleQueueInitParams.d.ts +94 -0
- package/dist/@codegen/switchboard_v2/types/OracleQueueInitParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleQueueInitParams.js +172 -0
- package/dist/@codegen/switchboard_v2/types/OracleQueueInitParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetConfigParams.d.ts +84 -0
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetConfigParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetConfigParams.js +175 -0
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetConfigParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetRewardsParams.d.ts +23 -0
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetRewardsParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetRewardsParams.js +76 -0
- package/dist/@codegen/switchboard_v2/types/OracleQueueSetRewardsParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleResponseType.d.ts +58 -0
- package/dist/@codegen/switchboard_v2/types/OracleResponseType.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleResponseType.js +156 -0
- package/dist/@codegen/switchboard_v2/types/OracleResponseType.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleWithdrawParams.d.ts +33 -0
- package/dist/@codegen/switchboard_v2/types/OracleWithdrawParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/OracleWithdrawParams.js +88 -0
- package/dist/@codegen/switchboard_v2/types/OracleWithdrawParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/PermissionInitParams.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/types/PermissionInitParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/PermissionInitParams.js +61 -0
- package/dist/@codegen/switchboard_v2/types/PermissionInitParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/PermissionSetParams.d.ts +39 -0
- package/dist/@codegen/switchboard_v2/types/PermissionSetParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/PermissionSetParams.js +79 -0
- package/dist/@codegen/switchboard_v2/types/PermissionSetParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/ProgramConfigParams.d.ts +33 -0
- package/dist/@codegen/switchboard_v2/types/ProgramConfigParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/ProgramConfigParams.js +86 -0
- package/dist/@codegen/switchboard_v2/types/ProgramConfigParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/ProgramInitParams.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/types/ProgramInitParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/ProgramInitParams.js +72 -0
- package/dist/@codegen/switchboard_v2/types/ProgramInitParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/ProjectivePointZC.d.ts +45 -0
- package/dist/@codegen/switchboard_v2/types/ProjectivePointZC.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/ProjectivePointZC.js +89 -0
- package/dist/@codegen/switchboard_v2/types/ProjectivePointZC.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/Scalar.d.ts +22 -0
- package/dist/@codegen/switchboard_v2/types/Scalar.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/Scalar.js +72 -0
- package/dist/@codegen/switchboard_v2/types/Scalar.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/SlidingWindowElement.d.ts +45 -0
- package/dist/@codegen/switchboard_v2/types/SlidingWindowElement.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/SlidingWindowElement.js +102 -0
- package/dist/@codegen/switchboard_v2/types/SlidingWindowElement.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/SwitchboardDecimal.d.ts +28 -0
- package/dist/@codegen/switchboard_v2/types/SwitchboardDecimal.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/SwitchboardDecimal.js +82 -0
- package/dist/@codegen/switchboard_v2/types/SwitchboardDecimal.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/SwitchboardPermission.d.ts +45 -0
- package/dist/@codegen/switchboard_v2/types/SwitchboardPermission.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/SwitchboardPermission.js +132 -0
- package/dist/@codegen/switchboard_v2/types/SwitchboardPermission.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VaultTransferParams.d.ts +28 -0
- package/dist/@codegen/switchboard_v2/types/VaultTransferParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VaultTransferParams.js +82 -0
- package/dist/@codegen/switchboard_v2/types/VaultTransferParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfBuilder.d.ts +661 -0
- package/dist/@codegen/switchboard_v2/types/VrfBuilder.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfBuilder.js +338 -0
- package/dist/@codegen/switchboard_v2/types/VrfBuilder.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfCloseParams.d.ts +27 -0
- package/dist/@codegen/switchboard_v2/types/VrfCloseParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfCloseParams.js +78 -0
- package/dist/@codegen/switchboard_v2/types/VrfCloseParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfInitParams.d.ts +44 -0
- package/dist/@codegen/switchboard_v2/types/VrfInitParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfInitParams.js +79 -0
- package/dist/@codegen/switchboard_v2/types/VrfInitParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteCloseParams.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteCloseParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteCloseParams.js +61 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteCloseParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteInitParams.d.ts +50 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteInitParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteInitParams.js +95 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteInitParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteProveAndVerifyParams.d.ts +38 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteProveAndVerifyParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteProveAndVerifyParams.js +99 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteProveAndVerifyParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteRequestRandomnessParams.d.ts +39 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteRequestRandomnessParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteRequestRandomnessParams.js +75 -0
- package/dist/@codegen/switchboard_v2/types/VrfLiteRequestRandomnessParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolAddParams.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolAddParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolAddParams.js +61 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolAddParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolInitParams.d.ts +32 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolInitParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolInitParams.js +84 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolInitParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolRemoveParams.d.ts +15 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolRemoveParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolRemoveParams.js +61 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolRemoveParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolRequestParams.d.ts +39 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolRequestParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolRequestParams.js +75 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolRequestParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolRow.d.ts +29 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolRow.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolRow.js +84 -0
- package/dist/@codegen/switchboard_v2/types/VrfPoolRow.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfProveAndVerifyParams.d.ts +48 -0
- package/dist/@codegen/switchboard_v2/types/VrfProveAndVerifyParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfProveAndVerifyParams.js +113 -0
- package/dist/@codegen/switchboard_v2/types/VrfProveAndVerifyParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfProveParams.d.ts +27 -0
- package/dist/@codegen/switchboard_v2/types/VrfProveParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfProveParams.js +78 -0
- package/dist/@codegen/switchboard_v2/types/VrfProveParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfRequestRandomnessParams.d.ts +27 -0
- package/dist/@codegen/switchboard_v2/types/VrfRequestRandomnessParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfRequestRandomnessParams.js +78 -0
- package/dist/@codegen/switchboard_v2/types/VrfRequestRandomnessParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfRound.d.ts +53 -0
- package/dist/@codegen/switchboard_v2/types/VrfRound.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfRound.js +120 -0
- package/dist/@codegen/switchboard_v2/types/VrfRound.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfSetCallbackParams.d.ts +39 -0
- package/dist/@codegen/switchboard_v2/types/VrfSetCallbackParams.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfSetCallbackParams.js +73 -0
- package/dist/@codegen/switchboard_v2/types/VrfSetCallbackParams.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfStatus.d.ts +84 -0
- package/dist/@codegen/switchboard_v2/types/VrfStatus.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/VrfStatus.js +204 -0
- package/dist/@codegen/switchboard_v2/types/VrfStatus.js.map +1 -0
- package/dist/@codegen/switchboard_v2/types/index.d.ts +179 -0
- package/dist/@codegen/switchboard_v2/types/index.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/types/index.js +207 -0
- package/dist/@codegen/switchboard_v2/types/index.js.map +1 -0
- package/dist/@codegen/switchboard_v2/utils/borshAddress.d.ts +4 -0
- package/dist/@codegen/switchboard_v2/utils/borshAddress.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/utils/borshAddress.js +30 -0
- package/dist/@codegen/switchboard_v2/utils/borshAddress.js.map +1 -0
- package/dist/@codegen/switchboard_v2/utils/index.d.ts +2 -0
- package/dist/@codegen/switchboard_v2/utils/index.d.ts.map +1 -0
- package/dist/@codegen/switchboard_v2/utils/index.js +18 -0
- package/dist/@codegen/switchboard_v2/utils/index.js.map +1 -0
- package/dist/classes/action.d.ts +81 -79
- package/dist/classes/action.d.ts.map +1 -1
- package/dist/classes/action.js +699 -720
- package/dist/classes/action.js.map +1 -1
- package/dist/classes/curve.d.ts +1 -1
- package/dist/classes/curve.d.ts.map +1 -1
- package/dist/classes/curve.js +1 -1
- package/dist/classes/curve.js.map +1 -1
- package/dist/classes/farm_utils.d.ts +14 -14
- package/dist/classes/farm_utils.d.ts.map +1 -1
- package/dist/classes/farm_utils.js +34 -41
- package/dist/classes/farm_utils.js.map +1 -1
- package/dist/classes/jupiterPerps.d.ts +2 -2
- package/dist/classes/jupiterPerps.d.ts.map +1 -1
- package/dist/classes/jupiterPerps.js +1 -1
- package/dist/classes/jupiterPerps.js.map +1 -1
- package/dist/classes/manager.d.ts +145 -92
- package/dist/classes/manager.d.ts.map +1 -1
- package/dist/classes/manager.js +294 -182
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/market.d.ts +79 -71
- package/dist/classes/market.d.ts.map +1 -1
- package/dist/classes/market.js +275 -257
- package/dist/classes/market.js.map +1 -1
- package/dist/classes/obligation.d.ts +52 -51
- package/dist/classes/obligation.d.ts.map +1 -1
- package/dist/classes/obligation.js +44 -38
- package/dist/classes/obligation.js.map +1 -1
- package/dist/classes/obligationOrder.d.ts +1 -1
- package/dist/classes/obligationOrder.d.ts.map +1 -1
- package/dist/classes/obligationOrder.js +3 -3
- package/dist/classes/obligationOrder.js.map +1 -1
- package/dist/classes/reserve.d.ts +44 -36
- package/dist/classes/reserve.d.ts.map +1 -1
- package/dist/classes/reserve.js +92 -68
- package/dist/classes/reserve.js.map +1 -1
- package/dist/classes/shared.d.ts +3 -3
- package/dist/classes/shared.d.ts.map +1 -1
- package/dist/classes/utils.d.ts +5 -5
- package/dist/classes/utils.d.ts.map +1 -1
- package/dist/classes/utils.js +4 -9
- package/dist/classes/utils.js.map +1 -1
- package/dist/classes/vault.d.ts +134 -89
- package/dist/classes/vault.d.ts.map +1 -1
- package/dist/classes/vault.js +491 -426
- package/dist/classes/vault.js.map +1 -1
- package/dist/classes/vault_types.d.ts +31 -23
- package/dist/classes/vault_types.d.ts.map +1 -1
- package/dist/client/commands/borrow.d.ts +4 -0
- package/dist/client/commands/borrow.d.ts.map +1 -0
- package/dist/client/commands/borrow.js +21 -0
- package/dist/client/commands/borrow.js.map +1 -0
- package/dist/client/commands/deposit.d.ts +4 -0
- package/dist/client/commands/deposit.d.ts.map +1 -0
- package/dist/client/commands/deposit.js +21 -0
- package/dist/client/commands/deposit.js.map +1 -0
- package/dist/client/commands/initFarmsForReserve.d.ts +4 -0
- package/dist/client/commands/initFarmsForReserve.d.ts.map +1 -0
- package/dist/client/commands/initFarmsForReserve.js +49 -0
- package/dist/client/commands/initFarmsForReserve.js.map +1 -0
- package/dist/client/commands/printAllReserveAccounts.d.ts +3 -0
- package/dist/client/commands/printAllReserveAccounts.d.ts.map +1 -0
- package/dist/client/commands/printAllReserveAccounts.js +20 -0
- package/dist/client/commands/printAllReserveAccounts.js.map +1 -0
- package/dist/client/commands/printReserve.d.ts +3 -0
- package/dist/client/commands/printReserve.d.ts.map +1 -0
- package/dist/client/commands/printReserve.js +16 -0
- package/dist/client/commands/printReserve.js.map +1 -0
- package/dist/client/commands/repay.d.ts +4 -0
- package/dist/client/commands/repay.d.ts.map +1 -0
- package/dist/client/commands/repay.js +21 -0
- package/dist/client/commands/repay.js.map +1 -0
- package/dist/client/commands/withdraw.d.ts +4 -0
- package/dist/client/commands/withdraw.d.ts.map +1 -0
- package/dist/client/commands/withdraw.js +21 -0
- package/dist/client/commands/withdraw.js.map +1 -0
- package/dist/client/services/market.d.ts +6 -0
- package/dist/client/services/market.d.ts.map +1 -0
- package/dist/client/services/market.js +28 -0
- package/dist/client/services/market.js.map +1 -0
- package/dist/client/services/userMetadata.d.ts +4 -0
- package/dist/client/services/userMetadata.d.ts.map +1 -0
- package/dist/client/services/userMetadata.js +23 -0
- package/dist/client/services/userMetadata.js.map +1 -0
- package/dist/client/tx/CliConnectionPool.d.ts +17 -0
- package/dist/client/tx/CliConnectionPool.d.ts.map +1 -0
- package/dist/client/tx/CliConnectionPool.js +39 -0
- package/dist/client/tx/CliConnectionPool.js.map +1 -0
- package/dist/client/tx/CliEnv.d.ts +27 -0
- package/dist/client/tx/CliEnv.d.ts.map +1 -0
- package/dist/client/tx/CliEnv.js +114 -0
- package/dist/client/tx/CliEnv.js.map +1 -0
- package/dist/client/tx/keypair.d.ts +4 -0
- package/dist/client/tx/keypair.d.ts.map +1 -0
- package/dist/client/tx/keypair.js +20 -0
- package/dist/client/tx/keypair.js.map +1 -0
- package/dist/client/tx/multisig.d.ts +4 -0
- package/dist/client/tx/multisig.d.ts.map +1 -0
- package/dist/client/tx/multisig.js +22 -0
- package/dist/client/tx/multisig.js.map +1 -0
- package/dist/client/tx/priorityFee.d.ts +7 -0
- package/dist/client/tx/priorityFee.d.ts.map +1 -0
- package/dist/client/tx/priorityFee.js +25 -0
- package/dist/client/tx/priorityFee.js.map +1 -0
- package/dist/client/tx/processor.d.ts +6 -0
- package/dist/client/tx/processor.d.ts.map +1 -0
- package/dist/client/tx/processor.js +25 -0
- package/dist/client/tx/processor.js.map +1 -0
- package/dist/client/tx/rpc.d.ts +30 -0
- package/dist/client/tx/rpc.d.ts.map +1 -0
- package/dist/client/tx/rpc.js +89 -0
- package/dist/client/tx/rpc.js.map +1 -0
- package/dist/client/tx/simulate.d.ts +7 -0
- package/dist/client/tx/simulate.d.ts.map +1 -0
- package/dist/client/tx/simulate.js +36 -0
- package/dist/client/tx/simulate.js.map +1 -0
- package/dist/client/tx/tx.d.ts +16 -0
- package/dist/client/tx/tx.d.ts.map +1 -0
- package/dist/client/tx/tx.js +115 -0
- package/dist/client/tx/tx.js.map +1 -0
- package/dist/client/utils/modifiers.d.ts +7 -0
- package/dist/client/utils/modifiers.d.ts.map +1 -0
- package/dist/client/utils/modifiers.js +3 -0
- package/dist/client/utils/modifiers.js.map +1 -0
- package/dist/lending_operations/repay_with_collateral_calcs.d.ts +5 -5
- package/dist/lending_operations/repay_with_collateral_calcs.d.ts.map +1 -1
- package/dist/lending_operations/repay_with_collateral_calcs.js +5 -5
- package/dist/lending_operations/repay_with_collateral_calcs.js.map +1 -1
- package/dist/lending_operations/repay_with_collateral_operations.d.ts +14 -12
- package/dist/lending_operations/repay_with_collateral_operations.d.ts.map +1 -1
- package/dist/lending_operations/repay_with_collateral_operations.js +45 -47
- package/dist/lending_operations/repay_with_collateral_operations.js.map +1 -1
- package/dist/lending_operations/swap_collateral_operations.d.ts +10 -8
- package/dist/lending_operations/swap_collateral_operations.d.ts.map +1 -1
- package/dist/lending_operations/swap_collateral_operations.js +37 -35
- package/dist/lending_operations/swap_collateral_operations.js.map +1 -1
- package/dist/leverage/calcs.d.ts +16 -16
- package/dist/leverage/calcs.d.ts.map +1 -1
- package/dist/leverage/calcs.js +6 -7
- package/dist/leverage/calcs.js.map +1 -1
- package/dist/leverage/instructions.d.ts +28 -29
- package/dist/leverage/instructions.d.ts.map +1 -1
- package/dist/leverage/instructions.js +18 -48
- package/dist/leverage/instructions.js.map +1 -1
- package/dist/leverage/operations.d.ts +7 -7
- package/dist/leverage/operations.d.ts.map +1 -1
- package/dist/leverage/operations.js +257 -245
- package/dist/leverage/operations.js.map +1 -1
- package/dist/leverage/types.d.ts +31 -30
- package/dist/leverage/types.d.ts.map +1 -1
- package/dist/leverage/utils.d.ts +8 -8
- package/dist/leverage/utils.d.ts.map +1 -1
- package/dist/leverage/utils.js +14 -14
- package/dist/leverage/utils.js.map +1 -1
- package/dist/lib.d.ts +8 -8
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +11 -12
- package/dist/lib.js.map +1 -1
- package/dist/manager/client_kamino_manager.d.ts +2 -0
- package/dist/manager/client_kamino_manager.d.ts.map +1 -0
- package/dist/manager/client_kamino_manager.js +1360 -0
- package/dist/manager/client_kamino_manager.js.map +1 -0
- package/dist/manager/tx/ManagerConnectionPool.d.ts +17 -0
- package/dist/manager/tx/ManagerConnectionPool.d.ts.map +1 -0
- package/dist/manager/tx/ManagerConnectionPool.js +39 -0
- package/dist/manager/tx/ManagerConnectionPool.js.map +1 -0
- package/dist/manager/tx/ManagerEnv.d.ts +37 -0
- package/dist/manager/tx/ManagerEnv.d.ts.map +1 -0
- package/dist/manager/tx/ManagerEnv.js +151 -0
- package/dist/manager/tx/ManagerEnv.js.map +1 -0
- package/dist/manager/tx/keypair.d.ts +4 -0
- package/dist/manager/tx/keypair.d.ts.map +1 -0
- package/dist/manager/tx/keypair.js +20 -0
- package/dist/manager/tx/keypair.js.map +1 -0
- package/dist/manager/tx/multisig.d.ts +4 -0
- package/dist/manager/tx/multisig.d.ts.map +1 -0
- package/dist/manager/tx/multisig.js +22 -0
- package/dist/manager/tx/multisig.js.map +1 -0
- package/dist/manager/tx/priorityFee.d.ts +7 -0
- package/dist/manager/tx/priorityFee.d.ts.map +1 -0
- package/dist/manager/tx/priorityFee.js +25 -0
- package/dist/manager/tx/priorityFee.js.map +1 -0
- package/dist/manager/tx/processor.d.ts +6 -0
- package/dist/manager/tx/processor.d.ts.map +1 -0
- package/dist/manager/tx/processor.js +22 -0
- package/dist/manager/tx/processor.js.map +1 -0
- package/dist/manager/tx/rpc.d.ts +30 -0
- package/dist/manager/tx/rpc.d.ts.map +1 -0
- package/dist/manager/tx/rpc.js +89 -0
- package/dist/manager/tx/rpc.js.map +1 -0
- package/dist/manager/tx/simulate.d.ts +7 -0
- package/dist/manager/tx/simulate.d.ts.map +1 -0
- package/dist/manager/tx/simulate.js +36 -0
- package/dist/manager/tx/simulate.js.map +1 -0
- package/dist/manager/tx/tx.d.ts +16 -0
- package/dist/manager/tx/tx.d.ts.map +1 -0
- package/dist/manager/tx/tx.js +114 -0
- package/dist/manager/tx/tx.js.map +1 -0
- package/dist/manager/utils/consts.d.ts +3 -0
- package/dist/manager/utils/consts.d.ts.map +1 -0
- package/dist/manager/utils/consts.js +6 -0
- package/dist/manager/utils/consts.js.map +1 -0
- package/dist/manager/utils/modifiers.d.ts +7 -0
- package/dist/manager/utils/modifiers.d.ts.map +1 -0
- package/dist/manager/utils/modifiers.js +3 -0
- package/dist/manager/utils/modifiers.js.map +1 -0
- package/dist/obligation_orders/price_based.d.ts +2 -2
- package/dist/obligation_orders/price_based.d.ts.map +1 -1
- package/dist/obligation_orders/price_based.js +4 -5
- package/dist/obligation_orders/price_based.js.map +1 -1
- package/dist/referrals/instructions.d.ts +13 -13
- package/dist/referrals/instructions.d.ts.map +1 -1
- package/dist/referrals/instructions.js +29 -27
- package/dist/referrals/instructions.js.map +1 -1
- package/dist/referrals/operations.d.ts +16 -49
- package/dist/referrals/operations.d.ts.map +1 -1
- package/dist/referrals/operations.js +45 -93
- package/dist/referrals/operations.js.map +1 -1
- package/dist/utils/ObligationType.d.ts +22 -22
- package/dist/utils/ObligationType.d.ts.map +1 -1
- package/dist/utils/ObligationType.js +34 -14
- package/dist/utils/ObligationType.js.map +1 -1
- package/dist/utils/accountListing.d.ts +5 -5
- package/dist/utils/accountListing.d.ts.map +1 -1
- package/dist/utils/accountListing.js +38 -27
- package/dist/utils/accountListing.js.map +1 -1
- package/dist/utils/api.d.ts +2 -2
- package/dist/utils/api.d.ts.map +1 -1
- package/dist/utils/ata.d.ts +23 -24
- package/dist/utils/ata.d.ts.map +1 -1
- package/dist/utils/ata.js +70 -71
- package/dist/utils/ata.js.map +1 -1
- package/dist/utils/bigint.d.ts +2 -0
- package/dist/utils/bigint.d.ts.map +1 -0
- package/dist/utils/bigint.js +7 -0
- package/dist/utils/bigint.js.map +1 -0
- package/dist/utils/compat.d.ts +6 -0
- package/dist/utils/compat.d.ts.map +1 -0
- package/dist/utils/compat.js +19 -0
- package/dist/utils/compat.js.map +1 -0
- package/dist/utils/constants.d.ts +4 -5
- package/dist/utils/constants.d.ts.map +1 -1
- package/dist/utils/constants.js +5 -6
- package/dist/utils/constants.js.map +1 -1
- package/dist/utils/consts.d.ts +4 -0
- package/dist/utils/consts.d.ts.map +1 -0
- package/dist/utils/consts.js +7 -0
- package/dist/utils/consts.js.map +1 -0
- package/dist/utils/idl.js +2 -2
- package/dist/utils/idl.js.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/instruction.d.ts +7 -24
- package/dist/utils/instruction.d.ts.map +1 -1
- package/dist/utils/instruction.js +21 -191
- package/dist/utils/instruction.js.map +1 -1
- package/dist/utils/kamino.d.ts +2 -2
- package/dist/utils/kamino.d.ts.map +1 -1
- package/dist/utils/kamino.js +11 -6
- package/dist/utils/kamino.js.map +1 -1
- package/dist/utils/lookupTable.d.ts +15 -14
- package/dist/utils/lookupTable.d.ts.map +1 -1
- package/dist/utils/lookupTable.js +41 -42
- package/dist/utils/lookupTable.js.map +1 -1
- package/dist/utils/managerTypes.d.ts +31 -32
- package/dist/utils/managerTypes.d.ts.map +1 -1
- package/dist/utils/managerTypes.js +40 -36
- package/dist/utils/managerTypes.js.map +1 -1
- package/dist/utils/map.d.ts +2 -0
- package/dist/utils/map.d.ts.map +1 -0
- package/dist/utils/map.js +13 -0
- package/dist/utils/map.js.map +1 -0
- package/dist/utils/metadata.d.ts +5 -5
- package/dist/utils/metadata.d.ts.map +1 -1
- package/dist/utils/metadata.js +9 -8
- package/dist/utils/metadata.js.map +1 -1
- package/dist/utils/multisig.d.ts +23 -4
- package/dist/utils/multisig.d.ts.map +1 -1
- package/dist/utils/multisig.js +16 -8
- package/dist/utils/multisig.js.map +1 -1
- package/dist/utils/option.d.ts +3 -0
- package/dist/utils/option.d.ts.map +1 -0
- package/dist/utils/option.js +12 -0
- package/dist/utils/option.js.map +1 -0
- package/dist/utils/oracle.d.ts +13 -14
- package/dist/utils/oracle.d.ts.map +1 -1
- package/dist/utils/oracle.js +30 -30
- package/dist/utils/oracle.js.map +1 -1
- package/dist/utils/pubkey.d.ts +6 -71
- package/dist/utils/pubkey.d.ts.map +1 -1
- package/dist/utils/pubkey.js +7 -230
- package/dist/utils/pubkey.js.map +1 -1
- package/dist/utils/rpc.d.ts +8 -10
- package/dist/utils/rpc.d.ts.map +1 -1
- package/dist/utils/rpc.js +23 -65
- package/dist/utils/rpc.js.map +1 -1
- package/dist/utils/seeds.d.ts +24 -23
- package/dist/utils/seeds.d.ts.map +1 -1
- package/dist/utils/seeds.js +91 -38
- package/dist/utils/seeds.js.map +1 -1
- package/dist/utils/signer.d.ts +4 -0
- package/dist/utils/signer.d.ts.map +1 -0
- package/dist/utils/signer.js +20 -0
- package/dist/utils/signer.js.map +1 -0
- package/dist/utils/switchboard.d.ts +4 -0
- package/dist/utils/switchboard.d.ts.map +1 -0
- package/dist/utils/switchboard.js +26 -0
- package/dist/utils/switchboard.js.map +1 -0
- package/dist/utils/userMetadata.d.ts +9 -9
- package/dist/utils/userMetadata.d.ts.map +1 -1
- package/dist/utils/userMetadata.js +67 -63
- package/dist/utils/userMetadata.js.map +1 -1
- package/dist/utils/vault.d.ts +1 -1
- package/dist/utils/vault.d.ts.map +1 -1
- package/dist/utils/vault.js +4 -4
- package/dist/utils/vault.js.map +1 -1
- package/dist/utils/vaultAllocation.d.ts +21 -0
- package/dist/utils/vaultAllocation.d.ts.map +1 -0
- package/dist/utils/vaultAllocation.js +71 -0
- package/dist/utils/vaultAllocation.js.map +1 -0
- package/package.json +23 -17
- package/src/@codegen/jupiter_perps/accounts/Custody.ts +200 -0
- package/src/@codegen/jupiter_perps/accounts/Perpetuals.ts +140 -0
- package/src/@codegen/jupiter_perps/accounts/Pool.ts +172 -0
- package/src/@codegen/jupiter_perps/accounts/Position.ts +204 -0
- package/src/@codegen/jupiter_perps/accounts/PositionRequest.ts +272 -0
- package/src/@codegen/jupiter_perps/accounts/TestOracle.ts +124 -0
- package/src/@codegen/jupiter_perps/accounts/index.ts +15 -0
- package/src/@codegen/jupiter_perps/errors/custom.ts +596 -0
- package/src/@codegen/jupiter_perps/errors/index.ts +68 -0
- package/src/@codegen/jupiter_perps/instructions/addCustody.ts +65 -0
- package/src/@codegen/jupiter_perps/instructions/addLiquidity.ts +71 -0
- package/src/@codegen/jupiter_perps/instructions/addPool.ts +61 -0
- package/src/@codegen/jupiter_perps/instructions/closePositionRequest.ts +75 -0
- package/src/@codegen/jupiter_perps/instructions/createDecreasePositionRequest.ts +85 -0
- package/src/@codegen/jupiter_perps/instructions/createIncreasePositionRequest.ts +85 -0
- package/src/@codegen/jupiter_perps/instructions/decreasePosition.ts +85 -0
- package/src/@codegen/jupiter_perps/instructions/decreasePositionPostSwap.ts +57 -0
- package/src/@codegen/jupiter_perps/instructions/getAddLiquidityAmountAndFee.ts +57 -0
- package/src/@codegen/jupiter_perps/instructions/getDecreasePosition.ts +61 -0
- package/src/@codegen/jupiter_perps/instructions/getExactOutSwapAmountAndFees.ts +59 -0
- package/src/@codegen/jupiter_perps/instructions/getIncreasePosition.ts +63 -0
- package/src/@codegen/jupiter_perps/instructions/getLiquidationState.ts +59 -0
- package/src/@codegen/jupiter_perps/instructions/getOraclePrice.ts +39 -0
- package/src/@codegen/jupiter_perps/instructions/getPnl.ts +57 -0
- package/src/@codegen/jupiter_perps/instructions/getRemoveLiquidityAmountAndFee.ts +59 -0
- package/src/@codegen/jupiter_perps/instructions/getSwapAmountAndFees.ts +59 -0
- package/src/@codegen/jupiter_perps/instructions/increasePosition.ts +75 -0
- package/src/@codegen/jupiter_perps/instructions/increasePositionPreSwap.ts +69 -0
- package/src/@codegen/jupiter_perps/instructions/index.ts +136 -0
- package/src/@codegen/jupiter_perps/instructions/init.ts +65 -0
- package/src/@codegen/jupiter_perps/instructions/liquidatePosition.ts +77 -0
- package/src/@codegen/jupiter_perps/instructions/removeLiquidity.ts +73 -0
- package/src/@codegen/jupiter_perps/instructions/setCustodyConfig.ts +53 -0
- package/src/@codegen/jupiter_perps/instructions/setCustodyGlobalLimit.ts +51 -0
- package/src/@codegen/jupiter_perps/instructions/setPerpetualsConfig.ts +51 -0
- package/src/@codegen/jupiter_perps/instructions/setPoolConfig.ts +51 -0
- package/src/@codegen/jupiter_perps/instructions/setTestOraclePrice.ts +59 -0
- package/src/@codegen/jupiter_perps/instructions/setTestTime.ts +49 -0
- package/src/@codegen/jupiter_perps/instructions/swap.ts +75 -0
- package/src/@codegen/jupiter_perps/instructions/swapExactOut.ts +75 -0
- package/src/@codegen/jupiter_perps/instructions/testInit.ts +61 -0
- package/src/@codegen/jupiter_perps/instructions/transferAdmin.ts +51 -0
- package/src/@codegen/jupiter_perps/instructions/updateDecreasePositionRequest.ts +63 -0
- package/src/@codegen/jupiter_perps/instructions/updateIncreasePositionRequest.ts +63 -0
- package/src/@codegen/jupiter_perps/instructions/withdrawFees.ts +63 -0
- package/src/@codegen/jupiter_perps/programId.ts +9 -0
- package/src/@codegen/jupiter_perps/types/AddCustodyParams.ts +104 -0
- package/src/@codegen/jupiter_perps/types/AddLiquidityParams.ts +79 -0
- package/src/@codegen/jupiter_perps/types/AddPoolParams.ts +86 -0
- package/src/@codegen/jupiter_perps/types/AmountAndFee.ts +73 -0
- package/src/@codegen/jupiter_perps/types/Assets.ts +104 -0
- package/src/@codegen/jupiter_perps/types/ClosePositionRequestParams.ts +40 -0
- package/src/@codegen/jupiter_perps/types/CreateDecreasePositionRequestParams.ts +136 -0
- package/src/@codegen/jupiter_perps/types/CreateIncreasePositionRequestParams.ts +136 -0
- package/src/@codegen/jupiter_perps/types/DecreasePositionInfo.ts +122 -0
- package/src/@codegen/jupiter_perps/types/DecreasePositionParams.ts +38 -0
- package/src/@codegen/jupiter_perps/types/DecreasePositionPostSwapParams.ts +40 -0
- package/src/@codegen/jupiter_perps/types/Fees.ts +131 -0
- package/src/@codegen/jupiter_perps/types/FundingRateState.ts +77 -0
- package/src/@codegen/jupiter_perps/types/GetAddLiquidityAmountAndFeeParams.ts +56 -0
- package/src/@codegen/jupiter_perps/types/GetDecreasePositionParams.ts +67 -0
- package/src/@codegen/jupiter_perps/types/GetExactOutSwapAmountAndFeesParams.ts +56 -0
- package/src/@codegen/jupiter_perps/types/GetIncreasePositionParams.ts +79 -0
- package/src/@codegen/jupiter_perps/types/GetLiquidationStateParams.ts +40 -0
- package/src/@codegen/jupiter_perps/types/GetPnlAndFeeParams.ts +38 -0
- package/src/@codegen/jupiter_perps/types/GetRemoveLiquidityAmountAndFeeParams.ts +56 -0
- package/src/@codegen/jupiter_perps/types/GetSwapAmountAndFeesParams.ts +56 -0
- package/src/@codegen/jupiter_perps/types/IncreasePositionInfo.ts +86 -0
- package/src/@codegen/jupiter_perps/types/IncreasePositionParams.ts +38 -0
- package/src/@codegen/jupiter_perps/types/IncreasePositionPreSwapParams.ts +40 -0
- package/src/@codegen/jupiter_perps/types/InitParams.ts +113 -0
- package/src/@codegen/jupiter_perps/types/Limit.ts +77 -0
- package/src/@codegen/jupiter_perps/types/LiquidatePositionParams.ts +38 -0
- package/src/@codegen/jupiter_perps/types/OracleParams.ts +86 -0
- package/src/@codegen/jupiter_perps/types/OraclePrice.ts +62 -0
- package/src/@codegen/jupiter_perps/types/OraclePriceInfo.ts +104 -0
- package/src/@codegen/jupiter_perps/types/OracleType.ts +119 -0
- package/src/@codegen/jupiter_perps/types/Permissions.ts +113 -0
- package/src/@codegen/jupiter_perps/types/PnlAndFee.ts +104 -0
- package/src/@codegen/jupiter_perps/types/PoolApr.ts +77 -0
- package/src/@codegen/jupiter_perps/types/PriceCalcMode.ts +121 -0
- package/src/@codegen/jupiter_perps/types/PricingParams.ts +104 -0
- package/src/@codegen/jupiter_perps/types/RemoveLiquidityParams.ts +65 -0
- package/src/@codegen/jupiter_perps/types/RequestChange.ts +121 -0
- package/src/@codegen/jupiter_perps/types/RequestType.ts +89 -0
- package/src/@codegen/jupiter_perps/types/SetCustodyConfigParams.ts +95 -0
- package/src/@codegen/jupiter_perps/types/SetCustodyGlobalLimitParams.ts +67 -0
- package/src/@codegen/jupiter_perps/types/SetPerpetualsConfigParams.ts +56 -0
- package/src/@codegen/jupiter_perps/types/SetPoolConfigParams.ts +77 -0
- package/src/@codegen/jupiter_perps/types/SetTestOraclePriceParams.ts +86 -0
- package/src/@codegen/jupiter_perps/types/SetTestTimeParams.ts +54 -0
- package/src/@codegen/jupiter_perps/types/Side.ts +119 -0
- package/src/@codegen/jupiter_perps/types/SwapAmountAndFees.ts +86 -0
- package/src/@codegen/jupiter_perps/types/SwapExactOutParams.ts +65 -0
- package/src/@codegen/jupiter_perps/types/SwapParams.ts +65 -0
- package/src/@codegen/jupiter_perps/types/TestInitParams.ts +113 -0
- package/src/@codegen/jupiter_perps/types/TransferAdminParams.ts +38 -0
- package/src/@codegen/jupiter_perps/types/UpdateDecreasePositionRequestParams.ts +67 -0
- package/src/@codegen/jupiter_perps/types/UpdateIncreasePositionRequestParams.ts +67 -0
- package/src/@codegen/jupiter_perps/types/WithdrawFeesParams.ts +38 -0
- package/src/@codegen/jupiter_perps/types/index.ts +248 -0
- package/src/@codegen/jupiter_perps/utils/borshAddress.ts +43 -0
- package/src/@codegen/jupiter_perps/utils/index.ts +1 -0
- package/src/@codegen/klend/accounts/GlobalConfig.ts +136 -0
- package/src/@codegen/klend/accounts/LendingMarket.ts +517 -0
- package/src/@codegen/klend/accounts/Obligation.ts +444 -0
- package/src/@codegen/klend/accounts/ReferrerState.ts +108 -0
- package/src/@codegen/klend/accounts/ReferrerTokenState.ts +156 -0
- package/src/@codegen/klend/accounts/Reserve.ts +259 -0
- package/src/@codegen/klend/accounts/ShortUrl.ts +108 -0
- package/src/@codegen/klend/accounts/UserMetadata.ts +153 -0
- package/src/@codegen/klend/accounts/UserState.ts +312 -0
- package/src/@codegen/klend/errors/index.ts +68 -0
- package/src/@codegen/klend/instructions/borrowObligationLiquidity.ts +71 -0
- package/src/@codegen/klend/instructions/borrowObligationLiquidityV2.ts +95 -0
- package/src/@codegen/klend/instructions/deleteReferrerStateAndShortUrl.ts +41 -0
- package/src/@codegen/klend/instructions/depositAndWithdraw.ts +168 -0
- package/src/@codegen/klend/instructions/depositObligationCollateral.ts +61 -0
- package/src/@codegen/klend/instructions/depositObligationCollateralV2.ts +84 -0
- package/src/@codegen/klend/instructions/depositReserveLiquidity.ts +69 -0
- package/src/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateral.ts +78 -0
- package/src/@codegen/klend/instructions/depositReserveLiquidityAndObligationCollateralV2.ts +103 -0
- package/src/@codegen/klend/instructions/flashBorrowReserveLiquidity.ts +77 -0
- package/src/@codegen/klend/instructions/flashRepayReserveLiquidity.ts +82 -0
- package/src/@codegen/klend/instructions/idlMissingTypes.ts +75 -0
- package/src/@codegen/klend/instructions/initFarmsForReserve.ts +69 -0
- package/src/@codegen/klend/instructions/initGlobalConfig.ts +41 -0
- package/src/@codegen/klend/instructions/initLendingMarket.ts +61 -0
- package/src/@codegen/klend/instructions/initObligation.ts +67 -0
- package/src/@codegen/klend/instructions/initObligationFarmsForReserve.ts +67 -0
- package/src/@codegen/klend/instructions/initReferrerStateAndShortUrl.ts +57 -0
- package/src/@codegen/klend/instructions/initReferrerTokenState.ts +45 -0
- package/src/@codegen/klend/instructions/initReserve.ts +63 -0
- package/src/@codegen/klend/instructions/initUserMetadata.ts +59 -0
- package/src/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateral.ts +98 -0
- package/src/@codegen/klend/instructions/liquidateObligationAndRedeemReserveCollateralV2.ts +162 -0
- package/src/@codegen/klend/instructions/markObligationForDeleveraging.ts +55 -0
- package/src/@codegen/klend/instructions/redeemFees.ts +45 -0
- package/src/@codegen/klend/instructions/redeemReserveCollateral.ts +69 -0
- package/src/@codegen/klend/instructions/refreshObligation.ts +35 -0
- package/src/@codegen/klend/instructions/refreshObligationFarmsForReserve.ts +67 -0
- package/src/@codegen/klend/instructions/refreshReserve.ts +51 -0
- package/src/@codegen/klend/instructions/refreshReservesBatch.ts +40 -0
- package/src/@codegen/klend/instructions/repayAndWithdrawAndRedeem.ts +147 -0
- package/src/@codegen/klend/instructions/repayObligationLiquidity.ts +63 -0
- package/src/@codegen/klend/instructions/repayObligationLiquidityV2.ts +86 -0
- package/src/@codegen/klend/instructions/requestElevationGroup.ts +51 -0
- package/src/@codegen/klend/instructions/setObligationOrder.ts +56 -0
- package/src/@codegen/klend/instructions/socializeLoss.ts +59 -0
- package/src/@codegen/klend/instructions/socializeLossV2.ts +81 -0
- package/src/@codegen/klend/instructions/updateGlobalConfig.ts +62 -0
- package/src/@codegen/klend/instructions/updateGlobalConfigAdmin.ts +39 -0
- package/src/@codegen/klend/instructions/updateLendingMarket.ts +58 -0
- package/src/@codegen/klend/instructions/updateLendingMarketOwner.ts +39 -0
- package/src/@codegen/klend/instructions/updateReserveConfig.ts +65 -0
- package/src/@codegen/klend/instructions/withdrawObligationCollateral.ts +63 -0
- package/src/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.ts +78 -0
- package/src/@codegen/klend/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.ts +101 -0
- package/src/@codegen/klend/instructions/withdrawObligationCollateralV2.ts +84 -0
- package/src/@codegen/klend/instructions/withdrawProtocolFee.ts +61 -0
- package/src/@codegen/klend/instructions/withdrawReferrerFees.ts +49 -0
- package/src/@codegen/klend/programId.ts +9 -0
- package/src/@codegen/klend/types/AssetTier.ts +119 -0
- package/src/@codegen/klend/types/BigFractionBytes.ts +68 -0
- package/src/@codegen/klend/types/BorrowRateCurve.ts +61 -0
- package/src/@codegen/klend/types/CurvePoint.ts +65 -0
- package/src/@codegen/klend/types/ElevationGroup.ts +134 -0
- package/src/@codegen/klend/types/FeeCalculation.ts +91 -0
- package/src/@codegen/klend/types/InitObligationArgs.ts +62 -0
- package/src/@codegen/klend/types/LastUpdate.ts +96 -0
- package/src/@codegen/klend/types/ObligationCollateral.ts +129 -0
- package/src/@codegen/klend/types/ObligationLiquidity.ts +160 -0
- package/src/@codegen/klend/types/ObligationOrder.ts +348 -0
- package/src/@codegen/klend/types/PriceHeuristic.ts +82 -0
- package/src/@codegen/klend/types/PythConfiguration.ts +57 -0
- package/src/@codegen/klend/types/ReserveCollateral.ts +105 -0
- package/src/@codegen/klend/types/ReserveConfig.ts +557 -0
- package/src/@codegen/klend/types/ReserveFarmKind.ts +91 -0
- package/src/@codegen/klend/types/ReserveFees.ts +123 -0
- package/src/@codegen/klend/types/ReserveLiquidity.ts +288 -0
- package/src/@codegen/klend/types/ReserveStatus.ts +121 -0
- package/src/@codegen/klend/types/ScopeConfiguration.ts +86 -0
- package/src/@codegen/klend/types/SwitchboardConfiguration.ts +68 -0
- package/src/@codegen/klend/types/TokenInfo.ts +191 -0
- package/src/@codegen/klend/types/UpdateConfigMode.ts +1531 -0
- package/src/@codegen/klend/types/UpdateGlobalConfigMode.ts +91 -0
- package/src/@codegen/klend/types/UpdateLendingMarketConfigValue.ts +420 -0
- package/src/@codegen/klend/types/UpdateLendingMarketMode.ts +781 -0
- package/src/@codegen/klend/types/WithdrawalCaps.ts +87 -0
- package/src/@codegen/klend/utils/borshAddress.ts +43 -0
- package/src/@codegen/klend/utils/index.ts +1 -0
- package/src/@codegen/klend/zero_padding/ObligationZP.ts +237 -0
- package/src/@codegen/kvault/accounts/Reserve.ts +259 -0
- package/src/@codegen/kvault/accounts/VaultState.ts +390 -0
- package/src/@codegen/kvault/errors/anchor.ts +773 -0
- package/src/@codegen/kvault/errors/custom.ts +697 -0
- package/src/@codegen/kvault/errors/index.ts +68 -0
- package/src/@codegen/kvault/instructions/deposit.ts +71 -0
- package/src/@codegen/kvault/instructions/giveUpPendingFees.ts +55 -0
- package/src/@codegen/kvault/instructions/initVault.ts +57 -0
- package/src/@codegen/kvault/instructions/initializeSharesMetadata.ts +73 -0
- package/src/@codegen/kvault/instructions/invest.ts +64 -0
- package/src/@codegen/kvault/instructions/removeAllocation.ts +41 -0
- package/src/@codegen/kvault/instructions/updateAdmin.ts +39 -0
- package/src/@codegen/kvault/instructions/updateReserveAllocation.ts +65 -0
- package/src/@codegen/kvault/instructions/updateSharesMetadata.ts +67 -0
- package/src/@codegen/kvault/instructions/updateVaultConfig.ts +64 -0
- package/src/@codegen/kvault/instructions/withdraw.ts +117 -0
- package/src/@codegen/kvault/instructions/withdrawFromAvailable.ts +71 -0
- package/src/@codegen/kvault/instructions/withdrawPendingFees.ts +68 -0
- package/src/@codegen/kvault/programId.ts +9 -0
- package/src/@codegen/kvault/types/BigFractionBytes.ts +68 -0
- package/src/@codegen/kvault/types/BorrowRateCurve.ts +61 -0
- package/src/@codegen/kvault/types/CurvePoint.ts +65 -0
- package/src/@codegen/kvault/types/LastUpdate.ts +96 -0
- package/src/@codegen/kvault/types/PriceHeuristic.ts +82 -0
- package/src/@codegen/kvault/types/PythConfiguration.ts +57 -0
- package/src/@codegen/kvault/types/ReserveCollateral.ts +105 -0
- package/src/@codegen/kvault/types/ReserveConfig.ts +557 -0
- package/src/@codegen/kvault/types/ReserveFees.ts +123 -0
- package/src/@codegen/kvault/types/ReserveLiquidity.ts +288 -0
- package/src/@codegen/kvault/types/ScopeConfiguration.ts +86 -0
- package/src/@codegen/kvault/types/SwitchboardConfiguration.ts +68 -0
- package/src/@codegen/kvault/types/TokenInfo.ts +191 -0
- package/src/@codegen/kvault/types/VaultAllocation.ts +143 -0
- package/src/@codegen/kvault/types/VaultConfigField.ts +451 -0
- package/src/@codegen/kvault/types/WithdrawalCaps.ts +87 -0
- package/src/@codegen/kvault/types/index.ts +89 -0
- package/src/@codegen/kvault/utils/borshAddress.ts +43 -0
- package/src/@codegen/kvault/utils/index.ts +1 -0
- package/src/@codegen/pyth_rec/accounts/Config.ts +151 -0
- package/src/@codegen/pyth_rec/accounts/index.ts +6 -0
- package/src/@codegen/pyth_rec/accounts/priceUpdateV2.ts +128 -0
- package/src/@codegen/pyth_rec/accounts/twapUpdate.ts +108 -0
- package/src/@codegen/pyth_rec/errors/anchor.ts +773 -0
- package/src/@codegen/pyth_rec/errors/custom.ts +331 -0
- package/src/@codegen/pyth_rec/errors/index.ts +68 -0
- package/src/@codegen/pyth_rec/instructions/acceptGovernanceAuthorityTransfer.ts +35 -0
- package/src/@codegen/pyth_rec/instructions/index.ts +28 -0
- package/src/@codegen/pyth_rec/instructions/reclaimRent.ts +35 -0
- package/src/@codegen/pyth_rec/instructions/reclaimTwapRent.ts +35 -0
- package/src/@codegen/pyth_rec/instructions/requestGovernanceAuthorityTransfer.ts +49 -0
- package/src/@codegen/pyth_rec/instructions/setDataSources.ts +53 -0
- package/src/@codegen/pyth_rec/instructions/setFee.ts +49 -0
- package/src/@codegen/pyth_rec/instructions/setMinimumSignatures.ts +49 -0
- package/src/@codegen/pyth_rec/instructions/setWormholeAddress.ts +49 -0
- package/src/@codegen/pyth_rec/programId.ts +9 -0
- package/src/@codegen/pyth_rec/types/DataSource.ts +62 -0
- package/src/@codegen/pyth_rec/types/MerklePriceUpdate.ts +73 -0
- package/src/@codegen/pyth_rec/types/PostTwapUpdateParams.ts +93 -0
- package/src/@codegen/pyth_rec/types/PostUpdateAtomicParams.ts +89 -0
- package/src/@codegen/pyth_rec/types/PostUpdateParams.ts +76 -0
- package/src/@codegen/pyth_rec/types/PriceFeedMessage.ts +122 -0
- package/src/@codegen/pyth_rec/types/TwapPrice.ts +129 -0
- package/src/@codegen/pyth_rec/types/VerificationLevel.ts +118 -0
- package/src/@codegen/pyth_rec/types/index.ts +44 -0
- package/src/@codegen/pyth_rec/utils/borshAddress.ts +43 -0
- package/src/@codegen/pyth_rec/utils/index.ts +1 -0
- package/src/@codegen/switchboard_v2/accounts/AggregatorAccountData.ts +398 -0
- package/src/@codegen/switchboard_v2/accounts/BufferRelayerAccountData.ts +190 -0
- package/src/@codegen/switchboard_v2/accounts/CrankAccountData.ts +156 -0
- package/src/@codegen/switchboard_v2/accounts/JobAccountData.ts +176 -0
- package/src/@codegen/switchboard_v2/accounts/LeaseAccountData.ts +172 -0
- package/src/@codegen/switchboard_v2/accounts/OracleAccountData.ts +164 -0
- package/src/@codegen/switchboard_v2/accounts/OracleQueueAccountData.ts +287 -0
- package/src/@codegen/switchboard_v2/accounts/PermissionAccountData.ts +140 -0
- package/src/@codegen/switchboard_v2/accounts/RealmSpawnRecordAccountData.ts +100 -0
- package/src/@codegen/switchboard_v2/accounts/SbState.ts +132 -0
- package/src/@codegen/switchboard_v2/accounts/SlidingResultAccountData.ts +122 -0
- package/src/@codegen/switchboard_v2/accounts/TaskSpecRecord.ts +100 -0
- package/src/@codegen/switchboard_v2/accounts/VrfAccountData.ts +194 -0
- package/src/@codegen/switchboard_v2/accounts/VrfLiteAccountData.ts +228 -0
- package/src/@codegen/switchboard_v2/accounts/VrfPoolAccountData.ts +162 -0
- package/src/@codegen/switchboard_v2/accounts/index.ts +63 -0
- package/src/@codegen/switchboard_v2/errors/anchor.ts +773 -0
- package/src/@codegen/switchboard_v2/errors/custom.ts +1436 -0
- package/src/@codegen/switchboard_v2/errors/index.ts +68 -0
- package/src/@codegen/switchboard_v2/instructions/aggregatorAddJob.ts +57 -0
- package/src/@codegen/switchboard_v2/instructions/aggregatorInit.ts +55 -0
- package/src/@codegen/switchboard_v2/instructions/aggregatorLock.ts +55 -0
- package/src/@codegen/switchboard_v2/instructions/aggregatorOpenRound.ts +69 -0
- package/src/@codegen/switchboard_v2/instructions/aggregatorRemoveJob.ts +57 -0
- package/src/@codegen/switchboard_v2/instructions/aggregatorSaveResult.ts +77 -0
- package/src/@codegen/switchboard_v2/instructions/aggregatorSaveResultV2.ts +77 -0
- package/src/@codegen/switchboard_v2/instructions/aggregatorSetAuthority.ts +57 -0
- package/src/@codegen/switchboard_v2/instructions/aggregatorSetConfig.ts +55 -0
- package/src/@codegen/switchboard_v2/instructions/aggregatorSetHistoryBuffer.ts +57 -0
- package/src/@codegen/switchboard_v2/instructions/aggregatorSetQueue.ts +57 -0
- package/src/@codegen/switchboard_v2/instructions/aggregatorSetResolutionMode.ts +61 -0
- package/src/@codegen/switchboard_v2/instructions/bufferRelayerInit.ts +71 -0
- package/src/@codegen/switchboard_v2/instructions/bufferRelayerOpenRound.ts +59 -0
- package/src/@codegen/switchboard_v2/instructions/bufferRelayerSaveResult.ts +73 -0
- package/src/@codegen/switchboard_v2/instructions/crankInit.ts +55 -0
- package/src/@codegen/switchboard_v2/instructions/crankPop.ts +63 -0
- package/src/@codegen/switchboard_v2/instructions/crankPopV2.ts +63 -0
- package/src/@codegen/switchboard_v2/instructions/crankPush.ts +63 -0
- package/src/@codegen/switchboard_v2/instructions/index.ts +183 -0
- package/src/@codegen/switchboard_v2/instructions/jobInit.ts +59 -0
- package/src/@codegen/switchboard_v2/instructions/jobSetData.ts +53 -0
- package/src/@codegen/switchboard_v2/instructions/leaseExtend.ts +63 -0
- package/src/@codegen/switchboard_v2/instructions/leaseInit.ts +67 -0
- package/src/@codegen/switchboard_v2/instructions/leaseSetAuthority.ts +57 -0
- package/src/@codegen/switchboard_v2/instructions/leaseWithdraw.ts +67 -0
- package/src/@codegen/switchboard_v2/instructions/oracleHeartbeat.ts +65 -0
- package/src/@codegen/switchboard_v2/instructions/oracleInit.ts +59 -0
- package/src/@codegen/switchboard_v2/instructions/oracleQueueInit.ts +63 -0
- package/src/@codegen/switchboard_v2/instructions/oracleQueueSetConfig.ts +55 -0
- package/src/@codegen/switchboard_v2/instructions/oracleWithdraw.ts +71 -0
- package/src/@codegen/switchboard_v2/instructions/permissionInit.ts +59 -0
- package/src/@codegen/switchboard_v2/instructions/permissionSet.ts +53 -0
- package/src/@codegen/switchboard_v2/instructions/programConfig.ts +55 -0
- package/src/@codegen/switchboard_v2/instructions/programInit.ts +61 -0
- package/src/@codegen/switchboard_v2/instructions/vaultTransfer.ts +59 -0
- package/src/@codegen/switchboard_v2/instructions/vrfCloseAction.ts +69 -0
- package/src/@codegen/switchboard_v2/instructions/vrfInit.ts +57 -0
- package/src/@codegen/switchboard_v2/instructions/vrfLiteCloseAction.ts +69 -0
- package/src/@codegen/switchboard_v2/instructions/vrfLiteInit.ts +71 -0
- package/src/@codegen/switchboard_v2/instructions/vrfLiteProveAndVerify.ts +69 -0
- package/src/@codegen/switchboard_v2/instructions/vrfLiteRequestRandomness.ts +71 -0
- package/src/@codegen/switchboard_v2/instructions/vrfPoolAdd.ts +55 -0
- package/src/@codegen/switchboard_v2/instructions/vrfPoolInit.ts +67 -0
- package/src/@codegen/switchboard_v2/instructions/vrfPoolRemove.ts +55 -0
- package/src/@codegen/switchboard_v2/instructions/vrfPoolRequest.ts +71 -0
- package/src/@codegen/switchboard_v2/instructions/vrfProveAndVerify.ts +69 -0
- package/src/@codegen/switchboard_v2/instructions/vrfRequestRandomness.ts +79 -0
- package/src/@codegen/switchboard_v2/instructions/vrfSetCallback.ts +55 -0
- package/src/@codegen/switchboard_v2/programId.ts +9 -0
- package/src/@codegen/switchboard_v2/types/AccountMetaBorsh.ts +77 -0
- package/src/@codegen/switchboard_v2/types/AccountMetaZC.ts +77 -0
- package/src/@codegen/switchboard_v2/types/AggregatorAddJobParams.ts +54 -0
- package/src/@codegen/switchboard_v2/types/AggregatorHistoryRow.ts +65 -0
- package/src/@codegen/switchboard_v2/types/AggregatorInitParams.ts +162 -0
- package/src/@codegen/switchboard_v2/types/AggregatorLockParams.ts +38 -0
- package/src/@codegen/switchboard_v2/types/AggregatorOpenRoundParams.ts +88 -0
- package/src/@codegen/switchboard_v2/types/AggregatorRemoveJobParams.ts +56 -0
- package/src/@codegen/switchboard_v2/types/AggregatorResolutionMode.ts +91 -0
- package/src/@codegen/switchboard_v2/types/AggregatorRound.ts +186 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSaveResultParams.ts +142 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSaveResultParamsV2.ts +161 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSetAuthorityParams.ts +40 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSetBatchSizeParams.ts +56 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSetConfigParams.ts +173 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSetForceReportPeriodParams.ts +56 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSetHistoryBufferParams.ts +40 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSetMinJobsParams.ts +56 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSetMinOraclesParams.ts +56 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSetQueueParams.ts +38 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSetResolutionModeParams.ts +56 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSetUpdateIntervalParams.ts +56 -0
- package/src/@codegen/switchboard_v2/types/AggregatorSetVarianceThresholdParams.ts +63 -0
- package/src/@codegen/switchboard_v2/types/BorshDecimal.ts +62 -0
- package/src/@codegen/switchboard_v2/types/BufferRelayerInitParams.ts +77 -0
- package/src/@codegen/switchboard_v2/types/BufferRelayerOpenRoundParams.ts +67 -0
- package/src/@codegen/switchboard_v2/types/BufferRelayerRound.ts +95 -0
- package/src/@codegen/switchboard_v2/types/BufferRelayerSaveResultParams.ts +96 -0
- package/src/@codegen/switchboard_v2/types/Callback.ts +95 -0
- package/src/@codegen/switchboard_v2/types/CallbackZC.ts +103 -0
- package/src/@codegen/switchboard_v2/types/CompletedPointZC.ts +86 -0
- package/src/@codegen/switchboard_v2/types/CrankInitParams.ts +89 -0
- package/src/@codegen/switchboard_v2/types/CrankPopParams.ts +111 -0
- package/src/@codegen/switchboard_v2/types/CrankPopParamsV2.ts +120 -0
- package/src/@codegen/switchboard_v2/types/CrankPushParams.ts +77 -0
- package/src/@codegen/switchboard_v2/types/CrankRow.ts +65 -0
- package/src/@codegen/switchboard_v2/types/EcvrfIntermediate.ts +95 -0
- package/src/@codegen/switchboard_v2/types/EcvrfProofZC.ts +77 -0
- package/src/@codegen/switchboard_v2/types/EdwardsPointZC.ts +86 -0
- package/src/@codegen/switchboard_v2/types/Error.ts +149 -0
- package/src/@codegen/switchboard_v2/types/FieldElementZC.ts +54 -0
- package/src/@codegen/switchboard_v2/types/Hash.ts +54 -0
- package/src/@codegen/switchboard_v2/types/JobInitParams.ts +103 -0
- package/src/@codegen/switchboard_v2/types/JobSetDataParams.ts +70 -0
- package/src/@codegen/switchboard_v2/types/LeaseExtendParams.ts +94 -0
- package/src/@codegen/switchboard_v2/types/LeaseInitParams.ts +103 -0
- package/src/@codegen/switchboard_v2/types/LeaseSetAuthorityParams.ts +38 -0
- package/src/@codegen/switchboard_v2/types/LeaseWithdrawParams.ts +73 -0
- package/src/@codegen/switchboard_v2/types/OracleHeartbeatParams.ts +54 -0
- package/src/@codegen/switchboard_v2/types/OracleInitParams.ts +102 -0
- package/src/@codegen/switchboard_v2/types/OracleMetrics.ts +131 -0
- package/src/@codegen/switchboard_v2/types/OracleQueueInitParams.ts +185 -0
- package/src/@codegen/switchboard_v2/types/OracleQueueSetConfigParams.ts +190 -0
- package/src/@codegen/switchboard_v2/types/OracleQueueSetRewardsParams.ts +56 -0
- package/src/@codegen/switchboard_v2/types/OracleResponseType.ts +151 -0
- package/src/@codegen/switchboard_v2/types/OracleWithdrawParams.ts +73 -0
- package/src/@codegen/switchboard_v2/types/PermissionInitParams.ts +38 -0
- package/src/@codegen/switchboard_v2/types/PermissionSetParams.ts +65 -0
- package/src/@codegen/switchboard_v2/types/ProgramConfigParams.ts +73 -0
- package/src/@codegen/switchboard_v2/types/ProgramInitParams.ts +54 -0
- package/src/@codegen/switchboard_v2/types/ProjectivePointZC.ts +77 -0
- package/src/@codegen/switchboard_v2/types/Scalar.ts +54 -0
- package/src/@codegen/switchboard_v2/types/SlidingWindowElement.ts +86 -0
- package/src/@codegen/switchboard_v2/types/SwitchboardDecimal.ts +62 -0
- package/src/@codegen/switchboard_v2/types/SwitchboardPermission.ts +121 -0
- package/src/@codegen/switchboard_v2/types/VaultTransferParams.ts +62 -0
- package/src/@codegen/switchboard_v2/types/VrfBuilder.ts +404 -0
- package/src/@codegen/switchboard_v2/types/VrfCloseParams.ts +65 -0
- package/src/@codegen/switchboard_v2/types/VrfInitParams.ts +65 -0
- package/src/@codegen/switchboard_v2/types/VrfLiteCloseParams.ts +38 -0
- package/src/@codegen/switchboard_v2/types/VrfLiteInitParams.ts +81 -0
- package/src/@codegen/switchboard_v2/types/VrfLiteProveAndVerifyParams.ts +96 -0
- package/src/@codegen/switchboard_v2/types/VrfLiteRequestRandomnessParams.ts +63 -0
- package/src/@codegen/switchboard_v2/types/VrfPoolAddParams.ts +38 -0
- package/src/@codegen/switchboard_v2/types/VrfPoolInitParams.ts +73 -0
- package/src/@codegen/switchboard_v2/types/VrfPoolRemoveParams.ts +38 -0
- package/src/@codegen/switchboard_v2/types/VrfPoolRequestParams.ts +61 -0
- package/src/@codegen/switchboard_v2/types/VrfPoolRow.ts +65 -0
- package/src/@codegen/switchboard_v2/types/VrfProveAndVerifyParams.ts +112 -0
- package/src/@codegen/switchboard_v2/types/VrfProveParams.ts +70 -0
- package/src/@codegen/switchboard_v2/types/VrfRequestRandomnessParams.ts +67 -0
- package/src/@codegen/switchboard_v2/types/VrfRound.ts +113 -0
- package/src/@codegen/switchboard_v2/types/VrfSetCallbackParams.ts +54 -0
- package/src/@codegen/switchboard_v2/types/VrfStatus.ts +209 -0
- package/src/@codegen/switchboard_v2/types/index.ts +495 -0
- package/src/@codegen/switchboard_v2/utils/borshAddress.ts +43 -0
- package/src/@codegen/switchboard_v2/utils/index.ts +1 -0
- package/src/classes/action.ts +1033 -1055
- package/src/classes/curve.ts +1 -1
- package/src/classes/farm_utils.ts +77 -75
- package/src/classes/jupiterPerps.ts +3 -3
- package/src/classes/manager.ts +554 -276
- package/src/classes/market.ts +462 -446
- package/src/classes/obligation.ts +120 -120
- package/src/classes/obligationOrder.ts +3 -3
- package/src/classes/reserve.ts +180 -137
- package/src/classes/shared.ts +3 -3
- package/src/classes/utils.ts +9 -15
- package/src/classes/vault.ts +792 -675
- package/src/classes/vault_types.ts +33 -23
- package/src/client/client.ts +345 -0
- package/src/client/commands/borrow.ts +29 -0
- package/src/client/commands/deposit.ts +29 -0
- package/src/client/commands/initFarmsForReserve.ts +71 -0
- package/src/client/commands/printAllReserveAccounts.ts +18 -0
- package/src/client/commands/printReserve.ts +13 -0
- package/src/client/commands/repay.ts +30 -0
- package/src/client/commands/withdraw.ts +29 -0
- package/src/client/services/market.ts +23 -0
- package/src/client/services/userMetadata.ts +25 -0
- package/src/client/tx/CliConnectionPool.ts +55 -0
- package/src/client/tx/CliEnv.ts +149 -0
- package/src/client/tx/keypair.ts +29 -0
- package/src/client/tx/multisig.ts +47 -0
- package/src/client/tx/priorityFee.ts +34 -0
- package/src/client/tx/processor.ts +31 -0
- package/src/client/tx/rpc.ts +152 -0
- package/src/client/tx/simulate.ts +73 -0
- package/src/client/tx/tx.ts +184 -0
- package/src/client/utils/modifiers.ts +6 -0
- package/src/idl/kvault.json +2359 -0
- package/src/idl/pyth_rec.json +574 -0
- package/src/idl/switchboard_v2.json +6943 -0
- package/src/lending_operations/repay_with_collateral_calcs.ts +11 -11
- package/src/lending_operations/repay_with_collateral_operations.ts +102 -98
- package/src/lending_operations/swap_collateral_operations.ts +77 -75
- package/src/leverage/calcs.ts +25 -25
- package/src/leverage/instructions.ts +37 -36
- package/src/leverage/operations.ts +499 -507
- package/src/leverage/types.ts +31 -30
- package/src/leverage/utils.ts +45 -38
- package/src/lib.ts +9 -9
- package/src/manager/client_kamino_manager.ts +2156 -0
- package/src/manager/tx/ManagerConnectionPool.ts +55 -0
- package/src/manager/tx/ManagerEnv.ts +211 -0
- package/src/manager/tx/keypair.ts +29 -0
- package/src/manager/tx/multisig.ts +47 -0
- package/src/manager/tx/priorityFee.ts +34 -0
- package/src/manager/tx/processor.ts +29 -0
- package/src/manager/tx/rpc.ts +152 -0
- package/src/manager/tx/simulate.ts +73 -0
- package/src/manager/tx/tx.ts +183 -0
- package/src/manager/utils/consts.ts +3 -0
- package/src/manager/utils/modifiers.ts +6 -0
- package/src/obligation_orders/price_based.ts +7 -8
- package/src/referrals/instructions.ts +44 -41
- package/src/referrals/operations.ts +83 -165
- package/src/utils/ObligationType.ts +59 -38
- package/src/utils/accountListing.ts +69 -55
- package/src/utils/api.ts +2 -2
- package/src/utils/ata.ts +146 -122
- package/src/utils/bigint.ts +3 -0
- package/src/utils/compat.ts +17 -0
- package/src/utils/constants.ts +5 -7
- package/src/utils/consts.ts +5 -0
- package/src/utils/idl.ts +1 -1
- package/src/utils/index.ts +1 -1
- package/src/utils/instruction.ts +33 -283
- package/src/utils/kamino.ts +12 -9
- package/src/utils/lookupTable.ts +62 -57
- package/src/utils/managerTypes.ts +60 -58
- package/src/utils/map.ts +8 -0
- package/src/utils/metadata.ts +20 -20
- package/src/utils/multisig.ts +37 -12
- package/src/utils/option.ts +9 -0
- package/src/utils/oracle.ts +51 -51
- package/src/utils/pubkey.ts +7 -272
- package/src/utils/rpc.ts +46 -93
- package/src/utils/seeds.ts +121 -73
- package/src/utils/signer.ts +26 -0
- package/src/utils/switchboard.ts +23 -0
- package/src/utils/userMetadata.ts +129 -126
- package/src/utils/vault.ts +4 -4
- package/src/utils/vaultAllocation.ts +93 -0
- package/dist/client_kamino_manager.d.ts +0 -13
- package/dist/client_kamino_manager.d.ts.map +0 -1
- package/dist/client_kamino_manager.js +0 -1202
- package/dist/client_kamino_manager.js.map +0 -1
- package/dist/idl_codegen/accounts/GlobalConfig.d.ts +0 -40
- package/dist/idl_codegen/accounts/GlobalConfig.d.ts.map +0 -1
- package/dist/idl_codegen/accounts/GlobalConfig.js +0 -116
- package/dist/idl_codegen/accounts/GlobalConfig.js.map +0 -1
- package/dist/idl_codegen/accounts/LendingMarket.d.ts +0 -252
- package/dist/idl_codegen/accounts/LendingMarket.d.ts.map +0 -1
- package/dist/idl_codegen/accounts/LendingMarket.js +0 -333
- package/dist/idl_codegen/accounts/LendingMarket.js.map +0 -1
- package/dist/idl_codegen/accounts/Obligation.d.ts +0 -199
- package/dist/idl_codegen/accounts/Obligation.d.ts.map +0 -1
- package/dist/idl_codegen/accounts/Obligation.js +0 -292
- package/dist/idl_codegen/accounts/Obligation.js.map +0 -1
- package/dist/idl_codegen/accounts/ReferrerState.d.ts +0 -22
- package/dist/idl_codegen/accounts/ReferrerState.d.ts.map +0 -1
- package/dist/idl_codegen/accounts/ReferrerState.js +0 -100
- package/dist/idl_codegen/accounts/ReferrerState.js.map +0 -1
- package/dist/idl_codegen/accounts/ReferrerTokenState.d.ts +0 -51
- package/dist/idl_codegen/accounts/ReferrerTokenState.d.ts.map +0 -1
- package/dist/idl_codegen/accounts/ReferrerTokenState.js +0 -134
- package/dist/idl_codegen/accounts/ReferrerTokenState.js.map +0 -1
- package/dist/idl_codegen/accounts/Reserve.d.ts +0 -90
- package/dist/idl_codegen/accounts/Reserve.d.ts.map +0 -1
- package/dist/idl_codegen/accounts/Reserve.js +0 -189
- package/dist/idl_codegen/accounts/Reserve.js.map +0 -1
- package/dist/idl_codegen/accounts/ShortUrl.d.ts +0 -22
- package/dist/idl_codegen/accounts/ShortUrl.d.ts.map +0 -1
- package/dist/idl_codegen/accounts/ShortUrl.js +0 -100
- package/dist/idl_codegen/accounts/ShortUrl.js.map +0 -1
- package/dist/idl_codegen/accounts/UserMetadata.d.ts +0 -48
- package/dist/idl_codegen/accounts/UserMetadata.d.ts.map +0 -1
- package/dist/idl_codegen/accounts/UserMetadata.js +0 -133
- package/dist/idl_codegen/accounts/UserMetadata.js.map +0 -1
- package/dist/idl_codegen/accounts/UserState.d.ts +0 -143
- package/dist/idl_codegen/accounts/UserState.d.ts.map +0 -1
- package/dist/idl_codegen/accounts/UserState.js +0 -219
- package/dist/idl_codegen/accounts/UserState.js.map +0 -1
- package/dist/idl_codegen/accounts/index.d.ts.map +0 -1
- package/dist/idl_codegen/accounts/index.js.map +0 -1
- package/dist/idl_codegen/errors/anchor.d.ts.map +0 -1
- package/dist/idl_codegen/errors/anchor.js.map +0 -1
- package/dist/idl_codegen/errors/custom.d.ts.map +0 -1
- package/dist/idl_codegen/errors/custom.js.map +0 -1
- package/dist/idl_codegen/errors/index.d.ts +0 -6
- package/dist/idl_codegen/errors/index.d.ts.map +0 -1
- package/dist/idl_codegen/errors/index.js +0 -80
- package/dist/idl_codegen/errors/index.js.map +0 -1
- package/dist/idl_codegen/instructions/borrowObligationLiquidity.d.ts +0 -22
- package/dist/idl_codegen/instructions/borrowObligationLiquidity.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/borrowObligationLiquidity.js +0 -90
- package/dist/idl_codegen/instructions/borrowObligationLiquidity.js.map +0 -1
- package/dist/idl_codegen/instructions/borrowObligationLiquidityV2.d.ts +0 -29
- package/dist/idl_codegen/instructions/borrowObligationLiquidityV2.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/borrowObligationLiquidityV2.js +0 -125
- package/dist/idl_codegen/instructions/borrowObligationLiquidityV2.js.map +0 -1
- package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.d.ts +0 -10
- package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.js +0 -19
- package/dist/idl_codegen/instructions/deleteReferrerStateAndShortUrl.js.map +0 -1
- package/dist/idl_codegen/instructions/depositAndWithdraw.d.ts +0 -52
- package/dist/idl_codegen/instructions/depositAndWithdraw.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/depositAndWithdraw.js +0 -219
- package/dist/idl_codegen/instructions/depositAndWithdraw.js.map +0 -1
- package/dist/idl_codegen/instructions/depositObligationCollateral.d.ts +0 -18
- package/dist/idl_codegen/instructions/depositObligationCollateral.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/depositObligationCollateral.js +0 -74
- package/dist/idl_codegen/instructions/depositObligationCollateral.js.map +0 -1
- package/dist/idl_codegen/instructions/depositObligationCollateralV2.d.ts +0 -26
- package/dist/idl_codegen/instructions/depositObligationCollateralV2.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/depositObligationCollateralV2.js +0 -110
- package/dist/idl_codegen/instructions/depositObligationCollateralV2.js.map +0 -1
- package/dist/idl_codegen/instructions/depositReserveLiquidity.d.ts +0 -22
- package/dist/idl_codegen/instructions/depositReserveLiquidity.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/depositReserveLiquidity.js +0 -98
- package/dist/idl_codegen/instructions/depositReserveLiquidity.js.map +0 -1
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.d.ts +0 -24
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.js +0 -104
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.js.map +0 -1
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts +0 -31
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateralV2.js +0 -135
- package/dist/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateralV2.js.map +0 -1
- package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.d.ts +0 -22
- package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.js +0 -90
- package/dist/idl_codegen/instructions/flashBorrowReserveLiquidity.js.map +0 -1
- package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.d.ts +0 -23
- package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.js +0 -90
- package/dist/idl_codegen/instructions/flashRepayReserveLiquidity.js.map +0 -1
- package/dist/idl_codegen/instructions/idlMissingTypes.d.ts +0 -20
- package/dist/idl_codegen/instructions/idlMissingTypes.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/idlMissingTypes.js +0 -73
- package/dist/idl_codegen/instructions/idlMissingTypes.js.map +0 -1
- package/dist/idl_codegen/instructions/index.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/index.js.map +0 -1
- package/dist/idl_codegen/instructions/initFarmsForReserve.d.ts +0 -19
- package/dist/idl_codegen/instructions/initFarmsForReserve.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/initFarmsForReserve.js +0 -72
- package/dist/idl_codegen/instructions/initFarmsForReserve.js.map +0 -1
- package/dist/idl_codegen/instructions/initGlobalConfig.d.ts +0 -10
- package/dist/idl_codegen/instructions/initGlobalConfig.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/initGlobalConfig.js +0 -19
- package/dist/idl_codegen/instructions/initGlobalConfig.js.map +0 -1
- package/dist/idl_codegen/instructions/initLendingMarket.d.ts +0 -14
- package/dist/idl_codegen/instructions/initLendingMarket.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/initLendingMarket.js +0 -65
- package/dist/idl_codegen/instructions/initLendingMarket.js.map +0 -1
- package/dist/idl_codegen/instructions/initObligation.d.ts +0 -19
- package/dist/idl_codegen/instructions/initObligation.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/initObligation.js +0 -64
- package/dist/idl_codegen/instructions/initObligation.js.map +0 -1
- package/dist/idl_codegen/instructions/initObligationFarmsForReserve.d.ts +0 -20
- package/dist/idl_codegen/instructions/initObligationFarmsForReserve.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/initObligationFarmsForReserve.js +0 -69
- package/dist/idl_codegen/instructions/initObligationFarmsForReserve.js.map +0 -1
- package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.d.ts +0 -15
- package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.js +0 -64
- package/dist/idl_codegen/instructions/initReferrerStateAndShortUrl.js.map +0 -1
- package/dist/idl_codegen/instructions/initReferrerTokenState.d.ts +0 -12
- package/dist/idl_codegen/instructions/initReferrerTokenState.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/initReferrerTokenState.js +0 -21
- package/dist/idl_codegen/instructions/initReferrerTokenState.js.map +0 -1
- package/dist/idl_codegen/instructions/initReserve.d.ts +0 -19
- package/dist/idl_codegen/instructions/initReserve.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/initReserve.js +0 -60
- package/dist/idl_codegen/instructions/initReserve.js.map +0 -1
- package/dist/idl_codegen/instructions/initUserMetadata.d.ts +0 -15
- package/dist/idl_codegen/instructions/initUserMetadata.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/initUserMetadata.js +0 -64
- package/dist/idl_codegen/instructions/initUserMetadata.js.map +0 -1
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts +0 -32
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.js +0 -136
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.js.map +0 -1
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts +0 -43
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateralV2.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateralV2.js +0 -181
- package/dist/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateralV2.js.map +0 -1
- package/dist/idl_codegen/instructions/markObligationForDeleveraging.d.ts +0 -12
- package/dist/idl_codegen/instructions/markObligationForDeleveraging.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/markObligationForDeleveraging.js +0 -57
- package/dist/idl_codegen/instructions/markObligationForDeleveraging.js.map +0 -1
- package/dist/idl_codegen/instructions/redeemFees.d.ts +0 -12
- package/dist/idl_codegen/instructions/redeemFees.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/redeemFees.js +0 -37
- package/dist/idl_codegen/instructions/redeemFees.js.map +0 -1
- package/dist/idl_codegen/instructions/redeemReserveCollateral.d.ts +0 -22
- package/dist/idl_codegen/instructions/redeemReserveCollateral.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/redeemReserveCollateral.js +0 -102
- package/dist/idl_codegen/instructions/redeemReserveCollateral.js.map +0 -1
- package/dist/idl_codegen/instructions/refreshObligation.d.ts +0 -7
- package/dist/idl_codegen/instructions/refreshObligation.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/refreshObligation.js +0 -16
- package/dist/idl_codegen/instructions/refreshObligation.js.map +0 -1
- package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.d.ts +0 -21
- package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.js +0 -88
- package/dist/idl_codegen/instructions/refreshObligationFarmsForReserve.js.map +0 -1
- package/dist/idl_codegen/instructions/refreshReserve.d.ts +0 -11
- package/dist/idl_codegen/instructions/refreshReserve.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/refreshReserve.js +0 -28
- package/dist/idl_codegen/instructions/refreshReserve.js.map +0 -1
- package/dist/idl_codegen/instructions/refreshReservesBatch.d.ts +0 -7
- package/dist/idl_codegen/instructions/refreshReservesBatch.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/refreshReservesBatch.js +0 -53
- package/dist/idl_codegen/instructions/refreshReservesBatch.js.map +0 -1
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeem.d.ts +0 -47
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeem.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeem.js +0 -190
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeem.js.map +0 -1
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeemV2.d.ts +0 -49
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeemV2.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeemV2.js +0 -205
- package/dist/idl_codegen/instructions/repayAndWithdrawAndRedeemV2.js.map +0 -1
- package/dist/idl_codegen/instructions/repayObligationLiquidity.d.ts +0 -19
- package/dist/idl_codegen/instructions/repayObligationLiquidity.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/repayObligationLiquidity.js +0 -75
- package/dist/idl_codegen/instructions/repayObligationLiquidity.js.map +0 -1
- package/dist/idl_codegen/instructions/repayObligationLiquidityV2.d.ts +0 -27
- package/dist/idl_codegen/instructions/repayObligationLiquidityV2.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/repayObligationLiquidityV2.js +0 -111
- package/dist/idl_codegen/instructions/repayObligationLiquidityV2.js.map +0 -1
- package/dist/idl_codegen/instructions/requestElevationGroup.d.ts +0 -12
- package/dist/idl_codegen/instructions/requestElevationGroup.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/requestElevationGroup.js +0 -57
- package/dist/idl_codegen/instructions/requestElevationGroup.js.map +0 -1
- package/dist/idl_codegen/instructions/setObligationOrder.d.ts +0 -14
- package/dist/idl_codegen/instructions/setObligationOrder.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/setObligationOrder.js +0 -62
- package/dist/idl_codegen/instructions/setObligationOrder.js.map +0 -1
- package/dist/idl_codegen/instructions/socializeLoss.d.ts +0 -15
- package/dist/idl_codegen/instructions/socializeLoss.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/socializeLoss.js +0 -63
- package/dist/idl_codegen/instructions/socializeLoss.js.map +0 -1
- package/dist/idl_codegen/instructions/socializeLossV2.d.ts +0 -23
- package/dist/idl_codegen/instructions/socializeLossV2.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/socializeLossV2.js +0 -95
- package/dist/idl_codegen/instructions/socializeLossV2.js.map +0 -1
- package/dist/idl_codegen/instructions/updateEntireReserveConfig.d.ts +0 -14
- package/dist/idl_codegen/instructions/updateEntireReserveConfig.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/updateEntireReserveConfig.js +0 -61
- package/dist/idl_codegen/instructions/updateEntireReserveConfig.js.map +0 -1
- package/dist/idl_codegen/instructions/updateGlobalConfig.d.ts +0 -13
- package/dist/idl_codegen/instructions/updateGlobalConfig.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/updateGlobalConfig.js +0 -61
- package/dist/idl_codegen/instructions/updateGlobalConfig.js.map +0 -1
- package/dist/idl_codegen/instructions/updateGlobalConfigAdmin.d.ts +0 -7
- package/dist/idl_codegen/instructions/updateGlobalConfigAdmin.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/updateGlobalConfigAdmin.js +0 -16
- package/dist/idl_codegen/instructions/updateGlobalConfigAdmin.js.map +0 -1
- package/dist/idl_codegen/instructions/updateLendingMarket.d.ts +0 -13
- package/dist/idl_codegen/instructions/updateLendingMarket.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/updateLendingMarket.js +0 -60
- package/dist/idl_codegen/instructions/updateLendingMarket.js.map +0 -1
- package/dist/idl_codegen/instructions/updateLendingMarketOwner.d.ts +0 -7
- package/dist/idl_codegen/instructions/updateLendingMarketOwner.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/updateLendingMarketOwner.js +0 -20
- package/dist/idl_codegen/instructions/updateLendingMarketOwner.js.map +0 -1
- package/dist/idl_codegen/instructions/updateReserveConfig.d.ts +0 -16
- package/dist/idl_codegen/instructions/updateReserveConfig.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/updateReserveConfig.js +0 -65
- package/dist/idl_codegen/instructions/updateReserveConfig.js.map +0 -1
- package/dist/idl_codegen/instructions/updateSingleReserveConfig.d.ts +0 -15
- package/dist/idl_codegen/instructions/updateSingleReserveConfig.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/updateSingleReserveConfig.js +0 -63
- package/dist/idl_codegen/instructions/updateSingleReserveConfig.js.map +0 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.d.ts +0 -19
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.js +0 -79
- package/dist/idl_codegen/instructions/withdrawObligationCollateral.js.map +0 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts +0 -24
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js +0 -108
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js.map +0 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts +0 -31
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.js +0 -135
- package/dist/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.js.map +0 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateralV2.d.ts +0 -26
- package/dist/idl_codegen/instructions/withdrawObligationCollateralV2.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/withdrawObligationCollateralV2.js +0 -110
- package/dist/idl_codegen/instructions/withdrawObligationCollateralV2.js.map +0 -1
- package/dist/idl_codegen/instructions/withdrawProtocolFee.d.ts +0 -18
- package/dist/idl_codegen/instructions/withdrawProtocolFee.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/withdrawProtocolFee.js +0 -70
- package/dist/idl_codegen/instructions/withdrawProtocolFee.js.map +0 -1
- package/dist/idl_codegen/instructions/withdrawReferrerFees.d.ts +0 -14
- package/dist/idl_codegen/instructions/withdrawReferrerFees.d.ts.map +0 -1
- package/dist/idl_codegen/instructions/withdrawReferrerFees.js +0 -39
- package/dist/idl_codegen/instructions/withdrawReferrerFees.js.map +0 -1
- package/dist/idl_codegen/programId.d.ts +0 -5
- package/dist/idl_codegen/programId.d.ts.map +0 -1
- package/dist/idl_codegen/programId.js +0 -13
- package/dist/idl_codegen/programId.js.map +0 -1
- package/dist/idl_codegen/types/AssetTier.d.ts.map +0 -1
- package/dist/idl_codegen/types/AssetTier.js.map +0 -1
- package/dist/idl_codegen/types/BigFractionBytes.d.ts +0 -28
- package/dist/idl_codegen/types/BigFractionBytes.d.ts.map +0 -1
- package/dist/idl_codegen/types/BigFractionBytes.js.map +0 -1
- package/dist/idl_codegen/types/BorrowRateCurve.d.ts +0 -28
- package/dist/idl_codegen/types/BorrowRateCurve.d.ts.map +0 -1
- package/dist/idl_codegen/types/BorrowRateCurve.js.map +0 -1
- package/dist/idl_codegen/types/CurvePoint.d.ts +0 -27
- package/dist/idl_codegen/types/CurvePoint.d.ts.map +0 -1
- package/dist/idl_codegen/types/CurvePoint.js.map +0 -1
- package/dist/idl_codegen/types/ElevationGroup.d.ts +0 -67
- package/dist/idl_codegen/types/ElevationGroup.d.ts.map +0 -1
- package/dist/idl_codegen/types/ElevationGroup.js +0 -136
- package/dist/idl_codegen/types/ElevationGroup.js.map +0 -1
- package/dist/idl_codegen/types/FeeCalculation.d.ts.map +0 -1
- package/dist/idl_codegen/types/FeeCalculation.js.map +0 -1
- package/dist/idl_codegen/types/InitObligationArgs.d.ts +0 -27
- package/dist/idl_codegen/types/InitObligationArgs.d.ts.map +0 -1
- package/dist/idl_codegen/types/InitObligationArgs.js.map +0 -1
- package/dist/idl_codegen/types/LastUpdate.d.ts +0 -48
- package/dist/idl_codegen/types/LastUpdate.d.ts.map +0 -1
- package/dist/idl_codegen/types/LastUpdate.js.map +0 -1
- package/dist/idl_codegen/types/ObligationCollateral.d.ts +0 -72
- package/dist/idl_codegen/types/ObligationCollateral.d.ts.map +0 -1
- package/dist/idl_codegen/types/ObligationCollateral.js +0 -118
- package/dist/idl_codegen/types/ObligationCollateral.js.map +0 -1
- package/dist/idl_codegen/types/ObligationLiquidity.d.ts +0 -84
- package/dist/idl_codegen/types/ObligationLiquidity.d.ts.map +0 -1
- package/dist/idl_codegen/types/ObligationLiquidity.js +0 -140
- package/dist/idl_codegen/types/ObligationLiquidity.js.map +0 -1
- package/dist/idl_codegen/types/ObligationOrder.d.ts +0 -284
- package/dist/idl_codegen/types/ObligationOrder.d.ts.map +0 -1
- package/dist/idl_codegen/types/ObligationOrder.js.map +0 -1
- package/dist/idl_codegen/types/PriceHeuristic.d.ts +0 -42
- package/dist/idl_codegen/types/PriceHeuristic.d.ts.map +0 -1
- package/dist/idl_codegen/types/PriceHeuristic.js.map +0 -1
- package/dist/idl_codegen/types/PythConfiguration.d.ts +0 -26
- package/dist/idl_codegen/types/PythConfiguration.d.ts.map +0 -1
- package/dist/idl_codegen/types/PythConfiguration.js +0 -74
- package/dist/idl_codegen/types/PythConfiguration.js.map +0 -1
- package/dist/idl_codegen/types/ReserveCollateral.d.ts +0 -54
- package/dist/idl_codegen/types/ReserveCollateral.d.ts.map +0 -1
- package/dist/idl_codegen/types/ReserveCollateral.js +0 -111
- package/dist/idl_codegen/types/ReserveCollateral.js.map +0 -1
- package/dist/idl_codegen/types/ReserveConfig.d.ts +0 -438
- package/dist/idl_codegen/types/ReserveConfig.d.ts.map +0 -1
- package/dist/idl_codegen/types/ReserveConfig.js.map +0 -1
- package/dist/idl_codegen/types/ReserveFarmKind.d.ts.map +0 -1
- package/dist/idl_codegen/types/ReserveFarmKind.js.map +0 -1
- package/dist/idl_codegen/types/ReserveFees.d.ts +0 -79
- package/dist/idl_codegen/types/ReserveFees.d.ts.map +0 -1
- package/dist/idl_codegen/types/ReserveFees.js.map +0 -1
- package/dist/idl_codegen/types/ReserveLiquidity.d.ts +0 -182
- package/dist/idl_codegen/types/ReserveLiquidity.d.ts.map +0 -1
- package/dist/idl_codegen/types/ReserveLiquidity.js +0 -224
- package/dist/idl_codegen/types/ReserveLiquidity.js.map +0 -1
- package/dist/idl_codegen/types/ReserveStatus.d.ts.map +0 -1
- package/dist/idl_codegen/types/ReserveStatus.js.map +0 -1
- package/dist/idl_codegen/types/ScopeConfiguration.d.ts +0 -42
- package/dist/idl_codegen/types/ScopeConfiguration.d.ts.map +0 -1
- package/dist/idl_codegen/types/ScopeConfiguration.js +0 -92
- package/dist/idl_codegen/types/ScopeConfiguration.js.map +0 -1
- package/dist/idl_codegen/types/SwitchboardConfiguration.d.ts +0 -31
- package/dist/idl_codegen/types/SwitchboardConfiguration.d.ts.map +0 -1
- package/dist/idl_codegen/types/SwitchboardConfiguration.js +0 -80
- package/dist/idl_codegen/types/SwitchboardConfiguration.js.map +0 -1
- package/dist/idl_codegen/types/TokenInfo.d.ts +0 -118
- package/dist/idl_codegen/types/TokenInfo.d.ts.map +0 -1
- package/dist/idl_codegen/types/TokenInfo.js.map +0 -1
- package/dist/idl_codegen/types/UpdateConfigMode.d.ts.map +0 -1
- package/dist/idl_codegen/types/UpdateConfigMode.js.map +0 -1
- package/dist/idl_codegen/types/UpdateGlobalConfigMode.d.ts.map +0 -1
- package/dist/idl_codegen/types/UpdateGlobalConfigMode.js.map +0 -1
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts +0 -198
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.d.ts.map +0 -1
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js +0 -354
- package/dist/idl_codegen/types/UpdateLendingMarketConfigValue.js.map +0 -1
- package/dist/idl_codegen/types/UpdateLendingMarketMode.d.ts.map +0 -1
- package/dist/idl_codegen/types/UpdateLendingMarketMode.js.map +0 -1
- package/dist/idl_codegen/types/WithdrawalCaps.d.ts +0 -39
- package/dist/idl_codegen/types/WithdrawalCaps.d.ts.map +0 -1
- package/dist/idl_codegen/types/WithdrawalCaps.js.map +0 -1
- package/dist/idl_codegen/types/index.d.ts.map +0 -1
- package/dist/idl_codegen/types/index.js.map +0 -1
- package/dist/idl_codegen/zero_padding/ObligationZP.d.ts +0 -76
- package/dist/idl_codegen/zero_padding/ObligationZP.d.ts.map +0 -1
- package/dist/idl_codegen/zero_padding/ObligationZP.js +0 -225
- package/dist/idl_codegen/zero_padding/ObligationZP.js.map +0 -1
- package/dist/idl_codegen/zero_padding/index.d.ts.map +0 -1
- package/dist/idl_codegen/zero_padding/index.js.map +0 -1
- package/dist/idl_codegen_jupiter_perps/accounts/Pool.d.ts +0 -48
- package/dist/idl_codegen_jupiter_perps/accounts/Pool.d.ts.map +0 -1
- package/dist/idl_codegen_jupiter_perps/accounts/Pool.js +0 -151
- package/dist/idl_codegen_jupiter_perps/accounts/Pool.js.map +0 -1
- package/dist/idl_codegen_jupiter_perps/accounts/index.d.ts +0 -3
- package/dist/idl_codegen_jupiter_perps/accounts/index.d.ts.map +0 -1
- package/dist/idl_codegen_jupiter_perps/accounts/index.js +0 -6
- package/dist/idl_codegen_jupiter_perps/accounts/index.js.map +0 -1
- package/dist/idl_codegen_jupiter_perps/programId.d.ts +0 -4
- package/dist/idl_codegen_jupiter_perps/programId.d.ts.map +0 -1
- package/dist/idl_codegen_jupiter_perps/programId.js +0 -9
- package/dist/idl_codegen_jupiter_perps/programId.js.map +0 -1
- package/dist/idl_codegen_jupiter_perps/types/Fees.d.ts +0 -63
- package/dist/idl_codegen_jupiter_perps/types/Fees.d.ts.map +0 -1
- package/dist/idl_codegen_jupiter_perps/types/Fees.js +0 -134
- package/dist/idl_codegen_jupiter_perps/types/Fees.js.map +0 -1
- package/dist/idl_codegen_jupiter_perps/types/Limit.d.ts +0 -33
- package/dist/idl_codegen_jupiter_perps/types/Limit.d.ts.map +0 -1
- package/dist/idl_codegen_jupiter_perps/types/Limit.js +0 -88
- package/dist/idl_codegen_jupiter_perps/types/Limit.js.map +0 -1
- package/dist/idl_codegen_jupiter_perps/types/PoolApr.d.ts +0 -33
- package/dist/idl_codegen_jupiter_perps/types/PoolApr.d.ts.map +0 -1
- package/dist/idl_codegen_jupiter_perps/types/PoolApr.js +0 -88
- package/dist/idl_codegen_jupiter_perps/types/PoolApr.js.map +0 -1
- package/dist/idl_codegen_jupiter_perps/types/index.d.ts +0 -7
- package/dist/idl_codegen_jupiter_perps/types/index.d.ts.map +0 -1
- package/dist/idl_codegen_jupiter_perps/types/index.js +0 -10
- package/dist/idl_codegen_jupiter_perps/types/index.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts +0 -90
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.js +0 -189
- package/dist/idl_codegen_kamino_vault/accounts/Reserve.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts +0 -126
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.js +0 -309
- package/dist/idl_codegen_kamino_vault/accounts/VaultState.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/accounts/index.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/accounts/index.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/errors/anchor.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/errors/anchor.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/errors/custom.d.ts +0 -387
- package/dist/idl_codegen_kamino_vault/errors/custom.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/errors/custom.js +0 -682
- package/dist/idl_codegen_kamino_vault/errors/custom.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/errors/index.d.ts +0 -6
- package/dist/idl_codegen_kamino_vault/errors/index.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/errors/index.js +0 -80
- package/dist/idl_codegen_kamino_vault/errors/index.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts +0 -23
- package/dist/idl_codegen_kamino_vault/instructions/deposit.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/deposit.js +0 -67
- package/dist/idl_codegen_kamino_vault/instructions/deposit.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.d.ts +0 -13
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.js +0 -57
- package/dist/idl_codegen_kamino_vault/instructions/giveUpPendingFees.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/index.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/index.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts +0 -16
- package/dist/idl_codegen_kamino_vault/instructions/initVault.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/initVault.js +0 -25
- package/dist/idl_codegen_kamino_vault/instructions/initVault.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/initializeSharesMetadata.d.ts +0 -19
- package/dist/idl_codegen_kamino_vault/instructions/initializeSharesMetadata.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/initializeSharesMetadata.js +0 -68
- package/dist/idl_codegen_kamino_vault/instructions/initializeSharesMetadata.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts +0 -22
- package/dist/idl_codegen_kamino_vault/instructions/invest.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/invest.js +0 -50
- package/dist/idl_codegen_kamino_vault/instructions/invest.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/removeAllocation.d.ts +0 -8
- package/dist/idl_codegen_kamino_vault/instructions/removeAllocation.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/removeAllocation.js +0 -17
- package/dist/idl_codegen_kamino_vault/instructions/removeAllocation.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.d.ts +0 -7
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.js +0 -16
- package/dist/idl_codegen_kamino_vault/instructions/updateAdmin.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts +0 -20
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js +0 -72
- package/dist/idl_codegen_kamino_vault/instructions/updateReserveAllocation.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateSharesMetadata.d.ts +0 -16
- package/dist/idl_codegen_kamino_vault/instructions/updateSharesMetadata.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateSharesMetadata.js +0 -65
- package/dist/idl_codegen_kamino_vault/instructions/updateSharesMetadata.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.d.ts +0 -14
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.js +0 -62
- package/dist/idl_codegen_kamino_vault/instructions/updateVaultConfig.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts +0 -38
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.js +0 -166
- package/dist/idl_codegen_kamino_vault/instructions/withdraw.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/withdrawFromAvailable.d.ts +0 -23
- package/dist/idl_codegen_kamino_vault/instructions/withdrawFromAvailable.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/withdrawFromAvailable.js +0 -67
- package/dist/idl_codegen_kamino_vault/instructions/withdrawFromAvailable.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.d.ts +0 -22
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.js +0 -50
- package/dist/idl_codegen_kamino_vault/instructions/withdrawPendingFees.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/programId.d.ts +0 -6
- package/dist/idl_codegen_kamino_vault/programId.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/programId.js +0 -15
- package/dist/idl_codegen_kamino_vault/programId.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts +0 -28
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/BigFractionBytes.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts +0 -28
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/BorrowRateCurve.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts +0 -27
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/CurvePoint.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts +0 -48
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/LastUpdate.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts +0 -42
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/PriceHeuristic.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts +0 -26
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js +0 -74
- package/dist/idl_codegen_kamino_vault/types/PythConfiguration.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts +0 -54
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js +0 -111
- package/dist/idl_codegen_kamino_vault/types/ReserveCollateral.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts +0 -438
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveConfig.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts +0 -79
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveFees.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts +0 -182
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js +0 -224
- package/dist/idl_codegen_kamino_vault/types/ReserveLiquidity.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts +0 -42
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js +0 -92
- package/dist/idl_codegen_kamino_vault/types/ScopeConfiguration.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts +0 -31
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js +0 -80
- package/dist/idl_codegen_kamino_vault/types/SwitchboardConfiguration.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts +0 -118
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/TokenInfo.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts +0 -72
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js +0 -143
- package/dist/idl_codegen_kamino_vault/types/VaultAllocation.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts +0 -162
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js +0 -348
- package/dist/idl_codegen_kamino_vault/types/VaultConfigField.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.d.ts +0 -39
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/WithdrawalCaps.js.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/index.d.ts +0 -35
- package/dist/idl_codegen_kamino_vault/types/index.d.ts.map +0 -1
- package/dist/idl_codegen_kamino_vault/types/index.js.map +0 -1
- package/dist/pyth/accounts/PriceUpdateV2.d.ts +0 -30
- package/dist/pyth/accounts/PriceUpdateV2.d.ts.map +0 -1
- package/dist/pyth/accounts/PriceUpdateV2.js +0 -114
- package/dist/pyth/accounts/PriceUpdateV2.js.map +0 -1
- package/dist/pyth/accounts/index.d.ts +0 -3
- package/dist/pyth/accounts/index.d.ts.map +0 -1
- package/dist/pyth/accounts/index.js +0 -6
- package/dist/pyth/accounts/index.js.map +0 -1
- package/dist/pyth/types/PriceFeedMessage.d.ts +0 -58
- package/dist/pyth/types/PriceFeedMessage.d.ts.map +0 -1
- package/dist/pyth/types/PriceFeedMessage.js +0 -128
- package/dist/pyth/types/PriceFeedMessage.js.map +0 -1
- package/dist/pyth/types/VerificationLevel.d.ts +0 -45
- package/dist/pyth/types/VerificationLevel.d.ts.map +0 -1
- package/dist/pyth/types/VerificationLevel.js +0 -115
- package/dist/pyth/types/VerificationLevel.js.map +0 -1
- package/dist/pyth/types/index.d.ts +0 -7
- package/dist/pyth/types/index.d.ts.map +0 -1
- package/dist/pyth/types/index.js +0 -41
- package/dist/pyth/types/index.js.map +0 -1
- package/dist/utils/sendTransactionsUtils.d.ts +0 -41
- package/dist/utils/sendTransactionsUtils.d.ts.map +0 -1
- package/dist/utils/sendTransactionsUtils.js +0 -154
- package/dist/utils/sendTransactionsUtils.js.map +0 -1
- package/src/client.ts +0 -523
- package/src/client_kamino_manager.ts +0 -1895
- package/src/idl_codegen/accounts/GlobalConfig.ts +0 -125
- package/src/idl_codegen/accounts/LendingMarket.ts +0 -506
- package/src/idl_codegen/accounts/Obligation.ts +0 -433
- package/src/idl_codegen/accounts/ReferrerState.ts +0 -97
- package/src/idl_codegen/accounts/ReferrerTokenState.ts +0 -145
- package/src/idl_codegen/accounts/Reserve.ts +0 -248
- package/src/idl_codegen/accounts/ShortUrl.ts +0 -97
- package/src/idl_codegen/accounts/UserMetadata.ts +0 -142
- package/src/idl_codegen/accounts/UserState.ts +0 -301
- package/src/idl_codegen/errors/index.ts +0 -62
- package/src/idl_codegen/instructions/borrowObligationLiquidity.ts +0 -82
- package/src/idl_codegen/instructions/borrowObligationLiquidityV2.ts +0 -124
- package/src/idl_codegen/instructions/deleteReferrerStateAndShortUrl.ts +0 -30
- package/src/idl_codegen/instructions/depositAndWithdraw.ts +0 -241
- package/src/idl_codegen/instructions/depositObligationCollateral.ts +0 -62
- package/src/idl_codegen/instructions/depositObligationCollateralV2.ts +0 -106
- package/src/idl_codegen/instructions/depositReserveLiquidity.ts +0 -90
- package/src/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateral.ts +0 -98
- package/src/idl_codegen/instructions/depositReserveLiquidityAndObligationCollateralV2.ts +0 -136
- package/src/idl_codegen/instructions/flashBorrowReserveLiquidity.ts +0 -82
- package/src/idl_codegen/instructions/flashRepayReserveLiquidity.ts +0 -83
- package/src/idl_codegen/instructions/idlMissingTypes.ts +0 -64
- package/src/idl_codegen/instructions/initFarmsForReserve.ts +0 -62
- package/src/idl_codegen/instructions/initGlobalConfig.ts +0 -30
- package/src/idl_codegen/instructions/initLendingMarket.ts +0 -50
- package/src/idl_codegen/instructions/initObligation.ts +0 -52
- package/src/idl_codegen/instructions/initObligationFarmsForReserve.ts +0 -60
- package/src/idl_codegen/instructions/initReferrerStateAndShortUrl.ts +0 -50
- package/src/idl_codegen/instructions/initReferrerTokenState.ts +0 -34
- package/src/idl_codegen/instructions/initReserve.ts +0 -80
- package/src/idl_codegen/instructions/initUserMetadata.ts +0 -50
- package/src/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateral.ts +0 -139
- package/src/idl_codegen/instructions/liquidateObligationAndRedeemReserveCollateralV2.ts +0 -195
- package/src/idl_codegen/instructions/markObligationForDeleveraging.ts +0 -40
- package/src/idl_codegen/instructions/redeemFees.ts +0 -50
- package/src/idl_codegen/instructions/redeemReserveCollateral.ts +0 -94
- package/src/idl_codegen/instructions/refreshObligation.ts +0 -24
- package/src/idl_codegen/instructions/refreshObligationFarmsForReserve.ts +0 -80
- package/src/idl_codegen/instructions/refreshReserve.ts +0 -40
- package/src/idl_codegen/instructions/refreshReservesBatch.ts +0 -29
- package/src/idl_codegen/instructions/repayAndWithdrawAndRedeem.ts +0 -207
- package/src/idl_codegen/instructions/repayAndWithdrawAndRedeemV2.ts +0 -239
- package/src/idl_codegen/instructions/repayObligationLiquidity.ts +0 -64
- package/src/idl_codegen/instructions/repayObligationLiquidityV2.ts +0 -108
- package/src/idl_codegen/instructions/requestElevationGroup.ts +0 -40
- package/src/idl_codegen/instructions/setObligationOrder.ts +0 -45
- package/src/idl_codegen/instructions/socializeLoss.ts +0 -48
- package/src/idl_codegen/instructions/socializeLossV2.ts +0 -88
- package/src/idl_codegen/instructions/updateEntireReserveConfig.ts +0 -45
- package/src/idl_codegen/instructions/updateGlobalConfig.ts +0 -47
- package/src/idl_codegen/instructions/updateGlobalConfigAdmin.ts +0 -24
- package/src/idl_codegen/instructions/updateLendingMarket.ts +0 -43
- package/src/idl_codegen/instructions/updateLendingMarketOwner.ts +0 -28
- package/src/idl_codegen/instructions/updateReserveConfig.ts +0 -54
- package/src/idl_codegen/instructions/updateSingleReserveConfig.ts +0 -48
- package/src/idl_codegen/instructions/withdrawObligationCollateral.ts +0 -68
- package/src/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.ts +0 -102
- package/src/idl_codegen/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.ts +0 -136
- package/src/idl_codegen/instructions/withdrawObligationCollateralV2.ts +0 -106
- package/src/idl_codegen/instructions/withdrawProtocolFee.ts +0 -58
- package/src/idl_codegen/instructions/withdrawReferrerFees.ts +0 -54
- package/src/idl_codegen/programId.ts +0 -13
- package/src/idl_codegen/types/AssetTier.ts +0 -118
- package/src/idl_codegen/types/BigFractionBytes.ts +0 -67
- package/src/idl_codegen/types/BorrowRateCurve.ts +0 -60
- package/src/idl_codegen/types/CurvePoint.ts +0 -64
- package/src/idl_codegen/types/ElevationGroup.ts +0 -133
- package/src/idl_codegen/types/FeeCalculation.ts +0 -90
- package/src/idl_codegen/types/InitObligationArgs.ts +0 -61
- package/src/idl_codegen/types/LastUpdate.ts +0 -95
- package/src/idl_codegen/types/ObligationCollateral.ts +0 -128
- package/src/idl_codegen/types/ObligationLiquidity.ts +0 -159
- package/src/idl_codegen/types/ObligationOrder.ts +0 -347
- package/src/idl_codegen/types/PriceHeuristic.ts +0 -81
- package/src/idl_codegen/types/PythConfiguration.ts +0 -56
- package/src/idl_codegen/types/ReserveCollateral.ts +0 -104
- package/src/idl_codegen/types/ReserveConfig.ts +0 -556
- package/src/idl_codegen/types/ReserveFarmKind.ts +0 -90
- package/src/idl_codegen/types/ReserveFees.ts +0 -122
- package/src/idl_codegen/types/ReserveLiquidity.ts +0 -287
- package/src/idl_codegen/types/ReserveStatus.ts +0 -120
- package/src/idl_codegen/types/ScopeConfiguration.ts +0 -85
- package/src/idl_codegen/types/SwitchboardConfiguration.ts +0 -67
- package/src/idl_codegen/types/TokenInfo.ts +0 -190
- package/src/idl_codegen/types/UpdateConfigMode.ts +0 -1530
- package/src/idl_codegen/types/UpdateGlobalConfigMode.ts +0 -90
- package/src/idl_codegen/types/UpdateLendingMarketConfigValue.ts +0 -419
- package/src/idl_codegen/types/UpdateLendingMarketMode.ts +0 -780
- package/src/idl_codegen/types/WithdrawalCaps.ts +0 -86
- package/src/idl_codegen/zero_padding/ObligationZP.ts +0 -229
- package/src/idl_codegen_jupiter_perps/accounts/Pool.ts +0 -155
- package/src/idl_codegen_jupiter_perps/accounts/index.ts +0 -2
- package/src/idl_codegen_jupiter_perps/programId.ts +0 -7
- package/src/idl_codegen_jupiter_perps/types/Fees.ts +0 -130
- package/src/idl_codegen_jupiter_perps/types/Limit.ts +0 -72
- package/src/idl_codegen_jupiter_perps/types/PoolApr.ts +0 -69
- package/src/idl_codegen_jupiter_perps/types/index.ts +0 -6
- package/src/idl_codegen_kamino_vault/accounts/Reserve.ts +0 -248
- package/src/idl_codegen_kamino_vault/accounts/VaultState.ts +0 -379
- package/src/idl_codegen_kamino_vault/errors/custom.ts +0 -683
- package/src/idl_codegen_kamino_vault/errors/index.ts +0 -62
- package/src/idl_codegen_kamino_vault/instructions/deposit.ts +0 -60
- package/src/idl_codegen_kamino_vault/instructions/giveUpPendingFees.ts +0 -40
- package/src/idl_codegen_kamino_vault/instructions/initVault.ts +0 -42
- package/src/idl_codegen_kamino_vault/instructions/initializeSharesMetadata.ts +0 -58
- package/src/idl_codegen_kamino_vault/instructions/invest.ts +0 -73
- package/src/idl_codegen_kamino_vault/instructions/removeAllocation.ts +0 -26
- package/src/idl_codegen_kamino_vault/instructions/updateAdmin.ts +0 -24
- package/src/idl_codegen_kamino_vault/instructions/updateReserveAllocation.ts +0 -62
- package/src/idl_codegen_kamino_vault/instructions/updateSharesMetadata.ts +0 -52
- package/src/idl_codegen_kamino_vault/instructions/updateVaultConfig.ts +0 -49
- package/src/idl_codegen_kamino_vault/instructions/withdraw.ts +0 -175
- package/src/idl_codegen_kamino_vault/instructions/withdrawFromAvailable.ts +0 -60
- package/src/idl_codegen_kamino_vault/instructions/withdrawPendingFees.ts +0 -73
- package/src/idl_codegen_kamino_vault/programId.ts +0 -14
- package/src/idl_codegen_kamino_vault/types/BigFractionBytes.ts +0 -67
- package/src/idl_codegen_kamino_vault/types/BorrowRateCurve.ts +0 -60
- package/src/idl_codegen_kamino_vault/types/CurvePoint.ts +0 -64
- package/src/idl_codegen_kamino_vault/types/LastUpdate.ts +0 -95
- package/src/idl_codegen_kamino_vault/types/PriceHeuristic.ts +0 -81
- package/src/idl_codegen_kamino_vault/types/PythConfiguration.ts +0 -56
- package/src/idl_codegen_kamino_vault/types/ReserveCollateral.ts +0 -104
- package/src/idl_codegen_kamino_vault/types/ReserveConfig.ts +0 -556
- package/src/idl_codegen_kamino_vault/types/ReserveFees.ts +0 -122
- package/src/idl_codegen_kamino_vault/types/ReserveLiquidity.ts +0 -287
- package/src/idl_codegen_kamino_vault/types/ScopeConfiguration.ts +0 -85
- package/src/idl_codegen_kamino_vault/types/SwitchboardConfiguration.ts +0 -67
- package/src/idl_codegen_kamino_vault/types/TokenInfo.ts +0 -190
- package/src/idl_codegen_kamino_vault/types/VaultAllocation.ts +0 -142
- package/src/idl_codegen_kamino_vault/types/VaultConfigField.ts +0 -390
- package/src/idl_codegen_kamino_vault/types/WithdrawalCaps.ts +0 -86
- package/src/idl_codegen_kamino_vault/types/index.ts +0 -85
- package/src/idl_kamino_vault.json +0 -2337
- package/src/pyth/accounts/PriceUpdateV2.ts +0 -110
- package/src/pyth/accounts/index.ts +0 -2
- package/src/pyth/types/PriceFeedMessage.ts +0 -120
- package/src/pyth/types/VerificationLevel.ts +0 -98
- package/src/pyth/types/index.ts +0 -9
- package/src/utils/sendTransactionsUtils.ts +0 -207
- /package/dist/{idl_codegen → @codegen/jupiter_perps}/errors/anchor.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/jupiter_perps}/errors/anchor.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/accounts/index.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/accounts/index.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/klend}/errors/anchor.d.ts +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/klend}/errors/anchor.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/errors/custom.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/errors/custom.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/instructions/index.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/instructions/index.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/AssetTier.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/AssetTier.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/BigFractionBytes.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/BorrowRateCurve.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/CurvePoint.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/FeeCalculation.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/FeeCalculation.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/InitObligationArgs.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/LastUpdate.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/ObligationOrder.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/PriceHeuristic.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/ReserveConfig.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/ReserveFarmKind.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/ReserveFarmKind.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/ReserveFees.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/ReserveStatus.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/ReserveStatus.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/TokenInfo.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/UpdateConfigMode.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/UpdateConfigMode.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/UpdateGlobalConfigMode.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/UpdateGlobalConfigMode.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/UpdateLendingMarketMode.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/UpdateLendingMarketMode.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/WithdrawalCaps.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/index.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/types/index.js +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/zero_padding/index.d.ts +0 -0
- /package/dist/{idl_codegen → @codegen/klend}/zero_padding/index.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/accounts/index.d.ts +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/accounts/index.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/instructions/index.d.ts +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/instructions/index.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/types/BigFractionBytes.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/types/BorrowRateCurve.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/types/CurvePoint.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/types/LastUpdate.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/types/PriceHeuristic.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/types/ReserveConfig.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/types/ReserveFees.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/types/TokenInfo.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/types/WithdrawalCaps.js +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/types/index.js +0 -0
- /package/dist/{idl.json → idl/klend.json} +0 -0
- /package/src/{idl_codegen → @codegen/jupiter_perps}/errors/anchor.ts +0 -0
- /package/src/{idl_codegen → @codegen/klend}/accounts/index.ts +0 -0
- /package/src/{idl_codegen_kamino_vault → @codegen/klend}/errors/anchor.ts +0 -0
- /package/src/{idl_codegen → @codegen/klend}/errors/custom.ts +0 -0
- /package/src/{idl_codegen → @codegen/klend}/instructions/index.ts +0 -0
- /package/src/{idl_codegen → @codegen/klend}/types/index.ts +0 -0
- /package/src/{idl_codegen → @codegen/klend}/zero_padding/index.ts +0 -0
- /package/src/{idl_codegen_kamino_vault → @codegen/kvault}/accounts/index.ts +0 -0
- /package/src/{idl_codegen_kamino_vault → @codegen/kvault}/instructions/index.ts +0 -0
- /package/src/{jupiter_perps_idl.json → idl/jupiter_perps.json} +0 -0
- /package/src/{idl.json → idl/klend.json} +0 -0
package/dist/classes/action.js
CHANGED
|
@@ -4,18 +4,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.KaminoAction = void 0;
|
|
7
|
-
const
|
|
8
|
-
const spl_token_1 = require("@solana/spl-token");
|
|
7
|
+
const kit_1 = require("@solana/kit");
|
|
9
8
|
const bn_js_1 = __importDefault(require("bn.js"));
|
|
10
9
|
const decimal_js_1 = __importDefault(require("decimal.js"));
|
|
11
|
-
const instructions_1 = require("
|
|
10
|
+
const instructions_1 = require("../@codegen/klend/instructions");
|
|
12
11
|
const utils_1 = require("../utils");
|
|
13
12
|
const market_1 = require("./market");
|
|
14
13
|
const obligation_1 = require("./obligation");
|
|
15
|
-
const types_1 = require("
|
|
16
|
-
const
|
|
14
|
+
const types_1 = require("../@codegen/klend/types");
|
|
15
|
+
const programId_1 = require("@kamino-finance/farms-sdk/dist/@codegen/farms/programId");
|
|
17
16
|
const ObligationType_1 = require("../utils/ObligationType");
|
|
18
|
-
const
|
|
17
|
+
const token_1 = require("@solana-program/token");
|
|
18
|
+
const sysvars_1 = require("@solana/sysvars");
|
|
19
|
+
const token_2022_1 = require("@solana-program/token-2022");
|
|
20
|
+
const system_1 = require("@solana-program/system");
|
|
21
|
+
const signer_1 = require("../utils/signer");
|
|
19
22
|
class KaminoAction {
|
|
20
23
|
kaminoMarket;
|
|
21
24
|
reserve;
|
|
@@ -49,7 +52,7 @@ class KaminoAction {
|
|
|
49
52
|
borrowReserves;
|
|
50
53
|
preLoadedDepositReservesSameTx;
|
|
51
54
|
currentSlot;
|
|
52
|
-
constructor(kaminoMarket, owner, obligation, mint, positions, amount, depositReserves, borrowReserves, reserveState, currentSlot, secondaryMint, outflowReserveState, outflowAmount, referrer, payer) {
|
|
55
|
+
constructor(kaminoMarket, owner, obligation, mint, positions, amount, depositReserves, borrowReserves, reserveState, currentSlot, secondaryMint, outflowReserveState, outflowAmount, referrer = (0, kit_1.none)(), payer) {
|
|
53
56
|
this.kaminoMarket = kaminoMarket;
|
|
54
57
|
this.obligation = obligation;
|
|
55
58
|
this.owner = owner;
|
|
@@ -76,21 +79,23 @@ class KaminoAction {
|
|
|
76
79
|
this.outflowReserve = outflowReserveState;
|
|
77
80
|
this.outflowAmount = outflowAmount ? new bn_js_1.default(outflowAmount) : undefined;
|
|
78
81
|
this.preLoadedDepositReservesSameTx = [];
|
|
79
|
-
this.referrer = referrer
|
|
82
|
+
this.referrer = referrer;
|
|
80
83
|
this.currentSlot = currentSlot;
|
|
81
84
|
}
|
|
82
|
-
static async initialize(action, amount, mint, owner, kaminoMarket, obligation, referrer =
|
|
85
|
+
static async initialize(action, amount, mint, owner, kaminoMarket, obligation, referrer = (0, kit_1.none)(), currentSlot = 0n, payer = owner) {
|
|
83
86
|
const reserve = kaminoMarket.getReserveByMint(mint);
|
|
84
87
|
if (reserve === undefined) {
|
|
85
|
-
throw new Error(`Reserve ${mint} not found in market ${kaminoMarket.getAddress()
|
|
88
|
+
throw new Error(`Reserve ${mint} not found in market ${kaminoMarket.getAddress()}`);
|
|
86
89
|
}
|
|
87
|
-
const { kaminoObligation, depositReserves, borrowReserves, distinctReserveCount } = await KaminoAction.loadObligation(action, kaminoMarket, owner, reserve.address, obligation);
|
|
88
|
-
const referrerKey = await this.getReferrerKey(kaminoMarket, owner, kaminoObligation, referrer);
|
|
90
|
+
const { kaminoObligation, depositReserves, borrowReserves, distinctReserveCount } = await KaminoAction.loadObligation(action, kaminoMarket, owner.address, reserve.address, obligation);
|
|
91
|
+
const referrerKey = await this.getReferrerKey(kaminoMarket, owner.address, kaminoObligation, referrer);
|
|
89
92
|
return new KaminoAction(kaminoMarket, owner, kaminoObligation || obligation, mint, distinctReserveCount, amount, depositReserves, borrowReserves, reserve, currentSlot, undefined, undefined, undefined, referrerKey, payer);
|
|
90
93
|
}
|
|
91
|
-
static getUserAccountAddresses(owner, reserve) {
|
|
92
|
-
const userTokenAccountAddress =
|
|
93
|
-
|
|
94
|
+
static async getUserAccountAddresses(owner, reserve) {
|
|
95
|
+
const [userTokenAccountAddress, userCollateralAccountAddress] = await Promise.all([
|
|
96
|
+
(0, utils_1.getAssociatedTokenAddress)(reserve.liquidity.mintPubkey, owner, reserve.liquidity.tokenProgram, token_1.ASSOCIATED_TOKEN_PROGRAM_ADDRESS),
|
|
97
|
+
(0, utils_1.getAssociatedTokenAddress)(reserve.collateral.mintPubkey, owner, token_1.TOKEN_PROGRAM_ADDRESS, token_1.ASSOCIATED_TOKEN_PROGRAM_ADDRESS),
|
|
98
|
+
]);
|
|
94
99
|
return { userTokenAccountAddress, userCollateralAccountAddress };
|
|
95
100
|
}
|
|
96
101
|
static async loadObligation(action, kaminoMarket, owner, reserve, obligation, outflowReserve) {
|
|
@@ -101,7 +106,7 @@ class KaminoAction {
|
|
|
101
106
|
kaminoObligation = obligation;
|
|
102
107
|
}
|
|
103
108
|
else {
|
|
104
|
-
const obligationAddress = obligation.toPda(kaminoMarket.getAddress(), owner);
|
|
109
|
+
const obligationAddress = await obligation.toPda(kaminoMarket.getAddress(), owner);
|
|
105
110
|
kaminoObligation = await obligation_1.KaminoObligation.load(kaminoMarket, obligationAddress);
|
|
106
111
|
}
|
|
107
112
|
if (kaminoObligation !== null) {
|
|
@@ -112,16 +117,16 @@ class KaminoAction {
|
|
|
112
117
|
throw new Error(`Outflow reserve has not been set for depositAndBorrow`);
|
|
113
118
|
}
|
|
114
119
|
// Union of addresses
|
|
115
|
-
const distinctReserveCount = new
|
|
120
|
+
const distinctReserveCount = new Set([
|
|
116
121
|
...borrowReserves.map((e) => e),
|
|
117
122
|
...(action === 'borrow' ? [reserve] : []),
|
|
118
123
|
...(action === 'depositAndBorrow' ? [reserve] : []),
|
|
119
|
-
]).
|
|
120
|
-
new
|
|
124
|
+
]).size +
|
|
125
|
+
new Set([
|
|
121
126
|
...depositReserves.map((e) => e),
|
|
122
127
|
...(action === 'deposit' ? [reserve] : []),
|
|
123
128
|
...(action === 'depositAndBorrow' ? [outflowReserve] : []),
|
|
124
|
-
]).
|
|
129
|
+
]).size;
|
|
125
130
|
return {
|
|
126
131
|
kaminoObligation,
|
|
127
132
|
depositReserves,
|
|
@@ -130,33 +135,34 @@ class KaminoAction {
|
|
|
130
135
|
};
|
|
131
136
|
}
|
|
132
137
|
static async buildRefreshObligationTxns(kaminoMarket, payer, obligation, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
133
|
-
currentSlot =
|
|
138
|
+
currentSlot = 0n) {
|
|
134
139
|
// placeholder for action initialization
|
|
135
140
|
const firstReserve = obligation.getDeposits()[0].reserveAddress;
|
|
136
141
|
const firstKaminoReserve = kaminoMarket.getReserveByAddress(firstReserve);
|
|
137
142
|
if (!firstKaminoReserve) {
|
|
138
|
-
throw new Error(`Reserve ${firstReserve
|
|
143
|
+
throw new Error(`Reserve ${firstReserve} not found`);
|
|
139
144
|
}
|
|
140
|
-
const axn = await KaminoAction.initialize('refreshObligation', '0', firstKaminoReserve?.getLiquidityMint(), obligation.state.owner,
|
|
145
|
+
const axn = await KaminoAction.initialize('refreshObligation', '0', firstKaminoReserve?.getLiquidityMint(), (0, signer_1.noopSigner)(obligation.state.owner), // owner does not need to sign for refresh
|
|
146
|
+
kaminoMarket, obligation, undefined, currentSlot);
|
|
141
147
|
if (extraComputeBudget > 0) {
|
|
142
148
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
143
149
|
}
|
|
144
|
-
axn.addRefreshObligation(payer);
|
|
150
|
+
await axn.addRefreshObligation(payer);
|
|
145
151
|
return axn;
|
|
146
152
|
}
|
|
147
|
-
static async buildRequestElevationGroupTxns(kaminoMarket,
|
|
148
|
-
currentSlot =
|
|
149
|
-
const firstReserve = obligation.state.deposits.find((x) =>
|
|
153
|
+
static async buildRequestElevationGroupTxns(kaminoMarket, owner, obligation, elevationGroup, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
154
|
+
currentSlot = 0n) {
|
|
155
|
+
const firstReserve = obligation.state.deposits.find((x) => x.depositReserve !== utils_1.DEFAULT_PUBLIC_KEY).depositReserve;
|
|
150
156
|
const firstKaminoReserve = kaminoMarket.getReserveByAddress(firstReserve);
|
|
151
157
|
if (!firstKaminoReserve) {
|
|
152
|
-
throw new Error(`Reserve ${firstReserve
|
|
158
|
+
throw new Error(`Reserve ${firstReserve} not found`);
|
|
153
159
|
}
|
|
154
|
-
const axn = await KaminoAction.initialize('requestElevationGroup', '0', firstKaminoReserve?.getLiquidityMint(),
|
|
160
|
+
const axn = await KaminoAction.initialize('requestElevationGroup', '0', firstKaminoReserve?.getLiquidityMint(), owner, kaminoMarket, obligation, undefined, currentSlot);
|
|
155
161
|
if (extraComputeBudget > 0) {
|
|
156
162
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
157
163
|
}
|
|
158
|
-
axn.addRefreshObligation(
|
|
159
|
-
axn.addRequestElevationIx(elevationGroup, 'setup');
|
|
164
|
+
await axn.addRefreshObligation(owner);
|
|
165
|
+
await axn.addRequestElevationIx(elevationGroup, 'setup');
|
|
160
166
|
return axn;
|
|
161
167
|
}
|
|
162
168
|
static async buildDepositTxns(kaminoMarket, amount, mint, owner, obligation, useV2Ixs, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
@@ -165,7 +171,7 @@ class KaminoAction {
|
|
|
165
171
|
initUserMetadata = {
|
|
166
172
|
skipInitialization: false,
|
|
167
173
|
skipLutCreation: false,
|
|
168
|
-
}, referrer =
|
|
174
|
+
}, referrer = (0, kit_1.none)(), currentSlot = 0n, overrideElevationGroupRequest = undefined // if set, when an elevationgroup request is made, it will use this value
|
|
169
175
|
) {
|
|
170
176
|
const axn = await KaminoAction.initialize('deposit', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot);
|
|
171
177
|
const addInitObligationForFarm = true;
|
|
@@ -174,18 +180,18 @@ class KaminoAction {
|
|
|
174
180
|
}
|
|
175
181
|
await axn.addSupportIxs('deposit', includeAtaIxs, requestElevationGroup, addInitObligationForFarm, useV2Ixs, scopeRefreshConfig, initUserMetadata, undefined, overrideElevationGroupRequest);
|
|
176
182
|
if (useV2Ixs) {
|
|
177
|
-
axn.addDepositIxV2();
|
|
183
|
+
await axn.addDepositIxV2();
|
|
178
184
|
}
|
|
179
185
|
else {
|
|
180
|
-
axn.addDepositIx();
|
|
186
|
+
await axn.addDepositIx();
|
|
181
187
|
}
|
|
182
188
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
183
189
|
return axn;
|
|
184
190
|
}
|
|
185
|
-
async addScopeRefreshIxs(scope, tokens,
|
|
191
|
+
async addScopeRefreshIxs(scope, tokens, scopeConfig) {
|
|
186
192
|
this.setupIxsLabels.unshift(`refreshScopePrices`);
|
|
187
193
|
this.setupIxs.unshift(await scope.refreshPriceListIx({
|
|
188
|
-
|
|
194
|
+
config: scopeConfig,
|
|
189
195
|
}, tokens));
|
|
190
196
|
}
|
|
191
197
|
static async buildBorrowTxns(kaminoMarket, amount, mint, owner, obligation, useV2Ixs, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
@@ -193,53 +199,53 @@ class KaminoAction {
|
|
|
193
199
|
requestElevationGroup = false, initUserMetadata = {
|
|
194
200
|
skipInitialization: false,
|
|
195
201
|
skipLutCreation: false,
|
|
196
|
-
}, referrer =
|
|
202
|
+
}, referrer = (0, kit_1.none)(), currentSlot = 0n, overrideElevationGroupRequest = undefined // if set, when an elevationgroup request is made, it will use this value
|
|
197
203
|
) {
|
|
198
204
|
const axn = await KaminoAction.initialize('borrow', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot);
|
|
199
205
|
const addInitObligationForFarm = true;
|
|
200
206
|
if (extraComputeBudget > 0) {
|
|
201
207
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
202
208
|
}
|
|
203
|
-
if (
|
|
204
|
-
const referrerTokenState = (0, utils_1.referrerTokenStatePda)(axn.referrer, axn.reserve.address, axn.kaminoMarket.programId)
|
|
205
|
-
const account = await
|
|
206
|
-
if (!account) {
|
|
209
|
+
if ((0, kit_1.isSome)(axn.referrer)) {
|
|
210
|
+
const referrerTokenState = await (0, utils_1.referrerTokenStatePda)(axn.referrer.value, axn.reserve.address, axn.kaminoMarket.programId);
|
|
211
|
+
const account = await (0, kit_1.fetchEncodedAccount)(kaminoMarket.getRpc(), referrerTokenState);
|
|
212
|
+
if (!account.exists) {
|
|
207
213
|
axn.addInitReferrerTokenStateIx(axn.reserve, referrerTokenState);
|
|
208
214
|
}
|
|
209
215
|
}
|
|
210
216
|
await axn.addSupportIxs('borrow', includeAtaIxs, requestElevationGroup, addInitObligationForFarm, useV2Ixs, scopeRefreshConfig, initUserMetadata, undefined, overrideElevationGroupRequest);
|
|
211
217
|
if (useV2Ixs) {
|
|
212
|
-
axn.addBorrowIxV2();
|
|
218
|
+
await axn.addBorrowIxV2();
|
|
213
219
|
}
|
|
214
220
|
else {
|
|
215
|
-
axn.addBorrowIx();
|
|
221
|
+
await axn.addBorrowIx();
|
|
216
222
|
}
|
|
217
223
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
218
224
|
return axn;
|
|
219
225
|
}
|
|
220
226
|
static async buildDepositReserveLiquidityTxns(kaminoMarket, amount, mint, owner, obligation, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
221
227
|
includeAtaIxs = true, // if true it includes create and close wsol and token atas
|
|
222
|
-
requestElevationGroup = false, referrer =
|
|
228
|
+
requestElevationGroup = false, referrer = (0, kit_1.none)(), currentSlot = 0n) {
|
|
223
229
|
const axn = await KaminoAction.initialize('mint', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot);
|
|
224
230
|
const addInitObligationForFarm = true;
|
|
225
231
|
if (extraComputeBudget > 0) {
|
|
226
232
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
227
233
|
}
|
|
228
234
|
await axn.addSupportIxs('mint', includeAtaIxs, requestElevationGroup, false, addInitObligationForFarm, scopeRefreshConfig, { skipInitialization: true, skipLutCreation: true });
|
|
229
|
-
axn.addDepositReserveLiquidityIx();
|
|
235
|
+
await axn.addDepositReserveLiquidityIx();
|
|
230
236
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
231
237
|
return axn;
|
|
232
238
|
}
|
|
233
239
|
static async buildRedeemReserveCollateralTxns(kaminoMarket, amount, mint, owner, obligation, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
234
240
|
includeAtaIxs = true, // if true it includes create and close wsol and token atas
|
|
235
|
-
requestElevationGroup = false, referrer =
|
|
241
|
+
requestElevationGroup = false, referrer = (0, kit_1.none)(), currentSlot = 0n) {
|
|
236
242
|
const axn = await KaminoAction.initialize('redeem', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot);
|
|
237
243
|
const addInitObligationForFarm = true;
|
|
238
244
|
if (extraComputeBudget > 0) {
|
|
239
245
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
240
246
|
}
|
|
241
247
|
await axn.addSupportIxs('redeem', includeAtaIxs, requestElevationGroup, false, addInitObligationForFarm, scopeRefreshConfig, { skipInitialization: true, skipLutCreation: true });
|
|
242
|
-
axn.addRedeemReserveCollateralIx();
|
|
248
|
+
await axn.addRedeemReserveCollateralIx();
|
|
243
249
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
244
250
|
return axn;
|
|
245
251
|
}
|
|
@@ -248,7 +254,7 @@ class KaminoAction {
|
|
|
248
254
|
requestElevationGroup = false, initUserMetadata = {
|
|
249
255
|
skipInitialization: false,
|
|
250
256
|
skipLutCreation: false,
|
|
251
|
-
}, referrer =
|
|
257
|
+
}, referrer = (0, kit_1.none)(), currentSlot = 0n) {
|
|
252
258
|
const axn = await KaminoAction.initialize('depositCollateral', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot);
|
|
253
259
|
const addInitObligationForFarm = true;
|
|
254
260
|
if (extraComputeBudget > 0) {
|
|
@@ -256,31 +262,31 @@ class KaminoAction {
|
|
|
256
262
|
}
|
|
257
263
|
await axn.addSupportIxs('depositCollateral', includeAtaIxs, requestElevationGroup, addInitObligationForFarm, useV2Ixs, scopeRefreshConfig, initUserMetadata);
|
|
258
264
|
if (useV2Ixs) {
|
|
259
|
-
axn.addDepositObligationCollateralIxV2();
|
|
265
|
+
await axn.addDepositObligationCollateralIxV2();
|
|
260
266
|
}
|
|
261
267
|
else {
|
|
262
|
-
axn.addDepositObligationCollateralIx();
|
|
268
|
+
await axn.addDepositObligationCollateralIx();
|
|
263
269
|
}
|
|
264
270
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
265
271
|
return axn;
|
|
266
272
|
}
|
|
267
|
-
static async buildDepositAndBorrowTxns(kaminoMarket, depositAmount, depositMint, borrowAmount, borrowMint,
|
|
273
|
+
static async buildDepositAndBorrowTxns(kaminoMarket, depositAmount, depositMint, borrowAmount, borrowMint, owner, obligation, useV2Ixs, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
268
274
|
includeAtaIxs = true, // if true it includes create and close wsol and token atas,
|
|
269
275
|
requestElevationGroup = false, initUserMetadata = {
|
|
270
276
|
skipInitialization: false,
|
|
271
277
|
skipLutCreation: false,
|
|
272
|
-
}, referrer =
|
|
273
|
-
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'depositAndBorrow', depositAmount, depositMint, borrowMint,
|
|
278
|
+
}, referrer = (0, kit_1.none)(), currentSlot = 0n) {
|
|
279
|
+
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'depositAndBorrow', depositAmount, depositMint, borrowMint, owner, owner.address, obligation, borrowAmount, referrer, currentSlot);
|
|
274
280
|
const addInitObligationForFarmForDeposit = true;
|
|
275
281
|
const addInitObligationForFarmForBorrow = false;
|
|
276
282
|
const twoTokenAction = true;
|
|
277
283
|
if (extraComputeBudget > 0) {
|
|
278
284
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
279
285
|
}
|
|
280
|
-
if (
|
|
281
|
-
const referrerTokenState = (0, utils_1.referrerTokenStatePda)(axn.referrer, axn.outflowReserve.address, axn.kaminoMarket.programId)
|
|
282
|
-
const account = await axn.kaminoMarket.
|
|
283
|
-
if (!account) {
|
|
286
|
+
if ((0, kit_1.isSome)(axn.referrer)) {
|
|
287
|
+
const referrerTokenState = await (0, utils_1.referrerTokenStatePda)(axn.referrer.value, axn.outflowReserve.address, axn.kaminoMarket.programId);
|
|
288
|
+
const account = await (0, kit_1.fetchEncodedAccount)(axn.kaminoMarket.getRpc(), referrerTokenState);
|
|
289
|
+
if (!account.exists) {
|
|
284
290
|
axn.addInitReferrerTokenStateIx(axn.outflowReserve, referrerTokenState);
|
|
285
291
|
}
|
|
286
292
|
}
|
|
@@ -293,27 +299,34 @@ class KaminoAction {
|
|
|
293
299
|
}
|
|
294
300
|
await axn.addInBetweenIxs('depositAndBorrow', includeAtaIxs, requestElevationGroup, addInitObligationForFarmForBorrow, useV2Ixs);
|
|
295
301
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
296
|
-
// Create the scope refresh ix in here to ensure it's the first ix in the
|
|
297
|
-
const allReserves =
|
|
298
|
-
...
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
302
|
+
// Create the scope refresh ix in here to ensure it's the first ix in the tx
|
|
303
|
+
const allReserves = [
|
|
304
|
+
...new Set([
|
|
305
|
+
...axn.depositReserves,
|
|
306
|
+
...axn.borrowReserves,
|
|
307
|
+
axn.reserve.address,
|
|
308
|
+
...(axn.outflowReserve ? [axn.outflowReserve.address] : []),
|
|
309
|
+
...(axn.preLoadedDepositReservesSameTx ? axn.preLoadedDepositReservesSameTx : []),
|
|
310
|
+
]),
|
|
311
|
+
];
|
|
312
|
+
const scopeTokensMap = (0, market_1.getTokenIdsForScopeRefresh)(axn.kaminoMarket, allReserves);
|
|
313
|
+
if (scopeTokensMap.size > 0 && scopeRefreshConfig) {
|
|
314
|
+
for (const [configPubkey, config] of scopeRefreshConfig.scopeConfigurations) {
|
|
315
|
+
const tokenIds = scopeTokensMap.get(config.oraclePrices);
|
|
316
|
+
if (tokenIds && tokenIds.length > 0) {
|
|
317
|
+
await axn.addScopeRefreshIxs(scopeRefreshConfig.scope, tokenIds, configPubkey);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
307
320
|
}
|
|
308
321
|
return axn;
|
|
309
322
|
}
|
|
310
|
-
static async buildDepositAndWithdrawV2Txns(kaminoMarket, depositAmount, depositMint, withdrawAmount, withdrawMint,
|
|
323
|
+
static async buildDepositAndWithdrawV2Txns(kaminoMarket, depositAmount, depositMint, withdrawAmount, withdrawMint, owner, currentSlot, obligation, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
311
324
|
includeAtaIxs = true, // if true it includes create and close wsol and token atas,
|
|
312
325
|
requestElevationGroup = false, initUserMetadata = {
|
|
313
326
|
skipInitialization: false,
|
|
314
327
|
skipLutCreation: false,
|
|
315
|
-
}, referrer =
|
|
316
|
-
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'depositAndWithdraw', depositAmount, depositMint, withdrawMint,
|
|
328
|
+
}, referrer = (0, kit_1.none)()) {
|
|
329
|
+
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'depositAndWithdraw', depositAmount, depositMint, withdrawMint, owner, owner.address, obligation, withdrawAmount, referrer, currentSlot);
|
|
317
330
|
const addInitObligationForFarm = true;
|
|
318
331
|
const twoTokenAction = true;
|
|
319
332
|
if (extraComputeBudget > 0) {
|
|
@@ -321,7 +334,7 @@ class KaminoAction {
|
|
|
321
334
|
}
|
|
322
335
|
await axn.addSupportIxs('depositAndWithdraw', includeAtaIxs, requestElevationGroup, addInitObligationForFarm, true, scopeRefreshConfig, initUserMetadata, twoTokenAction);
|
|
323
336
|
const withdrawCollateralAmount = axn.getWithdrawCollateralAmount(axn.outflowReserve, axn.outflowAmount);
|
|
324
|
-
axn.addDepositAndWithdrawV2Ixs(withdrawCollateralAmount);
|
|
337
|
+
await axn.addDepositAndWithdrawV2Ixs(withdrawCollateralAmount);
|
|
325
338
|
return axn;
|
|
326
339
|
}
|
|
327
340
|
static async buildRepayAndWithdrawV2Txns(kaminoMarket, repayAmount, repayMint, withdrawAmount, withdrawMint, payer, currentSlot, obligation, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
@@ -329,8 +342,8 @@ class KaminoAction {
|
|
|
329
342
|
requestElevationGroup = false, initUserMetadata = {
|
|
330
343
|
skipInitialization: false,
|
|
331
344
|
skipLutCreation: false,
|
|
332
|
-
}, referrer =
|
|
333
|
-
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'repayAndWithdrawV2', repayAmount, repayMint, withdrawMint, payer, payer, obligation, withdrawAmount, referrer, currentSlot);
|
|
345
|
+
}, referrer = (0, kit_1.none)()) {
|
|
346
|
+
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'repayAndWithdrawV2', repayAmount, repayMint, withdrawMint, payer, payer.address, obligation, withdrawAmount, referrer, currentSlot);
|
|
334
347
|
const addInitObligationForFarm = true;
|
|
335
348
|
const twoTokenAction = true;
|
|
336
349
|
if (extraComputeBudget > 0) {
|
|
@@ -338,7 +351,7 @@ class KaminoAction {
|
|
|
338
351
|
}
|
|
339
352
|
await axn.addSupportIxs('repayAndWithdrawV2', includeAtaIxs, requestElevationGroup, addInitObligationForFarm, true, scopeRefreshConfig, initUserMetadata, twoTokenAction);
|
|
340
353
|
const withdrawCollateralAmount = axn.getWithdrawCollateralAmount(axn.outflowReserve, axn.outflowAmount);
|
|
341
|
-
axn.addRepayAndWithdrawV2Ixs(withdrawCollateralAmount);
|
|
354
|
+
await axn.addRepayAndWithdrawV2Ixs(withdrawCollateralAmount);
|
|
342
355
|
return axn;
|
|
343
356
|
}
|
|
344
357
|
static async buildRepayAndWithdrawTxns(kaminoMarket, repayAmount, repayMint, withdrawAmount, withdrawMint, payer, currentSlot, obligation, useV2Ixs, scopeRefreshConfig, extraComputeBudget = 1_000_000, // if > 0 then adds the ix
|
|
@@ -346,8 +359,8 @@ class KaminoAction {
|
|
|
346
359
|
requestElevationGroup = false, initUserMetadata = {
|
|
347
360
|
skipInitialization: false,
|
|
348
361
|
skipLutCreation: false,
|
|
349
|
-
}, referrer =
|
|
350
|
-
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'repayAndWithdraw', repayAmount, repayMint, withdrawMint, payer, payer, obligation, withdrawAmount, referrer, currentSlot);
|
|
362
|
+
}, referrer = (0, kit_1.none)()) {
|
|
363
|
+
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'repayAndWithdraw', repayAmount, repayMint, withdrawMint, payer, payer.address, obligation, withdrawAmount, referrer, currentSlot);
|
|
351
364
|
const addInitObligationForFarmForRepay = true;
|
|
352
365
|
const addInitObligationForFarmForWithdraw = false;
|
|
353
366
|
const twoTokenAction = true;
|
|
@@ -364,17 +377,24 @@ class KaminoAction {
|
|
|
364
377
|
}
|
|
365
378
|
await axn.addInBetweenIxs('repayAndWithdraw', includeAtaIxs, requestElevationGroup, addInitObligationForFarmForWithdraw, useV2Ixs);
|
|
366
379
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
367
|
-
// Create the scope refresh ix in here to ensure it's the first ix in the
|
|
368
|
-
const allReserves =
|
|
369
|
-
...
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
380
|
+
// Create the scope refresh ix in here to ensure it's the first ix in the tx
|
|
381
|
+
const allReserves = [
|
|
382
|
+
...new Set([
|
|
383
|
+
...axn.depositReserves,
|
|
384
|
+
...axn.borrowReserves,
|
|
385
|
+
axn.reserve.address,
|
|
386
|
+
...(axn.outflowReserve ? [axn.outflowReserve.address] : []),
|
|
387
|
+
...(axn.preLoadedDepositReservesSameTx ? axn.preLoadedDepositReservesSameTx : []),
|
|
388
|
+
]),
|
|
389
|
+
];
|
|
390
|
+
const scopeTokensMap = (0, market_1.getTokenIdsForScopeRefresh)(axn.kaminoMarket, allReserves);
|
|
391
|
+
if (scopeTokensMap.size > 0 && scopeRefreshConfig) {
|
|
392
|
+
for (const [configPubkey, config] of scopeRefreshConfig.scopeConfigurations) {
|
|
393
|
+
const tokenIds = scopeTokensMap.get(config.oraclePrices);
|
|
394
|
+
if (tokenIds && tokenIds.length > 0) {
|
|
395
|
+
await axn.addScopeRefreshIxs(scopeRefreshConfig.scope, tokenIds, configPubkey);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
378
398
|
}
|
|
379
399
|
return axn;
|
|
380
400
|
}
|
|
@@ -384,7 +404,7 @@ class KaminoAction {
|
|
|
384
404
|
initUserMetadata = {
|
|
385
405
|
skipInitialization: false,
|
|
386
406
|
skipLutCreation: false,
|
|
387
|
-
}, referrer =
|
|
407
|
+
}, referrer = (0, kit_1.none)(), currentSlot = 0n, overrideElevationGroupRequest,
|
|
388
408
|
// Optional customizations which may be needed if the obligation was mutated by some previous ix.
|
|
389
409
|
obligationCustomizations) {
|
|
390
410
|
const axn = await KaminoAction.initialize('withdraw', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot);
|
|
@@ -411,18 +431,20 @@ class KaminoAction {
|
|
|
411
431
|
* @param mint
|
|
412
432
|
* @param owner
|
|
413
433
|
* @param obligation - obligation to repay or the PDA seeds
|
|
434
|
+
* @param useV2Ixs
|
|
435
|
+
* @param scopeRefreshConfig
|
|
414
436
|
* @param currentSlot
|
|
415
437
|
* @param payer - if not set then owner is used
|
|
416
438
|
* @param extraComputeBudget - if > 0 then adds the ix
|
|
417
439
|
* @param includeAtaIxs - if true it includes create and close wsol and token atas
|
|
418
440
|
* @param requestElevationGroup
|
|
419
|
-
* @param
|
|
441
|
+
* @param initUserMetadata
|
|
420
442
|
* @param referrer
|
|
421
443
|
*/
|
|
422
|
-
static async buildRepayTxns(kaminoMarket, amount, mint, owner, obligation, useV2Ixs, scopeRefreshConfig, currentSlot, payer =
|
|
444
|
+
static async buildRepayTxns(kaminoMarket, amount, mint, owner, obligation, useV2Ixs, scopeRefreshConfig, currentSlot, payer = owner, extraComputeBudget = 1_000_000, includeAtaIxs = true, requestElevationGroup = false, initUserMetadata = {
|
|
423
445
|
skipInitialization: false,
|
|
424
446
|
skipLutCreation: false,
|
|
425
|
-
}, referrer =
|
|
447
|
+
}, referrer = (0, kit_1.none)()) {
|
|
426
448
|
const axn = await KaminoAction.initialize('repay', amount, mint, owner, kaminoMarket, obligation, referrer, currentSlot, payer);
|
|
427
449
|
const addInitObligationForFarm = true;
|
|
428
450
|
if (extraComputeBudget > 0) {
|
|
@@ -443,7 +465,7 @@ class KaminoAction {
|
|
|
443
465
|
requestElevationGroup = false, initUserMetadata = {
|
|
444
466
|
skipInitialization: false,
|
|
445
467
|
skipLutCreation: false,
|
|
446
|
-
}, referrer =
|
|
468
|
+
}, referrer = (0, kit_1.none)(), maxAllowedLtvOverridePercent = 0, currentSlot = 0n) {
|
|
447
469
|
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'liquidate', amount, repayTokenMint, withdrawTokenMint, liquidator, obligationOwner, obligation, minCollateralReceiveAmount, referrer, currentSlot);
|
|
448
470
|
const addInitObligationForFarm = true;
|
|
449
471
|
if (extraComputeBudget > 0) {
|
|
@@ -459,19 +481,19 @@ class KaminoAction {
|
|
|
459
481
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
460
482
|
return axn;
|
|
461
483
|
}
|
|
462
|
-
static async buildWithdrawReferrerFeeTxns(owner, tokenMint, kaminoMarket, currentSlot =
|
|
484
|
+
static async buildWithdrawReferrerFeeTxns(owner, tokenMint, kaminoMarket, currentSlot = 0n) {
|
|
463
485
|
const { axn, createAtaIxs } = await KaminoAction.initializeWithdrawReferrerFees(tokenMint, owner, kaminoMarket, currentSlot);
|
|
464
486
|
axn.setupIxs.push(...createAtaIxs);
|
|
465
487
|
axn.setupIxsLabels.push(`createAtasIxs[${axn.owner.toString()}]`);
|
|
466
|
-
if (
|
|
467
|
-
const referrerTokenState = (0, utils_1.referrerTokenStatePda)(axn.referrer, axn.reserve.address, axn.kaminoMarket.programId)
|
|
468
|
-
const account = await axn.kaminoMarket.
|
|
469
|
-
if (!account) {
|
|
488
|
+
if ((0, kit_1.isSome)(axn.referrer)) {
|
|
489
|
+
const referrerTokenState = await (0, utils_1.referrerTokenStatePda)(axn.referrer.value, axn.reserve.address, axn.kaminoMarket.programId);
|
|
490
|
+
const account = await (0, kit_1.fetchEncodedAccount)(axn.kaminoMarket.getRpc(), referrerTokenState);
|
|
491
|
+
if (!account.exists) {
|
|
470
492
|
axn.addInitReferrerTokenStateIx(axn.reserve, referrerTokenState);
|
|
471
493
|
}
|
|
472
494
|
}
|
|
473
495
|
axn.addRefreshReserveIxs([axn.reserve.address]);
|
|
474
|
-
axn.addWithdrawReferrerFeesIxs();
|
|
496
|
+
await axn.addWithdrawReferrerFeesIxs();
|
|
475
497
|
return axn;
|
|
476
498
|
}
|
|
477
499
|
/**
|
|
@@ -480,263 +502,207 @@ class KaminoAction {
|
|
|
480
502
|
* In other words: it will overwrite the given slot in the {@link Obligation.orders} array. This possibly includes
|
|
481
503
|
* setting the `null` state (i.e. cancelling the order).
|
|
482
504
|
*/
|
|
483
|
-
static buildSetObligationOrderIxn(kaminoMarket, obligation, orderAtIndex) {
|
|
505
|
+
static buildSetObligationOrderIxn(owner, kaminoMarket, obligation, orderAtIndex) {
|
|
484
506
|
return (0, instructions_1.setObligationOrder)({
|
|
485
507
|
index: orderAtIndex.index,
|
|
486
508
|
order: orderAtIndex.orderState(),
|
|
487
509
|
}, {
|
|
488
510
|
lendingMarket: kaminoMarket.getAddress(),
|
|
489
511
|
obligation: obligation.obligationAddress,
|
|
490
|
-
owner
|
|
512
|
+
owner,
|
|
491
513
|
}, kaminoMarket.programId);
|
|
492
514
|
}
|
|
493
|
-
async
|
|
494
|
-
let txns;
|
|
495
|
-
if (this.lendingIxs.length === 2) {
|
|
496
|
-
txns = new web3_js_1.Transaction({
|
|
497
|
-
feePayer: this.owner,
|
|
498
|
-
recentBlockhash: (await this.kaminoMarket.getConnection().getLatestBlockhash()).blockhash,
|
|
499
|
-
}).add(...this.setupIxs, ...[this.lendingIxs[0]], ...this.inBetweenIxs, ...[this.lendingIxs[1]], ...this.cleanupIxs);
|
|
500
|
-
}
|
|
501
|
-
else {
|
|
502
|
-
txns = new web3_js_1.Transaction({
|
|
503
|
-
feePayer: this.owner,
|
|
504
|
-
recentBlockhash: (await this.kaminoMarket.getConnection().getLatestBlockhash()).blockhash,
|
|
505
|
-
}).add(...this.setupIxs, ...this.lendingIxs, ...this.cleanupIxs);
|
|
506
|
-
}
|
|
507
|
-
return txns;
|
|
508
|
-
}
|
|
509
|
-
async sendTransactions(sendTransaction) {
|
|
510
|
-
const txns = await this.getTransactions();
|
|
511
|
-
const signature = await this.sendSingleTransaction(txns, sendTransaction);
|
|
512
|
-
return signature;
|
|
513
|
-
}
|
|
514
|
-
async sendSingleTransaction(txn, sendTransaction) {
|
|
515
|
-
if (!txn)
|
|
516
|
-
return '';
|
|
517
|
-
const signature = await sendTransaction(txn, this.kaminoMarket.getConnection());
|
|
518
|
-
await this.kaminoMarket.getConnection().confirmTransaction(signature);
|
|
519
|
-
return signature;
|
|
520
|
-
}
|
|
521
|
-
async simulateTransactions(sendTransaction) {
|
|
522
|
-
const txns = await this.getTransactions();
|
|
523
|
-
const signature = await this.simulateSingleTransaction(txns, sendTransaction);
|
|
524
|
-
return signature;
|
|
525
|
-
}
|
|
526
|
-
async simulateSingleTransaction(txn, sendTransaction) {
|
|
527
|
-
if (!txn)
|
|
528
|
-
return '';
|
|
529
|
-
return await sendTransaction(txn, this.kaminoMarket.getConnection());
|
|
530
|
-
}
|
|
531
|
-
addDepositReserveLiquidityIx() {
|
|
515
|
+
async addDepositReserveLiquidityIx() {
|
|
532
516
|
this.lendingIxsLabels.push(`depositReserveLiquidity`);
|
|
533
517
|
this.lendingIxs.push((0, instructions_1.depositReserveLiquidity)({
|
|
534
518
|
liquidityAmount: this.amount,
|
|
535
519
|
}, {
|
|
536
520
|
owner: this.owner,
|
|
537
521
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
538
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
522
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
539
523
|
reserve: this.reserve.address,
|
|
540
524
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
541
525
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
542
526
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
543
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
544
|
-
userDestinationCollateral: this.getUserCollateralAccountAddress(this.reserve),
|
|
545
|
-
collateralTokenProgram:
|
|
527
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
528
|
+
userDestinationCollateral: await this.getUserCollateralAccountAddress(this.reserve),
|
|
529
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
546
530
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
547
|
-
instructionSysvarAccount:
|
|
531
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
548
532
|
}, this.kaminoMarket.programId));
|
|
549
533
|
}
|
|
550
|
-
addRedeemReserveCollateralIx() {
|
|
534
|
+
async addRedeemReserveCollateralIx() {
|
|
551
535
|
this.lendingIxsLabels.push(`redeemReserveCollateral`);
|
|
552
536
|
this.lendingIxs.push((0, instructions_1.redeemReserveCollateral)({
|
|
553
537
|
collateralAmount: this.amount,
|
|
554
538
|
}, {
|
|
555
539
|
owner: this.owner,
|
|
556
540
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
557
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
541
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
558
542
|
reserve: this.reserve.address,
|
|
559
543
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
560
544
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
561
545
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
562
|
-
userSourceCollateral: this.getUserCollateralAccountAddress(this.reserve),
|
|
563
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
564
|
-
collateralTokenProgram:
|
|
546
|
+
userSourceCollateral: await this.getUserCollateralAccountAddress(this.reserve),
|
|
547
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
548
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
565
549
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
566
|
-
instructionSysvarAccount:
|
|
550
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
567
551
|
}, this.kaminoMarket.programId));
|
|
568
552
|
}
|
|
569
553
|
// @deprecated -- use addDepositIxV2 instead
|
|
570
|
-
addDepositIx() {
|
|
554
|
+
async addDepositIx() {
|
|
571
555
|
this.lendingIxsLabels.push(`depositReserveLiquidityAndObligationCollateral`);
|
|
572
556
|
this.lendingIxs.push((0, instructions_1.depositReserveLiquidityAndObligationCollateral)({
|
|
573
557
|
liquidityAmount: this.amount,
|
|
574
558
|
}, {
|
|
575
559
|
owner: this.owner,
|
|
576
|
-
obligation: this.getObligationPda(),
|
|
560
|
+
obligation: await this.getObligationPda(),
|
|
577
561
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
578
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
562
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
579
563
|
reserve: this.reserve.address,
|
|
580
564
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
581
565
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
582
566
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
583
567
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
584
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
585
|
-
placeholderUserDestinationCollateral:
|
|
586
|
-
collateralTokenProgram:
|
|
568
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
569
|
+
placeholderUserDestinationCollateral: (0, kit_1.none)(),
|
|
570
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
587
571
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
588
|
-
instructionSysvarAccount:
|
|
572
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
589
573
|
}, this.kaminoMarket.programId));
|
|
590
574
|
}
|
|
591
|
-
addDepositIxV2() {
|
|
592
|
-
const farmsAccounts = this.
|
|
593
|
-
? {
|
|
594
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
595
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
596
|
-
}
|
|
597
|
-
: {
|
|
598
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
599
|
-
reserveFarmState: this.reserve.state.farmCollateral,
|
|
600
|
-
};
|
|
575
|
+
async addDepositIxV2() {
|
|
576
|
+
const { collateralFarmAccounts: farmsAccounts } = await KaminoAction.getFarmAccountsForReserve(await this.getObligationPda(), this.reserve);
|
|
601
577
|
this.lendingIxsLabels.push(`depositReserveLiquidityAndObligationCollateralV2`);
|
|
602
578
|
this.lendingIxs.push((0, instructions_1.depositReserveLiquidityAndObligationCollateralV2)({
|
|
603
579
|
liquidityAmount: this.amount,
|
|
604
580
|
}, {
|
|
605
581
|
depositAccounts: {
|
|
606
582
|
owner: this.owner,
|
|
607
|
-
obligation: this.getObligationPda(),
|
|
583
|
+
obligation: await this.getObligationPda(),
|
|
608
584
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
609
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
585
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
610
586
|
reserve: this.reserve.address,
|
|
611
587
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
612
588
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
613
589
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
614
590
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
615
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
616
|
-
placeholderUserDestinationCollateral:
|
|
617
|
-
collateralTokenProgram:
|
|
591
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
592
|
+
placeholderUserDestinationCollateral: (0, kit_1.none)(),
|
|
593
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
618
594
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
619
|
-
instructionSysvarAccount:
|
|
595
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
620
596
|
},
|
|
621
597
|
farmsAccounts,
|
|
622
|
-
farmsProgram:
|
|
598
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
623
599
|
}, this.kaminoMarket.programId));
|
|
624
600
|
}
|
|
625
601
|
/// @deprecated -- use addDepositObligationCollateralIxV2 instead
|
|
626
|
-
addDepositObligationCollateralIx() {
|
|
602
|
+
async addDepositObligationCollateralIx() {
|
|
627
603
|
this.lendingIxsLabels.push(`depositObligationCollateral`);
|
|
628
604
|
this.lendingIxs.push((0, instructions_1.depositObligationCollateral)({
|
|
629
605
|
collateralAmount: this.amount,
|
|
630
606
|
}, {
|
|
631
607
|
owner: this.owner,
|
|
632
|
-
obligation: this.getObligationPda(),
|
|
608
|
+
obligation: await this.getObligationPda(),
|
|
633
609
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
634
610
|
depositReserve: this.reserve.address,
|
|
635
611
|
reserveDestinationCollateral: this.reserve.state.collateral.supplyVault,
|
|
636
|
-
userSourceCollateral: this.getUserCollateralAccountAddress(this.reserve),
|
|
637
|
-
tokenProgram:
|
|
638
|
-
instructionSysvarAccount:
|
|
612
|
+
userSourceCollateral: await this.getUserCollateralAccountAddress(this.reserve),
|
|
613
|
+
tokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
614
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
639
615
|
}, this.kaminoMarket.programId));
|
|
640
616
|
}
|
|
641
|
-
addDepositObligationCollateralIxV2() {
|
|
642
|
-
const
|
|
643
|
-
|
|
644
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
645
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
646
|
-
}
|
|
647
|
-
: {
|
|
648
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
649
|
-
reserveFarmState: this.reserve.state.farmCollateral,
|
|
650
|
-
};
|
|
617
|
+
async addDepositObligationCollateralIxV2() {
|
|
618
|
+
const obligationAddress = await this.getObligationPda();
|
|
619
|
+
const { collateralFarmAccounts: farmsAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.reserve);
|
|
651
620
|
this.lendingIxsLabels.push(`depositObligationCollateralV2`);
|
|
652
621
|
this.lendingIxs.push((0, instructions_1.depositObligationCollateralV2)({
|
|
653
622
|
collateralAmount: this.amount,
|
|
654
623
|
}, {
|
|
655
624
|
depositAccounts: {
|
|
656
625
|
owner: this.owner,
|
|
657
|
-
obligation:
|
|
626
|
+
obligation: obligationAddress,
|
|
658
627
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
659
628
|
depositReserve: this.reserve.address,
|
|
660
629
|
reserveDestinationCollateral: this.reserve.state.collateral.supplyVault,
|
|
661
|
-
userSourceCollateral: this.getUserCollateralAccountAddress(this.reserve),
|
|
662
|
-
tokenProgram:
|
|
663
|
-
instructionSysvarAccount:
|
|
630
|
+
userSourceCollateral: await this.getUserCollateralAccountAddress(this.reserve),
|
|
631
|
+
tokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
632
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
664
633
|
},
|
|
665
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
634
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
666
635
|
farmsAccounts,
|
|
667
|
-
farmsProgram:
|
|
636
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
668
637
|
}, this.kaminoMarket.programId));
|
|
669
638
|
}
|
|
670
639
|
/// @deprecated -- use addDepositObligationCollateralIxV2 instead
|
|
671
|
-
addBorrowIx() {
|
|
640
|
+
async addBorrowIx() {
|
|
672
641
|
this.lendingIxsLabels.push(`borrowObligationLiquidity`);
|
|
673
642
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
674
643
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
675
|
-
return {
|
|
644
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
676
645
|
});
|
|
677
|
-
|
|
646
|
+
let borrowIx = (0, instructions_1.borrowObligationLiquidity)({
|
|
678
647
|
liquidityAmount: this.amount,
|
|
679
648
|
}, {
|
|
680
649
|
owner: this.owner,
|
|
681
|
-
obligation: this.getObligationPda(),
|
|
650
|
+
obligation: await this.getObligationPda(),
|
|
682
651
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
683
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
652
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
684
653
|
borrowReserve: this.reserve.address,
|
|
685
654
|
borrowReserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
686
655
|
reserveSourceLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
687
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
656
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
688
657
|
borrowReserveLiquidityFeeReceiver: this.reserve.state.liquidity.feeVault,
|
|
689
|
-
referrerTokenState:
|
|
658
|
+
referrerTokenState: await this.getReferrerTokenStateAddress(this.reserve.address),
|
|
690
659
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
691
|
-
instructionSysvarAccount:
|
|
660
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
692
661
|
}, this.kaminoMarket.programId);
|
|
693
|
-
borrowIx
|
|
694
|
-
|
|
662
|
+
borrowIx = {
|
|
663
|
+
...borrowIx,
|
|
664
|
+
accounts: (0, obligation_1.isKaminoObligation)(this.obligation) &&
|
|
695
665
|
(this.obligation.state.elevationGroup > 0 || this.obligation.refreshedStats.potentialElevationGroupUpdate > 0)
|
|
696
|
-
? borrowIx.
|
|
697
|
-
: borrowIx.
|
|
666
|
+
? borrowIx.accounts.concat(depositReserveAccountMetas)
|
|
667
|
+
: borrowIx.accounts,
|
|
668
|
+
};
|
|
698
669
|
this.lendingIxs.push(borrowIx);
|
|
699
670
|
}
|
|
700
|
-
addBorrowIxV2() {
|
|
671
|
+
async addBorrowIxV2() {
|
|
701
672
|
this.lendingIxsLabels.push(`borrowObligationLiquidityV2`);
|
|
702
673
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
703
674
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
704
|
-
return {
|
|
675
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
705
676
|
});
|
|
706
|
-
const
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
710
|
-
}
|
|
711
|
-
: {
|
|
712
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
713
|
-
reserveFarmState: this.reserve.state.farmDebt,
|
|
714
|
-
};
|
|
715
|
-
const borrowIx = (0, instructions_1.borrowObligationLiquidityV2)({
|
|
677
|
+
const obligationAddress = await this.getObligationPda();
|
|
678
|
+
const { debtFarmAccounts: farmsAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.reserve);
|
|
679
|
+
let borrowIx = (0, instructions_1.borrowObligationLiquidityV2)({
|
|
716
680
|
liquidityAmount: this.amount,
|
|
717
681
|
}, {
|
|
718
682
|
borrowAccounts: {
|
|
719
683
|
owner: this.owner,
|
|
720
|
-
obligation:
|
|
684
|
+
obligation: obligationAddress,
|
|
721
685
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
722
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
686
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
723
687
|
borrowReserve: this.reserve.address,
|
|
724
688
|
borrowReserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
725
689
|
reserveSourceLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
726
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
690
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
727
691
|
borrowReserveLiquidityFeeReceiver: this.reserve.state.liquidity.feeVault,
|
|
728
|
-
referrerTokenState:
|
|
692
|
+
referrerTokenState: await this.getReferrerTokenStateAddress(this.reserve.address),
|
|
729
693
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
730
|
-
instructionSysvarAccount:
|
|
694
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
731
695
|
},
|
|
732
696
|
farmsAccounts,
|
|
733
|
-
farmsProgram:
|
|
697
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
734
698
|
}, this.kaminoMarket.programId);
|
|
735
|
-
borrowIx
|
|
736
|
-
|
|
699
|
+
borrowIx = {
|
|
700
|
+
...borrowIx,
|
|
701
|
+
accounts: (0, obligation_1.isKaminoObligation)(this.obligation) &&
|
|
737
702
|
(this.obligation.state.elevationGroup > 0 || this.obligation.refreshedStats.potentialElevationGroupUpdate > 0)
|
|
738
|
-
? borrowIx.
|
|
739
|
-
: borrowIx.
|
|
703
|
+
? borrowIx.accounts.concat(depositReserveAccountMetas)
|
|
704
|
+
: borrowIx.accounts,
|
|
705
|
+
};
|
|
740
706
|
this.lendingIxs.push(borrowIx);
|
|
741
707
|
}
|
|
742
708
|
/// @deprecated -- use addWithdrawIxV2 instead
|
|
@@ -746,129 +712,121 @@ class KaminoAction {
|
|
|
746
712
|
collateralAmount,
|
|
747
713
|
}, {
|
|
748
714
|
owner: this.owner,
|
|
749
|
-
obligation: this.getObligationPda(),
|
|
715
|
+
obligation: await this.getObligationPda(),
|
|
750
716
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
751
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
717
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
752
718
|
withdrawReserve: this.reserve.address,
|
|
753
719
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
754
720
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
755
721
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
756
722
|
reserveSourceCollateral: this.reserve.state.collateral.supplyVault,
|
|
757
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
758
|
-
placeholderUserDestinationCollateral:
|
|
759
|
-
collateralTokenProgram:
|
|
723
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
724
|
+
placeholderUserDestinationCollateral: (0, kit_1.none)(),
|
|
725
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
760
726
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
761
|
-
instructionSysvarAccount:
|
|
727
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
762
728
|
}, this.kaminoMarket.programId));
|
|
763
729
|
}
|
|
764
730
|
async addWithdrawIxV2(collateralAmount) {
|
|
765
|
-
const
|
|
766
|
-
|
|
767
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
768
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
769
|
-
}
|
|
770
|
-
: {
|
|
771
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
772
|
-
reserveFarmState: this.reserve.state.farmCollateral,
|
|
773
|
-
};
|
|
731
|
+
const obligationAddress = await this.getObligationPda();
|
|
732
|
+
const { collateralFarmAccounts: farmsAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.reserve);
|
|
774
733
|
this.lendingIxsLabels.push(`withdrawObligationCollateralAndRedeemReserveCollateralV2`);
|
|
775
734
|
this.lendingIxs.push((0, instructions_1.withdrawObligationCollateralAndRedeemReserveCollateralV2)({
|
|
776
735
|
collateralAmount,
|
|
777
736
|
}, {
|
|
778
737
|
withdrawAccounts: {
|
|
779
738
|
owner: this.owner,
|
|
780
|
-
obligation:
|
|
739
|
+
obligation: obligationAddress,
|
|
781
740
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
782
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
741
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
783
742
|
withdrawReserve: this.reserve.address,
|
|
784
743
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
785
744
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
786
745
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
787
746
|
reserveSourceCollateral: this.reserve.state.collateral.supplyVault,
|
|
788
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
789
|
-
placeholderUserDestinationCollateral:
|
|
790
|
-
collateralTokenProgram:
|
|
747
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
748
|
+
placeholderUserDestinationCollateral: (0, kit_1.none)(),
|
|
749
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
791
750
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
792
|
-
instructionSysvarAccount:
|
|
751
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
793
752
|
},
|
|
794
753
|
farmsAccounts: farmsAccounts,
|
|
795
|
-
farmsProgram:
|
|
754
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
796
755
|
}, this.kaminoMarket.programId));
|
|
797
756
|
}
|
|
798
757
|
/// @deprecated -- use addRepayIxV2 instead
|
|
799
758
|
async addRepayIx() {
|
|
800
|
-
this.
|
|
759
|
+
const obligationAddress = await this.getObligationPda();
|
|
760
|
+
this.lendingIxsLabels.push(`repayObligationLiquidity(reserve=${this.reserve.address})(obligation=${obligationAddress})`);
|
|
801
761
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
802
762
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
803
|
-
return {
|
|
763
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
804
764
|
});
|
|
805
|
-
|
|
765
|
+
let repayIx = (0, instructions_1.repayObligationLiquidity)({
|
|
806
766
|
liquidityAmount: this.amount,
|
|
807
767
|
}, {
|
|
808
768
|
owner: this.payer,
|
|
809
|
-
obligation:
|
|
769
|
+
obligation: obligationAddress,
|
|
810
770
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
811
771
|
repayReserve: this.reserve.address,
|
|
812
772
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
813
|
-
userSourceLiquidity: this.getTokenAccountAddressByUser(this.reserve, this.payer),
|
|
773
|
+
userSourceLiquidity: await this.getTokenAccountAddressByUser(this.reserve, this.payer.address),
|
|
814
774
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
815
775
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
816
|
-
instructionSysvarAccount:
|
|
776
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
817
777
|
}, this.kaminoMarket.programId);
|
|
818
|
-
repayIx
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
778
|
+
repayIx = {
|
|
779
|
+
...repayIx,
|
|
780
|
+
accounts: (0, obligation_1.isKaminoObligation)(this.obligation) && this.obligation.state.elevationGroup > 0
|
|
781
|
+
? repayIx.accounts.concat(depositReserveAccountMetas)
|
|
782
|
+
: repayIx.accounts,
|
|
783
|
+
};
|
|
822
784
|
this.lendingIxs.push(repayIx);
|
|
823
785
|
}
|
|
824
786
|
async addRepayIxV2() {
|
|
825
|
-
this.
|
|
787
|
+
const obligationAddress = await this.getObligationPda();
|
|
788
|
+
this.lendingIxsLabels.push(`repayObligationLiquidityV2(reserve=${this.reserve.address})(obligation=${obligationAddress})`);
|
|
826
789
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
827
|
-
const farmsAccounts = this.reserve
|
|
828
|
-
? {
|
|
829
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
830
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
831
|
-
}
|
|
832
|
-
: {
|
|
833
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
834
|
-
reserveFarmState: this.reserve.state.farmDebt,
|
|
835
|
-
};
|
|
790
|
+
const { debtFarmAccounts: farmsAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.reserve);
|
|
836
791
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
837
|
-
return {
|
|
792
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
838
793
|
});
|
|
839
|
-
|
|
794
|
+
let repayIx = (0, instructions_1.repayObligationLiquidityV2)({
|
|
840
795
|
liquidityAmount: this.amount,
|
|
841
796
|
}, {
|
|
842
797
|
repayAccounts: {
|
|
843
798
|
owner: this.payer,
|
|
844
|
-
obligation:
|
|
799
|
+
obligation: obligationAddress,
|
|
845
800
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
846
801
|
repayReserve: this.reserve.address,
|
|
847
802
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
848
|
-
userSourceLiquidity: this.getTokenAccountAddressByUser(this.reserve, this.payer),
|
|
803
|
+
userSourceLiquidity: await this.getTokenAccountAddressByUser(this.reserve, this.payer.address),
|
|
849
804
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
850
805
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
851
|
-
instructionSysvarAccount:
|
|
806
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
852
807
|
},
|
|
853
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
808
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
854
809
|
farmsAccounts,
|
|
855
|
-
farmsProgram:
|
|
810
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
856
811
|
}, this.kaminoMarket.programId);
|
|
857
|
-
repayIx
|
|
812
|
+
repayIx = {
|
|
813
|
+
...repayIx,
|
|
858
814
|
// TODO: potential elev group update?
|
|
859
|
-
(0, obligation_1.isKaminoObligation)(this.obligation) && this.obligation.state.elevationGroup > 0
|
|
860
|
-
? repayIx.
|
|
861
|
-
: repayIx.
|
|
815
|
+
accounts: (0, obligation_1.isKaminoObligation)(this.obligation) && this.obligation.state.elevationGroup > 0
|
|
816
|
+
? repayIx.accounts.concat(depositReserveAccountMetas)
|
|
817
|
+
: repayIx.accounts,
|
|
818
|
+
};
|
|
862
819
|
this.lendingIxs.push(repayIx);
|
|
863
820
|
}
|
|
864
|
-
addRepayAndWithdrawV2Ixs(withdrawCollateralAmount) {
|
|
865
|
-
this.
|
|
821
|
+
async addRepayAndWithdrawV2Ixs(withdrawCollateralAmount) {
|
|
822
|
+
const obligationAddress = await this.getObligationPda();
|
|
823
|
+
this.lendingIxsLabels.push(`repayAndWithdrawAndRedeem(repayReserve=${this.reserve.address})(withdrawReserve=${this.outflowReserve.address})(obligation=${obligationAddress})`);
|
|
866
824
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
867
825
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
868
|
-
return {
|
|
826
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
869
827
|
});
|
|
870
828
|
const borrowReserveAccountMetas = this.borrowReserves.map((reserve) => {
|
|
871
|
-
return {
|
|
829
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
872
830
|
});
|
|
873
831
|
if (!this.outflowAmount) {
|
|
874
832
|
throw new Error(`outflowAmount not set`);
|
|
@@ -876,73 +834,58 @@ class KaminoAction {
|
|
|
876
834
|
if (!this.outflowReserve) {
|
|
877
835
|
throw new Error(`outflowReserve not set`);
|
|
878
836
|
}
|
|
879
|
-
const
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
883
|
-
}
|
|
884
|
-
: {
|
|
885
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.outflowReserve.state.farmCollateral, this.getObligationPda()),
|
|
886
|
-
reserveFarmState: this.outflowReserve.state.farmCollateral,
|
|
887
|
-
};
|
|
888
|
-
const debtFarmsAccounts = this.reserve.state.farmDebt.equals(web3_js_1.PublicKey.default)
|
|
889
|
-
? {
|
|
890
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
891
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
892
|
-
}
|
|
893
|
-
: {
|
|
894
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
895
|
-
reserveFarmState: this.reserve.state.farmDebt,
|
|
896
|
-
};
|
|
897
|
-
const repayAndWithdrawIx = (0, instructions_1.repayAndWithdrawAndRedeem)({
|
|
837
|
+
const { collateralFarmAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.outflowReserve);
|
|
838
|
+
const { debtFarmAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.reserve);
|
|
839
|
+
let repayAndWithdrawIx = (0, instructions_1.repayAndWithdrawAndRedeem)({
|
|
898
840
|
repayAmount: this.amount,
|
|
899
841
|
withdrawCollateralAmount,
|
|
900
842
|
}, {
|
|
901
843
|
repayAccounts: {
|
|
902
844
|
owner: this.owner,
|
|
903
|
-
obligation:
|
|
845
|
+
obligation: obligationAddress,
|
|
904
846
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
905
847
|
repayReserve: this.reserve.address,
|
|
906
848
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
907
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
849
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
908
850
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
909
851
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
910
|
-
instructionSysvarAccount:
|
|
852
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
911
853
|
},
|
|
912
854
|
withdrawAccounts: {
|
|
913
855
|
owner: this.owner,
|
|
914
|
-
obligation:
|
|
856
|
+
obligation: obligationAddress,
|
|
915
857
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
916
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
858
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
917
859
|
withdrawReserve: this.outflowReserve.address,
|
|
918
860
|
reserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
919
861
|
reserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
920
862
|
reserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
921
863
|
reserveSourceCollateral: this.outflowReserve.state.collateral.supplyVault,
|
|
922
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
923
|
-
placeholderUserDestinationCollateral:
|
|
924
|
-
collateralTokenProgram:
|
|
864
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
865
|
+
placeholderUserDestinationCollateral: (0, kit_1.none)(),
|
|
866
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
925
867
|
liquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
926
|
-
instructionSysvarAccount:
|
|
868
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
927
869
|
},
|
|
928
|
-
collateralFarmsAccounts,
|
|
929
|
-
debtFarmsAccounts,
|
|
930
|
-
farmsProgram:
|
|
870
|
+
collateralFarmsAccounts: collateralFarmAccounts,
|
|
871
|
+
debtFarmsAccounts: debtFarmAccounts,
|
|
872
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
931
873
|
}, this.kaminoMarket.programId);
|
|
932
|
-
repayAndWithdrawIx
|
|
933
|
-
...
|
|
934
|
-
|
|
935
|
-
|
|
874
|
+
repayAndWithdrawIx = {
|
|
875
|
+
...repayAndWithdrawIx,
|
|
876
|
+
accounts: repayAndWithdrawIx.accounts.concat(depositReserveAccountMetas).concat(borrowReserveAccountMetas),
|
|
877
|
+
};
|
|
936
878
|
this.lendingIxs.push(repayAndWithdrawIx);
|
|
937
879
|
}
|
|
938
|
-
addDepositAndWithdrawV2Ixs(withdrawCollateralAmount) {
|
|
939
|
-
this.
|
|
880
|
+
async addDepositAndWithdrawV2Ixs(withdrawCollateralAmount) {
|
|
881
|
+
const obligationAddress = await this.getObligationPda();
|
|
882
|
+
this.lendingIxsLabels.push(`depositAndWithdrawV2(depositReserve=${this.reserve.address})(withdrawReserve=${this.outflowReserve.address})(obligation=${obligationAddress})`);
|
|
940
883
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
941
884
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
942
|
-
return {
|
|
885
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
943
886
|
});
|
|
944
887
|
const borrowReserveAccountMetas = this.borrowReserves.map((reserve) => {
|
|
945
|
-
return {
|
|
888
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
946
889
|
});
|
|
947
890
|
if (!this.outflowAmount) {
|
|
948
891
|
throw new Error(`outflowAmount not set`);
|
|
@@ -950,68 +893,53 @@ class KaminoAction {
|
|
|
950
893
|
if (!this.outflowReserve) {
|
|
951
894
|
throw new Error(`outflowReserve not set`);
|
|
952
895
|
}
|
|
953
|
-
const depositFarmsAccounts = this.reserve
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
}
|
|
958
|
-
: {
|
|
959
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
960
|
-
reserveFarmState: this.reserve.state.farmCollateral,
|
|
961
|
-
};
|
|
962
|
-
const withdrawFarmsAccounts = this.outflowReserve.state.farmCollateral.equals(web3_js_1.PublicKey.default)
|
|
963
|
-
? {
|
|
964
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
965
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
966
|
-
}
|
|
967
|
-
: {
|
|
968
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.outflowReserve.state.farmCollateral, this.getObligationPda()),
|
|
969
|
-
reserveFarmState: this.outflowReserve.state.farmCollateral,
|
|
970
|
-
};
|
|
971
|
-
const depositAndWithdrawIx = (0, instructions_1.depositAndWithdraw)({
|
|
896
|
+
const { collateralFarmAccounts: depositFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.reserve);
|
|
897
|
+
const { collateralFarmAccounts: withdrawFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.outflowReserve);
|
|
898
|
+
const lendingMarketAuthority = await this.kaminoMarket.getLendingMarketAuthority();
|
|
899
|
+
let depositAndWithdrawIx = (0, instructions_1.depositAndWithdraw)({
|
|
972
900
|
liquidityAmount: this.amount,
|
|
973
901
|
withdrawCollateralAmount,
|
|
974
902
|
}, {
|
|
975
903
|
depositAccounts: {
|
|
976
904
|
owner: this.owner,
|
|
977
|
-
obligation:
|
|
905
|
+
obligation: obligationAddress,
|
|
978
906
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
979
|
-
lendingMarketAuthority
|
|
907
|
+
lendingMarketAuthority,
|
|
980
908
|
reserve: this.reserve.address,
|
|
981
909
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
982
910
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
983
911
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
984
912
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
985
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
986
|
-
placeholderUserDestinationCollateral:
|
|
987
|
-
collateralTokenProgram:
|
|
913
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
914
|
+
placeholderUserDestinationCollateral: (0, kit_1.none)(),
|
|
915
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
988
916
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
989
|
-
instructionSysvarAccount:
|
|
917
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
990
918
|
},
|
|
991
919
|
withdrawAccounts: {
|
|
992
920
|
owner: this.owner,
|
|
993
|
-
obligation:
|
|
921
|
+
obligation: obligationAddress,
|
|
994
922
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
995
|
-
lendingMarketAuthority
|
|
923
|
+
lendingMarketAuthority,
|
|
996
924
|
withdrawReserve: this.outflowReserve.address,
|
|
997
925
|
reserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
998
926
|
reserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
999
927
|
reserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
1000
928
|
reserveSourceCollateral: this.outflowReserve.state.collateral.supplyVault,
|
|
1001
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1002
|
-
placeholderUserDestinationCollateral:
|
|
1003
|
-
collateralTokenProgram:
|
|
929
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
930
|
+
placeholderUserDestinationCollateral: (0, kit_1.none)(),
|
|
931
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
1004
932
|
liquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1005
|
-
instructionSysvarAccount:
|
|
933
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1006
934
|
},
|
|
1007
935
|
depositFarmsAccounts,
|
|
1008
936
|
withdrawFarmsAccounts,
|
|
1009
|
-
farmsProgram:
|
|
937
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
1010
938
|
}, this.kaminoMarket.programId);
|
|
1011
|
-
depositAndWithdrawIx
|
|
1012
|
-
...
|
|
1013
|
-
|
|
1014
|
-
|
|
939
|
+
depositAndWithdrawIx = {
|
|
940
|
+
...depositAndWithdrawIx,
|
|
941
|
+
accounts: depositAndWithdrawIx.accounts.concat(depositReserveAccountMetas).concat(borrowReserveAccountMetas),
|
|
942
|
+
};
|
|
1015
943
|
this.lendingIxs.push(depositAndWithdrawIx);
|
|
1016
944
|
}
|
|
1017
945
|
async addDepositAndBorrowIx() {
|
|
@@ -1021,19 +949,19 @@ class KaminoAction {
|
|
|
1021
949
|
liquidityAmount: this.amount,
|
|
1022
950
|
}, {
|
|
1023
951
|
owner: this.owner,
|
|
1024
|
-
obligation: this.getObligationPda(),
|
|
952
|
+
obligation: await this.getObligationPda(),
|
|
1025
953
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1026
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
954
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1027
955
|
reserve: this.reserve.address,
|
|
1028
956
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1029
957
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
1030
958
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
1031
959
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
1032
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1033
|
-
placeholderUserDestinationCollateral:
|
|
1034
|
-
collateralTokenProgram:
|
|
960
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
961
|
+
placeholderUserDestinationCollateral: (0, kit_1.none)(),
|
|
962
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
1035
963
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1036
|
-
instructionSysvarAccount:
|
|
964
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1037
965
|
}, this.kaminoMarket.programId));
|
|
1038
966
|
if (!this.outflowReserve) {
|
|
1039
967
|
throw new Error(`outflowReserve not set`);
|
|
@@ -1046,37 +974,33 @@ class KaminoAction {
|
|
|
1046
974
|
depositReservesList.push(this.reserve.address);
|
|
1047
975
|
}
|
|
1048
976
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1049
|
-
return {
|
|
977
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
1050
978
|
});
|
|
1051
|
-
|
|
979
|
+
let borrowIx = (0, instructions_1.borrowObligationLiquidity)({
|
|
1052
980
|
liquidityAmount: this.outflowAmount,
|
|
1053
981
|
}, {
|
|
1054
982
|
owner: this.owner,
|
|
1055
|
-
obligation: this.getObligationPda(),
|
|
983
|
+
obligation: await this.getObligationPda(),
|
|
1056
984
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1057
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
985
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1058
986
|
borrowReserve: this.outflowReserve.address,
|
|
1059
987
|
borrowReserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
1060
988
|
reserveSourceLiquidity: this.outflowReserve.state.liquidity.supplyVault,
|
|
1061
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
989
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1062
990
|
borrowReserveLiquidityFeeReceiver: this.outflowReserve.state.liquidity.feeVault,
|
|
1063
|
-
referrerTokenState:
|
|
991
|
+
referrerTokenState: await this.getReferrerTokenStateAddress(this.outflowReserve.address),
|
|
1064
992
|
tokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1065
|
-
instructionSysvarAccount:
|
|
993
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1066
994
|
}, this.kaminoMarket.programId);
|
|
1067
|
-
borrowIx
|
|
995
|
+
borrowIx = {
|
|
996
|
+
...borrowIx,
|
|
997
|
+
accounts: borrowIx.accounts.concat(depositReserveAccountMetas),
|
|
998
|
+
};
|
|
1068
999
|
this.lendingIxs.push(borrowIx);
|
|
1069
1000
|
}
|
|
1070
1001
|
async addDepositAndBorrowIxV2() {
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1073
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1074
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
1075
|
-
}
|
|
1076
|
-
: {
|
|
1077
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
1078
|
-
reserveFarmState: this.reserve.state.farmCollateral,
|
|
1079
|
-
};
|
|
1002
|
+
const obligationAddress = await this.getObligationPda();
|
|
1003
|
+
const { collateralFarmAccounts: collateralFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.reserve);
|
|
1080
1004
|
this.lendingIxsLabels.push(`depositReserveLiquidityAndObligationCollateralV2`);
|
|
1081
1005
|
this.lendingIxsLabels.push(`borrowObligationLiquidityV2`);
|
|
1082
1006
|
this.lendingIxs.push((0, instructions_1.depositReserveLiquidityAndObligationCollateralV2)({
|
|
@@ -1084,22 +1008,22 @@ class KaminoAction {
|
|
|
1084
1008
|
}, {
|
|
1085
1009
|
depositAccounts: {
|
|
1086
1010
|
owner: this.owner,
|
|
1087
|
-
obligation:
|
|
1011
|
+
obligation: obligationAddress,
|
|
1088
1012
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1089
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1013
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1090
1014
|
reserve: this.reserve.address,
|
|
1091
1015
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1092
1016
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
1093
1017
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
1094
1018
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
1095
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1096
|
-
placeholderUserDestinationCollateral:
|
|
1097
|
-
collateralTokenProgram:
|
|
1019
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1020
|
+
placeholderUserDestinationCollateral: (0, kit_1.none)(),
|
|
1021
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
1098
1022
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1099
|
-
instructionSysvarAccount:
|
|
1023
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1100
1024
|
},
|
|
1101
1025
|
farmsAccounts: collateralFarmsAccounts,
|
|
1102
|
-
farmsProgram:
|
|
1026
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
1103
1027
|
}, this.kaminoMarket.programId));
|
|
1104
1028
|
if (!this.outflowReserve) {
|
|
1105
1029
|
throw new Error(`outflowReserve not set`);
|
|
@@ -1112,61 +1036,60 @@ class KaminoAction {
|
|
|
1112
1036
|
depositReservesList.push(this.reserve.address);
|
|
1113
1037
|
}
|
|
1114
1038
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1115
|
-
return {
|
|
1039
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
1116
1040
|
});
|
|
1117
|
-
const debtFarmsAccounts = this.outflowReserve
|
|
1118
|
-
|
|
1119
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1120
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
1121
|
-
}
|
|
1122
|
-
: {
|
|
1123
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.outflowReserve.state.farmDebt, this.getObligationPda()),
|
|
1124
|
-
reserveFarmState: this.outflowReserve.state.farmDebt,
|
|
1125
|
-
};
|
|
1126
|
-
const borrowIx = (0, instructions_1.borrowObligationLiquidityV2)({
|
|
1041
|
+
const { debtFarmAccounts: debtFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.outflowReserve);
|
|
1042
|
+
let borrowIx = (0, instructions_1.borrowObligationLiquidityV2)({
|
|
1127
1043
|
liquidityAmount: this.outflowAmount,
|
|
1128
1044
|
}, {
|
|
1129
1045
|
borrowAccounts: {
|
|
1130
1046
|
owner: this.owner,
|
|
1131
|
-
obligation:
|
|
1047
|
+
obligation: obligationAddress,
|
|
1132
1048
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1133
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1049
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1134
1050
|
borrowReserve: this.outflowReserve.address,
|
|
1135
1051
|
borrowReserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
1136
1052
|
reserveSourceLiquidity: this.outflowReserve.state.liquidity.supplyVault,
|
|
1137
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1053
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1138
1054
|
borrowReserveLiquidityFeeReceiver: this.outflowReserve.state.liquidity.feeVault,
|
|
1139
|
-
referrerTokenState:
|
|
1055
|
+
referrerTokenState: await this.getReferrerTokenStateAddress(this.outflowReserve.address),
|
|
1140
1056
|
tokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1141
|
-
instructionSysvarAccount:
|
|
1057
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1142
1058
|
},
|
|
1143
1059
|
farmsAccounts: debtFarmsAccounts,
|
|
1144
|
-
farmsProgram:
|
|
1060
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
1145
1061
|
}, this.kaminoMarket.programId);
|
|
1146
|
-
borrowIx
|
|
1062
|
+
borrowIx = {
|
|
1063
|
+
...borrowIx,
|
|
1064
|
+
accounts: borrowIx.accounts.concat(depositReserveAccountMetas),
|
|
1065
|
+
};
|
|
1147
1066
|
this.lendingIxs.push(borrowIx);
|
|
1148
1067
|
}
|
|
1149
1068
|
async addRepayAndWithdrawIxs(withdrawCollateralAmount) {
|
|
1150
|
-
this.
|
|
1069
|
+
const obligationAddress = await this.getObligationPda();
|
|
1070
|
+
this.lendingIxsLabels.push(`repayObligationLiquidity(reserve=${this.reserve.address})(obligation=${obligationAddress})`);
|
|
1151
1071
|
this.lendingIxsLabels.push(`withdrawObligationCollateralAndRedeemReserveCollateral`);
|
|
1152
1072
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1153
1073
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1154
|
-
return {
|
|
1074
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
1155
1075
|
});
|
|
1156
|
-
|
|
1076
|
+
let repayIx = (0, instructions_1.repayObligationLiquidity)({
|
|
1157
1077
|
liquidityAmount: this.amount,
|
|
1158
1078
|
}, {
|
|
1159
1079
|
owner: this.owner,
|
|
1160
|
-
obligation:
|
|
1080
|
+
obligation: obligationAddress,
|
|
1161
1081
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1162
1082
|
repayReserve: this.reserve.address,
|
|
1163
1083
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1164
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1084
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1165
1085
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
1166
1086
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1167
|
-
instructionSysvarAccount:
|
|
1087
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1168
1088
|
}, this.kaminoMarket.programId);
|
|
1169
|
-
repayIx
|
|
1089
|
+
repayIx = {
|
|
1090
|
+
...repayIx,
|
|
1091
|
+
accounts: repayIx.accounts.concat(depositReserveAccountMetas),
|
|
1092
|
+
};
|
|
1170
1093
|
this.lendingIxs.push(repayIx);
|
|
1171
1094
|
if (!this.outflowReserve) {
|
|
1172
1095
|
throw new Error(`outflowReserve not set`);
|
|
@@ -1178,60 +1101,57 @@ class KaminoAction {
|
|
|
1178
1101
|
collateralAmount: withdrawCollateralAmount,
|
|
1179
1102
|
}, {
|
|
1180
1103
|
owner: this.owner,
|
|
1181
|
-
obligation:
|
|
1104
|
+
obligation: obligationAddress,
|
|
1182
1105
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1183
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1106
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1184
1107
|
withdrawReserve: this.outflowReserve.address,
|
|
1185
1108
|
reserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
1186
1109
|
reserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
1187
1110
|
reserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
1188
1111
|
reserveSourceCollateral: this.outflowReserve.state.collateral.supplyVault,
|
|
1189
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1190
|
-
placeholderUserDestinationCollateral:
|
|
1191
|
-
collateralTokenProgram:
|
|
1112
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1113
|
+
placeholderUserDestinationCollateral: (0, kit_1.none)(),
|
|
1114
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
1192
1115
|
liquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1193
|
-
instructionSysvarAccount:
|
|
1116
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1194
1117
|
}, this.kaminoMarket.programId));
|
|
1195
1118
|
}
|
|
1196
1119
|
async addRepayAndWithdrawIxsV2(withdrawCollateralAmount) {
|
|
1197
|
-
this.
|
|
1120
|
+
const obligationAddress = await this.getObligationPda();
|
|
1121
|
+
this.lendingIxsLabels.push(`repayObligationLiquidityV2(reserve=${this.reserve.address})(obligation=${obligationAddress})`);
|
|
1198
1122
|
this.lendingIxsLabels.push(`withdrawObligationCollateralAndRedeemReserveCollateralV2`);
|
|
1199
1123
|
if (!(0, obligation_1.isKaminoObligation)(this.obligation)) {
|
|
1200
1124
|
throw new Error(`obligation is not a KaminoObligation`);
|
|
1201
1125
|
}
|
|
1202
1126
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1203
1127
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1204
|
-
return {
|
|
1128
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
1205
1129
|
});
|
|
1206
|
-
const debtFarmsAccounts = this.reserve
|
|
1207
|
-
|
|
1208
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1209
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
1210
|
-
}
|
|
1211
|
-
: {
|
|
1212
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
1213
|
-
reserveFarmState: this.reserve.state.farmDebt,
|
|
1214
|
-
};
|
|
1215
|
-
const repayIx = (0, instructions_1.repayObligationLiquidityV2)({
|
|
1130
|
+
const { debtFarmAccounts: debtFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.reserve);
|
|
1131
|
+
let repayIx = (0, instructions_1.repayObligationLiquidityV2)({
|
|
1216
1132
|
liquidityAmount: this.amount,
|
|
1217
1133
|
}, {
|
|
1218
1134
|
repayAccounts: {
|
|
1219
1135
|
owner: this.owner,
|
|
1220
|
-
obligation:
|
|
1136
|
+
obligation: obligationAddress,
|
|
1221
1137
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1222
1138
|
repayReserve: this.reserve.address,
|
|
1223
1139
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1224
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1140
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1225
1141
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
1226
1142
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1227
|
-
instructionSysvarAccount:
|
|
1143
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1228
1144
|
},
|
|
1229
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1145
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1230
1146
|
farmsAccounts: debtFarmsAccounts,
|
|
1231
|
-
farmsProgram:
|
|
1147
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
1232
1148
|
}, this.kaminoMarket.programId);
|
|
1233
|
-
repayIx
|
|
1234
|
-
|
|
1149
|
+
repayIx = {
|
|
1150
|
+
...repayIx,
|
|
1151
|
+
accounts: this.obligation.state.elevationGroup > 0
|
|
1152
|
+
? repayIx.accounts.concat(depositReserveAccountMetas)
|
|
1153
|
+
: repayIx.accounts,
|
|
1154
|
+
};
|
|
1235
1155
|
this.lendingIxs.push(repayIx);
|
|
1236
1156
|
if (!this.outflowReserve) {
|
|
1237
1157
|
throw new Error(`outflowReserve not set`);
|
|
@@ -1239,39 +1159,31 @@ class KaminoAction {
|
|
|
1239
1159
|
if (!this.outflowAmount) {
|
|
1240
1160
|
throw new Error(`outflowAmount not set`);
|
|
1241
1161
|
}
|
|
1242
|
-
const collateralFarmsAccounts = this.outflowReserve
|
|
1243
|
-
? {
|
|
1244
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1245
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
1246
|
-
}
|
|
1247
|
-
: {
|
|
1248
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.outflowReserve.state.farmCollateral, this.getObligationPda()),
|
|
1249
|
-
reserveFarmState: this.outflowReserve.state.farmCollateral,
|
|
1250
|
-
};
|
|
1162
|
+
const { collateralFarmAccounts: collateralFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.outflowReserve);
|
|
1251
1163
|
this.lendingIxs.push((0, instructions_1.withdrawObligationCollateralAndRedeemReserveCollateralV2)({
|
|
1252
1164
|
collateralAmount: withdrawCollateralAmount,
|
|
1253
1165
|
}, {
|
|
1254
1166
|
withdrawAccounts: {
|
|
1255
1167
|
owner: this.owner,
|
|
1256
|
-
obligation:
|
|
1168
|
+
obligation: obligationAddress,
|
|
1257
1169
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1258
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1170
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1259
1171
|
withdrawReserve: this.outflowReserve.address,
|
|
1260
1172
|
reserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
1261
1173
|
reserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
1262
1174
|
reserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
1263
1175
|
reserveSourceCollateral: this.outflowReserve.state.collateral.supplyVault,
|
|
1264
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1265
|
-
placeholderUserDestinationCollateral:
|
|
1266
|
-
collateralTokenProgram:
|
|
1176
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1177
|
+
placeholderUserDestinationCollateral: (0, kit_1.none)(),
|
|
1178
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
1267
1179
|
liquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1268
|
-
instructionSysvarAccount:
|
|
1180
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1269
1181
|
},
|
|
1270
1182
|
farmsAccounts: collateralFarmsAccounts,
|
|
1271
|
-
farmsProgram:
|
|
1183
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
1272
1184
|
}, this.kaminoMarket.programId));
|
|
1273
1185
|
}
|
|
1274
|
-
addLiquidateIx(maxAllowedLtvOverridePercent = 0) {
|
|
1186
|
+
async addLiquidateIx(maxAllowedLtvOverridePercent = 0) {
|
|
1275
1187
|
this.lendingIxsLabels.push(`liquidateObligationAndRedeemReserveCollateral`);
|
|
1276
1188
|
if (!this.outflowReserve) {
|
|
1277
1189
|
throw Error(`Withdraw reserve during liquidation is not defined`);
|
|
@@ -1281,18 +1193,18 @@ class KaminoAction {
|
|
|
1281
1193
|
}
|
|
1282
1194
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1283
1195
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1284
|
-
return {
|
|
1196
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
1285
1197
|
});
|
|
1286
|
-
|
|
1198
|
+
let liquidateIx = (0, instructions_1.liquidateObligationAndRedeemReserveCollateral)({
|
|
1287
1199
|
liquidityAmount: this.amount,
|
|
1288
1200
|
// TODO: Configure this when updating liquidator with new interface
|
|
1289
1201
|
minAcceptableReceivedLiquidityAmount: this.outflowAmount || new bn_js_1.default(0),
|
|
1290
1202
|
maxAllowedLtvOverridePercent: new bn_js_1.default(maxAllowedLtvOverridePercent),
|
|
1291
1203
|
}, {
|
|
1292
1204
|
liquidator: this.owner,
|
|
1293
|
-
obligation: this.getObligationPda(),
|
|
1205
|
+
obligation: await this.getObligationPda(),
|
|
1294
1206
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1295
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1207
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1296
1208
|
repayReserve: this.reserve.address,
|
|
1297
1209
|
repayReserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1298
1210
|
repayReserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
@@ -1301,19 +1213,21 @@ class KaminoAction {
|
|
|
1301
1213
|
withdrawReserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
1302
1214
|
withdrawReserveCollateralSupply: this.outflowReserve.state.collateral.supplyVault,
|
|
1303
1215
|
withdrawReserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
1304
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1305
|
-
userDestinationCollateral: this.getUserCollateralAccountAddress(this.outflowReserve),
|
|
1306
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1216
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1217
|
+
userDestinationCollateral: await this.getUserCollateralAccountAddress(this.outflowReserve),
|
|
1218
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1307
1219
|
withdrawReserveLiquidityFeeReceiver: this.outflowReserve.state.liquidity.feeVault,
|
|
1308
|
-
collateralTokenProgram:
|
|
1220
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
1309
1221
|
repayLiquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1310
1222
|
withdrawLiquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1311
|
-
instructionSysvarAccount:
|
|
1223
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1312
1224
|
}, this.kaminoMarket.programId);
|
|
1313
|
-
liquidateIx
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1225
|
+
liquidateIx = {
|
|
1226
|
+
...liquidateIx,
|
|
1227
|
+
accounts: this.obligation.state.elevationGroup > 0
|
|
1228
|
+
? liquidateIx.accounts.concat(depositReserveAccountMetas)
|
|
1229
|
+
: liquidateIx.accounts,
|
|
1230
|
+
};
|
|
1317
1231
|
this.lendingIxs.push(liquidateIx);
|
|
1318
1232
|
}
|
|
1319
1233
|
async addLiquidateIxV2(maxAllowedLtvOverridePercent = 0) {
|
|
@@ -1326,27 +1240,12 @@ class KaminoAction {
|
|
|
1326
1240
|
}
|
|
1327
1241
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1328
1242
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1329
|
-
return {
|
|
1243
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
1330
1244
|
});
|
|
1331
|
-
const
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
}
|
|
1336
|
-
: {
|
|
1337
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.outflowReserve.state.farmCollateral, this.getObligationPda()),
|
|
1338
|
-
reserveFarmState: this.outflowReserve.state.farmCollateral,
|
|
1339
|
-
};
|
|
1340
|
-
const debtFarmsAccounts = this.reserve.state.farmDebt.equals(web3_js_1.PublicKey.default)
|
|
1341
|
-
? {
|
|
1342
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1343
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
1344
|
-
}
|
|
1345
|
-
: {
|
|
1346
|
-
obligationFarmUserState: (0, utils_1.obligationFarmStatePda)(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
1347
|
-
reserveFarmState: this.reserve.state.farmDebt,
|
|
1348
|
-
};
|
|
1349
|
-
const liquidateIx = (0, instructions_1.liquidateObligationAndRedeemReserveCollateralV2)({
|
|
1245
|
+
const obligationAddress = await this.getObligationPda();
|
|
1246
|
+
const { collateralFarmAccounts: collateralFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.outflowReserve);
|
|
1247
|
+
const { debtFarmAccounts: debtFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(await this.getObligationPda(), this.reserve);
|
|
1248
|
+
let liquidateIx = (0, instructions_1.liquidateObligationAndRedeemReserveCollateralV2)({
|
|
1350
1249
|
liquidityAmount: this.amount,
|
|
1351
1250
|
// TODO: Configure this when updating liquidator with new interface
|
|
1352
1251
|
minAcceptableReceivedLiquidityAmount: this.outflowAmount || new bn_js_1.default(0),
|
|
@@ -1354,9 +1253,9 @@ class KaminoAction {
|
|
|
1354
1253
|
}, {
|
|
1355
1254
|
liquidationAccounts: {
|
|
1356
1255
|
liquidator: this.owner,
|
|
1357
|
-
obligation:
|
|
1256
|
+
obligation: obligationAddress,
|
|
1358
1257
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1359
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1258
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1360
1259
|
repayReserve: this.reserve.address,
|
|
1361
1260
|
repayReserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1362
1261
|
repayReserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
@@ -1365,37 +1264,39 @@ class KaminoAction {
|
|
|
1365
1264
|
withdrawReserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
1366
1265
|
withdrawReserveCollateralSupply: this.outflowReserve.state.collateral.supplyVault,
|
|
1367
1266
|
withdrawReserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
1368
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1369
|
-
userDestinationCollateral: this.getUserCollateralAccountAddress(this.outflowReserve),
|
|
1370
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1267
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1268
|
+
userDestinationCollateral: await this.getUserCollateralAccountAddress(this.outflowReserve),
|
|
1269
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1371
1270
|
withdrawReserveLiquidityFeeReceiver: this.outflowReserve.state.liquidity.feeVault,
|
|
1372
|
-
collateralTokenProgram:
|
|
1271
|
+
collateralTokenProgram: token_1.TOKEN_PROGRAM_ADDRESS,
|
|
1373
1272
|
repayLiquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1374
1273
|
withdrawLiquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1375
|
-
instructionSysvarAccount:
|
|
1274
|
+
instructionSysvarAccount: sysvars_1.SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1376
1275
|
},
|
|
1377
1276
|
debtFarmsAccounts,
|
|
1378
1277
|
collateralFarmsAccounts,
|
|
1379
|
-
farmsProgram:
|
|
1278
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
1380
1279
|
}, this.kaminoMarket.programId);
|
|
1381
|
-
liquidateIx
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1280
|
+
liquidateIx = {
|
|
1281
|
+
...liquidateIx,
|
|
1282
|
+
accounts: this.obligation.state.elevationGroup > 0
|
|
1283
|
+
? liquidateIx.accounts.concat(depositReserveAccountMetas)
|
|
1284
|
+
: liquidateIx.accounts,
|
|
1285
|
+
};
|
|
1385
1286
|
this.lendingIxs.push(liquidateIx);
|
|
1386
1287
|
}
|
|
1387
1288
|
async addInBetweenIxs(action, includeAtaIxs, requestElevationGroup, addInitObligationForFarm, useV2Ixs) {
|
|
1388
1289
|
await this.addSupportIxsWithoutInitObligation(action, includeAtaIxs, useV2Ixs, 'inBetween', requestElevationGroup, addInitObligationForFarm);
|
|
1389
1290
|
}
|
|
1390
|
-
addRefreshObligation(crank) {
|
|
1391
|
-
const uniqueReserveAddresses = new
|
|
1291
|
+
async addRefreshObligation(crank) {
|
|
1292
|
+
const uniqueReserveAddresses = [...new Set(this.depositReserves.concat(this.borrowReserves))];
|
|
1392
1293
|
const addAllToSetupIxs = 'setup';
|
|
1393
1294
|
// Union of addresses
|
|
1394
1295
|
const allReservesExcludingCurrent = [...uniqueReserveAddresses];
|
|
1395
1296
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAllToSetupIxs);
|
|
1396
|
-
this.addRefreshFarmsForReserve(this.depositReserves.map((r) => this.kaminoMarket.getReserveByAddress(r)), addAllToSetupIxs, types_1.ReserveFarmKind.Collateral, crank);
|
|
1397
|
-
this.addRefreshFarmsForReserve(this.borrowReserves.map((r) => this.kaminoMarket.getReserveByAddress(r)), addAllToSetupIxs, types_1.ReserveFarmKind.Debt, crank);
|
|
1398
|
-
this.addRefreshObligationIx(addAllToSetupIxs);
|
|
1297
|
+
await this.addRefreshFarmsForReserve(this.depositReserves.map((r) => this.kaminoMarket.getReserveByAddress(r)), addAllToSetupIxs, types_1.ReserveFarmKind.Collateral, crank);
|
|
1298
|
+
await this.addRefreshFarmsForReserve(this.borrowReserves.map((r) => this.kaminoMarket.getReserveByAddress(r)), addAllToSetupIxs, types_1.ReserveFarmKind.Debt, crank);
|
|
1299
|
+
await this.addRefreshObligationIx(addAllToSetupIxs);
|
|
1399
1300
|
}
|
|
1400
1301
|
async addSupportIxsWithoutInitObligation(action, includeAtaIxs, useV2Ixs, addAsSupportIx = 'setup', requestElevationGroup = false, addInitObligationForFarm = false, twoTokenAction = false, overrideElevationGroupRequest) {
|
|
1401
1302
|
// TODO: why are we not doing this first?
|
|
@@ -1450,7 +1351,7 @@ class KaminoAction {
|
|
|
1450
1351
|
}
|
|
1451
1352
|
}
|
|
1452
1353
|
}
|
|
1453
|
-
else if (action === 'liquidate' &&
|
|
1354
|
+
else if (action === 'liquidate' && this.outflowReserve.address !== this.reserve.address) {
|
|
1454
1355
|
currentReserves = [this.outflowReserve, this.reserve];
|
|
1455
1356
|
}
|
|
1456
1357
|
else {
|
|
@@ -1460,10 +1361,10 @@ class KaminoAction {
|
|
|
1460
1361
|
else {
|
|
1461
1362
|
currentReserves = [this.reserve];
|
|
1462
1363
|
}
|
|
1463
|
-
const uniqueReserveAddresses = new
|
|
1464
|
-
const currentReserveAddresses = new
|
|
1364
|
+
const uniqueReserveAddresses = new Set(this.depositReserves.concat(this.borrowReserves));
|
|
1365
|
+
const currentReserveAddresses = new Set(currentReserves.map((reserve) => reserve.address));
|
|
1465
1366
|
// Union of addresses
|
|
1466
|
-
const allReservesExcludingCurrent = [...uniqueReserveAddresses
|
|
1367
|
+
const allReservesExcludingCurrent = [...uniqueReserveAddresses].filter((address) => !currentReserveAddresses.has(address));
|
|
1467
1368
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAsSupportIx);
|
|
1468
1369
|
if (addInitObligationForFarm) {
|
|
1469
1370
|
if (action === 'liquidate') {
|
|
@@ -1499,7 +1400,7 @@ class KaminoAction {
|
|
|
1499
1400
|
}
|
|
1500
1401
|
}
|
|
1501
1402
|
}
|
|
1502
|
-
this.addRefreshReserveIxs(currentReserveAddresses
|
|
1403
|
+
this.addRefreshReserveIxs([...currentReserveAddresses], addAsSupportIx);
|
|
1503
1404
|
if (action === 'repayAndWithdraw' && addAsSupportIx === 'inBetween') {
|
|
1504
1405
|
if (!(0, obligation_1.isKaminoObligation)(this.obligation)) {
|
|
1505
1406
|
throw new Error(`obligation is not a KaminoObligation`);
|
|
@@ -1511,10 +1412,10 @@ class KaminoAction {
|
|
|
1511
1412
|
const repaidBorrowReservesToSkip = repayObligationLiquidity.amount.lte(new decimal_js_1.default(this.amount.toString()))
|
|
1512
1413
|
? [repayObligationLiquidity.reserveAddress]
|
|
1513
1414
|
: [];
|
|
1514
|
-
this.addRefreshObligationIx(addAsSupportIx, repaidBorrowReservesToSkip);
|
|
1415
|
+
await this.addRefreshObligationIx(addAsSupportIx, repaidBorrowReservesToSkip);
|
|
1515
1416
|
}
|
|
1516
1417
|
else {
|
|
1517
|
-
this.addRefreshObligationIx(addAsSupportIx);
|
|
1418
|
+
await this.addRefreshObligationIx(addAsSupportIx);
|
|
1518
1419
|
}
|
|
1519
1420
|
if (requestElevationGroup) {
|
|
1520
1421
|
if (action === 'repay' || action === 'repayAndWithdrawV2') {
|
|
@@ -1530,8 +1431,8 @@ class KaminoAction {
|
|
|
1530
1431
|
this.obligation.state.elevationGroup !== 0) {
|
|
1531
1432
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, 'cleanup');
|
|
1532
1433
|
// Skip the borrow reserve, since we repay in the same tx
|
|
1533
|
-
this.addRefreshObligationIx('cleanup', [this.reserve.address]);
|
|
1534
|
-
this.addRequestElevationIx(overrideElevationGroupRequest ?? 0, 'cleanup', [this.reserve.address]);
|
|
1434
|
+
await this.addRefreshObligationIx('cleanup', [this.reserve.address]);
|
|
1435
|
+
await this.addRequestElevationIx(overrideElevationGroupRequest ?? 0, 'cleanup', [this.reserve.address]);
|
|
1535
1436
|
}
|
|
1536
1437
|
}
|
|
1537
1438
|
else if (action === 'depositAndBorrow' || action === 'borrow') {
|
|
@@ -1578,10 +1479,10 @@ class KaminoAction {
|
|
|
1578
1479
|
}
|
|
1579
1480
|
if (newElevationGroup >= 0 &&
|
|
1580
1481
|
newElevationGroup !== ((0, obligation_1.isKaminoObligation)(this.obligation) ? this.obligation.state.elevationGroup : 0)) {
|
|
1581
|
-
this.addRequestElevationIx(newElevationGroup, addAsSupportIx);
|
|
1482
|
+
await this.addRequestElevationIx(newElevationGroup, addAsSupportIx);
|
|
1582
1483
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAsSupportIx);
|
|
1583
|
-
this.addRefreshReserveIxs(currentReserveAddresses
|
|
1584
|
-
this.addRefreshObligationIx(addAsSupportIx);
|
|
1484
|
+
this.addRefreshReserveIxs([...currentReserveAddresses], addAsSupportIx);
|
|
1485
|
+
await this.addRefreshObligationIx(addAsSupportIx);
|
|
1585
1486
|
if (action === 'borrow') {
|
|
1586
1487
|
if (!(0, obligation_1.isKaminoObligation)(this.obligation)) {
|
|
1587
1488
|
throw new Error(`obligation is not a KaminoObligation`);
|
|
@@ -1596,10 +1497,10 @@ class KaminoAction {
|
|
|
1596
1497
|
((0, obligation_1.isKaminoObligation)(this.obligation) ? this.obligation.state.elevationGroup : 0)) {
|
|
1597
1498
|
const addAsSupportIx = 'setup';
|
|
1598
1499
|
console.log('Deposit: Requesting elevation group', overrideElevationGroupRequest);
|
|
1599
|
-
this.addRequestElevationIx(overrideElevationGroupRequest, addAsSupportIx);
|
|
1500
|
+
await this.addRequestElevationIx(overrideElevationGroupRequest, addAsSupportIx);
|
|
1600
1501
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAsSupportIx);
|
|
1601
|
-
this.addRefreshReserveIxs(currentReserveAddresses
|
|
1602
|
-
this.addRefreshObligationIx(addAsSupportIx);
|
|
1502
|
+
this.addRefreshReserveIxs([...currentReserveAddresses], addAsSupportIx);
|
|
1503
|
+
await this.addRefreshObligationIx(addAsSupportIx);
|
|
1603
1504
|
}
|
|
1604
1505
|
else if (action === 'withdraw' &&
|
|
1605
1506
|
overrideElevationGroupRequest !== undefined
|
|
@@ -1608,8 +1509,8 @@ class KaminoAction {
|
|
|
1608
1509
|
console.log('Withdraw: Requesting elevation group', overrideElevationGroupRequest);
|
|
1609
1510
|
// Skip the withdrawn reserve if we are in the process of closing it:
|
|
1610
1511
|
const skipReserveIfClosing = this.amount.eq(new bn_js_1.default(utils_1.U64_MAX)) ? [this.reserve.address] : [];
|
|
1611
|
-
this.addRefreshObligationIx('cleanup', skipReserveIfClosing);
|
|
1612
|
-
this.addRequestElevationIx(overrideElevationGroupRequest, 'cleanup', skipReserveIfClosing);
|
|
1512
|
+
await this.addRefreshObligationIx('cleanup', skipReserveIfClosing);
|
|
1513
|
+
await this.addRequestElevationIx(overrideElevationGroupRequest, 'cleanup', skipReserveIfClosing);
|
|
1613
1514
|
}
|
|
1614
1515
|
}
|
|
1615
1516
|
if (!useV2Ixs) {
|
|
@@ -1617,17 +1518,17 @@ class KaminoAction {
|
|
|
1617
1518
|
// If this is an setup ix (therefore not an in-between), it means it's either a one off action
|
|
1618
1519
|
// or the first of a two-token-action
|
|
1619
1520
|
if (action === 'liquidate') {
|
|
1620
|
-
this.addRefreshFarmsForReserve([this.outflowReserve], addAsSupportIx, types_1.ReserveFarmKind.Collateral);
|
|
1621
|
-
this.addRefreshFarmsForReserve([this.reserve], addAsSupportIx, types_1.ReserveFarmKind.Debt);
|
|
1521
|
+
await this.addRefreshFarmsForReserve([this.outflowReserve], addAsSupportIx, types_1.ReserveFarmKind.Collateral);
|
|
1522
|
+
await this.addRefreshFarmsForReserve([this.reserve], addAsSupportIx, types_1.ReserveFarmKind.Debt);
|
|
1622
1523
|
}
|
|
1623
1524
|
else if (action === 'depositAndBorrow' ||
|
|
1624
1525
|
action === 'depositCollateral' ||
|
|
1625
1526
|
action === 'withdraw' ||
|
|
1626
1527
|
action === 'deposit') {
|
|
1627
|
-
this.addRefreshFarmsForReserve(currentReserves, addAsSupportIx, types_1.ReserveFarmKind.Collateral, undefined, twoTokenAction);
|
|
1528
|
+
await this.addRefreshFarmsForReserve(currentReserves, addAsSupportIx, types_1.ReserveFarmKind.Collateral, undefined, twoTokenAction);
|
|
1628
1529
|
}
|
|
1629
1530
|
else if (action === 'repayAndWithdraw' || action === 'borrow' || action === 'repay') {
|
|
1630
|
-
this.addRefreshFarmsForReserve(currentReserves, addAsSupportIx, types_1.ReserveFarmKind.Debt, undefined, twoTokenAction);
|
|
1531
|
+
await this.addRefreshFarmsForReserve(currentReserves, addAsSupportIx, types_1.ReserveFarmKind.Debt, undefined, twoTokenAction);
|
|
1631
1532
|
}
|
|
1632
1533
|
else {
|
|
1633
1534
|
throw new Error(`Could not decide on refresh farm for action ${action}`);
|
|
@@ -1638,10 +1539,10 @@ class KaminoAction {
|
|
|
1638
1539
|
// so we skip the refresh farm obligation of the first reserve as that operation already happened
|
|
1639
1540
|
// add added to 'setup' ixs
|
|
1640
1541
|
if (action === 'depositAndBorrow') {
|
|
1641
|
-
this.addRefreshFarmsForReserve([this.outflowReserve], addAsSupportIx, types_1.ReserveFarmKind.Debt);
|
|
1542
|
+
await this.addRefreshFarmsForReserve([this.outflowReserve], addAsSupportIx, types_1.ReserveFarmKind.Debt);
|
|
1642
1543
|
}
|
|
1643
1544
|
else if (action === 'repayAndWithdraw') {
|
|
1644
|
-
this.addRefreshFarmsForReserve([this.outflowReserve], addAsSupportIx, types_1.ReserveFarmKind.Collateral);
|
|
1545
|
+
await this.addRefreshFarmsForReserve([this.outflowReserve], addAsSupportIx, types_1.ReserveFarmKind.Collateral);
|
|
1645
1546
|
}
|
|
1646
1547
|
else {
|
|
1647
1548
|
throw new Error(`Could not decide on refresh farm for action ${action}`);
|
|
@@ -1652,38 +1553,45 @@ class KaminoAction {
|
|
|
1652
1553
|
}
|
|
1653
1554
|
async addSupportIxs(action, includeAtaIxs, requestElevationGroup, addInitObligationForFarm, useV2Ixs, scopeRefreshConfig, initUserMetadata, twoTokenAction = false, overrideElevationGroupRequest) {
|
|
1654
1555
|
if (!['mint', 'redeem'].includes(action)) {
|
|
1655
|
-
const [, ownerUserMetadata] = await this.kaminoMarket.getUserMetadata(this.owner);
|
|
1556
|
+
const [, ownerUserMetadata] = await this.kaminoMarket.getUserMetadata(this.owner.address);
|
|
1656
1557
|
if (!ownerUserMetadata && !initUserMetadata.skipInitialization) {
|
|
1657
|
-
let lookupTable =
|
|
1558
|
+
let lookupTable = utils_1.DEFAULT_PUBLIC_KEY;
|
|
1658
1559
|
if (!initUserMetadata.skipLutCreation) {
|
|
1659
|
-
const [createLutIx, lookupTableAddress] = await (0, utils_1.createLookupTableIx)(this.kaminoMarket.
|
|
1560
|
+
const [createLutIx, lookupTableAddress] = await (0, utils_1.createLookupTableIx)(this.kaminoMarket.getRpc(), this.owner);
|
|
1660
1561
|
lookupTable = lookupTableAddress;
|
|
1661
1562
|
this.setupIxs.push(createLutIx);
|
|
1662
|
-
this.setupIxsLabels.push(`createUserLutIx[${lookupTableAddress
|
|
1563
|
+
this.setupIxsLabels.push(`createUserLutIx[${lookupTableAddress}]`);
|
|
1663
1564
|
}
|
|
1664
|
-
this.addInitUserMetadataIxs(lookupTable);
|
|
1565
|
+
await this.addInitUserMetadataIxs(lookupTable);
|
|
1665
1566
|
}
|
|
1666
1567
|
await this.addInitObligationIxs();
|
|
1667
1568
|
}
|
|
1668
1569
|
await this.addSupportIxsWithoutInitObligation(action, includeAtaIxs, useV2Ixs, 'setup', requestElevationGroup, addInitObligationForFarm, twoTokenAction, overrideElevationGroupRequest);
|
|
1669
|
-
const allReserves =
|
|
1670
|
-
...
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1570
|
+
const allReserves = [
|
|
1571
|
+
...new Set([
|
|
1572
|
+
...this.depositReserves,
|
|
1573
|
+
...this.borrowReserves,
|
|
1574
|
+
this.reserve.address,
|
|
1575
|
+
...(this.outflowReserve ? [this.outflowReserve.address] : []),
|
|
1576
|
+
...(this.preLoadedDepositReservesSameTx ? this.preLoadedDepositReservesSameTx : []),
|
|
1577
|
+
]),
|
|
1578
|
+
];
|
|
1579
|
+
const scopeTokensMap = (0, market_1.getTokenIdsForScopeRefresh)(this.kaminoMarket, allReserves);
|
|
1580
|
+
if (scopeTokensMap.size > 0 && scopeRefreshConfig) {
|
|
1581
|
+
for (const [configPubkey, config] of scopeRefreshConfig.scopeConfigurations) {
|
|
1582
|
+
const tokenIds = scopeTokensMap.get(config.oraclePrices);
|
|
1583
|
+
if (tokenIds && tokenIds.length > 0) {
|
|
1584
|
+
await this.addScopeRefreshIxs(scopeRefreshConfig.scope, tokenIds, configPubkey);
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
static optionalAccount(pubkey) {
|
|
1682
1590
|
if ((0, utils_1.isNotNullPubkey)(pubkey)) {
|
|
1683
|
-
return pubkey;
|
|
1591
|
+
return (0, kit_1.some)(pubkey);
|
|
1684
1592
|
}
|
|
1685
1593
|
else {
|
|
1686
|
-
return
|
|
1594
|
+
return (0, kit_1.none)();
|
|
1687
1595
|
}
|
|
1688
1596
|
}
|
|
1689
1597
|
addRefreshReserveIxs(reserves, addAsSupportIx = 'setup') {
|
|
@@ -1696,10 +1604,10 @@ class KaminoAction {
|
|
|
1696
1604
|
const refreshReserveIx = (0, instructions_1.refreshReserve)({
|
|
1697
1605
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1698
1606
|
reserve: reserveAddress,
|
|
1699
|
-
pythOracle: KaminoAction.optionalAccount(state.config.tokenInfo.pythConfiguration.price
|
|
1700
|
-
switchboardPriceOracle: KaminoAction.optionalAccount(state.config.tokenInfo.switchboardConfiguration.priceAggregator
|
|
1701
|
-
switchboardTwapOracle: KaminoAction.optionalAccount(state.config.tokenInfo.switchboardConfiguration.twapAggregator
|
|
1702
|
-
scopePrices: KaminoAction.optionalAccount(state.config.tokenInfo.scopeConfiguration.priceFeed
|
|
1607
|
+
pythOracle: KaminoAction.optionalAccount(state.config.tokenInfo.pythConfiguration.price),
|
|
1608
|
+
switchboardPriceOracle: KaminoAction.optionalAccount(state.config.tokenInfo.switchboardConfiguration.priceAggregator),
|
|
1609
|
+
switchboardTwapOracle: KaminoAction.optionalAccount(state.config.tokenInfo.switchboardConfiguration.twapAggregator),
|
|
1610
|
+
scopePrices: KaminoAction.optionalAccount(state.config.tokenInfo.scopeConfiguration.priceFeed),
|
|
1703
1611
|
}, this.kaminoMarket.programId);
|
|
1704
1612
|
if (addAsSupportIx === 'setup') {
|
|
1705
1613
|
this.setupIxs.push(refreshReserveIx);
|
|
@@ -1725,43 +1633,43 @@ class KaminoAction {
|
|
|
1725
1633
|
return (0, instructions_1.refreshReserve)({
|
|
1726
1634
|
reserve: reserveAddress,
|
|
1727
1635
|
lendingMarket: state.lendingMarket,
|
|
1728
|
-
pythOracle: this.optionalAccount(state.config.tokenInfo.pythConfiguration.price
|
|
1729
|
-
switchboardPriceOracle: this.optionalAccount(state.config.tokenInfo.switchboardConfiguration.priceAggregator
|
|
1730
|
-
switchboardTwapOracle: this.optionalAccount(state.config.tokenInfo.switchboardConfiguration.twapAggregator
|
|
1731
|
-
scopePrices: this.optionalAccount(state.config.tokenInfo.scopeConfiguration.priceFeed
|
|
1636
|
+
pythOracle: this.optionalAccount(state.config.tokenInfo.pythConfiguration.price),
|
|
1637
|
+
switchboardPriceOracle: this.optionalAccount(state.config.tokenInfo.switchboardConfiguration.priceAggregator),
|
|
1638
|
+
switchboardTwapOracle: this.optionalAccount(state.config.tokenInfo.switchboardConfiguration.twapAggregator),
|
|
1639
|
+
scopePrices: this.optionalAccount(state.config.tokenInfo.scopeConfiguration.priceFeed),
|
|
1732
1640
|
}, kaminoMarket.programId);
|
|
1733
1641
|
});
|
|
1734
1642
|
}
|
|
1735
|
-
addRefreshObligationIx(addAsSupportIx = 'setup', skipReserves = []) {
|
|
1643
|
+
async addRefreshObligationIx(addAsSupportIx = 'setup', skipReserves = []) {
|
|
1736
1644
|
const marketAddress = this.kaminoMarket.getAddress();
|
|
1737
|
-
const obligationPda = this.getObligationPda();
|
|
1738
|
-
|
|
1645
|
+
const obligationPda = await this.getObligationPda();
|
|
1646
|
+
let refreshObligationIx = (0, instructions_1.refreshObligation)({
|
|
1739
1647
|
lendingMarket: marketAddress,
|
|
1740
1648
|
obligation: obligationPda,
|
|
1741
1649
|
}, this.kaminoMarket.programId);
|
|
1742
|
-
const skipReservesSet = new
|
|
1743
|
-
const depositReservesList = this.getAdditionalDepositReservesList().filter((reserve) => !skipReservesSet.
|
|
1650
|
+
const skipReservesSet = new Set(skipReserves);
|
|
1651
|
+
const depositReservesList = this.getAdditionalDepositReservesList().filter((reserve) => !skipReservesSet.has(reserve));
|
|
1744
1652
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1745
|
-
return {
|
|
1653
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
1746
1654
|
});
|
|
1747
|
-
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipReservesSet.
|
|
1655
|
+
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipReservesSet.has(reserve));
|
|
1748
1656
|
const borrowReserveAccountMetas = borrowReservesList.map((reserve) => {
|
|
1749
|
-
return {
|
|
1657
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
1750
1658
|
});
|
|
1751
|
-
const borrowReservesReferrerTokenStates =
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
return
|
|
1755
|
-
}
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1659
|
+
const borrowReservesReferrerTokenStates = [];
|
|
1660
|
+
if ((0, kit_1.isSome)(this.referrer)) {
|
|
1661
|
+
borrowReservesReferrerTokenStates.push(...(await Promise.all(borrowReservesList.map((reserve) => {
|
|
1662
|
+
return this.getReferrerTokenStateAccountMeta(reserve, true);
|
|
1663
|
+
}))));
|
|
1664
|
+
}
|
|
1665
|
+
refreshObligationIx = {
|
|
1666
|
+
...refreshObligationIx,
|
|
1667
|
+
accounts: refreshObligationIx.accounts.concat([
|
|
1668
|
+
...depositReserveAccountMetas,
|
|
1669
|
+
...borrowReserveAccountMetas,
|
|
1670
|
+
...borrowReservesReferrerTokenStates,
|
|
1671
|
+
]),
|
|
1672
|
+
};
|
|
1765
1673
|
if (addAsSupportIx === 'setup') {
|
|
1766
1674
|
this.setupIxs.push(refreshObligationIx);
|
|
1767
1675
|
this.setupIxsLabels.push(`RefreshObligation[${obligationPda.toString()}]`);
|
|
@@ -1775,8 +1683,8 @@ class KaminoAction {
|
|
|
1775
1683
|
this.cleanupIxsLabels.push(`RefreshObligation[${obligationPda.toString()}]`);
|
|
1776
1684
|
}
|
|
1777
1685
|
}
|
|
1778
|
-
addRequestElevationIx(elevationGroup, addAsSupportIx, skipReserves = []) {
|
|
1779
|
-
const obligationPda = this.getObligationPda();
|
|
1686
|
+
async addRequestElevationIx(elevationGroup, addAsSupportIx, skipReserves = []) {
|
|
1687
|
+
const obligationPda = await this.getObligationPda();
|
|
1780
1688
|
const args = {
|
|
1781
1689
|
elevationGroup,
|
|
1782
1690
|
};
|
|
@@ -1785,31 +1693,30 @@ class KaminoAction {
|
|
|
1785
1693
|
obligation: obligationPda,
|
|
1786
1694
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1787
1695
|
};
|
|
1788
|
-
|
|
1789
|
-
const skipReservesSet = new
|
|
1790
|
-
const depositReservesList = this.getAdditionalDepositReservesList().filter((reserve) => !skipReservesSet.
|
|
1696
|
+
let requestElevationGroupIx = (0, instructions_1.requestElevationGroup)(args, accounts, this.kaminoMarket.programId);
|
|
1697
|
+
const skipReservesSet = new Set(skipReserves);
|
|
1698
|
+
const depositReservesList = this.getAdditionalDepositReservesList().filter((reserve) => !skipReservesSet.has(reserve));
|
|
1791
1699
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1792
|
-
return {
|
|
1700
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
1793
1701
|
});
|
|
1794
|
-
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipReservesSet.
|
|
1702
|
+
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipReservesSet.has(reserve));
|
|
1795
1703
|
const borrowReserveAccountMetas = borrowReservesList.map((reserve) => {
|
|
1796
|
-
return {
|
|
1704
|
+
return { address: reserve, role: kit_1.AccountRole.WRITABLE };
|
|
1797
1705
|
});
|
|
1798
|
-
const borrowReservesReferrerTokenStates =
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
return
|
|
1802
|
-
}
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
]);
|
|
1706
|
+
const borrowReservesReferrerTokenStates = [];
|
|
1707
|
+
if ((0, kit_1.isSome)(this.referrer)) {
|
|
1708
|
+
borrowReservesReferrerTokenStates.push(...(await Promise.all(borrowReservesList.map((reserve) => {
|
|
1709
|
+
return this.getReferrerTokenStateAccountMeta(reserve, false);
|
|
1710
|
+
}))));
|
|
1711
|
+
}
|
|
1712
|
+
requestElevationGroupIx = {
|
|
1713
|
+
...requestElevationGroupIx,
|
|
1714
|
+
accounts: requestElevationGroupIx.accounts.concat([
|
|
1715
|
+
...depositReserveAccountMetas,
|
|
1716
|
+
...borrowReserveAccountMetas,
|
|
1717
|
+
...borrowReservesReferrerTokenStates,
|
|
1718
|
+
]),
|
|
1719
|
+
};
|
|
1813
1720
|
if (addAsSupportIx === 'setup') {
|
|
1814
1721
|
this.setupIxs.push(requestElevationGroupIx);
|
|
1815
1722
|
this.setupIxsLabels.push(`RequestElevation[${obligationPda}], elevation_group:${elevationGroup}`);
|
|
@@ -1823,63 +1730,65 @@ class KaminoAction {
|
|
|
1823
1730
|
this.cleanupIxsLabels.push(`RequestElevation[${obligationPda}], elevation_group:${elevationGroup}`);
|
|
1824
1731
|
}
|
|
1825
1732
|
}
|
|
1826
|
-
addRefreshFarmsForReserve(reserves, addAsSupportIx = 'setup', mode, crank = this.payer, twoTokenAction = false) {
|
|
1733
|
+
async addRefreshFarmsForReserve(reserves, addAsSupportIx = 'setup', mode, crank = this.payer, twoTokenAction = false) {
|
|
1827
1734
|
const farms = [];
|
|
1735
|
+
const obligationAddress = await this.getObligationPda();
|
|
1828
1736
|
for (const kaminoReserve of reserves) {
|
|
1829
|
-
if (mode === types_1.ReserveFarmKind.Collateral &&
|
|
1737
|
+
if (mode === types_1.ReserveFarmKind.Collateral && kaminoReserve.state.farmCollateral !== utils_1.DEFAULT_PUBLIC_KEY) {
|
|
1830
1738
|
farms.push([
|
|
1831
1739
|
types_1.ReserveFarmKind.Collateral,
|
|
1832
1740
|
kaminoReserve.state.farmCollateral,
|
|
1833
|
-
(0, utils_1.obligationFarmStatePda)(kaminoReserve.state.farmCollateral,
|
|
1741
|
+
await (0, utils_1.obligationFarmStatePda)(kaminoReserve.state.farmCollateral, obligationAddress),
|
|
1834
1742
|
kaminoReserve,
|
|
1835
1743
|
]);
|
|
1836
1744
|
}
|
|
1837
|
-
if (mode === types_1.ReserveFarmKind.Debt &&
|
|
1745
|
+
if (mode === types_1.ReserveFarmKind.Debt && kaminoReserve.state.farmDebt !== utils_1.DEFAULT_PUBLIC_KEY) {
|
|
1838
1746
|
farms.push([
|
|
1839
1747
|
types_1.ReserveFarmKind.Debt,
|
|
1840
1748
|
kaminoReserve.state.farmDebt,
|
|
1841
|
-
(0, utils_1.obligationFarmStatePda)(kaminoReserve.state.farmDebt,
|
|
1749
|
+
await (0, utils_1.obligationFarmStatePda)(kaminoReserve.state.farmDebt, obligationAddress),
|
|
1842
1750
|
kaminoReserve,
|
|
1843
1751
|
]);
|
|
1844
1752
|
}
|
|
1845
1753
|
}
|
|
1846
|
-
|
|
1754
|
+
const lendingMarketAuthority = await this.kaminoMarket.getLendingMarketAuthority();
|
|
1755
|
+
for (const arg of farms) {
|
|
1847
1756
|
const args = { mode: arg[0].discriminator };
|
|
1848
1757
|
const accounts = {
|
|
1849
1758
|
crank,
|
|
1850
1759
|
baseAccounts: {
|
|
1851
|
-
obligation:
|
|
1852
|
-
lendingMarketAuthority
|
|
1760
|
+
obligation: obligationAddress,
|
|
1761
|
+
lendingMarketAuthority,
|
|
1853
1762
|
reserve: arg[3].address,
|
|
1854
1763
|
reserveFarmState: arg[1],
|
|
1855
1764
|
obligationFarmUserState: arg[2],
|
|
1856
1765
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1857
1766
|
},
|
|
1858
|
-
farmsProgram:
|
|
1859
|
-
rent:
|
|
1860
|
-
systemProgram:
|
|
1767
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
1768
|
+
rent: sysvars_1.SYSVAR_RENT_ADDRESS,
|
|
1769
|
+
systemProgram: system_1.SYSTEM_PROGRAM_ADDRESS,
|
|
1861
1770
|
};
|
|
1862
1771
|
const refreshFarmForObligationix = (0, instructions_1.refreshObligationFarmsForReserve)(args, accounts, this.kaminoMarket.programId);
|
|
1863
1772
|
if (addAsSupportIx === 'setup') {
|
|
1864
1773
|
this.setupIxs.push(refreshFarmForObligationix);
|
|
1865
|
-
this.setupIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${this.getObligationPda()
|
|
1774
|
+
this.setupIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${await this.getObligationPda()}]`);
|
|
1866
1775
|
if (twoTokenAction) {
|
|
1867
1776
|
// If two token action, this refresh needs to be the first inbetween ix
|
|
1868
1777
|
this.inBetweenIxs.push(refreshFarmForObligationix);
|
|
1869
|
-
this.inBetweenIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${this.getObligationPda()
|
|
1778
|
+
this.inBetweenIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${await this.getObligationPda()}]`);
|
|
1870
1779
|
}
|
|
1871
1780
|
else {
|
|
1872
1781
|
this.refreshFarmsCleanupTxnIxs.push(refreshFarmForObligationix);
|
|
1873
|
-
this.refreshFarmsCleanupTxnIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${this.getObligationPda()
|
|
1782
|
+
this.refreshFarmsCleanupTxnIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${await this.getObligationPda()}]`);
|
|
1874
1783
|
}
|
|
1875
1784
|
}
|
|
1876
1785
|
else if (addAsSupportIx === 'inBetween') {
|
|
1877
1786
|
this.inBetweenIxs.push(refreshFarmForObligationix);
|
|
1878
|
-
this.inBetweenIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${this.getObligationPda()
|
|
1787
|
+
this.inBetweenIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${await this.getObligationPda()}]`);
|
|
1879
1788
|
this.refreshFarmsCleanupTxnIxs.push(refreshFarmForObligationix);
|
|
1880
|
-
this.refreshFarmsCleanupTxnIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${this.getObligationPda()
|
|
1789
|
+
this.refreshFarmsCleanupTxnIxsLabels.push(`RefreshFarmForObligation[${arg[0].kind}, res=${arg[3].address.toString()}, obl=${await this.getObligationPda()}]`);
|
|
1881
1790
|
}
|
|
1882
|
-
}
|
|
1791
|
+
}
|
|
1883
1792
|
}
|
|
1884
1793
|
addRefreshFarmsCleanupTxnIxsToCleanupIxs() {
|
|
1885
1794
|
this.cleanupIxs.splice(0, 0, ...this.refreshFarmsCleanupTxnIxs);
|
|
@@ -1887,50 +1796,52 @@ class KaminoAction {
|
|
|
1887
1796
|
}
|
|
1888
1797
|
async addInitObligationForFarm(reserve, mode, addAsSupportIx = 'setup') {
|
|
1889
1798
|
const farms = [];
|
|
1799
|
+
const obligationAddress = await this.getObligationPda();
|
|
1890
1800
|
if (mode === types_1.ReserveFarmKind.Collateral && (0, utils_1.isNotNullPubkey)(reserve.state.farmCollateral)) {
|
|
1891
|
-
const pda = (0, utils_1.obligationFarmStatePda)(reserve.state.farmCollateral,
|
|
1892
|
-
const account = await this.kaminoMarket.
|
|
1893
|
-
if (!account) {
|
|
1801
|
+
const pda = await (0, utils_1.obligationFarmStatePda)(reserve.state.farmCollateral, obligationAddress);
|
|
1802
|
+
const account = await (0, kit_1.fetchEncodedAccount)(this.kaminoMarket.getRpc(), pda);
|
|
1803
|
+
if (!account.exists) {
|
|
1894
1804
|
farms.push([types_1.ReserveFarmKind.Collateral.discriminator, reserve.state.farmCollateral, pda]);
|
|
1895
1805
|
}
|
|
1896
1806
|
}
|
|
1897
1807
|
if (mode === types_1.ReserveFarmKind.Debt && (0, utils_1.isNotNullPubkey)(reserve.state.farmDebt)) {
|
|
1898
|
-
const pda = (0, utils_1.obligationFarmStatePda)(reserve.state.farmDebt,
|
|
1899
|
-
const account = await this.kaminoMarket.
|
|
1900
|
-
if (!account) {
|
|
1808
|
+
const pda = await (0, utils_1.obligationFarmStatePda)(reserve.state.farmDebt, obligationAddress);
|
|
1809
|
+
const account = await (0, kit_1.fetchEncodedAccount)(this.kaminoMarket.getRpc(), pda);
|
|
1810
|
+
if (!account.exists) {
|
|
1901
1811
|
farms.push([types_1.ReserveFarmKind.Debt.discriminator, reserve.state.farmDebt, pda]);
|
|
1902
1812
|
}
|
|
1903
1813
|
}
|
|
1814
|
+
const lendingMarketAuthority = await this.kaminoMarket.getLendingMarketAuthority();
|
|
1904
1815
|
farms.forEach((arg) => {
|
|
1905
1816
|
const args = { mode: arg[0] };
|
|
1906
1817
|
const accounts = {
|
|
1907
|
-
owner: (0, obligation_1.isKaminoObligation)(this.obligation) ? this.obligation.state.owner : this.owner,
|
|
1818
|
+
owner: (0, obligation_1.isKaminoObligation)(this.obligation) ? this.obligation.state.owner : this.owner.address,
|
|
1908
1819
|
payer: this.owner,
|
|
1909
|
-
obligation:
|
|
1910
|
-
lendingMarketAuthority
|
|
1820
|
+
obligation: obligationAddress,
|
|
1821
|
+
lendingMarketAuthority,
|
|
1911
1822
|
reserve: reserve.address,
|
|
1912
1823
|
reserveFarmState: arg[1],
|
|
1913
1824
|
obligationFarm: arg[2],
|
|
1914
1825
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1915
|
-
farmsProgram:
|
|
1916
|
-
rent:
|
|
1917
|
-
systemProgram:
|
|
1826
|
+
farmsProgram: programId_1.PROGRAM_ID,
|
|
1827
|
+
rent: sysvars_1.SYSVAR_RENT_ADDRESS,
|
|
1828
|
+
systemProgram: system_1.SYSTEM_PROGRAM_ADDRESS,
|
|
1918
1829
|
};
|
|
1919
1830
|
const initObligationForFarm = (0, instructions_1.initObligationFarmsForReserve)(args, accounts, this.kaminoMarket.programId);
|
|
1920
1831
|
if (addAsSupportIx === 'setup') {
|
|
1921
1832
|
this.setupIxs.push(initObligationForFarm);
|
|
1922
|
-
this.setupIxsLabels.push(`InitObligationForFarm[${reserve.address.toString()}, ${
|
|
1833
|
+
this.setupIxsLabels.push(`InitObligationForFarm[${reserve.address.toString()}, ${obligationAddress.toString()}]`);
|
|
1923
1834
|
}
|
|
1924
1835
|
else if (addAsSupportIx === 'inBetween') {
|
|
1925
1836
|
this.inBetweenIxs.push(initObligationForFarm);
|
|
1926
|
-
this.inBetweenIxsLabels.push(`InitObligationForFarm[${reserve.address.toString()}, ${
|
|
1837
|
+
this.inBetweenIxsLabels.push(`InitObligationForFarm[${reserve.address.toString()}, ${obligationAddress.toString()}]`);
|
|
1927
1838
|
}
|
|
1928
1839
|
});
|
|
1929
1840
|
}
|
|
1930
|
-
addInitObligationIxs() {
|
|
1841
|
+
async addInitObligationIxs() {
|
|
1931
1842
|
if (!(0, obligation_1.isKaminoObligation)(this.obligation)) {
|
|
1932
|
-
const obligationPda = this.getObligationPda();
|
|
1933
|
-
const [userMetadataAddress
|
|
1843
|
+
const obligationPda = await this.getObligationPda();
|
|
1844
|
+
const [userMetadataAddress] = await (0, utils_1.userMetadataPda)(this.owner.address, this.kaminoMarket.programId);
|
|
1934
1845
|
const initObligationIx = (0, instructions_1.initObligation)({
|
|
1935
1846
|
args: {
|
|
1936
1847
|
tag: this.obligation.toArgs().tag,
|
|
@@ -1944,18 +1855,16 @@ class KaminoAction {
|
|
|
1944
1855
|
seed1Account: this.obligation.toArgs().seed1,
|
|
1945
1856
|
seed2Account: this.obligation.toArgs().seed2,
|
|
1946
1857
|
ownerUserMetadata: userMetadataAddress,
|
|
1947
|
-
rent:
|
|
1948
|
-
systemProgram:
|
|
1858
|
+
rent: sysvars_1.SYSVAR_RENT_ADDRESS,
|
|
1859
|
+
systemProgram: system_1.SYSTEM_PROGRAM_ADDRESS,
|
|
1949
1860
|
}, this.kaminoMarket.programId);
|
|
1950
1861
|
this.setupIxs.push(initObligationIx);
|
|
1951
1862
|
this.setupIxsLabels.push(`InitObligation[${obligationPda.toString()}]`);
|
|
1952
1863
|
}
|
|
1953
1864
|
}
|
|
1954
|
-
addInitUserMetadataIxs(lookupTableAddress) {
|
|
1955
|
-
const [userMetadataAddress
|
|
1956
|
-
const referrerUserMetadataAddress = this.referrer.
|
|
1957
|
-
? this.kaminoMarket.programId
|
|
1958
|
-
: (0, utils_1.userMetadataPda)(this.referrer, this.kaminoMarket.programId)[0];
|
|
1865
|
+
async addInitUserMetadataIxs(lookupTableAddress) {
|
|
1866
|
+
const [userMetadataAddress] = await (0, utils_1.userMetadataPda)(this.owner.address, this.kaminoMarket.programId);
|
|
1867
|
+
const referrerUserMetadataAddress = await KaminoAction.getReferrerMetadataAccount(this.referrer, this.kaminoMarket.programId);
|
|
1959
1868
|
const initUserMetadataIx = (0, instructions_1.initUserMetadata)({
|
|
1960
1869
|
userLookupTable: lookupTableAddress,
|
|
1961
1870
|
}, {
|
|
@@ -1963,27 +1872,30 @@ class KaminoAction {
|
|
|
1963
1872
|
feePayer: this.payer,
|
|
1964
1873
|
userMetadata: userMetadataAddress,
|
|
1965
1874
|
referrerUserMetadata: referrerUserMetadataAddress,
|
|
1966
|
-
rent:
|
|
1967
|
-
systemProgram:
|
|
1875
|
+
rent: sysvars_1.SYSVAR_RENT_ADDRESS,
|
|
1876
|
+
systemProgram: system_1.SYSTEM_PROGRAM_ADDRESS,
|
|
1968
1877
|
}, this.kaminoMarket.programId);
|
|
1969
1878
|
this.setupIxs.push(initUserMetadataIx);
|
|
1970
1879
|
this.setupIxsLabels.push(`initUserMetadata[${userMetadataAddress.toString()}]`);
|
|
1971
1880
|
}
|
|
1972
1881
|
addInitReferrerTokenStateIx(reserve, referrerTokenState) {
|
|
1882
|
+
if ((0, kit_1.isNone)(this.referrer)) {
|
|
1883
|
+
throw new Error('Referrer is not set');
|
|
1884
|
+
}
|
|
1973
1885
|
const initReferrerTokenStateIx = (0, instructions_1.initReferrerTokenState)({
|
|
1974
1886
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1975
1887
|
payer: this.owner,
|
|
1976
1888
|
reserve: reserve.address,
|
|
1977
|
-
referrer: this.referrer,
|
|
1889
|
+
referrer: this.referrer.value,
|
|
1978
1890
|
referrerTokenState,
|
|
1979
|
-
rent:
|
|
1980
|
-
systemProgram:
|
|
1891
|
+
rent: sysvars_1.SYSVAR_RENT_ADDRESS,
|
|
1892
|
+
systemProgram: system_1.SYSTEM_PROGRAM_ADDRESS,
|
|
1981
1893
|
}, this.kaminoMarket.programId);
|
|
1982
1894
|
this.setupIxs.unshift(initReferrerTokenStateIx);
|
|
1983
1895
|
this.setupIxsLabels.unshift(`InitReferrerTokenState[${referrerTokenState.toString()} res=${reserve.address}]`);
|
|
1984
1896
|
}
|
|
1985
|
-
addWithdrawReferrerFeesIxs() {
|
|
1986
|
-
const referrerTokenStateAddress = (0, utils_1.referrerTokenStatePda)(this.owner, this.reserve.address, this.kaminoMarket.programId)
|
|
1897
|
+
async addWithdrawReferrerFeesIxs() {
|
|
1898
|
+
const referrerTokenStateAddress = await (0, utils_1.referrerTokenStatePda)(this.owner.address, this.reserve.address, this.kaminoMarket.programId);
|
|
1987
1899
|
const withdrawReferrerFeesIx = (0, instructions_1.withdrawReferrerFees)({
|
|
1988
1900
|
referrer: this.owner,
|
|
1989
1901
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
@@ -1991,8 +1903,8 @@ class KaminoAction {
|
|
|
1991
1903
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1992
1904
|
referrerTokenState: referrerTokenStateAddress,
|
|
1993
1905
|
reserveSupplyLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
1994
|
-
referrerTokenAccount: this.getUserTokenAccountAddress(this.reserve),
|
|
1995
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1906
|
+
referrerTokenAccount: await this.getUserTokenAccountAddress(this.reserve),
|
|
1907
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1996
1908
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1997
1909
|
}, this.kaminoMarket.programId);
|
|
1998
1910
|
this.lendingIxs.push(withdrawReferrerFeesIx);
|
|
@@ -2003,48 +1915,51 @@ class KaminoAction {
|
|
|
2003
1915
|
this.computeBudgetIxsLabels.push(`AddComputeBudget[${units}]`);
|
|
2004
1916
|
}
|
|
2005
1917
|
async addAtaIxs(action) {
|
|
2006
|
-
if (this.mint.
|
|
1918
|
+
if (this.mint === utils_1.WRAPPED_SOL_MINT || this.secondaryMint === utils_1.WRAPPED_SOL_MINT) {
|
|
2007
1919
|
await this.updateWSOLAccount(action);
|
|
2008
1920
|
}
|
|
2009
|
-
if ((action === 'withdraw' || action === 'borrow' || action === 'redeem') &&
|
|
2010
|
-
const
|
|
1921
|
+
if ((action === 'withdraw' || action === 'borrow' || action === 'redeem') && this.mint !== utils_1.WRAPPED_SOL_MINT) {
|
|
1922
|
+
const reserveAta = await this.getUserTokenAccountAddress(this.reserve);
|
|
1923
|
+
const [, createUserTokenAccountIx] = await (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.reserve.getLiquidityMint(), this.owner.address, this.reserve.getLiquidityTokenProgram(), reserveAta);
|
|
2011
1924
|
this.setupIxs.unshift(createUserTokenAccountIx);
|
|
2012
|
-
this.setupIxsLabels.unshift(`CreateLiquidityUserAta[${
|
|
1925
|
+
this.setupIxsLabels.unshift(`CreateLiquidityUserAta[${reserveAta}]`);
|
|
2013
1926
|
}
|
|
2014
1927
|
if (action === 'liquidate') {
|
|
2015
1928
|
if (!this.outflowReserve) {
|
|
2016
1929
|
throw new Error(`Outflow reserve state not found ${this.secondaryMint}`);
|
|
2017
1930
|
}
|
|
2018
|
-
const
|
|
1931
|
+
const outflowReserveAta = await this.getUserTokenAccountAddress(this.outflowReserve);
|
|
1932
|
+
const [, createUserTokenAccountIx] = await (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.outflowReserve.getLiquidityMint(), this.owner.address, this.outflowReserve.getLiquidityTokenProgram(), outflowReserveAta);
|
|
2019
1933
|
this.setupIxs.unshift(createUserTokenAccountIx);
|
|
2020
|
-
this.setupIxsLabels.unshift(`CreateUserAta[${
|
|
2021
|
-
const
|
|
1934
|
+
this.setupIxsLabels.unshift(`CreateUserAta[${outflowReserveAta}]`);
|
|
1935
|
+
const ctokenAta = await this.getUserCollateralAccountAddress(this.outflowReserve);
|
|
1936
|
+
const [, createUserCollateralAccountIx] = await (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.outflowReserve.getCTokenMint(), this.owner.address, token_1.TOKEN_PROGRAM_ADDRESS, ctokenAta);
|
|
2022
1937
|
this.setupIxs.unshift(createUserCollateralAccountIx);
|
|
2023
|
-
this.setupIxsLabels.unshift(`CreateCollateralUserAta[${
|
|
1938
|
+
this.setupIxsLabels.unshift(`CreateCollateralUserAta[${ctokenAta}]`);
|
|
2024
1939
|
}
|
|
2025
|
-
if (action === 'depositAndBorrow' || (action === 'repayAndWithdraw' &&
|
|
1940
|
+
if (action === 'depositAndBorrow' || (action === 'repayAndWithdraw' && this.secondaryMint !== utils_1.WRAPPED_SOL_MINT)) {
|
|
2026
1941
|
if (!this.outflowReserve) {
|
|
2027
1942
|
throw new Error(`Outflow reserve state not found ${this.mint}`);
|
|
2028
1943
|
}
|
|
2029
|
-
const additionalUserTokenAccountAddress = this.getUserTokenAccountAddress(this.outflowReserve);
|
|
2030
|
-
const additionalUserTokenAccountInfo = await this.kaminoMarket
|
|
2031
|
-
|
|
2032
|
-
.
|
|
2033
|
-
if (!additionalUserTokenAccountInfo) {
|
|
2034
|
-
const [, createUserTokenAccountIx] = (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.outflowReserve.getLiquidityMint(), this.owner, this.outflowReserve.getLiquidityTokenProgram(), additionalUserTokenAccountAddress);
|
|
1944
|
+
const additionalUserTokenAccountAddress = await this.getUserTokenAccountAddress(this.outflowReserve);
|
|
1945
|
+
const additionalUserTokenAccountInfo = await (0, kit_1.fetchEncodedAccount)(this.kaminoMarket.getRpc(), additionalUserTokenAccountAddress);
|
|
1946
|
+
if (!additionalUserTokenAccountInfo.exists) {
|
|
1947
|
+
const [, createUserTokenAccountIx] = await (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.outflowReserve.getLiquidityMint(), this.owner.address, this.outflowReserve.getLiquidityTokenProgram(), additionalUserTokenAccountAddress);
|
|
2035
1948
|
this.setupIxs.unshift(createUserTokenAccountIx);
|
|
2036
1949
|
this.setupIxsLabels.unshift(`CreateAdditionalUserTokenAta[${this.owner}]`);
|
|
2037
1950
|
}
|
|
2038
1951
|
}
|
|
2039
1952
|
if (action === 'withdraw' || action === 'mint' || action === 'deposit' || action === 'repayAndWithdraw') {
|
|
2040
|
-
const
|
|
1953
|
+
const reserveAta = await this.getUserTokenAccountAddress(this.reserve);
|
|
1954
|
+
const [, createUserTokenAccountIx] = await (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.reserve.getLiquidityMint(), this.owner.address, this.reserve.getLiquidityTokenProgram(), reserveAta);
|
|
2041
1955
|
this.setupIxs.unshift(createUserTokenAccountIx);
|
|
2042
|
-
this.setupIxsLabels.unshift(`CreateUserAta[${
|
|
1956
|
+
this.setupIxsLabels.unshift(`CreateUserAta[${reserveAta}]`);
|
|
2043
1957
|
}
|
|
2044
1958
|
if (action === 'mint') {
|
|
2045
|
-
const
|
|
1959
|
+
const ctokenAta = await this.getUserCollateralAccountAddress(this.reserve);
|
|
1960
|
+
const [, createUserCollateralAccountIx] = await (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, this.reserve.getCTokenMint(), this.owner.address, token_1.TOKEN_PROGRAM_ADDRESS, ctokenAta);
|
|
2046
1961
|
this.setupIxs.unshift(createUserCollateralAccountIx);
|
|
2047
|
-
this.setupIxsLabels.unshift(`CreateCollateralUserAta[${
|
|
1962
|
+
this.setupIxsLabels.unshift(`CreateCollateralUserAta[${ctokenAta.toString()}]`);
|
|
2048
1963
|
}
|
|
2049
1964
|
}
|
|
2050
1965
|
async updateWSOLAccount(action) {
|
|
@@ -2061,7 +1976,7 @@ class KaminoAction {
|
|
|
2061
1976
|
this.amount.eq(new bn_js_1.default(utils_1.U64_MAX))) {
|
|
2062
1977
|
const borrow = this.obligation.state.borrows.find((borrow) => borrow.borrowReserve.toString() === this.reserve.address.toString());
|
|
2063
1978
|
if (!borrow) {
|
|
2064
|
-
throw Error(`Unable to find obligation borrow to repay for ${this.obligation.state.owner
|
|
1979
|
+
throw Error(`Unable to find obligation borrow to repay for ${this.obligation.state.owner}`);
|
|
2065
1980
|
}
|
|
2066
1981
|
const cumulativeBorrowRateObligation = obligation_1.KaminoObligation.getCumulativeBorrowRate(borrow);
|
|
2067
1982
|
const cumulativeBorrowRateReserve = this.reserve.getEstimatedCumulativeBorrowRate(this.currentSlot, this.kaminoMarket.state.referralFeeBps);
|
|
@@ -2071,32 +1986,37 @@ class KaminoAction {
|
|
|
2071
1986
|
.add(new decimal_js_1.default(utils_1.SOL_PADDING_FOR_INTEREST.toString()))
|
|
2072
1987
|
.toNumber()).toString());
|
|
2073
1988
|
}
|
|
2074
|
-
let userTokenAccountAddress = this.getUserTokenAccountAddress(this.reserve);
|
|
2075
|
-
if (this.secondaryMint
|
|
1989
|
+
let userTokenAccountAddress = await this.getUserTokenAccountAddress(this.reserve);
|
|
1990
|
+
if (this.secondaryMint === utils_1.WRAPPED_SOL_MINT) {
|
|
2076
1991
|
if (!this.outflowReserve) {
|
|
2077
1992
|
throw new Error(`Outflow reserve state not found ${this.secondaryMint}`);
|
|
2078
1993
|
}
|
|
2079
|
-
|
|
2080
|
-
userTokenAccountAddress = additionalUserTokenAccountAddress;
|
|
1994
|
+
userTokenAccountAddress = await this.getUserTokenAccountAddress(this.outflowReserve);
|
|
2081
1995
|
}
|
|
2082
|
-
const userWSOLAccountInfo = await this.kaminoMarket.
|
|
2083
|
-
const
|
|
1996
|
+
const userWSOLAccountInfo = await (0, kit_1.fetchEncodedAccount)(this.kaminoMarket.getRpc(), userTokenAccountAddress);
|
|
1997
|
+
const rentExemptLamports = await this.kaminoMarket.getRpc().getMinimumBalanceForRentExemption(165n).send();
|
|
2084
1998
|
// Add rent exemption lamports for WSOL accounts that need to be pre-funded for inflow/send transactions
|
|
2085
1999
|
const sendAction = action === 'deposit' ||
|
|
2086
2000
|
action === 'repay' ||
|
|
2087
2001
|
action === 'repayAndWithdrawV2' ||
|
|
2088
2002
|
action === 'mint' ||
|
|
2089
|
-
(action === 'liquidate' && this.mint
|
|
2090
|
-
const transferLamportsIx =
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2003
|
+
(action === 'liquidate' && this.mint === utils_1.WRAPPED_SOL_MINT); // only sync WSOL amount if liquidator repays SOL which is secondaryMint
|
|
2004
|
+
const transferLamportsIx = (0, system_1.getTransferSolInstruction)({
|
|
2005
|
+
amount: (userWSOLAccountInfo.exists ? 0n : rentExemptLamports) + (sendAction ? BigInt(safeRepay.toString()) : 0n),
|
|
2006
|
+
source: this.owner,
|
|
2007
|
+
destination: userTokenAccountAddress,
|
|
2094
2008
|
});
|
|
2095
2009
|
preIxs.push(transferLamportsIx);
|
|
2096
2010
|
preIxsLabels.push(`TransferLamportsToUserAtaSOL[${userTokenAccountAddress}]`);
|
|
2097
|
-
const closeWSOLAccountIx = (0,
|
|
2098
|
-
|
|
2099
|
-
|
|
2011
|
+
const closeWSOLAccountIx = (0, token_2022_1.getCloseAccountInstruction)({
|
|
2012
|
+
owner: this.owner,
|
|
2013
|
+
account: userTokenAccountAddress,
|
|
2014
|
+
destination: this.owner.address,
|
|
2015
|
+
}, { programAddress: token_1.TOKEN_PROGRAM_ADDRESS });
|
|
2016
|
+
const syncIx = (0, token_2022_1.getSyncNativeInstruction)({
|
|
2017
|
+
account: userTokenAccountAddress,
|
|
2018
|
+
}, { programAddress: token_1.TOKEN_PROGRAM_ADDRESS });
|
|
2019
|
+
if (userWSOLAccountInfo.exists) {
|
|
2100
2020
|
if (sendAction) {
|
|
2101
2021
|
preIxs.push(syncIx);
|
|
2102
2022
|
preIxsLabels.push(`SyncUserAtaSOL[${userTokenAccountAddress}]`);
|
|
@@ -2107,7 +2027,7 @@ class KaminoAction {
|
|
|
2107
2027
|
}
|
|
2108
2028
|
}
|
|
2109
2029
|
else {
|
|
2110
|
-
const [, createUserWSOLAccountIx] = (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner,
|
|
2030
|
+
const [, createUserWSOLAccountIx] = await (0, utils_1.createAssociatedTokenAccountIdempotentInstruction)(this.owner, utils_1.WRAPPED_SOL_MINT, this.owner.address, token_1.TOKEN_PROGRAM_ADDRESS, userTokenAccountAddress);
|
|
2111
2031
|
preIxs.push(createUserWSOLAccountIx);
|
|
2112
2032
|
preIxsLabels.push(`CreateUserAtaSOL[${userTokenAccountAddress}]`);
|
|
2113
2033
|
preIxs.push(syncIx);
|
|
@@ -2120,14 +2040,11 @@ class KaminoAction {
|
|
|
2120
2040
|
this.cleanupIxs.push(...postIxs);
|
|
2121
2041
|
this.cleanupIxsLabels.push(...postIxsLabels);
|
|
2122
2042
|
}
|
|
2123
|
-
static async initializeMultiTokenAction(kaminoMarket, action, inflowAmount, inflowTokenMint, outflowTokenMint,
|
|
2124
|
-
const inflowReserve = kaminoMarket.
|
|
2125
|
-
const outflowReserve = kaminoMarket.
|
|
2126
|
-
if (!outflowReserve || !inflowReserve) {
|
|
2127
|
-
throw new Error('reserve states are not fetched');
|
|
2128
|
-
}
|
|
2043
|
+
static async initializeMultiTokenAction(kaminoMarket, action, inflowAmount, inflowTokenMint, outflowTokenMint, signer, obligationOwner, obligation, outflowAmount, referrer = (0, kit_1.none)(), currentSlot = 0n) {
|
|
2044
|
+
const inflowReserve = kaminoMarket.getExistingReserveByMint(inflowTokenMint);
|
|
2045
|
+
const outflowReserve = kaminoMarket.getExistingReserveByMint(outflowTokenMint);
|
|
2129
2046
|
const { kaminoObligation, depositReserves, borrowReserves, distinctReserveCount } = await KaminoAction.loadObligation(action, kaminoMarket, obligationOwner, inflowReserve.address, obligation, outflowReserve.address);
|
|
2130
|
-
const referrerKey = await this.getReferrerKey(kaminoMarket,
|
|
2047
|
+
const referrerKey = await this.getReferrerKey(kaminoMarket, signer.address, kaminoObligation, referrer);
|
|
2131
2048
|
let secondaryMint;
|
|
2132
2049
|
let primaryMint;
|
|
2133
2050
|
if (action === 'liquidate' ||
|
|
@@ -2140,14 +2057,14 @@ class KaminoAction {
|
|
|
2140
2057
|
else {
|
|
2141
2058
|
throw new Error('Invalid action');
|
|
2142
2059
|
}
|
|
2143
|
-
return new KaminoAction(kaminoMarket,
|
|
2060
|
+
return new KaminoAction(kaminoMarket, signer, kaminoObligation || obligation, primaryMint, distinctReserveCount, inflowAmount, depositReserves, borrowReserves, inflowReserve, currentSlot, secondaryMint, outflowReserve, outflowAmount, referrerKey);
|
|
2144
2061
|
}
|
|
2145
|
-
static async initializeWithdrawReferrerFees(mint, owner, kaminoMarket, currentSlot =
|
|
2062
|
+
static async initializeWithdrawReferrerFees(mint, owner, kaminoMarket, currentSlot = 0n) {
|
|
2146
2063
|
const reserve = kaminoMarket.getReserveByMint(mint);
|
|
2147
2064
|
if (reserve === undefined) {
|
|
2148
|
-
throw new Error(`Reserve ${mint} not found in market ${kaminoMarket.getAddress()
|
|
2065
|
+
throw new Error(`Reserve ${mint} not found in market ${kaminoMarket.getAddress()}`);
|
|
2149
2066
|
}
|
|
2150
|
-
const [{ createAtaIx }] = (0, utils_1.createAtasIdempotent)(owner, [
|
|
2067
|
+
const [{ createAtaIx }] = await (0, utils_1.createAtasIdempotent)(owner, [
|
|
2151
2068
|
{
|
|
2152
2069
|
mint: reserve.getLiquidityMint(),
|
|
2153
2070
|
tokenProgram: reserve.getLiquidityTokenProgram(),
|
|
@@ -2164,10 +2081,10 @@ class KaminoAction {
|
|
|
2164
2081
|
? amount
|
|
2165
2082
|
: new bn_js_1.default(new decimal_js_1.default(amount.toString()).mul(collateralExchangeRate).ceil().toString());
|
|
2166
2083
|
}
|
|
2167
|
-
getObligationPda() {
|
|
2084
|
+
async getObligationPda() {
|
|
2168
2085
|
return (0, obligation_1.isKaminoObligation)(this.obligation)
|
|
2169
2086
|
? this.obligation.obligationAddress
|
|
2170
|
-
: this.obligation.toPda(this.kaminoMarket.getAddress(), this.owner);
|
|
2087
|
+
: await this.obligation.toPda(this.kaminoMarket.getAddress(), this.owner.address);
|
|
2171
2088
|
}
|
|
2172
2089
|
isObligationInitialized() {
|
|
2173
2090
|
return this.obligation instanceof obligation_1.KaminoObligation;
|
|
@@ -2180,7 +2097,7 @@ class KaminoAction {
|
|
|
2180
2097
|
const preloadedDepositReserve = this.preLoadedDepositReservesSameTx[i];
|
|
2181
2098
|
// Check if the depositReserves array contains the current preloadedDepositReserve
|
|
2182
2099
|
const found = this.depositReserves.some((depositReserve) => {
|
|
2183
|
-
return depositReserve
|
|
2100
|
+
return depositReserve === preloadedDepositReserve;
|
|
2184
2101
|
});
|
|
2185
2102
|
// If not found, push the current preloadedDepositReserve to the depositReserves array
|
|
2186
2103
|
if (!found) {
|
|
@@ -2189,29 +2106,39 @@ class KaminoAction {
|
|
|
2189
2106
|
}
|
|
2190
2107
|
return depositReservesList;
|
|
2191
2108
|
}
|
|
2192
|
-
static async
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2109
|
+
static async getReferrerMetadataAccount(referrer, programId) {
|
|
2110
|
+
if ((0, kit_1.isSome)(referrer)) {
|
|
2111
|
+
return (0, kit_1.some)((await (0, utils_1.userMetadataPda)(referrer.value, programId))[0]);
|
|
2112
|
+
}
|
|
2113
|
+
else {
|
|
2114
|
+
return (0, kit_1.none)();
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
async getReferrerTokenStateAccountMeta(reserve, writable) {
|
|
2118
|
+
if ((0, kit_1.isSome)(this.referrer)) {
|
|
2119
|
+
return {
|
|
2120
|
+
address: await (0, utils_1.referrerTokenStatePda)(this.referrer.value, reserve, this.kaminoMarket.programId),
|
|
2121
|
+
role: writable ? kit_1.AccountRole.WRITABLE : kit_1.AccountRole.READONLY,
|
|
2122
|
+
};
|
|
2123
|
+
}
|
|
2124
|
+
else {
|
|
2125
|
+
return {
|
|
2126
|
+
address: this.kaminoMarket.programId,
|
|
2127
|
+
role: kit_1.AccountRole.READONLY,
|
|
2128
|
+
};
|
|
2204
2129
|
}
|
|
2205
|
-
|
|
2130
|
+
}
|
|
2131
|
+
async getReferrerTokenStateAddress(reserve) {
|
|
2132
|
+
return KaminoAction.getReferrerTokenStateAddressImpl(this.referrer, reserve, this.kaminoMarket.programId);
|
|
2206
2133
|
}
|
|
2207
2134
|
getUserTokenAccountAddress(reserve) {
|
|
2208
|
-
return (0, utils_1.getAssociatedTokenAddress)(reserve.getLiquidityMint(), this.owner,
|
|
2135
|
+
return (0, utils_1.getAssociatedTokenAddress)(reserve.getLiquidityMint(), this.owner.address, reserve.getLiquidityTokenProgram());
|
|
2209
2136
|
}
|
|
2210
2137
|
getTokenAccountAddressByUser(reserve, user) {
|
|
2211
|
-
return (0, utils_1.getAssociatedTokenAddress)(reserve.getLiquidityMint(), user,
|
|
2138
|
+
return (0, utils_1.getAssociatedTokenAddress)(reserve.getLiquidityMint(), user, reserve.getLiquidityTokenProgram());
|
|
2212
2139
|
}
|
|
2213
2140
|
getUserCollateralAccountAddress(reserve) {
|
|
2214
|
-
return (0, utils_1.getAssociatedTokenAddress)(reserve.getCTokenMint(), this.owner
|
|
2141
|
+
return (0, utils_1.getAssociatedTokenAddress)(reserve.getCTokenMint(), this.owner.address);
|
|
2215
2142
|
}
|
|
2216
2143
|
static actionToIxs(action) {
|
|
2217
2144
|
const ixs = [...action.computeBudgetIxs, ...action.setupIxs];
|
|
@@ -2245,6 +2172,58 @@ class KaminoAction {
|
|
|
2245
2172
|
}
|
|
2246
2173
|
return labels;
|
|
2247
2174
|
}
|
|
2175
|
+
static async getFarmAccountsForReserve(obligationAddress, reserve) {
|
|
2176
|
+
const collateralFarmAddress = reserve.getCollateralFarmAddress();
|
|
2177
|
+
let collateralFarmAccounts = {
|
|
2178
|
+
obligationFarmUserState: (0, kit_1.none)(),
|
|
2179
|
+
reserveFarmState: (0, kit_1.none)(),
|
|
2180
|
+
};
|
|
2181
|
+
if ((0, kit_1.isSome)(collateralFarmAddress)) {
|
|
2182
|
+
collateralFarmAccounts = {
|
|
2183
|
+
obligationFarmUserState: (0, kit_1.some)(await (0, utils_1.obligationFarmStatePda)(collateralFarmAddress.value, obligationAddress)),
|
|
2184
|
+
reserveFarmState: collateralFarmAddress,
|
|
2185
|
+
};
|
|
2186
|
+
}
|
|
2187
|
+
let debtFarmAccounts = {
|
|
2188
|
+
obligationFarmUserState: (0, kit_1.none)(),
|
|
2189
|
+
reserveFarmState: (0, kit_1.none)(),
|
|
2190
|
+
};
|
|
2191
|
+
const debtFarmAddress = reserve.getDebtFarmAddress();
|
|
2192
|
+
if ((0, kit_1.isSome)(debtFarmAddress)) {
|
|
2193
|
+
debtFarmAccounts = {
|
|
2194
|
+
obligationFarmUserState: (0, kit_1.some)(await (0, utils_1.obligationFarmStatePda)(debtFarmAddress.value, obligationAddress)),
|
|
2195
|
+
reserveFarmState: debtFarmAddress,
|
|
2196
|
+
};
|
|
2197
|
+
}
|
|
2198
|
+
return {
|
|
2199
|
+
debtFarmAccounts,
|
|
2200
|
+
collateralFarmAccounts,
|
|
2201
|
+
};
|
|
2202
|
+
}
|
|
2203
|
+
static async getReferrerKey(kaminoMarket, owner, kaminoObligation, referrer) {
|
|
2204
|
+
let referrerKey = (0, kit_1.none)();
|
|
2205
|
+
if ((0, kit_1.isNone)(referrer) || referrer.value === utils_1.DEFAULT_PUBLIC_KEY) {
|
|
2206
|
+
if (kaminoObligation === null) {
|
|
2207
|
+
const [_, userMetadata] = await kaminoMarket.getUserMetadata(owner);
|
|
2208
|
+
if (userMetadata && userMetadata.referrer !== utils_1.DEFAULT_PUBLIC_KEY) {
|
|
2209
|
+
referrerKey = (0, kit_1.some)(userMetadata.referrer);
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
else if (kaminoObligation.state.referrer !== utils_1.DEFAULT_PUBLIC_KEY) {
|
|
2213
|
+
referrerKey = (0, kit_1.some)(kaminoObligation.state.referrer);
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
else {
|
|
2217
|
+
referrerKey = referrer;
|
|
2218
|
+
}
|
|
2219
|
+
return referrerKey;
|
|
2220
|
+
}
|
|
2221
|
+
static async getReferrerTokenStateAddressImpl(referrer, reserve, programId) {
|
|
2222
|
+
if ((0, kit_1.isSome)(referrer)) {
|
|
2223
|
+
return (0, kit_1.some)(await (0, utils_1.referrerTokenStatePda)(referrer.value, reserve, programId));
|
|
2224
|
+
}
|
|
2225
|
+
return (0, kit_1.none)();
|
|
2226
|
+
}
|
|
2248
2227
|
}
|
|
2249
2228
|
exports.KaminoAction = KaminoAction;
|
|
2250
2229
|
//# sourceMappingURL=action.js.map
|