@0dotxyz/p0-ts-sdk 2.3.0-alpha.0 → 2.3.0-alpha.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/index.cjs +290 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +78 -2
- package/dist/index.d.ts +78 -2
- package/dist/index.js +290 -1
- package/dist/index.js.map +1 -1
- package/dist/merge.types-BS8s5Ck0.d.cts +137 -0
- package/dist/merge.types-BS8s5Ck0.d.ts +137 -0
- package/dist/vendor.cjs +7363 -1
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +638 -4
- package/dist/vendor.d.ts +638 -4
- package/dist/vendor.js +7349 -2
- package/dist/vendor.js.map +1 -1
- package/package.json +1 -1
- package/dist/index-BDDVBMdM.d.cts +0 -48
- package/dist/index-BDDVBMdM.d.ts +0 -48
package/dist/index.js
CHANGED
|
@@ -44693,6 +44693,52 @@ function deserializeTitanWireInstruction(ix) {
|
|
|
44693
44693
|
data: Buffer.from(ix.d)
|
|
44694
44694
|
});
|
|
44695
44695
|
}
|
|
44696
|
+
var EXPONENT_CORE_PROGRAM_ID = new PublicKey(
|
|
44697
|
+
"XP1BRLn8eCYSygrd8er5P4GKdzqKbC3DLoSsS5UYVZy"
|
|
44698
|
+
);
|
|
44699
|
+
new PublicKey(
|
|
44700
|
+
"XPC1MM4dYACDfykNuXYZ5una2DsMDWL24CrYubCvarC"
|
|
44701
|
+
);
|
|
44702
|
+
new PublicKey(
|
|
44703
|
+
"ExponentnaRg3CQbW6dqQNZKXp7gtZ9DGMp1cwC4HAS7"
|
|
44704
|
+
);
|
|
44705
|
+
var EXPONENT_EVENT_AUTHORITY_SEED = "__event_authority";
|
|
44706
|
+
function deriveExponentEventAuthority() {
|
|
44707
|
+
return PublicKey.findProgramAddressSync(
|
|
44708
|
+
[Buffer.from(EXPONENT_EVENT_AUTHORITY_SEED)],
|
|
44709
|
+
EXPONENT_CORE_PROGRAM_ID
|
|
44710
|
+
)[0];
|
|
44711
|
+
}
|
|
44712
|
+
var MERGE_DISCRIMINATOR = Buffer.from([5]);
|
|
44713
|
+
function makeExponentMergeIx(accounts, amountNative) {
|
|
44714
|
+
const tokenProgram = accounts.tokenProgram ?? TOKEN_PROGRAM_ID;
|
|
44715
|
+
const eventAuthority = deriveExponentEventAuthority();
|
|
44716
|
+
const data = Buffer.alloc(MERGE_DISCRIMINATOR.length + 8);
|
|
44717
|
+
MERGE_DISCRIMINATOR.copy(data, 0);
|
|
44718
|
+
data.writeBigUInt64LE(amountNative, MERGE_DISCRIMINATOR.length);
|
|
44719
|
+
const keys = [
|
|
44720
|
+
{ pubkey: accounts.owner, isSigner: true, isWritable: true },
|
|
44721
|
+
{ pubkey: accounts.authority, isSigner: false, isWritable: true },
|
|
44722
|
+
{ pubkey: accounts.vault, isSigner: false, isWritable: true },
|
|
44723
|
+
{ pubkey: accounts.sySrcDstAta, isSigner: false, isWritable: true },
|
|
44724
|
+
{ pubkey: accounts.escrowSy, isSigner: false, isWritable: true },
|
|
44725
|
+
{ pubkey: accounts.ytSrcAta, isSigner: false, isWritable: true },
|
|
44726
|
+
{ pubkey: accounts.ptSrcAta, isSigner: false, isWritable: true },
|
|
44727
|
+
{ pubkey: accounts.mintYt, isSigner: false, isWritable: true },
|
|
44728
|
+
{ pubkey: accounts.mintPt, isSigner: false, isWritable: true },
|
|
44729
|
+
{ pubkey: tokenProgram, isSigner: false, isWritable: false },
|
|
44730
|
+
{ pubkey: accounts.syProgram, isSigner: false, isWritable: false },
|
|
44731
|
+
{ pubkey: accounts.addressLookupTable, isSigner: false, isWritable: false },
|
|
44732
|
+
{ pubkey: accounts.yieldPosition, isSigner: false, isWritable: true },
|
|
44733
|
+
{ pubkey: eventAuthority, isSigner: false, isWritable: false },
|
|
44734
|
+
{ pubkey: EXPONENT_CORE_PROGRAM_ID, isSigner: false, isWritable: false }
|
|
44735
|
+
];
|
|
44736
|
+
return new TransactionInstruction({
|
|
44737
|
+
keys,
|
|
44738
|
+
programId: EXPONENT_CORE_PROGRAM_ID,
|
|
44739
|
+
data
|
|
44740
|
+
});
|
|
44741
|
+
}
|
|
44696
44742
|
|
|
44697
44743
|
// src/vendor/klend/utils/klend/interest-rate.utils.ts
|
|
44698
44744
|
function getKaminoTotalSupply(reserve) {
|
|
@@ -50322,6 +50368,249 @@ async function buildSwapDebtFlashloanTx({
|
|
|
50322
50368
|
repayIxs
|
|
50323
50369
|
};
|
|
50324
50370
|
}
|
|
50371
|
+
async function makeRollPtTx(params) {
|
|
50372
|
+
const {
|
|
50373
|
+
program,
|
|
50374
|
+
marginfiAccount,
|
|
50375
|
+
connection,
|
|
50376
|
+
bankMap,
|
|
50377
|
+
oraclePrices,
|
|
50378
|
+
withdrawOpts,
|
|
50379
|
+
depositOpts,
|
|
50380
|
+
mergeAccounts,
|
|
50381
|
+
underlying,
|
|
50382
|
+
assetShareValueMultiplierByBank,
|
|
50383
|
+
addressLookupTableAccounts,
|
|
50384
|
+
crossbarUrl
|
|
50385
|
+
} = params;
|
|
50386
|
+
const blockhash = (await connection.getLatestBlockhash("confirmed")).blockhash;
|
|
50387
|
+
const setupIxs = await makeSetupIx({
|
|
50388
|
+
connection,
|
|
50389
|
+
authority: marginfiAccount.authority,
|
|
50390
|
+
tokens: [
|
|
50391
|
+
{ mint: withdrawOpts.withdrawBank.mint, tokenProgram: withdrawOpts.tokenProgram },
|
|
50392
|
+
{ mint: underlying.mint, tokenProgram: underlying.tokenProgram ?? TOKEN_PROGRAM_ID },
|
|
50393
|
+
{ mint: mergeAccounts.mintYt, tokenProgram: TOKEN_PROGRAM_ID },
|
|
50394
|
+
{ mint: depositOpts.depositBank.mint, tokenProgram: depositOpts.tokenProgram }
|
|
50395
|
+
]
|
|
50396
|
+
});
|
|
50397
|
+
const { flashloanTx, setupInstructions, swapQuote, withdrawIxs, depositIxs } = await buildRollPtFlashloanTx({
|
|
50398
|
+
...params,
|
|
50399
|
+
blockhash
|
|
50400
|
+
});
|
|
50401
|
+
const engineSetupInstructions = setupInstructions.filter((ix) => {
|
|
50402
|
+
if (ix.programId.equals(ComputeBudgetProgram.programId)) return false;
|
|
50403
|
+
if (ix.programId.equals(ASSOCIATED_TOKEN_PROGRAM_ID)) {
|
|
50404
|
+
const mintKey = ix.keys[3]?.pubkey;
|
|
50405
|
+
if (mintKey?.equals(withdrawOpts.withdrawBank.mint) || mintKey?.equals(underlying.mint) || mintKey?.equals(mergeAccounts.mintYt) || mintKey?.equals(depositOpts.depositBank.mint)) {
|
|
50406
|
+
return false;
|
|
50407
|
+
}
|
|
50408
|
+
}
|
|
50409
|
+
return true;
|
|
50410
|
+
});
|
|
50411
|
+
setupIxs.push(...engineSetupInstructions);
|
|
50412
|
+
const { instructions: updateFeedIxs, luts: feedLuts } = await makeSmartCrankSwbFeedIx({
|
|
50413
|
+
marginfiAccount,
|
|
50414
|
+
bankMap,
|
|
50415
|
+
oraclePrices,
|
|
50416
|
+
assetShareValueMultiplierByBank,
|
|
50417
|
+
instructions: [...withdrawIxs.instructions, ...depositIxs.instructions],
|
|
50418
|
+
program,
|
|
50419
|
+
connection,
|
|
50420
|
+
crossbarUrl
|
|
50421
|
+
});
|
|
50422
|
+
const additionalTxs = [];
|
|
50423
|
+
if (setupIxs.length > 0) {
|
|
50424
|
+
const txs = splitInstructionsToFitTransactions([], setupIxs, {
|
|
50425
|
+
blockhash,
|
|
50426
|
+
payerKey: marginfiAccount.authority,
|
|
50427
|
+
luts: addressLookupTableAccounts ?? []
|
|
50428
|
+
});
|
|
50429
|
+
additionalTxs.push(
|
|
50430
|
+
...txs.map(
|
|
50431
|
+
(tx) => addTransactionMetadata(tx, {
|
|
50432
|
+
type: "CREATE_ATA" /* CREATE_ATA */,
|
|
50433
|
+
addressLookupTables: addressLookupTableAccounts
|
|
50434
|
+
})
|
|
50435
|
+
)
|
|
50436
|
+
);
|
|
50437
|
+
}
|
|
50438
|
+
if (updateFeedIxs.length > 0) {
|
|
50439
|
+
const message = new TransactionMessage({
|
|
50440
|
+
payerKey: marginfiAccount.authority,
|
|
50441
|
+
recentBlockhash: blockhash,
|
|
50442
|
+
instructions: updateFeedIxs
|
|
50443
|
+
}).compileToV0Message(feedLuts);
|
|
50444
|
+
additionalTxs.push(
|
|
50445
|
+
addTransactionMetadata(new VersionedTransaction(message), {
|
|
50446
|
+
addressLookupTables: feedLuts,
|
|
50447
|
+
type: "CRANK" /* CRANK */
|
|
50448
|
+
})
|
|
50449
|
+
);
|
|
50450
|
+
}
|
|
50451
|
+
const transactions = [...additionalTxs, flashloanTx];
|
|
50452
|
+
return {
|
|
50453
|
+
transactions,
|
|
50454
|
+
actionTxIndex: transactions.length - 1,
|
|
50455
|
+
quoteResponse: swapQuote
|
|
50456
|
+
};
|
|
50457
|
+
}
|
|
50458
|
+
async function buildRollPtFlashloanTx({
|
|
50459
|
+
program,
|
|
50460
|
+
marginfiAccount,
|
|
50461
|
+
bankMap,
|
|
50462
|
+
withdrawOpts,
|
|
50463
|
+
depositOpts,
|
|
50464
|
+
mergeAccounts,
|
|
50465
|
+
underlying,
|
|
50466
|
+
redeemedAmountNative,
|
|
50467
|
+
swapOpts,
|
|
50468
|
+
bankMetadataMap,
|
|
50469
|
+
addressLookupTableAccounts,
|
|
50470
|
+
connection,
|
|
50471
|
+
overrideInferAccounts,
|
|
50472
|
+
blockhash,
|
|
50473
|
+
swapEngineRunner
|
|
50474
|
+
}) {
|
|
50475
|
+
const { withdrawBank, tokenProgram: withdrawTokenProgram, totalPositionAmount } = withdrawOpts;
|
|
50476
|
+
const { depositBank, tokenProgram: depositTokenProgram } = depositOpts;
|
|
50477
|
+
const authority = marginfiAccount.authority;
|
|
50478
|
+
if (withdrawOpts.withdrawAmount !== void 0 && withdrawOpts.withdrawAmount <= 0) {
|
|
50479
|
+
throw new Error("withdrawAmount must be greater than 0");
|
|
50480
|
+
}
|
|
50481
|
+
const actualWithdrawAmount = Math.min(
|
|
50482
|
+
withdrawOpts.withdrawAmount ?? totalPositionAmount,
|
|
50483
|
+
totalPositionAmount
|
|
50484
|
+
);
|
|
50485
|
+
const isFullWithdraw = isWholePosition(
|
|
50486
|
+
{ amount: totalPositionAmount, isLending: true },
|
|
50487
|
+
actualWithdrawAmount,
|
|
50488
|
+
withdrawBank.mintDecimals
|
|
50489
|
+
);
|
|
50490
|
+
const cuRequestIxs = [
|
|
50491
|
+
ComputeBudgetProgram.setComputeUnitLimit({ units: 12e5 }),
|
|
50492
|
+
ComputeBudgetProgram.setComputeUnitPrice({ microLamports: 1 })
|
|
50493
|
+
];
|
|
50494
|
+
const withdrawIxs = await makeWithdrawIx3({
|
|
50495
|
+
program,
|
|
50496
|
+
bank: withdrawBank,
|
|
50497
|
+
bankMap,
|
|
50498
|
+
tokenProgram: withdrawTokenProgram,
|
|
50499
|
+
amount: actualWithdrawAmount,
|
|
50500
|
+
marginfiAccount,
|
|
50501
|
+
authority,
|
|
50502
|
+
withdrawAll: isFullWithdraw,
|
|
50503
|
+
isSync: false,
|
|
50504
|
+
opts: { createAtas: false, wrapAndUnwrapSol: false, overrideInferAccounts }
|
|
50505
|
+
});
|
|
50506
|
+
const mergeIx = makeExponentMergeIx(
|
|
50507
|
+
mergeAccounts,
|
|
50508
|
+
BigInt(uiToNative(actualWithdrawAmount, withdrawBank.mintDecimals).toString())
|
|
50509
|
+
);
|
|
50510
|
+
const depositIxs = await makeDepositIx3({
|
|
50511
|
+
program,
|
|
50512
|
+
bank: depositBank,
|
|
50513
|
+
tokenProgram: depositTokenProgram,
|
|
50514
|
+
amount: 0,
|
|
50515
|
+
accountAddress: marginfiAccount.address,
|
|
50516
|
+
authority,
|
|
50517
|
+
group: marginfiAccount.group,
|
|
50518
|
+
opts: { wrapAndUnwrapSol: false, overrideInferAccounts }
|
|
50519
|
+
});
|
|
50520
|
+
const destinationTokenAccount = getAssociatedTokenAddressSync(
|
|
50521
|
+
depositBank.mint,
|
|
50522
|
+
authority,
|
|
50523
|
+
true,
|
|
50524
|
+
depositTokenProgram.equals(TOKEN_2022_PROGRAM_ID) ? TOKEN_2022_PROGRAM_ID : void 0
|
|
50525
|
+
);
|
|
50526
|
+
const swapConstraints = await computeFlashloanSwapConstraints({
|
|
50527
|
+
program,
|
|
50528
|
+
marginfiAccount,
|
|
50529
|
+
bankMap,
|
|
50530
|
+
bankMetadataMap,
|
|
50531
|
+
addressLookupTableAccounts: addressLookupTableAccounts ?? [],
|
|
50532
|
+
primaryIx: { type: "withdraw", bank: withdrawBank, tokenProgram: withdrawTokenProgram },
|
|
50533
|
+
secondaryIx: { type: "deposit", bank: depositBank, tokenProgram: depositTokenProgram },
|
|
50534
|
+
overrideInferAccounts
|
|
50535
|
+
});
|
|
50536
|
+
const runEngine = swapEngineRunner ?? runSwapEngine;
|
|
50537
|
+
const engineResult = await runEngine({
|
|
50538
|
+
inputMint: underlying.mint.toBase58(),
|
|
50539
|
+
outputMint: depositBank.mint.toBase58(),
|
|
50540
|
+
amountNative: Number(redeemedAmountNative),
|
|
50541
|
+
inputDecimals: underlying.decimals,
|
|
50542
|
+
outputDecimals: depositBank.mintDecimals,
|
|
50543
|
+
...swapEngineQuoteFieldsFromOpts(swapOpts),
|
|
50544
|
+
taker: authority,
|
|
50545
|
+
destinationTokenAccount,
|
|
50546
|
+
connection,
|
|
50547
|
+
footprint: {
|
|
50548
|
+
instructions: [
|
|
50549
|
+
...cuRequestIxs,
|
|
50550
|
+
...withdrawIxs.instructions,
|
|
50551
|
+
mergeIx,
|
|
50552
|
+
...depositIxs.instructions
|
|
50553
|
+
],
|
|
50554
|
+
luts: addressLookupTableAccounts ?? [],
|
|
50555
|
+
payer: authority,
|
|
50556
|
+
sizeConstraint: swapConstraints.sizeConstraint,
|
|
50557
|
+
maxSwapTotalAccounts: swapConstraints.maxSwapTotalAccounts
|
|
50558
|
+
},
|
|
50559
|
+
providers: swapEngineProvidersFromOpts(swapOpts)
|
|
50560
|
+
});
|
|
50561
|
+
const depositIxToPatch = depositIxs.instructions.find(isDepositIx);
|
|
50562
|
+
if (!depositIxToPatch) {
|
|
50563
|
+
throw new Error("roll-pt: could not locate deposit instruction for amount patching");
|
|
50564
|
+
}
|
|
50565
|
+
patchDepositAmount(depositIxToPatch, engineResult.outputAmountNative);
|
|
50566
|
+
const swapInstructions = engineResult.swapInstructions;
|
|
50567
|
+
const setupInstructions = engineResult.setupInstructions;
|
|
50568
|
+
const swapLookupTables = engineResult.swapLuts;
|
|
50569
|
+
const swapQuote = engineResult.quoteResponse;
|
|
50570
|
+
const luts = [...addressLookupTableAccounts ?? [], ...swapLookupTables];
|
|
50571
|
+
const allNonFlIxs = [
|
|
50572
|
+
...cuRequestIxs,
|
|
50573
|
+
...withdrawIxs.instructions,
|
|
50574
|
+
mergeIx,
|
|
50575
|
+
...swapInstructions,
|
|
50576
|
+
...depositIxs.instructions
|
|
50577
|
+
];
|
|
50578
|
+
if (swapInstructions.length > 0) {
|
|
50579
|
+
compileFlashloanPrecheck({
|
|
50580
|
+
allIxs: allNonFlIxs,
|
|
50581
|
+
payer: authority,
|
|
50582
|
+
luts,
|
|
50583
|
+
sizeConstraint: swapConstraints.sizeConstraint,
|
|
50584
|
+
swapIxCount: swapInstructions.length,
|
|
50585
|
+
swapLutCount: swapLookupTables.length
|
|
50586
|
+
});
|
|
50587
|
+
}
|
|
50588
|
+
const flashloanTx = await makeFlashLoanTx({
|
|
50589
|
+
program,
|
|
50590
|
+
marginfiAccount,
|
|
50591
|
+
bankMap,
|
|
50592
|
+
addressLookupTableAccounts: luts,
|
|
50593
|
+
blockhash,
|
|
50594
|
+
ixs: allNonFlIxs,
|
|
50595
|
+
isSync: false
|
|
50596
|
+
});
|
|
50597
|
+
const txSize = getTxSize(flashloanTx);
|
|
50598
|
+
const totalKeys = getTotalAccountKeys(flashloanTx);
|
|
50599
|
+
if (txSize > MAX_TX_SIZE || totalKeys > MAX_ACCOUNT_LOCKS) {
|
|
50600
|
+
throw TransactionBuildingError.swapSizeExceededPositionSwap(
|
|
50601
|
+
txSize,
|
|
50602
|
+
totalKeys,
|
|
50603
|
+
swapOpts.swapConfig?.provider
|
|
50604
|
+
);
|
|
50605
|
+
}
|
|
50606
|
+
return {
|
|
50607
|
+
flashloanTx,
|
|
50608
|
+
setupInstructions,
|
|
50609
|
+
swapQuote,
|
|
50610
|
+
withdrawIxs,
|
|
50611
|
+
depositIxs
|
|
50612
|
+
};
|
|
50613
|
+
}
|
|
50325
50614
|
|
|
50326
50615
|
// src/services/account/services/account-simulation.service.ts
|
|
50327
50616
|
async function simulateAccountHealthCacheWithFallback(params) {
|
|
@@ -56334,6 +56623,6 @@ var EmodeSettings = class _EmodeSettings {
|
|
|
56334
56623
|
}
|
|
56335
56624
|
};
|
|
56336
56625
|
|
|
56337
|
-
export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, AccountType, AssetTag, BUNDLE_TX_SIZE, Balance, Bank, BankConfig, BankConfigFlag, BankVaultType, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, EMPTY_HEALTH_CACHE, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodeSettings, EmodeTag, FLASHLOAN_ENABLED_FLAG, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, HealthCacheStatus, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, LST_MINT, MARGINFI_IDL, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MarginRequirementType, MarginfiAccount, MarginfiAccountWrapper, MarginfiGroup, OperationalState, OracleSetup, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, 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, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, Project0Client, RiskTier, SINGLE_POOL_PROGRAM_ID, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SwapProvider, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionArenaKeyMap, TransactionBuildingError, TransactionBuildingErrorCode, TransactionConfigMap, TransactionType, USDC_DECIMALS, USDC_MINT, WSOL_MINT, ZERO_ORACLE_KEY, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkJupiterFeeAccount, checkMultipleOraclesCrankability, checkTitanFeeAccount, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deserializeInstruction, deserializeLut, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterReferralFeeAccount, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isDepositIx, isFlashloan, isV0Tx, isWeightedPrice, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx3 as makeBeginFlashLoanIx, makeBorrowIx3 as makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx3 as makeDepositIx, makeDepositTx, makeDriftDepositIx3 as makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx3 as makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx3 as makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx2 as makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx2 as makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx3 as makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx3 as makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx3 as makePoolAddBankIx, makePoolConfigureBankIx3 as makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx2 as makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshKaminoBanksIxs, makeRepayIx3 as makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx3 as makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, resolveAmount, runSwapEngine, serializeBankConfigOpt, serializeInstruction, serializeInterestRateConfig, serializeLut, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, serializeSwapEngineRequest, serializeSwapEngineResult, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
|
|
56626
|
+
export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, AccountType, AssetTag, BUNDLE_TX_SIZE, Balance, Bank, BankConfig, BankConfigFlag, BankVaultType, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, EMPTY_HEALTH_CACHE, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodeSettings, EmodeTag, FLASHLOAN_ENABLED_FLAG, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, HealthCacheStatus, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, LST_MINT, MARGINFI_IDL, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MarginRequirementType, MarginfiAccount, MarginfiAccountWrapper, MarginfiGroup, OperationalState, OracleSetup, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, 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, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, Project0Client, RiskTier, SINGLE_POOL_PROGRAM_ID, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SwapProvider, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionArenaKeyMap, TransactionBuildingError, TransactionBuildingErrorCode, TransactionConfigMap, TransactionType, USDC_DECIMALS, USDC_MINT, WSOL_MINT, ZERO_ORACLE_KEY, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkJupiterFeeAccount, checkMultipleOraclesCrankability, checkTitanFeeAccount, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deserializeInstruction, deserializeLut, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterReferralFeeAccount, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isDepositIx, isFlashloan, isV0Tx, isWeightedPrice, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx3 as makeBeginFlashLoanIx, makeBorrowIx3 as makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx3 as makeDepositIx, makeDepositTx, makeDriftDepositIx3 as makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx3 as makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx3 as makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx2 as makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx2 as makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx3 as makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx3 as makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx3 as makePoolAddBankIx, makePoolConfigureBankIx3 as makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx2 as makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshKaminoBanksIxs, makeRepayIx3 as makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx3 as makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, resolveAmount, runSwapEngine, serializeBankConfigOpt, serializeInstruction, serializeInterestRateConfig, serializeLut, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, serializeSwapEngineRequest, serializeSwapEngineResult, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
|
|
56338
56627
|
//# sourceMappingURL=index.js.map
|
|
56339
56628
|
//# sourceMappingURL=index.js.map
|