@0dotxyz/p0-ts-sdk 2.2.3 → 2.2.4
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/{dto-rate-model.types-AQ40wS-P.d.cts → dto-rate-model.types-DveIB9Ll.d.cts} +1 -1
- package/dist/{dto-rate-model.types-AQ40wS-P.d.ts → dto-rate-model.types-DveIB9Ll.d.ts} +1 -1
- package/dist/index.cjs +231 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -16
- package/dist/index.d.ts +55 -16
- package/dist/index.js +232 -98
- package/dist/index.js.map +1 -1
- package/dist/instructions.cjs +10 -2
- package/dist/instructions.cjs.map +1 -1
- package/dist/instructions.d.cts +3 -2
- package/dist/instructions.d.ts +3 -2
- package/dist/instructions.js +10 -2
- package/dist/instructions.js.map +1 -1
- package/dist/jupiter.cjs +61 -0
- package/dist/jupiter.cjs.map +1 -0
- package/dist/jupiter.d.cts +124 -0
- package/dist/jupiter.d.ts +124 -0
- package/dist/jupiter.js +58 -0
- package/dist/jupiter.js.map +1 -0
- package/dist/{types-DGWxbPM1.d.ts → types-CsLjciLo.d.cts} +2 -2
- package/dist/{types-ZvnTjjh4.d.cts → types-DuCxJVOn.d.ts} +2 -2
- package/dist/vendor.d.cts +2 -2
- package/dist/vendor.d.ts +2 -2
- package/package.json +6 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PublicKey, SolanaJSONRPCError, ComputeBudgetProgram, SystemProgram, TransactionMessage, VersionedTransaction, Transaction, AddressLookupTableAccount, SYSVAR_RENT_PUBKEY, StakeProgram, TransactionInstruction, LAMPORTS_PER_SOL,
|
|
1
|
+
import { PublicKey, SolanaJSONRPCError, ComputeBudgetProgram, SystemProgram, TransactionMessage, VersionedTransaction, Keypair, Transaction, AddressLookupTableAccount, SYSVAR_RENT_PUBKEY, StakeProgram, TransactionInstruction, LAMPORTS_PER_SOL, StakeAuthorizationLayout, SYSVAR_INSTRUCTIONS_PUBKEY, STAKE_CONFIG_ID as STAKE_CONFIG_ID$1 } from '@solana/web3.js';
|
|
2
2
|
import { object, string, enums, array, assert } from 'superstruct';
|
|
3
3
|
import BigNumber3, { BigNumber } from 'bignumber.js';
|
|
4
4
|
import BN11, { BN } from 'bn.js';
|
|
@@ -12,7 +12,6 @@ import * as borsh from '@coral-xyz/borsh';
|
|
|
12
12
|
import { struct as struct$1, bool as bool$1, publicKey as publicKey$1, array as array$1, u64 as u64$1, u8 as u8$1, u32 as u32$1, u128 } from '@coral-xyz/borsh';
|
|
13
13
|
import WebSocket from 'ws';
|
|
14
14
|
import { Encoder, Decoder } from '@msgpack/msgpack';
|
|
15
|
-
import { SwapApi, Configuration, createJupiterApiClient } from '@jup-ag/api';
|
|
16
15
|
import { AnchorUtils, PullFeed } from '@switchboard-xyz/on-demand';
|
|
17
16
|
import { CrossbarClient } from '@switchboard-xyz/common';
|
|
18
17
|
|
|
@@ -15602,12 +15601,20 @@ function makeEndFlashLoanIx(mfiProgram, accounts, remainingAccounts = []) {
|
|
|
15602
15601
|
}).accountsPartial(optionalAccounts).remainingAccounts(remainingAccounts).instruction();
|
|
15603
15602
|
}
|
|
15604
15603
|
async function makeAccountTransferToNewAccountIx(mfProgram, accounts) {
|
|
15605
|
-
const {
|
|
15604
|
+
const {
|
|
15605
|
+
oldMarginfiAccount,
|
|
15606
|
+
newMarginfiAccount,
|
|
15607
|
+
newAuthority,
|
|
15608
|
+
globalFeeWallet,
|
|
15609
|
+
feePayer,
|
|
15610
|
+
...optionalAccounts
|
|
15611
|
+
} = accounts;
|
|
15606
15612
|
return mfProgram.methods.transferToNewAccount().accounts({
|
|
15607
15613
|
oldMarginfiAccount,
|
|
15608
15614
|
newMarginfiAccount,
|
|
15609
15615
|
newAuthority,
|
|
15610
|
-
globalFeeWallet
|
|
15616
|
+
globalFeeWallet,
|
|
15617
|
+
feePayer
|
|
15611
15618
|
}).accountsPartial(optionalAccounts).instruction();
|
|
15612
15619
|
}
|
|
15613
15620
|
async function makeGroupInitIx(mfProgram, accounts) {
|
|
@@ -20501,16 +20508,77 @@ function createActiveEmodePairFromPairs(pairs) {
|
|
|
20501
20508
|
assetWeightInit: bestPair.assetWeightInit
|
|
20502
20509
|
};
|
|
20503
20510
|
}
|
|
20511
|
+
function indexConfiguredPairs(emodePairs) {
|
|
20512
|
+
const configured = [];
|
|
20513
|
+
const liabTagByBank = /* @__PURE__ */ new Map();
|
|
20514
|
+
for (const p of emodePairs) {
|
|
20515
|
+
if (p.collateralBankTag === 0 /* UNSET */ || p.liabilityBankTag === 0 /* UNSET */) {
|
|
20516
|
+
continue;
|
|
20517
|
+
}
|
|
20518
|
+
const liabStr = p.liabilityBank.toBase58();
|
|
20519
|
+
const liabTagStr = p.liabilityBankTag.toString();
|
|
20520
|
+
configured.push({
|
|
20521
|
+
orig: p,
|
|
20522
|
+
liabStr,
|
|
20523
|
+
liabTagStr,
|
|
20524
|
+
collTagStr: p.collateralBankTag.toString(),
|
|
20525
|
+
collStrs: p.collateralBanks.map((b) => b.toBase58())
|
|
20526
|
+
});
|
|
20527
|
+
liabTagByBank.set(liabStr, liabTagStr);
|
|
20528
|
+
}
|
|
20529
|
+
return { configured, liabTagByBank };
|
|
20530
|
+
}
|
|
20531
|
+
function activePairsFromIndex(configured, liabTagByBank, liabSet, collSet) {
|
|
20532
|
+
const requiredTags = /* @__PURE__ */ new Set();
|
|
20533
|
+
for (const liab of liabSet) {
|
|
20534
|
+
const tag = liabTagByBank.get(liab);
|
|
20535
|
+
if (!tag) return [];
|
|
20536
|
+
requiredTags.add(tag);
|
|
20537
|
+
}
|
|
20538
|
+
const possible = configured.filter(
|
|
20539
|
+
(p) => liabSet.has(p.liabStr) && p.collStrs.some((c) => collSet.has(c))
|
|
20540
|
+
);
|
|
20541
|
+
if (possible.length === 0) return [];
|
|
20542
|
+
const byCollTag = {};
|
|
20543
|
+
for (const p of possible) {
|
|
20544
|
+
(byCollTag[p.collTagStr] ||= []).push(p);
|
|
20545
|
+
}
|
|
20546
|
+
const validGroups = [];
|
|
20547
|
+
for (const group of Object.values(byCollTag)) {
|
|
20548
|
+
const supports = new Set(group.map((p) => p.liabTagStr));
|
|
20549
|
+
let coversAll = true;
|
|
20550
|
+
for (const rt of requiredTags) {
|
|
20551
|
+
if (!supports.has(rt)) {
|
|
20552
|
+
coversAll = false;
|
|
20553
|
+
break;
|
|
20554
|
+
}
|
|
20555
|
+
}
|
|
20556
|
+
if (coversAll) validGroups.push(group);
|
|
20557
|
+
}
|
|
20558
|
+
if (validGroups.length === 0) return [];
|
|
20559
|
+
return validGroups.flat().map((p) => p.orig);
|
|
20560
|
+
}
|
|
20504
20561
|
function computeEmodeImpacts(emodePairs, activeLiabilities, activeCollateral, allBanks) {
|
|
20505
|
-
const
|
|
20506
|
-
const
|
|
20507
|
-
const
|
|
20508
|
-
const
|
|
20562
|
+
const activeLiabilitiesSet = new Set(activeLiabilities.map((b) => b.toBase58()));
|
|
20563
|
+
const activeCollateralSet = new Set(activeCollateral.map((b) => b.toBase58()));
|
|
20564
|
+
const { configured, liabTagByBank } = indexConfiguredPairs(emodePairs);
|
|
20565
|
+
const liabTagMapAll = /* @__PURE__ */ new Map();
|
|
20566
|
+
for (const p of emodePairs) {
|
|
20567
|
+
liabTagMapAll.set(p.liabilityBank.toBase58(), p.liabilityBankTag.toString());
|
|
20568
|
+
}
|
|
20569
|
+
const allCollateralBankStrs = /* @__PURE__ */ new Set();
|
|
20509
20570
|
for (const p of emodePairs) {
|
|
20510
|
-
|
|
20571
|
+
for (const c of p.collateralBanks) allCollateralBankStrs.add(c.toBase58());
|
|
20511
20572
|
}
|
|
20573
|
+
const basePairs = activePairsFromIndex(
|
|
20574
|
+
configured,
|
|
20575
|
+
liabTagByBank,
|
|
20576
|
+
activeLiabilitiesSet,
|
|
20577
|
+
activeCollateralSet
|
|
20578
|
+
);
|
|
20579
|
+
const baseOn = basePairs.length > 0;
|
|
20512
20580
|
const existingTags = new Set(
|
|
20513
|
-
|
|
20581
|
+
Array.from(activeLiabilitiesSet).map((l) => liabTagMapAll.get(l)).filter((t) => !!t)
|
|
20514
20582
|
);
|
|
20515
20583
|
function minWeight(ps) {
|
|
20516
20584
|
let m = ps[0].assetWeightInit;
|
|
@@ -20527,27 +20595,26 @@ function computeEmodeImpacts(emodePairs, activeLiabilities, activeCollateral, al
|
|
|
20527
20595
|
if (aMin.lt(bMin)) return 3 /* ReduceEmode */;
|
|
20528
20596
|
return 1 /* ExtendEmode */;
|
|
20529
20597
|
}
|
|
20530
|
-
function simulate(
|
|
20531
|
-
|
|
20532
|
-
let L = [...activeLiabilities], C = [...activeCollateral];
|
|
20598
|
+
function simulate(bankStr, action) {
|
|
20599
|
+
const L = new Set(activeLiabilitiesSet), C = new Set(activeCollateralSet);
|
|
20533
20600
|
switch (action) {
|
|
20534
20601
|
case "borrow":
|
|
20535
|
-
|
|
20602
|
+
L.add(bankStr);
|
|
20536
20603
|
break;
|
|
20537
20604
|
case "repay":
|
|
20538
|
-
L
|
|
20605
|
+
L.delete(bankStr);
|
|
20539
20606
|
break;
|
|
20540
20607
|
case "supply":
|
|
20541
|
-
|
|
20608
|
+
C.add(bankStr);
|
|
20542
20609
|
break;
|
|
20543
20610
|
case "withdraw":
|
|
20544
|
-
C
|
|
20611
|
+
C.delete(bankStr);
|
|
20545
20612
|
break;
|
|
20546
20613
|
}
|
|
20547
|
-
const after =
|
|
20614
|
+
const after = activePairsFromIndex(configured, liabTagByBank, L, C);
|
|
20548
20615
|
let status = diffState(basePairs, after);
|
|
20549
20616
|
if (action === "borrow") {
|
|
20550
|
-
const tag =
|
|
20617
|
+
const tag = liabTagMapAll.get(bankStr);
|
|
20551
20618
|
if (!tag) {
|
|
20552
20619
|
status = baseOn ? 4 /* RemoveEmode */ : 5 /* InactiveEmode */;
|
|
20553
20620
|
} else if (baseOn) {
|
|
@@ -20583,66 +20650,29 @@ function computeEmodeImpacts(emodePairs, activeLiabilities, activeCollateral, al
|
|
|
20583
20650
|
}
|
|
20584
20651
|
const result = {};
|
|
20585
20652
|
for (const bank of allBanks) {
|
|
20586
|
-
const key =
|
|
20653
|
+
const key = bank.toBase58();
|
|
20587
20654
|
const impact = {};
|
|
20588
|
-
if (!
|
|
20589
|
-
impact.borrowImpact = simulate(
|
|
20655
|
+
if (!activeCollateralSet.has(key)) {
|
|
20656
|
+
impact.borrowImpact = simulate(key, "borrow");
|
|
20590
20657
|
}
|
|
20591
|
-
|
|
20592
|
-
|
|
20593
|
-
impact.supplyImpact = simulate(bank, "supply");
|
|
20658
|
+
if (allCollateralBankStrs.has(key) && !activeCollateralSet.has(key) && !activeLiabilitiesSet.has(key)) {
|
|
20659
|
+
impact.supplyImpact = simulate(key, "supply");
|
|
20594
20660
|
}
|
|
20595
|
-
if (
|
|
20596
|
-
impact.repayAllImpact = simulate(
|
|
20661
|
+
if (activeLiabilitiesSet.has(key)) {
|
|
20662
|
+
impact.repayAllImpact = simulate(key, "repay");
|
|
20597
20663
|
}
|
|
20598
|
-
if (
|
|
20599
|
-
impact.withdrawAllImpact = simulate(
|
|
20664
|
+
if (activeCollateralSet.has(key)) {
|
|
20665
|
+
impact.withdrawAllImpact = simulate(key, "withdraw");
|
|
20600
20666
|
}
|
|
20601
20667
|
result[key] = impact;
|
|
20602
20668
|
}
|
|
20603
20669
|
return result;
|
|
20604
20670
|
}
|
|
20605
20671
|
function computeActiveEmodePairs(emodePairs, activeLiabilities, activeCollateral) {
|
|
20606
|
-
const configured = emodePairs
|
|
20607
|
-
|
|
20608
|
-
);
|
|
20609
|
-
|
|
20610
|
-
for (const p of configured) {
|
|
20611
|
-
liabTagByBank.set(p.liabilityBank.toBase58(), p.liabilityBankTag.toString());
|
|
20612
|
-
}
|
|
20613
|
-
const requiredTags = /* @__PURE__ */ new Set();
|
|
20614
|
-
for (const liab of activeLiabilities) {
|
|
20615
|
-
const tag = liabTagByBank.get(liab.toBase58());
|
|
20616
|
-
if (!tag) {
|
|
20617
|
-
return [];
|
|
20618
|
-
}
|
|
20619
|
-
requiredTags.add(tag);
|
|
20620
|
-
}
|
|
20621
|
-
const possible = configured.filter(
|
|
20622
|
-
(p) => activeLiabilities.some((l) => l.equals(p.liabilityBank)) && p.collateralBanks.some((c) => activeCollateral.some((a) => a.equals(c)))
|
|
20623
|
-
);
|
|
20624
|
-
if (possible.length === 0) return [];
|
|
20625
|
-
const byCollTag = {};
|
|
20626
|
-
for (const p of possible) {
|
|
20627
|
-
const ct = p.collateralBankTag.toString();
|
|
20628
|
-
(byCollTag[ct] ||= []).push(p);
|
|
20629
|
-
}
|
|
20630
|
-
const validGroups = [];
|
|
20631
|
-
for (const group of Object.values(byCollTag)) {
|
|
20632
|
-
const supports = new Set(group.map((p) => p.liabilityBankTag.toString()));
|
|
20633
|
-
let coversAll = true;
|
|
20634
|
-
for (const rt of requiredTags) {
|
|
20635
|
-
if (!supports.has(rt)) {
|
|
20636
|
-
coversAll = false;
|
|
20637
|
-
break;
|
|
20638
|
-
}
|
|
20639
|
-
}
|
|
20640
|
-
if (coversAll) {
|
|
20641
|
-
validGroups.push(group);
|
|
20642
|
-
}
|
|
20643
|
-
}
|
|
20644
|
-
if (validGroups.length === 0) return [];
|
|
20645
|
-
return validGroups.flat();
|
|
20672
|
+
const { configured, liabTagByBank } = indexConfiguredPairs(emodePairs);
|
|
20673
|
+
const liabSet = new Set(activeLiabilities.map((b) => b.toBase58()));
|
|
20674
|
+
const collSet = new Set(activeCollateral.map((b) => b.toBase58()));
|
|
20675
|
+
return activePairsFromIndex(configured, liabTagByBank, liabSet, collSet);
|
|
20646
20676
|
}
|
|
20647
20677
|
function computeBalanceUsdValue(params) {
|
|
20648
20678
|
const {
|
|
@@ -36061,6 +36091,48 @@ async function makeCloseMarginfiAccountTx({
|
|
|
36061
36091
|
);
|
|
36062
36092
|
return closeTx;
|
|
36063
36093
|
}
|
|
36094
|
+
async function makeAccountTransferToNewAccountTx({
|
|
36095
|
+
connection,
|
|
36096
|
+
program,
|
|
36097
|
+
marginfiAccount,
|
|
36098
|
+
newMarginfiAccount,
|
|
36099
|
+
newAuthority,
|
|
36100
|
+
feePayer
|
|
36101
|
+
}) {
|
|
36102
|
+
const feePayerKey = feePayer instanceof Keypair ? feePayer.publicKey : feePayer ?? marginfiAccount.authority;
|
|
36103
|
+
const [feeStateKey] = PublicKey.findProgramAddressSync(
|
|
36104
|
+
[Buffer.from("feestate", "utf-8")],
|
|
36105
|
+
program.programId
|
|
36106
|
+
);
|
|
36107
|
+
const feeState = await program.account.feeState.fetch(feeStateKey);
|
|
36108
|
+
const transferIx = await instructions_default.makeAccountTransferToNewAccountIx(program, {
|
|
36109
|
+
oldMarginfiAccount: marginfiAccount.address,
|
|
36110
|
+
newMarginfiAccount: newMarginfiAccount.publicKey,
|
|
36111
|
+
newAuthority,
|
|
36112
|
+
globalFeeWallet: feeState.globalFeeWallet,
|
|
36113
|
+
feePayer: feePayerKey
|
|
36114
|
+
});
|
|
36115
|
+
const {
|
|
36116
|
+
value: { blockhash }
|
|
36117
|
+
} = await connection.getLatestBlockhashAndContext("confirmed");
|
|
36118
|
+
const signers = [newMarginfiAccount];
|
|
36119
|
+
if (feePayer instanceof Keypair) signers.push(feePayer);
|
|
36120
|
+
const transferTx = addTransactionMetadata(
|
|
36121
|
+
new VersionedTransaction(
|
|
36122
|
+
new TransactionMessage({
|
|
36123
|
+
instructions: [transferIx],
|
|
36124
|
+
payerKey: feePayerKey,
|
|
36125
|
+
recentBlockhash: blockhash
|
|
36126
|
+
}).compileToV0Message([])
|
|
36127
|
+
),
|
|
36128
|
+
{
|
|
36129
|
+
signers,
|
|
36130
|
+
addressLookupTables: [],
|
|
36131
|
+
type: "TRANSFER_AUTH" /* TRANSFER_AUTH */
|
|
36132
|
+
}
|
|
36133
|
+
);
|
|
36134
|
+
return transferTx;
|
|
36135
|
+
}
|
|
36064
36136
|
async function makeCreateAccountTxWithProjection(props) {
|
|
36065
36137
|
const [marginfiAccountAddress] = deriveMarginfiAccount(
|
|
36066
36138
|
props.program.programId,
|
|
@@ -49131,6 +49203,61 @@ function computeMaxWithdrawForBank(params) {
|
|
|
49131
49203
|
const maxWithdraw = initUntiedCollateralForBank.div(initWeightedPrice);
|
|
49132
49204
|
return maxWithdraw;
|
|
49133
49205
|
}
|
|
49206
|
+
|
|
49207
|
+
// src/vendor/jupiter/client.ts
|
|
49208
|
+
var DEFAULT_BASE_PATH = "https://lite-api.jup.ag/swap/v1";
|
|
49209
|
+
var JupiterApiError = class _JupiterApiError extends Error {
|
|
49210
|
+
status;
|
|
49211
|
+
body;
|
|
49212
|
+
constructor(status, body) {
|
|
49213
|
+
super(`Jupiter API request failed with status ${status}: ${body}`);
|
|
49214
|
+
this.name = "JupiterApiError";
|
|
49215
|
+
Object.setPrototypeOf(this, _JupiterApiError.prototype);
|
|
49216
|
+
this.status = status;
|
|
49217
|
+
this.body = body;
|
|
49218
|
+
}
|
|
49219
|
+
};
|
|
49220
|
+
function buildQuoteSearchParams(request) {
|
|
49221
|
+
const params = new URLSearchParams();
|
|
49222
|
+
for (const [key, value] of Object.entries(request)) {
|
|
49223
|
+
if (value === void 0 || value === null) continue;
|
|
49224
|
+
if (Array.isArray(value)) {
|
|
49225
|
+
if (value.length > 0) params.append(key, value.join(","));
|
|
49226
|
+
continue;
|
|
49227
|
+
}
|
|
49228
|
+
params.append(key, String(value));
|
|
49229
|
+
}
|
|
49230
|
+
return params;
|
|
49231
|
+
}
|
|
49232
|
+
function createJupiterClient(config = {}) {
|
|
49233
|
+
const basePath = (config.basePath ?? DEFAULT_BASE_PATH).replace(/\/+$/, "");
|
|
49234
|
+
const baseHeaders = { ...config.headers };
|
|
49235
|
+
if (config.apiKey) baseHeaders["x-api-key"] = config.apiKey;
|
|
49236
|
+
const request = async (path, init) => {
|
|
49237
|
+
const response = await fetch(`${basePath}${path}`, init);
|
|
49238
|
+
if (!response.ok) {
|
|
49239
|
+
const body = await response.text().catch(() => "");
|
|
49240
|
+
throw new JupiterApiError(response.status, body);
|
|
49241
|
+
}
|
|
49242
|
+
return await response.json();
|
|
49243
|
+
};
|
|
49244
|
+
return {
|
|
49245
|
+
quoteGet(quoteRequest) {
|
|
49246
|
+
const search = buildQuoteSearchParams(quoteRequest);
|
|
49247
|
+
return request(`/quote?${search.toString()}`, {
|
|
49248
|
+
method: "GET",
|
|
49249
|
+
headers: baseHeaders
|
|
49250
|
+
});
|
|
49251
|
+
},
|
|
49252
|
+
swapInstructionsPost({ swapRequest }) {
|
|
49253
|
+
return request(`/swap-instructions`, {
|
|
49254
|
+
method: "POST",
|
|
49255
|
+
headers: { ...baseHeaders, "content-type": "application/json" },
|
|
49256
|
+
body: JSON.stringify(swapRequest)
|
|
49257
|
+
});
|
|
49258
|
+
}
|
|
49259
|
+
};
|
|
49260
|
+
}
|
|
49134
49261
|
var TITAN_FEE_WALLET = new PublicKey("FEES6XLN7dMz2iBwKab9Hri9Kwc4WJ6TmDAiT4BNhyej");
|
|
49135
49262
|
var getTitanFeeAccount = (mint) => {
|
|
49136
49263
|
return getAssociatedTokenAddressSync(mint, TITAN_FEE_WALLET, true);
|
|
@@ -49508,15 +49635,17 @@ function getExactOutProviderFn({
|
|
|
49508
49635
|
});
|
|
49509
49636
|
case "JUPITER" /* JUPITER */:
|
|
49510
49637
|
return async () => {
|
|
49511
|
-
const
|
|
49512
|
-
const jupiterApiClient = configParams?.basePath ? new SwapApi(new Configuration(configParams)) : createJupiterApiClient(configParams);
|
|
49638
|
+
const jupiterApiClient = createJupiterClient(toJupiterConfig(apiConfig));
|
|
49513
49639
|
const estimateQuote = await jupiterApiClient.quoteGet({
|
|
49514
49640
|
inputMint,
|
|
49515
49641
|
outputMint,
|
|
49516
49642
|
amount,
|
|
49517
49643
|
swapMode: "ExactOut",
|
|
49518
49644
|
dynamicSlippage: swapOpts.swapConfig ? swapOpts.swapConfig.slippageMode === "DYNAMIC" : true,
|
|
49519
|
-
slippageBps: swapOpts.swapConfig?.slippageBps
|
|
49645
|
+
slippageBps: swapOpts.swapConfig?.slippageBps,
|
|
49646
|
+
// Match the bundle-compatible routing used by the executed flashloan
|
|
49647
|
+
// swap so the ExactOut estimate reflects an achievable route.
|
|
49648
|
+
forJitoBundle: true
|
|
49520
49649
|
});
|
|
49521
49650
|
const quoteResult = mapJupiterQuoteToSwapQuoteResult(estimateQuote);
|
|
49522
49651
|
return { otherAmountThreshold: quoteResult.otherAmountThreshold, quoteResult };
|
|
@@ -49672,7 +49801,7 @@ function toJupiterConfig(apiConfig) {
|
|
|
49672
49801
|
if (!apiConfig) return void 0;
|
|
49673
49802
|
return {
|
|
49674
49803
|
basePath: apiConfig.basePath,
|
|
49675
|
-
apiKey: apiConfig.apiKey
|
|
49804
|
+
apiKey: apiConfig.apiKey,
|
|
49676
49805
|
headers: apiConfig.headers
|
|
49677
49806
|
};
|
|
49678
49807
|
}
|
|
@@ -49684,8 +49813,7 @@ var getJupiterSwapIxsForFlashloan = async ({
|
|
|
49684
49813
|
apiConfig,
|
|
49685
49814
|
maxSwapAccounts
|
|
49686
49815
|
}) => {
|
|
49687
|
-
const
|
|
49688
|
-
const jupiterApiClient = configParams?.basePath ? new SwapApi(new Configuration(configParams)) : createJupiterApiClient(configParams);
|
|
49816
|
+
const jupiterApiClient = createJupiterClient(toJupiterConfig(apiConfig));
|
|
49689
49817
|
const feeMint = quoteParams.swapMode === "ExactIn" ? quoteParams.outputMint : quoteParams.inputMint;
|
|
49690
49818
|
const { feeAccount, hasFeeAccount } = await checkFeeAccount(connection, new PublicKey(feeMint));
|
|
49691
49819
|
const project0JupiterLut = (await connection.getAddressLookupTable(ADDRESS_LOOKUP_TABLE_FOR_SWAP))?.value;
|
|
@@ -49704,7 +49832,10 @@ var getJupiterSwapIxsForFlashloan = async ({
|
|
|
49704
49832
|
const maxAccounts = maxSwapAccounts !== void 0 ? maxSwapAccounts - JUPITER_MAX_ACCOUNTS_MARGIN : 40;
|
|
49705
49833
|
const swapQuote = await jupiterApiClient.quoteGet({
|
|
49706
49834
|
...finalQuoteParams,
|
|
49707
|
-
maxAccounts
|
|
49835
|
+
maxAccounts,
|
|
49836
|
+
// Flashloan swaps are landed via a Jito bundle, so restrict routing to
|
|
49837
|
+
// bundle-compatible DEXes (excludes e.g. HumidiFi).
|
|
49838
|
+
forJitoBundle: true
|
|
49708
49839
|
});
|
|
49709
49840
|
const swapInstructionResponse = await jupiterApiClient.swapInstructionsPost({
|
|
49710
49841
|
swapRequest: {
|
|
@@ -54039,29 +54170,29 @@ var MarginfiAccount = class _MarginfiAccount {
|
|
|
54039
54170
|
return makeEndFlashLoanIx3(program, this.address, banks, authority);
|
|
54040
54171
|
}
|
|
54041
54172
|
/**
|
|
54042
|
-
*
|
|
54173
|
+
* Builds a transaction to transfer this account to a new authority.
|
|
54043
54174
|
*
|
|
54044
|
-
*
|
|
54175
|
+
* Thin wrapper over the {@link makeAccountTransferToNewAccountTx} action,
|
|
54176
|
+
* injecting the connection and this account from context. The global fee
|
|
54177
|
+
* wallet is derived inside the action from the program's fee state.
|
|
54045
54178
|
*
|
|
54046
54179
|
* @param program - The Marginfi program instance
|
|
54047
|
-
* @param newMarginfiAccount -
|
|
54180
|
+
* @param newMarginfiAccount - Freshly generated keypair for the destination account
|
|
54048
54181
|
* @param newAuthority - The new authority public key
|
|
54182
|
+
* @param feePayer - Optional `PublicKey` (adapter-signed) or `Keypair` (separate
|
|
54183
|
+
* payer); defaults to this account's authority
|
|
54049
54184
|
*
|
|
54050
|
-
* @returns Promise resolving to
|
|
54051
|
-
*
|
|
54052
|
-
* @see {@link makeAccountTransferToNewAccountIx} for implementation
|
|
54185
|
+
* @returns Promise resolving to the transfer transaction
|
|
54053
54186
|
*/
|
|
54054
|
-
async
|
|
54055
|
-
|
|
54187
|
+
async makeAccountTransferToNewAccountTx(program, newMarginfiAccount, newAuthority, feePayer) {
|
|
54188
|
+
return makeAccountTransferToNewAccountTx({
|
|
54189
|
+
connection: program.provider.connection,
|
|
54056
54190
|
program,
|
|
54057
|
-
|
|
54058
|
-
|
|
54059
|
-
|
|
54060
|
-
|
|
54061
|
-
|
|
54062
|
-
}
|
|
54063
|
-
);
|
|
54064
|
-
return { instructions: [accountTransferToNewAccountIx], keys: [] };
|
|
54191
|
+
marginfiAccount: this,
|
|
54192
|
+
newMarginfiAccount,
|
|
54193
|
+
newAuthority,
|
|
54194
|
+
feePayer
|
|
54195
|
+
});
|
|
54065
54196
|
}
|
|
54066
54197
|
/**
|
|
54067
54198
|
* Creates an instruction to close this marginfi account.
|
|
@@ -54709,16 +54840,19 @@ var MarginfiAccountWrapper = class {
|
|
|
54709
54840
|
);
|
|
54710
54841
|
}
|
|
54711
54842
|
/**
|
|
54712
|
-
*
|
|
54843
|
+
* Builds a transaction to transfer this account to a new authority.
|
|
54713
54844
|
*
|
|
54714
|
-
* @param newMarginfiAccount -
|
|
54845
|
+
* @param newMarginfiAccount - Freshly generated keypair for the destination account
|
|
54715
54846
|
* @param newAuthority - New authority public key
|
|
54847
|
+
* @param feePayer - Optional `PublicKey` (adapter-signed) or `Keypair` (separate
|
|
54848
|
+
* payer); defaults to this account's authority
|
|
54716
54849
|
*/
|
|
54717
|
-
async
|
|
54718
|
-
return this.account.
|
|
54850
|
+
async makeAccountTransferToNewAccountTx(newMarginfiAccount, newAuthority, feePayer) {
|
|
54851
|
+
return this.account.makeAccountTransferToNewAccountTx(
|
|
54719
54852
|
this.client.program,
|
|
54720
54853
|
newMarginfiAccount,
|
|
54721
|
-
newAuthority
|
|
54854
|
+
newAuthority,
|
|
54855
|
+
feePayer
|
|
54722
54856
|
);
|
|
54723
54857
|
}
|
|
54724
54858
|
/**
|
|
@@ -55513,6 +55647,6 @@ var EmodeSettings = class _EmodeSettings {
|
|
|
55513
55647
|
}
|
|
55514
55648
|
};
|
|
55515
55649
|
|
|
55516
|
-
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, 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, 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, checkMultipleOraclesCrankability, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeHealthComponentsWithoutBiasFromBalances, 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, 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, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isFlashloan, isV0Tx, isWeightedPrice, isWholePosition, 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, resolveAmount, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
|
|
55650
|
+
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, 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, 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, checkMultipleOraclesCrankability, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeHealthComponentsWithoutBiasFromBalances, 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, 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, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, 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, resolveAmount, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
|
|
55517
55651
|
//# sourceMappingURL=index.js.map
|
|
55518
55652
|
//# sourceMappingURL=index.js.map
|