@perena/vault-sdk 1.0.68 → 1.0.69
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/README.md +10 -3
- package/dist/index.d.ts +33 -22
- package/dist/index.js +119 -52
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -445,6 +445,7 @@ Use `client.quote.quote(...)` to calculate expected output amounts before
|
|
|
445
445
|
building a transaction. Quotes fetch the current vault/tranche state and use the
|
|
446
446
|
same fee formulas as the program. To quote a fee-exempt route, provide the same
|
|
447
447
|
`addressSeeds`; owner allowlisting by itself does not make a quote fee-exempt.
|
|
448
|
+
Allowlisted wallets receive their exemption automatically without PDA seeds.
|
|
448
449
|
|
|
449
450
|
All amounts are base units. `expectedAmountOut` is the net amount after fees;
|
|
450
451
|
`grossAmountOut`, `feeAmount`, `feeBps`, and `feeExempt` explain the quote.
|
|
@@ -463,7 +464,7 @@ const depositQuote = await client.quote.quote({
|
|
|
463
464
|
});
|
|
464
465
|
|
|
465
466
|
console.log(depositQuote.expectedAmountOut); // regular shares to receive
|
|
466
|
-
console.log(depositQuote.feeExempt); // false
|
|
467
|
+
console.log(depositQuote.feeExempt); // false for a non-allowlisted wallet
|
|
467
468
|
|
|
468
469
|
const exemptDepositQuote = await client.quote.quote({
|
|
469
470
|
shareClass: "regular",
|
|
@@ -490,6 +491,11 @@ console.log(withdrawQuote.expectedAmountOut); // asset tokens to receive
|
|
|
490
491
|
|
|
491
492
|
### Junior and senior tranches
|
|
492
493
|
|
|
494
|
+
Both tranche deposit types use the same vault `mintFeeBps` as regular deposits,
|
|
495
|
+
with fees accruing as pending curator shares. Quotes follow each path's integer
|
|
496
|
+
rounding: regular deposits deduct the fee from gross shares, while tranche
|
|
497
|
+
deposits deduct it from the deposit's accounting value before minting shares.
|
|
498
|
+
|
|
493
499
|
```typescript
|
|
494
500
|
// Asset -> junior tranche shares
|
|
495
501
|
const juniorDepositQuote = await client.quote.quote({
|
|
@@ -514,8 +520,9 @@ const seniorDepositQuote = await client.quote.quote({
|
|
|
514
520
|
|
|
515
521
|
For junior withdrawals, pass `withdrawalMode: "instant"` to quote
|
|
516
522
|
`executeTrancheWithdraw`, or `withdrawalMode: "queued"` to quote
|
|
517
|
-
`fulfillJuniorTrancheWithdraw` after lockup. Senior withdrawals
|
|
518
|
-
|
|
523
|
+
`fulfillJuniorTrancheWithdraw` after lockup. Senior withdrawals use the vault's
|
|
524
|
+
`burnFeeBps`, like regular withdrawals, and accrue the fee as pending curator
|
|
525
|
+
shares. The existing wallet and approved-PDA fee exemptions still apply.
|
|
519
526
|
|
|
520
527
|
```typescript
|
|
521
528
|
// Junior tranche shares -> asset through instant withdrawal.
|
package/dist/index.d.ts
CHANGED
|
@@ -12041,7 +12041,8 @@ type VaultQuoteArgs = (BaseQuoteArgs & {
|
|
|
12041
12041
|
direction: "withdraw";
|
|
12042
12042
|
/**
|
|
12043
12043
|
* Junior withdrawals use the early fee for instant withdrawals and the
|
|
12044
|
-
* standard fee for queued fulfillment. Senior withdrawals
|
|
12044
|
+
* standard fee for queued fulfillment. Senior withdrawals use the vault's
|
|
12045
|
+
* burn fee regardless of this option.
|
|
12045
12046
|
*/
|
|
12046
12047
|
withdrawalMode?: JuniorWithdrawalMode;
|
|
12047
12048
|
});
|
|
@@ -14956,6 +14957,23 @@ interface NavCrankResult {
|
|
|
14956
14957
|
reason?: string;
|
|
14957
14958
|
readiness: NavCrankReadiness;
|
|
14958
14959
|
}
|
|
14960
|
+
interface ConsensusAssetUpdateArgs {
|
|
14961
|
+
vault: Address;
|
|
14962
|
+
updates: {
|
|
14963
|
+
holdingIndex: number;
|
|
14964
|
+
mint?: Address;
|
|
14965
|
+
price: bigint;
|
|
14966
|
+
externalAmount: bigint;
|
|
14967
|
+
}[];
|
|
14968
|
+
assetMint?: Address;
|
|
14969
|
+
assetTokenProgram?: Address;
|
|
14970
|
+
}
|
|
14971
|
+
interface ConsensusOraclePublicationResult {
|
|
14972
|
+
updateSignature: string;
|
|
14973
|
+
/** The same signature as updateSignature when NAV was settled atomically. */
|
|
14974
|
+
crankSignature?: string;
|
|
14975
|
+
crankSkippedReason?: string;
|
|
14976
|
+
}
|
|
14959
14977
|
/** A holding to refresh via `update_asset_price` (Pyth / nested-vault priced). */
|
|
14960
14978
|
interface AssetPriceRefreshTarget {
|
|
14961
14979
|
mint: Address;
|
|
@@ -14977,17 +14995,14 @@ declare class OracleService {
|
|
|
14977
14995
|
* update only to register a new consensus holding (pass `assetMint` too). NAV is
|
|
14978
14996
|
* NOT settled here — call {@link crankNav} afterward.
|
|
14979
14997
|
*/
|
|
14980
|
-
updateAssetConsensusPrice(signer: Keypair, args:
|
|
14981
|
-
|
|
14982
|
-
|
|
14983
|
-
|
|
14984
|
-
|
|
14985
|
-
|
|
14986
|
-
|
|
14987
|
-
|
|
14988
|
-
assetMint?: Address;
|
|
14989
|
-
assetTokenProgram?: Address;
|
|
14990
|
-
}, log?: LogFn$3): Promise<string>;
|
|
14998
|
+
updateAssetConsensusPrice(signer: Keypair, args: ConsensusAssetUpdateArgs, log?: LogFn$3): Promise<string>;
|
|
14999
|
+
/**
|
|
15000
|
+
* Simulate the update followed by NAV settlement in one transaction. If the
|
|
15001
|
+
* combined plan cannot be built or simulated successfully, publish only the
|
|
15002
|
+
* report. The caller must first verify that the report will reach consensus;
|
|
15003
|
+
* a successful crank alone can still settle unchanged holdings.
|
|
15004
|
+
*/
|
|
15005
|
+
updateAssetConsensusPriceAndCrankNavIfReady(signer: Keypair, args: ConsensusAssetUpdateArgs, log?: LogFn$3, beforeSubmit?: () => Promise<void>): Promise<ConsensusOraclePublicationResult>;
|
|
14991
15006
|
/** Settle the vault NAV from its current holdings (permissionless). */
|
|
14992
15007
|
crankNav(cranker: Keypair, args: {
|
|
14993
15008
|
vault: Address;
|
|
@@ -15205,7 +15220,7 @@ interface VaultOracleResult {
|
|
|
15205
15220
|
settlementSimulationError?: string;
|
|
15206
15221
|
/** `update_consensus_oracle` signature (absent on dry runs / no holdings). */
|
|
15207
15222
|
updateSignature?: string;
|
|
15208
|
-
/**
|
|
15223
|
+
/** Same as updateSignature when bundled; absent on dry runs / skipped crank. */
|
|
15209
15224
|
crankSignature?: string;
|
|
15210
15225
|
/** Reason `crank_nav` was skipped after a successful oracle update. */
|
|
15211
15226
|
crankSkippedReason?: string;
|
|
@@ -15655,14 +15670,10 @@ declare function fetchExternalPositions(deps: ConsensusOracleDeps, target: Conse
|
|
|
15655
15670
|
declare function fetchReceiptMints(client: VaultClient, vault: Address, vaultState: DecodedVault): Promise<Set<string>>;
|
|
15656
15671
|
|
|
15657
15672
|
/**
|
|
15658
|
-
* Settlement step:
|
|
15673
|
+
* Settlement step: publish the report and, when ready, settle NAV atomically.
|
|
15659
15674
|
*/
|
|
15660
15675
|
|
|
15661
|
-
|
|
15662
|
-
updateSignature: string;
|
|
15663
|
-
crankSignature?: string;
|
|
15664
|
-
crankSkippedReason?: string;
|
|
15665
|
-
}
|
|
15676
|
+
type SettleVaultResult = ConsensusOraclePublicationResult;
|
|
15666
15677
|
interface SettleVaultParams {
|
|
15667
15678
|
client: VaultClient;
|
|
15668
15679
|
oracle: OracleService;
|
|
@@ -15676,7 +15687,7 @@ interface SettleVaultParams {
|
|
|
15676
15687
|
/** Revalidate a wallet attribution after projections and before publication. */
|
|
15677
15688
|
beforeSubmit?: () => Promise<void>;
|
|
15678
15689
|
}
|
|
15679
|
-
/**
|
|
15690
|
+
/** Publish only the report unless consensus and the combined crank can pass. */
|
|
15680
15691
|
declare function settleVault({ client, oracle, yieldTracker, signer, target, updates, vaultState, nowSecs, log, beforeSubmit, }: SettleVaultParams): Promise<SettleVaultResult>;
|
|
15681
15692
|
interface LogProspectiveApyParams {
|
|
15682
15693
|
client: VaultClient;
|
|
@@ -16005,7 +16016,7 @@ declare class MockYieldTracker implements YieldTracker {
|
|
|
16005
16016
|
}
|
|
16006
16017
|
|
|
16007
16018
|
/**
|
|
16008
|
-
* Pure dry-run simulator for the two
|
|
16019
|
+
* Pure dry-run simulator for the two instructions emitted by the consensus
|
|
16009
16020
|
* oracle service:
|
|
16010
16021
|
*
|
|
16011
16022
|
* 1. `update_consensus_oracle` overlays this signer's report and averages all
|
|
@@ -16516,4 +16527,4 @@ declare function collectVaultLookupTableAccounts(client: VaultClient, vault: Add
|
|
|
16516
16527
|
extraAccounts?: Address[];
|
|
16517
16528
|
}): Promise<Address[]>;
|
|
16518
16529
|
|
|
16519
|
-
export { ASSET_DECIMALS, ASSET_REBALANCE_COOLDOWN_SECS, ASYNC_REDEMPTION_CANCEL_DELAY_SECS, type AccountBalanceResponse, AccountClient, type AccountYieldResponse, ActivateCircuitBreakerBuilder, type ActivateCircuitBreakerIxArgs, type ActivateCircuitBreakerTxArgs, type AddAprCashflowUpdateParams, type AddCashflowUpdateParams, type AddIncentiveRecipientArgs, AddIncentiveRecipientBuilder, type AddIncentiveRecipientIxArgs, AddIncentiveRecipientV3Builder, type AddIncentiveRecipientV3IxArgs, type AddIncentiveRecipientV3TxArgs, type AddNavCashflowUpdateParams, type AprAccountBalanceResponse, type AprAccountYieldResponse, type AssetPriceOracleConfigIxArgs, type AssetPriceOracleConfigTxArgs, type AssetPriceRefreshTarget, type AssetRefreshResult, type AssetType, BALANCE_CHANGE_BASELINE_MAX_AGE_SECS, type Bankineco, type BasicAuthCredentials, type Bigintish, type BuildMarginfiWithdrawInteractionArgs, CONSENSUS_ORACLE_VARIANT, CancelAsyncWithdrawBuilder, type CancelAsyncWithdrawIxArgs, type CancelAsyncWithdrawTxArgs, type CancelIncentiveProposalArgs, CancelIncentiveProposalBuilder, CancelJuniorTrancheWithdrawBuilder, type CancelJuniorTrancheWithdrawIxArgs, type CancelJuniorTrancheWithdrawTxArgs, ClaimIncentiveBuilder, type ClaimIncentiveIxArgs, type ClaimIncentiveTxArgs, ClaimIncentiveV3Builder, type ClaimIncentiveV3IxArgs, type ClaimIncentiveV3TxArgs, 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, CreateIncentiveBuilder, type CreateIncentiveIxArgs, type CreateIncentiveTxArgs, CreateIncentiveV3Builder, type CreateIncentiveV3IxArgs, type CreateIncentiveV3TxArgs, type CreateTokenMintIxs, CreateTrancheStateBuilder, type CreateTrancheStateIxArgs, type CreateTrancheStateTxArgs, CreateVaultBuilder, type CreateVaultClientOptions, type CreateVaultIxArgs, type CreateVaultParams, type CreateVaultTxArgs, type CreateYieldPaymentParams, DEFAULT_CU_PRICE_MICRO_LAMPORTS, DEFAULT_EXTERNAL_WEIGHT_BAND_BPS, DEFAULT_JUNIOR_EARLY_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_STANDARD_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_WITHDRAWAL_LOCKUP_SECS, DEFAULT_MARGINFI_WEIGHT_BPS, DEFAULT_MAX_ACCEPTABLE_APY_BPS, DEFAULT_MINTS, DEFAULT_MIN_AMOUNT_UI, DEFAULT_ORACLE_STALENESS_THRESHOLD_SECS, DEFAULT_PRICE_ORACLE_ACCOUNT, DEFAULT_PRICE_STALENESS_SECS, DEFAULT_PRICE_STALENESS_THRESHOLD_SECS, DEFAULT_REBALANCE_BAND_BPS, DEFAULT_SLIPPAGE_BPS, DEFAULT_TARGET_LOCAL_BPS, DEFAULT_TARGET_LOCAL_USDC_TVL_BPS, DEFAULT_VAULT_ID, type DecodedHolding, type DecodedVault, type DecodedVaultTrancheState, type DeleteAccountParams, DepositCuratorFeesBuilder, type DepositCuratorFeesIxArgs, type DepositCuratorFeesTxArgs, DisableCircuitBreakerBuilder, type DisableCircuitBreakerIxArgs, type DisableCircuitBreakerTxArgs, DistributeIncentiveBuilder, type DistributeIncentiveIxArgs, type DistributeIncentiveTxArgs, DistributeIncentiveV3Builder, type DistributeIncentiveV3IxArgs, type DistributeIncentiveV3TxArgs, EXTERNAL_POSITION_SAMPLES, type EvmCallArg, type EvmContractCall, type EvmContractNavPriceConfig, 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, FulfillAsyncWithdrawBuilder, type FulfillAsyncWithdrawIxArgs, type FulfillAsyncWithdrawTxArgs, FulfillJuniorTrancheWithdrawBuilder, type FulfillJuniorTrancheWithdrawIxArgs, type FulfillJuniorTrancheWithdrawTxArgs, type FulfillSummary, type HoldingNavContribution, type HoldingUpdatePreview, type HttpJsonNavPriceConfig, IDL, IDLE_RESERVE_FLOOR_BPS, IDLE_RESERVE_TARGET_BPS, type IdleLiquidityOptions, type IdleLiquidityResult, IdleLiquidityService, type IdleLiquidityStatus, type IncentiveRecipient, type IncentiveTotals, type IncentiveUsdUpdateArgs, type IncentiveV3OracleState, type IncentiveV3Recipient, type IncentiveV3Totals, InitializeVaultRolesBuilder, type InitializeVaultRolesIxArgs, type InitializeVaultRolesTxArgs, type JuniorWithdrawalMode, JupiterPriceSource, type JupiterPriceSourceOptions, JupiterSwapBuilder, type JupiterSwapIxArgs, type JupiterSwapTxArgs, KaminoLendPositionProvider, KaminoPositionProvider, LIVE_ORACLE_VARIANTS, LIVE_PRICE_REFRESH_INTERVAL_SECS, LOCAL_PROTOCOL_ADMIN, LargeBalanceChangeError, type LargeBalanceChangeViolation, type LiveConsensusOracleDepsOptions, LivePriceSource, type LivePriceSourceOptions, MANAGER_WALLET_NAV_DROP_TRIGGER_BPS, MANAGER_WALLET_NAV_TOLERANCE_BPS, MAX_APY_ANCHOR_WINDOW_SECS, MAX_APY_PREVIOUS_ANCHOR_AGE_SECS, MAX_BALANCE_CHANGE_BPS, MAX_CONSENSUS_SIGNERS, MAX_INCENTIVE_RECIPIENTS, MAX_INCENTIVE_REPORT_TTL, MAX_LUT_ADDRESSES, MAX_MANAGER_WITHDRAW_DESTINATIONS, MAX_ORACLE_IMPLIED_APY_BPS, MAX_PRICE_STALENESS_THRESHOLD_SECS, MIN_EXTERNAL_POSITION_SAMPLES, ManagerRedepositAssetBuilder, type ManagerRedepositAssetIxArgs, type ManagerRedepositAssetTxArgs, type ManagerWalletBalanceSource, type ManagerWalletReconciliation, ManagerWithdrawAssetBuilder, type ManagerWithdrawAssetIxArgs, type ManagerWithdrawAssetTxArgs, MarginfiPositionProvider, type MaxApyAnchorSnapshot, type MintConfig, type MintIdentifier, type MintInfo, MintRegistry, type MintRegistryOptions, type MockYieldAccountConfig, MockYieldTracker, type MockYieldTrackerOptions, type MpcWalletBalanceSource, type MpcWalletBalances, type MpcWalletConfig, NEST_API_BASE_URL, NEST_RWA_SHARE_MINT, NEST_VAULT_SLUG, NEST_WITHDRAWAL_MATCH_TOLERANCE_BPS, type NavAccountBalanceResponse, type NavAccountValueResponse, type NavCrankBlocker, type NavCrankBlockerReason, type NavCrankReadiness, type NavCrankResult, type NavPriceConfig, type NavPricePreview, type NavPriceProvenance, type NavYieldAccount, NestApiError, type NestApiOptions, type NestDepositPlan, NestPriceSource, type NestPriceSourceOptions, type NestRedemptionQuote, type NestRedemptionStatus, 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, PST_TO_USDC_MAX_SLIPPAGE_BPS, PdaClient, type PendingConsensusSignerSet, type PreparedDirectTransaction, type PreparedSquadsTransaction, type PreparedVaultTransaction, type PreviewNavPriceParams, PriceAsyncWithdrawBuilder, type PriceAsyncWithdrawIxArgs, type PriceAsyncWithdrawTxArgs, type PriceOracleTypeArgs, type PriceSource, ProtocolInteractionBuilder, type ProtocolInteractionIxArgs, type ProtocolInteractionTxArgs, type QuoteFeeUnit, RECONCILIATION_EXTERNAL_VALUE_TOLERANCE_BPS, REPORTABLE_ORACLE_VARIANTS, type RealizedApySimulation, type RedemptionModeArgs, type RefreshLiveOraclePricesParams, RemoveAssetHoldingBuilder, type RemoveAssetHoldingIxArgs, type RemoveAssetHoldingTxArgs, ReportIncentiveV3Builder, type ReportIncentiveV3IxArgs, type ReportIncentiveV3TxArgs, RequestAsyncWithdrawBuilder, type RequestAsyncWithdrawIxArgs, type RequestAsyncWithdrawTxArgs, RequestJuniorTrancheWithdrawBuilder, type RequestJuniorTrancheWithdrawIxArgs, type RequestJuniorTrancheWithdrawTxArgs, type ResolveExternalWithdrawArgs, type ResolvedExternalWithdraw, type ResolvedSquadsWalletRoute, type RollingLimitConfig, type RollingRebalanceLimitConfig, RpcManagerWalletBalanceSource, RpcMpcWalletBalanceSource, type RunLiveConsensusOracleOptions, type RunOptions, type RunSummary, SHARE_DECIMALS, SYSTEM_PROGRAM, SetAssetPriceOracleBuilder, type SetAssetPriceOracleIxArgs, type SetAssetPriceOracleTxArgs, SetExternalLiquidityBuilder, type SetExternalLiquidityIxArgs, type SetExternalLiquidityTxArgs, type SetIncentiveLimitsArgs, SetIncentiveLimitsBuilder, type SetIncentiveLimitsV3Args, SetIncentiveLimitsV3Builder, SetManagerWithdrawDestinationBuilder, type SetManagerWithdrawDestinationIxArgs, type SetManagerWithdrawDestinationTxArgs, SetProtocolFeeBuilder, type SetProtocolFeeIxArgs, type SetProtocolFeeTxArgs, SetVaultConfigBuilder, type SetVaultConfigIxArgs, type SetVaultConfigTxArgs, SettleIncentiveV3Builder, type SettleIncentiveV3IxArgs, type SettleIncentiveV3TxArgs, type SettleVaultParams, type SettleVaultResult, type SettlementSimulation, type SettlementSimulationSnapshot, type SimulateDryRunSettlementParams, type SimulateSettlementArgs, type SimulatedShareClass, SquadsProposalExecutionSimulationError, type SquadsProposalUpload, type SquadsWalletRouteConfig, type StaleBalanceChangeBypass, StaticPositionProvider, SubmitIncentiveBuilder, type SubmitIncentiveIxArgs, type SubmitIncentiveTxArgs, TOKEN_PROGRAM, TOKEN_PROGRAM_ID, type TimelockSettlementKind, type TimelockSettlementOptions, type TimelockSettlementRecord, TimelockSettlementService, type TimelockSettlementSummary, type TrackedAccountValue, 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_LOOKUP_TABLES, 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 VaultIncentiveAccount, type VaultIncentiveAccountData, type VaultIncentiveV3Account, type VaultIncentiveV3AccountData, type VaultLookupTableMap, VaultLutManager, 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 VaultWithdrawalQueueAccount, type VaultWithdrawalQueueAccountData, WALLET_FEE_EXEMPT_WHITELIST, WITHDRAWABLE_RESERVE_FLOOR_BPS, type WithdrawProtocolFeesIxArgs, type WithdrawProtocolFeesTxArgs, type WithdrawalLeg, type WithdrawalPlan, type WithdrawalPricing, WithdrawalQueueService, type WithdrawalQueueSnapshot, type YieldAccount, type YieldAccountSnapshot, type YieldCalculationLog, type YieldCashflow, type YieldPaymentResponse, type YieldPaymentSnapshot, type YieldTracker, type YieldValuationModel, accountingUnitPriceToUsd, addCashflowUpdate, applyEffectiveApy, assertNoLargeBalanceChanges, assertNoUnconfirmedYieldPayments, assertOracleImpliedApy, assertReconciliationExternalValues, buildHoldingUpdate, buildKaminoDepositInteraction, buildKaminoWithdrawInteraction, buildMarginfiWithdrawInteraction, buildNestDepositRequest, buildNestWithdrawalRequest, buildUpdates, candidateGrossNav, coerceBool, collectSamples, collectVaultLookupTableAccounts, confirmYieldPayment, createAccount, createLiveConsensusOracleDeps, createRpcFromConnection, createTokenMint, createTokenMintIxs, createVaultClient, createYieldPayment, dateToStr, decodeNestDepositRequest, decodeNestWithdrawalRequest, decodePendingConsensusSigners, defaultKeypairPath, deleteAccount, discoverVaultsForSigner, externalWithdrawComputeBudget, externalWithdrawLookupTables, fetchExternalPositions, fetchNestRedemptionQuote, fetchNestRedemptionStatus, fetchNestTokenPrice, fetchReceiptMints, filterTargetHoldings, findLargeBalanceChanges, findSquadsWalletRoute, formatSettlementSimulation, fromUiAmount, gatherPricingInputs, getAccount, getAccounts, getAprYield, getBalance, getCashflows, getIncentiveRecipientShareAtas, getIncentiveRecipients, getIncentiveReportRecipients, getIncentiveTotals, getIncentiveV3OracleState, getIncentiveV3RecipientShareAtas, getIncentiveV3Recipients, getIncentiveV3Totals, getNavValue, getRpcUrl, getTotalOutstandingYield, getTotalTrackedValue, getTotalYield, getTrackedValue, getVaultLookupTables, getVaultProgramId, getYield, getYieldPayments, indexConfigByMint, isEvmNavPriceConfig, isNavAccountBalance, isNavAccountValue, isNavYieldAccount, isVaultEnv, keypairAddress, loadKaminoDeposit, loadKaminoWithdrawal, loadKeypair, logProspectiveApy, makeProvider, managerReconciliationStateKey, mintTokensTo, mints, mostFrequent, parseExternalLiquidityRefs, planExternalAllocation, planRebalance, planWithdrawalLegs, prepareSquadsProposalUpload, prepareVaultTransaction, previewNavPrice, previousPhysicalNav, priceInAccountingUnit, publishedConsensusBlockers, quoteWithdrawalPayout, readI64LE, readSplMintSupply, reconcileManagerWalletBalances, reconciliationExternalValues, refreshLiveOraclePrices, resolveExternalWithdraw, resolveKeypairPath, resolveSquadsWalletRoute, resolveTrackedAmounts, resolveWithdrawalPlan, roundToNextUtcMidnight, runLiveConsensusOracle, selectReportableHoldings, settleVault, signerInOracleData, simulateConsensusOracleSettlement, simulateDryRunSettlement, simulateOraclePublication, simulateSquadsProposalExecution, sumPositionsByMint, systemClock, toBigInt, toUiAmount, toWeb3AccountMeta, trackedValueFromResponse, uniqueLutAddresses, updateAccount, updateDynamicApr, validateSquadsWalletRoutes, variantName, vaultAuthorityForWallet, walletReconciliationGuardUpdates, withDiscoveredYieldAccounts, withVaultLookupTables, withdrawalComputeBudget };
|
|
16530
|
+
export { ASSET_DECIMALS, ASSET_REBALANCE_COOLDOWN_SECS, ASYNC_REDEMPTION_CANCEL_DELAY_SECS, type AccountBalanceResponse, AccountClient, type AccountYieldResponse, ActivateCircuitBreakerBuilder, type ActivateCircuitBreakerIxArgs, type ActivateCircuitBreakerTxArgs, type AddAprCashflowUpdateParams, type AddCashflowUpdateParams, type AddIncentiveRecipientArgs, AddIncentiveRecipientBuilder, type AddIncentiveRecipientIxArgs, AddIncentiveRecipientV3Builder, type AddIncentiveRecipientV3IxArgs, type AddIncentiveRecipientV3TxArgs, type AddNavCashflowUpdateParams, type AprAccountBalanceResponse, type AprAccountYieldResponse, type AssetPriceOracleConfigIxArgs, type AssetPriceOracleConfigTxArgs, type AssetPriceRefreshTarget, type AssetRefreshResult, type AssetType, BALANCE_CHANGE_BASELINE_MAX_AGE_SECS, type Bankineco, type BasicAuthCredentials, type Bigintish, type BuildMarginfiWithdrawInteractionArgs, CONSENSUS_ORACLE_VARIANT, CancelAsyncWithdrawBuilder, type CancelAsyncWithdrawIxArgs, type CancelAsyncWithdrawTxArgs, type CancelIncentiveProposalArgs, CancelIncentiveProposalBuilder, CancelJuniorTrancheWithdrawBuilder, type CancelJuniorTrancheWithdrawIxArgs, type CancelJuniorTrancheWithdrawTxArgs, ClaimIncentiveBuilder, type ClaimIncentiveIxArgs, type ClaimIncentiveTxArgs, ClaimIncentiveV3Builder, type ClaimIncentiveV3IxArgs, type ClaimIncentiveV3TxArgs, type Clock, type CollectSamplesOptions, type ConsensusAssetUpdate, type ConsensusAssetUpdateArgs, type ConsensusHoldingEntry, type ConsensusHoldingSimulation, type ConsensusOracleDeps, type ConsensusOracleHoldingConfig, type ConsensusOraclePublicationResult, ConsensusOracleService, type ConsensusOracleTarget, CrankNavBuilder, type CrankNavIxArgs, type CrankNavTxArgs, CrankPerformanceFeesBuilder, type CrankPerformanceFeesIxArgs, type CrankPerformanceFeesTxArgs, type CreateAccountParams, CreateAssetHoldingBuilder, type CreateAssetHoldingIxArgs, type CreateAssetHoldingTxArgs, CreateIncentiveBuilder, type CreateIncentiveIxArgs, type CreateIncentiveTxArgs, CreateIncentiveV3Builder, type CreateIncentiveV3IxArgs, type CreateIncentiveV3TxArgs, type CreateTokenMintIxs, CreateTrancheStateBuilder, type CreateTrancheStateIxArgs, type CreateTrancheStateTxArgs, CreateVaultBuilder, type CreateVaultClientOptions, type CreateVaultIxArgs, type CreateVaultParams, type CreateVaultTxArgs, type CreateYieldPaymentParams, DEFAULT_CU_PRICE_MICRO_LAMPORTS, DEFAULT_EXTERNAL_WEIGHT_BAND_BPS, DEFAULT_JUNIOR_EARLY_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_STANDARD_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_WITHDRAWAL_LOCKUP_SECS, DEFAULT_MARGINFI_WEIGHT_BPS, DEFAULT_MAX_ACCEPTABLE_APY_BPS, DEFAULT_MINTS, DEFAULT_MIN_AMOUNT_UI, DEFAULT_ORACLE_STALENESS_THRESHOLD_SECS, DEFAULT_PRICE_ORACLE_ACCOUNT, DEFAULT_PRICE_STALENESS_SECS, DEFAULT_PRICE_STALENESS_THRESHOLD_SECS, DEFAULT_REBALANCE_BAND_BPS, DEFAULT_SLIPPAGE_BPS, DEFAULT_TARGET_LOCAL_BPS, DEFAULT_TARGET_LOCAL_USDC_TVL_BPS, DEFAULT_VAULT_ID, type DecodedHolding, type DecodedVault, type DecodedVaultTrancheState, type DeleteAccountParams, DepositCuratorFeesBuilder, type DepositCuratorFeesIxArgs, type DepositCuratorFeesTxArgs, DisableCircuitBreakerBuilder, type DisableCircuitBreakerIxArgs, type DisableCircuitBreakerTxArgs, DistributeIncentiveBuilder, type DistributeIncentiveIxArgs, type DistributeIncentiveTxArgs, DistributeIncentiveV3Builder, type DistributeIncentiveV3IxArgs, type DistributeIncentiveV3TxArgs, EXTERNAL_POSITION_SAMPLES, type EvmCallArg, type EvmContractCall, type EvmContractNavPriceConfig, 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, FulfillAsyncWithdrawBuilder, type FulfillAsyncWithdrawIxArgs, type FulfillAsyncWithdrawTxArgs, FulfillJuniorTrancheWithdrawBuilder, type FulfillJuniorTrancheWithdrawIxArgs, type FulfillJuniorTrancheWithdrawTxArgs, type FulfillSummary, type HoldingNavContribution, type HoldingUpdatePreview, type HttpJsonNavPriceConfig, IDL, IDLE_RESERVE_FLOOR_BPS, IDLE_RESERVE_TARGET_BPS, type IdleLiquidityOptions, type IdleLiquidityResult, IdleLiquidityService, type IdleLiquidityStatus, type IncentiveRecipient, type IncentiveTotals, type IncentiveUsdUpdateArgs, type IncentiveV3OracleState, type IncentiveV3Recipient, type IncentiveV3Totals, InitializeVaultRolesBuilder, type InitializeVaultRolesIxArgs, type InitializeVaultRolesTxArgs, type JuniorWithdrawalMode, JupiterPriceSource, type JupiterPriceSourceOptions, JupiterSwapBuilder, type JupiterSwapIxArgs, type JupiterSwapTxArgs, KaminoLendPositionProvider, KaminoPositionProvider, LIVE_ORACLE_VARIANTS, LIVE_PRICE_REFRESH_INTERVAL_SECS, LOCAL_PROTOCOL_ADMIN, LargeBalanceChangeError, type LargeBalanceChangeViolation, type LiveConsensusOracleDepsOptions, LivePriceSource, type LivePriceSourceOptions, MANAGER_WALLET_NAV_DROP_TRIGGER_BPS, MANAGER_WALLET_NAV_TOLERANCE_BPS, MAX_APY_ANCHOR_WINDOW_SECS, MAX_APY_PREVIOUS_ANCHOR_AGE_SECS, MAX_BALANCE_CHANGE_BPS, MAX_CONSENSUS_SIGNERS, MAX_INCENTIVE_RECIPIENTS, MAX_INCENTIVE_REPORT_TTL, MAX_LUT_ADDRESSES, MAX_MANAGER_WITHDRAW_DESTINATIONS, MAX_ORACLE_IMPLIED_APY_BPS, MAX_PRICE_STALENESS_THRESHOLD_SECS, MIN_EXTERNAL_POSITION_SAMPLES, ManagerRedepositAssetBuilder, type ManagerRedepositAssetIxArgs, type ManagerRedepositAssetTxArgs, type ManagerWalletBalanceSource, type ManagerWalletReconciliation, ManagerWithdrawAssetBuilder, type ManagerWithdrawAssetIxArgs, type ManagerWithdrawAssetTxArgs, MarginfiPositionProvider, type MaxApyAnchorSnapshot, type MintConfig, type MintIdentifier, type MintInfo, MintRegistry, type MintRegistryOptions, type MockYieldAccountConfig, MockYieldTracker, type MockYieldTrackerOptions, type MpcWalletBalanceSource, type MpcWalletBalances, type MpcWalletConfig, NEST_API_BASE_URL, NEST_RWA_SHARE_MINT, NEST_VAULT_SLUG, NEST_WITHDRAWAL_MATCH_TOLERANCE_BPS, type NavAccountBalanceResponse, type NavAccountValueResponse, type NavCrankBlocker, type NavCrankBlockerReason, type NavCrankReadiness, type NavCrankResult, type NavPriceConfig, type NavPricePreview, type NavPriceProvenance, type NavYieldAccount, NestApiError, type NestApiOptions, type NestDepositPlan, NestPriceSource, type NestPriceSourceOptions, type NestRedemptionQuote, type NestRedemptionStatus, 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, PST_TO_USDC_MAX_SLIPPAGE_BPS, PdaClient, type PendingConsensusSignerSet, type PreparedDirectTransaction, type PreparedSquadsTransaction, type PreparedVaultTransaction, type PreviewNavPriceParams, PriceAsyncWithdrawBuilder, type PriceAsyncWithdrawIxArgs, type PriceAsyncWithdrawTxArgs, type PriceOracleTypeArgs, type PriceSource, ProtocolInteractionBuilder, type ProtocolInteractionIxArgs, type ProtocolInteractionTxArgs, type QuoteFeeUnit, RECONCILIATION_EXTERNAL_VALUE_TOLERANCE_BPS, REPORTABLE_ORACLE_VARIANTS, type RealizedApySimulation, type RedemptionModeArgs, type RefreshLiveOraclePricesParams, RemoveAssetHoldingBuilder, type RemoveAssetHoldingIxArgs, type RemoveAssetHoldingTxArgs, ReportIncentiveV3Builder, type ReportIncentiveV3IxArgs, type ReportIncentiveV3TxArgs, RequestAsyncWithdrawBuilder, type RequestAsyncWithdrawIxArgs, type RequestAsyncWithdrawTxArgs, RequestJuniorTrancheWithdrawBuilder, type RequestJuniorTrancheWithdrawIxArgs, type RequestJuniorTrancheWithdrawTxArgs, type ResolveExternalWithdrawArgs, type ResolvedExternalWithdraw, type ResolvedSquadsWalletRoute, type RollingLimitConfig, type RollingRebalanceLimitConfig, RpcManagerWalletBalanceSource, RpcMpcWalletBalanceSource, type RunLiveConsensusOracleOptions, type RunOptions, type RunSummary, SHARE_DECIMALS, SYSTEM_PROGRAM, SetAssetPriceOracleBuilder, type SetAssetPriceOracleIxArgs, type SetAssetPriceOracleTxArgs, SetExternalLiquidityBuilder, type SetExternalLiquidityIxArgs, type SetExternalLiquidityTxArgs, type SetIncentiveLimitsArgs, SetIncentiveLimitsBuilder, type SetIncentiveLimitsV3Args, SetIncentiveLimitsV3Builder, SetManagerWithdrawDestinationBuilder, type SetManagerWithdrawDestinationIxArgs, type SetManagerWithdrawDestinationTxArgs, SetProtocolFeeBuilder, type SetProtocolFeeIxArgs, type SetProtocolFeeTxArgs, SetVaultConfigBuilder, type SetVaultConfigIxArgs, type SetVaultConfigTxArgs, SettleIncentiveV3Builder, type SettleIncentiveV3IxArgs, type SettleIncentiveV3TxArgs, type SettleVaultParams, type SettleVaultResult, type SettlementSimulation, type SettlementSimulationSnapshot, type SimulateDryRunSettlementParams, type SimulateSettlementArgs, type SimulatedShareClass, SquadsProposalExecutionSimulationError, type SquadsProposalUpload, type SquadsWalletRouteConfig, type StaleBalanceChangeBypass, StaticPositionProvider, SubmitIncentiveBuilder, type SubmitIncentiveIxArgs, type SubmitIncentiveTxArgs, TOKEN_PROGRAM, TOKEN_PROGRAM_ID, type TimelockSettlementKind, type TimelockSettlementOptions, type TimelockSettlementRecord, TimelockSettlementService, type TimelockSettlementSummary, type TrackedAccountValue, 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_LOOKUP_TABLES, 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 VaultIncentiveAccount, type VaultIncentiveAccountData, type VaultIncentiveV3Account, type VaultIncentiveV3AccountData, type VaultLookupTableMap, VaultLutManager, 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 VaultWithdrawalQueueAccount, type VaultWithdrawalQueueAccountData, WALLET_FEE_EXEMPT_WHITELIST, WITHDRAWABLE_RESERVE_FLOOR_BPS, type WithdrawProtocolFeesIxArgs, type WithdrawProtocolFeesTxArgs, type WithdrawalLeg, type WithdrawalPlan, type WithdrawalPricing, WithdrawalQueueService, type WithdrawalQueueSnapshot, type YieldAccount, type YieldAccountSnapshot, type YieldCalculationLog, type YieldCashflow, type YieldPaymentResponse, type YieldPaymentSnapshot, type YieldTracker, type YieldValuationModel, accountingUnitPriceToUsd, addCashflowUpdate, applyEffectiveApy, assertNoLargeBalanceChanges, assertNoUnconfirmedYieldPayments, assertOracleImpliedApy, assertReconciliationExternalValues, buildHoldingUpdate, buildKaminoDepositInteraction, buildKaminoWithdrawInteraction, buildMarginfiWithdrawInteraction, buildNestDepositRequest, buildNestWithdrawalRequest, buildUpdates, candidateGrossNav, coerceBool, collectSamples, collectVaultLookupTableAccounts, confirmYieldPayment, createAccount, createLiveConsensusOracleDeps, createRpcFromConnection, createTokenMint, createTokenMintIxs, createVaultClient, createYieldPayment, dateToStr, decodeNestDepositRequest, decodeNestWithdrawalRequest, decodePendingConsensusSigners, defaultKeypairPath, deleteAccount, discoverVaultsForSigner, externalWithdrawComputeBudget, externalWithdrawLookupTables, fetchExternalPositions, fetchNestRedemptionQuote, fetchNestRedemptionStatus, fetchNestTokenPrice, fetchReceiptMints, filterTargetHoldings, findLargeBalanceChanges, findSquadsWalletRoute, formatSettlementSimulation, fromUiAmount, gatherPricingInputs, getAccount, getAccounts, getAprYield, getBalance, getCashflows, getIncentiveRecipientShareAtas, getIncentiveRecipients, getIncentiveReportRecipients, getIncentiveTotals, getIncentiveV3OracleState, getIncentiveV3RecipientShareAtas, getIncentiveV3Recipients, getIncentiveV3Totals, getNavValue, getRpcUrl, getTotalOutstandingYield, getTotalTrackedValue, getTotalYield, getTrackedValue, getVaultLookupTables, getVaultProgramId, getYield, getYieldPayments, indexConfigByMint, isEvmNavPriceConfig, isNavAccountBalance, isNavAccountValue, isNavYieldAccount, isVaultEnv, keypairAddress, loadKaminoDeposit, loadKaminoWithdrawal, loadKeypair, logProspectiveApy, makeProvider, managerReconciliationStateKey, mintTokensTo, mints, mostFrequent, parseExternalLiquidityRefs, planExternalAllocation, planRebalance, planWithdrawalLegs, prepareSquadsProposalUpload, prepareVaultTransaction, previewNavPrice, previousPhysicalNav, priceInAccountingUnit, publishedConsensusBlockers, quoteWithdrawalPayout, readI64LE, readSplMintSupply, reconcileManagerWalletBalances, reconciliationExternalValues, refreshLiveOraclePrices, resolveExternalWithdraw, resolveKeypairPath, resolveSquadsWalletRoute, resolveTrackedAmounts, resolveWithdrawalPlan, roundToNextUtcMidnight, runLiveConsensusOracle, selectReportableHoldings, settleVault, signerInOracleData, simulateConsensusOracleSettlement, simulateDryRunSettlement, simulateOraclePublication, simulateSquadsProposalExecution, sumPositionsByMint, systemClock, toBigInt, toUiAmount, toWeb3AccountMeta, trackedValueFromResponse, uniqueLutAddresses, updateAccount, updateDynamicApr, validateSquadsWalletRoutes, variantName, vaultAuthorityForWallet, walletReconciliationGuardUpdates, withDiscoveredYieldAccounts, withVaultLookupTables, withdrawalComputeBudget };
|
package/dist/index.js
CHANGED
|
@@ -14423,6 +14423,7 @@ var VaultQuoteClient = class {
|
|
|
14423
14423
|
return info ? (0, import_kit5.address)(info.owner.toBase58()) : null;
|
|
14424
14424
|
}
|
|
14425
14425
|
isFeeExemptSigner(signer, owner, seeds) {
|
|
14426
|
+
if (!seeds && WALLET_FEE_EXEMPT_WHITELIST.includes(signer)) return true;
|
|
14426
14427
|
if (!owner || !seeds) return false;
|
|
14427
14428
|
const ownerString = owner.toString();
|
|
14428
14429
|
const approvedOwner = ownerString === this.programId.toString() || PROGRAM_FEE_EXEMPT_OWNER_WHITELIST.some(
|
|
@@ -14476,10 +14477,9 @@ var VaultQuoteClient = class {
|
|
|
14476
14477
|
totalSupply2,
|
|
14477
14478
|
backingValue
|
|
14478
14479
|
);
|
|
14479
|
-
const expectedAmountOut =
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
backingValue
|
|
14480
|
+
const expectedAmountOut = checkedSub(
|
|
14481
|
+
grossAmountOut2,
|
|
14482
|
+
feeForBps(grossAmountOut2, feeBps2)
|
|
14483
14483
|
);
|
|
14484
14484
|
return {
|
|
14485
14485
|
shareClass: args.shareClass,
|
|
@@ -14534,7 +14534,16 @@ var VaultQuoteClient = class {
|
|
|
14534
14534
|
classValue
|
|
14535
14535
|
);
|
|
14536
14536
|
const feeBps2 = feeExempt ? 0 : numberFrom(vault.config.fees.mintFeeBps);
|
|
14537
|
-
const
|
|
14537
|
+
const netAccountingAmount = checkedSub(
|
|
14538
|
+
accountingAmount,
|
|
14539
|
+
feeForBps(accountingAmount, feeBps2)
|
|
14540
|
+
);
|
|
14541
|
+
const expectedAmountOut = sharesForDeposit(
|
|
14542
|
+
netAccountingAmount,
|
|
14543
|
+
totalSupply,
|
|
14544
|
+
classValue
|
|
14545
|
+
);
|
|
14546
|
+
const feeAmount2 = checkedSub(grossAmountOut2, expectedAmountOut);
|
|
14538
14547
|
return {
|
|
14539
14548
|
shareClass: args.shareClass,
|
|
14540
14549
|
direction: args.direction,
|
|
@@ -14543,7 +14552,7 @@ var VaultQuoteClient = class {
|
|
|
14543
14552
|
feeExempt,
|
|
14544
14553
|
feeBps: feeBps2,
|
|
14545
14554
|
amountIn,
|
|
14546
|
-
expectedAmountOut
|
|
14555
|
+
expectedAmountOut,
|
|
14547
14556
|
grossAmountOut: grossAmountOut2,
|
|
14548
14557
|
feeAmount: feeAmount2,
|
|
14549
14558
|
feeAmountUnit: "share",
|
|
@@ -14555,7 +14564,7 @@ var VaultQuoteClient = class {
|
|
|
14555
14564
|
toBigint(trancheClass.value),
|
|
14556
14565
|
toBigint(trancheClass.totalSupply)
|
|
14557
14566
|
);
|
|
14558
|
-
const feeBps = trancheWithdrawFeeBps(args, trancheState, feeExempt);
|
|
14567
|
+
const feeBps = trancheWithdrawFeeBps(args, vault, trancheState, feeExempt);
|
|
14559
14568
|
const feeAmount = feeForBps(grossAmountOut, feeBps);
|
|
14560
14569
|
return {
|
|
14561
14570
|
shareClass: args.shareClass,
|
|
@@ -14573,8 +14582,10 @@ var VaultQuoteClient = class {
|
|
|
14573
14582
|
};
|
|
14574
14583
|
}
|
|
14575
14584
|
};
|
|
14576
|
-
function trancheWithdrawFeeBps(args, trancheState, feeExempt) {
|
|
14577
|
-
if (feeExempt
|
|
14585
|
+
function trancheWithdrawFeeBps(args, vault, trancheState, feeExempt) {
|
|
14586
|
+
if (feeExempt) return 0;
|
|
14587
|
+
if (args.shareClass === "senior")
|
|
14588
|
+
return numberFrom(vault.config.fees.burnFeeBps);
|
|
14578
14589
|
return args.withdrawalMode === "queued" ? numberFrom(trancheState.config.standardUnstakeFeeBps) : numberFrom(trancheState.config.earlyUnstakeFeeBps);
|
|
14579
14590
|
}
|
|
14580
14591
|
function accountingAmountForAsset(vault, mint, tokenAmount) {
|
|
@@ -17381,8 +17392,9 @@ async function resolveWithdrawalPlan(args) {
|
|
|
17381
17392
|
),
|
|
17382
17393
|
args.addressSeeds ? args.connection.getAccountInfo(new import_web317.PublicKey(args.user), "confirmed") : null
|
|
17383
17394
|
]);
|
|
17384
|
-
let feeExempt =
|
|
17395
|
+
let feeExempt = WALLET_FEE_EXEMPT_WHITELIST.includes(args.user);
|
|
17385
17396
|
if (args.addressSeeds) {
|
|
17397
|
+
feeExempt = false;
|
|
17386
17398
|
if (!signer)
|
|
17387
17399
|
throw new Error("Missing fee-exempt withdrawal signer account");
|
|
17388
17400
|
const owner = signer.owner.toBase58();
|
|
@@ -17415,7 +17427,8 @@ async function resolveWithdrawalPlan(args) {
|
|
|
17415
17427
|
const state = args.shareClass === "junior" ? tranche.junior : tranche.senior;
|
|
17416
17428
|
pricing.supply = BigInt(state.totalSupply.toString());
|
|
17417
17429
|
pricing.value = BigInt(state.value.toString());
|
|
17418
|
-
|
|
17430
|
+
if (args.shareClass === "junior")
|
|
17431
|
+
pricing.feeBps = feeExempt ? 0 : tranche.config.earlyUnstakeFeeBps;
|
|
17419
17432
|
}
|
|
17420
17433
|
}
|
|
17421
17434
|
const index = args.externalLiquiditySource;
|
|
@@ -20596,6 +20609,64 @@ var OracleService = class {
|
|
|
20596
20609
|
);
|
|
20597
20610
|
return sig;
|
|
20598
20611
|
}
|
|
20612
|
+
/**
|
|
20613
|
+
* Simulate the update followed by NAV settlement in one transaction. If the
|
|
20614
|
+
* combined plan cannot be built or simulated successfully, publish only the
|
|
20615
|
+
* report. The caller must first verify that the report will reach consensus;
|
|
20616
|
+
* a successful crank alone can still settle unchanged holdings.
|
|
20617
|
+
*/
|
|
20618
|
+
async updateAssetConsensusPriceAndCrankNavIfReady(signer, args, log, beforeSubmit) {
|
|
20619
|
+
const updatePlan = await this.client.tx.updateConsensusOracle.getTx({
|
|
20620
|
+
signer: (0, import_common54.fromWeb3Pk)(signer.publicKey),
|
|
20621
|
+
...args
|
|
20622
|
+
});
|
|
20623
|
+
let plan = updatePlan;
|
|
20624
|
+
let crankSkippedReason;
|
|
20625
|
+
try {
|
|
20626
|
+
const crankPlan = await this.client.tx.crankNav.getTx({
|
|
20627
|
+
cranker: (0, import_common54.fromWeb3Pk)(signer.publicKey),
|
|
20628
|
+
vault: args.vault
|
|
20629
|
+
});
|
|
20630
|
+
const combinedPlan = {
|
|
20631
|
+
instructions: [...updatePlan.instructions, ...crankPlan.instructions],
|
|
20632
|
+
lookupTables: [
|
|
20633
|
+
.../* @__PURE__ */ new Set([
|
|
20634
|
+
...updatePlan.lookupTables ?? [],
|
|
20635
|
+
...crankPlan.lookupTables ?? []
|
|
20636
|
+
])
|
|
20637
|
+
],
|
|
20638
|
+
postSuccessCacheInvalidations: [
|
|
20639
|
+
...updatePlan.postSuccessCacheInvalidations ?? [],
|
|
20640
|
+
...crankPlan.postSuccessCacheInvalidations ?? []
|
|
20641
|
+
]
|
|
20642
|
+
};
|
|
20643
|
+
const simulation = await this.client.simulateTransaction(
|
|
20644
|
+
signer,
|
|
20645
|
+
combinedPlan
|
|
20646
|
+
);
|
|
20647
|
+
if (simulation.err) {
|
|
20648
|
+
crankSkippedReason = `combined update and NAV crank simulation failed: ${JSON.stringify(
|
|
20649
|
+
simulation.err
|
|
20650
|
+
)}`;
|
|
20651
|
+
for (const line of simulation.logs ?? []) log?.(` | ${line}`);
|
|
20652
|
+
} else {
|
|
20653
|
+
plan = combinedPlan;
|
|
20654
|
+
}
|
|
20655
|
+
} catch (error) {
|
|
20656
|
+
crankSkippedReason = `could not prepare combined update and NAV crank: ${error instanceof Error ? error.message : String(error)}`;
|
|
20657
|
+
}
|
|
20658
|
+
await beforeSubmit?.();
|
|
20659
|
+
const updateSignature = await this.client.sendTransaction(signer, plan);
|
|
20660
|
+
if (crankSkippedReason) {
|
|
20661
|
+
log?.(`record consensus assets ${args.vault}: ${updateSignature}`);
|
|
20662
|
+
log?.(`skip crank nav ${args.vault}: ${crankSkippedReason}`);
|
|
20663
|
+
return { updateSignature, crankSkippedReason };
|
|
20664
|
+
}
|
|
20665
|
+
log?.(
|
|
20666
|
+
`record consensus assets and crank nav ${args.vault}: ${updateSignature}`
|
|
20667
|
+
);
|
|
20668
|
+
return { updateSignature, crankSignature: updateSignature };
|
|
20669
|
+
}
|
|
20599
20670
|
// ── Permissionless NAV crank ──────────────────────────────────────────────
|
|
20600
20671
|
/** Settle the vault NAV from its current holdings (permissionless). */
|
|
20601
20672
|
async crankNav(cranker, args, log) {
|
|
@@ -23020,51 +23091,47 @@ async function settleVault2({
|
|
|
23020
23091
|
assertOracleImpliedApy(vault, simulations.proposed, "proposed report");
|
|
23021
23092
|
if (simulations.consensus.realizedApy)
|
|
23022
23093
|
assertOracleImpliedApy(vault, simulations.consensus, "current consensus");
|
|
23023
|
-
|
|
23024
|
-
|
|
23094
|
+
const consensusBlockers = updates.flatMap((update) => {
|
|
23095
|
+
const holding = vaultState.holdings[update.holdingIndex];
|
|
23096
|
+
const result = simulations.consensus.consensus.find(
|
|
23097
|
+
(item) => item.holdingIndex === update.holdingIndex
|
|
23098
|
+
);
|
|
23099
|
+
if (holding && result?.mint === update.mint && result.settledExternalAmount !== void 0 && (result.wouldUpdateHolding || toBigInt2(holding.externalAmount) === result.settledExternalAmount && (result.settledPrice === void 0 || toBigInt2(holding.price) === result.settledPrice))) {
|
|
23100
|
+
return [];
|
|
23101
|
+
}
|
|
23102
|
+
return [
|
|
23103
|
+
`holding #${update.holdingIndex}: ${result?.reason ?? "no consensus"}`
|
|
23104
|
+
];
|
|
23105
|
+
});
|
|
23106
|
+
const crankSkippedReason = consensusBlockers.length ? `waiting for consensus after submission: ${consensusBlockers.join("; ")}` : !simulations.consensus.canSettle ? `NAV settlement blocked: ${simulations.consensus.blockers.join("; ")}` : void 0;
|
|
23107
|
+
const publicationArgs = {
|
|
23108
|
+
vault,
|
|
23109
|
+
updates: updates.map((u) => ({
|
|
23110
|
+
holdingIndex: u.holdingIndex,
|
|
23111
|
+
price: u.price,
|
|
23112
|
+
externalAmount: u.externalAmount
|
|
23113
|
+
}))
|
|
23114
|
+
};
|
|
23115
|
+
const revalidateBeforeSubmit = async () => {
|
|
23116
|
+
await assertNoUnconfirmedYieldPayments(yieldTracker, target);
|
|
23117
|
+
await beforeSubmit?.();
|
|
23118
|
+
};
|
|
23119
|
+
if (!crankSkippedReason) {
|
|
23120
|
+
return oracle.updateAssetConsensusPriceAndCrankNavIfReady(
|
|
23121
|
+
signer,
|
|
23122
|
+
publicationArgs,
|
|
23123
|
+
log,
|
|
23124
|
+
revalidateBeforeSubmit
|
|
23125
|
+
);
|
|
23126
|
+
}
|
|
23127
|
+
await revalidateBeforeSubmit();
|
|
23025
23128
|
const updateSignature = await oracle.updateAssetConsensusPrice(
|
|
23026
23129
|
signer,
|
|
23027
|
-
|
|
23028
|
-
vault,
|
|
23029
|
-
updates: updates.map((u) => ({
|
|
23030
|
-
holdingIndex: u.holdingIndex,
|
|
23031
|
-
price: u.price,
|
|
23032
|
-
externalAmount: u.externalAmount
|
|
23033
|
-
}))
|
|
23034
|
-
},
|
|
23130
|
+
publicationArgs,
|
|
23035
23131
|
log
|
|
23036
23132
|
);
|
|
23037
|
-
|
|
23038
|
-
|
|
23039
|
-
const [publishedVault, publishedOracle, publishedAt] = await Promise.all([
|
|
23040
|
-
client.account.fetchVault(vault, { fresh: true }),
|
|
23041
|
-
client.account.fetchVaultOracleForVault(vault, { fresh: true }),
|
|
23042
|
-
client.account.fetchClockUnixTimestamp()
|
|
23043
|
-
]);
|
|
23044
|
-
const blockers = publishedConsensusBlockers({
|
|
23045
|
-
vault: publishedVault,
|
|
23046
|
-
oracleData: publishedOracle.data,
|
|
23047
|
-
updates,
|
|
23048
|
-
signer: (0, import_common63.fromWeb3Pk)(signer.publicKey),
|
|
23049
|
-
nowTs: publishedAt
|
|
23050
|
-
});
|
|
23051
|
-
if (blockers.length)
|
|
23052
|
-
crankSkippedReason = `waiting for published consensus: ${blockers.join(
|
|
23053
|
-
"; "
|
|
23054
|
-
)}`;
|
|
23055
|
-
} catch (error) {
|
|
23056
|
-
crankSkippedReason = `could not verify published consensus: ${error instanceof Error ? error.message : String(error)}`;
|
|
23057
|
-
}
|
|
23058
|
-
if (crankSkippedReason) {
|
|
23059
|
-
log(`skip crank nav ${vault}: ${crankSkippedReason}`);
|
|
23060
|
-
return { updateSignature, crankSkippedReason };
|
|
23061
|
-
}
|
|
23062
|
-
const crankResult = await oracle.crankNavIfReady(signer, { vault }, log);
|
|
23063
|
-
return {
|
|
23064
|
-
updateSignature,
|
|
23065
|
-
crankSignature: crankResult.signature,
|
|
23066
|
-
crankSkippedReason: crankResult.reason
|
|
23067
|
-
};
|
|
23133
|
+
log(`skip crank nav ${vault}: ${crankSkippedReason}`);
|
|
23134
|
+
return { updateSignature, crankSkippedReason };
|
|
23068
23135
|
}
|
|
23069
23136
|
async function logProspectiveApy({
|
|
23070
23137
|
client,
|