@kamino-finance/klend-sdk 6.0.5-beta.5 → 6.0.5
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.map +1 -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.map +1 -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.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 +80 -78
- package/dist/classes/action.d.ts.map +1 -1
- package/dist/classes/action.js +671 -707
- 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 +122 -88
- package/dist/classes/manager.d.ts.map +1 -1
- package/dist/classes/manager.js +237 -157
- package/dist/classes/manager.js.map +1 -1
- package/dist/classes/market.d.ts +68 -71
- package/dist/classes/market.d.ts.map +1 -1
- package/dist/classes/market.js +235 -251
- 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 +113 -87
- package/dist/classes/vault.d.ts.map +1 -1
- package/dist/classes/vault.js +419 -387
- package/dist/classes/vault.js.map +1 -1
- package/dist/classes/vault_types.d.ts +23 -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 +20 -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 +20 -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 +20 -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 +20 -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 +249 -240
- 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 +1353 -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 +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +0 -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 +30 -30
- package/dist/utils/managerTypes.d.ts.map +1 -1
- package/dist/utils/managerTypes.js +3 -2
- package/dist/utils/managerTypes.js.map +1 -1
- 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 +11 -13
- 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 +2 -2
- package/dist/utils/vault.js.map +1 -1
- 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/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 +391 -0
- package/src/@codegen/kvault/types/WithdrawalCaps.ts +87 -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 +1004 -1041
- 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 +465 -249
- package/src/classes/market.ts +417 -443
- 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 +669 -635
- package/src/classes/vault_types.ts +23 -23
- package/src/client/client.ts +345 -0
- package/src/client/commands/borrow.ts +28 -0
- package/src/client/commands/deposit.ts +28 -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 +29 -0
- package/src/client/commands/withdraw.ts +28 -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/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 +489 -496
- 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 +2144 -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 +0 -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 +32 -31
- 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 +49 -50
- 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 +2 -2
- 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.map +0 -1
- 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.map +0 -1
- 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.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/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/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}/errors/custom.d.ts +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/errors/custom.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/VaultConfigField.d.ts +0 -0
- /package/dist/{idl_codegen_kamino_vault → @codegen/kvault}/types/VaultConfigField.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.d.ts +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}/errors/custom.ts +0 -0
- /package/src/{idl_codegen_kamino_vault → @codegen/kvault}/instructions/index.ts +0 -0
- /package/src/{idl_codegen_kamino_vault → @codegen/kvault}/types/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/src/{idl_kamino_vault.json → idl/kvault.json} +0 -0
package/src/classes/action.ts
CHANGED
|
@@ -1,28 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
NATIVE_MINT,
|
|
16
|
-
TOKEN_PROGRAM_ID,
|
|
17
|
-
createCloseAccountInstruction,
|
|
18
|
-
createSyncNativeInstruction,
|
|
19
|
-
} from '@solana/spl-token';
|
|
2
|
+
AccountRole,
|
|
3
|
+
Address,
|
|
4
|
+
fetchEncodedAccount,
|
|
5
|
+
IAccountMeta,
|
|
6
|
+
IInstruction,
|
|
7
|
+
isNone,
|
|
8
|
+
isSome,
|
|
9
|
+
none,
|
|
10
|
+
Option,
|
|
11
|
+
Slot,
|
|
12
|
+
some,
|
|
13
|
+
TransactionSigner,
|
|
14
|
+
} from '@solana/kit';
|
|
20
15
|
import BN from 'bn.js';
|
|
21
16
|
import Decimal from 'decimal.js';
|
|
22
17
|
import {
|
|
23
18
|
borrowObligationLiquidity,
|
|
24
|
-
depositAndWithdraw,
|
|
25
19
|
borrowObligationLiquidityV2,
|
|
20
|
+
depositAndWithdraw,
|
|
26
21
|
depositObligationCollateral,
|
|
27
22
|
depositObligationCollateralV2,
|
|
28
23
|
depositReserveLiquidity,
|
|
@@ -52,33 +47,38 @@ import {
|
|
|
52
47
|
withdrawObligationCollateralAndRedeemReserveCollateral,
|
|
53
48
|
withdrawObligationCollateralAndRedeemReserveCollateralV2,
|
|
54
49
|
withdrawReferrerFees,
|
|
55
|
-
} from '
|
|
50
|
+
} from '../@codegen/klend/instructions';
|
|
56
51
|
import {
|
|
57
52
|
buildComputeBudgetIx,
|
|
58
53
|
createAssociatedTokenAccountIdempotentInstruction,
|
|
59
|
-
|
|
60
|
-
U64_MAX,
|
|
61
|
-
referrerTokenStatePda,
|
|
62
|
-
userMetadataPda,
|
|
54
|
+
createAtasIdempotent,
|
|
63
55
|
createLookupTableIx,
|
|
64
|
-
|
|
65
|
-
PublicKeySet,
|
|
56
|
+
DEFAULT_PUBLIC_KEY,
|
|
66
57
|
getAssociatedTokenAddress,
|
|
58
|
+
isNotNullPubkey,
|
|
59
|
+
obligationFarmStatePda,
|
|
60
|
+
ObligationType,
|
|
61
|
+
referrerTokenStatePda,
|
|
67
62
|
ScopePriceRefreshConfig,
|
|
68
|
-
createAtasIdempotent,
|
|
69
63
|
SOL_PADDING_FOR_INTEREST,
|
|
70
|
-
|
|
64
|
+
U64_MAX,
|
|
65
|
+
userMetadataPda,
|
|
66
|
+
WRAPPED_SOL_MINT,
|
|
71
67
|
} from '../utils';
|
|
72
68
|
import { getTokenIdsForScopeRefresh, KaminoMarket } from './market';
|
|
73
69
|
import { isKaminoObligation, KaminoObligation } from './obligation';
|
|
74
70
|
import { KaminoReserve } from './reserve';
|
|
75
|
-
import { ReserveFarmKind } from '
|
|
76
|
-
import {
|
|
77
|
-
import { Reserve } from '
|
|
71
|
+
import { ReserveFarmKind } from '../@codegen/klend/types';
|
|
72
|
+
import { PROGRAM_ID as FARMS_PROGRAM_ID } from '@kamino-finance/farms-sdk/dist/@codegen/farms/programId';
|
|
73
|
+
import { Reserve } from '../@codegen/klend/accounts';
|
|
78
74
|
import { VanillaObligation } from '../utils/ObligationType';
|
|
79
|
-
import { PROGRAM_ID } from '../lib';
|
|
80
75
|
import { Scope } from '@kamino-finance/scope-sdk';
|
|
81
76
|
import { ObligationOrderAtIndex } from './obligationOrder';
|
|
77
|
+
import { ASSOCIATED_TOKEN_PROGRAM_ADDRESS, TOKEN_PROGRAM_ADDRESS } from '@solana-program/token';
|
|
78
|
+
import { SYSVAR_INSTRUCTIONS_ADDRESS, SYSVAR_RENT_ADDRESS } from '@solana/sysvars';
|
|
79
|
+
import { getCloseAccountInstruction, getSyncNativeInstruction } from '@solana-program/token-2022';
|
|
80
|
+
import { getTransferSolInstruction, SYSTEM_PROGRAM_ADDRESS } from '@solana-program/system';
|
|
81
|
+
import { noopSigner } from '../utils/signer';
|
|
82
82
|
|
|
83
83
|
export type ActionType =
|
|
84
84
|
| 'deposit'
|
|
@@ -106,68 +106,68 @@ export class KaminoAction {
|
|
|
106
106
|
|
|
107
107
|
outflowReserve: KaminoReserve | undefined;
|
|
108
108
|
|
|
109
|
-
owner:
|
|
110
|
-
payer:
|
|
109
|
+
owner: TransactionSigner;
|
|
110
|
+
payer: TransactionSigner;
|
|
111
111
|
|
|
112
112
|
obligation: KaminoObligation | ObligationType;
|
|
113
113
|
|
|
114
|
-
referrer:
|
|
114
|
+
referrer: Option<Address>;
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* Null unless the obligation is not passed
|
|
118
118
|
*/
|
|
119
119
|
obligationType: ObligationType | null = null;
|
|
120
120
|
|
|
121
|
-
mint:
|
|
121
|
+
mint: Address;
|
|
122
122
|
|
|
123
|
-
secondaryMint?:
|
|
123
|
+
secondaryMint?: Address;
|
|
124
124
|
|
|
125
125
|
positions?: number;
|
|
126
126
|
|
|
127
127
|
amount: BN;
|
|
128
128
|
outflowAmount?: BN;
|
|
129
129
|
|
|
130
|
-
computeBudgetIxs: Array<
|
|
130
|
+
computeBudgetIxs: Array<IInstruction>;
|
|
131
131
|
computeBudgetIxsLabels: Array<string>;
|
|
132
132
|
|
|
133
|
-
setupIxs: Array<
|
|
133
|
+
setupIxs: Array<IInstruction>;
|
|
134
134
|
setupIxsLabels: Array<string>;
|
|
135
135
|
|
|
136
|
-
inBetweenIxs: Array<
|
|
136
|
+
inBetweenIxs: Array<IInstruction>;
|
|
137
137
|
inBetweenIxsLabels: Array<string>;
|
|
138
138
|
|
|
139
|
-
lendingIxs: Array<
|
|
139
|
+
lendingIxs: Array<IInstruction>;
|
|
140
140
|
lendingIxsLabels: Array<string>;
|
|
141
141
|
|
|
142
|
-
cleanupIxs: Array<
|
|
142
|
+
cleanupIxs: Array<IInstruction>;
|
|
143
143
|
cleanupIxsLabels: Array<string>;
|
|
144
144
|
|
|
145
|
-
refreshFarmsCleanupTxnIxs: Array<
|
|
145
|
+
refreshFarmsCleanupTxnIxs: Array<IInstruction>;
|
|
146
146
|
refreshFarmsCleanupTxnIxsLabels: Array<string>;
|
|
147
147
|
|
|
148
|
-
depositReserves: Array<
|
|
149
|
-
borrowReserves: Array<
|
|
148
|
+
depositReserves: Array<Address>;
|
|
149
|
+
borrowReserves: Array<Address>;
|
|
150
150
|
|
|
151
|
-
preLoadedDepositReservesSameTx: Array<
|
|
151
|
+
preLoadedDepositReservesSameTx: Array<Address>;
|
|
152
152
|
|
|
153
|
-
currentSlot:
|
|
153
|
+
currentSlot: Slot;
|
|
154
154
|
|
|
155
155
|
private constructor(
|
|
156
156
|
kaminoMarket: KaminoMarket,
|
|
157
|
-
owner:
|
|
157
|
+
owner: TransactionSigner,
|
|
158
158
|
obligation: KaminoObligation | ObligationType,
|
|
159
|
-
mint:
|
|
159
|
+
mint: Address,
|
|
160
160
|
positions: number,
|
|
161
161
|
amount: string | BN,
|
|
162
|
-
depositReserves: Array<
|
|
163
|
-
borrowReserves: Array<
|
|
162
|
+
depositReserves: Array<Address>,
|
|
163
|
+
borrowReserves: Array<Address>,
|
|
164
164
|
reserveState: KaminoReserve,
|
|
165
|
-
currentSlot:
|
|
166
|
-
secondaryMint?:
|
|
165
|
+
currentSlot: Slot,
|
|
166
|
+
secondaryMint?: Address,
|
|
167
167
|
outflowReserveState?: KaminoReserve,
|
|
168
168
|
outflowAmount?: string | BN,
|
|
169
|
-
referrer
|
|
170
|
-
payer?:
|
|
169
|
+
referrer: Option<Address> = none(),
|
|
170
|
+
payer?: TransactionSigner
|
|
171
171
|
) {
|
|
172
172
|
this.kaminoMarket = kaminoMarket;
|
|
173
173
|
this.obligation = obligation;
|
|
@@ -195,30 +195,30 @@ export class KaminoAction {
|
|
|
195
195
|
this.outflowReserve = outflowReserveState;
|
|
196
196
|
this.outflowAmount = outflowAmount ? new BN(outflowAmount) : undefined;
|
|
197
197
|
this.preLoadedDepositReservesSameTx = [];
|
|
198
|
-
this.referrer = referrer
|
|
198
|
+
this.referrer = referrer;
|
|
199
199
|
this.currentSlot = currentSlot;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
static async initialize(
|
|
203
203
|
action: ActionType,
|
|
204
204
|
amount: string | BN,
|
|
205
|
-
mint:
|
|
206
|
-
owner:
|
|
205
|
+
mint: Address,
|
|
206
|
+
owner: TransactionSigner,
|
|
207
207
|
kaminoMarket: KaminoMarket,
|
|
208
208
|
obligation: KaminoObligation | ObligationType,
|
|
209
|
-
referrer:
|
|
210
|
-
currentSlot:
|
|
211
|
-
payer
|
|
209
|
+
referrer: Option<Address> = none(),
|
|
210
|
+
currentSlot: Slot = 0n,
|
|
211
|
+
payer: TransactionSigner = owner
|
|
212
212
|
) {
|
|
213
213
|
const reserve = kaminoMarket.getReserveByMint(mint);
|
|
214
214
|
if (reserve === undefined) {
|
|
215
|
-
throw new Error(`Reserve ${mint} not found in market ${kaminoMarket.getAddress()
|
|
215
|
+
throw new Error(`Reserve ${mint} not found in market ${kaminoMarket.getAddress()}`);
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
const { kaminoObligation, depositReserves, borrowReserves, distinctReserveCount } =
|
|
219
|
-
await KaminoAction.loadObligation(action, kaminoMarket, owner, reserve.address, obligation);
|
|
219
|
+
await KaminoAction.loadObligation(action, kaminoMarket, owner.address, reserve.address, obligation);
|
|
220
220
|
|
|
221
|
-
const referrerKey = await this.getReferrerKey(kaminoMarket, owner, kaminoObligation, referrer);
|
|
221
|
+
const referrerKey = await this.getReferrerKey(kaminoMarket, owner.address, kaminoObligation, referrer);
|
|
222
222
|
|
|
223
223
|
return new KaminoAction(
|
|
224
224
|
kaminoMarket,
|
|
@@ -239,21 +239,21 @@ export class KaminoAction {
|
|
|
239
239
|
);
|
|
240
240
|
}
|
|
241
241
|
|
|
242
|
-
private static getUserAccountAddresses(owner:
|
|
243
|
-
const userTokenAccountAddress =
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
);
|
|
242
|
+
private static async getUserAccountAddresses(owner: Address, reserve: Reserve) {
|
|
243
|
+
const [userTokenAccountAddress, userCollateralAccountAddress] = await Promise.all([
|
|
244
|
+
getAssociatedTokenAddress(
|
|
245
|
+
reserve.liquidity.mintPubkey,
|
|
246
|
+
owner,
|
|
247
|
+
reserve.liquidity.tokenProgram,
|
|
248
|
+
ASSOCIATED_TOKEN_PROGRAM_ADDRESS
|
|
249
|
+
),
|
|
250
|
+
getAssociatedTokenAddress(
|
|
251
|
+
reserve.collateral.mintPubkey,
|
|
252
|
+
owner,
|
|
253
|
+
TOKEN_PROGRAM_ADDRESS,
|
|
254
|
+
ASSOCIATED_TOKEN_PROGRAM_ADDRESS
|
|
255
|
+
),
|
|
256
|
+
]);
|
|
257
257
|
|
|
258
258
|
return { userTokenAccountAddress, userCollateralAccountAddress };
|
|
259
259
|
}
|
|
@@ -261,18 +261,18 @@ export class KaminoAction {
|
|
|
261
261
|
private static async loadObligation(
|
|
262
262
|
action: ActionType,
|
|
263
263
|
kaminoMarket: KaminoMarket,
|
|
264
|
-
owner:
|
|
265
|
-
reserve:
|
|
264
|
+
owner: Address,
|
|
265
|
+
reserve: Address,
|
|
266
266
|
obligation: KaminoObligation | ObligationType,
|
|
267
|
-
outflowReserve?:
|
|
267
|
+
outflowReserve?: Address
|
|
268
268
|
) {
|
|
269
269
|
let kaminoObligation: KaminoObligation | null;
|
|
270
|
-
const depositReserves: Array<
|
|
271
|
-
const borrowReserves: Array<
|
|
270
|
+
const depositReserves: Array<Address> = [];
|
|
271
|
+
const borrowReserves: Array<Address> = [];
|
|
272
272
|
if (obligation instanceof KaminoObligation) {
|
|
273
273
|
kaminoObligation = obligation;
|
|
274
274
|
} else {
|
|
275
|
-
const obligationAddress = obligation.toPda(kaminoMarket.getAddress(), owner);
|
|
275
|
+
const obligationAddress = await obligation.toPda(kaminoMarket.getAddress(), owner);
|
|
276
276
|
kaminoObligation = await KaminoObligation.load(kaminoMarket, obligationAddress);
|
|
277
277
|
}
|
|
278
278
|
if (kaminoObligation !== null) {
|
|
@@ -286,16 +286,16 @@ export class KaminoAction {
|
|
|
286
286
|
|
|
287
287
|
// Union of addresses
|
|
288
288
|
const distinctReserveCount =
|
|
289
|
-
new
|
|
289
|
+
new Set<Address>([
|
|
290
290
|
...borrowReserves.map((e) => e),
|
|
291
291
|
...(action === 'borrow' ? [reserve] : []),
|
|
292
292
|
...(action === 'depositAndBorrow' ? [reserve] : []),
|
|
293
|
-
]).
|
|
294
|
-
new
|
|
293
|
+
]).size +
|
|
294
|
+
new Set<Address>([
|
|
295
295
|
...depositReserves.map((e) => e),
|
|
296
296
|
...(action === 'deposit' ? [reserve] : []),
|
|
297
297
|
...(action === 'depositAndBorrow' ? [outflowReserve!] : []),
|
|
298
|
-
]).
|
|
298
|
+
]).size;
|
|
299
299
|
|
|
300
300
|
return {
|
|
301
301
|
kaminoObligation,
|
|
@@ -307,22 +307,22 @@ export class KaminoAction {
|
|
|
307
307
|
|
|
308
308
|
static async buildRefreshObligationTxns(
|
|
309
309
|
kaminoMarket: KaminoMarket,
|
|
310
|
-
payer:
|
|
310
|
+
payer: TransactionSigner,
|
|
311
311
|
obligation: KaminoObligation,
|
|
312
312
|
extraComputeBudget: number = 1_000_000, // if > 0 then adds the ix
|
|
313
|
-
currentSlot:
|
|
313
|
+
currentSlot: Slot = 0n
|
|
314
314
|
) {
|
|
315
315
|
// placeholder for action initialization
|
|
316
316
|
const firstReserve = obligation.getDeposits()[0].reserveAddress;
|
|
317
317
|
const firstKaminoReserve = kaminoMarket.getReserveByAddress(firstReserve);
|
|
318
318
|
if (!firstKaminoReserve) {
|
|
319
|
-
throw new Error(`Reserve ${firstReserve
|
|
319
|
+
throw new Error(`Reserve ${firstReserve} not found`);
|
|
320
320
|
}
|
|
321
321
|
const axn = await KaminoAction.initialize(
|
|
322
322
|
'refreshObligation',
|
|
323
323
|
'0',
|
|
324
324
|
firstKaminoReserve?.getLiquidityMint(),
|
|
325
|
-
obligation.state.owner,
|
|
325
|
+
noopSigner(obligation.state.owner), // owner does not need to sign for refresh
|
|
326
326
|
kaminoMarket,
|
|
327
327
|
obligation,
|
|
328
328
|
undefined,
|
|
@@ -333,31 +333,29 @@ export class KaminoAction {
|
|
|
333
333
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
334
334
|
}
|
|
335
335
|
|
|
336
|
-
axn.addRefreshObligation(payer);
|
|
336
|
+
await axn.addRefreshObligation(payer);
|
|
337
337
|
|
|
338
338
|
return axn;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
static async buildRequestElevationGroupTxns(
|
|
342
342
|
kaminoMarket: KaminoMarket,
|
|
343
|
-
|
|
343
|
+
owner: TransactionSigner,
|
|
344
344
|
obligation: KaminoObligation,
|
|
345
345
|
elevationGroup: number,
|
|
346
346
|
extraComputeBudget: number = 1_000_000, // if > 0 then adds the ix
|
|
347
|
-
currentSlot:
|
|
347
|
+
currentSlot: Slot = 0n
|
|
348
348
|
) {
|
|
349
|
-
const firstReserve = obligation.state.deposits.find(
|
|
350
|
-
(x) => !x.depositReserve.equals(PublicKey.default)
|
|
351
|
-
)!.depositReserve;
|
|
349
|
+
const firstReserve = obligation.state.deposits.find((x) => x.depositReserve !== DEFAULT_PUBLIC_KEY)!.depositReserve;
|
|
352
350
|
const firstKaminoReserve = kaminoMarket.getReserveByAddress(firstReserve);
|
|
353
351
|
if (!firstKaminoReserve) {
|
|
354
|
-
throw new Error(`Reserve ${firstReserve
|
|
352
|
+
throw new Error(`Reserve ${firstReserve} not found`);
|
|
355
353
|
}
|
|
356
354
|
const axn = await KaminoAction.initialize(
|
|
357
355
|
'requestElevationGroup',
|
|
358
356
|
'0',
|
|
359
357
|
firstKaminoReserve?.getLiquidityMint(),
|
|
360
|
-
|
|
358
|
+
owner,
|
|
361
359
|
kaminoMarket,
|
|
362
360
|
obligation,
|
|
363
361
|
undefined,
|
|
@@ -368,8 +366,8 @@ export class KaminoAction {
|
|
|
368
366
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
369
367
|
}
|
|
370
368
|
|
|
371
|
-
axn.addRefreshObligation(
|
|
372
|
-
axn.addRequestElevationIx(elevationGroup, 'setup');
|
|
369
|
+
await axn.addRefreshObligation(owner);
|
|
370
|
+
await axn.addRequestElevationIx(elevationGroup, 'setup');
|
|
373
371
|
|
|
374
372
|
return axn;
|
|
375
373
|
}
|
|
@@ -377,8 +375,8 @@ export class KaminoAction {
|
|
|
377
375
|
static async buildDepositTxns(
|
|
378
376
|
kaminoMarket: KaminoMarket,
|
|
379
377
|
amount: string | BN,
|
|
380
|
-
mint:
|
|
381
|
-
owner:
|
|
378
|
+
mint: Address,
|
|
379
|
+
owner: TransactionSigner,
|
|
382
380
|
obligation: KaminoObligation | ObligationType,
|
|
383
381
|
useV2Ixs: boolean,
|
|
384
382
|
scopeRefreshConfig: ScopePriceRefreshConfig | undefined,
|
|
@@ -389,8 +387,8 @@ export class KaminoAction {
|
|
|
389
387
|
skipInitialization: false,
|
|
390
388
|
skipLutCreation: false,
|
|
391
389
|
},
|
|
392
|
-
referrer:
|
|
393
|
-
currentSlot:
|
|
390
|
+
referrer: Option<Address> = none(),
|
|
391
|
+
currentSlot: Slot = 0n,
|
|
394
392
|
overrideElevationGroupRequest: number | undefined = undefined // if set, when an elevationgroup request is made, it will use this value
|
|
395
393
|
) {
|
|
396
394
|
const axn = await KaminoAction.initialize(
|
|
@@ -421,9 +419,9 @@ export class KaminoAction {
|
|
|
421
419
|
overrideElevationGroupRequest
|
|
422
420
|
);
|
|
423
421
|
if (useV2Ixs) {
|
|
424
|
-
axn.addDepositIxV2();
|
|
422
|
+
await axn.addDepositIxV2();
|
|
425
423
|
} else {
|
|
426
|
-
axn.addDepositIx();
|
|
424
|
+
await axn.addDepositIx();
|
|
427
425
|
}
|
|
428
426
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
429
427
|
|
|
@@ -445,8 +443,8 @@ export class KaminoAction {
|
|
|
445
443
|
static async buildBorrowTxns(
|
|
446
444
|
kaminoMarket: KaminoMarket,
|
|
447
445
|
amount: string | BN,
|
|
448
|
-
mint:
|
|
449
|
-
owner:
|
|
446
|
+
mint: Address,
|
|
447
|
+
owner: TransactionSigner,
|
|
450
448
|
obligation: KaminoObligation | ObligationType,
|
|
451
449
|
useV2Ixs: boolean,
|
|
452
450
|
scopeRefreshConfig: ScopePriceRefreshConfig | undefined,
|
|
@@ -457,8 +455,8 @@ export class KaminoAction {
|
|
|
457
455
|
skipInitialization: false,
|
|
458
456
|
skipLutCreation: false,
|
|
459
457
|
},
|
|
460
|
-
referrer:
|
|
461
|
-
currentSlot:
|
|
458
|
+
referrer: Option<Address> = none(),
|
|
459
|
+
currentSlot: Slot = 0n,
|
|
462
460
|
overrideElevationGroupRequest: number | undefined = undefined // if set, when an elevationgroup request is made, it will use this value
|
|
463
461
|
) {
|
|
464
462
|
const axn = await KaminoAction.initialize(
|
|
@@ -476,14 +474,14 @@ export class KaminoAction {
|
|
|
476
474
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
477
475
|
}
|
|
478
476
|
|
|
479
|
-
if (
|
|
480
|
-
const referrerTokenState = referrerTokenStatePda(
|
|
481
|
-
axn.referrer,
|
|
477
|
+
if (isSome(axn.referrer)) {
|
|
478
|
+
const referrerTokenState = await referrerTokenStatePda(
|
|
479
|
+
axn.referrer.value,
|
|
482
480
|
axn.reserve.address,
|
|
483
481
|
axn.kaminoMarket.programId
|
|
484
|
-
)
|
|
485
|
-
const account = await
|
|
486
|
-
if (!account) {
|
|
482
|
+
);
|
|
483
|
+
const account = await fetchEncodedAccount(kaminoMarket.getRpc(), referrerTokenState);
|
|
484
|
+
if (!account.exists) {
|
|
487
485
|
axn.addInitReferrerTokenStateIx(axn.reserve, referrerTokenState);
|
|
488
486
|
}
|
|
489
487
|
}
|
|
@@ -500,9 +498,9 @@ export class KaminoAction {
|
|
|
500
498
|
overrideElevationGroupRequest
|
|
501
499
|
);
|
|
502
500
|
if (useV2Ixs) {
|
|
503
|
-
axn.addBorrowIxV2();
|
|
501
|
+
await axn.addBorrowIxV2();
|
|
504
502
|
} else {
|
|
505
|
-
axn.addBorrowIx();
|
|
503
|
+
await axn.addBorrowIx();
|
|
506
504
|
}
|
|
507
505
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
508
506
|
|
|
@@ -512,15 +510,15 @@ export class KaminoAction {
|
|
|
512
510
|
static async buildDepositReserveLiquidityTxns(
|
|
513
511
|
kaminoMarket: KaminoMarket,
|
|
514
512
|
amount: string | BN,
|
|
515
|
-
mint:
|
|
516
|
-
owner:
|
|
513
|
+
mint: Address,
|
|
514
|
+
owner: TransactionSigner,
|
|
517
515
|
obligation: KaminoObligation | ObligationType,
|
|
518
516
|
scopeRefreshConfig: ScopePriceRefreshConfig | undefined,
|
|
519
517
|
extraComputeBudget: number = 1_000_000, // if > 0 then adds the ix
|
|
520
518
|
includeAtaIxs: boolean = true, // if true it includes create and close wsol and token atas
|
|
521
519
|
requestElevationGroup: boolean = false,
|
|
522
|
-
referrer:
|
|
523
|
-
currentSlot:
|
|
520
|
+
referrer: Option<Address> = none(),
|
|
521
|
+
currentSlot: Slot = 0n
|
|
524
522
|
) {
|
|
525
523
|
const axn = await KaminoAction.initialize(
|
|
526
524
|
'mint',
|
|
@@ -547,7 +545,7 @@ export class KaminoAction {
|
|
|
547
545
|
scopeRefreshConfig,
|
|
548
546
|
{ skipInitialization: true, skipLutCreation: true }
|
|
549
547
|
);
|
|
550
|
-
axn.addDepositReserveLiquidityIx();
|
|
548
|
+
await axn.addDepositReserveLiquidityIx();
|
|
551
549
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
552
550
|
return axn;
|
|
553
551
|
}
|
|
@@ -555,15 +553,15 @@ export class KaminoAction {
|
|
|
555
553
|
static async buildRedeemReserveCollateralTxns(
|
|
556
554
|
kaminoMarket: KaminoMarket,
|
|
557
555
|
amount: string | BN,
|
|
558
|
-
mint:
|
|
559
|
-
owner:
|
|
556
|
+
mint: Address,
|
|
557
|
+
owner: TransactionSigner,
|
|
560
558
|
obligation: KaminoObligation | ObligationType,
|
|
561
559
|
scopeRefreshConfig: ScopePriceRefreshConfig | undefined,
|
|
562
560
|
extraComputeBudget: number = 1_000_000, // if > 0 then adds the ix
|
|
563
561
|
includeAtaIxs: boolean = true, // if true it includes create and close wsol and token atas
|
|
564
562
|
requestElevationGroup: boolean = false,
|
|
565
|
-
referrer:
|
|
566
|
-
currentSlot:
|
|
563
|
+
referrer: Option<Address> = none(),
|
|
564
|
+
currentSlot: Slot = 0n
|
|
567
565
|
) {
|
|
568
566
|
const axn = await KaminoAction.initialize(
|
|
569
567
|
'redeem',
|
|
@@ -590,7 +588,7 @@ export class KaminoAction {
|
|
|
590
588
|
scopeRefreshConfig,
|
|
591
589
|
{ skipInitialization: true, skipLutCreation: true }
|
|
592
590
|
);
|
|
593
|
-
axn.addRedeemReserveCollateralIx();
|
|
591
|
+
await axn.addRedeemReserveCollateralIx();
|
|
594
592
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
595
593
|
return axn;
|
|
596
594
|
}
|
|
@@ -598,8 +596,8 @@ export class KaminoAction {
|
|
|
598
596
|
static async buildDepositObligationCollateralTxns(
|
|
599
597
|
kaminoMarket: KaminoMarket,
|
|
600
598
|
amount: string | BN,
|
|
601
|
-
mint:
|
|
602
|
-
owner:
|
|
599
|
+
mint: Address,
|
|
600
|
+
owner: TransactionSigner,
|
|
603
601
|
obligation: KaminoObligation | ObligationType,
|
|
604
602
|
useV2Ixs: boolean,
|
|
605
603
|
scopeRefreshConfig: ScopePriceRefreshConfig | undefined,
|
|
@@ -610,8 +608,8 @@ export class KaminoAction {
|
|
|
610
608
|
skipInitialization: false,
|
|
611
609
|
skipLutCreation: false,
|
|
612
610
|
},
|
|
613
|
-
referrer:
|
|
614
|
-
currentSlot:
|
|
611
|
+
referrer: Option<Address> = none(),
|
|
612
|
+
currentSlot: Slot = 0n
|
|
615
613
|
) {
|
|
616
614
|
const axn = await KaminoAction.initialize(
|
|
617
615
|
'depositCollateral',
|
|
@@ -639,9 +637,9 @@ export class KaminoAction {
|
|
|
639
637
|
initUserMetadata
|
|
640
638
|
);
|
|
641
639
|
if (useV2Ixs) {
|
|
642
|
-
axn.addDepositObligationCollateralIxV2();
|
|
640
|
+
await axn.addDepositObligationCollateralIxV2();
|
|
643
641
|
} else {
|
|
644
|
-
axn.addDepositObligationCollateralIx();
|
|
642
|
+
await axn.addDepositObligationCollateralIx();
|
|
645
643
|
}
|
|
646
644
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
647
645
|
return axn;
|
|
@@ -650,10 +648,10 @@ export class KaminoAction {
|
|
|
650
648
|
static async buildDepositAndBorrowTxns(
|
|
651
649
|
kaminoMarket: KaminoMarket,
|
|
652
650
|
depositAmount: string | BN,
|
|
653
|
-
depositMint:
|
|
651
|
+
depositMint: Address,
|
|
654
652
|
borrowAmount: string | BN,
|
|
655
|
-
borrowMint:
|
|
656
|
-
|
|
653
|
+
borrowMint: Address,
|
|
654
|
+
owner: TransactionSigner,
|
|
657
655
|
obligation: KaminoObligation | ObligationType,
|
|
658
656
|
useV2Ixs: boolean,
|
|
659
657
|
scopeRefreshConfig: ScopePriceRefreshConfig | undefined,
|
|
@@ -664,8 +662,8 @@ export class KaminoAction {
|
|
|
664
662
|
skipInitialization: false,
|
|
665
663
|
skipLutCreation: false,
|
|
666
664
|
},
|
|
667
|
-
referrer:
|
|
668
|
-
currentSlot:
|
|
665
|
+
referrer: Option<Address> = none(),
|
|
666
|
+
currentSlot: Slot = 0n
|
|
669
667
|
) {
|
|
670
668
|
const axn = await KaminoAction.initializeMultiTokenAction(
|
|
671
669
|
kaminoMarket,
|
|
@@ -673,8 +671,8 @@ export class KaminoAction {
|
|
|
673
671
|
depositAmount,
|
|
674
672
|
depositMint,
|
|
675
673
|
borrowMint,
|
|
676
|
-
|
|
677
|
-
|
|
674
|
+
owner,
|
|
675
|
+
owner.address,
|
|
678
676
|
obligation,
|
|
679
677
|
borrowAmount,
|
|
680
678
|
referrer,
|
|
@@ -688,14 +686,14 @@ export class KaminoAction {
|
|
|
688
686
|
axn.addComputeBudgetIxn(extraComputeBudget);
|
|
689
687
|
}
|
|
690
688
|
|
|
691
|
-
if (
|
|
692
|
-
const referrerTokenState = referrerTokenStatePda(
|
|
693
|
-
axn.referrer,
|
|
689
|
+
if (isSome(axn.referrer)) {
|
|
690
|
+
const referrerTokenState = await referrerTokenStatePda(
|
|
691
|
+
axn.referrer.value,
|
|
694
692
|
axn.outflowReserve!.address,
|
|
695
693
|
axn.kaminoMarket.programId
|
|
696
|
-
)
|
|
697
|
-
const account = await axn.kaminoMarket.
|
|
698
|
-
if (!account) {
|
|
694
|
+
);
|
|
695
|
+
const account = await fetchEncodedAccount(axn.kaminoMarket.getRpc(), referrerTokenState);
|
|
696
|
+
if (!account.exists) {
|
|
699
697
|
axn.addInitReferrerTokenStateIx(axn.outflowReserve!, referrerTokenState);
|
|
700
698
|
}
|
|
701
699
|
}
|
|
@@ -724,14 +722,16 @@ export class KaminoAction {
|
|
|
724
722
|
);
|
|
725
723
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
726
724
|
|
|
727
|
-
// Create the scope refresh ix in here to ensure it's the first ix in the
|
|
728
|
-
const allReserves =
|
|
729
|
-
...
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
725
|
+
// Create the scope refresh ix in here to ensure it's the first ix in the tx
|
|
726
|
+
const allReserves = [
|
|
727
|
+
...new Set<Address>([
|
|
728
|
+
...axn.depositReserves,
|
|
729
|
+
...axn.borrowReserves,
|
|
730
|
+
axn.reserve.address,
|
|
731
|
+
...(axn.outflowReserve ? [axn.outflowReserve.address] : []),
|
|
732
|
+
...(axn.preLoadedDepositReservesSameTx ? axn.preLoadedDepositReservesSameTx : []),
|
|
733
|
+
]),
|
|
734
|
+
];
|
|
735
735
|
const tokenIds = getTokenIdsForScopeRefresh(axn.kaminoMarket, allReserves);
|
|
736
736
|
|
|
737
737
|
if (tokenIds.length > 0 && scopeRefreshConfig) {
|
|
@@ -743,11 +743,11 @@ export class KaminoAction {
|
|
|
743
743
|
static async buildDepositAndWithdrawV2Txns(
|
|
744
744
|
kaminoMarket: KaminoMarket,
|
|
745
745
|
depositAmount: string | BN,
|
|
746
|
-
depositMint:
|
|
746
|
+
depositMint: Address,
|
|
747
747
|
withdrawAmount: string | BN,
|
|
748
|
-
withdrawMint:
|
|
749
|
-
|
|
750
|
-
currentSlot:
|
|
748
|
+
withdrawMint: Address,
|
|
749
|
+
owner: TransactionSigner,
|
|
750
|
+
currentSlot: Slot,
|
|
751
751
|
obligation: KaminoObligation | ObligationType,
|
|
752
752
|
scopeRefreshConfig: ScopePriceRefreshConfig | undefined,
|
|
753
753
|
extraComputeBudget: number = 1_000_000, // if > 0 then adds the ix
|
|
@@ -757,7 +757,7 @@ export class KaminoAction {
|
|
|
757
757
|
skipInitialization: false,
|
|
758
758
|
skipLutCreation: false,
|
|
759
759
|
},
|
|
760
|
-
referrer:
|
|
760
|
+
referrer: Option<Address> = none()
|
|
761
761
|
) {
|
|
762
762
|
const axn = await KaminoAction.initializeMultiTokenAction(
|
|
763
763
|
kaminoMarket,
|
|
@@ -765,8 +765,8 @@ export class KaminoAction {
|
|
|
765
765
|
depositAmount,
|
|
766
766
|
depositMint,
|
|
767
767
|
withdrawMint,
|
|
768
|
-
|
|
769
|
-
|
|
768
|
+
owner,
|
|
769
|
+
owner.address,
|
|
770
770
|
obligation,
|
|
771
771
|
withdrawAmount,
|
|
772
772
|
referrer,
|
|
@@ -789,7 +789,7 @@ export class KaminoAction {
|
|
|
789
789
|
twoTokenAction
|
|
790
790
|
);
|
|
791
791
|
const withdrawCollateralAmount = axn.getWithdrawCollateralAmount(axn.outflowReserve!, axn.outflowAmount!);
|
|
792
|
-
axn.addDepositAndWithdrawV2Ixs(withdrawCollateralAmount);
|
|
792
|
+
await axn.addDepositAndWithdrawV2Ixs(withdrawCollateralAmount);
|
|
793
793
|
|
|
794
794
|
return axn;
|
|
795
795
|
}
|
|
@@ -797,11 +797,11 @@ export class KaminoAction {
|
|
|
797
797
|
static async buildRepayAndWithdrawV2Txns(
|
|
798
798
|
kaminoMarket: KaminoMarket,
|
|
799
799
|
repayAmount: string | BN,
|
|
800
|
-
repayMint:
|
|
800
|
+
repayMint: Address,
|
|
801
801
|
withdrawAmount: string | BN,
|
|
802
|
-
withdrawMint:
|
|
803
|
-
payer:
|
|
804
|
-
currentSlot:
|
|
802
|
+
withdrawMint: Address,
|
|
803
|
+
payer: TransactionSigner,
|
|
804
|
+
currentSlot: Slot,
|
|
805
805
|
obligation: KaminoObligation | ObligationType,
|
|
806
806
|
scopeRefreshConfig: ScopePriceRefreshConfig | undefined,
|
|
807
807
|
extraComputeBudget: number = 1_000_000, // if > 0 then adds the ix
|
|
@@ -811,7 +811,7 @@ export class KaminoAction {
|
|
|
811
811
|
skipInitialization: false,
|
|
812
812
|
skipLutCreation: false,
|
|
813
813
|
},
|
|
814
|
-
referrer:
|
|
814
|
+
referrer: Option<Address> = none()
|
|
815
815
|
) {
|
|
816
816
|
const axn = await KaminoAction.initializeMultiTokenAction(
|
|
817
817
|
kaminoMarket,
|
|
@@ -820,7 +820,7 @@ export class KaminoAction {
|
|
|
820
820
|
repayMint,
|
|
821
821
|
withdrawMint,
|
|
822
822
|
payer,
|
|
823
|
-
payer,
|
|
823
|
+
payer.address,
|
|
824
824
|
obligation,
|
|
825
825
|
withdrawAmount,
|
|
826
826
|
referrer,
|
|
@@ -843,7 +843,7 @@ export class KaminoAction {
|
|
|
843
843
|
twoTokenAction
|
|
844
844
|
);
|
|
845
845
|
const withdrawCollateralAmount = axn.getWithdrawCollateralAmount(axn.outflowReserve!, axn.outflowAmount!);
|
|
846
|
-
axn.addRepayAndWithdrawV2Ixs(withdrawCollateralAmount);
|
|
846
|
+
await axn.addRepayAndWithdrawV2Ixs(withdrawCollateralAmount);
|
|
847
847
|
|
|
848
848
|
return axn;
|
|
849
849
|
}
|
|
@@ -851,11 +851,11 @@ export class KaminoAction {
|
|
|
851
851
|
static async buildRepayAndWithdrawTxns(
|
|
852
852
|
kaminoMarket: KaminoMarket,
|
|
853
853
|
repayAmount: string | BN,
|
|
854
|
-
repayMint:
|
|
854
|
+
repayMint: Address,
|
|
855
855
|
withdrawAmount: string | BN,
|
|
856
|
-
withdrawMint:
|
|
857
|
-
payer:
|
|
858
|
-
currentSlot:
|
|
856
|
+
withdrawMint: Address,
|
|
857
|
+
payer: TransactionSigner,
|
|
858
|
+
currentSlot: Slot,
|
|
859
859
|
obligation: KaminoObligation | ObligationType,
|
|
860
860
|
useV2Ixs: boolean,
|
|
861
861
|
scopeRefreshConfig: ScopePriceRefreshConfig | undefined,
|
|
@@ -866,7 +866,7 @@ export class KaminoAction {
|
|
|
866
866
|
skipInitialization: false,
|
|
867
867
|
skipLutCreation: false,
|
|
868
868
|
},
|
|
869
|
-
referrer:
|
|
869
|
+
referrer: Option<Address> = none()
|
|
870
870
|
) {
|
|
871
871
|
const axn = await KaminoAction.initializeMultiTokenAction(
|
|
872
872
|
kaminoMarket,
|
|
@@ -875,7 +875,7 @@ export class KaminoAction {
|
|
|
875
875
|
repayMint,
|
|
876
876
|
withdrawMint,
|
|
877
877
|
payer,
|
|
878
|
-
payer,
|
|
878
|
+
payer.address,
|
|
879
879
|
obligation,
|
|
880
880
|
withdrawAmount,
|
|
881
881
|
referrer,
|
|
@@ -914,14 +914,16 @@ export class KaminoAction {
|
|
|
914
914
|
useV2Ixs
|
|
915
915
|
);
|
|
916
916
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
917
|
-
// Create the scope refresh ix in here to ensure it's the first ix in the
|
|
918
|
-
const allReserves =
|
|
919
|
-
...
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
917
|
+
// Create the scope refresh ix in here to ensure it's the first ix in the tx
|
|
918
|
+
const allReserves = [
|
|
919
|
+
...new Set<Address>([
|
|
920
|
+
...axn.depositReserves,
|
|
921
|
+
...axn.borrowReserves,
|
|
922
|
+
axn.reserve.address,
|
|
923
|
+
...(axn.outflowReserve ? [axn.outflowReserve.address] : []),
|
|
924
|
+
...(axn.preLoadedDepositReservesSameTx ? axn.preLoadedDepositReservesSameTx : []),
|
|
925
|
+
]),
|
|
926
|
+
];
|
|
925
927
|
const tokenIds = getTokenIdsForScopeRefresh(axn.kaminoMarket, allReserves);
|
|
926
928
|
|
|
927
929
|
if (tokenIds.length > 0 && scopeRefreshConfig) {
|
|
@@ -933,8 +935,8 @@ export class KaminoAction {
|
|
|
933
935
|
static async buildWithdrawTxns(
|
|
934
936
|
kaminoMarket: KaminoMarket,
|
|
935
937
|
amount: string | BN,
|
|
936
|
-
mint:
|
|
937
|
-
owner:
|
|
938
|
+
mint: Address,
|
|
939
|
+
owner: TransactionSigner,
|
|
938
940
|
obligation: KaminoObligation | ObligationType,
|
|
939
941
|
useV2Ixs: boolean,
|
|
940
942
|
scopeRefreshConfig: ScopePriceRefreshConfig | undefined,
|
|
@@ -945,13 +947,13 @@ export class KaminoAction {
|
|
|
945
947
|
skipInitialization: false,
|
|
946
948
|
skipLutCreation: false,
|
|
947
949
|
},
|
|
948
|
-
referrer:
|
|
949
|
-
currentSlot:
|
|
950
|
+
referrer: Option<Address> = none(),
|
|
951
|
+
currentSlot: Slot = 0n,
|
|
950
952
|
overrideElevationGroupRequest?: number,
|
|
951
953
|
// Optional customizations which may be needed if the obligation was mutated by some previous ix.
|
|
952
954
|
obligationCustomizations?: {
|
|
953
955
|
// Any newly-added deposit reserves.
|
|
954
|
-
addedDepositReserves?:
|
|
956
|
+
addedDepositReserves?: Address[];
|
|
955
957
|
}
|
|
956
958
|
) {
|
|
957
959
|
const axn = await KaminoAction.initialize(
|
|
@@ -1003,24 +1005,26 @@ export class KaminoAction {
|
|
|
1003
1005
|
* @param mint
|
|
1004
1006
|
* @param owner
|
|
1005
1007
|
* @param obligation - obligation to repay or the PDA seeds
|
|
1008
|
+
* @param useV2Ixs
|
|
1009
|
+
* @param scopeRefreshConfig
|
|
1006
1010
|
* @param currentSlot
|
|
1007
1011
|
* @param payer - if not set then owner is used
|
|
1008
1012
|
* @param extraComputeBudget - if > 0 then adds the ix
|
|
1009
1013
|
* @param includeAtaIxs - if true it includes create and close wsol and token atas
|
|
1010
1014
|
* @param requestElevationGroup
|
|
1011
|
-
* @param
|
|
1015
|
+
* @param initUserMetadata
|
|
1012
1016
|
* @param referrer
|
|
1013
1017
|
*/
|
|
1014
1018
|
static async buildRepayTxns(
|
|
1015
1019
|
kaminoMarket: KaminoMarket,
|
|
1016
1020
|
amount: string | BN,
|
|
1017
|
-
mint:
|
|
1018
|
-
owner:
|
|
1021
|
+
mint: Address,
|
|
1022
|
+
owner: TransactionSigner,
|
|
1019
1023
|
obligation: KaminoObligation | ObligationType,
|
|
1020
1024
|
useV2Ixs: boolean,
|
|
1021
1025
|
scopeRefreshConfig: ScopePriceRefreshConfig | undefined,
|
|
1022
|
-
currentSlot:
|
|
1023
|
-
payer:
|
|
1026
|
+
currentSlot: Slot,
|
|
1027
|
+
payer: TransactionSigner = owner,
|
|
1024
1028
|
extraComputeBudget: number = 1_000_000,
|
|
1025
1029
|
includeAtaIxs: boolean = true,
|
|
1026
1030
|
requestElevationGroup: boolean = false,
|
|
@@ -1028,7 +1032,7 @@ export class KaminoAction {
|
|
|
1028
1032
|
skipInitialization: false,
|
|
1029
1033
|
skipLutCreation: false,
|
|
1030
1034
|
},
|
|
1031
|
-
referrer:
|
|
1035
|
+
referrer: Option<Address> = none()
|
|
1032
1036
|
) {
|
|
1033
1037
|
const axn = await KaminoAction.initialize(
|
|
1034
1038
|
'repay',
|
|
@@ -1070,10 +1074,10 @@ export class KaminoAction {
|
|
|
1070
1074
|
kaminoMarket: KaminoMarket,
|
|
1071
1075
|
amount: string | BN,
|
|
1072
1076
|
minCollateralReceiveAmount: string | BN,
|
|
1073
|
-
repayTokenMint:
|
|
1074
|
-
withdrawTokenMint:
|
|
1075
|
-
liquidator:
|
|
1076
|
-
obligationOwner:
|
|
1077
|
+
repayTokenMint: Address,
|
|
1078
|
+
withdrawTokenMint: Address,
|
|
1079
|
+
liquidator: TransactionSigner,
|
|
1080
|
+
obligationOwner: Address,
|
|
1077
1081
|
obligation: KaminoObligation | ObligationType,
|
|
1078
1082
|
useV2Ixs: boolean,
|
|
1079
1083
|
scopeRefreshConfig: ScopePriceRefreshConfig | undefined = undefined,
|
|
@@ -1084,10 +1088,10 @@ export class KaminoAction {
|
|
|
1084
1088
|
skipInitialization: false,
|
|
1085
1089
|
skipLutCreation: false,
|
|
1086
1090
|
},
|
|
1087
|
-
referrer:
|
|
1091
|
+
referrer: Option<Address> = none(),
|
|
1088
1092
|
maxAllowedLtvOverridePercent: number = 0,
|
|
1089
|
-
currentSlot:
|
|
1090
|
-
) {
|
|
1093
|
+
currentSlot: Slot = 0n
|
|
1094
|
+
): Promise<KaminoAction> {
|
|
1091
1095
|
const axn = await KaminoAction.initializeMultiTokenAction(
|
|
1092
1096
|
kaminoMarket,
|
|
1093
1097
|
'liquidate',
|
|
@@ -1127,10 +1131,10 @@ export class KaminoAction {
|
|
|
1127
1131
|
}
|
|
1128
1132
|
|
|
1129
1133
|
static async buildWithdrawReferrerFeeTxns(
|
|
1130
|
-
owner:
|
|
1131
|
-
tokenMint:
|
|
1134
|
+
owner: TransactionSigner,
|
|
1135
|
+
tokenMint: Address,
|
|
1132
1136
|
kaminoMarket: KaminoMarket,
|
|
1133
|
-
currentSlot:
|
|
1137
|
+
currentSlot: Slot = 0n
|
|
1134
1138
|
) {
|
|
1135
1139
|
const { axn, createAtaIxs } = await KaminoAction.initializeWithdrawReferrerFees(
|
|
1136
1140
|
tokenMint,
|
|
@@ -1142,19 +1146,19 @@ export class KaminoAction {
|
|
|
1142
1146
|
axn.setupIxs.push(...createAtaIxs);
|
|
1143
1147
|
axn.setupIxsLabels.push(`createAtasIxs[${axn.owner.toString()}]`);
|
|
1144
1148
|
|
|
1145
|
-
if (
|
|
1146
|
-
const referrerTokenState = referrerTokenStatePda(
|
|
1147
|
-
axn.referrer,
|
|
1149
|
+
if (isSome(axn.referrer)) {
|
|
1150
|
+
const referrerTokenState = await referrerTokenStatePda(
|
|
1151
|
+
axn.referrer.value,
|
|
1148
1152
|
axn.reserve.address,
|
|
1149
1153
|
axn.kaminoMarket.programId
|
|
1150
|
-
)
|
|
1151
|
-
const account = await axn.kaminoMarket.
|
|
1152
|
-
if (!account) {
|
|
1154
|
+
);
|
|
1155
|
+
const account = await fetchEncodedAccount(axn.kaminoMarket.getRpc(), referrerTokenState);
|
|
1156
|
+
if (!account.exists) {
|
|
1153
1157
|
axn.addInitReferrerTokenStateIx(axn.reserve, referrerTokenState);
|
|
1154
1158
|
}
|
|
1155
1159
|
}
|
|
1156
1160
|
axn.addRefreshReserveIxs([axn.reserve.address]);
|
|
1157
|
-
axn.addWithdrawReferrerFeesIxs();
|
|
1161
|
+
await axn.addWithdrawReferrerFeesIxs();
|
|
1158
1162
|
|
|
1159
1163
|
return axn;
|
|
1160
1164
|
}
|
|
@@ -1166,10 +1170,11 @@ export class KaminoAction {
|
|
|
1166
1170
|
* setting the `null` state (i.e. cancelling the order).
|
|
1167
1171
|
*/
|
|
1168
1172
|
static buildSetObligationOrderIxn(
|
|
1173
|
+
owner: TransactionSigner,
|
|
1169
1174
|
kaminoMarket: KaminoMarket,
|
|
1170
1175
|
obligation: KaminoObligation,
|
|
1171
1176
|
orderAtIndex: ObligationOrderAtIndex
|
|
1172
|
-
):
|
|
1177
|
+
): IInstruction {
|
|
1173
1178
|
return setObligationOrder(
|
|
1174
1179
|
{
|
|
1175
1180
|
index: orderAtIndex.index,
|
|
@@ -1178,81 +1183,13 @@ export class KaminoAction {
|
|
|
1178
1183
|
{
|
|
1179
1184
|
lendingMarket: kaminoMarket.getAddress(),
|
|
1180
1185
|
obligation: obligation.obligationAddress,
|
|
1181
|
-
owner
|
|
1186
|
+
owner,
|
|
1182
1187
|
},
|
|
1183
1188
|
kaminoMarket.programId
|
|
1184
1189
|
);
|
|
1185
1190
|
}
|
|
1186
1191
|
|
|
1187
|
-
async
|
|
1188
|
-
let txns: Transaction;
|
|
1189
|
-
|
|
1190
|
-
if (this.lendingIxs.length === 2) {
|
|
1191
|
-
txns = new Transaction({
|
|
1192
|
-
feePayer: this.owner,
|
|
1193
|
-
recentBlockhash: (await this.kaminoMarket.getConnection().getLatestBlockhash()).blockhash,
|
|
1194
|
-
}).add(
|
|
1195
|
-
...this.setupIxs,
|
|
1196
|
-
...[this.lendingIxs[0]],
|
|
1197
|
-
...this.inBetweenIxs,
|
|
1198
|
-
...[this.lendingIxs[1]],
|
|
1199
|
-
...this.cleanupIxs
|
|
1200
|
-
);
|
|
1201
|
-
} else {
|
|
1202
|
-
txns = new Transaction({
|
|
1203
|
-
feePayer: this.owner,
|
|
1204
|
-
recentBlockhash: (await this.kaminoMarket.getConnection().getLatestBlockhash()).blockhash,
|
|
1205
|
-
}).add(...this.setupIxs, ...this.lendingIxs, ...this.cleanupIxs);
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
return txns;
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
async sendTransactions(sendTransaction: (txn: Transaction, connection: Connection) => Promise<TransactionSignature>) {
|
|
1212
|
-
const txns = await this.getTransactions();
|
|
1213
|
-
|
|
1214
|
-
const signature = await this.sendSingleTransaction(txns, sendTransaction);
|
|
1215
|
-
|
|
1216
|
-
return signature;
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
private async sendSingleTransaction(
|
|
1220
|
-
txn: Transaction | null,
|
|
1221
|
-
sendTransaction: (txn: Transaction, connection: Connection) => Promise<TransactionSignature>
|
|
1222
|
-
) {
|
|
1223
|
-
if (!txn) return '';
|
|
1224
|
-
|
|
1225
|
-
const signature = await sendTransaction(txn, this.kaminoMarket.getConnection());
|
|
1226
|
-
await this.kaminoMarket.getConnection().confirmTransaction(signature);
|
|
1227
|
-
|
|
1228
|
-
return signature;
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
|
-
async simulateTransactions(
|
|
1232
|
-
sendTransaction: (
|
|
1233
|
-
txn: Transaction,
|
|
1234
|
-
connection: Connection
|
|
1235
|
-
) => Promise<RpcResponseAndContext<SimulatedTransactionResponse>>
|
|
1236
|
-
) {
|
|
1237
|
-
const txns = await this.getTransactions();
|
|
1238
|
-
|
|
1239
|
-
const signature = await this.simulateSingleTransaction(txns, sendTransaction);
|
|
1240
|
-
|
|
1241
|
-
return signature;
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
private async simulateSingleTransaction(
|
|
1245
|
-
txn: Transaction | null,
|
|
1246
|
-
sendTransaction: (
|
|
1247
|
-
txn: Transaction,
|
|
1248
|
-
connection: Connection
|
|
1249
|
-
) => Promise<RpcResponseAndContext<SimulatedTransactionResponse>>
|
|
1250
|
-
) {
|
|
1251
|
-
if (!txn) return '';
|
|
1252
|
-
return await sendTransaction(txn, this.kaminoMarket.getConnection());
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
addDepositReserveLiquidityIx() {
|
|
1192
|
+
async addDepositReserveLiquidityIx() {
|
|
1256
1193
|
this.lendingIxsLabels.push(`depositReserveLiquidity`);
|
|
1257
1194
|
this.lendingIxs.push(
|
|
1258
1195
|
depositReserveLiquidity(
|
|
@@ -1262,23 +1199,23 @@ export class KaminoAction {
|
|
|
1262
1199
|
{
|
|
1263
1200
|
owner: this.owner,
|
|
1264
1201
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1265
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1202
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1266
1203
|
reserve: this.reserve.address,
|
|
1267
1204
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1268
1205
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
1269
1206
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
1270
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1271
|
-
userDestinationCollateral: this.getUserCollateralAccountAddress(this.reserve),
|
|
1272
|
-
collateralTokenProgram:
|
|
1207
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1208
|
+
userDestinationCollateral: await this.getUserCollateralAccountAddress(this.reserve),
|
|
1209
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1273
1210
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1274
|
-
instructionSysvarAccount:
|
|
1211
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1275
1212
|
},
|
|
1276
1213
|
this.kaminoMarket.programId
|
|
1277
1214
|
)
|
|
1278
1215
|
);
|
|
1279
1216
|
}
|
|
1280
1217
|
|
|
1281
|
-
addRedeemReserveCollateralIx() {
|
|
1218
|
+
async addRedeemReserveCollateralIx() {
|
|
1282
1219
|
this.lendingIxsLabels.push(`redeemReserveCollateral`);
|
|
1283
1220
|
this.lendingIxs.push(
|
|
1284
1221
|
redeemReserveCollateral(
|
|
@@ -1288,16 +1225,16 @@ export class KaminoAction {
|
|
|
1288
1225
|
{
|
|
1289
1226
|
owner: this.owner,
|
|
1290
1227
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1291
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1228
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1292
1229
|
reserve: this.reserve.address,
|
|
1293
1230
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1294
1231
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
1295
1232
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
1296
|
-
userSourceCollateral: this.getUserCollateralAccountAddress(this.reserve),
|
|
1297
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1298
|
-
collateralTokenProgram:
|
|
1233
|
+
userSourceCollateral: await this.getUserCollateralAccountAddress(this.reserve),
|
|
1234
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1235
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1299
1236
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1300
|
-
instructionSysvarAccount:
|
|
1237
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1301
1238
|
},
|
|
1302
1239
|
this.kaminoMarket.programId
|
|
1303
1240
|
)
|
|
@@ -1305,7 +1242,7 @@ export class KaminoAction {
|
|
|
1305
1242
|
}
|
|
1306
1243
|
|
|
1307
1244
|
// @deprecated -- use addDepositIxV2 instead
|
|
1308
|
-
addDepositIx() {
|
|
1245
|
+
async addDepositIx() {
|
|
1309
1246
|
this.lendingIxsLabels.push(`depositReserveLiquidityAndObligationCollateral`);
|
|
1310
1247
|
this.lendingIxs.push(
|
|
1311
1248
|
depositReserveLiquidityAndObligationCollateral(
|
|
@@ -1314,36 +1251,30 @@ export class KaminoAction {
|
|
|
1314
1251
|
},
|
|
1315
1252
|
{
|
|
1316
1253
|
owner: this.owner,
|
|
1317
|
-
obligation: this.getObligationPda(),
|
|
1254
|
+
obligation: await this.getObligationPda(),
|
|
1318
1255
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1319
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1256
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1320
1257
|
reserve: this.reserve.address,
|
|
1321
1258
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1322
1259
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
1323
1260
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
1324
1261
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
1325
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1326
|
-
placeholderUserDestinationCollateral:
|
|
1327
|
-
collateralTokenProgram:
|
|
1262
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1263
|
+
placeholderUserDestinationCollateral: none(),
|
|
1264
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1328
1265
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1329
|
-
instructionSysvarAccount:
|
|
1266
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1330
1267
|
},
|
|
1331
1268
|
this.kaminoMarket.programId
|
|
1332
1269
|
)
|
|
1333
1270
|
);
|
|
1334
1271
|
}
|
|
1335
1272
|
|
|
1336
|
-
addDepositIxV2() {
|
|
1337
|
-
const farmsAccounts =
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
}
|
|
1342
|
-
: {
|
|
1343
|
-
obligationFarmUserState: obligationFarmStatePda(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
1344
|
-
reserveFarmState: this.reserve.state.farmCollateral,
|
|
1345
|
-
};
|
|
1346
|
-
|
|
1273
|
+
async addDepositIxV2() {
|
|
1274
|
+
const { collateralFarmAccounts: farmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
1275
|
+
await this.getObligationPda(),
|
|
1276
|
+
this.reserve
|
|
1277
|
+
);
|
|
1347
1278
|
this.lendingIxsLabels.push(`depositReserveLiquidityAndObligationCollateralV2`);
|
|
1348
1279
|
this.lendingIxs.push(
|
|
1349
1280
|
depositReserveLiquidityAndObligationCollateralV2(
|
|
@@ -1353,22 +1284,22 @@ export class KaminoAction {
|
|
|
1353
1284
|
{
|
|
1354
1285
|
depositAccounts: {
|
|
1355
1286
|
owner: this.owner,
|
|
1356
|
-
obligation: this.getObligationPda(),
|
|
1287
|
+
obligation: await this.getObligationPda(),
|
|
1357
1288
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1358
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1289
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1359
1290
|
reserve: this.reserve.address,
|
|
1360
1291
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1361
1292
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
1362
1293
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
1363
1294
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
1364
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1365
|
-
placeholderUserDestinationCollateral:
|
|
1366
|
-
collateralTokenProgram:
|
|
1295
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1296
|
+
placeholderUserDestinationCollateral: none(),
|
|
1297
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1367
1298
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1368
|
-
instructionSysvarAccount:
|
|
1299
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1369
1300
|
},
|
|
1370
1301
|
farmsAccounts,
|
|
1371
|
-
farmsProgram:
|
|
1302
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
1372
1303
|
},
|
|
1373
1304
|
this.kaminoMarket.programId
|
|
1374
1305
|
)
|
|
@@ -1376,7 +1307,7 @@ export class KaminoAction {
|
|
|
1376
1307
|
}
|
|
1377
1308
|
|
|
1378
1309
|
/// @deprecated -- use addDepositObligationCollateralIxV2 instead
|
|
1379
|
-
addDepositObligationCollateralIx() {
|
|
1310
|
+
async addDepositObligationCollateralIx() {
|
|
1380
1311
|
this.lendingIxsLabels.push(`depositObligationCollateral`);
|
|
1381
1312
|
this.lendingIxs.push(
|
|
1382
1313
|
depositObligationCollateral(
|
|
@@ -1385,29 +1316,25 @@ export class KaminoAction {
|
|
|
1385
1316
|
},
|
|
1386
1317
|
{
|
|
1387
1318
|
owner: this.owner,
|
|
1388
|
-
obligation: this.getObligationPda(),
|
|
1319
|
+
obligation: await this.getObligationPda(),
|
|
1389
1320
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1390
1321
|
depositReserve: this.reserve.address,
|
|
1391
1322
|
reserveDestinationCollateral: this.reserve.state.collateral.supplyVault,
|
|
1392
|
-
userSourceCollateral: this.getUserCollateralAccountAddress(this.reserve),
|
|
1393
|
-
tokenProgram:
|
|
1394
|
-
instructionSysvarAccount:
|
|
1323
|
+
userSourceCollateral: await this.getUserCollateralAccountAddress(this.reserve),
|
|
1324
|
+
tokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1325
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1395
1326
|
},
|
|
1396
1327
|
this.kaminoMarket.programId
|
|
1397
1328
|
)
|
|
1398
1329
|
);
|
|
1399
1330
|
}
|
|
1400
1331
|
|
|
1401
|
-
addDepositObligationCollateralIxV2() {
|
|
1402
|
-
const
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
: {
|
|
1408
|
-
obligationFarmUserState: obligationFarmStatePda(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
1409
|
-
reserveFarmState: this.reserve.state.farmCollateral,
|
|
1410
|
-
};
|
|
1332
|
+
async addDepositObligationCollateralIxV2() {
|
|
1333
|
+
const obligationAddress = await this.getObligationPda();
|
|
1334
|
+
const { collateralFarmAccounts: farmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
1335
|
+
obligationAddress,
|
|
1336
|
+
this.reserve
|
|
1337
|
+
);
|
|
1411
1338
|
|
|
1412
1339
|
this.lendingIxsLabels.push(`depositObligationCollateralV2`);
|
|
1413
1340
|
this.lendingIxs.push(
|
|
@@ -1418,17 +1345,17 @@ export class KaminoAction {
|
|
|
1418
1345
|
{
|
|
1419
1346
|
depositAccounts: {
|
|
1420
1347
|
owner: this.owner,
|
|
1421
|
-
obligation:
|
|
1348
|
+
obligation: obligationAddress,
|
|
1422
1349
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1423
1350
|
depositReserve: this.reserve.address,
|
|
1424
1351
|
reserveDestinationCollateral: this.reserve.state.collateral.supplyVault,
|
|
1425
|
-
userSourceCollateral: this.getUserCollateralAccountAddress(this.reserve),
|
|
1426
|
-
tokenProgram:
|
|
1427
|
-
instructionSysvarAccount:
|
|
1352
|
+
userSourceCollateral: await this.getUserCollateralAccountAddress(this.reserve),
|
|
1353
|
+
tokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1354
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1428
1355
|
},
|
|
1429
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1356
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1430
1357
|
farmsAccounts,
|
|
1431
|
-
farmsProgram:
|
|
1358
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
1432
1359
|
},
|
|
1433
1360
|
this.kaminoMarket.programId
|
|
1434
1361
|
)
|
|
@@ -1436,95 +1363,93 @@ export class KaminoAction {
|
|
|
1436
1363
|
}
|
|
1437
1364
|
|
|
1438
1365
|
/// @deprecated -- use addDepositObligationCollateralIxV2 instead
|
|
1439
|
-
addBorrowIx() {
|
|
1366
|
+
async addBorrowIx() {
|
|
1440
1367
|
this.lendingIxsLabels.push(`borrowObligationLiquidity`);
|
|
1441
1368
|
|
|
1442
1369
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1443
1370
|
|
|
1444
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1445
|
-
return {
|
|
1371
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
1372
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
1446
1373
|
});
|
|
1447
1374
|
|
|
1448
|
-
|
|
1375
|
+
let borrowIx = borrowObligationLiquidity(
|
|
1449
1376
|
{
|
|
1450
1377
|
liquidityAmount: this.amount,
|
|
1451
1378
|
},
|
|
1452
1379
|
{
|
|
1453
1380
|
owner: this.owner,
|
|
1454
|
-
obligation: this.getObligationPda(),
|
|
1381
|
+
obligation: await this.getObligationPda(),
|
|
1455
1382
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1456
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1383
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1457
1384
|
borrowReserve: this.reserve.address,
|
|
1458
1385
|
borrowReserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1459
1386
|
reserveSourceLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
1460
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1387
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1461
1388
|
borrowReserveLiquidityFeeReceiver: this.reserve.state.liquidity.feeVault,
|
|
1462
|
-
referrerTokenState:
|
|
1389
|
+
referrerTokenState: await this.getReferrerTokenStateAddress(this.reserve.address),
|
|
1463
1390
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1464
|
-
instructionSysvarAccount:
|
|
1391
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1465
1392
|
},
|
|
1466
1393
|
this.kaminoMarket.programId
|
|
1467
1394
|
);
|
|
1468
|
-
borrowIx
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1395
|
+
borrowIx = {
|
|
1396
|
+
...borrowIx,
|
|
1397
|
+
accounts:
|
|
1398
|
+
isKaminoObligation(this.obligation) &&
|
|
1399
|
+
(this.obligation.state.elevationGroup > 0 || this.obligation.refreshedStats.potentialElevationGroupUpdate > 0)
|
|
1400
|
+
? borrowIx.accounts!.concat(depositReserveAccountMetas)
|
|
1401
|
+
: borrowIx.accounts,
|
|
1402
|
+
};
|
|
1473
1403
|
this.lendingIxs.push(borrowIx);
|
|
1474
1404
|
}
|
|
1475
1405
|
|
|
1476
|
-
addBorrowIxV2() {
|
|
1406
|
+
async addBorrowIxV2() {
|
|
1477
1407
|
this.lendingIxsLabels.push(`borrowObligationLiquidityV2`);
|
|
1478
1408
|
|
|
1479
1409
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1480
1410
|
|
|
1481
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1482
|
-
return {
|
|
1411
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
1412
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
1483
1413
|
});
|
|
1484
1414
|
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
: {
|
|
1491
|
-
obligationFarmUserState: obligationFarmStatePda(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
1492
|
-
reserveFarmState: this.reserve.state.farmDebt,
|
|
1493
|
-
};
|
|
1415
|
+
const obligationAddress = await this.getObligationPda();
|
|
1416
|
+
const { debtFarmAccounts: farmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
1417
|
+
obligationAddress,
|
|
1418
|
+
this.reserve
|
|
1419
|
+
);
|
|
1494
1420
|
|
|
1495
|
-
|
|
1421
|
+
let borrowIx = borrowObligationLiquidityV2(
|
|
1496
1422
|
{
|
|
1497
1423
|
liquidityAmount: this.amount,
|
|
1498
1424
|
},
|
|
1499
1425
|
{
|
|
1500
1426
|
borrowAccounts: {
|
|
1501
1427
|
owner: this.owner,
|
|
1502
|
-
obligation:
|
|
1428
|
+
obligation: obligationAddress,
|
|
1503
1429
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1504
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1430
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1505
1431
|
borrowReserve: this.reserve.address,
|
|
1506
1432
|
borrowReserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1507
1433
|
reserveSourceLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
1508
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1434
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1509
1435
|
borrowReserveLiquidityFeeReceiver: this.reserve.state.liquidity.feeVault,
|
|
1510
|
-
referrerTokenState:
|
|
1511
|
-
this.referrer,
|
|
1512
|
-
this.reserve.address,
|
|
1513
|
-
this.kaminoMarket.programId
|
|
1514
|
-
)[0],
|
|
1436
|
+
referrerTokenState: await this.getReferrerTokenStateAddress(this.reserve.address),
|
|
1515
1437
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1516
|
-
instructionSysvarAccount:
|
|
1438
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1517
1439
|
},
|
|
1518
1440
|
farmsAccounts,
|
|
1519
|
-
farmsProgram:
|
|
1441
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
1520
1442
|
},
|
|
1521
1443
|
this.kaminoMarket.programId
|
|
1522
1444
|
);
|
|
1523
|
-
borrowIx
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1445
|
+
borrowIx = {
|
|
1446
|
+
...borrowIx,
|
|
1447
|
+
accounts:
|
|
1448
|
+
isKaminoObligation(this.obligation) &&
|
|
1449
|
+
(this.obligation.state.elevationGroup > 0 || this.obligation.refreshedStats.potentialElevationGroupUpdate > 0)
|
|
1450
|
+
? borrowIx.accounts!.concat(depositReserveAccountMetas)
|
|
1451
|
+
: borrowIx.accounts,
|
|
1452
|
+
};
|
|
1528
1453
|
this.lendingIxs.push(borrowIx);
|
|
1529
1454
|
}
|
|
1530
1455
|
|
|
@@ -1538,36 +1463,31 @@ export class KaminoAction {
|
|
|
1538
1463
|
},
|
|
1539
1464
|
{
|
|
1540
1465
|
owner: this.owner,
|
|
1541
|
-
obligation: this.getObligationPda(),
|
|
1466
|
+
obligation: await this.getObligationPda(),
|
|
1542
1467
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1543
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1468
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1544
1469
|
withdrawReserve: this.reserve.address,
|
|
1545
1470
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1546
1471
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
1547
1472
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
1548
1473
|
reserveSourceCollateral: this.reserve.state.collateral.supplyVault,
|
|
1549
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1550
|
-
placeholderUserDestinationCollateral:
|
|
1551
|
-
collateralTokenProgram:
|
|
1474
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1475
|
+
placeholderUserDestinationCollateral: none(),
|
|
1476
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1552
1477
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1553
|
-
instructionSysvarAccount:
|
|
1478
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1554
1479
|
},
|
|
1555
1480
|
this.kaminoMarket.programId
|
|
1556
1481
|
)
|
|
1557
1482
|
);
|
|
1558
1483
|
}
|
|
1559
1484
|
|
|
1560
|
-
async addWithdrawIxV2(collateralAmount: BN) {
|
|
1561
|
-
const
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
: {
|
|
1567
|
-
obligationFarmUserState: obligationFarmStatePda(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
1568
|
-
reserveFarmState: this.reserve.state.farmCollateral,
|
|
1569
|
-
};
|
|
1570
|
-
|
|
1485
|
+
async addWithdrawIxV2(collateralAmount: BN): Promise<void> {
|
|
1486
|
+
const obligationAddress = await this.getObligationPda();
|
|
1487
|
+
const { collateralFarmAccounts: farmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
1488
|
+
obligationAddress,
|
|
1489
|
+
this.reserve
|
|
1490
|
+
);
|
|
1571
1491
|
this.lendingIxsLabels.push(`withdrawObligationCollateralAndRedeemReserveCollateralV2`);
|
|
1572
1492
|
this.lendingIxs.push(
|
|
1573
1493
|
withdrawObligationCollateralAndRedeemReserveCollateralV2(
|
|
@@ -1577,22 +1497,22 @@ export class KaminoAction {
|
|
|
1577
1497
|
{
|
|
1578
1498
|
withdrawAccounts: {
|
|
1579
1499
|
owner: this.owner,
|
|
1580
|
-
obligation:
|
|
1500
|
+
obligation: obligationAddress,
|
|
1581
1501
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1582
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1502
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1583
1503
|
withdrawReserve: this.reserve.address,
|
|
1584
1504
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1585
1505
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
1586
1506
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
1587
1507
|
reserveSourceCollateral: this.reserve.state.collateral.supplyVault,
|
|
1588
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1589
|
-
placeholderUserDestinationCollateral:
|
|
1590
|
-
collateralTokenProgram:
|
|
1508
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1509
|
+
placeholderUserDestinationCollateral: none(),
|
|
1510
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1591
1511
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1592
|
-
instructionSysvarAccount:
|
|
1512
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1593
1513
|
},
|
|
1594
1514
|
farmsAccounts: farmsAccounts,
|
|
1595
|
-
farmsProgram:
|
|
1515
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
1596
1516
|
},
|
|
1597
1517
|
this.kaminoMarket.programId
|
|
1598
1518
|
)
|
|
@@ -1601,108 +1521,113 @@ export class KaminoAction {
|
|
|
1601
1521
|
|
|
1602
1522
|
/// @deprecated -- use addRepayIxV2 instead
|
|
1603
1523
|
async addRepayIx() {
|
|
1524
|
+
const obligationAddress = await this.getObligationPda();
|
|
1604
1525
|
this.lendingIxsLabels.push(
|
|
1605
|
-
`repayObligationLiquidity(reserve=${this.reserve.address})(obligation=${
|
|
1526
|
+
`repayObligationLiquidity(reserve=${this.reserve.address})(obligation=${obligationAddress})`
|
|
1606
1527
|
);
|
|
1607
1528
|
|
|
1608
1529
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1609
1530
|
|
|
1610
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1611
|
-
return {
|
|
1531
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
1532
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
1612
1533
|
});
|
|
1613
1534
|
|
|
1614
|
-
|
|
1535
|
+
let repayIx = repayObligationLiquidity(
|
|
1615
1536
|
{
|
|
1616
1537
|
liquidityAmount: this.amount,
|
|
1617
1538
|
},
|
|
1618
1539
|
{
|
|
1619
1540
|
owner: this.payer,
|
|
1620
|
-
obligation:
|
|
1541
|
+
obligation: obligationAddress,
|
|
1621
1542
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1622
1543
|
repayReserve: this.reserve.address,
|
|
1623
1544
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1624
|
-
userSourceLiquidity: this.getTokenAccountAddressByUser(this.reserve, this.payer),
|
|
1545
|
+
userSourceLiquidity: await this.getTokenAccountAddressByUser(this.reserve, this.payer.address),
|
|
1625
1546
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
1626
1547
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1627
|
-
instructionSysvarAccount:
|
|
1548
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1628
1549
|
},
|
|
1629
1550
|
this.kaminoMarket.programId
|
|
1630
1551
|
);
|
|
1631
1552
|
|
|
1632
|
-
repayIx
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1553
|
+
repayIx = {
|
|
1554
|
+
...repayIx,
|
|
1555
|
+
accounts:
|
|
1556
|
+
isKaminoObligation(this.obligation) && this.obligation.state.elevationGroup > 0
|
|
1557
|
+
? repayIx.accounts!.concat(depositReserveAccountMetas)
|
|
1558
|
+
: repayIx.accounts,
|
|
1559
|
+
};
|
|
1636
1560
|
|
|
1637
1561
|
this.lendingIxs.push(repayIx);
|
|
1638
1562
|
}
|
|
1639
1563
|
|
|
1640
1564
|
async addRepayIxV2() {
|
|
1565
|
+
const obligationAddress = await this.getObligationPda();
|
|
1641
1566
|
this.lendingIxsLabels.push(
|
|
1642
|
-
`repayObligationLiquidityV2(reserve=${this.reserve.address})(obligation=${
|
|
1567
|
+
`repayObligationLiquidityV2(reserve=${this.reserve.address})(obligation=${obligationAddress})`
|
|
1643
1568
|
);
|
|
1644
1569
|
|
|
1645
1570
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1646
1571
|
|
|
1647
|
-
const farmsAccounts =
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
reserveFarmState: this.reserve.state.farmDebt,
|
|
1655
|
-
};
|
|
1656
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1657
|
-
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1572
|
+
const { debtFarmAccounts: farmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
1573
|
+
obligationAddress,
|
|
1574
|
+
this.reserve
|
|
1575
|
+
);
|
|
1576
|
+
|
|
1577
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
1578
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
1658
1579
|
});
|
|
1659
1580
|
|
|
1660
|
-
|
|
1581
|
+
let repayIx = repayObligationLiquidityV2(
|
|
1661
1582
|
{
|
|
1662
1583
|
liquidityAmount: this.amount,
|
|
1663
1584
|
},
|
|
1664
1585
|
{
|
|
1665
1586
|
repayAccounts: {
|
|
1666
1587
|
owner: this.payer,
|
|
1667
|
-
obligation:
|
|
1588
|
+
obligation: obligationAddress,
|
|
1668
1589
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1669
1590
|
repayReserve: this.reserve.address,
|
|
1670
1591
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1671
|
-
userSourceLiquidity: this.getTokenAccountAddressByUser(this.reserve, this.payer),
|
|
1592
|
+
userSourceLiquidity: await this.getTokenAccountAddressByUser(this.reserve, this.payer.address),
|
|
1672
1593
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
1673
1594
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1674
|
-
instructionSysvarAccount:
|
|
1595
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1675
1596
|
},
|
|
1676
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1597
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1677
1598
|
farmsAccounts,
|
|
1678
|
-
farmsProgram:
|
|
1599
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
1679
1600
|
},
|
|
1680
1601
|
this.kaminoMarket.programId
|
|
1681
1602
|
);
|
|
1682
1603
|
|
|
1683
|
-
repayIx
|
|
1604
|
+
repayIx = {
|
|
1605
|
+
...repayIx,
|
|
1684
1606
|
// TODO: potential elev group update?
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1607
|
+
accounts:
|
|
1608
|
+
isKaminoObligation(this.obligation) && this.obligation.state.elevationGroup > 0
|
|
1609
|
+
? repayIx.accounts!.concat(depositReserveAccountMetas)
|
|
1610
|
+
: repayIx.accounts,
|
|
1611
|
+
};
|
|
1688
1612
|
|
|
1689
1613
|
this.lendingIxs.push(repayIx);
|
|
1690
1614
|
}
|
|
1691
1615
|
|
|
1692
|
-
addRepayAndWithdrawV2Ixs(withdrawCollateralAmount: BN) {
|
|
1616
|
+
async addRepayAndWithdrawV2Ixs(withdrawCollateralAmount: BN): Promise<void> {
|
|
1617
|
+
const obligationAddress = await this.getObligationPda();
|
|
1693
1618
|
this.lendingIxsLabels.push(
|
|
1694
1619
|
`repayAndWithdrawAndRedeem(repayReserve=${this.reserve!.address})(withdrawReserve=${
|
|
1695
1620
|
this.outflowReserve!.address
|
|
1696
|
-
})(obligation=${
|
|
1621
|
+
})(obligation=${obligationAddress})`
|
|
1697
1622
|
);
|
|
1698
1623
|
|
|
1699
1624
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1700
1625
|
|
|
1701
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1702
|
-
return {
|
|
1626
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
1627
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
1703
1628
|
});
|
|
1704
|
-
const borrowReserveAccountMetas = this.borrowReserves.map((reserve) => {
|
|
1705
|
-
return {
|
|
1629
|
+
const borrowReserveAccountMetas: IAccountMeta[] = this.borrowReserves.map((reserve) => {
|
|
1630
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
1706
1631
|
});
|
|
1707
1632
|
|
|
1708
1633
|
if (!this.outflowAmount) {
|
|
@@ -1713,30 +1638,13 @@ export class KaminoAction {
|
|
|
1713
1638
|
throw new Error(`outflowReserve not set`);
|
|
1714
1639
|
}
|
|
1715
1640
|
|
|
1716
|
-
const
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
: {
|
|
1722
|
-
obligationFarmUserState: obligationFarmStatePda(
|
|
1723
|
-
this.outflowReserve.state.farmCollateral,
|
|
1724
|
-
this.getObligationPda()
|
|
1725
|
-
),
|
|
1726
|
-
reserveFarmState: this.outflowReserve.state.farmCollateral,
|
|
1727
|
-
};
|
|
1728
|
-
|
|
1729
|
-
const debtFarmsAccounts = this.reserve.state.farmDebt.equals(PublicKey.default)
|
|
1730
|
-
? {
|
|
1731
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1732
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
1733
|
-
}
|
|
1734
|
-
: {
|
|
1735
|
-
obligationFarmUserState: obligationFarmStatePda(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
1736
|
-
reserveFarmState: this.reserve.state.farmDebt,
|
|
1737
|
-
};
|
|
1641
|
+
const { collateralFarmAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
1642
|
+
obligationAddress,
|
|
1643
|
+
this.outflowReserve
|
|
1644
|
+
);
|
|
1645
|
+
const { debtFarmAccounts } = await KaminoAction.getFarmAccountsForReserve(obligationAddress, this.reserve);
|
|
1738
1646
|
|
|
1739
|
-
|
|
1647
|
+
let repayAndWithdrawIx = repayAndWithdrawAndRedeem(
|
|
1740
1648
|
{
|
|
1741
1649
|
repayAmount: this.amount,
|
|
1742
1650
|
withdrawCollateralAmount,
|
|
@@ -1744,60 +1652,61 @@ export class KaminoAction {
|
|
|
1744
1652
|
{
|
|
1745
1653
|
repayAccounts: {
|
|
1746
1654
|
owner: this.owner,
|
|
1747
|
-
obligation:
|
|
1655
|
+
obligation: obligationAddress,
|
|
1748
1656
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1749
1657
|
repayReserve: this.reserve!.address,
|
|
1750
1658
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1751
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1659
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1752
1660
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
1753
1661
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1754
|
-
instructionSysvarAccount:
|
|
1662
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1755
1663
|
},
|
|
1756
1664
|
withdrawAccounts: {
|
|
1757
1665
|
owner: this.owner,
|
|
1758
|
-
obligation:
|
|
1666
|
+
obligation: obligationAddress,
|
|
1759
1667
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1760
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1668
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1761
1669
|
withdrawReserve: this.outflowReserve.address,
|
|
1762
1670
|
reserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
1763
1671
|
reserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
1764
1672
|
reserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
1765
1673
|
reserveSourceCollateral: this.outflowReserve.state.collateral.supplyVault,
|
|
1766
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1767
|
-
placeholderUserDestinationCollateral:
|
|
1768
|
-
collateralTokenProgram:
|
|
1674
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1675
|
+
placeholderUserDestinationCollateral: none(),
|
|
1676
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1769
1677
|
liquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1770
|
-
instructionSysvarAccount:
|
|
1678
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1771
1679
|
},
|
|
1772
|
-
collateralFarmsAccounts,
|
|
1773
|
-
debtFarmsAccounts,
|
|
1774
|
-
farmsProgram:
|
|
1680
|
+
collateralFarmsAccounts: collateralFarmAccounts,
|
|
1681
|
+
debtFarmsAccounts: debtFarmAccounts,
|
|
1682
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
1775
1683
|
},
|
|
1776
1684
|
this.kaminoMarket.programId
|
|
1777
1685
|
);
|
|
1778
1686
|
|
|
1779
|
-
repayAndWithdrawIx
|
|
1780
|
-
...
|
|
1781
|
-
|
|
1782
|
-
|
|
1687
|
+
repayAndWithdrawIx = {
|
|
1688
|
+
...repayAndWithdrawIx,
|
|
1689
|
+
accounts: repayAndWithdrawIx.accounts!.concat(depositReserveAccountMetas).concat(borrowReserveAccountMetas),
|
|
1690
|
+
};
|
|
1783
1691
|
|
|
1784
1692
|
this.lendingIxs.push(repayAndWithdrawIx);
|
|
1785
1693
|
}
|
|
1786
1694
|
|
|
1787
|
-
addDepositAndWithdrawV2Ixs(withdrawCollateralAmount: BN) {
|
|
1695
|
+
async addDepositAndWithdrawV2Ixs(withdrawCollateralAmount: BN): Promise<void> {
|
|
1696
|
+
const obligationAddress = await this.getObligationPda();
|
|
1788
1697
|
this.lendingIxsLabels.push(
|
|
1789
1698
|
`depositAndWithdrawV2(depositReserve=${this.reserve!.address})(withdrawReserve=${
|
|
1790
1699
|
this.outflowReserve!.address
|
|
1791
|
-
})(obligation=${
|
|
1700
|
+
})(obligation=${obligationAddress})`
|
|
1792
1701
|
);
|
|
1793
1702
|
|
|
1794
1703
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
1795
1704
|
|
|
1796
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1797
|
-
return {
|
|
1705
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
1706
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
1798
1707
|
});
|
|
1799
|
-
const borrowReserveAccountMetas = this.borrowReserves.map((reserve) => {
|
|
1800
|
-
return {
|
|
1708
|
+
const borrowReserveAccountMetas: IAccountMeta[] = this.borrowReserves.map((reserve) => {
|
|
1709
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
1801
1710
|
});
|
|
1802
1711
|
|
|
1803
1712
|
if (!this.outflowAmount) {
|
|
@@ -1808,29 +1717,17 @@ export class KaminoAction {
|
|
|
1808
1717
|
throw new Error(`outflowReserve not set`);
|
|
1809
1718
|
}
|
|
1810
1719
|
|
|
1811
|
-
const depositFarmsAccounts =
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
};
|
|
1820
|
-
const withdrawFarmsAccounts = this.outflowReserve.state.farmCollateral.equals(PublicKey.default)
|
|
1821
|
-
? {
|
|
1822
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
1823
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
1824
|
-
}
|
|
1825
|
-
: {
|
|
1826
|
-
obligationFarmUserState: obligationFarmStatePda(
|
|
1827
|
-
this.outflowReserve.state.farmCollateral,
|
|
1828
|
-
this.getObligationPda()
|
|
1829
|
-
),
|
|
1830
|
-
reserveFarmState: this.outflowReserve.state.farmCollateral,
|
|
1831
|
-
};
|
|
1720
|
+
const { collateralFarmAccounts: depositFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
1721
|
+
obligationAddress,
|
|
1722
|
+
this.reserve
|
|
1723
|
+
);
|
|
1724
|
+
const { collateralFarmAccounts: withdrawFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
1725
|
+
obligationAddress,
|
|
1726
|
+
this.outflowReserve
|
|
1727
|
+
);
|
|
1832
1728
|
|
|
1833
|
-
const
|
|
1729
|
+
const lendingMarketAuthority = await this.kaminoMarket.getLendingMarketAuthority();
|
|
1730
|
+
let depositAndWithdrawIx = depositAndWithdraw(
|
|
1834
1731
|
{
|
|
1835
1732
|
liquidityAmount: this.amount,
|
|
1836
1733
|
withdrawCollateralAmount,
|
|
@@ -1838,47 +1735,47 @@ export class KaminoAction {
|
|
|
1838
1735
|
{
|
|
1839
1736
|
depositAccounts: {
|
|
1840
1737
|
owner: this.owner,
|
|
1841
|
-
obligation:
|
|
1738
|
+
obligation: obligationAddress,
|
|
1842
1739
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1843
|
-
lendingMarketAuthority
|
|
1740
|
+
lendingMarketAuthority,
|
|
1844
1741
|
reserve: this.reserve.address,
|
|
1845
1742
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1846
1743
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
1847
1744
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
1848
1745
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
1849
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1850
|
-
placeholderUserDestinationCollateral:
|
|
1851
|
-
collateralTokenProgram:
|
|
1746
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1747
|
+
placeholderUserDestinationCollateral: none(),
|
|
1748
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1852
1749
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1853
|
-
instructionSysvarAccount:
|
|
1750
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1854
1751
|
},
|
|
1855
1752
|
withdrawAccounts: {
|
|
1856
1753
|
owner: this.owner,
|
|
1857
|
-
obligation:
|
|
1754
|
+
obligation: obligationAddress,
|
|
1858
1755
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1859
|
-
lendingMarketAuthority
|
|
1756
|
+
lendingMarketAuthority,
|
|
1860
1757
|
withdrawReserve: this.outflowReserve.address,
|
|
1861
1758
|
reserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
1862
1759
|
reserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
1863
1760
|
reserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
1864
1761
|
reserveSourceCollateral: this.outflowReserve.state.collateral.supplyVault,
|
|
1865
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1866
|
-
placeholderUserDestinationCollateral:
|
|
1867
|
-
collateralTokenProgram:
|
|
1762
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1763
|
+
placeholderUserDestinationCollateral: none(),
|
|
1764
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1868
1765
|
liquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1869
|
-
instructionSysvarAccount:
|
|
1766
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1870
1767
|
},
|
|
1871
1768
|
depositFarmsAccounts,
|
|
1872
1769
|
withdrawFarmsAccounts,
|
|
1873
|
-
farmsProgram:
|
|
1770
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
1874
1771
|
},
|
|
1875
1772
|
this.kaminoMarket.programId
|
|
1876
1773
|
);
|
|
1877
1774
|
|
|
1878
|
-
depositAndWithdrawIx
|
|
1879
|
-
...
|
|
1880
|
-
|
|
1881
|
-
|
|
1775
|
+
depositAndWithdrawIx = {
|
|
1776
|
+
...depositAndWithdrawIx,
|
|
1777
|
+
accounts: depositAndWithdrawIx.accounts!.concat(depositReserveAccountMetas).concat(borrowReserveAccountMetas),
|
|
1778
|
+
};
|
|
1882
1779
|
|
|
1883
1780
|
this.lendingIxs.push(depositAndWithdrawIx);
|
|
1884
1781
|
}
|
|
@@ -1893,19 +1790,19 @@ export class KaminoAction {
|
|
|
1893
1790
|
},
|
|
1894
1791
|
{
|
|
1895
1792
|
owner: this.owner,
|
|
1896
|
-
obligation: this.getObligationPda(),
|
|
1793
|
+
obligation: await this.getObligationPda(),
|
|
1897
1794
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1898
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1795
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1899
1796
|
reserve: this.reserve.address,
|
|
1900
1797
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1901
1798
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
1902
1799
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
1903
1800
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
1904
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1905
|
-
placeholderUserDestinationCollateral:
|
|
1906
|
-
collateralTokenProgram:
|
|
1801
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1802
|
+
placeholderUserDestinationCollateral: none(),
|
|
1803
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1907
1804
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1908
|
-
instructionSysvarAccount:
|
|
1805
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1909
1806
|
},
|
|
1910
1807
|
this.kaminoMarket.programId
|
|
1911
1808
|
)
|
|
@@ -1923,50 +1820,45 @@ export class KaminoAction {
|
|
|
1923
1820
|
if (depositReservesList.length === 0) {
|
|
1924
1821
|
depositReservesList.push(this.reserve.address);
|
|
1925
1822
|
}
|
|
1926
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1927
|
-
return {
|
|
1823
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
1824
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
1928
1825
|
});
|
|
1929
1826
|
|
|
1930
|
-
|
|
1827
|
+
let borrowIx = borrowObligationLiquidity(
|
|
1931
1828
|
{
|
|
1932
1829
|
liquidityAmount: this.outflowAmount,
|
|
1933
1830
|
},
|
|
1934
1831
|
{
|
|
1935
1832
|
owner: this.owner,
|
|
1936
|
-
obligation: this.getObligationPda(),
|
|
1833
|
+
obligation: await this.getObligationPda(),
|
|
1937
1834
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1938
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1835
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1939
1836
|
borrowReserve: this.outflowReserve.address,
|
|
1940
1837
|
borrowReserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
1941
1838
|
reserveSourceLiquidity: this.outflowReserve.state.liquidity.supplyVault,
|
|
1942
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1839
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1943
1840
|
borrowReserveLiquidityFeeReceiver: this.outflowReserve.state.liquidity.feeVault,
|
|
1944
|
-
referrerTokenState:
|
|
1945
|
-
this.referrer,
|
|
1946
|
-
this.outflowReserve.address,
|
|
1947
|
-
this.kaminoMarket.programId
|
|
1948
|
-
)[0],
|
|
1841
|
+
referrerTokenState: await this.getReferrerTokenStateAddress(this.outflowReserve.address),
|
|
1949
1842
|
tokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
1950
|
-
instructionSysvarAccount:
|
|
1843
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1951
1844
|
},
|
|
1952
1845
|
this.kaminoMarket.programId
|
|
1953
1846
|
);
|
|
1954
1847
|
|
|
1955
|
-
borrowIx
|
|
1848
|
+
borrowIx = {
|
|
1849
|
+
...borrowIx,
|
|
1850
|
+
accounts: borrowIx.accounts!.concat(depositReserveAccountMetas),
|
|
1851
|
+
};
|
|
1956
1852
|
|
|
1957
1853
|
this.lendingIxs.push(borrowIx);
|
|
1958
1854
|
}
|
|
1959
1855
|
|
|
1960
|
-
async addDepositAndBorrowIxV2() {
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
: {
|
|
1967
|
-
obligationFarmUserState: obligationFarmStatePda(this.reserve.state.farmCollateral, this.getObligationPda()),
|
|
1968
|
-
reserveFarmState: this.reserve.state.farmCollateral,
|
|
1969
|
-
};
|
|
1856
|
+
async addDepositAndBorrowIxV2(): Promise<void> {
|
|
1857
|
+
const obligationAddress = await this.getObligationPda();
|
|
1858
|
+
const { collateralFarmAccounts: collateralFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
1859
|
+
obligationAddress,
|
|
1860
|
+
this.reserve
|
|
1861
|
+
);
|
|
1970
1862
|
|
|
1971
1863
|
this.lendingIxsLabels.push(`depositReserveLiquidityAndObligationCollateralV2`);
|
|
1972
1864
|
this.lendingIxsLabels.push(`borrowObligationLiquidityV2`);
|
|
@@ -1978,22 +1870,22 @@ export class KaminoAction {
|
|
|
1978
1870
|
{
|
|
1979
1871
|
depositAccounts: {
|
|
1980
1872
|
owner: this.owner,
|
|
1981
|
-
obligation:
|
|
1873
|
+
obligation: obligationAddress,
|
|
1982
1874
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
1983
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1875
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
1984
1876
|
reserve: this.reserve.address,
|
|
1985
1877
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
1986
1878
|
reserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
1987
1879
|
reserveCollateralMint: this.reserve.getCTokenMint(),
|
|
1988
1880
|
reserveDestinationDepositCollateral: this.reserve.state.collateral.supplyVault, // destinationCollateral
|
|
1989
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1990
|
-
placeholderUserDestinationCollateral:
|
|
1991
|
-
collateralTokenProgram:
|
|
1881
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
1882
|
+
placeholderUserDestinationCollateral: none(),
|
|
1883
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
1992
1884
|
liquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
1993
|
-
instructionSysvarAccount:
|
|
1885
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
1994
1886
|
},
|
|
1995
1887
|
farmsAccounts: collateralFarmsAccounts,
|
|
1996
|
-
farmsProgram:
|
|
1888
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
1997
1889
|
},
|
|
1998
1890
|
this.kaminoMarket.programId
|
|
1999
1891
|
)
|
|
@@ -2011,84 +1903,82 @@ export class KaminoAction {
|
|
|
2011
1903
|
if (depositReservesList.length === 0) {
|
|
2012
1904
|
depositReservesList.push(this.reserve.address);
|
|
2013
1905
|
}
|
|
2014
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
2015
|
-
return {
|
|
1906
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
1907
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
2016
1908
|
});
|
|
2017
1909
|
|
|
2018
|
-
const debtFarmsAccounts =
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
}
|
|
2023
|
-
: {
|
|
2024
|
-
obligationFarmUserState: obligationFarmStatePda(this.outflowReserve.state.farmDebt, this.getObligationPda()),
|
|
2025
|
-
reserveFarmState: this.outflowReserve.state.farmDebt,
|
|
2026
|
-
};
|
|
1910
|
+
const { debtFarmAccounts: debtFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
1911
|
+
obligationAddress,
|
|
1912
|
+
this.outflowReserve
|
|
1913
|
+
);
|
|
2027
1914
|
|
|
2028
|
-
|
|
1915
|
+
let borrowIx = borrowObligationLiquidityV2(
|
|
2029
1916
|
{
|
|
2030
1917
|
liquidityAmount: this.outflowAmount,
|
|
2031
1918
|
},
|
|
2032
1919
|
{
|
|
2033
1920
|
borrowAccounts: {
|
|
2034
1921
|
owner: this.owner,
|
|
2035
|
-
obligation:
|
|
1922
|
+
obligation: obligationAddress,
|
|
2036
1923
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
2037
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
1924
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
2038
1925
|
borrowReserve: this.outflowReserve.address,
|
|
2039
1926
|
borrowReserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
2040
1927
|
reserveSourceLiquidity: this.outflowReserve.state.liquidity.supplyVault,
|
|
2041
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
1928
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
2042
1929
|
borrowReserveLiquidityFeeReceiver: this.outflowReserve.state.liquidity.feeVault,
|
|
2043
|
-
referrerTokenState:
|
|
2044
|
-
this.referrer,
|
|
2045
|
-
this.outflowReserve.address,
|
|
2046
|
-
this.kaminoMarket.programId
|
|
2047
|
-
)[0],
|
|
1930
|
+
referrerTokenState: await this.getReferrerTokenStateAddress(this.outflowReserve.address),
|
|
2048
1931
|
tokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
2049
|
-
instructionSysvarAccount:
|
|
1932
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
2050
1933
|
},
|
|
2051
1934
|
farmsAccounts: debtFarmsAccounts,
|
|
2052
|
-
farmsProgram:
|
|
1935
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
2053
1936
|
},
|
|
2054
1937
|
this.kaminoMarket.programId
|
|
2055
1938
|
);
|
|
2056
1939
|
|
|
2057
|
-
borrowIx
|
|
1940
|
+
borrowIx = {
|
|
1941
|
+
...borrowIx,
|
|
1942
|
+
accounts: borrowIx.accounts!.concat(depositReserveAccountMetas),
|
|
1943
|
+
};
|
|
2058
1944
|
|
|
2059
1945
|
this.lendingIxs.push(borrowIx);
|
|
2060
1946
|
}
|
|
2061
1947
|
|
|
2062
1948
|
async addRepayAndWithdrawIxs(withdrawCollateralAmount: BN) {
|
|
1949
|
+
const obligationAddress = await this.getObligationPda();
|
|
2063
1950
|
this.lendingIxsLabels.push(
|
|
2064
|
-
`repayObligationLiquidity(reserve=${this.reserve!.address})(obligation=${
|
|
1951
|
+
`repayObligationLiquidity(reserve=${this.reserve!.address})(obligation=${obligationAddress})`
|
|
2065
1952
|
);
|
|
2066
1953
|
this.lendingIxsLabels.push(`withdrawObligationCollateralAndRedeemReserveCollateral`);
|
|
2067
1954
|
|
|
2068
1955
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
2069
1956
|
|
|
2070
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
2071
|
-
return {
|
|
1957
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
1958
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
2072
1959
|
});
|
|
2073
|
-
|
|
1960
|
+
let repayIx = repayObligationLiquidity(
|
|
2074
1961
|
{
|
|
2075
1962
|
liquidityAmount: this.amount,
|
|
2076
1963
|
},
|
|
2077
1964
|
{
|
|
2078
1965
|
owner: this.owner,
|
|
2079
|
-
obligation:
|
|
1966
|
+
obligation: obligationAddress,
|
|
2080
1967
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
2081
1968
|
repayReserve: this.reserve!.address,
|
|
2082
1969
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
2083
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
1970
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
2084
1971
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
2085
1972
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
2086
|
-
instructionSysvarAccount:
|
|
1973
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
2087
1974
|
},
|
|
2088
1975
|
this.kaminoMarket.programId
|
|
2089
1976
|
);
|
|
2090
1977
|
|
|
2091
|
-
repayIx
|
|
1978
|
+
repayIx = {
|
|
1979
|
+
...repayIx,
|
|
1980
|
+
accounts: repayIx.accounts!.concat(depositReserveAccountMetas),
|
|
1981
|
+
};
|
|
2092
1982
|
|
|
2093
1983
|
this.lendingIxs.push(repayIx);
|
|
2094
1984
|
if (!this.outflowReserve) {
|
|
@@ -2106,19 +1996,19 @@ export class KaminoAction {
|
|
|
2106
1996
|
},
|
|
2107
1997
|
{
|
|
2108
1998
|
owner: this.owner,
|
|
2109
|
-
obligation:
|
|
1999
|
+
obligation: obligationAddress,
|
|
2110
2000
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
2111
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
2001
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
2112
2002
|
withdrawReserve: this.outflowReserve.address,
|
|
2113
2003
|
reserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
2114
2004
|
reserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
2115
2005
|
reserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
2116
2006
|
reserveSourceCollateral: this.outflowReserve.state.collateral.supplyVault,
|
|
2117
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
2118
|
-
placeholderUserDestinationCollateral:
|
|
2119
|
-
collateralTokenProgram:
|
|
2007
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
2008
|
+
placeholderUserDestinationCollateral: none(),
|
|
2009
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
2120
2010
|
liquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
2121
|
-
instructionSysvarAccount:
|
|
2011
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
2122
2012
|
},
|
|
2123
2013
|
this.kaminoMarket.programId
|
|
2124
2014
|
)
|
|
@@ -2126,8 +2016,9 @@ export class KaminoAction {
|
|
|
2126
2016
|
}
|
|
2127
2017
|
|
|
2128
2018
|
async addRepayAndWithdrawIxsV2(withdrawCollateralAmount: BN) {
|
|
2019
|
+
const obligationAddress = await this.getObligationPda();
|
|
2129
2020
|
this.lendingIxsLabels.push(
|
|
2130
|
-
`repayObligationLiquidityV2(reserve=${this.reserve!.address})(obligation=${
|
|
2021
|
+
`repayObligationLiquidityV2(reserve=${this.reserve!.address})(obligation=${obligationAddress})`
|
|
2131
2022
|
);
|
|
2132
2023
|
this.lendingIxsLabels.push(`withdrawObligationCollateralAndRedeemReserveCollateralV2`);
|
|
2133
2024
|
|
|
@@ -2137,45 +2028,45 @@ export class KaminoAction {
|
|
|
2137
2028
|
|
|
2138
2029
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
2139
2030
|
|
|
2140
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
2141
|
-
return {
|
|
2031
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
2032
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
2142
2033
|
});
|
|
2143
2034
|
|
|
2144
|
-
const debtFarmsAccounts =
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
}
|
|
2149
|
-
: {
|
|
2150
|
-
obligationFarmUserState: obligationFarmStatePda(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
2151
|
-
reserveFarmState: this.reserve.state.farmDebt,
|
|
2152
|
-
};
|
|
2035
|
+
const { debtFarmAccounts: debtFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
2036
|
+
obligationAddress,
|
|
2037
|
+
this.reserve
|
|
2038
|
+
);
|
|
2153
2039
|
|
|
2154
|
-
|
|
2040
|
+
let repayIx = repayObligationLiquidityV2(
|
|
2155
2041
|
{
|
|
2156
2042
|
liquidityAmount: this.amount,
|
|
2157
2043
|
},
|
|
2158
2044
|
{
|
|
2159
2045
|
repayAccounts: {
|
|
2160
2046
|
owner: this.owner,
|
|
2161
|
-
obligation:
|
|
2047
|
+
obligation: obligationAddress,
|
|
2162
2048
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
2163
2049
|
repayReserve: this.reserve!.address,
|
|
2164
2050
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
2165
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
2051
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
2166
2052
|
reserveDestinationLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
2167
2053
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
2168
|
-
instructionSysvarAccount:
|
|
2054
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
2169
2055
|
},
|
|
2170
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
2056
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
2171
2057
|
farmsAccounts: debtFarmsAccounts,
|
|
2172
|
-
farmsProgram:
|
|
2058
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
2173
2059
|
},
|
|
2174
2060
|
this.kaminoMarket.programId
|
|
2175
2061
|
);
|
|
2176
2062
|
|
|
2177
|
-
repayIx
|
|
2178
|
-
|
|
2063
|
+
repayIx = {
|
|
2064
|
+
...repayIx,
|
|
2065
|
+
accounts:
|
|
2066
|
+
this.obligation.state.elevationGroup > 0
|
|
2067
|
+
? repayIx.accounts!.concat(depositReserveAccountMetas)
|
|
2068
|
+
: repayIx.accounts,
|
|
2069
|
+
};
|
|
2179
2070
|
|
|
2180
2071
|
this.lendingIxs.push(repayIx);
|
|
2181
2072
|
if (!this.outflowReserve) {
|
|
@@ -2186,18 +2077,10 @@ export class KaminoAction {
|
|
|
2186
2077
|
throw new Error(`outflowAmount not set`);
|
|
2187
2078
|
}
|
|
2188
2079
|
|
|
2189
|
-
const collateralFarmsAccounts =
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
}
|
|
2194
|
-
: {
|
|
2195
|
-
obligationFarmUserState: obligationFarmStatePda(
|
|
2196
|
-
this.outflowReserve.state.farmCollateral,
|
|
2197
|
-
this.getObligationPda()
|
|
2198
|
-
),
|
|
2199
|
-
reserveFarmState: this.outflowReserve.state.farmCollateral,
|
|
2200
|
-
};
|
|
2080
|
+
const { collateralFarmAccounts: collateralFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
2081
|
+
obligationAddress,
|
|
2082
|
+
this.outflowReserve
|
|
2083
|
+
);
|
|
2201
2084
|
|
|
2202
2085
|
this.lendingIxs.push(
|
|
2203
2086
|
withdrawObligationCollateralAndRedeemReserveCollateralV2(
|
|
@@ -2207,29 +2090,29 @@ export class KaminoAction {
|
|
|
2207
2090
|
{
|
|
2208
2091
|
withdrawAccounts: {
|
|
2209
2092
|
owner: this.owner,
|
|
2210
|
-
obligation:
|
|
2093
|
+
obligation: obligationAddress,
|
|
2211
2094
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
2212
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
2095
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
2213
2096
|
withdrawReserve: this.outflowReserve.address,
|
|
2214
2097
|
reserveLiquidityMint: this.outflowReserve.getLiquidityMint(),
|
|
2215
2098
|
reserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
2216
2099
|
reserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
2217
2100
|
reserveSourceCollateral: this.outflowReserve.state.collateral.supplyVault,
|
|
2218
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
2219
|
-
placeholderUserDestinationCollateral:
|
|
2220
|
-
collateralTokenProgram:
|
|
2101
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
2102
|
+
placeholderUserDestinationCollateral: none(),
|
|
2103
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
2221
2104
|
liquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
2222
|
-
instructionSysvarAccount:
|
|
2105
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
2223
2106
|
},
|
|
2224
2107
|
farmsAccounts: collateralFarmsAccounts,
|
|
2225
|
-
farmsProgram:
|
|
2108
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
2226
2109
|
},
|
|
2227
2110
|
this.kaminoMarket.programId
|
|
2228
2111
|
)
|
|
2229
2112
|
);
|
|
2230
2113
|
}
|
|
2231
2114
|
|
|
2232
|
-
addLiquidateIx(maxAllowedLtvOverridePercent: number = 0) {
|
|
2115
|
+
async addLiquidateIx(maxAllowedLtvOverridePercent: number = 0): Promise<void> {
|
|
2233
2116
|
this.lendingIxsLabels.push(`liquidateObligationAndRedeemReserveCollateral`);
|
|
2234
2117
|
if (!this.outflowReserve) {
|
|
2235
2118
|
throw Error(`Withdraw reserve during liquidation is not defined`);
|
|
@@ -2240,11 +2123,11 @@ export class KaminoAction {
|
|
|
2240
2123
|
}
|
|
2241
2124
|
|
|
2242
2125
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
2243
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
2244
|
-
return {
|
|
2126
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
2127
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
2245
2128
|
});
|
|
2246
2129
|
|
|
2247
|
-
|
|
2130
|
+
let liquidateIx = liquidateObligationAndRedeemReserveCollateral(
|
|
2248
2131
|
{
|
|
2249
2132
|
liquidityAmount: this.amount,
|
|
2250
2133
|
// TODO: Configure this when updating liquidator with new interface
|
|
@@ -2253,9 +2136,9 @@ export class KaminoAction {
|
|
|
2253
2136
|
},
|
|
2254
2137
|
{
|
|
2255
2138
|
liquidator: this.owner,
|
|
2256
|
-
obligation: this.getObligationPda(),
|
|
2139
|
+
obligation: await this.getObligationPda(),
|
|
2257
2140
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
2258
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
2141
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
2259
2142
|
repayReserve: this.reserve.address,
|
|
2260
2143
|
repayReserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
2261
2144
|
repayReserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
@@ -2264,21 +2147,24 @@ export class KaminoAction {
|
|
|
2264
2147
|
withdrawReserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
2265
2148
|
withdrawReserveCollateralSupply: this.outflowReserve.state.collateral.supplyVault,
|
|
2266
2149
|
withdrawReserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
2267
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
2268
|
-
userDestinationCollateral: this.getUserCollateralAccountAddress(this.outflowReserve),
|
|
2269
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
2150
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
2151
|
+
userDestinationCollateral: await this.getUserCollateralAccountAddress(this.outflowReserve),
|
|
2152
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
2270
2153
|
withdrawReserveLiquidityFeeReceiver: this.outflowReserve.state.liquidity.feeVault,
|
|
2271
|
-
collateralTokenProgram:
|
|
2154
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
2272
2155
|
repayLiquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
2273
2156
|
withdrawLiquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
2274
|
-
instructionSysvarAccount:
|
|
2157
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
2275
2158
|
},
|
|
2276
2159
|
this.kaminoMarket.programId
|
|
2277
2160
|
);
|
|
2278
|
-
liquidateIx
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2161
|
+
liquidateIx = {
|
|
2162
|
+
...liquidateIx,
|
|
2163
|
+
accounts:
|
|
2164
|
+
this.obligation.state.elevationGroup > 0
|
|
2165
|
+
? liquidateIx.accounts!.concat(depositReserveAccountMetas)
|
|
2166
|
+
: liquidateIx.accounts,
|
|
2167
|
+
};
|
|
2282
2168
|
this.lendingIxs.push(liquidateIx);
|
|
2283
2169
|
}
|
|
2284
2170
|
|
|
@@ -2293,34 +2179,21 @@ export class KaminoAction {
|
|
|
2293
2179
|
}
|
|
2294
2180
|
|
|
2295
2181
|
const depositReservesList = this.getAdditionalDepositReservesList();
|
|
2296
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
2297
|
-
return {
|
|
2182
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
2183
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
2298
2184
|
});
|
|
2299
2185
|
|
|
2300
|
-
const
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
),
|
|
2310
|
-
reserveFarmState: this.outflowReserve.state.farmCollateral,
|
|
2311
|
-
};
|
|
2312
|
-
|
|
2313
|
-
const debtFarmsAccounts = this.reserve.state.farmDebt.equals(PublicKey.default)
|
|
2314
|
-
? {
|
|
2315
|
-
obligationFarmUserState: this.kaminoMarket.programId,
|
|
2316
|
-
reserveFarmState: this.kaminoMarket.programId,
|
|
2317
|
-
}
|
|
2318
|
-
: {
|
|
2319
|
-
obligationFarmUserState: obligationFarmStatePda(this.reserve.state.farmDebt, this.getObligationPda()),
|
|
2320
|
-
reserveFarmState: this.reserve.state.farmDebt,
|
|
2321
|
-
};
|
|
2186
|
+
const obligationAddress = await this.getObligationPda();
|
|
2187
|
+
const { collateralFarmAccounts: collateralFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
2188
|
+
obligationAddress,
|
|
2189
|
+
this.outflowReserve
|
|
2190
|
+
);
|
|
2191
|
+
const { debtFarmAccounts: debtFarmsAccounts } = await KaminoAction.getFarmAccountsForReserve(
|
|
2192
|
+
await this.getObligationPda(),
|
|
2193
|
+
this.reserve
|
|
2194
|
+
);
|
|
2322
2195
|
|
|
2323
|
-
|
|
2196
|
+
let liquidateIx = liquidateObligationAndRedeemReserveCollateralV2(
|
|
2324
2197
|
{
|
|
2325
2198
|
liquidityAmount: this.amount,
|
|
2326
2199
|
// TODO: Configure this when updating liquidator with new interface
|
|
@@ -2330,9 +2203,9 @@ export class KaminoAction {
|
|
|
2330
2203
|
{
|
|
2331
2204
|
liquidationAccounts: {
|
|
2332
2205
|
liquidator: this.owner,
|
|
2333
|
-
obligation:
|
|
2206
|
+
obligation: obligationAddress,
|
|
2334
2207
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
2335
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
2208
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
2336
2209
|
repayReserve: this.reserve.address,
|
|
2337
2210
|
repayReserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
2338
2211
|
repayReserveLiquiditySupply: this.reserve.state.liquidity.supplyVault,
|
|
@@ -2341,25 +2214,28 @@ export class KaminoAction {
|
|
|
2341
2214
|
withdrawReserveCollateralMint: this.outflowReserve.getCTokenMint(),
|
|
2342
2215
|
withdrawReserveCollateralSupply: this.outflowReserve.state.collateral.supplyVault,
|
|
2343
2216
|
withdrawReserveLiquiditySupply: this.outflowReserve.state.liquidity.supplyVault,
|
|
2344
|
-
userSourceLiquidity: this.getUserTokenAccountAddress(this.reserve),
|
|
2345
|
-
userDestinationCollateral: this.getUserCollateralAccountAddress(this.outflowReserve),
|
|
2346
|
-
userDestinationLiquidity: this.getUserTokenAccountAddress(this.outflowReserve),
|
|
2217
|
+
userSourceLiquidity: await this.getUserTokenAccountAddress(this.reserve),
|
|
2218
|
+
userDestinationCollateral: await this.getUserCollateralAccountAddress(this.outflowReserve),
|
|
2219
|
+
userDestinationLiquidity: await this.getUserTokenAccountAddress(this.outflowReserve),
|
|
2347
2220
|
withdrawReserveLiquidityFeeReceiver: this.outflowReserve.state.liquidity.feeVault,
|
|
2348
|
-
collateralTokenProgram:
|
|
2221
|
+
collateralTokenProgram: TOKEN_PROGRAM_ADDRESS,
|
|
2349
2222
|
repayLiquidityTokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
2350
2223
|
withdrawLiquidityTokenProgram: this.outflowReserve.getLiquidityTokenProgram(),
|
|
2351
|
-
instructionSysvarAccount:
|
|
2224
|
+
instructionSysvarAccount: SYSVAR_INSTRUCTIONS_ADDRESS,
|
|
2352
2225
|
},
|
|
2353
2226
|
debtFarmsAccounts,
|
|
2354
2227
|
collateralFarmsAccounts,
|
|
2355
|
-
farmsProgram:
|
|
2228
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
2356
2229
|
},
|
|
2357
2230
|
this.kaminoMarket.programId
|
|
2358
2231
|
);
|
|
2359
|
-
liquidateIx
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2232
|
+
liquidateIx = {
|
|
2233
|
+
...liquidateIx,
|
|
2234
|
+
accounts:
|
|
2235
|
+
this.obligation!.state.elevationGroup > 0
|
|
2236
|
+
? liquidateIx.accounts!.concat(depositReserveAccountMetas)
|
|
2237
|
+
: liquidateIx.accounts,
|
|
2238
|
+
};
|
|
2363
2239
|
this.lendingIxs.push(liquidateIx);
|
|
2364
2240
|
}
|
|
2365
2241
|
|
|
@@ -2380,27 +2256,27 @@ export class KaminoAction {
|
|
|
2380
2256
|
);
|
|
2381
2257
|
}
|
|
2382
2258
|
|
|
2383
|
-
addRefreshObligation(crank:
|
|
2384
|
-
const uniqueReserveAddresses = new
|
|
2259
|
+
async addRefreshObligation(crank: TransactionSigner): Promise<void> {
|
|
2260
|
+
const uniqueReserveAddresses = [...new Set<Address>(this.depositReserves.concat(this.borrowReserves))];
|
|
2385
2261
|
|
|
2386
2262
|
const addAllToSetupIxs = 'setup';
|
|
2387
2263
|
// Union of addresses
|
|
2388
2264
|
const allReservesExcludingCurrent = [...uniqueReserveAddresses];
|
|
2389
2265
|
|
|
2390
2266
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAllToSetupIxs);
|
|
2391
|
-
this.addRefreshFarmsForReserve(
|
|
2267
|
+
await this.addRefreshFarmsForReserve(
|
|
2392
2268
|
this.depositReserves.map((r) => this.kaminoMarket.getReserveByAddress(r)!),
|
|
2393
2269
|
addAllToSetupIxs,
|
|
2394
2270
|
ReserveFarmKind.Collateral,
|
|
2395
2271
|
crank
|
|
2396
2272
|
);
|
|
2397
|
-
this.addRefreshFarmsForReserve(
|
|
2273
|
+
await this.addRefreshFarmsForReserve(
|
|
2398
2274
|
this.borrowReserves.map((r) => this.kaminoMarket.getReserveByAddress(r)!),
|
|
2399
2275
|
addAllToSetupIxs,
|
|
2400
2276
|
ReserveFarmKind.Debt,
|
|
2401
2277
|
crank
|
|
2402
2278
|
);
|
|
2403
|
-
this.addRefreshObligationIx(addAllToSetupIxs);
|
|
2279
|
+
await this.addRefreshObligationIx(addAllToSetupIxs);
|
|
2404
2280
|
}
|
|
2405
2281
|
|
|
2406
2282
|
async addSupportIxsWithoutInitObligation(
|
|
@@ -2471,7 +2347,7 @@ export class KaminoAction {
|
|
|
2471
2347
|
this.preLoadedDepositReservesSameTx.push(this.reserve.address);
|
|
2472
2348
|
}
|
|
2473
2349
|
}
|
|
2474
|
-
} else if (action === 'liquidate' &&
|
|
2350
|
+
} else if (action === 'liquidate' && this.outflowReserve.address !== this.reserve.address) {
|
|
2475
2351
|
currentReserves = [this.outflowReserve, this.reserve];
|
|
2476
2352
|
} else {
|
|
2477
2353
|
currentReserves = [this.reserve];
|
|
@@ -2480,12 +2356,12 @@ export class KaminoAction {
|
|
|
2480
2356
|
currentReserves = [this.reserve];
|
|
2481
2357
|
}
|
|
2482
2358
|
|
|
2483
|
-
const uniqueReserveAddresses = new
|
|
2484
|
-
const currentReserveAddresses = new
|
|
2359
|
+
const uniqueReserveAddresses = new Set<Address>(this.depositReserves.concat(this.borrowReserves));
|
|
2360
|
+
const currentReserveAddresses = new Set<Address>(currentReserves.map((reserve) => reserve.address));
|
|
2485
2361
|
|
|
2486
2362
|
// Union of addresses
|
|
2487
|
-
const allReservesExcludingCurrent = [...uniqueReserveAddresses
|
|
2488
|
-
(address) => !currentReserveAddresses.
|
|
2363
|
+
const allReservesExcludingCurrent = [...uniqueReserveAddresses].filter(
|
|
2364
|
+
(address) => !currentReserveAddresses.has(address)
|
|
2489
2365
|
);
|
|
2490
2366
|
|
|
2491
2367
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAsSupportIx);
|
|
@@ -2524,7 +2400,7 @@ export class KaminoAction {
|
|
|
2524
2400
|
}
|
|
2525
2401
|
}
|
|
2526
2402
|
}
|
|
2527
|
-
this.addRefreshReserveIxs(currentReserveAddresses
|
|
2403
|
+
this.addRefreshReserveIxs([...currentReserveAddresses], addAsSupportIx);
|
|
2528
2404
|
|
|
2529
2405
|
if (action === 'repayAndWithdraw' && addAsSupportIx === 'inBetween') {
|
|
2530
2406
|
if (!isKaminoObligation(this.obligation)) {
|
|
@@ -2537,9 +2413,9 @@ export class KaminoAction {
|
|
|
2537
2413
|
const repaidBorrowReservesToSkip = repayObligationLiquidity.amount.lte(new Decimal(this.amount.toString()))
|
|
2538
2414
|
? [repayObligationLiquidity.reserveAddress]
|
|
2539
2415
|
: [];
|
|
2540
|
-
this.addRefreshObligationIx(addAsSupportIx, repaidBorrowReservesToSkip);
|
|
2416
|
+
await this.addRefreshObligationIx(addAsSupportIx, repaidBorrowReservesToSkip);
|
|
2541
2417
|
} else {
|
|
2542
|
-
this.addRefreshObligationIx(addAsSupportIx);
|
|
2418
|
+
await this.addRefreshObligationIx(addAsSupportIx);
|
|
2543
2419
|
}
|
|
2544
2420
|
|
|
2545
2421
|
if (requestElevationGroup) {
|
|
@@ -2560,8 +2436,8 @@ export class KaminoAction {
|
|
|
2560
2436
|
) {
|
|
2561
2437
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, 'cleanup');
|
|
2562
2438
|
// Skip the borrow reserve, since we repay in the same tx
|
|
2563
|
-
this.addRefreshObligationIx('cleanup', [this.reserve.address]);
|
|
2564
|
-
this.addRequestElevationIx(overrideElevationGroupRequest ?? 0, 'cleanup', [this.reserve.address]);
|
|
2439
|
+
await this.addRefreshObligationIx('cleanup', [this.reserve.address]);
|
|
2440
|
+
await this.addRequestElevationIx(overrideElevationGroupRequest ?? 0, 'cleanup', [this.reserve.address]);
|
|
2565
2441
|
}
|
|
2566
2442
|
} else if (action === 'depositAndBorrow' || action === 'borrow') {
|
|
2567
2443
|
let newElevationGroup: number = -1;
|
|
@@ -2616,10 +2492,10 @@ export class KaminoAction {
|
|
|
2616
2492
|
newElevationGroup >= 0 &&
|
|
2617
2493
|
newElevationGroup !== (isKaminoObligation(this.obligation) ? this.obligation.state.elevationGroup : 0)
|
|
2618
2494
|
) {
|
|
2619
|
-
this.addRequestElevationIx(newElevationGroup, addAsSupportIx);
|
|
2495
|
+
await this.addRequestElevationIx(newElevationGroup, addAsSupportIx);
|
|
2620
2496
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAsSupportIx);
|
|
2621
|
-
this.addRefreshReserveIxs(currentReserveAddresses
|
|
2622
|
-
this.addRefreshObligationIx(addAsSupportIx);
|
|
2497
|
+
this.addRefreshReserveIxs([...currentReserveAddresses], addAsSupportIx);
|
|
2498
|
+
await this.addRefreshObligationIx(addAsSupportIx);
|
|
2623
2499
|
|
|
2624
2500
|
if (action === 'borrow') {
|
|
2625
2501
|
if (!isKaminoObligation(this.obligation)) {
|
|
@@ -2636,10 +2512,10 @@ export class KaminoAction {
|
|
|
2636
2512
|
) {
|
|
2637
2513
|
const addAsSupportIx: AuxiliaryIx = 'setup';
|
|
2638
2514
|
console.log('Deposit: Requesting elevation group', overrideElevationGroupRequest);
|
|
2639
|
-
this.addRequestElevationIx(overrideElevationGroupRequest, addAsSupportIx);
|
|
2515
|
+
await this.addRequestElevationIx(overrideElevationGroupRequest, addAsSupportIx);
|
|
2640
2516
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAsSupportIx);
|
|
2641
|
-
this.addRefreshReserveIxs(currentReserveAddresses
|
|
2642
|
-
this.addRefreshObligationIx(addAsSupportIx);
|
|
2517
|
+
this.addRefreshReserveIxs([...currentReserveAddresses], addAsSupportIx);
|
|
2518
|
+
await this.addRefreshObligationIx(addAsSupportIx);
|
|
2643
2519
|
} else if (
|
|
2644
2520
|
action === 'withdraw' &&
|
|
2645
2521
|
overrideElevationGroupRequest !== undefined
|
|
@@ -2648,8 +2524,8 @@ export class KaminoAction {
|
|
|
2648
2524
|
console.log('Withdraw: Requesting elevation group', overrideElevationGroupRequest);
|
|
2649
2525
|
// Skip the withdrawn reserve if we are in the process of closing it:
|
|
2650
2526
|
const skipReserveIfClosing = this.amount.eq(new BN(U64_MAX)) ? [this.reserve.address] : [];
|
|
2651
|
-
this.addRefreshObligationIx('cleanup', skipReserveIfClosing);
|
|
2652
|
-
this.addRequestElevationIx(overrideElevationGroupRequest, 'cleanup', skipReserveIfClosing);
|
|
2527
|
+
await this.addRefreshObligationIx('cleanup', skipReserveIfClosing);
|
|
2528
|
+
await this.addRequestElevationIx(overrideElevationGroupRequest, 'cleanup', skipReserveIfClosing);
|
|
2653
2529
|
}
|
|
2654
2530
|
}
|
|
2655
2531
|
|
|
@@ -2658,15 +2534,15 @@ export class KaminoAction {
|
|
|
2658
2534
|
// If this is an setup ix (therefore not an in-between), it means it's either a one off action
|
|
2659
2535
|
// or the first of a two-token-action
|
|
2660
2536
|
if (action === 'liquidate') {
|
|
2661
|
-
this.addRefreshFarmsForReserve([this.outflowReserve!], addAsSupportIx, ReserveFarmKind.Collateral);
|
|
2662
|
-
this.addRefreshFarmsForReserve([this.reserve], addAsSupportIx, ReserveFarmKind.Debt);
|
|
2537
|
+
await this.addRefreshFarmsForReserve([this.outflowReserve!], addAsSupportIx, ReserveFarmKind.Collateral);
|
|
2538
|
+
await this.addRefreshFarmsForReserve([this.reserve], addAsSupportIx, ReserveFarmKind.Debt);
|
|
2663
2539
|
} else if (
|
|
2664
2540
|
action === 'depositAndBorrow' ||
|
|
2665
2541
|
action === 'depositCollateral' ||
|
|
2666
2542
|
action === 'withdraw' ||
|
|
2667
2543
|
action === 'deposit'
|
|
2668
2544
|
) {
|
|
2669
|
-
this.addRefreshFarmsForReserve(
|
|
2545
|
+
await this.addRefreshFarmsForReserve(
|
|
2670
2546
|
currentReserves,
|
|
2671
2547
|
addAsSupportIx,
|
|
2672
2548
|
ReserveFarmKind.Collateral,
|
|
@@ -2674,7 +2550,7 @@ export class KaminoAction {
|
|
|
2674
2550
|
twoTokenAction
|
|
2675
2551
|
);
|
|
2676
2552
|
} else if (action === 'repayAndWithdraw' || action === 'borrow' || action === 'repay') {
|
|
2677
|
-
this.addRefreshFarmsForReserve(
|
|
2553
|
+
await this.addRefreshFarmsForReserve(
|
|
2678
2554
|
currentReserves,
|
|
2679
2555
|
addAsSupportIx,
|
|
2680
2556
|
ReserveFarmKind.Debt,
|
|
@@ -2689,9 +2565,9 @@ export class KaminoAction {
|
|
|
2689
2565
|
// so we skip the refresh farm obligation of the first reserve as that operation already happened
|
|
2690
2566
|
// add added to 'setup' ixs
|
|
2691
2567
|
if (action === 'depositAndBorrow') {
|
|
2692
|
-
this.addRefreshFarmsForReserve([this.outflowReserve!], addAsSupportIx, ReserveFarmKind.Debt);
|
|
2568
|
+
await this.addRefreshFarmsForReserve([this.outflowReserve!], addAsSupportIx, ReserveFarmKind.Debt);
|
|
2693
2569
|
} else if (action === 'repayAndWithdraw') {
|
|
2694
|
-
this.addRefreshFarmsForReserve([this.outflowReserve!], addAsSupportIx, ReserveFarmKind.Collateral);
|
|
2570
|
+
await this.addRefreshFarmsForReserve([this.outflowReserve!], addAsSupportIx, ReserveFarmKind.Collateral);
|
|
2695
2571
|
} else {
|
|
2696
2572
|
throw new Error(`Could not decide on refresh farm for action ${action}`);
|
|
2697
2573
|
}
|
|
@@ -2712,19 +2588,16 @@ export class KaminoAction {
|
|
|
2712
2588
|
overrideElevationGroupRequest?: number
|
|
2713
2589
|
) {
|
|
2714
2590
|
if (!['mint', 'redeem'].includes(action)) {
|
|
2715
|
-
const [, ownerUserMetadata] = await this.kaminoMarket.getUserMetadata(this.owner);
|
|
2591
|
+
const [, ownerUserMetadata] = await this.kaminoMarket.getUserMetadata(this.owner.address);
|
|
2716
2592
|
if (!ownerUserMetadata && !initUserMetadata.skipInitialization) {
|
|
2717
|
-
let lookupTable:
|
|
2593
|
+
let lookupTable: Address = DEFAULT_PUBLIC_KEY;
|
|
2718
2594
|
if (!initUserMetadata.skipLutCreation) {
|
|
2719
|
-
const [createLutIx, lookupTableAddress] = await createLookupTableIx(
|
|
2720
|
-
this.kaminoMarket.getConnection(),
|
|
2721
|
-
this.owner
|
|
2722
|
-
);
|
|
2595
|
+
const [createLutIx, lookupTableAddress] = await createLookupTableIx(this.kaminoMarket.getRpc(), this.owner);
|
|
2723
2596
|
lookupTable = lookupTableAddress;
|
|
2724
2597
|
this.setupIxs.push(createLutIx);
|
|
2725
|
-
this.setupIxsLabels.push(`createUserLutIx[${lookupTableAddress
|
|
2598
|
+
this.setupIxsLabels.push(`createUserLutIx[${lookupTableAddress}]`);
|
|
2726
2599
|
}
|
|
2727
|
-
this.addInitUserMetadataIxs(lookupTable);
|
|
2600
|
+
await this.addInitUserMetadataIxs(lookupTable);
|
|
2728
2601
|
}
|
|
2729
2602
|
|
|
2730
2603
|
await this.addInitObligationIxs();
|
|
@@ -2741,13 +2614,15 @@ export class KaminoAction {
|
|
|
2741
2614
|
overrideElevationGroupRequest
|
|
2742
2615
|
);
|
|
2743
2616
|
|
|
2744
|
-
const allReserves =
|
|
2745
|
-
...
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2617
|
+
const allReserves = [
|
|
2618
|
+
...new Set<Address>([
|
|
2619
|
+
...this.depositReserves,
|
|
2620
|
+
...this.borrowReserves,
|
|
2621
|
+
this.reserve.address,
|
|
2622
|
+
...(this.outflowReserve ? [this.outflowReserve.address] : []),
|
|
2623
|
+
...(this.preLoadedDepositReservesSameTx ? this.preLoadedDepositReservesSameTx : []),
|
|
2624
|
+
]),
|
|
2625
|
+
];
|
|
2751
2626
|
const tokenIds = getTokenIdsForScopeRefresh(this.kaminoMarket, allReserves);
|
|
2752
2627
|
|
|
2753
2628
|
if (tokenIds.length > 0 && scopeRefreshConfig) {
|
|
@@ -2755,15 +2630,15 @@ export class KaminoAction {
|
|
|
2755
2630
|
}
|
|
2756
2631
|
}
|
|
2757
2632
|
|
|
2758
|
-
private static optionalAccount(pubkey:
|
|
2633
|
+
private static optionalAccount(pubkey: Address): Option<Address> {
|
|
2759
2634
|
if (isNotNullPubkey(pubkey)) {
|
|
2760
|
-
return pubkey;
|
|
2635
|
+
return some(pubkey);
|
|
2761
2636
|
} else {
|
|
2762
|
-
return
|
|
2637
|
+
return none();
|
|
2763
2638
|
}
|
|
2764
2639
|
}
|
|
2765
2640
|
|
|
2766
|
-
private addRefreshReserveIxs(reserves:
|
|
2641
|
+
private addRefreshReserveIxs(reserves: Address[], addAsSupportIx: AuxiliaryIx = 'setup') {
|
|
2767
2642
|
reserves.forEach((reserveAddress) => {
|
|
2768
2643
|
const foundReserve = this.kaminoMarket.getReserveByAddress(reserveAddress);
|
|
2769
2644
|
if (!foundReserve) {
|
|
@@ -2776,22 +2651,14 @@ export class KaminoAction {
|
|
|
2776
2651
|
{
|
|
2777
2652
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
2778
2653
|
reserve: reserveAddress,
|
|
2779
|
-
pythOracle: KaminoAction.optionalAccount(
|
|
2780
|
-
state.config.tokenInfo.pythConfiguration.price,
|
|
2781
|
-
this.kaminoMarket.programId
|
|
2782
|
-
),
|
|
2654
|
+
pythOracle: KaminoAction.optionalAccount(state.config.tokenInfo.pythConfiguration.price),
|
|
2783
2655
|
switchboardPriceOracle: KaminoAction.optionalAccount(
|
|
2784
|
-
state.config.tokenInfo.switchboardConfiguration.priceAggregator
|
|
2785
|
-
this.kaminoMarket.programId
|
|
2656
|
+
state.config.tokenInfo.switchboardConfiguration.priceAggregator
|
|
2786
2657
|
),
|
|
2787
2658
|
switchboardTwapOracle: KaminoAction.optionalAccount(
|
|
2788
|
-
state.config.tokenInfo.switchboardConfiguration.twapAggregator
|
|
2789
|
-
this.kaminoMarket.programId
|
|
2790
|
-
),
|
|
2791
|
-
scopePrices: KaminoAction.optionalAccount(
|
|
2792
|
-
state.config.tokenInfo.scopeConfiguration.priceFeed,
|
|
2793
|
-
this.kaminoMarket.programId
|
|
2659
|
+
state.config.tokenInfo.switchboardConfiguration.twapAggregator
|
|
2794
2660
|
),
|
|
2661
|
+
scopePrices: KaminoAction.optionalAccount(state.config.tokenInfo.scopeConfiguration.priceFeed),
|
|
2795
2662
|
},
|
|
2796
2663
|
this.kaminoMarket.programId
|
|
2797
2664
|
);
|
|
@@ -2809,8 +2676,8 @@ export class KaminoAction {
|
|
|
2809
2676
|
});
|
|
2810
2677
|
}
|
|
2811
2678
|
|
|
2812
|
-
public static getRefreshAllReserves(kaminoMarket: KaminoMarket, reserves:
|
|
2813
|
-
return reserves.map((reserveAddress):
|
|
2679
|
+
public static getRefreshAllReserves(kaminoMarket: KaminoMarket, reserves: Address[]): IInstruction[] {
|
|
2680
|
+
return reserves.map((reserveAddress): IInstruction => {
|
|
2814
2681
|
const foundReserve = kaminoMarket.getReserveByAddress(reserveAddress);
|
|
2815
2682
|
if (!foundReserve) {
|
|
2816
2683
|
throw new Error(`Could not find reserve ${reserveAddress} in reserves`);
|
|
@@ -2821,29 +2688,23 @@ export class KaminoAction {
|
|
|
2821
2688
|
{
|
|
2822
2689
|
reserve: reserveAddress,
|
|
2823
2690
|
lendingMarket: state.lendingMarket,
|
|
2824
|
-
pythOracle: this.optionalAccount(state.config.tokenInfo.pythConfiguration.price
|
|
2825
|
-
switchboardPriceOracle: this.optionalAccount(
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
),
|
|
2829
|
-
switchboardTwapOracle: this.optionalAccount(
|
|
2830
|
-
state.config.tokenInfo.switchboardConfiguration.twapAggregator,
|
|
2831
|
-
kaminoMarket.programId
|
|
2832
|
-
),
|
|
2833
|
-
scopePrices: this.optionalAccount(
|
|
2834
|
-
state.config.tokenInfo.scopeConfiguration.priceFeed,
|
|
2835
|
-
kaminoMarket.programId
|
|
2836
|
-
),
|
|
2691
|
+
pythOracle: this.optionalAccount(state.config.tokenInfo.pythConfiguration.price),
|
|
2692
|
+
switchboardPriceOracle: this.optionalAccount(state.config.tokenInfo.switchboardConfiguration.priceAggregator),
|
|
2693
|
+
switchboardTwapOracle: this.optionalAccount(state.config.tokenInfo.switchboardConfiguration.twapAggregator),
|
|
2694
|
+
scopePrices: this.optionalAccount(state.config.tokenInfo.scopeConfiguration.priceFeed),
|
|
2837
2695
|
},
|
|
2838
2696
|
kaminoMarket.programId
|
|
2839
2697
|
);
|
|
2840
2698
|
});
|
|
2841
2699
|
}
|
|
2842
2700
|
|
|
2843
|
-
private addRefreshObligationIx(
|
|
2701
|
+
private async addRefreshObligationIx(
|
|
2702
|
+
addAsSupportIx: AuxiliaryIx = 'setup',
|
|
2703
|
+
skipReserves: Address[] = []
|
|
2704
|
+
): Promise<void> {
|
|
2844
2705
|
const marketAddress = this.kaminoMarket.getAddress();
|
|
2845
|
-
const obligationPda = this.getObligationPda();
|
|
2846
|
-
|
|
2706
|
+
const obligationPda = await this.getObligationPda();
|
|
2707
|
+
let refreshObligationIx = refreshObligation(
|
|
2847
2708
|
{
|
|
2848
2709
|
lendingMarket: marketAddress,
|
|
2849
2710
|
obligation: obligationPda,
|
|
@@ -2851,35 +2712,39 @@ export class KaminoAction {
|
|
|
2851
2712
|
this.kaminoMarket.programId
|
|
2852
2713
|
);
|
|
2853
2714
|
|
|
2854
|
-
const skipReservesSet = new
|
|
2715
|
+
const skipReservesSet = new Set<Address>(skipReserves);
|
|
2855
2716
|
|
|
2856
2717
|
const depositReservesList = this.getAdditionalDepositReservesList().filter(
|
|
2857
|
-
(reserve) => !skipReservesSet.
|
|
2718
|
+
(reserve) => !skipReservesSet.has(reserve)
|
|
2858
2719
|
);
|
|
2859
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
2860
|
-
return {
|
|
2720
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
2721
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
2861
2722
|
});
|
|
2862
2723
|
|
|
2863
|
-
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipReservesSet.
|
|
2864
|
-
const borrowReserveAccountMetas = borrowReservesList.map((reserve) => {
|
|
2865
|
-
return {
|
|
2724
|
+
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipReservesSet.has(reserve));
|
|
2725
|
+
const borrowReserveAccountMetas: IAccountMeta[] = borrowReservesList.map((reserve) => {
|
|
2726
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
2866
2727
|
});
|
|
2867
2728
|
|
|
2868
|
-
const borrowReservesReferrerTokenStates =
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
...
|
|
2881
|
-
|
|
2882
|
-
|
|
2729
|
+
const borrowReservesReferrerTokenStates: IAccountMeta[] = [];
|
|
2730
|
+
if (isSome(this.referrer)) {
|
|
2731
|
+
borrowReservesReferrerTokenStates.push(
|
|
2732
|
+
...(await Promise.all(
|
|
2733
|
+
borrowReservesList.map((reserve) => {
|
|
2734
|
+
return this.getReferrerTokenStateAccountMeta(reserve, true);
|
|
2735
|
+
})
|
|
2736
|
+
))
|
|
2737
|
+
);
|
|
2738
|
+
}
|
|
2739
|
+
|
|
2740
|
+
refreshObligationIx = {
|
|
2741
|
+
...refreshObligationIx,
|
|
2742
|
+
accounts: refreshObligationIx.accounts!.concat([
|
|
2743
|
+
...depositReserveAccountMetas,
|
|
2744
|
+
...borrowReserveAccountMetas,
|
|
2745
|
+
...borrowReservesReferrerTokenStates,
|
|
2746
|
+
]),
|
|
2747
|
+
};
|
|
2883
2748
|
|
|
2884
2749
|
if (addAsSupportIx === 'setup') {
|
|
2885
2750
|
this.setupIxs.push(refreshObligationIx);
|
|
@@ -2893,8 +2758,12 @@ export class KaminoAction {
|
|
|
2893
2758
|
}
|
|
2894
2759
|
}
|
|
2895
2760
|
|
|
2896
|
-
private addRequestElevationIx(
|
|
2897
|
-
|
|
2761
|
+
private async addRequestElevationIx(
|
|
2762
|
+
elevationGroup: number,
|
|
2763
|
+
addAsSupportIx: AuxiliaryIx,
|
|
2764
|
+
skipReserves: Address[] = []
|
|
2765
|
+
): Promise<void> {
|
|
2766
|
+
const obligationPda = await this.getObligationPda();
|
|
2898
2767
|
const args: RequestElevationGroupArgs = {
|
|
2899
2768
|
elevationGroup,
|
|
2900
2769
|
};
|
|
@@ -2904,42 +2773,41 @@ export class KaminoAction {
|
|
|
2904
2773
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
2905
2774
|
};
|
|
2906
2775
|
|
|
2907
|
-
|
|
2776
|
+
let requestElevationGroupIx = requestElevationGroup(args, accounts, this.kaminoMarket.programId);
|
|
2908
2777
|
|
|
2909
|
-
const skipReservesSet = new
|
|
2778
|
+
const skipReservesSet = new Set<Address>(skipReserves);
|
|
2910
2779
|
|
|
2911
2780
|
const depositReservesList = this.getAdditionalDepositReservesList().filter(
|
|
2912
|
-
(reserve) => !skipReservesSet.
|
|
2781
|
+
(reserve) => !skipReservesSet.has(reserve)
|
|
2913
2782
|
);
|
|
2914
|
-
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
2915
|
-
return {
|
|
2783
|
+
const depositReserveAccountMetas: IAccountMeta[] = depositReservesList.map((reserve) => {
|
|
2784
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
2916
2785
|
});
|
|
2917
2786
|
|
|
2918
|
-
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipReservesSet.
|
|
2919
|
-
const borrowReserveAccountMetas = borrowReservesList.map((reserve) => {
|
|
2920
|
-
return {
|
|
2787
|
+
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipReservesSet.has(reserve));
|
|
2788
|
+
const borrowReserveAccountMetas: IAccountMeta[] = borrowReservesList.map((reserve) => {
|
|
2789
|
+
return { address: reserve, role: AccountRole.WRITABLE };
|
|
2921
2790
|
});
|
|
2922
2791
|
|
|
2923
|
-
const borrowReservesReferrerTokenStates =
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
]);
|
|
2792
|
+
const borrowReservesReferrerTokenStates: IAccountMeta[] = [];
|
|
2793
|
+
if (isSome(this.referrer)) {
|
|
2794
|
+
borrowReservesReferrerTokenStates.push(
|
|
2795
|
+
...(await Promise.all(
|
|
2796
|
+
borrowReservesList.map((reserve) => {
|
|
2797
|
+
return this.getReferrerTokenStateAccountMeta(reserve, false);
|
|
2798
|
+
})
|
|
2799
|
+
))
|
|
2800
|
+
);
|
|
2801
|
+
}
|
|
2802
|
+
|
|
2803
|
+
requestElevationGroupIx = {
|
|
2804
|
+
...requestElevationGroupIx,
|
|
2805
|
+
accounts: requestElevationGroupIx.accounts!.concat([
|
|
2806
|
+
...depositReserveAccountMetas,
|
|
2807
|
+
...borrowReserveAccountMetas,
|
|
2808
|
+
...borrowReservesReferrerTokenStates,
|
|
2809
|
+
]),
|
|
2810
|
+
};
|
|
2943
2811
|
|
|
2944
2812
|
if (addAsSupportIx === 'setup') {
|
|
2945
2813
|
this.setupIxs.push(requestElevationGroupIx);
|
|
@@ -2953,102 +2821,94 @@ export class KaminoAction {
|
|
|
2953
2821
|
}
|
|
2954
2822
|
}
|
|
2955
2823
|
|
|
2956
|
-
private addRefreshFarmsForReserve(
|
|
2824
|
+
private async addRefreshFarmsForReserve(
|
|
2957
2825
|
reserves: KaminoReserve[],
|
|
2958
2826
|
addAsSupportIx: AuxiliaryIx = 'setup',
|
|
2959
2827
|
mode: typeof ReserveFarmKind.Collateral | typeof ReserveFarmKind.Debt,
|
|
2960
|
-
crank:
|
|
2828
|
+
crank: TransactionSigner = this.payer,
|
|
2961
2829
|
twoTokenAction: boolean = false
|
|
2962
|
-
) {
|
|
2963
|
-
const farms: [
|
|
2964
|
-
|
|
2965
|
-
PublicKey,
|
|
2966
|
-
PublicKey,
|
|
2967
|
-
KaminoReserve
|
|
2968
|
-
][] = [];
|
|
2830
|
+
): Promise<void> {
|
|
2831
|
+
const farms: [typeof ReserveFarmKind.Collateral | typeof ReserveFarmKind.Debt, Address, Address, KaminoReserve][] =
|
|
2832
|
+
[];
|
|
2969
2833
|
|
|
2834
|
+
const obligationAddress = await this.getObligationPda();
|
|
2970
2835
|
for (const kaminoReserve of reserves) {
|
|
2971
|
-
if (mode === ReserveFarmKind.Collateral &&
|
|
2836
|
+
if (mode === ReserveFarmKind.Collateral && kaminoReserve.state.farmCollateral !== DEFAULT_PUBLIC_KEY) {
|
|
2972
2837
|
farms.push([
|
|
2973
2838
|
ReserveFarmKind.Collateral,
|
|
2974
2839
|
kaminoReserve.state.farmCollateral,
|
|
2975
|
-
obligationFarmStatePda(kaminoReserve.state.farmCollateral,
|
|
2840
|
+
await obligationFarmStatePda(kaminoReserve.state.farmCollateral, obligationAddress),
|
|
2976
2841
|
kaminoReserve,
|
|
2977
2842
|
]);
|
|
2978
2843
|
}
|
|
2979
|
-
if (mode === ReserveFarmKind.Debt &&
|
|
2844
|
+
if (mode === ReserveFarmKind.Debt && kaminoReserve.state.farmDebt !== DEFAULT_PUBLIC_KEY) {
|
|
2980
2845
|
farms.push([
|
|
2981
2846
|
ReserveFarmKind.Debt,
|
|
2982
2847
|
kaminoReserve.state.farmDebt,
|
|
2983
|
-
obligationFarmStatePda(kaminoReserve.state.farmDebt,
|
|
2848
|
+
await obligationFarmStatePda(kaminoReserve.state.farmDebt, obligationAddress),
|
|
2984
2849
|
kaminoReserve,
|
|
2985
2850
|
]);
|
|
2986
2851
|
}
|
|
2987
2852
|
}
|
|
2988
2853
|
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
args,
|
|
3008
|
-
accounts,
|
|
3009
|
-
this.kaminoMarket.programId
|
|
3010
|
-
);
|
|
2854
|
+
const lendingMarketAuthority = await this.kaminoMarket.getLendingMarketAuthority();
|
|
2855
|
+
for (const arg of farms) {
|
|
2856
|
+
const args: RefreshObligationFarmsForReserveArgs = { mode: arg[0].discriminator };
|
|
2857
|
+
const accounts: RefreshObligationFarmsForReserveAccounts = {
|
|
2858
|
+
crank,
|
|
2859
|
+
baseAccounts: {
|
|
2860
|
+
obligation: obligationAddress,
|
|
2861
|
+
lendingMarketAuthority,
|
|
2862
|
+
reserve: arg[3].address,
|
|
2863
|
+
reserveFarmState: arg[1],
|
|
2864
|
+
obligationFarmUserState: arg[2],
|
|
2865
|
+
lendingMarket: this.kaminoMarket.getAddress(),
|
|
2866
|
+
},
|
|
2867
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
2868
|
+
rent: SYSVAR_RENT_ADDRESS,
|
|
2869
|
+
systemProgram: SYSTEM_PROGRAM_ADDRESS,
|
|
2870
|
+
};
|
|
2871
|
+
const refreshFarmForObligationix = refreshObligationFarmsForReserve(args, accounts, this.kaminoMarket.programId);
|
|
3011
2872
|
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
this.inBetweenIxs.push(refreshFarmForObligationix);
|
|
3022
|
-
this.inBetweenIxsLabels.push(
|
|
3023
|
-
`RefreshFarmForObligation[${
|
|
3024
|
-
arg[0].kind
|
|
3025
|
-
}, res=${arg[3].address.toString()}, obl=${this.getObligationPda().toString()}]`
|
|
3026
|
-
);
|
|
3027
|
-
} else {
|
|
3028
|
-
this.refreshFarmsCleanupTxnIxs.push(refreshFarmForObligationix);
|
|
3029
|
-
this.refreshFarmsCleanupTxnIxsLabels.push(
|
|
3030
|
-
`RefreshFarmForObligation[${
|
|
3031
|
-
arg[0].kind
|
|
3032
|
-
}, res=${arg[3].address.toString()}, obl=${this.getObligationPda().toString()}]`
|
|
3033
|
-
);
|
|
3034
|
-
}
|
|
3035
|
-
} else if (addAsSupportIx === 'inBetween') {
|
|
2873
|
+
if (addAsSupportIx === 'setup') {
|
|
2874
|
+
this.setupIxs.push(refreshFarmForObligationix);
|
|
2875
|
+
this.setupIxsLabels.push(
|
|
2876
|
+
`RefreshFarmForObligation[${
|
|
2877
|
+
arg[0].kind
|
|
2878
|
+
}, res=${arg[3].address.toString()}, obl=${await this.getObligationPda()}]`
|
|
2879
|
+
);
|
|
2880
|
+
if (twoTokenAction) {
|
|
2881
|
+
// If two token action, this refresh needs to be the first inbetween ix
|
|
3036
2882
|
this.inBetweenIxs.push(refreshFarmForObligationix);
|
|
3037
2883
|
this.inBetweenIxsLabels.push(
|
|
3038
2884
|
`RefreshFarmForObligation[${
|
|
3039
2885
|
arg[0].kind
|
|
3040
|
-
}, res=${arg[3].address.toString()}, obl=${this.getObligationPda()
|
|
2886
|
+
}, res=${arg[3].address.toString()}, obl=${await this.getObligationPda()}]`
|
|
3041
2887
|
);
|
|
3042
|
-
|
|
2888
|
+
} else {
|
|
3043
2889
|
this.refreshFarmsCleanupTxnIxs.push(refreshFarmForObligationix);
|
|
3044
2890
|
this.refreshFarmsCleanupTxnIxsLabels.push(
|
|
3045
2891
|
`RefreshFarmForObligation[${
|
|
3046
2892
|
arg[0].kind
|
|
3047
|
-
}, res=${arg[3].address.toString()}, obl=${this.getObligationPda()
|
|
2893
|
+
}, res=${arg[3].address.toString()}, obl=${await this.getObligationPda()}]`
|
|
3048
2894
|
);
|
|
3049
2895
|
}
|
|
2896
|
+
} else if (addAsSupportIx === 'inBetween') {
|
|
2897
|
+
this.inBetweenIxs.push(refreshFarmForObligationix);
|
|
2898
|
+
this.inBetweenIxsLabels.push(
|
|
2899
|
+
`RefreshFarmForObligation[${
|
|
2900
|
+
arg[0].kind
|
|
2901
|
+
}, res=${arg[3].address.toString()}, obl=${await this.getObligationPda()}]`
|
|
2902
|
+
);
|
|
2903
|
+
|
|
2904
|
+
this.refreshFarmsCleanupTxnIxs.push(refreshFarmForObligationix);
|
|
2905
|
+
this.refreshFarmsCleanupTxnIxsLabels.push(
|
|
2906
|
+
`RefreshFarmForObligation[${
|
|
2907
|
+
arg[0].kind
|
|
2908
|
+
}, res=${arg[3].address.toString()}, obl=${await this.getObligationPda()}]`
|
|
2909
|
+
);
|
|
3050
2910
|
}
|
|
3051
|
-
|
|
2911
|
+
}
|
|
3052
2912
|
}
|
|
3053
2913
|
|
|
3054
2914
|
private addRefreshFarmsCleanupTxnIxsToCleanupIxs() {
|
|
@@ -3061,58 +2921,60 @@ export class KaminoAction {
|
|
|
3061
2921
|
mode: typeof ReserveFarmKind.Collateral | typeof ReserveFarmKind.Debt,
|
|
3062
2922
|
addAsSupportIx: AuxiliaryIx = 'setup'
|
|
3063
2923
|
): Promise<void> {
|
|
3064
|
-
const farms: [number,
|
|
2924
|
+
const farms: [number, Address, Address][] = [];
|
|
3065
2925
|
|
|
2926
|
+
const obligationAddress = await this.getObligationPda();
|
|
3066
2927
|
if (mode === ReserveFarmKind.Collateral && isNotNullPubkey(reserve.state.farmCollateral)) {
|
|
3067
|
-
const pda = obligationFarmStatePda(reserve.state.farmCollateral,
|
|
3068
|
-
const account = await this.kaminoMarket.
|
|
3069
|
-
if (!account) {
|
|
2928
|
+
const pda = await obligationFarmStatePda(reserve.state.farmCollateral, obligationAddress);
|
|
2929
|
+
const account = await fetchEncodedAccount(this.kaminoMarket.getRpc(), pda);
|
|
2930
|
+
if (!account.exists) {
|
|
3070
2931
|
farms.push([ReserveFarmKind.Collateral.discriminator, reserve.state.farmCollateral, pda]);
|
|
3071
2932
|
}
|
|
3072
2933
|
}
|
|
3073
2934
|
|
|
3074
2935
|
if (mode === ReserveFarmKind.Debt && isNotNullPubkey(reserve.state.farmDebt)) {
|
|
3075
|
-
const pda = obligationFarmStatePda(reserve.state.farmDebt,
|
|
3076
|
-
const account = await this.kaminoMarket.
|
|
3077
|
-
if (!account) {
|
|
2936
|
+
const pda = await obligationFarmStatePda(reserve.state.farmDebt, obligationAddress);
|
|
2937
|
+
const account = await fetchEncodedAccount(this.kaminoMarket.getRpc(), pda);
|
|
2938
|
+
if (!account.exists) {
|
|
3078
2939
|
farms.push([ReserveFarmKind.Debt.discriminator, reserve.state.farmDebt, pda]);
|
|
3079
2940
|
}
|
|
3080
2941
|
}
|
|
3081
2942
|
|
|
3082
|
-
|
|
2943
|
+
const lendingMarketAuthority = await this.kaminoMarket.getLendingMarketAuthority();
|
|
2944
|
+
farms.forEach((arg: [number, Address, Address]) => {
|
|
3083
2945
|
const args: InitObligationFarmsForReserveArgs = { mode: arg[0] };
|
|
3084
2946
|
const accounts: InitObligationFarmsForReserveAccounts = {
|
|
3085
|
-
owner: isKaminoObligation(this.obligation) ? this.obligation.state.owner : this.owner,
|
|
2947
|
+
owner: isKaminoObligation(this.obligation) ? this.obligation.state.owner : this.owner.address,
|
|
3086
2948
|
payer: this.owner,
|
|
3087
|
-
obligation:
|
|
3088
|
-
lendingMarketAuthority
|
|
2949
|
+
obligation: obligationAddress,
|
|
2950
|
+
lendingMarketAuthority,
|
|
3089
2951
|
reserve: reserve.address,
|
|
3090
2952
|
reserveFarmState: arg[1],
|
|
3091
2953
|
obligationFarm: arg[2],
|
|
3092
2954
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
3093
|
-
farmsProgram:
|
|
3094
|
-
rent:
|
|
3095
|
-
systemProgram:
|
|
2955
|
+
farmsProgram: FARMS_PROGRAM_ID,
|
|
2956
|
+
rent: SYSVAR_RENT_ADDRESS,
|
|
2957
|
+
systemProgram: SYSTEM_PROGRAM_ADDRESS,
|
|
3096
2958
|
};
|
|
3097
2959
|
const initObligationForFarm = initObligationFarmsForReserve(args, accounts, this.kaminoMarket.programId);
|
|
3098
2960
|
if (addAsSupportIx === 'setup') {
|
|
3099
2961
|
this.setupIxs.push(initObligationForFarm);
|
|
3100
2962
|
this.setupIxsLabels.push(
|
|
3101
|
-
`InitObligationForFarm[${reserve.address.toString()}, ${
|
|
2963
|
+
`InitObligationForFarm[${reserve.address.toString()}, ${obligationAddress.toString()}]`
|
|
3102
2964
|
);
|
|
3103
2965
|
} else if (addAsSupportIx === 'inBetween') {
|
|
3104
2966
|
this.inBetweenIxs.push(initObligationForFarm);
|
|
3105
2967
|
this.inBetweenIxsLabels.push(
|
|
3106
|
-
`InitObligationForFarm[${reserve.address.toString()}, ${
|
|
2968
|
+
`InitObligationForFarm[${reserve.address.toString()}, ${obligationAddress.toString()}]`
|
|
3107
2969
|
);
|
|
3108
2970
|
}
|
|
3109
2971
|
});
|
|
3110
2972
|
}
|
|
3111
2973
|
|
|
3112
|
-
private addInitObligationIxs() {
|
|
2974
|
+
private async addInitObligationIxs(): Promise<void> {
|
|
3113
2975
|
if (!isKaminoObligation(this.obligation)) {
|
|
3114
|
-
const obligationPda = this.getObligationPda();
|
|
3115
|
-
const [userMetadataAddress
|
|
2976
|
+
const obligationPda = await this.getObligationPda();
|
|
2977
|
+
const [userMetadataAddress] = await userMetadataPda(this.owner.address, this.kaminoMarket.programId);
|
|
3116
2978
|
const initObligationIx = initObligation(
|
|
3117
2979
|
{
|
|
3118
2980
|
args: {
|
|
@@ -3128,8 +2990,8 @@ export class KaminoAction {
|
|
|
3128
2990
|
seed1Account: this.obligation.toArgs().seed1,
|
|
3129
2991
|
seed2Account: this.obligation.toArgs().seed2,
|
|
3130
2992
|
ownerUserMetadata: userMetadataAddress,
|
|
3131
|
-
rent:
|
|
3132
|
-
systemProgram:
|
|
2993
|
+
rent: SYSVAR_RENT_ADDRESS,
|
|
2994
|
+
systemProgram: SYSTEM_PROGRAM_ADDRESS,
|
|
3133
2995
|
},
|
|
3134
2996
|
this.kaminoMarket.programId
|
|
3135
2997
|
);
|
|
@@ -3138,11 +3000,13 @@ export class KaminoAction {
|
|
|
3138
3000
|
}
|
|
3139
3001
|
}
|
|
3140
3002
|
|
|
3141
|
-
private addInitUserMetadataIxs(lookupTableAddress:
|
|
3142
|
-
const [userMetadataAddress
|
|
3143
|
-
const referrerUserMetadataAddress =
|
|
3144
|
-
|
|
3145
|
-
|
|
3003
|
+
private async addInitUserMetadataIxs(lookupTableAddress: Address): Promise<void> {
|
|
3004
|
+
const [userMetadataAddress] = await userMetadataPda(this.owner.address, this.kaminoMarket.programId);
|
|
3005
|
+
const referrerUserMetadataAddress = await KaminoAction.getReferrerMetadataAccount(
|
|
3006
|
+
this.referrer,
|
|
3007
|
+
this.kaminoMarket.programId
|
|
3008
|
+
);
|
|
3009
|
+
|
|
3146
3010
|
const initUserMetadataIx = initUserMetadata(
|
|
3147
3011
|
{
|
|
3148
3012
|
userLookupTable: lookupTableAddress,
|
|
@@ -3152,8 +3016,8 @@ export class KaminoAction {
|
|
|
3152
3016
|
feePayer: this.payer,
|
|
3153
3017
|
userMetadata: userMetadataAddress,
|
|
3154
3018
|
referrerUserMetadata: referrerUserMetadataAddress,
|
|
3155
|
-
rent:
|
|
3156
|
-
systemProgram:
|
|
3019
|
+
rent: SYSVAR_RENT_ADDRESS,
|
|
3020
|
+
systemProgram: SYSTEM_PROGRAM_ADDRESS,
|
|
3157
3021
|
},
|
|
3158
3022
|
this.kaminoMarket.programId
|
|
3159
3023
|
);
|
|
@@ -3161,16 +3025,19 @@ export class KaminoAction {
|
|
|
3161
3025
|
this.setupIxsLabels.push(`initUserMetadata[${userMetadataAddress.toString()}]`);
|
|
3162
3026
|
}
|
|
3163
3027
|
|
|
3164
|
-
private addInitReferrerTokenStateIx(reserve: KaminoReserve, referrerTokenState:
|
|
3028
|
+
private addInitReferrerTokenStateIx(reserve: KaminoReserve, referrerTokenState: Address) {
|
|
3029
|
+
if (isNone(this.referrer)) {
|
|
3030
|
+
throw new Error('Referrer is not set');
|
|
3031
|
+
}
|
|
3165
3032
|
const initReferrerTokenStateIx = initReferrerTokenState(
|
|
3166
3033
|
{
|
|
3167
3034
|
lendingMarket: this.kaminoMarket.getAddress(),
|
|
3168
3035
|
payer: this.owner,
|
|
3169
3036
|
reserve: reserve.address,
|
|
3170
|
-
referrer: this.referrer,
|
|
3037
|
+
referrer: this.referrer.value,
|
|
3171
3038
|
referrerTokenState,
|
|
3172
|
-
rent:
|
|
3173
|
-
systemProgram:
|
|
3039
|
+
rent: SYSVAR_RENT_ADDRESS,
|
|
3040
|
+
systemProgram: SYSTEM_PROGRAM_ADDRESS,
|
|
3174
3041
|
},
|
|
3175
3042
|
this.kaminoMarket.programId
|
|
3176
3043
|
);
|
|
@@ -3178,12 +3045,12 @@ export class KaminoAction {
|
|
|
3178
3045
|
this.setupIxsLabels.unshift(`InitReferrerTokenState[${referrerTokenState.toString()} res=${reserve.address}]`);
|
|
3179
3046
|
}
|
|
3180
3047
|
|
|
3181
|
-
private addWithdrawReferrerFeesIxs() {
|
|
3182
|
-
const referrerTokenStateAddress = referrerTokenStatePda(
|
|
3183
|
-
this.owner,
|
|
3048
|
+
private async addWithdrawReferrerFeesIxs(): Promise<void> {
|
|
3049
|
+
const referrerTokenStateAddress = await referrerTokenStatePda(
|
|
3050
|
+
this.owner.address,
|
|
3184
3051
|
this.reserve.address,
|
|
3185
3052
|
this.kaminoMarket.programId
|
|
3186
|
-
)
|
|
3053
|
+
);
|
|
3187
3054
|
|
|
3188
3055
|
const withdrawReferrerFeesIx = withdrawReferrerFees(
|
|
3189
3056
|
{
|
|
@@ -3193,8 +3060,8 @@ export class KaminoAction {
|
|
|
3193
3060
|
reserveLiquidityMint: this.reserve.getLiquidityMint(),
|
|
3194
3061
|
referrerTokenState: referrerTokenStateAddress,
|
|
3195
3062
|
reserveSupplyLiquidity: this.reserve.state.liquidity.supplyVault,
|
|
3196
|
-
referrerTokenAccount: this.getUserTokenAccountAddress(this.reserve),
|
|
3197
|
-
lendingMarketAuthority: this.kaminoMarket.getLendingMarketAuthority(),
|
|
3063
|
+
referrerTokenAccount: await this.getUserTokenAccountAddress(this.reserve),
|
|
3064
|
+
lendingMarketAuthority: await this.kaminoMarket.getLendingMarketAuthority(),
|
|
3198
3065
|
tokenProgram: this.reserve.getLiquidityTokenProgram(),
|
|
3199
3066
|
},
|
|
3200
3067
|
this.kaminoMarket.programId
|
|
@@ -3210,69 +3077,71 @@ export class KaminoAction {
|
|
|
3210
3077
|
}
|
|
3211
3078
|
|
|
3212
3079
|
private async addAtaIxs(action: ActionType) {
|
|
3213
|
-
if (this.mint
|
|
3080
|
+
if (this.mint === WRAPPED_SOL_MINT || this.secondaryMint === WRAPPED_SOL_MINT) {
|
|
3214
3081
|
await this.updateWSOLAccount(action);
|
|
3215
3082
|
}
|
|
3216
3083
|
|
|
3217
|
-
if ((action === 'withdraw' || action === 'borrow' || action === 'redeem') &&
|
|
3218
|
-
const
|
|
3084
|
+
if ((action === 'withdraw' || action === 'borrow' || action === 'redeem') && this.mint !== WRAPPED_SOL_MINT) {
|
|
3085
|
+
const reserveAta = await this.getUserTokenAccountAddress(this.reserve);
|
|
3086
|
+
const [, createUserTokenAccountIx] = await createAssociatedTokenAccountIdempotentInstruction(
|
|
3219
3087
|
this.owner,
|
|
3220
3088
|
this.reserve.getLiquidityMint(),
|
|
3221
|
-
this.owner,
|
|
3089
|
+
this.owner.address,
|
|
3222
3090
|
this.reserve.getLiquidityTokenProgram(),
|
|
3223
|
-
|
|
3091
|
+
reserveAta
|
|
3224
3092
|
);
|
|
3225
3093
|
|
|
3226
3094
|
this.setupIxs.unshift(createUserTokenAccountIx);
|
|
3227
|
-
this.setupIxsLabels.unshift(`CreateLiquidityUserAta[${
|
|
3095
|
+
this.setupIxsLabels.unshift(`CreateLiquidityUserAta[${reserveAta}]`);
|
|
3228
3096
|
}
|
|
3229
3097
|
|
|
3230
3098
|
if (action === 'liquidate') {
|
|
3231
3099
|
if (!this.outflowReserve) {
|
|
3232
3100
|
throw new Error(`Outflow reserve state not found ${this.secondaryMint}`);
|
|
3233
3101
|
}
|
|
3102
|
+
const outflowReserveAta = await this.getUserTokenAccountAddress(this.outflowReserve);
|
|
3234
3103
|
|
|
3235
|
-
const [, createUserTokenAccountIx] = createAssociatedTokenAccountIdempotentInstruction(
|
|
3104
|
+
const [, createUserTokenAccountIx] = await createAssociatedTokenAccountIdempotentInstruction(
|
|
3236
3105
|
this.owner,
|
|
3237
3106
|
this.outflowReserve.getLiquidityMint(),
|
|
3238
|
-
this.owner,
|
|
3107
|
+
this.owner.address,
|
|
3239
3108
|
this.outflowReserve.getLiquidityTokenProgram(),
|
|
3240
|
-
|
|
3109
|
+
outflowReserveAta
|
|
3241
3110
|
);
|
|
3242
3111
|
|
|
3243
3112
|
this.setupIxs.unshift(createUserTokenAccountIx);
|
|
3244
|
-
this.setupIxsLabels.unshift(`CreateUserAta[${
|
|
3113
|
+
this.setupIxsLabels.unshift(`CreateUserAta[${outflowReserveAta}]`);
|
|
3245
3114
|
|
|
3246
|
-
const
|
|
3115
|
+
const ctokenAta = await this.getUserCollateralAccountAddress(this.outflowReserve);
|
|
3116
|
+
const [, createUserCollateralAccountIx] = await createAssociatedTokenAccountIdempotentInstruction(
|
|
3247
3117
|
this.owner,
|
|
3248
3118
|
this.outflowReserve.getCTokenMint(),
|
|
3249
|
-
this.owner,
|
|
3250
|
-
|
|
3251
|
-
|
|
3119
|
+
this.owner.address,
|
|
3120
|
+
TOKEN_PROGRAM_ADDRESS,
|
|
3121
|
+
ctokenAta
|
|
3252
3122
|
);
|
|
3253
3123
|
|
|
3254
3124
|
this.setupIxs.unshift(createUserCollateralAccountIx);
|
|
3255
|
-
this.setupIxsLabels.unshift(
|
|
3256
|
-
`CreateCollateralUserAta[${this.getUserCollateralAccountAddress(this.outflowReserve).toString()}]`
|
|
3257
|
-
);
|
|
3125
|
+
this.setupIxsLabels.unshift(`CreateCollateralUserAta[${ctokenAta}]`);
|
|
3258
3126
|
}
|
|
3259
3127
|
|
|
3260
|
-
if (action === 'depositAndBorrow' || (action === 'repayAndWithdraw' &&
|
|
3128
|
+
if (action === 'depositAndBorrow' || (action === 'repayAndWithdraw' && this.secondaryMint !== WRAPPED_SOL_MINT)) {
|
|
3261
3129
|
if (!this.outflowReserve) {
|
|
3262
3130
|
throw new Error(`Outflow reserve state not found ${this.mint}`);
|
|
3263
3131
|
}
|
|
3264
3132
|
|
|
3265
|
-
const additionalUserTokenAccountAddress = this.getUserTokenAccountAddress(this.outflowReserve);
|
|
3133
|
+
const additionalUserTokenAccountAddress = await this.getUserTokenAccountAddress(this.outflowReserve);
|
|
3266
3134
|
|
|
3267
|
-
const additionalUserTokenAccountInfo = await
|
|
3268
|
-
.
|
|
3269
|
-
|
|
3135
|
+
const additionalUserTokenAccountInfo = await fetchEncodedAccount(
|
|
3136
|
+
this.kaminoMarket.getRpc(),
|
|
3137
|
+
additionalUserTokenAccountAddress
|
|
3138
|
+
);
|
|
3270
3139
|
|
|
3271
|
-
if (!additionalUserTokenAccountInfo) {
|
|
3272
|
-
const [, createUserTokenAccountIx] = createAssociatedTokenAccountIdempotentInstruction(
|
|
3140
|
+
if (!additionalUserTokenAccountInfo.exists) {
|
|
3141
|
+
const [, createUserTokenAccountIx] = await createAssociatedTokenAccountIdempotentInstruction(
|
|
3273
3142
|
this.owner,
|
|
3274
3143
|
this.outflowReserve.getLiquidityMint(),
|
|
3275
|
-
this.owner,
|
|
3144
|
+
this.owner.address,
|
|
3276
3145
|
this.outflowReserve.getLiquidityTokenProgram(),
|
|
3277
3146
|
additionalUserTokenAccountAddress
|
|
3278
3147
|
);
|
|
@@ -3283,35 +3152,35 @@ export class KaminoAction {
|
|
|
3283
3152
|
}
|
|
3284
3153
|
|
|
3285
3154
|
if (action === 'withdraw' || action === 'mint' || action === 'deposit' || action === 'repayAndWithdraw') {
|
|
3286
|
-
const
|
|
3155
|
+
const reserveAta = await this.getUserTokenAccountAddress(this.reserve);
|
|
3156
|
+
const [, createUserTokenAccountIx] = await createAssociatedTokenAccountIdempotentInstruction(
|
|
3287
3157
|
this.owner,
|
|
3288
3158
|
this.reserve.getLiquidityMint(),
|
|
3289
|
-
this.owner,
|
|
3159
|
+
this.owner.address,
|
|
3290
3160
|
this.reserve.getLiquidityTokenProgram(),
|
|
3291
|
-
|
|
3161
|
+
reserveAta
|
|
3292
3162
|
);
|
|
3293
3163
|
this.setupIxs.unshift(createUserTokenAccountIx);
|
|
3294
|
-
this.setupIxsLabels.unshift(`CreateUserAta[${
|
|
3164
|
+
this.setupIxsLabels.unshift(`CreateUserAta[${reserveAta}]`);
|
|
3295
3165
|
}
|
|
3296
3166
|
if (action === 'mint') {
|
|
3297
|
-
const
|
|
3167
|
+
const ctokenAta = await this.getUserCollateralAccountAddress(this.reserve);
|
|
3168
|
+
const [, createUserCollateralAccountIx] = await createAssociatedTokenAccountIdempotentInstruction(
|
|
3298
3169
|
this.owner,
|
|
3299
3170
|
this.reserve.getCTokenMint(),
|
|
3300
|
-
this.owner,
|
|
3301
|
-
|
|
3302
|
-
|
|
3171
|
+
this.owner.address,
|
|
3172
|
+
TOKEN_PROGRAM_ADDRESS,
|
|
3173
|
+
ctokenAta
|
|
3303
3174
|
);
|
|
3304
3175
|
|
|
3305
3176
|
this.setupIxs.unshift(createUserCollateralAccountIx);
|
|
3306
|
-
this.setupIxsLabels.unshift(
|
|
3307
|
-
`CreateCollateralUserAta[${this.getUserCollateralAccountAddress(this.reserve).toString()}]`
|
|
3308
|
-
);
|
|
3177
|
+
this.setupIxsLabels.unshift(`CreateCollateralUserAta[${ctokenAta.toString()}]`);
|
|
3309
3178
|
}
|
|
3310
3179
|
}
|
|
3311
3180
|
|
|
3312
3181
|
private async updateWSOLAccount(action: ActionType) {
|
|
3313
|
-
const preIxs: Array<
|
|
3314
|
-
const postIxs: Array<
|
|
3182
|
+
const preIxs: Array<IInstruction> = [];
|
|
3183
|
+
const postIxs: Array<IInstruction> = [];
|
|
3315
3184
|
const preIxsLabels: Array<string> = [];
|
|
3316
3185
|
const postIxsLabels: Array<string> = [];
|
|
3317
3186
|
|
|
@@ -3331,7 +3200,7 @@ export class KaminoAction {
|
|
|
3331
3200
|
);
|
|
3332
3201
|
|
|
3333
3202
|
if (!borrow) {
|
|
3334
|
-
throw Error(`Unable to find obligation borrow to repay for ${this.obligation.state.owner
|
|
3203
|
+
throw Error(`Unable to find obligation borrow to repay for ${this.obligation.state.owner}`);
|
|
3335
3204
|
}
|
|
3336
3205
|
|
|
3337
3206
|
const cumulativeBorrowRateObligation = KaminoObligation.getCumulativeBorrowRate(borrow);
|
|
@@ -3351,19 +3220,18 @@ export class KaminoAction {
|
|
|
3351
3220
|
);
|
|
3352
3221
|
}
|
|
3353
3222
|
|
|
3354
|
-
let userTokenAccountAddress = this.getUserTokenAccountAddress(this.reserve);
|
|
3355
|
-
if (this.secondaryMint
|
|
3223
|
+
let userTokenAccountAddress = await this.getUserTokenAccountAddress(this.reserve);
|
|
3224
|
+
if (this.secondaryMint === WRAPPED_SOL_MINT) {
|
|
3356
3225
|
if (!this.outflowReserve) {
|
|
3357
3226
|
throw new Error(`Outflow reserve state not found ${this.secondaryMint}`);
|
|
3358
3227
|
}
|
|
3359
3228
|
|
|
3360
|
-
|
|
3361
|
-
userTokenAccountAddress = additionalUserTokenAccountAddress;
|
|
3229
|
+
userTokenAccountAddress = await this.getUserTokenAccountAddress(this.outflowReserve);
|
|
3362
3230
|
}
|
|
3363
3231
|
|
|
3364
|
-
const userWSOLAccountInfo = await this.kaminoMarket.
|
|
3232
|
+
const userWSOLAccountInfo = await fetchEncodedAccount(this.kaminoMarket.getRpc(), userTokenAccountAddress);
|
|
3365
3233
|
|
|
3366
|
-
const
|
|
3234
|
+
const rentExemptLamports = await this.kaminoMarket.getRpc().getMinimumBalanceForRentExemption(165n).send();
|
|
3367
3235
|
|
|
3368
3236
|
// Add rent exemption lamports for WSOL accounts that need to be pre-funded for inflow/send transactions
|
|
3369
3237
|
const sendAction =
|
|
@@ -3371,26 +3239,32 @@ export class KaminoAction {
|
|
|
3371
3239
|
action === 'repay' ||
|
|
3372
3240
|
action === 'repayAndWithdrawV2' ||
|
|
3373
3241
|
action === 'mint' ||
|
|
3374
|
-
(action === 'liquidate' && this.mint
|
|
3242
|
+
(action === 'liquidate' && this.mint === WRAPPED_SOL_MINT); // only sync WSOL amount if liquidator repays SOL which is secondaryMint
|
|
3375
3243
|
|
|
3376
|
-
const transferLamportsIx =
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3244
|
+
const transferLamportsIx = getTransferSolInstruction({
|
|
3245
|
+
amount: (userWSOLAccountInfo.exists ? 0n : rentExemptLamports) + (sendAction ? BigInt(safeRepay.toString()) : 0n),
|
|
3246
|
+
source: this.owner,
|
|
3247
|
+
destination: userTokenAccountAddress,
|
|
3380
3248
|
});
|
|
3381
3249
|
preIxs.push(transferLamportsIx);
|
|
3382
3250
|
preIxsLabels.push(`TransferLamportsToUserAtaSOL[${userTokenAccountAddress}]`);
|
|
3383
3251
|
|
|
3384
|
-
const closeWSOLAccountIx =
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3252
|
+
const closeWSOLAccountIx = getCloseAccountInstruction(
|
|
3253
|
+
{
|
|
3254
|
+
owner: this.owner,
|
|
3255
|
+
account: userTokenAccountAddress,
|
|
3256
|
+
destination: this.owner.address,
|
|
3257
|
+
},
|
|
3258
|
+
{ programAddress: TOKEN_PROGRAM_ADDRESS }
|
|
3390
3259
|
);
|
|
3391
3260
|
|
|
3392
|
-
const syncIx =
|
|
3393
|
-
|
|
3261
|
+
const syncIx = getSyncNativeInstruction(
|
|
3262
|
+
{
|
|
3263
|
+
account: userTokenAccountAddress,
|
|
3264
|
+
},
|
|
3265
|
+
{ programAddress: TOKEN_PROGRAM_ADDRESS }
|
|
3266
|
+
);
|
|
3267
|
+
if (userWSOLAccountInfo.exists) {
|
|
3394
3268
|
if (sendAction) {
|
|
3395
3269
|
preIxs.push(syncIx);
|
|
3396
3270
|
preIxsLabels.push(`SyncUserAtaSOL[${userTokenAccountAddress}]`);
|
|
@@ -3399,11 +3273,11 @@ export class KaminoAction {
|
|
|
3399
3273
|
postIxsLabels.push(`CloseUserAtaSOL[${userTokenAccountAddress}]`);
|
|
3400
3274
|
}
|
|
3401
3275
|
} else {
|
|
3402
|
-
const [, createUserWSOLAccountIx] = createAssociatedTokenAccountIdempotentInstruction(
|
|
3403
|
-
this.owner,
|
|
3404
|
-
NATIVE_MINT,
|
|
3276
|
+
const [, createUserWSOLAccountIx] = await createAssociatedTokenAccountIdempotentInstruction(
|
|
3405
3277
|
this.owner,
|
|
3406
|
-
|
|
3278
|
+
WRAPPED_SOL_MINT,
|
|
3279
|
+
this.owner.address,
|
|
3280
|
+
TOKEN_PROGRAM_ADDRESS,
|
|
3407
3281
|
userTokenAccountAddress
|
|
3408
3282
|
);
|
|
3409
3283
|
preIxs.push(createUserWSOLAccountIx);
|
|
@@ -3424,21 +3298,17 @@ export class KaminoAction {
|
|
|
3424
3298
|
kaminoMarket: KaminoMarket,
|
|
3425
3299
|
action: ActionType,
|
|
3426
3300
|
inflowAmount: string | BN,
|
|
3427
|
-
inflowTokenMint:
|
|
3428
|
-
outflowTokenMint:
|
|
3429
|
-
|
|
3430
|
-
obligationOwner:
|
|
3301
|
+
inflowTokenMint: Address,
|
|
3302
|
+
outflowTokenMint: Address,
|
|
3303
|
+
signer: TransactionSigner,
|
|
3304
|
+
obligationOwner: Address,
|
|
3431
3305
|
obligation: KaminoObligation | ObligationType,
|
|
3432
3306
|
outflowAmount?: string | BN,
|
|
3433
|
-
referrer:
|
|
3434
|
-
currentSlot:
|
|
3307
|
+
referrer: Option<Address> = none(),
|
|
3308
|
+
currentSlot: Slot = 0n
|
|
3435
3309
|
) {
|
|
3436
|
-
const inflowReserve = kaminoMarket.
|
|
3437
|
-
const outflowReserve = kaminoMarket.
|
|
3438
|
-
|
|
3439
|
-
if (!outflowReserve || !inflowReserve) {
|
|
3440
|
-
throw new Error('reserve states are not fetched');
|
|
3441
|
-
}
|
|
3310
|
+
const inflowReserve = kaminoMarket.getExistingReserveByMint(inflowTokenMint);
|
|
3311
|
+
const outflowReserve = kaminoMarket.getExistingReserveByMint(outflowTokenMint);
|
|
3442
3312
|
|
|
3443
3313
|
const { kaminoObligation, depositReserves, borrowReserves, distinctReserveCount } =
|
|
3444
3314
|
await KaminoAction.loadObligation(
|
|
@@ -3449,10 +3319,10 @@ export class KaminoAction {
|
|
|
3449
3319
|
obligation,
|
|
3450
3320
|
outflowReserve.address
|
|
3451
3321
|
);
|
|
3452
|
-
const referrerKey = await this.getReferrerKey(kaminoMarket,
|
|
3322
|
+
const referrerKey = await this.getReferrerKey(kaminoMarket, signer.address, kaminoObligation, referrer);
|
|
3453
3323
|
|
|
3454
|
-
let secondaryMint:
|
|
3455
|
-
let primaryMint:
|
|
3324
|
+
let secondaryMint: Address;
|
|
3325
|
+
let primaryMint: Address;
|
|
3456
3326
|
|
|
3457
3327
|
if (
|
|
3458
3328
|
action === 'liquidate' ||
|
|
@@ -3468,7 +3338,7 @@ export class KaminoAction {
|
|
|
3468
3338
|
|
|
3469
3339
|
return new KaminoAction(
|
|
3470
3340
|
kaminoMarket,
|
|
3471
|
-
|
|
3341
|
+
signer,
|
|
3472
3342
|
kaminoObligation || obligation,
|
|
3473
3343
|
primaryMint,
|
|
3474
3344
|
distinctReserveCount,
|
|
@@ -3485,17 +3355,17 @@ export class KaminoAction {
|
|
|
3485
3355
|
}
|
|
3486
3356
|
|
|
3487
3357
|
static async initializeWithdrawReferrerFees(
|
|
3488
|
-
mint:
|
|
3489
|
-
owner:
|
|
3358
|
+
mint: Address,
|
|
3359
|
+
owner: TransactionSigner,
|
|
3490
3360
|
kaminoMarket: KaminoMarket,
|
|
3491
|
-
currentSlot:
|
|
3361
|
+
currentSlot: Slot = 0n
|
|
3492
3362
|
) {
|
|
3493
3363
|
const reserve = kaminoMarket.getReserveByMint(mint);
|
|
3494
3364
|
if (reserve === undefined) {
|
|
3495
|
-
throw new Error(`Reserve ${mint} not found in market ${kaminoMarket.getAddress()
|
|
3365
|
+
throw new Error(`Reserve ${mint} not found in market ${kaminoMarket.getAddress()}`);
|
|
3496
3366
|
}
|
|
3497
3367
|
|
|
3498
|
-
const [{ createAtaIx }] = createAtasIdempotent(owner, [
|
|
3368
|
+
const [{ createAtaIx }] = await createAtasIdempotent(owner, [
|
|
3499
3369
|
{
|
|
3500
3370
|
mint: reserve.getLiquidityMint(),
|
|
3501
3371
|
tokenProgram: reserve.getLiquidityTokenProgram(),
|
|
@@ -3535,17 +3405,17 @@ export class KaminoAction {
|
|
|
3535
3405
|
: new BN(new Decimal(amount.toString()).mul(collateralExchangeRate).ceil().toString());
|
|
3536
3406
|
}
|
|
3537
3407
|
|
|
3538
|
-
getObligationPda():
|
|
3408
|
+
async getObligationPda(): Promise<Address> {
|
|
3539
3409
|
return isKaminoObligation(this.obligation)
|
|
3540
3410
|
? this.obligation.obligationAddress
|
|
3541
|
-
: this.obligation.toPda(this.kaminoMarket.getAddress(), this.owner);
|
|
3411
|
+
: await this.obligation.toPda(this.kaminoMarket.getAddress(), this.owner.address);
|
|
3542
3412
|
}
|
|
3543
3413
|
|
|
3544
3414
|
isObligationInitialized() {
|
|
3545
3415
|
return this.obligation instanceof KaminoObligation;
|
|
3546
3416
|
}
|
|
3547
3417
|
|
|
3548
|
-
getAdditionalDepositReservesList():
|
|
3418
|
+
getAdditionalDepositReservesList(): Address[] {
|
|
3549
3419
|
const depositReservesList = this.depositReserves;
|
|
3550
3420
|
|
|
3551
3421
|
// check if there's any member in the preloadedDepositReserves that is not in the depositReserves
|
|
@@ -3555,7 +3425,7 @@ export class KaminoAction {
|
|
|
3555
3425
|
|
|
3556
3426
|
// Check if the depositReserves array contains the current preloadedDepositReserve
|
|
3557
3427
|
const found = this.depositReserves.some((depositReserve) => {
|
|
3558
|
-
return depositReserve
|
|
3428
|
+
return depositReserve === preloadedDepositReserve;
|
|
3559
3429
|
});
|
|
3560
3430
|
|
|
3561
3431
|
// If not found, push the current preloadedDepositReserve to the depositReserves array
|
|
@@ -3567,47 +3437,60 @@ export class KaminoAction {
|
|
|
3567
3437
|
return depositReservesList;
|
|
3568
3438
|
}
|
|
3569
3439
|
|
|
3570
|
-
private static async
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
referrer
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
if (kaminoObligation === null) {
|
|
3579
|
-
const [_, userMetadata] = await kaminoMarket.getUserMetadata(owner);
|
|
3580
|
-
if (userMetadata) {
|
|
3581
|
-
referrerKey = userMetadata.referrer;
|
|
3582
|
-
}
|
|
3583
|
-
} else {
|
|
3584
|
-
referrerKey = kaminoObligation.state.referrer;
|
|
3585
|
-
}
|
|
3440
|
+
private static async getReferrerMetadataAccount(
|
|
3441
|
+
referrer: Option<Address>,
|
|
3442
|
+
programId: Address
|
|
3443
|
+
): Promise<Option<Address>> {
|
|
3444
|
+
if (isSome(referrer)) {
|
|
3445
|
+
return some((await userMetadataPda(referrer.value, programId))[0]);
|
|
3446
|
+
} else {
|
|
3447
|
+
return none();
|
|
3586
3448
|
}
|
|
3587
|
-
return referrerKey;
|
|
3588
3449
|
}
|
|
3589
3450
|
|
|
3590
|
-
|
|
3591
|
-
|
|
3451
|
+
private async getReferrerTokenStateAccountMeta(reserve: Address, writable: boolean): Promise<IAccountMeta> {
|
|
3452
|
+
if (isSome(this.referrer)) {
|
|
3453
|
+
return {
|
|
3454
|
+
address: await referrerTokenStatePda(this.referrer.value, reserve, this.kaminoMarket.programId),
|
|
3455
|
+
role: writable ? AccountRole.WRITABLE : AccountRole.READONLY,
|
|
3456
|
+
};
|
|
3457
|
+
} else {
|
|
3458
|
+
return {
|
|
3459
|
+
address: this.kaminoMarket.programId,
|
|
3460
|
+
role: AccountRole.READONLY,
|
|
3461
|
+
};
|
|
3462
|
+
}
|
|
3592
3463
|
}
|
|
3593
3464
|
|
|
3594
|
-
|
|
3595
|
-
return
|
|
3465
|
+
private async getReferrerTokenStateAddress(reserve: Address): Promise<Option<Address>> {
|
|
3466
|
+
return KaminoAction.getReferrerTokenStateAddressImpl(this.referrer, reserve, this.kaminoMarket.programId);
|
|
3596
3467
|
}
|
|
3597
3468
|
|
|
3598
|
-
|
|
3599
|
-
return getAssociatedTokenAddress(
|
|
3469
|
+
getUserTokenAccountAddress(reserve: KaminoReserve): Promise<Address> {
|
|
3470
|
+
return getAssociatedTokenAddress(
|
|
3471
|
+
reserve.getLiquidityMint(),
|
|
3472
|
+
this.owner.address,
|
|
3473
|
+
reserve.getLiquidityTokenProgram()
|
|
3474
|
+
);
|
|
3600
3475
|
}
|
|
3601
3476
|
|
|
3602
|
-
|
|
3603
|
-
|
|
3477
|
+
getTokenAccountAddressByUser(reserve: KaminoReserve, user: Address): Promise<Address> {
|
|
3478
|
+
return getAssociatedTokenAddress(reserve.getLiquidityMint(), user, reserve.getLiquidityTokenProgram());
|
|
3479
|
+
}
|
|
3480
|
+
|
|
3481
|
+
getUserCollateralAccountAddress(reserve: KaminoReserve): Promise<Address> {
|
|
3482
|
+
return getAssociatedTokenAddress(reserve.getCTokenMint(), this.owner.address);
|
|
3483
|
+
}
|
|
3484
|
+
|
|
3485
|
+
public static actionToIxs(action: KaminoAction): Array<IInstruction> {
|
|
3486
|
+
const ixs: IInstruction[] = [...action.computeBudgetIxs, ...action.setupIxs];
|
|
3604
3487
|
ixs.push(...KaminoAction.actionToLendingIxs(action));
|
|
3605
3488
|
ixs.push(...action.cleanupIxs);
|
|
3606
3489
|
return ixs;
|
|
3607
3490
|
}
|
|
3608
3491
|
|
|
3609
|
-
public static actionToLendingIxs(action: KaminoAction): Array<
|
|
3610
|
-
const ixs:
|
|
3492
|
+
public static actionToLendingIxs(action: KaminoAction): Array<IInstruction> {
|
|
3493
|
+
const ixs: IInstruction[] = [];
|
|
3611
3494
|
for (let i = 0; i < action.lendingIxs.length; i++) {
|
|
3612
3495
|
ixs.push(action.lendingIxs[i]);
|
|
3613
3496
|
if (i !== action.lendingIxs.length - 1) {
|
|
@@ -3634,4 +3517,84 @@ export class KaminoAction {
|
|
|
3634
3517
|
}
|
|
3635
3518
|
return labels;
|
|
3636
3519
|
}
|
|
3520
|
+
|
|
3521
|
+
private static async getFarmAccountsForReserve(
|
|
3522
|
+
obligationAddress: Address,
|
|
3523
|
+
reserve: KaminoReserve
|
|
3524
|
+
): Promise<{
|
|
3525
|
+
debtFarmAccounts: {
|
|
3526
|
+
obligationFarmUserState: Option<Address>;
|
|
3527
|
+
reserveFarmState: Option<Address>;
|
|
3528
|
+
};
|
|
3529
|
+
collateralFarmAccounts: {
|
|
3530
|
+
obligationFarmUserState: Option<Address>;
|
|
3531
|
+
reserveFarmState: Option<Address>;
|
|
3532
|
+
};
|
|
3533
|
+
}> {
|
|
3534
|
+
const collateralFarmAddress = reserve.getCollateralFarmAddress();
|
|
3535
|
+
let collateralFarmAccounts: {
|
|
3536
|
+
obligationFarmUserState: Option<Address>;
|
|
3537
|
+
reserveFarmState: Option<Address>;
|
|
3538
|
+
} = {
|
|
3539
|
+
obligationFarmUserState: none(),
|
|
3540
|
+
reserveFarmState: none(),
|
|
3541
|
+
};
|
|
3542
|
+
if (isSome(collateralFarmAddress)) {
|
|
3543
|
+
collateralFarmAccounts = {
|
|
3544
|
+
obligationFarmUserState: some(await obligationFarmStatePda(collateralFarmAddress.value, obligationAddress)),
|
|
3545
|
+
reserveFarmState: collateralFarmAddress,
|
|
3546
|
+
};
|
|
3547
|
+
}
|
|
3548
|
+
let debtFarmAccounts: {
|
|
3549
|
+
obligationFarmUserState: Option<Address>;
|
|
3550
|
+
reserveFarmState: Option<Address>;
|
|
3551
|
+
} = {
|
|
3552
|
+
obligationFarmUserState: none(),
|
|
3553
|
+
reserveFarmState: none(),
|
|
3554
|
+
};
|
|
3555
|
+
const debtFarmAddress = reserve.getDebtFarmAddress();
|
|
3556
|
+
if (isSome(debtFarmAddress)) {
|
|
3557
|
+
debtFarmAccounts = {
|
|
3558
|
+
obligationFarmUserState: some(await obligationFarmStatePda(debtFarmAddress.value, obligationAddress)),
|
|
3559
|
+
reserveFarmState: debtFarmAddress,
|
|
3560
|
+
};
|
|
3561
|
+
}
|
|
3562
|
+
return {
|
|
3563
|
+
debtFarmAccounts,
|
|
3564
|
+
collateralFarmAccounts,
|
|
3565
|
+
};
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3568
|
+
private static async getReferrerKey(
|
|
3569
|
+
kaminoMarket: KaminoMarket,
|
|
3570
|
+
owner: Address,
|
|
3571
|
+
kaminoObligation: KaminoObligation | null,
|
|
3572
|
+
referrer: Option<Address>
|
|
3573
|
+
): Promise<Option<Address>> {
|
|
3574
|
+
let referrerKey: Option<Address> = none();
|
|
3575
|
+
if (isNone(referrer) || referrer.value === DEFAULT_PUBLIC_KEY) {
|
|
3576
|
+
if (kaminoObligation === null) {
|
|
3577
|
+
const [_, userMetadata] = await kaminoMarket.getUserMetadata(owner);
|
|
3578
|
+
if (userMetadata && userMetadata.referrer !== DEFAULT_PUBLIC_KEY) {
|
|
3579
|
+
referrerKey = some(userMetadata.referrer);
|
|
3580
|
+
}
|
|
3581
|
+
} else if (kaminoObligation.state.referrer !== DEFAULT_PUBLIC_KEY) {
|
|
3582
|
+
referrerKey = some(kaminoObligation.state.referrer);
|
|
3583
|
+
}
|
|
3584
|
+
} else {
|
|
3585
|
+
referrerKey = referrer;
|
|
3586
|
+
}
|
|
3587
|
+
return referrerKey;
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
private static async getReferrerTokenStateAddressImpl(
|
|
3591
|
+
referrer: Option<Address>,
|
|
3592
|
+
reserve: Address,
|
|
3593
|
+
programId: Address
|
|
3594
|
+
): Promise<Option<Address>> {
|
|
3595
|
+
if (isSome(referrer)) {
|
|
3596
|
+
return some(await referrerTokenStatePda(referrer.value, reserve, programId));
|
|
3597
|
+
}
|
|
3598
|
+
return none();
|
|
3599
|
+
}
|
|
3637
3600
|
}
|