@exponent-labs/klend-idl 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/accounts/LendingMarket.d.ts +88 -0
- package/build/accounts/LendingMarket.js +225 -0
- package/build/accounts/LendingMarket.js.map +1 -0
- package/build/accounts/Obligation.d.ts +85 -0
- package/build/accounts/Obligation.js +217 -0
- package/build/accounts/Obligation.js.map +1 -0
- package/build/accounts/ReferrerState.d.ts +23 -0
- package/build/accounts/ReferrerState.js +85 -0
- package/build/accounts/ReferrerState.js.map +1 -0
- package/build/accounts/ReferrerTokenState.d.ts +36 -0
- package/build/accounts/ReferrerTokenState.js +116 -0
- package/build/accounts/ReferrerTokenState.js.map +1 -0
- package/build/accounts/Reserve.d.ts +61 -0
- package/build/accounts/Reserve.js +169 -0
- package/build/accounts/Reserve.js.map +1 -0
- package/build/accounts/ShortUrl.d.ts +23 -0
- package/build/accounts/ShortUrl.js +85 -0
- package/build/accounts/ShortUrl.js.map +1 -0
- package/build/accounts/UserMetadata.d.ts +36 -0
- package/build/accounts/UserMetadata.js +116 -0
- package/build/accounts/UserMetadata.js.map +1 -0
- package/build/accounts/UserState.d.ts +69 -0
- package/build/accounts/UserState.js +182 -0
- package/build/accounts/UserState.js.map +1 -0
- package/build/accounts/index.d.ts +16 -0
- package/build/accounts/index.js +20 -0
- package/build/accounts/index.js.map +1 -0
- package/build/errors/anchor.d.ts +434 -0
- package/build/errors/anchor.js +767 -0
- package/build/errors/anchor.js.map +1 -0
- package/build/errors/custom.d.ts +898 -0
- package/build/errors/custom.js +1580 -0
- package/build/errors/custom.js.map +1 -0
- package/build/errors/index.d.ts +5 -0
- package/build/errors/index.js +71 -0
- package/build/errors/index.js.map +1 -0
- package/build/index.d.ts +4 -0
- package/build/index.js +34 -0
- package/build/index.js.map +1 -0
- package/build/instructions/borrowObligationLiquidity.d.ts +21 -0
- package/build/instructions/borrowObligationLiquidity.js +80 -0
- package/build/instructions/borrowObligationLiquidity.js.map +1 -0
- package/build/instructions/borrowObligationLiquidityV2.d.ts +28 -0
- package/build/instructions/borrowObligationLiquidityV2.js +90 -0
- package/build/instructions/borrowObligationLiquidityV2.js.map +1 -0
- package/build/instructions/deleteReferrerStateAndShortUrl.d.ts +9 -0
- package/build/instructions/deleteReferrerStateAndShortUrl.js +20 -0
- package/build/instructions/deleteReferrerStateAndShortUrl.js.map +1 -0
- package/build/instructions/depositObligationCollateral.d.ts +17 -0
- package/build/instructions/depositObligationCollateral.js +64 -0
- package/build/instructions/depositObligationCollateral.js.map +1 -0
- package/build/instructions/depositReserveLiquidity.d.ts +21 -0
- package/build/instructions/depositReserveLiquidity.js +88 -0
- package/build/instructions/depositReserveLiquidity.js.map +1 -0
- package/build/instructions/depositReserveLiquidityAndObligationCollateral.d.ts +23 -0
- package/build/instructions/depositReserveLiquidityAndObligationCollateral.js +94 -0
- package/build/instructions/depositReserveLiquidityAndObligationCollateral.js.map +1 -0
- package/build/instructions/depositReserveLiquidityAndObligationCollateralV2.d.ts +30 -0
- package/build/instructions/depositReserveLiquidityAndObligationCollateralV2.js +100 -0
- package/build/instructions/depositReserveLiquidityAndObligationCollateralV2.js.map +1 -0
- package/build/instructions/flashBorrowReserveLiquidity.d.ts +21 -0
- package/build/instructions/flashBorrowReserveLiquidity.js +80 -0
- package/build/instructions/flashBorrowReserveLiquidity.js.map +1 -0
- package/build/instructions/flashRepayReserveLiquidity.d.ts +22 -0
- package/build/instructions/flashRepayReserveLiquidity.js +77 -0
- package/build/instructions/flashRepayReserveLiquidity.js.map +1 -0
- package/build/instructions/idlMissingTypes.d.ts +18 -0
- package/build/instructions/idlMissingTypes.js +62 -0
- package/build/instructions/idlMissingTypes.js.map +1 -0
- package/build/instructions/index.d.ts +74 -0
- package/build/instructions/index.js +78 -0
- package/build/instructions/index.js.map +1 -0
- package/build/instructions/initFarmsForReserve.d.ts +18 -0
- package/build/instructions/initFarmsForReserve.js +62 -0
- package/build/instructions/initFarmsForReserve.js.map +1 -0
- package/build/instructions/initLendingMarket.d.ts +13 -0
- package/build/instructions/initLendingMarket.js +53 -0
- package/build/instructions/initLendingMarket.js.map +1 -0
- package/build/instructions/initObligation.d.ts +18 -0
- package/build/instructions/initObligation.js +54 -0
- package/build/instructions/initObligation.js.map +1 -0
- package/build/instructions/initObligationFarmsForReserve.d.ts +19 -0
- package/build/instructions/initObligationFarmsForReserve.js +59 -0
- package/build/instructions/initObligationFarmsForReserve.js.map +1 -0
- package/build/instructions/initReferrerStateAndShortUrl.d.ts +14 -0
- package/build/instructions/initReferrerStateAndShortUrl.js +54 -0
- package/build/instructions/initReferrerStateAndShortUrl.js.map +1 -0
- package/build/instructions/initReferrerTokenState.d.ts +14 -0
- package/build/instructions/initReferrerTokenState.js +50 -0
- package/build/instructions/initReferrerTokenState.js.map +1 -0
- package/build/instructions/initReserve.d.ts +17 -0
- package/build/instructions/initReserve.js +56 -0
- package/build/instructions/initReserve.js.map +1 -0
- package/build/instructions/initUserMetadata.d.ts +14 -0
- package/build/instructions/initUserMetadata.js +54 -0
- package/build/instructions/initUserMetadata.js.map +1 -0
- package/build/instructions/liquidateObligationAndRedeemReserveCollateral.d.ts +31 -0
- package/build/instructions/liquidateObligationAndRedeemReserveCollateral.js +126 -0
- package/build/instructions/liquidateObligationAndRedeemReserveCollateral.js.map +1 -0
- package/build/instructions/redeemFees.d.ts +11 -0
- package/build/instructions/redeemFees.js +38 -0
- package/build/instructions/redeemFees.js.map +1 -0
- package/build/instructions/redeemReserveCollateral.d.ts +21 -0
- package/build/instructions/redeemReserveCollateral.js +92 -0
- package/build/instructions/redeemReserveCollateral.js.map +1 -0
- package/build/instructions/refreshObligation.d.ts +6 -0
- package/build/instructions/refreshObligation.js +17 -0
- package/build/instructions/refreshObligation.js.map +1 -0
- package/build/instructions/refreshObligationFarmsForReserve.d.ts +18 -0
- package/build/instructions/refreshObligationFarmsForReserve.js +62 -0
- package/build/instructions/refreshObligationFarmsForReserve.js.map +1 -0
- package/build/instructions/refreshReserve.d.ts +10 -0
- package/build/instructions/refreshReserve.js +29 -0
- package/build/instructions/refreshReserve.js.map +1 -0
- package/build/instructions/refreshReservesBatch.d.ts +6 -0
- package/build/instructions/refreshReservesBatch.js +43 -0
- package/build/instructions/refreshReservesBatch.js.map +1 -0
- package/build/instructions/repayObligationLiquidity.d.ts +18 -0
- package/build/instructions/repayObligationLiquidity.js +65 -0
- package/build/instructions/repayObligationLiquidity.js.map +1 -0
- package/build/instructions/repayObligationLiquidityV2.d.ts +26 -0
- package/build/instructions/repayObligationLiquidityV2.js +76 -0
- package/build/instructions/repayObligationLiquidityV2.js.map +1 -0
- package/build/instructions/requestElevationGroup.d.ts +11 -0
- package/build/instructions/requestElevationGroup.js +47 -0
- package/build/instructions/requestElevationGroup.js.map +1 -0
- package/build/instructions/socializeLoss.d.ts +14 -0
- package/build/instructions/socializeLoss.js +53 -0
- package/build/instructions/socializeLoss.js.map +1 -0
- package/build/instructions/updateLendingMarket.d.ts +12 -0
- package/build/instructions/updateLendingMarket.js +47 -0
- package/build/instructions/updateLendingMarket.js.map +1 -0
- package/build/instructions/updateLendingMarketOwner.d.ts +6 -0
- package/build/instructions/updateLendingMarketOwner.js +21 -0
- package/build/instructions/updateLendingMarketOwner.js.map +1 -0
- package/build/instructions/updateReserveConfig.d.ts +14 -0
- package/build/instructions/updateReserveConfig.js +49 -0
- package/build/instructions/updateReserveConfig.js.map +1 -0
- package/build/instructions/withdrawObligationCollateral.d.ts +18 -0
- package/build/instructions/withdrawObligationCollateral.js +69 -0
- package/build/instructions/withdrawObligationCollateral.js.map +1 -0
- package/build/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.d.ts +23 -0
- package/build/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js +98 -0
- package/build/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.js.map +1 -0
- package/build/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.d.ts +30 -0
- package/build/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.js +104 -0
- package/build/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.js.map +1 -0
- package/build/instructions/withdrawProtocolFee.d.ts +17 -0
- package/build/instructions/withdrawProtocolFee.js +64 -0
- package/build/instructions/withdrawProtocolFee.js.map +1 -0
- package/build/instructions/withdrawReferrerFees.d.ts +13 -0
- package/build/instructions/withdrawReferrerFees.js +40 -0
- package/build/instructions/withdrawReferrerFees.js.map +1 -0
- package/build/kamino_lending.d.ts +3937 -0
- package/build/kamino_lending.js +3940 -0
- package/build/kamino_lending.js.map +1 -0
- package/build/kamino_lending.json +6352 -0
- package/build/programId.d.ts +3 -0
- package/build/programId.js +9 -0
- package/build/programId.js.map +1 -0
- package/build/types/AssetTier.d.ts +44 -0
- package/build/types/AssetTier.js +122 -0
- package/build/types/AssetTier.js.map +1 -0
- package/build/types/BigFractionBytes.d.ts +26 -0
- package/build/types/BigFractionBytes.js +72 -0
- package/build/types/BigFractionBytes.js.map +1 -0
- package/build/types/BorrowRateCurve.d.ts +27 -0
- package/build/types/BorrowRateCurve.js +63 -0
- package/build/types/BorrowRateCurve.js.map +1 -0
- package/build/types/CurvePoint.d.ts +25 -0
- package/build/types/CurvePoint.js +68 -0
- package/build/types/CurvePoint.js.map +1 -0
- package/build/types/ElevationGroup.d.ts +62 -0
- package/build/types/ElevationGroup.js +125 -0
- package/build/types/ElevationGroup.js.map +1 -0
- package/build/types/FeeCalculation.d.ts +31 -0
- package/build/types/FeeCalculation.js +95 -0
- package/build/types/FeeCalculation.js.map +1 -0
- package/build/types/InitObligationArgs.d.ts +25 -0
- package/build/types/InitObligationArgs.js +68 -0
- package/build/types/InitObligationArgs.js.map +1 -0
- package/build/types/LastUpdate.d.ts +36 -0
- package/build/types/LastUpdate.js +84 -0
- package/build/types/LastUpdate.js.map +1 -0
- package/build/types/ObligationCollateral.d.ts +43 -0
- package/build/types/ObligationCollateral.js +98 -0
- package/build/types/ObligationCollateral.js.map +1 -0
- package/build/types/ObligationLiquidity.d.ts +64 -0
- package/build/types/ObligationLiquidity.js +123 -0
- package/build/types/ObligationLiquidity.js.map +1 -0
- package/build/types/PriceHeuristic.d.ts +32 -0
- package/build/types/PriceHeuristic.js +78 -0
- package/build/types/PriceHeuristic.js.map +1 -0
- package/build/types/PythConfiguration.d.ts +22 -0
- package/build/types/PythConfiguration.js +63 -0
- package/build/types/PythConfiguration.js.map +1 -0
- package/build/types/ReserveCollateral.d.ts +43 -0
- package/build/types/ReserveCollateral.js +97 -0
- package/build/types/ReserveCollateral.js.map +1 -0
- package/build/types/ReserveConfig.d.ts +246 -0
- package/build/types/ReserveConfig.js +269 -0
- package/build/types/ReserveConfig.js.map +1 -0
- package/build/types/ReserveFarmKind.d.ts +31 -0
- package/build/types/ReserveFarmKind.js +98 -0
- package/build/types/ReserveFarmKind.js.map +1 -0
- package/build/types/ReserveFees.d.ts +32 -0
- package/build/types/ReserveFees.js +82 -0
- package/build/types/ReserveFees.js.map +1 -0
- package/build/types/ReserveLiquidity.d.ts +114 -0
- package/build/types/ReserveLiquidity.js +191 -0
- package/build/types/ReserveLiquidity.js.map +1 -0
- package/build/types/ReserveStatus.d.ts +44 -0
- package/build/types/ReserveStatus.js +122 -0
- package/build/types/ReserveStatus.js.map +1 -0
- package/build/types/ScopeConfiguration.d.ts +32 -0
- package/build/types/ScopeConfiguration.js +79 -0
- package/build/types/ScopeConfiguration.js.map +1 -0
- package/build/types/SwitchboardConfiguration.d.ts +27 -0
- package/build/types/SwitchboardConfiguration.js +69 -0
- package/build/types/SwitchboardConfiguration.js.map +1 -0
- package/build/types/TokenInfo.d.ts +99 -0
- package/build/types/TokenInfo.js +145 -0
- package/build/types/TokenInfo.js.map +1 -0
- package/build/types/UpdateConfigMode.d.ts +616 -0
- package/build/types/UpdateConfigMode.js +1178 -0
- package/build/types/UpdateConfigMode.js.map +1 -0
- package/build/types/UpdateLendingMarketConfigValue.d.ts +177 -0
- package/build/types/UpdateLendingMarketConfigValue.js +312 -0
- package/build/types/UpdateLendingMarketConfigValue.js.map +1 -0
- package/build/types/UpdateLendingMarketMode.d.ts +239 -0
- package/build/types/UpdateLendingMarketMode.js +482 -0
- package/build/types/UpdateLendingMarketMode.js.map +1 -0
- package/build/types/WithdrawalCaps.d.ts +37 -0
- package/build/types/WithdrawalCaps.js +89 -0
- package/build/types/WithdrawalCaps.js.map +1 -0
- package/build/types/index.d.ts +64 -0
- package/build/types/index.js +77 -0
- package/build/types/index.js.map +1 -0
- package/package.json +44 -0
- package/src/accounts/LendingMarket.ts +292 -0
- package/src/accounts/Obligation.ts +282 -0
- package/src/accounts/ReferrerState.ts +90 -0
- package/src/accounts/ReferrerTokenState.ts +126 -0
- package/src/accounts/Reserve.ts +218 -0
- package/src/accounts/ShortUrl.ts +86 -0
- package/src/accounts/UserMetadata.ts +126 -0
- package/src/accounts/UserState.ts +210 -0
- package/src/accounts/index.ts +19 -0
- package/src/errors/anchor.ts +773 -0
- package/src/errors/custom.ts +1633 -0
- package/src/errors/index.ts +62 -0
- package/src/index.ts +5 -0
- package/src/instructions/borrowObligationLiquidity.ts +81 -0
- package/src/instructions/borrowObligationLiquidityV2.ts +103 -0
- package/src/instructions/deleteReferrerStateAndShortUrl.ts +27 -0
- package/src/instructions/depositObligationCollateral.ts +61 -0
- package/src/instructions/depositReserveLiquidity.ts +89 -0
- package/src/instructions/depositReserveLiquidityAndObligationCollateral.ts +97 -0
- package/src/instructions/depositReserveLiquidityAndObligationCollateralV2.ts +119 -0
- package/src/instructions/flashBorrowReserveLiquidity.ts +81 -0
- package/src/instructions/flashRepayReserveLiquidity.ts +79 -0
- package/src/instructions/idlMissingTypes.ts +59 -0
- package/src/instructions/index.ts +158 -0
- package/src/instructions/initFarmsForReserve.ts +60 -0
- package/src/instructions/initLendingMarket.ts +46 -0
- package/src/instructions/initObligation.ts +51 -0
- package/src/instructions/initObligationFarmsForReserve.ts +58 -0
- package/src/instructions/initReferrerStateAndShortUrl.ts +48 -0
- package/src/instructions/initReferrerTokenState.ts +44 -0
- package/src/instructions/initReserve.ts +68 -0
- package/src/instructions/initUserMetadata.ts +48 -0
- package/src/instructions/liquidateObligationAndRedeemReserveCollateral.ts +137 -0
- package/src/instructions/redeemFees.ts +44 -0
- package/src/instructions/redeemReserveCollateral.ts +93 -0
- package/src/instructions/refreshObligation.ts +18 -0
- package/src/instructions/refreshObligationFarmsForReserve.ts +60 -0
- package/src/instructions/refreshReserve.ts +34 -0
- package/src/instructions/refreshReservesBatch.ts +24 -0
- package/src/instructions/repayObligationLiquidity.ts +63 -0
- package/src/instructions/repayObligationLiquidityV2.ts +87 -0
- package/src/instructions/requestElevationGroup.ts +38 -0
- package/src/instructions/socializeLoss.ts +47 -0
- package/src/instructions/updateLendingMarket.ts +39 -0
- package/src/instructions/updateLendingMarketOwner.ts +25 -0
- package/src/instructions/updateReserveConfig.ts +43 -0
- package/src/instructions/withdrawObligationCollateral.ts +67 -0
- package/src/instructions/withdrawObligationCollateralAndRedeemReserveCollateral.ts +101 -0
- package/src/instructions/withdrawObligationCollateralAndRedeemReserveCollateralV2.ts +123 -0
- package/src/instructions/withdrawProtocolFee.ts +61 -0
- package/src/instructions/withdrawReferrerFees.ts +48 -0
- package/src/kamino_lending.json +6352 -0
- package/src/kamino_lending.ts +7873 -0
- package/src/programId.ts +9 -0
- package/src/types/AssetTier.ts +116 -0
- package/src/types/BigFractionBytes.ts +59 -0
- package/src/types/BorrowRateCurve.ts +53 -0
- package/src/types/CurvePoint.ts +58 -0
- package/src/types/ElevationGroup.ts +129 -0
- package/src/types/FeeCalculation.ts +83 -0
- package/src/types/InitObligationArgs.ts +58 -0
- package/src/types/LastUpdate.ts +78 -0
- package/src/types/ObligationCollateral.ts +100 -0
- package/src/types/ObligationLiquidity.ts +140 -0
- package/src/types/PriceHeuristic.ts +72 -0
- package/src/types/PythConfiguration.ts +53 -0
- package/src/types/ReserveCollateral.ts +94 -0
- package/src/types/ReserveConfig.ts +349 -0
- package/src/types/ReserveFarmKind.ts +90 -0
- package/src/types/ReserveFees.ts +76 -0
- package/src/types/ReserveLiquidity.ts +219 -0
- package/src/types/ReserveStatus.ts +120 -0
- package/src/types/ScopeConfiguration.ts +76 -0
- package/src/types/SwitchboardConfiguration.ts +64 -0
- package/src/types/TokenInfo.ts +172 -0
- package/src/types/UpdateConfigMode.ts +1440 -0
- package/src/types/UpdateLendingMarketConfigValue.ts +376 -0
- package/src/types/UpdateLendingMarketMode.ts +570 -0
- package/src/types/WithdrawalCaps.ts +85 -0
- package/src/types/index.ts +275 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.refreshObligationFarmsForReserve = exports.layout = void 0;
|
|
27
|
+
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
28
|
+
const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
29
|
+
const programId_1 = require("../programId");
|
|
30
|
+
exports.layout = borsh.struct([borsh.u8("mode")]);
|
|
31
|
+
function refreshObligationFarmsForReserve(args, accounts, programId = programId_1.PROGRAM_ID) {
|
|
32
|
+
const keys = [
|
|
33
|
+
{ pubkey: accounts.crank, isSigner: true, isWritable: true },
|
|
34
|
+
{ pubkey: accounts.obligation, isSigner: false, isWritable: false },
|
|
35
|
+
{
|
|
36
|
+
pubkey: accounts.lendingMarketAuthority,
|
|
37
|
+
isSigner: false,
|
|
38
|
+
isWritable: true,
|
|
39
|
+
},
|
|
40
|
+
{ pubkey: accounts.reserve, isSigner: false, isWritable: false },
|
|
41
|
+
{ pubkey: accounts.reserveFarmState, isSigner: false, isWritable: true },
|
|
42
|
+
{
|
|
43
|
+
pubkey: accounts.obligationFarmUserState,
|
|
44
|
+
isSigner: false,
|
|
45
|
+
isWritable: true,
|
|
46
|
+
},
|
|
47
|
+
{ pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },
|
|
48
|
+
{ pubkey: accounts.farmsProgram, isSigner: false, isWritable: false },
|
|
49
|
+
{ pubkey: accounts.rent, isSigner: false, isWritable: false },
|
|
50
|
+
{ pubkey: accounts.systemProgram, isSigner: false, isWritable: false },
|
|
51
|
+
];
|
|
52
|
+
const identifier = Buffer.from([140, 144, 253, 21, 10, 74, 248, 3]);
|
|
53
|
+
const buffer = Buffer.alloc(1000);
|
|
54
|
+
const len = exports.layout.encode({
|
|
55
|
+
mode: args.mode,
|
|
56
|
+
}, buffer);
|
|
57
|
+
const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
|
|
58
|
+
const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
|
|
59
|
+
return ix;
|
|
60
|
+
}
|
|
61
|
+
exports.refreshObligationFarmsForReserve = refreshObligationFarmsForReserve;
|
|
62
|
+
//# sourceMappingURL=refreshObligationFarmsForReserve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshObligationFarmsForReserve.js","sourceRoot":"","sources":["../../src/instructions/refreshObligationFarmsForReserve.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgF,CAAC,wDAAwD;AACzI,wDAAyC,CAAC,wDAAwD;AAClG,4CAAyC;AAmB5B,QAAA,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AAEtD,SAAgB,gCAAgC,CAC9C,IAA0C,EAC1C,QAAkD,EAClD,YAAuB,sBAAU;IAEjC,MAAM,IAAI,GAAuB;QAC/B,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;QAC5D,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACnE;YACE,MAAM,EAAE,QAAQ,CAAC,sBAAsB;YACvC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,IAAI;SACjB;QACD,EAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QAChE,EAAE,MAAM,EAAE,QAAQ,CAAC,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QACxE;YACE,MAAM,EAAE,QAAQ,CAAC,uBAAuB;YACxC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,IAAI;SACjB;QACD,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACtE,EAAE,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACrE,EAAE,MAAM,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QAC7D,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;KACvE,CAAA;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAA;IACnE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,GAAG,GAAG,cAAM,CAAC,MAAM,CACvB;QACE,IAAI,EAAE,IAAI,CAAC,IAAI;KAChB,EACD,MAAM,CACP,CAAA;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;IAClE,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AApCD,4EAoCC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TransactionInstruction, PublicKey } from "@solana/web3.js";
|
|
2
|
+
export interface RefreshReserveAccounts {
|
|
3
|
+
reserve: PublicKey;
|
|
4
|
+
lendingMarket: PublicKey;
|
|
5
|
+
pythOracle: PublicKey;
|
|
6
|
+
switchboardPriceOracle: PublicKey;
|
|
7
|
+
switchboardTwapOracle: PublicKey;
|
|
8
|
+
scopePrices: PublicKey;
|
|
9
|
+
}
|
|
10
|
+
export declare function refreshReserve(accounts: RefreshReserveAccounts, programId?: PublicKey): TransactionInstruction;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.refreshReserve = void 0;
|
|
4
|
+
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
5
|
+
const programId_1 = require("../programId");
|
|
6
|
+
function refreshReserve(accounts, programId = programId_1.PROGRAM_ID) {
|
|
7
|
+
const keys = [
|
|
8
|
+
{ pubkey: accounts.reserve, isSigner: false, isWritable: true },
|
|
9
|
+
{ pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },
|
|
10
|
+
{ pubkey: accounts.pythOracle, isSigner: false, isWritable: false },
|
|
11
|
+
{
|
|
12
|
+
pubkey: accounts.switchboardPriceOracle,
|
|
13
|
+
isSigner: false,
|
|
14
|
+
isWritable: false,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
pubkey: accounts.switchboardTwapOracle,
|
|
18
|
+
isSigner: false,
|
|
19
|
+
isWritable: false,
|
|
20
|
+
},
|
|
21
|
+
{ pubkey: accounts.scopePrices, isSigner: false, isWritable: false },
|
|
22
|
+
];
|
|
23
|
+
const identifier = Buffer.from([2, 218, 138, 235, 79, 201, 25, 102]);
|
|
24
|
+
const data = identifier;
|
|
25
|
+
const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
|
|
26
|
+
return ix;
|
|
27
|
+
}
|
|
28
|
+
exports.refreshReserve = refreshReserve;
|
|
29
|
+
//# sourceMappingURL=refreshReserve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshReserve.js","sourceRoot":"","sources":["../../src/instructions/refreshReserve.ts"],"names":[],"mappings":";;;AAAA,6CAAgF,CAAC,wDAAwD;AACzI,4CAAyC;AAWzC,SAAgB,cAAc,CAAC,QAAgC,EAAE,YAAuB,sBAAU;IAChG,MAAM,IAAI,GAAuB;QAC/B,EAAE,MAAM,EAAE,QAAQ,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QAC/D,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACtE,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACnE;YACE,MAAM,EAAE,QAAQ,CAAC,sBAAsB;YACvC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,KAAK;SAClB;QACD;YACE,MAAM,EAAE,QAAQ,CAAC,qBAAqB;YACtC,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,KAAK;SAClB;QACD,EAAE,MAAM,EAAE,QAAQ,CAAC,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;KACrE,CAAA;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,CAAA;IACpE,MAAM,IAAI,GAAG,UAAU,CAAA;IACvB,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AArBD,wCAqBC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TransactionInstruction, PublicKey } from "@solana/web3.js";
|
|
2
|
+
export interface RefreshReservesBatchArgs {
|
|
3
|
+
skipPriceUpdates: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const layout: any;
|
|
6
|
+
export declare function refreshReservesBatch(args: RefreshReservesBatchArgs, programId?: PublicKey): TransactionInstruction;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.refreshReservesBatch = exports.layout = void 0;
|
|
27
|
+
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
28
|
+
const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
29
|
+
const programId_1 = require("../programId");
|
|
30
|
+
exports.layout = borsh.struct([borsh.bool("skipPriceUpdates")]);
|
|
31
|
+
function refreshReservesBatch(args, programId = programId_1.PROGRAM_ID) {
|
|
32
|
+
const keys = [];
|
|
33
|
+
const identifier = Buffer.from([144, 110, 26, 103, 162, 204, 252, 147]);
|
|
34
|
+
const buffer = Buffer.alloc(1000);
|
|
35
|
+
const len = exports.layout.encode({
|
|
36
|
+
skipPriceUpdates: args.skipPriceUpdates,
|
|
37
|
+
}, buffer);
|
|
38
|
+
const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
|
|
39
|
+
const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
|
|
40
|
+
return ix;
|
|
41
|
+
}
|
|
42
|
+
exports.refreshReservesBatch = refreshReservesBatch;
|
|
43
|
+
//# sourceMappingURL=refreshReservesBatch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshReservesBatch.js","sourceRoot":"","sources":["../../src/instructions/refreshReservesBatch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgF,CAAC,wDAAwD;AACzI,wDAAyC,CAAC,wDAAwD;AAClG,4CAAyC;AAM5B,QAAA,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAA;AAEpE,SAAgB,oBAAoB,CAAC,IAA8B,EAAE,YAAuB,sBAAU;IACpG,MAAM,IAAI,GAAuB,EAAE,CAAA;IACnC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;IACvE,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,GAAG,GAAG,cAAM,CAAC,MAAM,CACvB;QACE,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;KACxC,EACD,MAAM,CACP,CAAA;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;IAClE,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AAbD,oDAaC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TransactionInstruction, PublicKey } from "@solana/web3.js";
|
|
2
|
+
import BN from "bn.js";
|
|
3
|
+
export interface RepayObligationLiquidityArgs {
|
|
4
|
+
liquidityAmount: BN;
|
|
5
|
+
}
|
|
6
|
+
export interface RepayObligationLiquidityAccounts {
|
|
7
|
+
owner: PublicKey;
|
|
8
|
+
obligation: PublicKey;
|
|
9
|
+
lendingMarket: PublicKey;
|
|
10
|
+
repayReserve: PublicKey;
|
|
11
|
+
reserveLiquidityMint: PublicKey;
|
|
12
|
+
reserveDestinationLiquidity: PublicKey;
|
|
13
|
+
userSourceLiquidity: PublicKey;
|
|
14
|
+
tokenProgram: PublicKey;
|
|
15
|
+
instructionSysvarAccount: PublicKey;
|
|
16
|
+
}
|
|
17
|
+
export declare const layout: any;
|
|
18
|
+
export declare function repayObligationLiquidity(args: RepayObligationLiquidityArgs, accounts: RepayObligationLiquidityAccounts, programId?: PublicKey): TransactionInstruction;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.repayObligationLiquidity = exports.layout = void 0;
|
|
27
|
+
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
28
|
+
const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
29
|
+
const programId_1 = require("../programId");
|
|
30
|
+
exports.layout = borsh.struct([borsh.u64("liquidityAmount")]);
|
|
31
|
+
function repayObligationLiquidity(args, accounts, programId = programId_1.PROGRAM_ID) {
|
|
32
|
+
const keys = [
|
|
33
|
+
{ pubkey: accounts.owner, isSigner: true, isWritable: false },
|
|
34
|
+
{ pubkey: accounts.obligation, isSigner: false, isWritable: true },
|
|
35
|
+
{ pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },
|
|
36
|
+
{ pubkey: accounts.repayReserve, isSigner: false, isWritable: true },
|
|
37
|
+
{
|
|
38
|
+
pubkey: accounts.reserveLiquidityMint,
|
|
39
|
+
isSigner: false,
|
|
40
|
+
isWritable: true,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
pubkey: accounts.reserveDestinationLiquidity,
|
|
44
|
+
isSigner: false,
|
|
45
|
+
isWritable: true,
|
|
46
|
+
},
|
|
47
|
+
{ pubkey: accounts.userSourceLiquidity, isSigner: false, isWritable: true },
|
|
48
|
+
{ pubkey: accounts.tokenProgram, isSigner: false, isWritable: false },
|
|
49
|
+
{
|
|
50
|
+
pubkey: accounts.instructionSysvarAccount,
|
|
51
|
+
isSigner: false,
|
|
52
|
+
isWritable: false,
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
const identifier = Buffer.from([145, 178, 13, 225, 76, 240, 147, 72]);
|
|
56
|
+
const buffer = Buffer.alloc(1000);
|
|
57
|
+
const len = exports.layout.encode({
|
|
58
|
+
liquidityAmount: args.liquidityAmount,
|
|
59
|
+
}, buffer);
|
|
60
|
+
const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
|
|
61
|
+
const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
|
|
62
|
+
return ix;
|
|
63
|
+
}
|
|
64
|
+
exports.repayObligationLiquidity = repayObligationLiquidity;
|
|
65
|
+
//# sourceMappingURL=repayObligationLiquidity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repayObligationLiquidity.js","sourceRoot":"","sources":["../../src/instructions/repayObligationLiquidity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgF,CAAC,wDAAwD;AAEzI,wDAAyC,CAAC,wDAAwD;AAClG,4CAAyC;AAkB5B,QAAA,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAA;AAElE,SAAgB,wBAAwB,CACtC,IAAkC,EAClC,QAA0C,EAC1C,YAAuB,sBAAU;IAEjC,MAAM,IAAI,GAAuB;QAC/B,EAAE,MAAM,EAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;QAC7D,EAAE,MAAM,EAAE,QAAQ,CAAC,UAAU,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C,CAAA;IAClE,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AAvCD,4DAuCC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TransactionInstruction, PublicKey } from "@solana/web3.js";
|
|
2
|
+
import BN from "bn.js";
|
|
3
|
+
export interface RepayObligationLiquidityV2Args {
|
|
4
|
+
liquidityAmount: BN;
|
|
5
|
+
}
|
|
6
|
+
export interface RepayObligationLiquidityV2Accounts {
|
|
7
|
+
repayAccounts: {
|
|
8
|
+
owner: PublicKey;
|
|
9
|
+
obligation: PublicKey;
|
|
10
|
+
lendingMarket: PublicKey;
|
|
11
|
+
repayReserve: PublicKey;
|
|
12
|
+
reserveLiquidityMint: PublicKey;
|
|
13
|
+
reserveDestinationLiquidity: PublicKey;
|
|
14
|
+
userSourceLiquidity: PublicKey;
|
|
15
|
+
tokenProgram: PublicKey;
|
|
16
|
+
instructionSysvarAccount: PublicKey;
|
|
17
|
+
};
|
|
18
|
+
farmsAccounts: {
|
|
19
|
+
obligationFarmUserState?: PublicKey | null;
|
|
20
|
+
reserveFarmState?: PublicKey | null;
|
|
21
|
+
};
|
|
22
|
+
lendingMarketAuthority: PublicKey;
|
|
23
|
+
farmsProgram: PublicKey;
|
|
24
|
+
}
|
|
25
|
+
export declare const layout: any;
|
|
26
|
+
export declare function repayObligationLiquidityV2(args: RepayObligationLiquidityV2Args, accounts: RepayObligationLiquidityV2Accounts, programId?: PublicKey): TransactionInstruction;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.repayObligationLiquidityV2 = exports.layout = void 0;
|
|
27
|
+
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
28
|
+
const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
29
|
+
const programId_1 = require("../programId");
|
|
30
|
+
exports.layout = borsh.struct([borsh.u64("liquidityAmount")]);
|
|
31
|
+
function optionalAccountMeta(pubkey, isWritable, programId) {
|
|
32
|
+
return {
|
|
33
|
+
pubkey: pubkey ?? programId,
|
|
34
|
+
isSigner: false,
|
|
35
|
+
isWritable,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function repayObligationLiquidityV2(args, accounts, programId = programId_1.PROGRAM_ID) {
|
|
39
|
+
const keys = [
|
|
40
|
+
{ pubkey: accounts.repayAccounts.owner, isSigner: true, isWritable: false },
|
|
41
|
+
{ pubkey: accounts.repayAccounts.obligation, isSigner: false, isWritable: true },
|
|
42
|
+
{ pubkey: accounts.repayAccounts.lendingMarket, isSigner: false, isWritable: false },
|
|
43
|
+
{ pubkey: accounts.repayAccounts.repayReserve, isSigner: false, isWritable: true },
|
|
44
|
+
{
|
|
45
|
+
pubkey: accounts.repayAccounts.reserveLiquidityMint,
|
|
46
|
+
isSigner: false,
|
|
47
|
+
isWritable: false,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
pubkey: accounts.repayAccounts.reserveDestinationLiquidity,
|
|
51
|
+
isSigner: false,
|
|
52
|
+
isWritable: true,
|
|
53
|
+
},
|
|
54
|
+
{ pubkey: accounts.repayAccounts.userSourceLiquidity, isSigner: false, isWritable: true },
|
|
55
|
+
{ pubkey: accounts.repayAccounts.tokenProgram, isSigner: false, isWritable: false },
|
|
56
|
+
{
|
|
57
|
+
pubkey: accounts.repayAccounts.instructionSysvarAccount,
|
|
58
|
+
isSigner: false,
|
|
59
|
+
isWritable: false,
|
|
60
|
+
},
|
|
61
|
+
optionalAccountMeta(accounts.farmsAccounts.obligationFarmUserState, true, programId),
|
|
62
|
+
optionalAccountMeta(accounts.farmsAccounts.reserveFarmState, true, programId),
|
|
63
|
+
{ pubkey: accounts.lendingMarketAuthority, isSigner: false, isWritable: false },
|
|
64
|
+
{ pubkey: accounts.farmsProgram, isSigner: false, isWritable: false },
|
|
65
|
+
];
|
|
66
|
+
const identifier = Buffer.from([116, 174, 213, 76, 180, 53, 210, 144]);
|
|
67
|
+
const buffer = Buffer.alloc(1000);
|
|
68
|
+
const len = exports.layout.encode({
|
|
69
|
+
liquidityAmount: args.liquidityAmount,
|
|
70
|
+
}, buffer);
|
|
71
|
+
const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
|
|
72
|
+
const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
|
|
73
|
+
return ix;
|
|
74
|
+
}
|
|
75
|
+
exports.repayObligationLiquidityV2 = repayObligationLiquidityV2;
|
|
76
|
+
//# sourceMappingURL=repayObligationLiquidityV2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repayObligationLiquidityV2.js","sourceRoot":"","sources":["../../src/instructions/repayObligationLiquidityV2.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAgF,CAAC,wDAAwD;AAEzI,wDAAyC,CAAC,wDAAwD;AAClG,4CAAyC;AA0B5B,QAAA,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAA;AAElE,SAAS,mBAAmB,CAC1B,MAAoC,EACpC,UAAmB,EACnB,SAAoB;IAEpB,OAAO;QACL,MAAM,EAAE,MAAM,IAAI,SAAS;QAC3B,QAAQ,EAAE,KAAK;QACf,UAAU;KACX,CAAA;AACH,CAAC;AAED,SAAgB,0BAA0B,CACxC,IAAoC,EACpC,QAA4C,EAC5C,YAAuB,sBAAU;IAEjC,MAAM,IAAI,GAAuB;QAC/B,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;QAC3E,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QAChF,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE;QACpF,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;QAClF;YACE,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,oBAAoB;YACnD,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,KAAK;SAClB;QACD;YACE,MAAM,EAAE,QAAQ,C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C,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;IAClE,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AA3CD,gEA2CC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TransactionInstruction, PublicKey } from "@solana/web3.js";
|
|
2
|
+
export interface RequestElevationGroupArgs {
|
|
3
|
+
elevationGroup: number;
|
|
4
|
+
}
|
|
5
|
+
export interface RequestElevationGroupAccounts {
|
|
6
|
+
owner: PublicKey;
|
|
7
|
+
obligation: PublicKey;
|
|
8
|
+
lendingMarket: PublicKey;
|
|
9
|
+
}
|
|
10
|
+
export declare const layout: any;
|
|
11
|
+
export declare function requestElevationGroup(args: RequestElevationGroupArgs, accounts: RequestElevationGroupAccounts, programId?: PublicKey): TransactionInstruction;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.requestElevationGroup = exports.layout = void 0;
|
|
27
|
+
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
28
|
+
const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
29
|
+
const programId_1 = require("../programId");
|
|
30
|
+
exports.layout = borsh.struct([borsh.u8("elevationGroup")]);
|
|
31
|
+
function requestElevationGroup(args, accounts, programId = programId_1.PROGRAM_ID) {
|
|
32
|
+
const keys = [
|
|
33
|
+
{ pubkey: accounts.owner, isSigner: true, isWritable: false },
|
|
34
|
+
{ pubkey: accounts.obligation, isSigner: false, isWritable: true },
|
|
35
|
+
{ pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },
|
|
36
|
+
];
|
|
37
|
+
const identifier = Buffer.from([36, 119, 251, 129, 34, 240, 7, 147]);
|
|
38
|
+
const buffer = Buffer.alloc(1000);
|
|
39
|
+
const len = exports.layout.encode({
|
|
40
|
+
elevationGroup: args.elevationGroup,
|
|
41
|
+
}, buffer);
|
|
42
|
+
const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
|
|
43
|
+
const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
|
|
44
|
+
return ix;
|
|
45
|
+
}
|
|
46
|
+
exports.requestElevationGroup = requestElevationGroup;
|
|
47
|
+
//# sourceMappingURL=requestElevationGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestElevationGroup.js","sourceRoot":"","sources":["../../src/instructions/requestElevationGroup.ts"],"names":[],"mappings":";;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AC;AArBD,sDAqBC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TransactionInstruction, PublicKey } from "@solana/web3.js";
|
|
2
|
+
import BN from "bn.js";
|
|
3
|
+
export interface SocializeLossArgs {
|
|
4
|
+
liquidityAmount: BN;
|
|
5
|
+
}
|
|
6
|
+
export interface SocializeLossAccounts {
|
|
7
|
+
riskCouncil: PublicKey;
|
|
8
|
+
obligation: PublicKey;
|
|
9
|
+
lendingMarket: PublicKey;
|
|
10
|
+
reserve: PublicKey;
|
|
11
|
+
instructionSysvarAccount: PublicKey;
|
|
12
|
+
}
|
|
13
|
+
export declare const layout: any;
|
|
14
|
+
export declare function socializeLoss(args: SocializeLossArgs, accounts: SocializeLossAccounts, programId?: PublicKey): TransactionInstruction;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.socializeLoss = exports.layout = void 0;
|
|
27
|
+
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
28
|
+
const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
29
|
+
const programId_1 = require("../programId");
|
|
30
|
+
exports.layout = borsh.struct([borsh.u64("liquidityAmount")]);
|
|
31
|
+
function socializeLoss(args, accounts, programId = programId_1.PROGRAM_ID) {
|
|
32
|
+
const keys = [
|
|
33
|
+
{ pubkey: accounts.riskCouncil, isSigner: true, isWritable: false },
|
|
34
|
+
{ pubkey: accounts.obligation, isSigner: false, isWritable: true },
|
|
35
|
+
{ pubkey: accounts.lendingMarket, isSigner: false, isWritable: false },
|
|
36
|
+
{ pubkey: accounts.reserve, isSigner: false, isWritable: true },
|
|
37
|
+
{
|
|
38
|
+
pubkey: accounts.instructionSysvarAccount,
|
|
39
|
+
isSigner: false,
|
|
40
|
+
isWritable: false,
|
|
41
|
+
},
|
|
42
|
+
];
|
|
43
|
+
const identifier = Buffer.from([245, 75, 91, 0, 236, 97, 19, 3]);
|
|
44
|
+
const buffer = Buffer.alloc(1000);
|
|
45
|
+
const len = exports.layout.encode({
|
|
46
|
+
liquidityAmount: args.liquidityAmount,
|
|
47
|
+
}, buffer);
|
|
48
|
+
const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
|
|
49
|
+
const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
|
|
50
|
+
return ix;
|
|
51
|
+
}
|
|
52
|
+
exports.socializeLoss = socializeLoss;
|
|
53
|
+
//# sourceMappingURL=socializeLoss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"socializeLoss.js","sourceR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AAC,MAAM,CAAC,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;IAClE,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AA3BD,sCA2BC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TransactionInstruction, PublicKey } from "@solana/web3.js";
|
|
2
|
+
import BN from "bn.js";
|
|
3
|
+
export interface UpdateLendingMarketArgs {
|
|
4
|
+
mode: BN;
|
|
5
|
+
value: Array<number>;
|
|
6
|
+
}
|
|
7
|
+
export interface UpdateLendingMarketAccounts {
|
|
8
|
+
lendingMarketOwner: PublicKey;
|
|
9
|
+
lendingMarket: PublicKey;
|
|
10
|
+
}
|
|
11
|
+
export declare const layout: any;
|
|
12
|
+
export declare function updateLendingMarket(args: UpdateLendingMarketArgs, accounts: UpdateLendingMarketAccounts, programId?: PublicKey): TransactionInstruction;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.updateLendingMarket = exports.layout = void 0;
|
|
27
|
+
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
28
|
+
const borsh = __importStar(require("@coral-xyz/borsh")); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
29
|
+
const programId_1 = require("../programId");
|
|
30
|
+
exports.layout = borsh.struct([borsh.u64("mode"), borsh.array(borsh.u8(), 72, "value")]);
|
|
31
|
+
function updateLendingMarket(args, accounts, programId = programId_1.PROGRAM_ID) {
|
|
32
|
+
const keys = [
|
|
33
|
+
{ pubkey: accounts.lendingMarketOwner, isSigner: true, isWritable: false },
|
|
34
|
+
{ pubkey: accounts.lendingMarket, isSigner: false, isWritable: true },
|
|
35
|
+
];
|
|
36
|
+
const identifier = Buffer.from([209, 157, 53, 210, 97, 180, 31, 45]);
|
|
37
|
+
const buffer = Buffer.alloc(1000);
|
|
38
|
+
const len = exports.layout.encode({
|
|
39
|
+
mode: args.mode,
|
|
40
|
+
value: args.value,
|
|
41
|
+
}, buffer);
|
|
42
|
+
const data = Buffer.concat([identifier, buffer]).slice(0, 8 + len);
|
|
43
|
+
const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
|
|
44
|
+
return ix;
|
|
45
|
+
}
|
|
46
|
+
exports.updateLendingMarket = updateLendingMarket;
|
|
47
|
+
//# sourceMappingURL=updateLendingMarket.js.map
|
|
@@ -0,0 +1 @@
|
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E,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AArBD,kDAqBC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TransactionInstruction, PublicKey } from "@solana/web3.js";
|
|
2
|
+
export interface UpdateLendingMarketOwnerAccounts {
|
|
3
|
+
lendingMarketOwnerCached: PublicKey;
|
|
4
|
+
lendingMarket: PublicKey;
|
|
5
|
+
}
|
|
6
|
+
export declare function updateLendingMarketOwner(accounts: UpdateLendingMarketOwnerAccounts, programId?: PublicKey): TransactionInstruction;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateLendingMarketOwner = void 0;
|
|
4
|
+
const web3_js_1 = require("@solana/web3.js"); // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
5
|
+
const programId_1 = require("../programId");
|
|
6
|
+
function updateLendingMarketOwner(accounts, programId = programId_1.PROGRAM_ID) {
|
|
7
|
+
const keys = [
|
|
8
|
+
{
|
|
9
|
+
pubkey: accounts.lendingMarketOwnerCached,
|
|
10
|
+
isSigner: true,
|
|
11
|
+
isWritable: false,
|
|
12
|
+
},
|
|
13
|
+
{ pubkey: accounts.lendingMarket, isSigner: false, isWritable: true },
|
|
14
|
+
];
|
|
15
|
+
const identifier = Buffer.from([118, 224, 10, 62, 196, 230, 184, 89]);
|
|
16
|
+
const data = identifier;
|
|
17
|
+
const ix = new web3_js_1.TransactionInstruction({ keys, programId, data });
|
|
18
|
+
return ix;
|
|
19
|
+
}
|
|
20
|
+
exports.updateLendingMarketOwner = updateLendingMarketOwner;
|
|
21
|
+
//# sourceMappingURL=updateLendingMarketOwner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateLendingMarketOwner.js","sourceRoot":"","sources":["../../src/instructions/updateLendingMarketOwner.ts"],"names":[],"mappings":";;;AAAA,6CAAgF,CAAC,wDAAwD;AACzI,4CAAyC;AAOzC,SAAgB,wBAAwB,CACtC,QAA0C,EAC1C,YAAuB,sBAAU;IAEjC,MAAM,IAAI,GAAuB;QAC/B;YACE,MAAM,EAAE,QAAQ,CAAC,wBAAwB;YACzC,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;SAClB;QACD,EAAE,MAAM,EAAE,QAAQ,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE;KACtE,CAAA;IACD,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,CAAA;IACrE,MAAM,IAAI,GAAG,UAAU,CAAA;IACvB,MAAM,EAAE,GAAG,IAAI,gCAAsB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,OAAO,EAAE,CAAA;AACX,CAAC;AAhBD,4DAgBC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TransactionInstruction, PublicKey } from "@solana/web3.js";
|
|
2
|
+
import BN from "bn.js";
|
|
3
|
+
export interface UpdateReserveConfigArgs {
|
|
4
|
+
mode: BN;
|
|
5
|
+
value: Uint8Array;
|
|
6
|
+
skipValidation: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface UpdateReserveConfigAccounts {
|
|
9
|
+
lendingMarketOwner: PublicKey;
|
|
10
|
+
lendingMarket: PublicKey;
|
|
11
|
+
reserve: PublicKey;
|
|
12
|
+
}
|
|
13
|
+
export declare const layout: any;
|
|
14
|
+
export declare function updateReserveConfig(args: UpdateReserveConfigArgs, accounts: UpdateReserveConfigAccounts, programId?: PublicKey): TransactionInstruction;
|