@pyron-finance/pyron-client 2.2.1 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/index.d.cts +1 -1
- package/dist/common/index.d.ts +1 -1
- package/dist/{index-CTxjLBXu.d.ts → index-B6qFming.d.ts} +11 -9
- package/dist/index-B6qFming.d.ts.map +1 -0
- package/dist/{index-BN-9mNNA.d.cts → index-B80wOp3i.d.cts} +10 -8
- package/dist/index-B80wOp3i.d.cts.map +1 -0
- package/dist/index.cjs +78 -23
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +78 -23
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/index-BN-9mNNA.d.cts.map +0 -1
- package/dist/index-CTxjLBXu.d.ts.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -10,6 +10,7 @@ const bn_js = require_common.__toESM(require("bn.js"));
|
|
|
10
10
|
const __metaplex_foundation_mpl_token_metadata = require_common.__toESM(require("@metaplex-foundation/mpl-token-metadata"));
|
|
11
11
|
const __metaplex_foundation_umi = require_common.__toESM(require("@metaplex-foundation/umi"));
|
|
12
12
|
const __metaplex_foundation_umi_bundle_defaults = require_common.__toESM(require("@metaplex-foundation/umi-bundle-defaults"));
|
|
13
|
+
const __fogo_sessions_sdk = require_common.__toESM(require("@fogo/sessions-sdk"));
|
|
13
14
|
const borsh = require_common.__toESM(require("borsh"));
|
|
14
15
|
const __coral_xyz_borsh = require_common.__toESM(require("@coral-xyz/borsh"));
|
|
15
16
|
const big_js = require_common.__toESM(require("big.js"));
|
|
@@ -22248,6 +22249,38 @@ var BankConfig = class BankConfig {
|
|
|
22248
22249
|
|
|
22249
22250
|
//#endregion
|
|
22250
22251
|
//#region src/models/account/pure.ts
|
|
22252
|
+
/**
|
|
22253
|
+
* Creates session-aware wrap instructions for SOL.
|
|
22254
|
+
* Uses the session SDK's wrap instruction builders to create instructions
|
|
22255
|
+
* that work with Fogo Sessions.
|
|
22256
|
+
*
|
|
22257
|
+
* Note: The amount transferred must include rent-exempt amount if the account is new.
|
|
22258
|
+
* Standard rent-exempt amount for a token account is ~2,039,280 lamports.
|
|
22259
|
+
* We add this as a safety margin when the amount is small, as we can't know if the account exists.
|
|
22260
|
+
*/
|
|
22261
|
+
function makeSessionWrapSolIxs(walletAddress, sessionKey, payer, amount, existingBalance) {
|
|
22262
|
+
const nativeAmount = require_common.uiToNative(amount, 9).toNumber();
|
|
22263
|
+
const TOKEN_ACCOUNT_RENT_EXEMPT = 2039280;
|
|
22264
|
+
const existingBalanceNative = existingBalance ? require_common.uiToNative(existingBalance, 9).toNumber() : 0;
|
|
22265
|
+
let totalAmount = nativeAmount;
|
|
22266
|
+
if (existingBalanceNative < TOKEN_ACCOUNT_RENT_EXEMPT) {
|
|
22267
|
+
const rentNeeded = Math.max(0, TOKEN_ACCOUNT_RENT_EXEMPT - existingBalanceNative);
|
|
22268
|
+
totalAmount = nativeAmount + rentNeeded;
|
|
22269
|
+
} else {
|
|
22270
|
+
totalAmount = nativeAmount + 1e4;
|
|
22271
|
+
}
|
|
22272
|
+
return (0, __fogo_sessions_sdk.createSessionWrapInstructions)(sessionKey, walletAddress, BigInt(totalAmount));
|
|
22273
|
+
}
|
|
22274
|
+
/**
|
|
22275
|
+
* Creates a session-aware unwrap instruction for SOL.
|
|
22276
|
+
* Uses the session SDK's unwrap instruction builder to create an instruction
|
|
22277
|
+
* that works with Fogo Sessions.
|
|
22278
|
+
*
|
|
22279
|
+
* Note: createSessionUnwrapInstruction signature: (sessionKey, walletPublicKey)
|
|
22280
|
+
*/
|
|
22281
|
+
function makeSessionUnwrapSolIx(walletAddress, sessionKey, payer) {
|
|
22282
|
+
return (0, __fogo_sessions_sdk.createSessionUnwrapInstruction)(sessionKey, walletAddress);
|
|
22283
|
+
}
|
|
22251
22284
|
var LendrAccount = class LendrAccount {
|
|
22252
22285
|
constructor(address$2, group, authority, balances, accountFlags, emissionsDestinationAccount, healthCache) {
|
|
22253
22286
|
this.address = address$2;
|
|
@@ -22661,10 +22694,15 @@ var LendrAccount = class LendrAccount {
|
|
|
22661
22694
|
keys: []
|
|
22662
22695
|
};
|
|
22663
22696
|
}
|
|
22664
|
-
async makeDepositWithSessionIx(program, banks, mintDatas, amount, bankAddress,
|
|
22665
|
-
const
|
|
22697
|
+
async makeDepositWithSessionIx(program, banks, mintDatas, amount, bankAddress, session, opts = {}) {
|
|
22698
|
+
const bank = banks.get(bankAddress.toBase58());
|
|
22699
|
+
if (!bank) throw Error(`Bank ${bankAddress.toBase58()} not found`);
|
|
22700
|
+
const { depositIxs, ixArguments, userTokenAtaPk, mintData, remainingAccounts } = await this.prepareDepositIx(banks, mintDatas, amount, bankAddress, {
|
|
22701
|
+
...opts,
|
|
22702
|
+
wrapAndUnwrapSol: false
|
|
22703
|
+
});
|
|
22666
22704
|
const accounts$2 = {
|
|
22667
|
-
sessionKey,
|
|
22705
|
+
sessionKey: session.sessionPublicKey,
|
|
22668
22706
|
lendrAccount: this.address,
|
|
22669
22707
|
bank: bankAddress,
|
|
22670
22708
|
signerTokenAccount: userTokenAtaPk,
|
|
@@ -22673,6 +22711,12 @@ var LendrAccount = class LendrAccount {
|
|
|
22673
22711
|
liquidityVault: opts.overrideInferAccounts?.liquidityVault
|
|
22674
22712
|
};
|
|
22675
22713
|
const depositIx = await instructions_default.makeDepositWithSessionIx(program, accounts$2, ixArguments, remainingAccounts);
|
|
22714
|
+
if (bank.mint.equals(__solana_spl_token.NATIVE_MINT)) {
|
|
22715
|
+
const wSolBalanceUi = opts.wSolBalanceUi ?? 0;
|
|
22716
|
+
const wrapAmount = new bignumber_js.default(amount).minus(wSolBalanceUi);
|
|
22717
|
+
const wrapIxs = makeSessionWrapSolIxs(session.walletPublicKey, session.sessionPublicKey, session.payer, wrapAmount, wSolBalanceUi);
|
|
22718
|
+
depositIxs.push(...wrapIxs);
|
|
22719
|
+
}
|
|
22676
22720
|
depositIxs.push(depositIx);
|
|
22677
22721
|
return {
|
|
22678
22722
|
instructions: depositIxs,
|
|
@@ -22742,10 +22786,15 @@ var LendrAccount = class LendrAccount {
|
|
|
22742
22786
|
keys: []
|
|
22743
22787
|
};
|
|
22744
22788
|
}
|
|
22745
|
-
async makeRepayWithSessionIx(program, banks, mintDatas, amount, bankAddress,
|
|
22746
|
-
const
|
|
22789
|
+
async makeRepayWithSessionIx(program, banks, mintDatas, amount, bankAddress, session, repayAll = false, opts = {}) {
|
|
22790
|
+
const bank = banks.get(bankAddress.toBase58());
|
|
22791
|
+
if (!bank) throw Error(`Bank ${bankAddress.toBase58()} not found`);
|
|
22792
|
+
const { repayIxs, ixArguments, userAta, mintData, remainingAccounts } = await this.prepareRepayInstruction(program, banks, mintDatas, amount, bankAddress, repayAll, {
|
|
22793
|
+
...opts,
|
|
22794
|
+
wrapAndUnwrapSol: false
|
|
22795
|
+
});
|
|
22747
22796
|
const repayIx = await instructions_default.makeRepayWithSessionIx(program, {
|
|
22748
|
-
sessionKey,
|
|
22797
|
+
sessionKey: session.sessionPublicKey,
|
|
22749
22798
|
lendrAccount: this.address,
|
|
22750
22799
|
signerTokenAccount: userAta,
|
|
22751
22800
|
bank: bankAddress,
|
|
@@ -22757,6 +22806,12 @@ var LendrAccount = class LendrAccount {
|
|
|
22757
22806
|
isSigner: false,
|
|
22758
22807
|
isWritable: false
|
|
22759
22808
|
})));
|
|
22809
|
+
if (bank.mint.equals(__solana_spl_token.NATIVE_MINT)) {
|
|
22810
|
+
const wSolBalanceUi = opts.wSolBalanceUi ?? 0;
|
|
22811
|
+
const wrapAmount = new bignumber_js.default(amount).minus(wSolBalanceUi);
|
|
22812
|
+
const wrapIxs = makeSessionWrapSolIxs(session.walletPublicKey, session.sessionPublicKey, session.payer, wrapAmount, wSolBalanceUi);
|
|
22813
|
+
repayIxs.push(...wrapIxs);
|
|
22814
|
+
}
|
|
22760
22815
|
repayIxs.push(repayIx);
|
|
22761
22816
|
return {
|
|
22762
22817
|
instructions: repayIxs,
|
|
@@ -22860,7 +22915,7 @@ var LendrAccount = class LendrAccount {
|
|
|
22860
22915
|
}, remainingAccounts);
|
|
22861
22916
|
withdrawIxs.push(withdrawIx);
|
|
22862
22917
|
if (wrapAndUnwrapSol && bank.mint.equals(__solana_spl_token.NATIVE_MINT)) {
|
|
22863
|
-
withdrawIxs.push(
|
|
22918
|
+
withdrawIxs.push(makeSessionUnwrapSolIx(session.walletPublicKey, session.sessionPublicKey, session.payer));
|
|
22864
22919
|
}
|
|
22865
22920
|
return {
|
|
22866
22921
|
instructions: withdrawIxs,
|
|
@@ -22941,7 +22996,7 @@ var LendrAccount = class LendrAccount {
|
|
|
22941
22996
|
}, { amount: require_common.uiToNative(amount, bank.mintDecimals) }, remainingAccounts);
|
|
22942
22997
|
borrowIxs.push(borrowIx);
|
|
22943
22998
|
if (bank.mint.equals(__solana_spl_token.NATIVE_MINT) && wrapAndUnwrapSol) {
|
|
22944
|
-
borrowIxs.push(
|
|
22999
|
+
borrowIxs.push(makeSessionUnwrapSolIx(session.walletPublicKey, session.sessionPublicKey, session.payer));
|
|
22945
23000
|
}
|
|
22946
23001
|
return {
|
|
22947
23002
|
instructions: borrowIxs,
|
|
@@ -23704,8 +23759,8 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
23704
23759
|
async makeDepositIx(amount, bankAddress, depositOpts = {}) {
|
|
23705
23760
|
return this._lendrAccount.makeDepositIx(this._program, this.client.banks, this.client.mintDatas, amount, bankAddress, depositOpts);
|
|
23706
23761
|
}
|
|
23707
|
-
async makeDepositWithSessionIx(amount, bankAddress,
|
|
23708
|
-
return this._lendrAccount.makeDepositWithSessionIx(this._program, this.client.banks, this.client.mintDatas, amount, bankAddress,
|
|
23762
|
+
async makeDepositWithSessionIx(amount, bankAddress, session, depositOpts = {}) {
|
|
23763
|
+
return this._lendrAccount.makeDepositWithSessionIx(this._program, this.client.banks, this.client.mintDatas, amount, bankAddress, session, depositOpts);
|
|
23709
23764
|
}
|
|
23710
23765
|
/**
|
|
23711
23766
|
* Creates a transaction for depositing native stake into a lendr staked asset bank account.
|
|
@@ -23839,8 +23894,8 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
23839
23894
|
bankAddress: bankAddress.toBase58(),
|
|
23840
23895
|
sessionKey: session.sessionPublicKey
|
|
23841
23896
|
}, "[lendr:lendr-account:depositWithSession] Depositing into lendr account, using sessions.");
|
|
23842
|
-
const { instructions: instructions$3 } = await this.makeDepositWithSessionTx(amount, bankAddress, session
|
|
23843
|
-
const txResult = await session.sendTransaction(instructions$3);
|
|
23897
|
+
const { instructions: instructions$3 } = await this.makeDepositWithSessionTx(amount, bankAddress, session, depositOpts);
|
|
23898
|
+
const txResult = await session.sendTransaction(instructions$3, { variation: "LendingAccountDeposit" });
|
|
23844
23899
|
this.client.logger.debug({
|
|
23845
23900
|
address: this.address.toBase58(),
|
|
23846
23901
|
txResult
|
|
@@ -23866,8 +23921,8 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
23866
23921
|
});
|
|
23867
23922
|
return solanaTx;
|
|
23868
23923
|
}
|
|
23869
|
-
async makeDepositWithSessionTx(amount, bankAddress,
|
|
23870
|
-
const ixs = await this.makeDepositWithSessionIx(amount, bankAddress,
|
|
23924
|
+
async makeDepositWithSessionTx(amount, bankAddress, session, depositOpts = {}) {
|
|
23925
|
+
const ixs = await this.makeDepositWithSessionIx(amount, bankAddress, session, depositOpts);
|
|
23871
23926
|
const tx = new __solana_web3_js.Transaction().add(...ixs.instructions);
|
|
23872
23927
|
const clientLookupTables = await getClientAddressLookupTableAccounts(this.client);
|
|
23873
23928
|
const solanaTx = require_common.addTransactionMetadata(tx, {
|
|
@@ -23959,10 +24014,10 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
23959
24014
|
* @returns An InstructionsWrapper containing the deposit instructions
|
|
23960
24015
|
* @throws Will throw an error if the repay mint is not found
|
|
23961
24016
|
*/
|
|
23962
|
-
async makeRepayWithSessionIx(amount, bankAddress,
|
|
24017
|
+
async makeRepayWithSessionIx(amount, bankAddress, session, repayAll = false, repayOpts = {}) {
|
|
23963
24018
|
const tokenProgramAddress = this.client.mintDatas.get(bankAddress.toBase58())?.tokenProgram;
|
|
23964
24019
|
if (!tokenProgramAddress) throw Error("Repay mint not found");
|
|
23965
|
-
return this._lendrAccount.makeRepayWithSessionIx(this._program, this.client.banks, this.client.mintDatas, amount, bankAddress,
|
|
24020
|
+
return this._lendrAccount.makeRepayWithSessionIx(this._program, this.client.banks, this.client.mintDatas, amount, bankAddress, session, repayAll, repayOpts);
|
|
23966
24021
|
}
|
|
23967
24022
|
/**
|
|
23968
24023
|
* Repays a loan in a lendr bank account.
|
|
@@ -24008,8 +24063,8 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
24008
24063
|
bankAddress,
|
|
24009
24064
|
repayAll
|
|
24010
24065
|
}, "[lendr:lendr-account:repayWithSession] Repaying into lendr account");
|
|
24011
|
-
const tx = await this.makeRepayWithSessionTx(amount, bankAddress, session
|
|
24012
|
-
const result = await session.sendTransaction(tx.instructions);
|
|
24066
|
+
const tx = await this.makeRepayWithSessionTx(amount, bankAddress, session, repayAll, repayOpts);
|
|
24067
|
+
const result = await session.sendTransaction(tx.instructions, { variation: "LendingAccountRepay" });
|
|
24013
24068
|
this.client.logger.debug({
|
|
24014
24069
|
address: this.address.toBase58(),
|
|
24015
24070
|
result
|
|
@@ -24045,8 +24100,8 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
24045
24100
|
* @param repayOpts - Optional parameters for the repay instruction
|
|
24046
24101
|
* @returns A transaction object containing the repay instructions
|
|
24047
24102
|
*/
|
|
24048
|
-
async makeRepayWithSessionTx(amount, bankAddress,
|
|
24049
|
-
const ixs = await this.makeRepayWithSessionIx(amount, bankAddress,
|
|
24103
|
+
async makeRepayWithSessionTx(amount, bankAddress, session, repayAll = false, repayOpts = {}) {
|
|
24104
|
+
const ixs = await this.makeRepayWithSessionIx(amount, bankAddress, session, repayAll, repayOpts);
|
|
24050
24105
|
const tx = new __solana_web3_js.Transaction().add(...ixs.instructions);
|
|
24051
24106
|
const clientLookupTables = await getClientAddressLookupTableAccounts(this.client);
|
|
24052
24107
|
const solanaTx = require_common.addTransactionMetadata(tx, {
|
|
@@ -24239,7 +24294,7 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
24239
24294
|
sessionKey: session.sessionPublicKey
|
|
24240
24295
|
}, "[lendr:lendr-account:withdrawWithSession] Withdrawing from lendr account");
|
|
24241
24296
|
const { instructions: instructions$3 } = await this.makeWithdrawWithSessionTx(amount, bankAddress, session, withdrawAll, withdrawOpts);
|
|
24242
|
-
const txResult = await session.sendTransaction(instructions$3);
|
|
24297
|
+
const txResult = await session.sendTransaction(instructions$3, { variation: "LendingAccountWithdraw" });
|
|
24243
24298
|
this.client.logger.debug({
|
|
24244
24299
|
address: this.address.toBase58(),
|
|
24245
24300
|
txResult
|
|
@@ -24402,7 +24457,7 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
24402
24457
|
sessionKey: session.sessionPublicKey
|
|
24403
24458
|
}, "[lendr:lendr-account:borrowWithSession] Borrowing from lendr account");
|
|
24404
24459
|
const { instructions: instructions$3 } = await this.makeBorrowWithSessionTx(amount, bankAddress, session, borrowOpts);
|
|
24405
|
-
const txResult = await session.sendTransaction(instructions$3);
|
|
24460
|
+
const txResult = await session.sendTransaction(instructions$3, { variation: "LendingAccountBorrow" });
|
|
24406
24461
|
this.client.logger.debug({
|
|
24407
24462
|
address: this.address.toBase58(),
|
|
24408
24463
|
txResult
|
|
@@ -25480,7 +25535,7 @@ var LendrClient = class LendrClient {
|
|
|
25480
25535
|
*/
|
|
25481
25536
|
async createLendrAccountWithSession(session, commitment, accountIndex = 0, thirdPartyId) {
|
|
25482
25537
|
const tx = await this.createLendrAccountWithSessionTx(session, accountIndex, thirdPartyId);
|
|
25483
|
-
const txResult = await session.sendTransaction(tx);
|
|
25538
|
+
const txResult = await session.sendTransaction(tx, { variation: "LendrAccountInitialize" });
|
|
25484
25539
|
this.logger.debug({ txResult }, "Created Lendr account (using session)");
|
|
25485
25540
|
const thirdPartyIdValue = thirdPartyId ?? 0;
|
|
25486
25541
|
const [accountPublicKey] = __solana_web3_js.PublicKey.findProgramAddressSync([
|
package/dist/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AccountFlags, AccountType, ActionEmodeImpact, ActiveEmodePair, ActiveStakePoolMap, AssetTag, BUNDLE_TX_SIZE, Balance, BalanceRaw, BalanceType, BalanceTypeDto, Bank, BankAddress, BankConfig, BankConfigCompactRaw, BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, BankConfigRawDto, BankConfigType, BankMap, BankMetadataRaw, BankRaw, BankRawDto, BankType, BankTypeDto, BankVaultType, BroadcastMethodType, DEFAULT_CLUSTER, DEFAULT_COMMITMENT, DEFAULT_CONFIRM_OPTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_PROCESS_TX_OPTS, DEFAULT_PROCESS_TX_STRATEGY, DEFAULT_SEND_OPTS, DISABLED_FLAG, DUMMY_USDC_MINT, DataFetcher, DummyMetadataFetcher, EmodeConfigRaw, EmodeConfigRawDto, EmodeEntry, EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpact, EmodeImpactStatus, EmodePair, EmodeSettings, EmodeSettingsDto, EmodeSettingsRaw, EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, FLASHLOAN_ENABLED_FLAG, FetchGroupDataFn, FetchRawBanksArgs, FlashLoanArgs, FlashloanActionResult, FogoMetadataFetcher, GROUP_PK, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheRaw, HealthCacheSimulationError, HealthCacheType, HealthCacheTypeDto, IMetadataFetcher, InterestRateConfig, InterestRateConfigCompactRaw, InterestRateConfigDto, InterestRateConfigOpt, InterestRateConfigOptRaw, InterestRateConfigRaw, JUPITER_V6_PROGRAM, LENDR_IDL, LENDR_PROGRAM, LENDR_SPONSORED_SHARD_ID, LST_MINT, LUT_PROGRAM_AUTHORITY_INDEX, LendingAccountDepositOrRepayWithSessionAccounts, LendingAccountWithdrawOrBorrowWithSessionAccounts, LendrAccount, LendrAccountRaw, LendrAccountType, LendrAccountTypeDto, LendrAccountWrapper, LendrClient, LendrClientFetchOptions, LendrClientOptions, LendrClientProps, LendrConfig, LendrGroup, LendrGroupRaw, LendrGroupType, LendrGroupTypeDto, LendrIdlType, LendrProgram, LendrRequirementType, LendrRequirementTypeRaw, LogFn, LoopProps, LoopTxProps, MAX_ACCOUNT_KEYS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MakeBorrowIxOpts, MakeBorrowWithSessionIxOpts, MakeDepositIxOpts, MakeDepositWithSessionIxOpts, MakeRepayIxOpts, MakeRepayWithSessionIxOpts, MakeWithdrawIxOpts, MakeWithdrawWithSessionIxOpts, MetadataService, MetadataServiceProps, MetaplexMetadataFetcher, MintData, MintDataMap, OperationalState, OperationalStateRaw, OracleConfigOpt, OracleConfigOptRaw, OraclePrice, OraclePriceDto, OraclePriceMap, OracleSetup, OracleSetupRaw, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PRIORITY_TX_SIZE, PROGRAM_ID, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, PriceWithConfidence, PriceWithConfidenceDto, PriorityFees, ProcessTransactionError, ProcessTransactionErrorType, ProcessTransactionOpts, ProcessTransactionStrategy, ProcessTransactionsClientOpts, ProgramError, ProgramErrorWithDescription, PythPushFeedIdMap, RatePoint, RatePointDto, RatePointRaw, RepayWithCollateralProps, RepayWithCollateralTxProps, RiskTier, RiskTierRaw, SINGLE_POOL_PROGRAM_ID, SKIP_SIMULATION, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SimulationResult, SpecificBroadcastMethod, SpecificBroadcastMethodType, StakeAccount, StakePoolMevMap, SupportedOracleSetup, TLogger, TMetadata, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionBuilderResult, USDC_DECIMALS, USDC_MINT, ValidatorRateData, ValidatorStakeGroup, ValidatorStakeGroupDto, WSOL_EXTENDED_METADATA, WSOL_MINT, accountFlagToBN, addOracleToBanksIx, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankRawToDto, buildFeedIdMap, computeAccountValue, computeActiveEmodePairs, computeAssetUsdValue, computeBalanceUsdValue, computeBaseInterestRate, computeClaimedEmissions, computeEmodeImpacts, computeFreeCollateral, computeFreeCollateralLegacy, computeHealthAccountMetas, computeHealthCheckAccounts, computeHealthComponents, computeHealthComponentsLegacy, computeHealthComponentsWithoutBiasLegacy, computeInterestRates, computeLiabilityUsdValue, computeLoopingParams, computeMaxLeverage, computeNetApy, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, confirmTransaction, crankPythOracleIx, createLendrAccountTx, createUpdateFeedIx, decodeAccountRaw, decodeBankRaw, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToLendrAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, feedIdToString, fetchLendrAccountAddresses, fetchLendrAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchPythOracleData, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleData, findOracleKey, findPythPushOracleAddress, freezeBankConfigIx, getActiveAccountFlags, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getActiveStaleBanks, getAssetQuantity, getAssetShares, getAssetWeight, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getConfig, getConfigPda, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getPrice, getPriceFeedAccountForProgram, getPriceWithConfidence, getTotalAssetQuantity, getTotalLiabilityQuantity, getTreasuryPda, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, index_d_exports, instructions, isOracleSetupSupported, isWeightedPrice, lendrAccountToDto, makeAddPermissionlessStakedBankIx, makeBundleTipIx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeTxPriorityIx, makeUnwrapSolIx, makeVersionedTransaction, makeWrapSolIxs, metadataSchema, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseErrorFromLogs, parseLendrAccountRaw, parseOperationalState, parseOraclePriceData, parseOracleSetup, parseRiskTier, parseTransactionError, processTransactions, serializeBankConfigOpt, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateTransactions, toBankConfigDto, toBankDto, toEmodeSettingsDto, toInterestRateConfigDto, validatorStakeGroupToDto } from "./index-
|
|
1
|
+
import { AccountFlags, AccountType, ActionEmodeImpact, ActiveEmodePair, ActiveStakePoolMap, AssetTag, BUNDLE_TX_SIZE, Balance, BalanceRaw, BalanceType, BalanceTypeDto, Bank, BankAddress, BankConfig, BankConfigCompactRaw, BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, BankConfigRawDto, BankConfigType, BankMap, BankMetadataRaw, BankRaw, BankRawDto, BankType, BankTypeDto, BankVaultType, BroadcastMethodType, DEFAULT_CLUSTER, DEFAULT_COMMITMENT, DEFAULT_CONFIRM_OPTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_PROCESS_TX_OPTS, DEFAULT_PROCESS_TX_STRATEGY, DEFAULT_SEND_OPTS, DISABLED_FLAG, DUMMY_USDC_MINT, DataFetcher, DummyMetadataFetcher, EmodeConfigRaw, EmodeConfigRawDto, EmodeEntry, EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpact, EmodeImpactStatus, EmodePair, EmodeSettings, EmodeSettingsDto, EmodeSettingsRaw, EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, FLASHLOAN_ENABLED_FLAG, FetchGroupDataFn, FetchRawBanksArgs, FlashLoanArgs, FlashloanActionResult, FogoMetadataFetcher, GROUP_PK, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheRaw, HealthCacheSimulationError, HealthCacheType, HealthCacheTypeDto, IMetadataFetcher, InterestRateConfig, InterestRateConfigCompactRaw, InterestRateConfigDto, InterestRateConfigOpt, InterestRateConfigOptRaw, InterestRateConfigRaw, JUPITER_V6_PROGRAM, LENDR_IDL, LENDR_PROGRAM, LENDR_SPONSORED_SHARD_ID, LST_MINT, LUT_PROGRAM_AUTHORITY_INDEX, LendingAccountDepositOrRepayWithSessionAccounts, LendingAccountWithdrawOrBorrowWithSessionAccounts, LendrAccount, LendrAccountRaw, LendrAccountType, LendrAccountTypeDto, LendrAccountWrapper, LendrClient, LendrClientFetchOptions, LendrClientOptions, LendrClientProps, LendrConfig, LendrGroup, LendrGroupRaw, LendrGroupType, LendrGroupTypeDto, LendrIdlType, LendrProgram, LendrRequirementType, LendrRequirementTypeRaw, LogFn, LoopProps, LoopTxProps, MAX_ACCOUNT_KEYS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MakeBorrowIxOpts, MakeBorrowWithSessionIxOpts, MakeDepositIxOpts, MakeDepositWithSessionIxOpts, MakeRepayIxOpts, MakeRepayWithSessionIxOpts, MakeWithdrawIxOpts, MakeWithdrawWithSessionIxOpts, MetadataService, MetadataServiceProps, MetaplexMetadataFetcher, MintData, MintDataMap, OperationalState, OperationalStateRaw, OracleConfigOpt, OracleConfigOptRaw, OraclePrice, OraclePriceDto, OraclePriceMap, OracleSetup, OracleSetupRaw, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PRIORITY_TX_SIZE, PROGRAM_ID, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, PriceWithConfidence, PriceWithConfidenceDto, PriorityFees, ProcessTransactionError, ProcessTransactionErrorType, ProcessTransactionOpts, ProcessTransactionStrategy, ProcessTransactionsClientOpts, ProgramError, ProgramErrorWithDescription, PythPushFeedIdMap, RatePoint, RatePointDto, RatePointRaw, RepayWithCollateralProps, RepayWithCollateralTxProps, RiskTier, RiskTierRaw, SINGLE_POOL_PROGRAM_ID, SKIP_SIMULATION, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SimulationResult, SpecificBroadcastMethod, SpecificBroadcastMethodType, StakeAccount, StakePoolMevMap, SupportedOracleSetup, TLogger, TMetadata, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionBuilderResult, USDC_DECIMALS, USDC_MINT, ValidatorRateData, ValidatorStakeGroup, ValidatorStakeGroupDto, WSOL_EXTENDED_METADATA, WSOL_MINT, accountFlagToBN, addOracleToBanksIx, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankRawToDto, buildFeedIdMap, computeAccountValue, computeActiveEmodePairs, computeAssetUsdValue, computeBalanceUsdValue, computeBaseInterestRate, computeClaimedEmissions, computeEmodeImpacts, computeFreeCollateral, computeFreeCollateralLegacy, computeHealthAccountMetas, computeHealthCheckAccounts, computeHealthComponents, computeHealthComponentsLegacy, computeHealthComponentsWithoutBiasLegacy, computeInterestRates, computeLiabilityUsdValue, computeLoopingParams, computeMaxLeverage, computeNetApy, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, confirmTransaction, crankPythOracleIx, createLendrAccountTx, createUpdateFeedIx, decodeAccountRaw, decodeBankRaw, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToLendrAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, feedIdToString, fetchLendrAccountAddresses, fetchLendrAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchPythOracleData, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleData, findOracleKey, findPythPushOracleAddress, freezeBankConfigIx, getActiveAccountFlags, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getActiveStaleBanks, getAssetQuantity, getAssetShares, getAssetWeight, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getConfig, getConfigPda, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getPrice, getPriceFeedAccountForProgram, getPriceWithConfidence, getTotalAssetQuantity, getTotalLiabilityQuantity, getTreasuryPda, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, index_d_exports, instructions, isOracleSetupSupported, isWeightedPrice, lendrAccountToDto, makeAddPermissionlessStakedBankIx, makeBundleTipIx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeTxPriorityIx, makeUnwrapSolIx, makeVersionedTransaction, makeWrapSolIxs, metadataSchema, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseErrorFromLogs, parseLendrAccountRaw, parseOperationalState, parseOraclePriceData, parseOracleSetup, parseRiskTier, parseTransactionError, processTransactions, serializeBankConfigOpt, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateTransactions, toBankConfigDto, toBankDto, toEmodeSettingsDto, toInterestRateConfigDto, validatorStakeGroupToDto } from "./index-B80wOp3i.cjs";
|
|
2
2
|
export { AccountFlags, AccountType, ActionEmodeImpact, ActiveEmodePair, ActiveStakePoolMap, AssetTag, BUNDLE_TX_SIZE, Balance, BalanceRaw, BalanceType, BalanceTypeDto, Bank, BankAddress, BankConfig, BankConfigCompactRaw, BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, BankConfigRawDto, BankConfigType, BankMap, BankMetadataRaw, BankRaw, BankRawDto, BankType, BankTypeDto, BankVaultType, BroadcastMethodType, DEFAULT_CLUSTER, DEFAULT_COMMITMENT, DEFAULT_CONFIRM_OPTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_PROCESS_TX_OPTS, DEFAULT_PROCESS_TX_STRATEGY, DEFAULT_SEND_OPTS, DISABLED_FLAG, DUMMY_USDC_MINT, DataFetcher, DummyMetadataFetcher, EmodeConfigRaw, EmodeConfigRawDto, EmodeEntry, EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpact, EmodeImpactStatus, EmodePair, EmodeSettings, EmodeSettingsDto, EmodeSettingsRaw, EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, FLASHLOAN_ENABLED_FLAG, FetchGroupDataFn, FetchRawBanksArgs, FlashLoanArgs, FlashloanActionResult, FogoMetadataFetcher, GROUP_PK, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheRaw, HealthCacheSimulationError, HealthCacheType, HealthCacheTypeDto, IMetadataFetcher, InterestRateConfig, InterestRateConfigCompactRaw, InterestRateConfigDto, InterestRateConfigOpt, InterestRateConfigOptRaw, InterestRateConfigRaw, JUPITER_V6_PROGRAM, LENDR_IDL, LENDR_PROGRAM, LENDR_SPONSORED_SHARD_ID, LST_MINT, LUT_PROGRAM_AUTHORITY_INDEX, LendingAccountDepositOrRepayWithSessionAccounts, LendingAccountWithdrawOrBorrowWithSessionAccounts, LendrAccount, LendrAccountRaw, LendrAccountType, LendrAccountTypeDto, LendrAccountWrapper, LendrClient, LendrClientFetchOptions, LendrClientOptions, LendrClientProps, LendrConfig, LendrGroup, LendrGroupRaw, LendrGroupType, LendrGroupTypeDto, LendrIdlType, LendrProgram, LendrRequirementType, LendrRequirementTypeRaw, LogFn, LoopProps, LoopTxProps, MAX_ACCOUNT_KEYS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MakeBorrowIxOpts, MakeBorrowWithSessionIxOpts, MakeDepositIxOpts, MakeDepositWithSessionIxOpts, MakeRepayIxOpts, MakeRepayWithSessionIxOpts, MakeWithdrawIxOpts, MakeWithdrawWithSessionIxOpts, MetadataService, MetadataServiceProps, MetaplexMetadataFetcher, MintData, MintDataMap, OperationalState, OperationalStateRaw, OracleConfigOpt, OracleConfigOptRaw, OraclePrice, OraclePriceDto, OraclePriceMap, OracleSetup, OracleSetupRaw, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PRIORITY_TX_SIZE, PROGRAM_ID, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, PriceWithConfidence, PriceWithConfidenceDto, PriorityFees, ProcessTransactionError, ProcessTransactionErrorType, ProcessTransactionOpts, ProcessTransactionStrategy, ProcessTransactionsClientOpts, ProgramError, ProgramErrorWithDescription, PythPushFeedIdMap, RatePoint, RatePointDto, RatePointRaw, RepayWithCollateralProps, RepayWithCollateralTxProps, RiskTier, RiskTierRaw, SINGLE_POOL_PROGRAM_ID, SKIP_SIMULATION, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SimulationResult, SpecificBroadcastMethod, SpecificBroadcastMethodType, StakeAccount, StakePoolMevMap, SupportedOracleSetup, TLogger, TMetadata, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionBuilderResult, USDC_DECIMALS, USDC_MINT, ValidatorRateData, ValidatorStakeGroup, ValidatorStakeGroupDto, WSOL_EXTENDED_METADATA, WSOL_MINT, accountFlagToBN, addOracleToBanksIx, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankRawToDto, buildFeedIdMap, computeAccountValue, computeActiveEmodePairs, computeAssetUsdValue, computeBalanceUsdValue, computeBaseInterestRate, computeClaimedEmissions, computeEmodeImpacts, computeFreeCollateral, computeFreeCollateralLegacy, computeHealthAccountMetas, computeHealthCheckAccounts, computeHealthComponents, computeHealthComponentsLegacy, computeHealthComponentsWithoutBiasLegacy, computeInterestRates, computeLiabilityUsdValue, computeLoopingParams, computeMaxLeverage, computeNetApy, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, confirmTransaction, crankPythOracleIx, createLendrAccountTx, createUpdateFeedIx, decodeAccountRaw, decodeBankRaw, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToLendrAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, feedIdToString, fetchLendrAccountAddresses, fetchLendrAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchPythOracleData, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleData, findOracleKey, findPythPushOracleAddress, freezeBankConfigIx, getActiveAccountFlags, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getActiveStaleBanks, getAssetQuantity, getAssetShares, getAssetWeight, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getConfig, getConfigPda, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getPrice, getPriceFeedAccountForProgram, getPriceWithConfidence, getTotalAssetQuantity, getTotalLiabilityQuantity, getTreasuryPda, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, instructions, isOracleSetupSupported, isWeightedPrice, lendrAccountToDto, makeAddPermissionlessStakedBankIx, makeBundleTipIx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeTxPriorityIx, makeUnwrapSolIx, makeVersionedTransaction, makeWrapSolIxs, metadataSchema, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseErrorFromLogs, parseLendrAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseTransactionError, processTransactions, serializeBankConfigOpt, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateTransactions, toBankConfigDto, toBankDto, toEmodeSettingsDto, toInterestRateConfigDto, validatorStakeGroupToDto, index_d_exports as vendor };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AccountFlags, AccountType, ActionEmodeImpact, ActiveEmodePair, ActiveStakePoolMap, AssetTag, BUNDLE_TX_SIZE, Balance, BalanceRaw, BalanceType, BalanceTypeDto, Bank, BankAddress, BankConfig, BankConfigCompactRaw, BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, BankConfigRawDto, BankConfigType, BankMap, BankMetadataRaw, BankRaw, BankRawDto, BankType, BankTypeDto, BankVaultType, BroadcastMethodType, DEFAULT_CLUSTER, DEFAULT_COMMITMENT, DEFAULT_CONFIRM_OPTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_PROCESS_TX_OPTS, DEFAULT_PROCESS_TX_STRATEGY, DEFAULT_SEND_OPTS, DISABLED_FLAG, DUMMY_USDC_MINT, DataFetcher, DummyMetadataFetcher, EmodeConfigRaw, EmodeConfigRawDto, EmodeEntry, EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpact, EmodeImpactStatus, EmodePair, EmodeSettings, EmodeSettingsDto, EmodeSettingsRaw, EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, FLASHLOAN_ENABLED_FLAG, FetchGroupDataFn, FetchRawBanksArgs, FlashLoanArgs, FlashloanActionResult, FogoMetadataFetcher, GROUP_PK, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheRaw, HealthCacheSimulationError, HealthCacheType, HealthCacheTypeDto, IMetadataFetcher, InterestRateConfig, InterestRateConfigCompactRaw, InterestRateConfigDto, InterestRateConfigOpt, InterestRateConfigOptRaw, InterestRateConfigRaw, JUPITER_V6_PROGRAM, LENDR_IDL, LENDR_PROGRAM, LENDR_SPONSORED_SHARD_ID, LST_MINT, LUT_PROGRAM_AUTHORITY_INDEX, LendingAccountDepositOrRepayWithSessionAccounts, LendingAccountWithdrawOrBorrowWithSessionAccounts, LendrAccount, LendrAccountRaw, LendrAccountType, LendrAccountTypeDto, LendrAccountWrapper, LendrClient, LendrClientFetchOptions, LendrClientOptions, LendrClientProps, LendrConfig, LendrGroup, LendrGroupRaw, LendrGroupType, LendrGroupTypeDto, LendrIdlType, LendrProgram, LendrRequirementType, LendrRequirementTypeRaw, LogFn, LoopProps, LoopTxProps, MAX_ACCOUNT_KEYS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MakeBorrowIxOpts, MakeBorrowWithSessionIxOpts, MakeDepositIxOpts, MakeDepositWithSessionIxOpts, MakeRepayIxOpts, MakeRepayWithSessionIxOpts, MakeWithdrawIxOpts, MakeWithdrawWithSessionIxOpts, MetadataService, MetadataServiceProps, MetaplexMetadataFetcher, MintData, MintDataMap, OperationalState, OperationalStateRaw, OracleConfigOpt, OracleConfigOptRaw, OraclePrice, OraclePriceDto, OraclePriceMap, OracleSetup, OracleSetupRaw, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PRIORITY_TX_SIZE, PROGRAM_ID, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, PriceWithConfidence, PriceWithConfidenceDto, PriorityFees, ProcessTransactionError, ProcessTransactionErrorType, ProcessTransactionOpts, ProcessTransactionStrategy, ProcessTransactionsClientOpts, ProgramError, ProgramErrorWithDescription, PythPushFeedIdMap, RatePoint, RatePointDto, RatePointRaw, RepayWithCollateralProps, RepayWithCollateralTxProps, RiskTier, RiskTierRaw, SINGLE_POOL_PROGRAM_ID, SKIP_SIMULATION, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SimulationResult, SpecificBroadcastMethod, SpecificBroadcastMethodType, StakeAccount, StakePoolMevMap, SupportedOracleSetup, TLogger, TMetadata, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionBuilderResult, USDC_DECIMALS, USDC_MINT, ValidatorRateData, ValidatorStakeGroup, ValidatorStakeGroupDto, WSOL_EXTENDED_METADATA, WSOL_MINT, accountFlagToBN, addOracleToBanksIx, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankRawToDto, buildFeedIdMap, computeAccountValue, computeActiveEmodePairs, computeAssetUsdValue, computeBalanceUsdValue, computeBaseInterestRate, computeClaimedEmissions, computeEmodeImpacts, computeFreeCollateral, computeFreeCollateralLegacy, computeHealthAccountMetas, computeHealthCheckAccounts, computeHealthComponents, computeHealthComponentsLegacy, computeHealthComponentsWithoutBiasLegacy, computeInterestRates, computeLiabilityUsdValue, computeLoopingParams, computeMaxLeverage, computeNetApy, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, confirmTransaction, crankPythOracleIx, createLendrAccountTx, createUpdateFeedIx, decodeAccountRaw, decodeBankRaw, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToLendrAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, feedIdToString, fetchLendrAccountAddresses, fetchLendrAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchPythOracleData, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleData, findOracleKey, findPythPushOracleAddress, freezeBankConfigIx, getActiveAccountFlags, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getActiveStaleBanks, getAssetQuantity, getAssetShares, getAssetWeight, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getConfig, getConfigPda, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getPrice, getPriceFeedAccountForProgram, getPriceWithConfidence, getTotalAssetQuantity, getTotalLiabilityQuantity, getTreasuryPda, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, index_d_exports, instructions, isOracleSetupSupported, isWeightedPrice, lendrAccountToDto, makeAddPermissionlessStakedBankIx, makeBundleTipIx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeTxPriorityIx, makeUnwrapSolIx, makeVersionedTransaction, makeWrapSolIxs, metadataSchema, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseErrorFromLogs, parseLendrAccountRaw, parseOperationalState, parseOraclePriceData, parseOracleSetup, parseRiskTier, parseTransactionError, processTransactions, serializeBankConfigOpt, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateTransactions, toBankConfigDto, toBankDto, toEmodeSettingsDto, toInterestRateConfigDto, validatorStakeGroupToDto } from "./index-
|
|
1
|
+
import { AccountFlags, AccountType, ActionEmodeImpact, ActiveEmodePair, ActiveStakePoolMap, AssetTag, BUNDLE_TX_SIZE, Balance, BalanceRaw, BalanceType, BalanceTypeDto, Bank, BankAddress, BankConfig, BankConfigCompactRaw, BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, BankConfigRawDto, BankConfigType, BankMap, BankMetadataRaw, BankRaw, BankRawDto, BankType, BankTypeDto, BankVaultType, BroadcastMethodType, DEFAULT_CLUSTER, DEFAULT_COMMITMENT, DEFAULT_CONFIRM_OPTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_PROCESS_TX_OPTS, DEFAULT_PROCESS_TX_STRATEGY, DEFAULT_SEND_OPTS, DISABLED_FLAG, DUMMY_USDC_MINT, DataFetcher, DummyMetadataFetcher, EmodeConfigRaw, EmodeConfigRawDto, EmodeEntry, EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpact, EmodeImpactStatus, EmodePair, EmodeSettings, EmodeSettingsDto, EmodeSettingsRaw, EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, FLASHLOAN_ENABLED_FLAG, FetchGroupDataFn, FetchRawBanksArgs, FlashLoanArgs, FlashloanActionResult, FogoMetadataFetcher, GROUP_PK, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheRaw, HealthCacheSimulationError, HealthCacheType, HealthCacheTypeDto, IMetadataFetcher, InterestRateConfig, InterestRateConfigCompactRaw, InterestRateConfigDto, InterestRateConfigOpt, InterestRateConfigOptRaw, InterestRateConfigRaw, JUPITER_V6_PROGRAM, LENDR_IDL, LENDR_PROGRAM, LENDR_SPONSORED_SHARD_ID, LST_MINT, LUT_PROGRAM_AUTHORITY_INDEX, LendingAccountDepositOrRepayWithSessionAccounts, LendingAccountWithdrawOrBorrowWithSessionAccounts, LendrAccount, LendrAccountRaw, LendrAccountType, LendrAccountTypeDto, LendrAccountWrapper, LendrClient, LendrClientFetchOptions, LendrClientOptions, LendrClientProps, LendrConfig, LendrGroup, LendrGroupRaw, LendrGroupType, LendrGroupTypeDto, LendrIdlType, LendrProgram, LendrRequirementType, LendrRequirementTypeRaw, LogFn, LoopProps, LoopTxProps, MAX_ACCOUNT_KEYS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MakeBorrowIxOpts, MakeBorrowWithSessionIxOpts, MakeDepositIxOpts, MakeDepositWithSessionIxOpts, MakeRepayIxOpts, MakeRepayWithSessionIxOpts, MakeWithdrawIxOpts, MakeWithdrawWithSessionIxOpts, MetadataService, MetadataServiceProps, MetaplexMetadataFetcher, MintData, MintDataMap, OperationalState, OperationalStateRaw, OracleConfigOpt, OracleConfigOptRaw, OraclePrice, OraclePriceDto, OraclePriceMap, OracleSetup, OracleSetupRaw, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PRIORITY_TX_SIZE, PROGRAM_ID, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, PriceWithConfidence, PriceWithConfidenceDto, PriorityFees, ProcessTransactionError, ProcessTransactionErrorType, ProcessTransactionOpts, ProcessTransactionStrategy, ProcessTransactionsClientOpts, ProgramError, ProgramErrorWithDescription, PythPushFeedIdMap, RatePoint, RatePointDto, RatePointRaw, RepayWithCollateralProps, RepayWithCollateralTxProps, RiskTier, RiskTierRaw, SINGLE_POOL_PROGRAM_ID, SKIP_SIMULATION, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SimulationResult, SpecificBroadcastMethod, SpecificBroadcastMethodType, StakeAccount, StakePoolMevMap, SupportedOracleSetup, TLogger, TMetadata, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionBuilderResult, USDC_DECIMALS, USDC_MINT, ValidatorRateData, ValidatorStakeGroup, ValidatorStakeGroupDto, WSOL_EXTENDED_METADATA, WSOL_MINT, accountFlagToBN, addOracleToBanksIx, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankRawToDto, buildFeedIdMap, computeAccountValue, computeActiveEmodePairs, computeAssetUsdValue, computeBalanceUsdValue, computeBaseInterestRate, computeClaimedEmissions, computeEmodeImpacts, computeFreeCollateral, computeFreeCollateralLegacy, computeHealthAccountMetas, computeHealthCheckAccounts, computeHealthComponents, computeHealthComponentsLegacy, computeHealthComponentsWithoutBiasLegacy, computeInterestRates, computeLiabilityUsdValue, computeLoopingParams, computeMaxLeverage, computeNetApy, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, confirmTransaction, crankPythOracleIx, createLendrAccountTx, createUpdateFeedIx, decodeAccountRaw, decodeBankRaw, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToLendrAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, feedIdToString, fetchLendrAccountAddresses, fetchLendrAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchPythOracleData, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleData, findOracleKey, findPythPushOracleAddress, freezeBankConfigIx, getActiveAccountFlags, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getActiveStaleBanks, getAssetQuantity, getAssetShares, getAssetWeight, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getConfig, getConfigPda, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getPrice, getPriceFeedAccountForProgram, getPriceWithConfidence, getTotalAssetQuantity, getTotalLiabilityQuantity, getTreasuryPda, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, index_d_exports, instructions, isOracleSetupSupported, isWeightedPrice, lendrAccountToDto, makeAddPermissionlessStakedBankIx, makeBundleTipIx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeTxPriorityIx, makeUnwrapSolIx, makeVersionedTransaction, makeWrapSolIxs, metadataSchema, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseErrorFromLogs, parseLendrAccountRaw, parseOperationalState, parseOraclePriceData, parseOracleSetup, parseRiskTier, parseTransactionError, processTransactions, serializeBankConfigOpt, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateTransactions, toBankConfigDto, toBankDto, toEmodeSettingsDto, toInterestRateConfigDto, validatorStakeGroupToDto } from "./index-B6qFming.js";
|
|
2
2
|
export { AccountFlags, AccountType, ActionEmodeImpact, ActiveEmodePair, ActiveStakePoolMap, AssetTag, BUNDLE_TX_SIZE, Balance, BalanceRaw, BalanceType, BalanceTypeDto, Bank, BankAddress, BankConfig, BankConfigCompactRaw, BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, BankConfigRawDto, BankConfigType, BankMap, BankMetadataRaw, BankRaw, BankRawDto, BankType, BankTypeDto, BankVaultType, BroadcastMethodType, DEFAULT_CLUSTER, DEFAULT_COMMITMENT, DEFAULT_CONFIRM_OPTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_PROCESS_TX_OPTS, DEFAULT_PROCESS_TX_STRATEGY, DEFAULT_SEND_OPTS, DISABLED_FLAG, DUMMY_USDC_MINT, DataFetcher, DummyMetadataFetcher, EmodeConfigRaw, EmodeConfigRawDto, EmodeEntry, EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpact, EmodeImpactStatus, EmodePair, EmodeSettings, EmodeSettingsDto, EmodeSettingsRaw, EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, FLASHLOAN_ENABLED_FLAG, FetchGroupDataFn, FetchRawBanksArgs, FlashLoanArgs, FlashloanActionResult, FogoMetadataFetcher, GROUP_PK, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheRaw, HealthCacheSimulationError, HealthCacheType, HealthCacheTypeDto, IMetadataFetcher, InterestRateConfig, InterestRateConfigCompactRaw, InterestRateConfigDto, InterestRateConfigOpt, InterestRateConfigOptRaw, InterestRateConfigRaw, JUPITER_V6_PROGRAM, LENDR_IDL, LENDR_PROGRAM, LENDR_SPONSORED_SHARD_ID, LST_MINT, LUT_PROGRAM_AUTHORITY_INDEX, LendingAccountDepositOrRepayWithSessionAccounts, LendingAccountWithdrawOrBorrowWithSessionAccounts, LendrAccount, LendrAccountRaw, LendrAccountType, LendrAccountTypeDto, LendrAccountWrapper, LendrClient, LendrClientFetchOptions, LendrClientOptions, LendrClientProps, LendrConfig, LendrGroup, LendrGroupRaw, LendrGroupType, LendrGroupTypeDto, LendrIdlType, LendrProgram, LendrRequirementType, LendrRequirementTypeRaw, LogFn, LoopProps, LoopTxProps, MAX_ACCOUNT_KEYS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MakeBorrowIxOpts, MakeBorrowWithSessionIxOpts, MakeDepositIxOpts, MakeDepositWithSessionIxOpts, MakeRepayIxOpts, MakeRepayWithSessionIxOpts, MakeWithdrawIxOpts, MakeWithdrawWithSessionIxOpts, MetadataService, MetadataServiceProps, MetaplexMetadataFetcher, MintData, MintDataMap, OperationalState, OperationalStateRaw, OracleConfigOpt, OracleConfigOptRaw, OraclePrice, OraclePriceDto, OraclePriceMap, OracleSetup, OracleSetupRaw, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PRIORITY_TX_SIZE, PROGRAM_ID, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, PriceWithConfidence, PriceWithConfidenceDto, PriorityFees, ProcessTransactionError, ProcessTransactionErrorType, ProcessTransactionOpts, ProcessTransactionStrategy, ProcessTransactionsClientOpts, ProgramError, ProgramErrorWithDescription, PythPushFeedIdMap, RatePoint, RatePointDto, RatePointRaw, RepayWithCollateralProps, RepayWithCollateralTxProps, RiskTier, RiskTierRaw, SINGLE_POOL_PROGRAM_ID, SKIP_SIMULATION, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SimulationResult, SpecificBroadcastMethod, SpecificBroadcastMethodType, StakeAccount, StakePoolMevMap, SupportedOracleSetup, TLogger, TMetadata, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionBuilderResult, USDC_DECIMALS, USDC_MINT, ValidatorRateData, ValidatorStakeGroup, ValidatorStakeGroupDto, WSOL_EXTENDED_METADATA, WSOL_MINT, accountFlagToBN, addOracleToBanksIx, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankRawToDto, buildFeedIdMap, computeAccountValue, computeActiveEmodePairs, computeAssetUsdValue, computeBalanceUsdValue, computeBaseInterestRate, computeClaimedEmissions, computeEmodeImpacts, computeFreeCollateral, computeFreeCollateralLegacy, computeHealthAccountMetas, computeHealthCheckAccounts, computeHealthComponents, computeHealthComponentsLegacy, computeHealthComponentsWithoutBiasLegacy, computeInterestRates, computeLiabilityUsdValue, computeLoopingParams, computeMaxLeverage, computeNetApy, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, confirmTransaction, crankPythOracleIx, createLendrAccountTx, createUpdateFeedIx, decodeAccountRaw, decodeBankRaw, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToLendrAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, feedIdToString, fetchLendrAccountAddresses, fetchLendrAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchPythOracleData, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleData, findOracleKey, findPythPushOracleAddress, freezeBankConfigIx, getActiveAccountFlags, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getActiveStaleBanks, getAssetQuantity, getAssetShares, getAssetWeight, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getConfig, getConfigPda, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getPrice, getPriceFeedAccountForProgram, getPriceWithConfidence, getTotalAssetQuantity, getTotalLiabilityQuantity, getTreasuryPda, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, instructions, isOracleSetupSupported, isWeightedPrice, lendrAccountToDto, makeAddPermissionlessStakedBankIx, makeBundleTipIx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeTxPriorityIx, makeUnwrapSolIx, makeVersionedTransaction, makeWrapSolIxs, metadataSchema, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseErrorFromLogs, parseLendrAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseTransactionError, processTransactions, serializeBankConfigOpt, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateTransactions, toBankConfigDto, toBankDto, toEmodeSettingsDto, toInterestRateConfigDto, validatorStakeGroupToDto, index_d_exports as vendor };
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import BN$1, { BN } from "bn.js";
|
|
|
13
13
|
import { findMetadataPda, mplTokenMetadata, safeFetchAllMetadata } from "@metaplex-foundation/mpl-token-metadata";
|
|
14
14
|
import { publicKey } from "@metaplex-foundation/umi";
|
|
15
15
|
import { createUmi } from "@metaplex-foundation/umi-bundle-defaults";
|
|
16
|
+
import { createSessionUnwrapInstruction, createSessionWrapInstructions } from "@fogo/sessions-sdk";
|
|
16
17
|
import * as borsh$1 from "borsh";
|
|
17
18
|
import * as borsh from "@coral-xyz/borsh";
|
|
18
19
|
import Big from "big.js";
|
|
@@ -22251,6 +22252,38 @@ var BankConfig = class BankConfig {
|
|
|
22251
22252
|
|
|
22252
22253
|
//#endregion
|
|
22253
22254
|
//#region src/models/account/pure.ts
|
|
22255
|
+
/**
|
|
22256
|
+
* Creates session-aware wrap instructions for SOL.
|
|
22257
|
+
* Uses the session SDK's wrap instruction builders to create instructions
|
|
22258
|
+
* that work with Fogo Sessions.
|
|
22259
|
+
*
|
|
22260
|
+
* Note: The amount transferred must include rent-exempt amount if the account is new.
|
|
22261
|
+
* Standard rent-exempt amount for a token account is ~2,039,280 lamports.
|
|
22262
|
+
* We add this as a safety margin when the amount is small, as we can't know if the account exists.
|
|
22263
|
+
*/
|
|
22264
|
+
function makeSessionWrapSolIxs(walletAddress, sessionKey, payer, amount, existingBalance) {
|
|
22265
|
+
const nativeAmount = uiToNative(amount, 9).toNumber();
|
|
22266
|
+
const TOKEN_ACCOUNT_RENT_EXEMPT = 2039280;
|
|
22267
|
+
const existingBalanceNative = existingBalance ? uiToNative(existingBalance, 9).toNumber() : 0;
|
|
22268
|
+
let totalAmount = nativeAmount;
|
|
22269
|
+
if (existingBalanceNative < TOKEN_ACCOUNT_RENT_EXEMPT) {
|
|
22270
|
+
const rentNeeded = Math.max(0, TOKEN_ACCOUNT_RENT_EXEMPT - existingBalanceNative);
|
|
22271
|
+
totalAmount = nativeAmount + rentNeeded;
|
|
22272
|
+
} else {
|
|
22273
|
+
totalAmount = nativeAmount + 1e4;
|
|
22274
|
+
}
|
|
22275
|
+
return createSessionWrapInstructions(sessionKey, walletAddress, BigInt(totalAmount));
|
|
22276
|
+
}
|
|
22277
|
+
/**
|
|
22278
|
+
* Creates a session-aware unwrap instruction for SOL.
|
|
22279
|
+
* Uses the session SDK's unwrap instruction builder to create an instruction
|
|
22280
|
+
* that works with Fogo Sessions.
|
|
22281
|
+
*
|
|
22282
|
+
* Note: createSessionUnwrapInstruction signature: (sessionKey, walletPublicKey)
|
|
22283
|
+
*/
|
|
22284
|
+
function makeSessionUnwrapSolIx(walletAddress, sessionKey, payer) {
|
|
22285
|
+
return createSessionUnwrapInstruction(sessionKey, walletAddress);
|
|
22286
|
+
}
|
|
22254
22287
|
var LendrAccount = class LendrAccount {
|
|
22255
22288
|
constructor(address$2, group, authority, balances, accountFlags, emissionsDestinationAccount, healthCache) {
|
|
22256
22289
|
this.address = address$2;
|
|
@@ -22664,10 +22697,15 @@ var LendrAccount = class LendrAccount {
|
|
|
22664
22697
|
keys: []
|
|
22665
22698
|
};
|
|
22666
22699
|
}
|
|
22667
|
-
async makeDepositWithSessionIx(program, banks, mintDatas, amount, bankAddress,
|
|
22668
|
-
const
|
|
22700
|
+
async makeDepositWithSessionIx(program, banks, mintDatas, amount, bankAddress, session, opts = {}) {
|
|
22701
|
+
const bank = banks.get(bankAddress.toBase58());
|
|
22702
|
+
if (!bank) throw Error(`Bank ${bankAddress.toBase58()} not found`);
|
|
22703
|
+
const { depositIxs, ixArguments, userTokenAtaPk, mintData, remainingAccounts } = await this.prepareDepositIx(banks, mintDatas, amount, bankAddress, {
|
|
22704
|
+
...opts,
|
|
22705
|
+
wrapAndUnwrapSol: false
|
|
22706
|
+
});
|
|
22669
22707
|
const accounts$2 = {
|
|
22670
|
-
sessionKey,
|
|
22708
|
+
sessionKey: session.sessionPublicKey,
|
|
22671
22709
|
lendrAccount: this.address,
|
|
22672
22710
|
bank: bankAddress,
|
|
22673
22711
|
signerTokenAccount: userTokenAtaPk,
|
|
@@ -22676,6 +22714,12 @@ var LendrAccount = class LendrAccount {
|
|
|
22676
22714
|
liquidityVault: opts.overrideInferAccounts?.liquidityVault
|
|
22677
22715
|
};
|
|
22678
22716
|
const depositIx = await instructions_default.makeDepositWithSessionIx(program, accounts$2, ixArguments, remainingAccounts);
|
|
22717
|
+
if (bank.mint.equals(NATIVE_MINT)) {
|
|
22718
|
+
const wSolBalanceUi = opts.wSolBalanceUi ?? 0;
|
|
22719
|
+
const wrapAmount = new BigNumber(amount).minus(wSolBalanceUi);
|
|
22720
|
+
const wrapIxs = makeSessionWrapSolIxs(session.walletPublicKey, session.sessionPublicKey, session.payer, wrapAmount, wSolBalanceUi);
|
|
22721
|
+
depositIxs.push(...wrapIxs);
|
|
22722
|
+
}
|
|
22679
22723
|
depositIxs.push(depositIx);
|
|
22680
22724
|
return {
|
|
22681
22725
|
instructions: depositIxs,
|
|
@@ -22745,10 +22789,15 @@ var LendrAccount = class LendrAccount {
|
|
|
22745
22789
|
keys: []
|
|
22746
22790
|
};
|
|
22747
22791
|
}
|
|
22748
|
-
async makeRepayWithSessionIx(program, banks, mintDatas, amount, bankAddress,
|
|
22749
|
-
const
|
|
22792
|
+
async makeRepayWithSessionIx(program, banks, mintDatas, amount, bankAddress, session, repayAll = false, opts = {}) {
|
|
22793
|
+
const bank = banks.get(bankAddress.toBase58());
|
|
22794
|
+
if (!bank) throw Error(`Bank ${bankAddress.toBase58()} not found`);
|
|
22795
|
+
const { repayIxs, ixArguments, userAta, mintData, remainingAccounts } = await this.prepareRepayInstruction(program, banks, mintDatas, amount, bankAddress, repayAll, {
|
|
22796
|
+
...opts,
|
|
22797
|
+
wrapAndUnwrapSol: false
|
|
22798
|
+
});
|
|
22750
22799
|
const repayIx = await instructions_default.makeRepayWithSessionIx(program, {
|
|
22751
|
-
sessionKey,
|
|
22800
|
+
sessionKey: session.sessionPublicKey,
|
|
22752
22801
|
lendrAccount: this.address,
|
|
22753
22802
|
signerTokenAccount: userAta,
|
|
22754
22803
|
bank: bankAddress,
|
|
@@ -22760,6 +22809,12 @@ var LendrAccount = class LendrAccount {
|
|
|
22760
22809
|
isSigner: false,
|
|
22761
22810
|
isWritable: false
|
|
22762
22811
|
})));
|
|
22812
|
+
if (bank.mint.equals(NATIVE_MINT)) {
|
|
22813
|
+
const wSolBalanceUi = opts.wSolBalanceUi ?? 0;
|
|
22814
|
+
const wrapAmount = new BigNumber(amount).minus(wSolBalanceUi);
|
|
22815
|
+
const wrapIxs = makeSessionWrapSolIxs(session.walletPublicKey, session.sessionPublicKey, session.payer, wrapAmount, wSolBalanceUi);
|
|
22816
|
+
repayIxs.push(...wrapIxs);
|
|
22817
|
+
}
|
|
22763
22818
|
repayIxs.push(repayIx);
|
|
22764
22819
|
return {
|
|
22765
22820
|
instructions: repayIxs,
|
|
@@ -22863,7 +22918,7 @@ var LendrAccount = class LendrAccount {
|
|
|
22863
22918
|
}, remainingAccounts);
|
|
22864
22919
|
withdrawIxs.push(withdrawIx);
|
|
22865
22920
|
if (wrapAndUnwrapSol && bank.mint.equals(NATIVE_MINT)) {
|
|
22866
|
-
withdrawIxs.push(
|
|
22921
|
+
withdrawIxs.push(makeSessionUnwrapSolIx(session.walletPublicKey, session.sessionPublicKey, session.payer));
|
|
22867
22922
|
}
|
|
22868
22923
|
return {
|
|
22869
22924
|
instructions: withdrawIxs,
|
|
@@ -22944,7 +22999,7 @@ var LendrAccount = class LendrAccount {
|
|
|
22944
22999
|
}, { amount: uiToNative(amount, bank.mintDecimals) }, remainingAccounts);
|
|
22945
23000
|
borrowIxs.push(borrowIx);
|
|
22946
23001
|
if (bank.mint.equals(NATIVE_MINT) && wrapAndUnwrapSol) {
|
|
22947
|
-
borrowIxs.push(
|
|
23002
|
+
borrowIxs.push(makeSessionUnwrapSolIx(session.walletPublicKey, session.sessionPublicKey, session.payer));
|
|
22948
23003
|
}
|
|
22949
23004
|
return {
|
|
22950
23005
|
instructions: borrowIxs,
|
|
@@ -23707,8 +23762,8 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
23707
23762
|
async makeDepositIx(amount, bankAddress, depositOpts = {}) {
|
|
23708
23763
|
return this._lendrAccount.makeDepositIx(this._program, this.client.banks, this.client.mintDatas, amount, bankAddress, depositOpts);
|
|
23709
23764
|
}
|
|
23710
|
-
async makeDepositWithSessionIx(amount, bankAddress,
|
|
23711
|
-
return this._lendrAccount.makeDepositWithSessionIx(this._program, this.client.banks, this.client.mintDatas, amount, bankAddress,
|
|
23765
|
+
async makeDepositWithSessionIx(amount, bankAddress, session, depositOpts = {}) {
|
|
23766
|
+
return this._lendrAccount.makeDepositWithSessionIx(this._program, this.client.banks, this.client.mintDatas, amount, bankAddress, session, depositOpts);
|
|
23712
23767
|
}
|
|
23713
23768
|
/**
|
|
23714
23769
|
* Creates a transaction for depositing native stake into a lendr staked asset bank account.
|
|
@@ -23842,8 +23897,8 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
23842
23897
|
bankAddress: bankAddress.toBase58(),
|
|
23843
23898
|
sessionKey: session.sessionPublicKey
|
|
23844
23899
|
}, "[lendr:lendr-account:depositWithSession] Depositing into lendr account, using sessions.");
|
|
23845
|
-
const { instructions: instructions$3 } = await this.makeDepositWithSessionTx(amount, bankAddress, session
|
|
23846
|
-
const txResult = await session.sendTransaction(instructions$3);
|
|
23900
|
+
const { instructions: instructions$3 } = await this.makeDepositWithSessionTx(amount, bankAddress, session, depositOpts);
|
|
23901
|
+
const txResult = await session.sendTransaction(instructions$3, { variation: "LendingAccountDeposit" });
|
|
23847
23902
|
this.client.logger.debug({
|
|
23848
23903
|
address: this.address.toBase58(),
|
|
23849
23904
|
txResult
|
|
@@ -23869,8 +23924,8 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
23869
23924
|
});
|
|
23870
23925
|
return solanaTx;
|
|
23871
23926
|
}
|
|
23872
|
-
async makeDepositWithSessionTx(amount, bankAddress,
|
|
23873
|
-
const ixs = await this.makeDepositWithSessionIx(amount, bankAddress,
|
|
23927
|
+
async makeDepositWithSessionTx(amount, bankAddress, session, depositOpts = {}) {
|
|
23928
|
+
const ixs = await this.makeDepositWithSessionIx(amount, bankAddress, session, depositOpts);
|
|
23874
23929
|
const tx = new Transaction().add(...ixs.instructions);
|
|
23875
23930
|
const clientLookupTables = await getClientAddressLookupTableAccounts(this.client);
|
|
23876
23931
|
const solanaTx = addTransactionMetadata(tx, {
|
|
@@ -23962,10 +24017,10 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
23962
24017
|
* @returns An InstructionsWrapper containing the deposit instructions
|
|
23963
24018
|
* @throws Will throw an error if the repay mint is not found
|
|
23964
24019
|
*/
|
|
23965
|
-
async makeRepayWithSessionIx(amount, bankAddress,
|
|
24020
|
+
async makeRepayWithSessionIx(amount, bankAddress, session, repayAll = false, repayOpts = {}) {
|
|
23966
24021
|
const tokenProgramAddress = this.client.mintDatas.get(bankAddress.toBase58())?.tokenProgram;
|
|
23967
24022
|
if (!tokenProgramAddress) throw Error("Repay mint not found");
|
|
23968
|
-
return this._lendrAccount.makeRepayWithSessionIx(this._program, this.client.banks, this.client.mintDatas, amount, bankAddress,
|
|
24023
|
+
return this._lendrAccount.makeRepayWithSessionIx(this._program, this.client.banks, this.client.mintDatas, amount, bankAddress, session, repayAll, repayOpts);
|
|
23969
24024
|
}
|
|
23970
24025
|
/**
|
|
23971
24026
|
* Repays a loan in a lendr bank account.
|
|
@@ -24011,8 +24066,8 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
24011
24066
|
bankAddress,
|
|
24012
24067
|
repayAll
|
|
24013
24068
|
}, "[lendr:lendr-account:repayWithSession] Repaying into lendr account");
|
|
24014
|
-
const tx = await this.makeRepayWithSessionTx(amount, bankAddress, session
|
|
24015
|
-
const result = await session.sendTransaction(tx.instructions);
|
|
24069
|
+
const tx = await this.makeRepayWithSessionTx(amount, bankAddress, session, repayAll, repayOpts);
|
|
24070
|
+
const result = await session.sendTransaction(tx.instructions, { variation: "LendingAccountRepay" });
|
|
24016
24071
|
this.client.logger.debug({
|
|
24017
24072
|
address: this.address.toBase58(),
|
|
24018
24073
|
result
|
|
@@ -24048,8 +24103,8 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
24048
24103
|
* @param repayOpts - Optional parameters for the repay instruction
|
|
24049
24104
|
* @returns A transaction object containing the repay instructions
|
|
24050
24105
|
*/
|
|
24051
|
-
async makeRepayWithSessionTx(amount, bankAddress,
|
|
24052
|
-
const ixs = await this.makeRepayWithSessionIx(amount, bankAddress,
|
|
24106
|
+
async makeRepayWithSessionTx(amount, bankAddress, session, repayAll = false, repayOpts = {}) {
|
|
24107
|
+
const ixs = await this.makeRepayWithSessionIx(amount, bankAddress, session, repayAll, repayOpts);
|
|
24053
24108
|
const tx = new Transaction().add(...ixs.instructions);
|
|
24054
24109
|
const clientLookupTables = await getClientAddressLookupTableAccounts(this.client);
|
|
24055
24110
|
const solanaTx = addTransactionMetadata(tx, {
|
|
@@ -24242,7 +24297,7 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
24242
24297
|
sessionKey: session.sessionPublicKey
|
|
24243
24298
|
}, "[lendr:lendr-account:withdrawWithSession] Withdrawing from lendr account");
|
|
24244
24299
|
const { instructions: instructions$3 } = await this.makeWithdrawWithSessionTx(amount, bankAddress, session, withdrawAll, withdrawOpts);
|
|
24245
|
-
const txResult = await session.sendTransaction(instructions$3);
|
|
24300
|
+
const txResult = await session.sendTransaction(instructions$3, { variation: "LendingAccountWithdraw" });
|
|
24246
24301
|
this.client.logger.debug({
|
|
24247
24302
|
address: this.address.toBase58(),
|
|
24248
24303
|
txResult
|
|
@@ -24405,7 +24460,7 @@ var LendrAccountWrapper = class LendrAccountWrapper {
|
|
|
24405
24460
|
sessionKey: session.sessionPublicKey
|
|
24406
24461
|
}, "[lendr:lendr-account:borrowWithSession] Borrowing from lendr account");
|
|
24407
24462
|
const { instructions: instructions$3 } = await this.makeBorrowWithSessionTx(amount, bankAddress, session, borrowOpts);
|
|
24408
|
-
const txResult = await session.sendTransaction(instructions$3);
|
|
24463
|
+
const txResult = await session.sendTransaction(instructions$3, { variation: "LendingAccountBorrow" });
|
|
24409
24464
|
this.client.logger.debug({
|
|
24410
24465
|
address: this.address.toBase58(),
|
|
24411
24466
|
txResult
|
|
@@ -25483,7 +25538,7 @@ var LendrClient = class LendrClient {
|
|
|
25483
25538
|
*/
|
|
25484
25539
|
async createLendrAccountWithSession(session, commitment, accountIndex = 0, thirdPartyId) {
|
|
25485
25540
|
const tx = await this.createLendrAccountWithSessionTx(session, accountIndex, thirdPartyId);
|
|
25486
|
-
const txResult = await session.sendTransaction(tx);
|
|
25541
|
+
const txResult = await session.sendTransaction(tx, { variation: "LendrAccountInitialize" });
|
|
25487
25542
|
this.logger.debug({ txResult }, "Created Lendr account (using session)");
|
|
25488
25543
|
const thirdPartyIdValue = thirdPartyId ?? 0;
|
|
25489
25544
|
const [accountPublicKey] = PublicKey.findProgramAddressSync([
|