@0dotxyz/p0-ts-sdk 2.3.0-alpha.9 → 2.3.2
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 +235 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +129 -3
- package/dist/index.d.ts +129 -3
- package/dist/index.js +229 -2
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.cts +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/{types-BC4kJXuQ.d.ts → types-Cxl2AUvk.d.ts} +59 -2
- package/dist/{types-6ULf9Ciw.d.cts → types-DtUR-yHt.d.cts} +59 -2
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { struct, u32, u8 } from '@solana/buffer-layout';
|
|
|
8
8
|
import { publicKey, u64, bool } from '@solana/buffer-layout-utils';
|
|
9
9
|
import { Buffer as Buffer$1 } from 'buffer';
|
|
10
10
|
import { deserialize } from 'borsh';
|
|
11
|
+
import bs58 from 'bs58';
|
|
11
12
|
import * as borsh from '@coral-xyz/borsh';
|
|
12
13
|
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
14
|
import WebSocket from 'ws';
|
|
@@ -16016,8 +16017,10 @@ function toBankDto(bank) {
|
|
|
16016
16017
|
emissionsRate: bank.emissionsRate,
|
|
16017
16018
|
emissionsMint: bank.emissionsMint.toBase58(),
|
|
16018
16019
|
emissionsRemaining: bank.emissionsRemaining.toString(),
|
|
16020
|
+
collectedProgramFeesOutstanding: bank.collectedProgramFeesOutstanding.toString(),
|
|
16019
16021
|
oracleKey: bank.oracleKey.toBase58(),
|
|
16020
16022
|
emode: toEmodeSettingsDto(bank.emode),
|
|
16023
|
+
rateLimiter: bank.rateLimiter ? toBankRateLimiterDto(bank.rateLimiter) : void 0,
|
|
16021
16024
|
tokenSymbol: bank.tokenSymbol,
|
|
16022
16025
|
feesDestinationAccount: bank.feesDestinationAccount?.toBase58(),
|
|
16023
16026
|
lendingPositionCount: bank.lendingPositionCount?.toString(),
|
|
@@ -16042,6 +16045,21 @@ function toBankDto(bank) {
|
|
|
16042
16045
|
} : void 0
|
|
16043
16046
|
};
|
|
16044
16047
|
}
|
|
16048
|
+
function toRateLimitWindowDto(window) {
|
|
16049
|
+
return {
|
|
16050
|
+
maxOutflow: window.maxOutflow.toString(),
|
|
16051
|
+
windowDuration: window.windowDuration,
|
|
16052
|
+
windowStart: window.windowStart,
|
|
16053
|
+
prevWindowOutflow: window.prevWindowOutflow.toString(),
|
|
16054
|
+
curWindowOutflow: window.curWindowOutflow.toString()
|
|
16055
|
+
};
|
|
16056
|
+
}
|
|
16057
|
+
function toBankRateLimiterDto(rateLimiter) {
|
|
16058
|
+
return {
|
|
16059
|
+
hourly: toRateLimitWindowDto(rateLimiter.hourly),
|
|
16060
|
+
daily: toRateLimitWindowDto(rateLimiter.daily)
|
|
16061
|
+
};
|
|
16062
|
+
}
|
|
16045
16063
|
function toEmodeSettingsDto(emodeSettings) {
|
|
16046
16064
|
return {
|
|
16047
16065
|
emodeTag: emodeSettings.emodeTag,
|
|
@@ -16120,6 +16138,8 @@ function bankRawToDto(bankRaw) {
|
|
|
16120
16138
|
emissionsRate: bankRaw.emissionsRate.toString(),
|
|
16121
16139
|
emissionsRemaining: bankRaw.emissionsRemaining,
|
|
16122
16140
|
emissionsMint: bankRaw.emissionsMint.toBase58(),
|
|
16141
|
+
collectedProgramFeesOutstanding: bankRaw.collectedProgramFeesOutstanding,
|
|
16142
|
+
rateLimiter: bankRaw.rateLimiter ? bankRateLimiterRawToDto(bankRaw.rateLimiter) : void 0,
|
|
16123
16143
|
feesDestinationAccount: bankRaw?.feesDestinationAccount?.toBase58(),
|
|
16124
16144
|
lendingPositionCount: bankRaw?.lendingPositionCount?.toString(),
|
|
16125
16145
|
borrowingPositionCount: bankRaw?.borrowingPositionCount?.toString(),
|
|
@@ -16129,6 +16149,21 @@ function bankRawToDto(bankRaw) {
|
|
|
16129
16149
|
integrationAcc3: bankRaw.integrationAcc3.toBase58()
|
|
16130
16150
|
};
|
|
16131
16151
|
}
|
|
16152
|
+
function rateLimitWindowRawToDto(window) {
|
|
16153
|
+
return {
|
|
16154
|
+
maxOutflow: window.maxOutflow.toString(),
|
|
16155
|
+
windowDuration: window.windowDuration.toString(),
|
|
16156
|
+
windowStart: window.windowStart.toString(),
|
|
16157
|
+
prevWindowOutflow: window.prevWindowOutflow.toString(),
|
|
16158
|
+
curWindowOutflow: window.curWindowOutflow.toString()
|
|
16159
|
+
};
|
|
16160
|
+
}
|
|
16161
|
+
function bankRateLimiterRawToDto(rateLimiter) {
|
|
16162
|
+
return {
|
|
16163
|
+
hourly: rateLimitWindowRawToDto(rateLimiter.hourly),
|
|
16164
|
+
daily: rateLimitWindowRawToDto(rateLimiter.daily)
|
|
16165
|
+
};
|
|
16166
|
+
}
|
|
16132
16167
|
function emodeSettingsRawToDto(emodeSettingsRaw) {
|
|
16133
16168
|
return {
|
|
16134
16169
|
emodeTag: emodeSettingsRaw.emodeTag,
|
|
@@ -16228,6 +16263,21 @@ function parseEmodeSettingsRaw(emodeSettingsRaw) {
|
|
|
16228
16263
|
};
|
|
16229
16264
|
return emodeSettings;
|
|
16230
16265
|
}
|
|
16266
|
+
function parseRateLimitWindowRaw(window) {
|
|
16267
|
+
return {
|
|
16268
|
+
maxOutflow: new BigNumber3(window.maxOutflow.toString()),
|
|
16269
|
+
windowDuration: window.windowDuration.toNumber(),
|
|
16270
|
+
windowStart: window.windowStart.toNumber(),
|
|
16271
|
+
prevWindowOutflow: new BigNumber3(window.prevWindowOutflow.toString()),
|
|
16272
|
+
curWindowOutflow: new BigNumber3(window.curWindowOutflow.toString())
|
|
16273
|
+
};
|
|
16274
|
+
}
|
|
16275
|
+
function parseBankRateLimiterRaw(rateLimiter) {
|
|
16276
|
+
return {
|
|
16277
|
+
hourly: parseRateLimitWindowRaw(rateLimiter.hourly),
|
|
16278
|
+
daily: parseRateLimitWindowRaw(rateLimiter.daily)
|
|
16279
|
+
};
|
|
16280
|
+
}
|
|
16231
16281
|
function parseBankRaw(address, accountParsed, bankMetadata) {
|
|
16232
16282
|
const flags = accountParsed.flags.toNumber();
|
|
16233
16283
|
const mint = accountParsed.mint;
|
|
@@ -16259,8 +16309,10 @@ function parseBankRaw(address, accountParsed, bankMetadata) {
|
|
|
16259
16309
|
const emissionsRate = accountParsed.emissionsRate.toNumber();
|
|
16260
16310
|
const emissionsMint = accountParsed.emissionsMint;
|
|
16261
16311
|
const emissionsRemaining = accountParsed.emissionsRemaining ? wrappedI80F48toBigNumber(accountParsed.emissionsRemaining) : new BigNumber3(0);
|
|
16312
|
+
const collectedProgramFeesOutstanding = accountParsed.collectedProgramFeesOutstanding ? wrappedI80F48toBigNumber(accountParsed.collectedProgramFeesOutstanding) : new BigNumber3(0);
|
|
16262
16313
|
const { oracleKey } = { oracleKey: config.oracleKeys[0] };
|
|
16263
16314
|
const emode = parseEmodeSettingsRaw(accountParsed.emode);
|
|
16315
|
+
const rateLimiter = accountParsed.rateLimiter ? parseBankRateLimiterRaw(accountParsed.rateLimiter) : void 0;
|
|
16264
16316
|
const tokenSymbol = bankMetadata?.tokenSymbol;
|
|
16265
16317
|
const feesDestinationAccount = accountParsed.feesDestinationAccount;
|
|
16266
16318
|
const lendingPositionCount = accountParsed.lendingPositionCount ? new BigNumber3(accountParsed.lendingPositionCount.toString()) : new BigNumber3(0);
|
|
@@ -16321,11 +16373,13 @@ function parseBankRaw(address, accountParsed, bankMetadata) {
|
|
|
16321
16373
|
emissionsRate,
|
|
16322
16374
|
emissionsMint,
|
|
16323
16375
|
emissionsRemaining,
|
|
16376
|
+
collectedProgramFeesOutstanding,
|
|
16324
16377
|
oracleKey,
|
|
16325
16378
|
feesDestinationAccount,
|
|
16326
16379
|
lendingPositionCount,
|
|
16327
16380
|
borrowingPositionCount,
|
|
16328
16381
|
emode,
|
|
16382
|
+
rateLimiter,
|
|
16329
16383
|
tokenSymbol,
|
|
16330
16384
|
kaminoIntegrationAccounts,
|
|
16331
16385
|
driftIntegrationAccounts,
|
|
@@ -16361,8 +16415,10 @@ function dtoToBank(bankDto) {
|
|
|
16361
16415
|
emissionsRate: bankDto.emissionsRate,
|
|
16362
16416
|
emissionsMint: new PublicKey(bankDto.emissionsMint),
|
|
16363
16417
|
emissionsRemaining: new BigNumber3(bankDto.emissionsRemaining),
|
|
16418
|
+
collectedProgramFeesOutstanding: new BigNumber3(bankDto.collectedProgramFeesOutstanding ?? "0"),
|
|
16364
16419
|
oracleKey: new PublicKey(bankDto.oracleKey),
|
|
16365
16420
|
emode: dtoToEmodeSettings(bankDto.emode),
|
|
16421
|
+
rateLimiter: bankDto.rateLimiter ? dtoToBankRateLimiter(bankDto.rateLimiter) : void 0,
|
|
16366
16422
|
tokenSymbol: bankDto.tokenSymbol,
|
|
16367
16423
|
feesDestinationAccount: bankDto.feesDestinationAccount ? new PublicKey(bankDto.feesDestinationAccount) : void 0,
|
|
16368
16424
|
lendingPositionCount: bankDto.lendingPositionCount ? new BigNumber3(bankDto.lendingPositionCount) : void 0,
|
|
@@ -16387,6 +16443,21 @@ function dtoToBank(bankDto) {
|
|
|
16387
16443
|
} : void 0
|
|
16388
16444
|
};
|
|
16389
16445
|
}
|
|
16446
|
+
function dtoToRateLimitWindow(window) {
|
|
16447
|
+
return {
|
|
16448
|
+
maxOutflow: new BigNumber3(window.maxOutflow),
|
|
16449
|
+
windowDuration: window.windowDuration,
|
|
16450
|
+
windowStart: window.windowStart,
|
|
16451
|
+
prevWindowOutflow: new BigNumber3(window.prevWindowOutflow),
|
|
16452
|
+
curWindowOutflow: new BigNumber3(window.curWindowOutflow)
|
|
16453
|
+
};
|
|
16454
|
+
}
|
|
16455
|
+
function dtoToBankRateLimiter(rateLimiter) {
|
|
16456
|
+
return {
|
|
16457
|
+
hourly: dtoToRateLimitWindow(rateLimiter.hourly),
|
|
16458
|
+
daily: dtoToRateLimitWindow(rateLimiter.daily)
|
|
16459
|
+
};
|
|
16460
|
+
}
|
|
16390
16461
|
function dtoToEmodeSettings(emodeSettingsDto) {
|
|
16391
16462
|
return {
|
|
16392
16463
|
emodeTag: emodeSettingsDto.emodeTag,
|
|
@@ -16465,6 +16536,8 @@ function dtoToBankRaw(bankDto) {
|
|
|
16465
16536
|
emissionsRate: new BN11(bankDto.emissionsRate),
|
|
16466
16537
|
emissionsRemaining: bankDto.emissionsRemaining,
|
|
16467
16538
|
emissionsMint: new PublicKey(bankDto.emissionsMint),
|
|
16539
|
+
collectedProgramFeesOutstanding: bankDto.collectedProgramFeesOutstanding,
|
|
16540
|
+
rateLimiter: bankDto.rateLimiter ? dtoToBankRateLimiterRaw(bankDto.rateLimiter) : void 0,
|
|
16468
16541
|
feesDestinationAccount: bankDto.feesDestinationAccount ? new PublicKey(bankDto.feesDestinationAccount) : void 0,
|
|
16469
16542
|
lendingPositionCount: bankDto.lendingPositionCount ? Number(bankDto.lendingPositionCount) : void 0,
|
|
16470
16543
|
borrowingPositionCount: bankDto.borrowingPositionCount ? Number(bankDto.borrowingPositionCount) : void 0,
|
|
@@ -16474,6 +16547,21 @@ function dtoToBankRaw(bankDto) {
|
|
|
16474
16547
|
integrationAcc3: new PublicKey(bankDto.integrationAcc3)
|
|
16475
16548
|
};
|
|
16476
16549
|
}
|
|
16550
|
+
function dtoToRateLimitWindowRaw(window) {
|
|
16551
|
+
return {
|
|
16552
|
+
maxOutflow: new BN11(window.maxOutflow),
|
|
16553
|
+
windowDuration: new BN11(window.windowDuration),
|
|
16554
|
+
windowStart: new BN11(window.windowStart),
|
|
16555
|
+
prevWindowOutflow: new BN11(window.prevWindowOutflow),
|
|
16556
|
+
curWindowOutflow: new BN11(window.curWindowOutflow)
|
|
16557
|
+
};
|
|
16558
|
+
}
|
|
16559
|
+
function dtoToBankRateLimiterRaw(rateLimiter) {
|
|
16560
|
+
return {
|
|
16561
|
+
hourly: dtoToRateLimitWindowRaw(rateLimiter.hourly),
|
|
16562
|
+
daily: dtoToRateLimitWindowRaw(rateLimiter.daily)
|
|
16563
|
+
};
|
|
16564
|
+
}
|
|
16477
16565
|
function dtoToEmodeSettingsRaw(emodeSettingsDto) {
|
|
16478
16566
|
return {
|
|
16479
16567
|
emodeTag: emodeSettingsDto.emodeTag,
|
|
@@ -65684,6 +65772,76 @@ var fetchMarginfiAccountAddresses = async (program, authority, group) => {
|
|
|
65684
65772
|
])).map((a) => a.publicKey);
|
|
65685
65773
|
return marginfiAccounts;
|
|
65686
65774
|
};
|
|
65775
|
+
var MARGINFI_ACCOUNT_DISCRIMINATOR = Buffer.from([67, 178, 130, 109, 126, 114, 28, 42]);
|
|
65776
|
+
var GROUP_OFFSET = 8;
|
|
65777
|
+
var BALANCES_OFFSET = 72;
|
|
65778
|
+
var BALANCE_SIZE = 104;
|
|
65779
|
+
var BANK_PK_OFFSET_IN_BALANCE = 1;
|
|
65780
|
+
var MAX_BALANCES = 16;
|
|
65781
|
+
var scanBankSlots = async (program, group, bank, options) => {
|
|
65782
|
+
const connection = program.provider.connection;
|
|
65783
|
+
const programId = program.programId;
|
|
65784
|
+
const discriminatorBytes = bs58.encode(MARGINFI_ACCOUNT_DISCRIMINATOR);
|
|
65785
|
+
const groupBytes = group.toBase58();
|
|
65786
|
+
const bankBytes = bank.toBase58();
|
|
65787
|
+
const slotOffsets = Array.from(
|
|
65788
|
+
{ length: MAX_BALANCES },
|
|
65789
|
+
(_, n) => BALANCES_OFFSET + BANK_PK_OFFSET_IN_BALANCE + n * BALANCE_SIZE
|
|
65790
|
+
);
|
|
65791
|
+
const scanSlot = (offset) => {
|
|
65792
|
+
const filters = [
|
|
65793
|
+
{ memcmp: { offset: 0, bytes: discriminatorBytes } },
|
|
65794
|
+
{ memcmp: { offset: GROUP_OFFSET, bytes: groupBytes } },
|
|
65795
|
+
{ memcmp: { offset, bytes: bankBytes } }
|
|
65796
|
+
];
|
|
65797
|
+
return connection.getProgramAccounts(programId, {
|
|
65798
|
+
filters,
|
|
65799
|
+
dataSlice: options.dataSlice
|
|
65800
|
+
});
|
|
65801
|
+
};
|
|
65802
|
+
const byAddress = /* @__PURE__ */ new Map();
|
|
65803
|
+
const collect = (slotResults) => {
|
|
65804
|
+
for (const { pubkey, account } of slotResults) {
|
|
65805
|
+
byAddress.set(pubkey.toBase58(), account);
|
|
65806
|
+
}
|
|
65807
|
+
};
|
|
65808
|
+
const concurrency = options.concurrency;
|
|
65809
|
+
if (concurrency === void 0 || concurrency >= slotOffsets.length) {
|
|
65810
|
+
(await Promise.all(slotOffsets.map(scanSlot))).forEach(collect);
|
|
65811
|
+
} else {
|
|
65812
|
+
const batchSize = Math.max(1, Math.floor(concurrency));
|
|
65813
|
+
for (let i = 0; i < slotOffsets.length; i += batchSize) {
|
|
65814
|
+
const batch = slotOffsets.slice(i, i + batchSize);
|
|
65815
|
+
(await Promise.all(batch.map(scanSlot))).forEach(collect);
|
|
65816
|
+
}
|
|
65817
|
+
}
|
|
65818
|
+
return byAddress;
|
|
65819
|
+
};
|
|
65820
|
+
var fetchMarginfiAccountAddressesHoldingBank = async (program, group, bank, options) => {
|
|
65821
|
+
const byAddress = await scanBankSlots(program, group, bank, {
|
|
65822
|
+
concurrency: options?.concurrency,
|
|
65823
|
+
dataSlice: { offset: 0, length: 0 }
|
|
65824
|
+
});
|
|
65825
|
+
return Array.from(byAddress.keys(), (a) => new PublicKey(a));
|
|
65826
|
+
};
|
|
65827
|
+
var fetchMarginfiAccountActiveBalancesForBank = async (program, group, bank, options) => {
|
|
65828
|
+
const byAddress = await scanBankSlots(program, group, bank, {
|
|
65829
|
+
concurrency: options?.concurrency
|
|
65830
|
+
});
|
|
65831
|
+
const results = [];
|
|
65832
|
+
for (const [address, account] of byAddress) {
|
|
65833
|
+
const accountAddress = new PublicKey(address);
|
|
65834
|
+
const raw = program.coder.accounts.decode(
|
|
65835
|
+
"marginfiAccount" /* MarginfiAccount */,
|
|
65836
|
+
account.data
|
|
65837
|
+
);
|
|
65838
|
+
const parsed = parseMarginfiAccountRaw(accountAddress, raw);
|
|
65839
|
+
const balance = parsed.balances.find((b) => b.active && b.bankPk.equals(bank));
|
|
65840
|
+
if (!balance) continue;
|
|
65841
|
+
results.push({ accountAddress, authority: parsed.authority, balance });
|
|
65842
|
+
}
|
|
65843
|
+
return results;
|
|
65844
|
+
};
|
|
65687
65845
|
var fetchMarginfiAccountData = async (program, marginfiAccountPk, banksMap, bankIntegrationMap) => {
|
|
65688
65846
|
const marginfiAccountRaw = await program.account.marginfiAccount.fetch(
|
|
65689
65847
|
marginfiAccountPk,
|
|
@@ -68938,7 +69096,7 @@ async function fetchBankIntegrationMetadata(options) {
|
|
|
68938
69096
|
return bankIntegrationMap;
|
|
68939
69097
|
}
|
|
68940
69098
|
var Bank = class _Bank {
|
|
68941
|
-
constructor(address, mint, mintDecimals, group, assetShareValue, liabilityShareValue, liquidityVault, liquidityVaultBump, liquidityVaultAuthorityBump, insuranceVault, insuranceVaultBump, insuranceVaultAuthorityBump, collectedInsuranceFeesOutstanding, feeVault, feeVaultBump, feeVaultAuthorityBump, collectedGroupFeesOutstanding, lastUpdate, config, totalAssetShares, totalLiabilityShares, emissionsActiveBorrowing, emissionsActiveLending, emissionsRate, emissionsMint, emissionsRemaining, oracleKey, emode, kaminoIntegrationAccounts, driftIntegrationAccounts, solendIntegrationAccounts, jupLendIntegrationAccounts, feesDestinationAccount, lendingPositionCount, borrowingPositionCount, tokenSymbol) {
|
|
69099
|
+
constructor(address, mint, mintDecimals, group, assetShareValue, liabilityShareValue, liquidityVault, liquidityVaultBump, liquidityVaultAuthorityBump, insuranceVault, insuranceVaultBump, insuranceVaultAuthorityBump, collectedInsuranceFeesOutstanding, feeVault, feeVaultBump, feeVaultAuthorityBump, collectedGroupFeesOutstanding, lastUpdate, config, totalAssetShares, totalLiabilityShares, emissionsActiveBorrowing, emissionsActiveLending, emissionsRate, emissionsMint, emissionsRemaining, collectedProgramFeesOutstanding, oracleKey, emode, rateLimiter, kaminoIntegrationAccounts, driftIntegrationAccounts, solendIntegrationAccounts, jupLendIntegrationAccounts, feesDestinationAccount, lendingPositionCount, borrowingPositionCount, tokenSymbol) {
|
|
68942
69100
|
this.address = address;
|
|
68943
69101
|
this.mint = mint;
|
|
68944
69102
|
this.mintDecimals = mintDecimals;
|
|
@@ -68965,8 +69123,10 @@ var Bank = class _Bank {
|
|
|
68965
69123
|
this.emissionsRate = emissionsRate;
|
|
68966
69124
|
this.emissionsMint = emissionsMint;
|
|
68967
69125
|
this.emissionsRemaining = emissionsRemaining;
|
|
69126
|
+
this.collectedProgramFeesOutstanding = collectedProgramFeesOutstanding;
|
|
68968
69127
|
this.oracleKey = oracleKey;
|
|
68969
69128
|
this.emode = emode;
|
|
69129
|
+
this.rateLimiter = rateLimiter;
|
|
68970
69130
|
this.kaminoIntegrationAccounts = kaminoIntegrationAccounts;
|
|
68971
69131
|
this.driftIntegrationAccounts = driftIntegrationAccounts;
|
|
68972
69132
|
this.solendIntegrationAccounts = solendIntegrationAccounts;
|
|
@@ -69034,8 +69194,10 @@ var Bank = class _Bank {
|
|
|
69034
69194
|
bankType.emissionsRate,
|
|
69035
69195
|
bankType.emissionsMint,
|
|
69036
69196
|
bankType.emissionsRemaining,
|
|
69197
|
+
bankType.collectedProgramFeesOutstanding,
|
|
69037
69198
|
bankType.oracleKey,
|
|
69038
69199
|
bankType.emode,
|
|
69200
|
+
bankType.rateLimiter,
|
|
69039
69201
|
bankType.kaminoIntegrationAccounts,
|
|
69040
69202
|
bankType.driftIntegrationAccounts,
|
|
69041
69203
|
bankType.solendIntegrationAccounts,
|
|
@@ -69075,8 +69237,10 @@ var Bank = class _Bank {
|
|
|
69075
69237
|
props.emissionsRate,
|
|
69076
69238
|
props.emissionsMint,
|
|
69077
69239
|
props.emissionsRemaining,
|
|
69240
|
+
props.collectedProgramFeesOutstanding,
|
|
69078
69241
|
props.oracleKey,
|
|
69079
69242
|
props.emode,
|
|
69243
|
+
props.rateLimiter,
|
|
69080
69244
|
props.kaminoIntegrationAccounts,
|
|
69081
69245
|
props.driftIntegrationAccounts,
|
|
69082
69246
|
props.solendIntegrationAccounts,
|
|
@@ -70143,6 +70307,69 @@ var Project0Client = class _Project0Client {
|
|
|
70143
70307
|
async getAccountAddresses(authority) {
|
|
70144
70308
|
return fetchMarginfiAccountAddresses(this.program, authority, this.group.address);
|
|
70145
70309
|
}
|
|
70310
|
+
/**
|
|
70311
|
+
* Fetches the addresses of all marginfi accounts in the group that hold a position in a
|
|
70312
|
+
* specific bank.
|
|
70313
|
+
*
|
|
70314
|
+
* Because a marginfi account holds up to 16 balance slots (sorted descending by bank, so the
|
|
70315
|
+
* target can be at any slot), this scans all 16 slots in parallel via filtered
|
|
70316
|
+
* `getProgramAccounts` calls. It returns only addresses (no account data is transferred),
|
|
70317
|
+
* which keeps it viable across the group's ~500k accounts. Hydrate any address you care about
|
|
70318
|
+
* with `fetchAccount`.
|
|
70319
|
+
*
|
|
70320
|
+
* @param bank - The bank public key to search for in account balances
|
|
70321
|
+
* @param options - Optional settings:
|
|
70322
|
+
* - `concurrency`: max number of the 16 slot scans to run at once. Omit to fire all 16 in
|
|
70323
|
+
* parallel; pass a smaller value (e.g. 4) to batch them and avoid RPC rate limits.
|
|
70324
|
+
* @returns Deduplicated array of account addresses holding the bank
|
|
70325
|
+
*/
|
|
70326
|
+
async getAccountAddressesHoldingBank(bank, options) {
|
|
70327
|
+
return fetchMarginfiAccountAddressesHoldingBank(
|
|
70328
|
+
this.program,
|
|
70329
|
+
this.group.address,
|
|
70330
|
+
bank,
|
|
70331
|
+
options
|
|
70332
|
+
);
|
|
70333
|
+
}
|
|
70334
|
+
/**
|
|
70335
|
+
* Fetches every account's active balance for a given mint, with its authority, account
|
|
70336
|
+
* address, and the deposited/borrowed amounts in UI units.
|
|
70337
|
+
*
|
|
70338
|
+
* A mint can map to multiple banks (e.g. DEFAULT + Kamino), so this resolves all matching
|
|
70339
|
+
* banks via {@link getBanksByMint}, scans each for accounts holding it, and emits one row per
|
|
70340
|
+
* (account, bank). An account that holds the mint in several banks yields several rows.
|
|
70341
|
+
*
|
|
70342
|
+
* Amounts are computed with each bank's share multiplier (`assetShareValueMultiplierByBank`)
|
|
70343
|
+
* and the bank's mint decimals, matching `Balance.computeQuantityUi`.
|
|
70344
|
+
*
|
|
70345
|
+
* @param mint - The mint to search account balances for
|
|
70346
|
+
* @param options - Optional settings:
|
|
70347
|
+
* - `assetTag`: restrict to banks with this asset tag (e.g. only Kamino banks for the mint)
|
|
70348
|
+
* - `concurrency`: max number of the 16 slot scans to run at once per bank (see
|
|
70349
|
+
* {@link getAccountAddressesHoldingBank})
|
|
70350
|
+
* @returns One row per (account, bank) holding the mint
|
|
70351
|
+
*/
|
|
70352
|
+
async getAuthorityBalancesForMint(mint, options) {
|
|
70353
|
+
const banks = this.getBanksByMint(mint, options?.assetTag);
|
|
70354
|
+
const rows = [];
|
|
70355
|
+
for (const bank of banks) {
|
|
70356
|
+
const multiplier = this.assetShareValueMultiplierByBank.get(bank.address.toBase58());
|
|
70357
|
+
const balances = await fetchMarginfiAccountActiveBalancesForBank(
|
|
70358
|
+
this.program,
|
|
70359
|
+
this.group.address,
|
|
70360
|
+
bank.address,
|
|
70361
|
+
{ concurrency: options?.concurrency }
|
|
70362
|
+
);
|
|
70363
|
+
for (const { accountAddress, authority, balance } of balances) {
|
|
70364
|
+
const { assets, liabilities } = Balance.fromBalanceType(balance).computeQuantityUi(
|
|
70365
|
+
bank,
|
|
70366
|
+
multiplier
|
|
70367
|
+
);
|
|
70368
|
+
rows.push({ authority, accountAddress, bank: bank.address, assets, liabilities });
|
|
70369
|
+
}
|
|
70370
|
+
}
|
|
70371
|
+
return rows;
|
|
70372
|
+
}
|
|
70146
70373
|
/**
|
|
70147
70374
|
* Fetches and wraps a marginfi account in one call.
|
|
70148
70375
|
*
|
|
@@ -70336,6 +70563,6 @@ var EmodeSettings = class _EmodeSettings {
|
|
|
70336
70563
|
}
|
|
70337
70564
|
};
|
|
70338
70565
|
|
|
70339
|
-
export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, 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, composeBridgedSwap, 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, mergeBridgeQuotes, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, resolveAmount, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, 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 };
|
|
70566
|
+
export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, 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, bankRateLimiterRawToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkJupiterFeeAccount, checkMultipleOraclesCrankability, checkTitanFeeAccount, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeBridgedSwap, 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, dtoToBankRateLimiter, dtoToBankRateLimiterRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, 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, mergeBridgeQuotes, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRateLimiterRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, resolveAmount, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, 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 };
|
|
70340
70567
|
//# sourceMappingURL=index.js.map
|
|
70341
70568
|
//# sourceMappingURL=index.js.map
|