@perena/vault-sdk 1.0.25 → 1.0.27
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.d.ts +367 -118
- package/dist/index.js +3489 -1294
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,14 @@ import * as _solana_kit from '@solana/kit';
|
|
|
2
2
|
import { Address, ProgramDerivedAddressBump, Rpc, SolanaRpcApi, Instruction } from '@solana/kit';
|
|
3
3
|
export { address } from '@solana/kit';
|
|
4
4
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
5
|
-
import { PublicKey, Connection, Keypair, Transaction, TransactionInstruction } from '@solana/web3.js';
|
|
5
|
+
import { PublicKey, Connection, Keypair, SimulatedTransactionResponse, Transaction, TransactionInstruction } from '@solana/web3.js';
|
|
6
6
|
import * as _anchor_lang_core from '@anchor-lang/core';
|
|
7
7
|
import { Program, IdlAccounts, BN, AnchorProvider } from '@anchor-lang/core';
|
|
8
8
|
import * as common from 'common';
|
|
9
9
|
import { BaseAccountClient, InstructionRefs, CustomAccountMeta, TransactionPlan, SingleInstructionBuilderService } from 'common';
|
|
10
|
+
import { FetchJupiterUsdPricesOptions, FetchJupiterBalancesOptions } from 'jupiter';
|
|
11
|
+
import { FetchNestVaultSharePriceOptions } from 'nest';
|
|
12
|
+
export { NEST_API_BASE_URL } from 'nest';
|
|
10
13
|
|
|
11
14
|
/** Bankineco program id (local). Hosts new vault instructions. */
|
|
12
15
|
declare const VAULT_PROGRAM_ID: Address;
|
|
@@ -10146,7 +10149,9 @@ type Bankineco = {
|
|
|
10146
10149
|
"Holdings are addressed by their slot index (1 byte) to keep instruction data",
|
|
10147
10150
|
"small. To register a brand-new consensus holding, set `mint` to its mint",
|
|
10148
10151
|
"(and pass the matching `asset_mint` account); the created slot's index is used",
|
|
10149
|
-
"and `holding_index` is ignored. For existing holdings leave `mint` as `None`."
|
|
10152
|
+
"and `holding_index` is ignored. For existing holdings leave `mint` as `None`.",
|
|
10153
|
+
"The price is authoritative only for ConsensusOracle holdings. Pyth and nested-vault",
|
|
10154
|
+
"holdings use the report only for external_amount and retain their live-oracle price."
|
|
10150
10155
|
];
|
|
10151
10156
|
"type": {
|
|
10152
10157
|
"kind": "struct";
|
|
@@ -11891,7 +11896,7 @@ type Bankineco = {
|
|
|
11891
11896
|
{
|
|
11892
11897
|
"name": "lossesEnabled";
|
|
11893
11898
|
"docs": [
|
|
11894
|
-
"Allows consensus-oracle NAV
|
|
11899
|
+
"Allows consensus-oracle NAV losses beyond the protocol's small-loss tolerance. Losses inside that tolerance settle without this flag."
|
|
11895
11900
|
];
|
|
11896
11901
|
"type": {
|
|
11897
11902
|
"defined": {
|
|
@@ -15316,6 +15321,12 @@ declare class VaultClient {
|
|
|
15316
15321
|
* Pass `extraSigners` for accounts created in the same tx (e.g. a new share mint).
|
|
15317
15322
|
*/
|
|
15318
15323
|
sendTransaction(payer: Keypair, plan: VaultTransactionPlan, extraSigners?: Keypair[]): Promise<string>;
|
|
15324
|
+
/**
|
|
15325
|
+
* Build the same transaction {@link sendTransaction} would send, but run it
|
|
15326
|
+
* through `simulateTransaction` instead. Nothing is signed or submitted, so
|
|
15327
|
+
* this is safe to call with a keypair that is not the real signer.
|
|
15328
|
+
*/
|
|
15329
|
+
simulateTransaction(payer: Keypair, plan: VaultTransactionPlan): Promise<SimulatedTransactionResponse>;
|
|
15319
15330
|
applyCacheInvalidations(plan: VaultTransactionPlan): void;
|
|
15320
15331
|
clearAllCache(): void;
|
|
15321
15332
|
}
|
|
@@ -15864,10 +15875,20 @@ interface YieldPaymentSnapshot {
|
|
|
15864
15875
|
* helpers for tests and local operation.
|
|
15865
15876
|
*/
|
|
15866
15877
|
interface YieldTracker {
|
|
15878
|
+
/** Account names tagged to a vault. Live prod discovery uses this automatically. */
|
|
15879
|
+
getAccountNamesForVault?(vault: Address): Promise<string[]>;
|
|
15867
15880
|
/** All payments for an account, including payments not yet confirmed. */
|
|
15868
15881
|
getYieldPayments(accountName: string): Promise<YieldPaymentSnapshot[]>;
|
|
15869
15882
|
/** Sum of oracle-safe outstanding yield across the named accounts. */
|
|
15870
15883
|
getTotalOutstandingYield(accountNames: string[], start?: Date, end?: Date): Promise<number>;
|
|
15884
|
+
/**
|
|
15885
|
+
* Sum the external principal and confirmed-payment-adjusted outstanding yield
|
|
15886
|
+
* across the named accounts. Both values are UI token amounts.
|
|
15887
|
+
*/
|
|
15888
|
+
getTotalTrackedAmounts(accountNames: string[], start?: Date, end?: Date): Promise<{
|
|
15889
|
+
principal: number;
|
|
15890
|
+
outstandingYield: number;
|
|
15891
|
+
}>;
|
|
15871
15892
|
}
|
|
15872
15893
|
/** Injectable wall clock (ms since epoch). Lets tests pin time deterministically. */
|
|
15873
15894
|
interface Clock {
|
|
@@ -15896,6 +15917,15 @@ interface ConsensusOracleDeps {
|
|
|
15896
15917
|
/** Optional; omitted ⇒ no yield accrual is folded in. */
|
|
15897
15918
|
yieldTracker?: YieldTracker;
|
|
15898
15919
|
clock?: Clock;
|
|
15920
|
+
/**
|
|
15921
|
+
* How many times external position NAV is read before reporting, and how
|
|
15922
|
+
* many of those reads must succeed. Defaults to
|
|
15923
|
+
* `EXTERNAL_POSITION_SAMPLES` / `MIN_EXTERNAL_POSITION_SAMPLES`.
|
|
15924
|
+
*/
|
|
15925
|
+
externalPositionSampling?: {
|
|
15926
|
+
samples?: number;
|
|
15927
|
+
minSamples?: number;
|
|
15928
|
+
};
|
|
15899
15929
|
}
|
|
15900
15930
|
/** Per-holding breakdown of what the service computed (and would/did push). */
|
|
15901
15931
|
interface HoldingUpdatePreview {
|
|
@@ -15911,7 +15941,9 @@ interface HoldingUpdatePreview {
|
|
|
15911
15941
|
lpAmount: bigint;
|
|
15912
15942
|
/** Accrued yield attributed to this holding (base units). */
|
|
15913
15943
|
yieldAmount: bigint;
|
|
15914
|
-
/**
|
|
15944
|
+
/** Yield-tracker principal attributed to this holding (base units). */
|
|
15945
|
+
trackedPrincipalAmount: bigint;
|
|
15946
|
+
/** Total external balance pushed = wallet + LP + tracked principal + yield. */
|
|
15915
15947
|
externalAmount: bigint;
|
|
15916
15948
|
}
|
|
15917
15949
|
interface VaultOracleResult {
|
|
@@ -16000,6 +16032,25 @@ interface ConsensusHoldingSimulation {
|
|
|
16000
16032
|
wouldUpdateHolding: boolean;
|
|
16001
16033
|
reason?: string;
|
|
16002
16034
|
}
|
|
16035
|
+
/**
|
|
16036
|
+
* Per-holding NAV attribution: what each holding contributed to gross NAV
|
|
16037
|
+
* before and after consensus landed. `delta` sums to the gross-NAV change.
|
|
16038
|
+
*/
|
|
16039
|
+
interface HoldingNavContribution {
|
|
16040
|
+
holdingIndex: number;
|
|
16041
|
+
mint: Address;
|
|
16042
|
+
decimals: number;
|
|
16043
|
+
/** Vault-owned token-account balance (base units); unchanged by consensus. */
|
|
16044
|
+
localAmount: bigint;
|
|
16045
|
+
externalAmountBefore: bigint;
|
|
16046
|
+
externalAmountAfter: bigint;
|
|
16047
|
+
priceBefore: bigint;
|
|
16048
|
+
priceAfter: bigint;
|
|
16049
|
+
/** localAmount + external, priced at `price`, in the vault's accounting unit. */
|
|
16050
|
+
valueBefore: bigint;
|
|
16051
|
+
valueAfter: bigint;
|
|
16052
|
+
delta: bigint;
|
|
16053
|
+
}
|
|
16003
16054
|
interface SimulatedShareClass {
|
|
16004
16055
|
value: bigint;
|
|
16005
16056
|
totalSupply: bigint;
|
|
@@ -16027,6 +16078,8 @@ interface SettlementSimulation {
|
|
|
16027
16078
|
blockers: string[];
|
|
16028
16079
|
warnings: string[];
|
|
16029
16080
|
consensus: ConsensusHoldingSimulation[];
|
|
16081
|
+
/** Per-holding attribution of the gross-NAV change consensus would cause. */
|
|
16082
|
+
navContributions: HoldingNavContribution[];
|
|
16030
16083
|
grossNav?: bigint;
|
|
16031
16084
|
settledAccountingNav?: bigint;
|
|
16032
16085
|
current: SettlementSimulationSnapshot;
|
|
@@ -16059,44 +16112,258 @@ interface VaultPricingInputs {
|
|
|
16059
16112
|
configByMint: Map<string, ConsensusOracleHoldingConfig>;
|
|
16060
16113
|
}
|
|
16061
16114
|
|
|
16115
|
+
declare const SYSTEM_PROGRAM = "11111111111111111111111111111111";
|
|
16116
|
+
/** `PriceOracleType` discriminants, in on-chain declaration order. */
|
|
16117
|
+
declare const PRICE_ORACLE_TYPES_BY_INDEX: string[];
|
|
16118
|
+
declare const CONSENSUS_ORACLE_VARIANT = "consensusoracle";
|
|
16119
|
+
/** Oracle types priced by a permissionless on-chain source, not by this service. */
|
|
16120
|
+
declare const LIVE_ORACLE_VARIANTS: Set<string>;
|
|
16121
|
+
/** Every oracle type whose external amount this service reports. */
|
|
16122
|
+
declare const REPORTABLE_ORACLE_VARIANTS: Set<string>;
|
|
16123
|
+
/** Live (Pyth / nested-vault) prices are refreshed at least this often. */
|
|
16124
|
+
declare const LIVE_PRICE_REFRESH_INTERVAL_SECS: bigint;
|
|
16125
|
+
/**
|
|
16126
|
+
* Fallback when the vault does not configure `priceStalenessThresholdSecs`,
|
|
16127
|
+
* as a bigint for comparison against decoded on-chain values.
|
|
16128
|
+
*/
|
|
16129
|
+
declare const DEFAULT_PRICE_STALENESS_SECS: bigint;
|
|
16130
|
+
/**
|
|
16131
|
+
* External position NAV is read this many times back to back, and the most
|
|
16132
|
+
* frequent value per mint is reported. Matches the 5-of-which-4-must-succeed
|
|
16133
|
+
* shape used by the Kamino/Marginfi yield oracles in `bankineco-services`.
|
|
16134
|
+
*/
|
|
16135
|
+
declare const EXTERNAL_POSITION_SAMPLES = 5;
|
|
16136
|
+
declare const MIN_EXTERNAL_POSITION_SAMPLES = 4;
|
|
16137
|
+
declare const ORACLE_ENTRY_SIZE = 272;
|
|
16138
|
+
declare const ORACLE_ENTRIES_OFFSET = 40;
|
|
16139
|
+
declare const ORACLE_SETTLED_NAV_TS_OFFSET = 8;
|
|
16140
|
+
declare const MAX_CONSENSUS_SIGNERS = 4;
|
|
16141
|
+
|
|
16142
|
+
/** Read a little-endian i64 from a number[] byte array at the given offset. */
|
|
16143
|
+
declare function readI64LE(data: number[], offset: number): bigint;
|
|
16144
|
+
/** SPL Token and Token-2022 share the base Mint layout; supply is bytes 36..44. */
|
|
16145
|
+
declare function readSplMintSupply(data: Buffer | Uint8Array): bigint;
|
|
16146
|
+
/** True when `signerBytes` occupies one of the oracle's signer entry slots. */
|
|
16147
|
+
declare function signerInOracleData(data: number[], signerBytes: Uint8Array): boolean;
|
|
16148
|
+
|
|
16149
|
+
/** Name of an Anchor enum variant, e.g. `{ consensusOracle: {} }` → "consensusOracle". */
|
|
16150
|
+
declare function variantName(value: unknown): string;
|
|
16151
|
+
/** Decode a PodBool (which arrives in a few shapes depending on the codec). */
|
|
16152
|
+
declare function coerceBool(value: unknown): boolean;
|
|
16153
|
+
declare function toBigInt(value: unknown): bigint;
|
|
16154
|
+
|
|
16155
|
+
/** Oracle-priced holdings whose external amount can be consensus-reported. */
|
|
16156
|
+
declare function selectReportableHoldings(holdings: readonly DecodedHolding[], excludedMints?: ReadonlySet<string>): ConsensusHoldingEntry[];
|
|
16157
|
+
/** Drop per-holding sourcing config for receipt mints as well as their updates. */
|
|
16158
|
+
declare function filterTargetHoldings(target: ConsensusOracleTarget, excludedMints: ReadonlySet<string>): ConsensusOracleTarget;
|
|
16159
|
+
/** Index per-holding config by mint (base58). */
|
|
16160
|
+
declare function indexConfigByMint(holdings?: ConsensusOracleHoldingConfig[]): Map<string, ConsensusOracleHoldingConfig>;
|
|
16161
|
+
/** Sum external positions by mint (base58 → base units). */
|
|
16162
|
+
declare function sumPositionsByMint(positions: ExternalPosition[]): Map<string, bigint>;
|
|
16163
|
+
/**
|
|
16164
|
+
* Parse the vault's on-chain ExternalLiquiditySlot array into ExternalPositionRefs.
|
|
16165
|
+
* Layout (C repr / bytemuck):
|
|
16166
|
+
* byte 0 : discriminant (0 = None, 1 = Marginfi)
|
|
16167
|
+
* bytes 8–40 : userAccount pubkey
|
|
16168
|
+
*
|
|
16169
|
+
* No mint is specified here — the MarginfiPositionProvider will iterate all
|
|
16170
|
+
* active balances on the account and return positions keyed by bank mint.
|
|
16171
|
+
*/
|
|
16172
|
+
declare function parseExternalLiquidityRefs(vaultState: DecodedVault): ExternalPositionRef[];
|
|
16173
|
+
|
|
16174
|
+
/** Price conversions between USD spot and the vault's accounting unit. */
|
|
16175
|
+
/** Re-denominate a USD price into the vault's accounting unit, fixed-point. */
|
|
16176
|
+
declare function priceInAccountingUnit(usd: number, baseUsd: number, assetDecimals: number): bigint;
|
|
16177
|
+
/** Inverse of {@link priceInAccountingUnit}, for logging live-oracle holdings. */
|
|
16178
|
+
declare function accountingUnitPriceToUsd(price: bigint, baseUsd: number, assetDecimals: number): number;
|
|
16179
|
+
|
|
16180
|
+
/**
|
|
16181
|
+
* Repeated-read sampling.
|
|
16182
|
+
*
|
|
16183
|
+
* Live protocol reads (Kamino/Marginfi position NAV) can come back mid-update
|
|
16184
|
+
* or against a lagging RPC node, so a single read is not trustworthy enough to
|
|
16185
|
+
* report on-chain. The fix used elsewhere in this repo — see
|
|
16186
|
+
* `bankineco-services/src/oracle/updateKaminoVaultPendingYield.ts` — is to read
|
|
16187
|
+
* the value several times back to back and keep the most frequent answer,
|
|
16188
|
+
* failing closed when no value is observed more than once.
|
|
16189
|
+
*/
|
|
16190
|
+
/**
|
|
16191
|
+
* The most frequently occurring value. Throws when `values` is empty or when
|
|
16192
|
+
* every value is distinct — a single unrepeated reading is not consensus.
|
|
16193
|
+
*/
|
|
16194
|
+
declare function mostFrequent<T>(values: readonly T[], keyOf?: (value: T) => string): T;
|
|
16195
|
+
interface CollectSamplesOptions {
|
|
16196
|
+
/** How many reads to attempt, back to back. */
|
|
16197
|
+
samples: number;
|
|
16198
|
+
/** Minimum successful reads required, else the whole read fails. */
|
|
16199
|
+
minSamples: number;
|
|
16200
|
+
/** Called with each failed attempt; failures are otherwise skipped. */
|
|
16201
|
+
onError?: (err: unknown, attempt: number) => void;
|
|
16202
|
+
}
|
|
16203
|
+
/**
|
|
16204
|
+
* Run `read` `samples` times in sequence, discarding failures. Throws when
|
|
16205
|
+
* fewer than `minSamples` reads succeed.
|
|
16206
|
+
*/
|
|
16207
|
+
declare function collectSamples<T>(read: () => Promise<T>, { samples, minSamples, onError }: CollectSamplesOptions): Promise<T[]>;
|
|
16208
|
+
|
|
16209
|
+
/**
|
|
16210
|
+
* Dry-run counterpart to `settlement.ts`: read the canonical share supplies and
|
|
16211
|
+
* replay the exact on-chain settlement path locally, without sending anything.
|
|
16212
|
+
*/
|
|
16213
|
+
|
|
16214
|
+
interface SimulateDryRunSettlementParams {
|
|
16215
|
+
client: VaultClient;
|
|
16216
|
+
signer: Keypair;
|
|
16217
|
+
vault: Address;
|
|
16218
|
+
vaultState: DecodedVault;
|
|
16219
|
+
updates: HoldingUpdatePreview[];
|
|
16220
|
+
nowSecs: bigint;
|
|
16221
|
+
}
|
|
16222
|
+
declare function simulateDryRunSettlement({ client, signer, vault, vaultState, updates, nowSecs, }: SimulateDryRunSettlementParams): Promise<SettlementSimulation>;
|
|
16223
|
+
|
|
16224
|
+
declare function buildUpdates(yieldTracker: YieldTracker | undefined, reportableHoldings: ConsensusHoldingEntry[], inputs: VaultPricingInputs): Promise<HoldingUpdatePreview[]>;
|
|
16225
|
+
declare function buildHoldingUpdate(yieldTracker: YieldTracker | undefined, entry: ConsensusHoldingEntry, inputs: VaultPricingInputs): Promise<HoldingUpdatePreview>;
|
|
16226
|
+
/** Tracked external principal + outstanding yield attributed to a holding. */
|
|
16227
|
+
declare function resolveTrackedAmounts(yieldTracker: YieldTracker | undefined, cfg: ConsensusOracleHoldingConfig | undefined, decimals: number): Promise<{
|
|
16228
|
+
principalAmount: bigint;
|
|
16229
|
+
yieldAmount: bigint;
|
|
16230
|
+
}>;
|
|
16231
|
+
|
|
16062
16232
|
/**
|
|
16063
|
-
*
|
|
16233
|
+
* Step 1 of a pass: keep active permissionless price sources warm so they
|
|
16234
|
+
* cannot block the NAV crank after the consensus report lands. Prices are
|
|
16235
|
+
* refreshed at least once per hour, or at the vault's shorter staleness
|
|
16236
|
+
* interval when configured.
|
|
16237
|
+
*/
|
|
16238
|
+
|
|
16239
|
+
interface RefreshLiveOraclePricesParams {
|
|
16240
|
+
oracle: OracleService;
|
|
16241
|
+
signer: Keypair;
|
|
16242
|
+
vault: Address;
|
|
16243
|
+
vaultState: DecodedVault;
|
|
16244
|
+
nowSecs: bigint;
|
|
16245
|
+
log: (msg: string) => void;
|
|
16246
|
+
dryRun: boolean;
|
|
16247
|
+
}
|
|
16248
|
+
/** Returns true when at least one price was actually refreshed on-chain. */
|
|
16249
|
+
declare function refreshLiveOraclePrices({ oracle, signer, vault, vaultState, nowSecs, log, dryRun, }: RefreshLiveOraclePricesParams): Promise<boolean>;
|
|
16250
|
+
|
|
16251
|
+
/**
|
|
16252
|
+
* Sourcing step: fetch every external input the per-holding updates draw on —
|
|
16253
|
+
* USD spot prices, manager wallet balances, and live external LP positions.
|
|
16254
|
+
*/
|
|
16255
|
+
|
|
16256
|
+
declare function gatherPricingInputs(deps: ConsensusOracleDeps, target: ConsensusOracleTarget, vaultState: DecodedVault, reportableHoldings: ConsensusHoldingEntry[], log?: (msg: string) => void): Promise<VaultPricingInputs>;
|
|
16257
|
+
/**
|
|
16258
|
+
* Live-LP balances for the target, summed by mint (empty if no provider).
|
|
16064
16259
|
*
|
|
16065
|
-
*
|
|
16066
|
-
*
|
|
16067
|
-
*
|
|
16260
|
+
* The provider is read {@link EXTERNAL_POSITION_SAMPLES} times back to back and
|
|
16261
|
+
* the most frequent amount per mint is kept — a single read can land mid-update
|
|
16262
|
+
* or hit a lagging RPC node, and this value is reported on-chain as
|
|
16263
|
+
* `external_amount`.
|
|
16264
|
+
*/
|
|
16265
|
+
declare function fetchExternalPositions(deps: ConsensusOracleDeps, target: ConsensusOracleTarget, manager: Address, vaultState: DecodedVault, log?: (msg: string) => void): Promise<Map<string, bigint>>;
|
|
16266
|
+
|
|
16267
|
+
/**
|
|
16268
|
+
* Receipt mints issued by a vault are liabilities/shares, not underlying assets
|
|
16269
|
+
* for its own NAV. They are excluded from reporting even when registered as
|
|
16270
|
+
* consensus-priced holdings.
|
|
16068
16271
|
*/
|
|
16069
16272
|
|
|
16070
|
-
|
|
16071
|
-
|
|
16072
|
-
|
|
16073
|
-
|
|
16074
|
-
|
|
16075
|
-
|
|
16076
|
-
|
|
16273
|
+
declare function fetchReceiptMints(client: VaultClient, vault: Address, vaultState: DecodedVault): Promise<Set<string>>;
|
|
16274
|
+
|
|
16275
|
+
/**
|
|
16276
|
+
* Settlement step: push the consensus report for all holdings, then crank NAV.
|
|
16277
|
+
*/
|
|
16278
|
+
|
|
16279
|
+
interface SettleVaultResult {
|
|
16280
|
+
updateSignature: string;
|
|
16281
|
+
crankSignature?: string;
|
|
16282
|
+
crankSkippedReason?: string;
|
|
16283
|
+
}
|
|
16284
|
+
interface SettleVaultParams {
|
|
16285
|
+
client: VaultClient;
|
|
16286
|
+
oracle: OracleService;
|
|
16287
|
+
yieldTracker: YieldTracker | undefined;
|
|
16288
|
+
signer: Keypair;
|
|
16289
|
+
target: ConsensusOracleTarget;
|
|
16290
|
+
updates: HoldingUpdatePreview[];
|
|
16291
|
+
vaultState: DecodedVault;
|
|
16292
|
+
nowSecs: bigint;
|
|
16293
|
+
log: (msg: string) => void;
|
|
16077
16294
|
}
|
|
16295
|
+
/** Push the consensus report for all holdings, then settle NAV. */
|
|
16296
|
+
declare function settleVault({ client, oracle, yieldTracker, signer, target, updates, vaultState, nowSecs, log, }: SettleVaultParams): Promise<SettleVaultResult>;
|
|
16297
|
+
interface LogProspectiveApyParams {
|
|
16298
|
+
client: VaultClient;
|
|
16299
|
+
vault: Address;
|
|
16300
|
+
updates: HoldingUpdatePreview[];
|
|
16301
|
+
vaultState: DecodedVault;
|
|
16302
|
+
nowSecs: bigint;
|
|
16303
|
+
log: (msg: string) => void;
|
|
16304
|
+
}
|
|
16305
|
+
/**
|
|
16306
|
+
* Fetch the current settlement timestamp and log the APY implied by the
|
|
16307
|
+
* prospective update, so MaxApyExceeded failures are diagnosable.
|
|
16308
|
+
*
|
|
16309
|
+
* NAV is expressed in the vault's accounting unit (scaled by assetDecimals).
|
|
16310
|
+
* Mirrors `gross_nav_from_holdings`: consensus updates overlay their target
|
|
16311
|
+
* slots, while live-priced and otherwise unchanged holdings retain their
|
|
16312
|
+
* current price/external amount.
|
|
16313
|
+
*/
|
|
16314
|
+
declare function logProspectiveApy({ client, vault, updates, vaultState, nowSecs, log, }: LogProspectiveApyParams): Promise<void>;
|
|
16315
|
+
|
|
16316
|
+
/**
|
|
16317
|
+
* Discover which on-chain vaults a given keypair is a registered consensus
|
|
16318
|
+
* oracle signer for.
|
|
16319
|
+
*/
|
|
16320
|
+
|
|
16321
|
+
/**
|
|
16322
|
+
* Fetches every vault and its oracle account, then filters by signer
|
|
16323
|
+
* membership. Returns minimal `ConsensusOracleTarget` entries (no per-holding
|
|
16324
|
+
* config); callers can overlay config from `targets.ts` if needed.
|
|
16325
|
+
*/
|
|
16326
|
+
declare function discoverVaultsForSigner(client: VaultClient, signer: Keypair, opts?: {
|
|
16327
|
+
log?: (msg: string) => void;
|
|
16328
|
+
}): Promise<ConsensusOracleTarget[]>;
|
|
16329
|
+
|
|
16330
|
+
/**
|
|
16331
|
+
* Fail closed while any configured yield account has an unsettled payment.
|
|
16332
|
+
* The payout must be confirmed only after it is visible in the same wallet
|
|
16333
|
+
* balance source used by this service. Until then, no oracle update is safe.
|
|
16334
|
+
*/
|
|
16335
|
+
declare function assertNoUnconfirmedYieldPayments(yieldTracker: YieldTracker | undefined, target: ConsensusOracleTarget): Promise<void>;
|
|
16336
|
+
/**
|
|
16337
|
+
* In production, yield accounts are tagged with their vault address. Attach
|
|
16338
|
+
* newly discovered accounts to the base holding, while preserving explicit
|
|
16339
|
+
* per-mint mappings supplied by config or CLI flags.
|
|
16340
|
+
*/
|
|
16341
|
+
declare function withDiscoveredYieldAccounts(yieldTracker: YieldTracker | undefined, target: ConsensusOracleTarget, vaultState: DecodedVault, excludedMints: ReadonlySet<string>, log: (msg: string) => void): Promise<ConsensusOracleTarget>;
|
|
16342
|
+
|
|
16343
|
+
/**
|
|
16344
|
+
* {@link PriceSource} adapter over the `jupiter` package's price API.
|
|
16345
|
+
*
|
|
16346
|
+
* The HTTP client (batching, retries, response shape) lives in
|
|
16347
|
+
* `jupiter/src/priceApi.ts`; this file only binds it to the consensus-oracle
|
|
16348
|
+
* interface.
|
|
16349
|
+
*/
|
|
16350
|
+
|
|
16351
|
+
type JupiterPriceSourceOptions = FetchJupiterUsdPricesOptions;
|
|
16078
16352
|
declare class JupiterPriceSource implements PriceSource {
|
|
16079
|
-
private readonly
|
|
16080
|
-
private readonly retries;
|
|
16081
|
-
private readonly fetchFn;
|
|
16353
|
+
private readonly opts;
|
|
16082
16354
|
constructor(opts?: JupiterPriceSourceOptions);
|
|
16083
16355
|
fetchUsdPrices(mints: Address[]): Promise<Record<string, number>>;
|
|
16084
16356
|
}
|
|
16085
16357
|
|
|
16086
|
-
/**
|
|
16358
|
+
/**
|
|
16359
|
+
* {@link PriceSource} adapter over the `nest` package's price API, bound to the
|
|
16360
|
+
* Perena vault's Nest slug and share mint.
|
|
16361
|
+
*/
|
|
16087
16362
|
|
|
16088
|
-
declare const NEST_API_BASE_URL = "https://api.nest.credit/v1";
|
|
16089
16363
|
declare const NEST_VAULT_SLUG = "nest-perena-vault";
|
|
16090
16364
|
declare const NEST_RWA_SHARE_MINT: Address;
|
|
16091
|
-
|
|
16092
|
-
|
|
16093
|
-
fetchFn?: typeof fetch;
|
|
16094
|
-
}
|
|
16095
|
-
/**
|
|
16096
|
-
* Fetch the USD price of one Nest vault share. This is the price reader that
|
|
16097
|
-
* historically lived in bankineco-sdk's `nestUtils`; the vault SDK owns it now
|
|
16098
|
-
* because nested Nest shares are a consensus-oracle price source.
|
|
16099
|
-
*/
|
|
16365
|
+
type FetchNestTokenPriceOptions = FetchNestVaultSharePriceOptions;
|
|
16366
|
+
/** Fetch the USD price of one share of the Perena vault on Nest. */
|
|
16100
16367
|
declare function fetchNestTokenPrice(nestVaultSlug?: string, opts?: FetchNestTokenPriceOptions): Promise<number>;
|
|
16101
16368
|
interface NestPriceSourceOptions extends FetchNestTokenPriceOptions {
|
|
16102
16369
|
nestVaultSlug?: string;
|
|
@@ -16125,35 +16392,25 @@ declare class LivePriceSource implements PriceSource {
|
|
|
16125
16392
|
}
|
|
16126
16393
|
|
|
16127
16394
|
/**
|
|
16128
|
-
* {@link WalletBalanceSource}
|
|
16129
|
-
* API, with an on-chain RPC fallback.
|
|
16130
|
-
*
|
|
16131
|
-
* Primary: GET https://lite-api.jup.ag/ultra/v1/balances/{owner}
|
|
16132
|
-
* → { "<mint>": { amount, uiAmount, slot, isFrozen }, "SOL": {…} }
|
|
16133
|
-
* Fallback: `getParsedTokenAccountsByOwner` over the SPL Token and Token-2022
|
|
16134
|
-
* programs, summed per mint.
|
|
16395
|
+
* {@link WalletBalanceSource} adapter over the `jupiter` package's balances API.
|
|
16135
16396
|
*
|
|
16136
|
-
*
|
|
16137
|
-
* `
|
|
16397
|
+
* The Jupiter call and the RPC fallback both live in
|
|
16398
|
+
* `jupiter/src/balancesApi.ts`; this file owns the policy — try Jupiter first,
|
|
16399
|
+
* fall back to RPC on failure or an empty result — plus logging.
|
|
16138
16400
|
*/
|
|
16139
16401
|
|
|
16140
|
-
interface JupiterBalanceSourceOptions {
|
|
16141
|
-
baseUrl?: string;
|
|
16142
|
-
fetchFn?: typeof fetch;
|
|
16402
|
+
interface JupiterBalanceSourceOptions extends FetchJupiterBalancesOptions {
|
|
16143
16403
|
/** Skip the Jupiter call and read straight from RPC. */
|
|
16144
16404
|
rpcOnly?: boolean;
|
|
16145
16405
|
log?: (msg: string) => void;
|
|
16146
16406
|
}
|
|
16147
16407
|
declare class JupiterBalanceSource implements WalletBalanceSource {
|
|
16148
16408
|
private readonly connection;
|
|
16149
|
-
private readonly baseUrl;
|
|
16150
|
-
private readonly fetchFn;
|
|
16151
16409
|
private readonly rpcOnly;
|
|
16152
16410
|
private readonly log;
|
|
16411
|
+
private readonly apiOptions;
|
|
16153
16412
|
constructor(connection: Connection, opts?: JupiterBalanceSourceOptions);
|
|
16154
16413
|
fetchBalances(owner: Address): Promise<Record<string, bigint>>;
|
|
16155
|
-
private fetchFromJupiter;
|
|
16156
|
-
private fetchFromRpc;
|
|
16157
16414
|
}
|
|
16158
16415
|
|
|
16159
16416
|
/**
|
|
@@ -16189,6 +16446,16 @@ declare class KaminoPositionProvider implements ExternalPositionProvider {
|
|
|
16189
16446
|
positionsFor(ctx: ExternalPositionContext): Promise<ExternalPosition[]>;
|
|
16190
16447
|
}
|
|
16191
16448
|
|
|
16449
|
+
/**
|
|
16450
|
+
* {@link ExternalPositionProvider} adapter over the `marginfi` package's
|
|
16451
|
+
* position readers.
|
|
16452
|
+
*
|
|
16453
|
+
* The Marginfi SDK usage and account layout parsing live in
|
|
16454
|
+
* `marginfi/src/positions.ts`; this file maps `ExternalPositionRef`s onto them:
|
|
16455
|
+
* a ref with an explicit `marginfiBank` reads that one bank, while a ref with
|
|
16456
|
+
* only a `marginfiAccount` reports every non-zero balance on the account.
|
|
16457
|
+
*/
|
|
16458
|
+
|
|
16192
16459
|
declare class MarginfiPositionProvider implements ExternalPositionProvider {
|
|
16193
16460
|
private readonly connection;
|
|
16194
16461
|
private readonly log;
|
|
@@ -16196,31 +16463,6 @@ declare class MarginfiPositionProvider implements ExternalPositionProvider {
|
|
|
16196
16463
|
positionsFor(ctx: ExternalPositionContext): Promise<ExternalPosition[]>;
|
|
16197
16464
|
}
|
|
16198
16465
|
|
|
16199
|
-
interface LiveConsensusOracleDepsOptions {
|
|
16200
|
-
log?: (msg: string) => void;
|
|
16201
|
-
rpcOnly?: boolean;
|
|
16202
|
-
includeExternalPositions?: boolean;
|
|
16203
|
-
}
|
|
16204
|
-
declare function createLiveConsensusOracleDeps(connection: Connection, opts?: LiveConsensusOracleDepsOptions): ConsensusOracleDeps;
|
|
16205
|
-
|
|
16206
|
-
interface RunLiveConsensusOracleOptions extends RunOptions {
|
|
16207
|
-
/** Override the RPC endpoint used for vault discovery, price updates, and NAV cranks. */
|
|
16208
|
-
rpcUrl?: string;
|
|
16209
|
-
/** Override the vault program id. Defaults to the environment's configured program. */
|
|
16210
|
-
programId?: Address;
|
|
16211
|
-
/** Skip Jupiter balances and use RPC token-account balances only. */
|
|
16212
|
-
rpcOnly?: boolean;
|
|
16213
|
-
/** Include live Kamino/Marginfi positions in external amount updates. Defaults to true. */
|
|
16214
|
-
includeExternalPositions?: boolean;
|
|
16215
|
-
}
|
|
16216
|
-
/**
|
|
16217
|
-
* Full live consensus-oracle pass for one signer.
|
|
16218
|
-
*
|
|
16219
|
-
* Builds the vault client for `env`, discovers every vault where `oracleSigner`
|
|
16220
|
-
* is registered, updates consensus prices/external allocations, and cranks NAV.
|
|
16221
|
-
*/
|
|
16222
|
-
declare function runLiveConsensusOracle(env: VaultEnv, oracleSigner: Keypair, opts?: RunLiveConsensusOracleOptions): Promise<RunSummary>;
|
|
16223
|
-
|
|
16224
16466
|
/**
|
|
16225
16467
|
* In-memory mock of the bankineco yield tracker.
|
|
16226
16468
|
*
|
|
@@ -16236,6 +16478,8 @@ declare function runLiveConsensusOracle(env: VaultEnv, oracleSigner: Keypair, op
|
|
|
16236
16478
|
*/
|
|
16237
16479
|
|
|
16238
16480
|
interface MockYieldAccountConfig {
|
|
16481
|
+
/** Optional vault address used by production-style account discovery. */
|
|
16482
|
+
tag?: string;
|
|
16239
16483
|
aprBps: number;
|
|
16240
16484
|
/** Initial principal (UI amount). Defaults to 0. */
|
|
16241
16485
|
principal?: number;
|
|
@@ -16253,10 +16497,15 @@ declare class MockYieldTracker implements YieldTracker {
|
|
|
16253
16497
|
/** Register (or replace) a tracked account. */
|
|
16254
16498
|
setAccount(name: string, cfg: MockYieldAccountConfig): void;
|
|
16255
16499
|
private require;
|
|
16500
|
+
getAccountNamesForVault(vault: string): Promise<string[]>;
|
|
16256
16501
|
getYieldPayments(accountName: string): Promise<YieldPaymentSnapshot[]>;
|
|
16257
16502
|
getYield(accountName: string, start?: Date, end?: Date): Promise<YieldAccountSnapshot>;
|
|
16258
16503
|
getTotalYield(accountNames: string[], start?: Date, end?: Date): Promise<number>;
|
|
16259
16504
|
getTotalOutstandingYield(accountNames: string[], start?: Date, end?: Date): Promise<number>;
|
|
16505
|
+
getTotalTrackedAmounts(accountNames: string[], start?: Date, end?: Date): Promise<{
|
|
16506
|
+
principal: number;
|
|
16507
|
+
outstandingYield: number;
|
|
16508
|
+
}>;
|
|
16260
16509
|
getBalance(accountName: string, atTime?: Date): Promise<number>;
|
|
16261
16510
|
addCashflow(params: {
|
|
16262
16511
|
accountName: string;
|
|
@@ -16309,6 +16558,31 @@ declare function applyEffectiveApy(anchor: bigint, apyBps: number, elapsedSecs:
|
|
|
16309
16558
|
/** Human-readable CLI lines for a raw settlement projection. */
|
|
16310
16559
|
declare function formatSettlementSimulation(simulation: SettlementSimulation): string[];
|
|
16311
16560
|
|
|
16561
|
+
interface LiveConsensusOracleDepsOptions {
|
|
16562
|
+
log?: (msg: string) => void;
|
|
16563
|
+
rpcOnly?: boolean;
|
|
16564
|
+
includeExternalPositions?: boolean;
|
|
16565
|
+
}
|
|
16566
|
+
declare function createLiveConsensusOracleDeps(connection: Connection, opts?: LiveConsensusOracleDepsOptions): ConsensusOracleDeps;
|
|
16567
|
+
|
|
16568
|
+
interface RunLiveConsensusOracleOptions extends RunOptions {
|
|
16569
|
+
/** Override the RPC endpoint used for vault discovery, price updates, and NAV cranks. */
|
|
16570
|
+
rpcUrl?: string;
|
|
16571
|
+
/** Override the vault program id. Defaults to the environment's configured program. */
|
|
16572
|
+
programId?: Address;
|
|
16573
|
+
/** Skip Jupiter balances and use RPC token-account balances only. */
|
|
16574
|
+
rpcOnly?: boolean;
|
|
16575
|
+
/** Include live Kamino/Marginfi positions in external amount updates. Defaults to true. */
|
|
16576
|
+
includeExternalPositions?: boolean;
|
|
16577
|
+
}
|
|
16578
|
+
/**
|
|
16579
|
+
* Full live consensus-oracle pass for one signer.
|
|
16580
|
+
*
|
|
16581
|
+
* Builds the vault client for `env`, discovers every vault where `oracleSigner`
|
|
16582
|
+
* is registered, updates consensus prices/external allocations, and cranks NAV.
|
|
16583
|
+
*/
|
|
16584
|
+
declare function runLiveConsensusOracle(env: VaultEnv, oracleSigner: Keypair, opts?: RunLiveConsensusOracleOptions): Promise<RunSummary>;
|
|
16585
|
+
|
|
16312
16586
|
declare class ConsensusOracleService {
|
|
16313
16587
|
private readonly client;
|
|
16314
16588
|
private readonly deps;
|
|
@@ -16317,14 +16591,6 @@ declare class ConsensusOracleService {
|
|
|
16317
16591
|
constructor(client: VaultClient, deps: ConsensusOracleDeps);
|
|
16318
16592
|
/** Drive one vault: source prices/balances, push consensus update, crank NAV. */
|
|
16319
16593
|
runOnce(signer: Keypair, target: ConsensusOracleTarget, opts?: RunOptions): Promise<VaultOracleResult>;
|
|
16320
|
-
/** Read canonical supplies and replay the exact on-chain settlement path. */
|
|
16321
|
-
private simulateDryRunSettlement;
|
|
16322
|
-
/**
|
|
16323
|
-
* Fail closed while any configured yield account has an unsettled payment.
|
|
16324
|
-
* The payout must be confirmed only after it is visible in the same wallet
|
|
16325
|
-
* balance source used by this service. Until then, no oracle update is safe.
|
|
16326
|
-
*/
|
|
16327
|
-
private assertNoUnconfirmedYieldPayments;
|
|
16328
16594
|
/**
|
|
16329
16595
|
* Drive several vaults in sequence. Non-fatal: a failure on one vault is
|
|
16330
16596
|
* recorded and the rest still run (mirrors the oracle-updater daemon).
|
|
@@ -16334,46 +16600,13 @@ declare class ConsensusOracleService {
|
|
|
16334
16600
|
runDiscoveredForSigner(signer: Keypair, opts?: RunOptions): Promise<RunSummary>;
|
|
16335
16601
|
/**
|
|
16336
16602
|
* Discover all on-chain vaults for which `signer` is a registered consensus
|
|
16337
|
-
* oracle signer.
|
|
16338
|
-
* signer membership. Returns minimal `ConsensusOracleTarget` entries (no
|
|
16339
|
-
* per-holding config); callers can overlay config from `targets.ts` if needed.
|
|
16603
|
+
* oracle signer.
|
|
16340
16604
|
*/
|
|
16341
16605
|
discoverVaultsForSigner(signer: Keypair, opts?: {
|
|
16342
16606
|
log?: (msg: string) => void;
|
|
16343
16607
|
}): Promise<ConsensusOracleTarget[]>;
|
|
16608
|
+
private nowSecs;
|
|
16344
16609
|
private fetchDecodedVault;
|
|
16345
|
-
/**
|
|
16346
|
-
* Keep active permissionless price sources warm so they cannot block the NAV
|
|
16347
|
-
* crank after the consensus report lands. Prices are refreshed at least once
|
|
16348
|
-
* per hour, or at the vault's shorter staleness interval when configured.
|
|
16349
|
-
*/
|
|
16350
|
-
private refreshLiveOraclePrices;
|
|
16351
|
-
/**
|
|
16352
|
-
* Receipt mints issued by this vault are liabilities/shares, not underlying
|
|
16353
|
-
* assets for its own NAV. Exclude them even if they were registered as
|
|
16354
|
-
* consensus-priced holdings.
|
|
16355
|
-
*/
|
|
16356
|
-
private fetchReceiptMints;
|
|
16357
|
-
/** Fetch every external input the per-holding updates draw on, in parallel-ish. */
|
|
16358
|
-
private gatherPricingInputs;
|
|
16359
|
-
/** Live-LP balances for the target, summed by mint (empty if no provider). */
|
|
16360
|
-
private fetchExternalPositions;
|
|
16361
|
-
/** Accrued yield (base units) attributed to a holding via its configured accounts. */
|
|
16362
|
-
private resolveYieldAmount;
|
|
16363
|
-
private buildUpdates;
|
|
16364
|
-
private buildHoldingUpdate;
|
|
16365
|
-
/** Push the consensus report for all holdings, then settle NAV. */
|
|
16366
|
-
private settleVault;
|
|
16367
|
-
/**
|
|
16368
|
-
* Fetch the current settlement timestamp and log the APY implied by the
|
|
16369
|
-
* prospective update, so MaxApyExceeded failures are diagnosable.
|
|
16370
|
-
*
|
|
16371
|
-
* NAV is expressed in the vault's accounting unit (scaled by assetDecimals).
|
|
16372
|
-
* Mirrors `gross_nav_from_holdings`: consensus updates overlay their target
|
|
16373
|
-
* slots, while live-priced and otherwise unchanged holdings retain their
|
|
16374
|
-
* current price/external amount.
|
|
16375
|
-
*/
|
|
16376
|
-
private logProspectiveApy;
|
|
16377
16610
|
}
|
|
16378
16611
|
|
|
16379
16612
|
/**
|
|
@@ -16393,6 +16626,7 @@ interface ExternalLiquidityIntegrityResult {
|
|
|
16393
16626
|
deposited: number;
|
|
16394
16627
|
skipped: number;
|
|
16395
16628
|
failed: number;
|
|
16629
|
+
/** Signatures of sent deposits (empty in dry-run mode). */
|
|
16396
16630
|
signatures: string[];
|
|
16397
16631
|
}
|
|
16398
16632
|
interface ExternalLiquidityIntegritySummary {
|
|
@@ -16400,8 +16634,22 @@ interface ExternalLiquidityIntegritySummary {
|
|
|
16400
16634
|
totalDeposited: number;
|
|
16401
16635
|
totalSkipped: number;
|
|
16402
16636
|
totalFailed: number;
|
|
16637
|
+
/** True when deposits were simulated rather than sent. */
|
|
16638
|
+
dryRun: boolean;
|
|
16403
16639
|
}
|
|
16404
16640
|
type LogFn = (msg: string) => void;
|
|
16641
|
+
interface ExternalLiquidityIntegrityOptions {
|
|
16642
|
+
log?: LogFn;
|
|
16643
|
+
/** Simulate each deposit instead of sending it. Nothing is submitted. */
|
|
16644
|
+
dryRun?: boolean;
|
|
16645
|
+
/**
|
|
16646
|
+
* Skip holdings worth less than this many UI tokens. Every mint with a
|
|
16647
|
+
* Marginfi bank is a USD stablecoin, so the default of 1 means "ignore
|
|
16648
|
+
* dust below ~$1" and keeps the tx fee from exceeding the deposit.
|
|
16649
|
+
*/
|
|
16650
|
+
minAmountUi?: number;
|
|
16651
|
+
}
|
|
16652
|
+
declare const DEFAULT_MIN_AMOUNT_UI = 1;
|
|
16405
16653
|
declare class ExternalLiquidityIntegrityService {
|
|
16406
16654
|
private readonly client;
|
|
16407
16655
|
constructor(client: VaultClient);
|
|
@@ -16409,15 +16657,16 @@ declare class ExternalLiquidityIntegrityService {
|
|
|
16409
16657
|
* Scan all vaults and deposit any idle local balance into configured external
|
|
16410
16658
|
* liquidity positions. Non-fatal per vault — errors are logged and counted.
|
|
16411
16659
|
*/
|
|
16412
|
-
runAll(hwManager: Keypair, opts?:
|
|
16413
|
-
log?: LogFn;
|
|
16414
|
-
}): Promise<ExternalLiquidityIntegritySummary>;
|
|
16660
|
+
runAll(hwManager: Keypair, opts?: ExternalLiquidityIntegrityOptions): Promise<ExternalLiquidityIntegritySummary>;
|
|
16415
16661
|
/**
|
|
16416
16662
|
* Process a single vault: for each active external liquidity slot, deposit
|
|
16417
16663
|
* any holdings that have a non-zero local_amount.
|
|
16418
16664
|
*/
|
|
16419
|
-
processVault(vault: Address, vaultState: VaultAccountData, hwManager: Keypair, log: LogFn
|
|
16665
|
+
processVault(vault: Address, vaultState: VaultAccountData, hwManager: Keypair, log: LogFn, opts?: {
|
|
16666
|
+
dryRun?: boolean;
|
|
16667
|
+
minAmountUi?: number;
|
|
16668
|
+
}): Promise<ExternalLiquidityIntegrityResult>;
|
|
16420
16669
|
private depositIntoMarginfi;
|
|
16421
16670
|
}
|
|
16422
16671
|
|
|
16423
|
-
export { ASSET_DECIMALS, type AccountBalanceResponse, AccountClient, type AccountYieldResponse, ActivateCircuitBreakerBuilder, type ActivateCircuitBreakerIxArgs, type ActivateCircuitBreakerTxArgs, type AssetPriceOracleConfigIxArgs, type AssetPriceOracleConfigTxArgs, type AssetPriceRefreshTarget, type AssetRefreshResult, type Bankineco, type BasicAuthCredentials, type Bigintish, CancelJuniorTrancheWithdrawBuilder, type CancelJuniorTrancheWithdrawIxArgs, type CancelJuniorTrancheWithdrawTxArgs, type Clock, type ConsensusAssetUpdate, type ConsensusHoldingEntry, type ConsensusHoldingSimulation, type ConsensusOracleDeps, type ConsensusOracleHoldingConfig, ConsensusOracleService, type ConsensusOracleTarget, CrankNavBuilder, type CrankNavIxArgs, type CrankNavTxArgs, CrankPerformanceFeesBuilder, type CrankPerformanceFeesIxArgs, type CrankPerformanceFeesTxArgs, type CreateAccountParams, CreateAssetHoldingBuilder, type CreateAssetHoldingIxArgs, type CreateAssetHoldingTxArgs, type CreateTokenMintIxs, CreateTrancheStateBuilder, type CreateTrancheStateIxArgs, type CreateTrancheStateTxArgs, CreateVaultBuilder, type CreateVaultClientOptions, type CreateVaultIxArgs, type CreateVaultParams, type CreateVaultTxArgs, type CreateYieldPaymentParams, DEFAULT_JUNIOR_EARLY_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_STANDARD_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_WITHDRAWAL_LOCKUP_SECS, DEFAULT_MAX_ACCEPTABLE_APY_BPS, DEFAULT_ORACLE_STALENESS_THRESHOLD_SECS, DEFAULT_PRICE_ORACLE_ACCOUNT, DEFAULT_PRICE_STALENESS_THRESHOLD_SECS, DEFAULT_VAULT_ID, type DecodedHolding, type DecodedVault, type DecodedVaultTrancheState, type DeleteAccountParams, DisableCircuitBreakerBuilder, type DisableCircuitBreakerIxArgs, type DisableCircuitBreakerTxArgs, ExecuteDepositBuilder, type ExecuteDepositIxArgs, type ExecuteDepositTxArgs, ExecuteShareSwapBuilder, type ExecuteShareSwapIxArgs, type ExecuteShareSwapTxArgs, ExecuteTrancheDepositBuilder, type ExecuteTrancheDepositIxArgs, type ExecuteTrancheDepositTxArgs, ExecuteTrancheWithdrawBuilder, type ExecuteTrancheWithdrawIxArgs, type ExecuteTrancheWithdrawTxArgs, ExecuteWithdrawBuilder, type ExecuteWithdrawIxArgs, type ExecuteWithdrawTxArgs, type ExternalLiquidityIntegrityResult, ExternalLiquidityIntegrityService, type ExternalLiquidityIntegritySummary, type ExternalLiquiditySlot, type ExternalLiquiditySourceArgs, type ExternalPosition, type ExternalPositionContext, type ExternalPositionProvider, type ExternalPositionRef, ExternalPositionRegistry, FEE_VAULT_CACHE_CATEGORY, type FeeVaultAccountData, type FetchNestTokenPriceOptions, FulfillJuniorTrancheWithdrawBuilder, type FulfillJuniorTrancheWithdrawIxArgs, type FulfillJuniorTrancheWithdrawTxArgs, type FulfillSummary, type HoldingUpdatePreview, IDL, InitializeVaultRolesBuilder, type InitializeVaultRolesIxArgs, type InitializeVaultRolesTxArgs, type JuniorWithdrawalMode, JupiterBalanceSource, type JupiterBalanceSourceOptions, JupiterPriceSource, type JupiterPriceSourceOptions, JupiterSwapBuilder, type JupiterSwapIxArgs, type JupiterSwapTxArgs, KaminoPositionProvider, LOCAL_PROTOCOL_ADMIN, type LiveConsensusOracleDepsOptions, LivePriceSource, type LivePriceSourceOptions, MAX_PRICE_STALENESS_THRESHOLD_SECS, ManagerRedepositAssetBuilder, type ManagerRedepositAssetIxArgs, type ManagerRedepositAssetTxArgs, ManagerWithdrawAssetBuilder, type ManagerWithdrawAssetIxArgs, type ManagerWithdrawAssetTxArgs, MarginfiPositionProvider, type MockYieldAccountConfig, MockYieldTracker, type MockYieldTrackerOptions,
|
|
16672
|
+
export { ASSET_DECIMALS, type AccountBalanceResponse, AccountClient, type AccountYieldResponse, ActivateCircuitBreakerBuilder, type ActivateCircuitBreakerIxArgs, type ActivateCircuitBreakerTxArgs, type AssetPriceOracleConfigIxArgs, type AssetPriceOracleConfigTxArgs, type AssetPriceRefreshTarget, type AssetRefreshResult, type Bankineco, type BasicAuthCredentials, type Bigintish, CONSENSUS_ORACLE_VARIANT, CancelJuniorTrancheWithdrawBuilder, type CancelJuniorTrancheWithdrawIxArgs, type CancelJuniorTrancheWithdrawTxArgs, type Clock, type CollectSamplesOptions, type ConsensusAssetUpdate, type ConsensusHoldingEntry, type ConsensusHoldingSimulation, type ConsensusOracleDeps, type ConsensusOracleHoldingConfig, ConsensusOracleService, type ConsensusOracleTarget, CrankNavBuilder, type CrankNavIxArgs, type CrankNavTxArgs, CrankPerformanceFeesBuilder, type CrankPerformanceFeesIxArgs, type CrankPerformanceFeesTxArgs, type CreateAccountParams, CreateAssetHoldingBuilder, type CreateAssetHoldingIxArgs, type CreateAssetHoldingTxArgs, type CreateTokenMintIxs, CreateTrancheStateBuilder, type CreateTrancheStateIxArgs, type CreateTrancheStateTxArgs, CreateVaultBuilder, type CreateVaultClientOptions, type CreateVaultIxArgs, type CreateVaultParams, type CreateVaultTxArgs, type CreateYieldPaymentParams, DEFAULT_JUNIOR_EARLY_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_STANDARD_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_WITHDRAWAL_LOCKUP_SECS, DEFAULT_MAX_ACCEPTABLE_APY_BPS, DEFAULT_MIN_AMOUNT_UI, DEFAULT_ORACLE_STALENESS_THRESHOLD_SECS, DEFAULT_PRICE_ORACLE_ACCOUNT, DEFAULT_PRICE_STALENESS_SECS, DEFAULT_PRICE_STALENESS_THRESHOLD_SECS, DEFAULT_VAULT_ID, type DecodedHolding, type DecodedVault, type DecodedVaultTrancheState, type DeleteAccountParams, DisableCircuitBreakerBuilder, type DisableCircuitBreakerIxArgs, type DisableCircuitBreakerTxArgs, EXTERNAL_POSITION_SAMPLES, ExecuteDepositBuilder, type ExecuteDepositIxArgs, type ExecuteDepositTxArgs, ExecuteShareSwapBuilder, type ExecuteShareSwapIxArgs, type ExecuteShareSwapTxArgs, ExecuteTrancheDepositBuilder, type ExecuteTrancheDepositIxArgs, type ExecuteTrancheDepositTxArgs, ExecuteTrancheWithdrawBuilder, type ExecuteTrancheWithdrawIxArgs, type ExecuteTrancheWithdrawTxArgs, ExecuteWithdrawBuilder, type ExecuteWithdrawIxArgs, type ExecuteWithdrawTxArgs, type ExternalLiquidityIntegrityOptions, type ExternalLiquidityIntegrityResult, ExternalLiquidityIntegrityService, type ExternalLiquidityIntegritySummary, type ExternalLiquiditySlot, type ExternalLiquiditySourceArgs, type ExternalPosition, type ExternalPositionContext, type ExternalPositionProvider, type ExternalPositionRef, ExternalPositionRegistry, FEE_VAULT_CACHE_CATEGORY, type FeeVaultAccountData, type FetchNestTokenPriceOptions, FulfillJuniorTrancheWithdrawBuilder, type FulfillJuniorTrancheWithdrawIxArgs, type FulfillJuniorTrancheWithdrawTxArgs, type FulfillSummary, type HoldingNavContribution, type HoldingUpdatePreview, IDL, InitializeVaultRolesBuilder, type InitializeVaultRolesIxArgs, type InitializeVaultRolesTxArgs, type JuniorWithdrawalMode, JupiterBalanceSource, type JupiterBalanceSourceOptions, JupiterPriceSource, type JupiterPriceSourceOptions, JupiterSwapBuilder, type JupiterSwapIxArgs, type JupiterSwapTxArgs, KaminoPositionProvider, LIVE_ORACLE_VARIANTS, LIVE_PRICE_REFRESH_INTERVAL_SECS, LOCAL_PROTOCOL_ADMIN, type LiveConsensusOracleDepsOptions, LivePriceSource, type LivePriceSourceOptions, MAX_CONSENSUS_SIGNERS, MAX_PRICE_STALENESS_THRESHOLD_SECS, MIN_EXTERNAL_POSITION_SAMPLES, ManagerRedepositAssetBuilder, type ManagerRedepositAssetIxArgs, type ManagerRedepositAssetTxArgs, ManagerWithdrawAssetBuilder, type ManagerWithdrawAssetIxArgs, type ManagerWithdrawAssetTxArgs, MarginfiPositionProvider, type MockYieldAccountConfig, MockYieldTracker, type MockYieldTrackerOptions, NEST_RWA_SHARE_MINT, NEST_VAULT_SLUG, type NavCrankBlocker, type NavCrankBlockerReason, type NavCrankReadiness, type NavCrankResult, NestPriceSource, type NestPriceSourceOptions, ORACLE_ENTRIES_OFFSET, ORACLE_ENTRY_SIZE, ORACLE_SETTLED_NAV_TS_OFFSET, OracleService, PRICE_ORACLE_TYPES_BY_INDEX, PROGRAM_FEE_EXEMPT_OWNER_WHITELIST, PROTOCOL_ADMIN, PROTOCOL_FEE_RECIPIENT, PdaClient, type PreparedDirectTransaction, type PreparedSquadsTransaction, type PreparedVaultTransaction, type PriceOracleTypeArgs, type PriceSource, ProtocolInteractionBuilder, type ProtocolInteractionIxArgs, type ProtocolInteractionTxArgs, type QuoteFeeUnit, REPORTABLE_ORACLE_VARIANTS, type RefreshLiveOraclePricesParams, RemoveAssetHoldingBuilder, type RemoveAssetHoldingIxArgs, type RemoveAssetHoldingTxArgs, RequestJuniorTrancheWithdrawBuilder, type RequestJuniorTrancheWithdrawIxArgs, type RequestJuniorTrancheWithdrawTxArgs, type ResolvedSquadsWalletRoute, type RollingLimitConfig, type RunLiveConsensusOracleOptions, type RunOptions, type RunSummary, SHARE_DECIMALS, SYSTEM_PROGRAM, SetAssetPriceOracleBuilder, type SetAssetPriceOracleIxArgs, type SetAssetPriceOracleTxArgs, SetExternalLiquidityBuilder, type SetExternalLiquidityIxArgs, type SetExternalLiquidityTxArgs, SetProtocolFeeBuilder, type SetProtocolFeeIxArgs, type SetProtocolFeeTxArgs, SetVaultConfigBuilder, type SetVaultConfigIxArgs, type SetVaultConfigTxArgs, type SettleVaultParams, type SettleVaultResult, type SettlementSimulation, type SettlementSimulationSnapshot, type SimulateDryRunSettlementParams, type SimulateSettlementArgs, type SimulatedShareClass, type SquadsWalletRouteConfig, StaticPositionProvider, TOKEN_PROGRAM, TOKEN_PROGRAM_ID, type TrancheKindArgs, type TransactionBuilder, TransactionClient, USDC_MINT, USD_STAR_JUNIOR_MINT, USD_STAR_MINT, USD_STAR_PRINCIPAL_MINT, type UpdateAccountParams, UpdateAssetPriceBuilder, type UpdateAssetPriceIxArgs, type UpdateAssetPriceTxArgs, UpdateConsensusOracleBuilder, type UpdateConsensusOracleIxArgs, type UpdateConsensusOracleTxArgs, UpdateConsensusSignersBuilder, type UpdateConsensusSignersIxArgs, type UpdateConsensusSignersTxArgs, type UpdateDynamicAprParams, UpdateTrancheConfigBuilder, type UpdateTrancheConfigIxArgs, type UpdateTrancheConfigTxArgs, VAULT_CACHE_CATEGORY, VAULT_CREATOR_WHITELIST, VAULT_ENVIRONMENTS, VAULT_ORACLE_CACHE_CATEGORY, VAULT_PROGRAM_ID, VAULT_PROGRAM_IDS, VAULT_PROGRAM_PUBLIC_KEY, VAULT_ROLE_UPDATE_TIMELOCK_SECS, VAULT_TRANCHE_STATE_CACHE_CATEGORY, VAULT_TRANCHE_WITHDRAWAL_QUEUE_CACHE_CATEGORY, type Vault, type VaultAccountData, VaultBuilderBase, type VaultBuilderContext, type VaultCacheInvalidation, VaultClient, type VaultClientBundle, type VaultEnv, type VaultOracleAccountData, type VaultOracleResult, type VaultPricingInputs, type VaultQuote, type VaultQuoteArgs, VaultQuoteClient, type VaultQuoteDirection, type VaultQuoteShareClass, VaultReallocationBuilder, type VaultReallocationIxArgs, type VaultReallocationTxArgs, type VaultTrancheStateAccountData, type VaultTrancheWithdrawalQueueAccountData, type VaultTransactionPlan, type WalletBalanceSource, type WithdrawProtocolFeesIxArgs, type WithdrawProtocolFeesTxArgs, type WithdrawTrancheFeesIxArgs, type WithdrawTrancheFeesTxArgs, WithdrawalQueueService, type WithdrawalQueueSnapshot, type YieldAccount, type YieldAccountSnapshot, type YieldCalculationLog, type YieldPaymentResponse, type YieldPaymentSnapshot, type YieldTracker, accountingUnitPriceToUsd, addCashflowUpdate, applyEffectiveApy, assertNoUnconfirmedYieldPayments, buildHoldingUpdate, buildUpdates, coerceBool, collectSamples, confirmYieldPayment, createAccount, createLiveConsensusOracleDeps, createRpcFromConnection, createTokenMint, createTokenMintIxs, createVaultClient, createYieldPayment, dateToStr, defaultKeypairPath, deleteAccount, discoverVaultsForSigner, fetchExternalPositions, fetchNestTokenPrice, fetchReceiptMints, filterTargetHoldings, findSquadsWalletRoute, formatSettlementSimulation, fromUiAmount, gatherPricingInputs, getAccounts, getBalance, getCashflows, getRpcUrl, getTotalOutstandingYield, getTotalYield, getVaultProgramId, getYield, getYieldPayments, indexConfigByMint, isVaultEnv, keypairAddress, loadKeypair, logProspectiveApy, makeProvider, mintTokensTo, mostFrequent, parseExternalLiquidityRefs, prepareVaultTransaction, priceInAccountingUnit, readI64LE, readSplMintSupply, refreshLiveOraclePrices, resolveKeypairPath, resolveSquadsWalletRoute, resolveTrackedAmounts, roundToNextUtcMidnight, runLiveConsensusOracle, selectReportableHoldings, settleVault, signerInOracleData, simulateConsensusOracleSettlement, simulateDryRunSettlement, sumPositionsByMint, systemClock, toBigInt, toUiAmount, updateAccount, updateDynamicApr, validateSquadsWalletRoutes, variantName, vaultAuthorityForWallet, withDiscoveredYieldAccounts };
|