@perena/vault-sdk 1.0.69 → 1.0.70
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 +53 -24
- package/dist/index.d.ts +36 -11
- package/dist/index.js +88 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -672,18 +672,30 @@ await client.sendTransaction(payer, plan);
|
|
|
672
672
|
|
|
673
673
|
### Example: async regular-share redemption
|
|
674
674
|
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
675
|
+
New vaults default to hybrid redemption for regular shares. The curator can
|
|
676
|
+
choose a `redemptionMode` through `setVaultConfig`:
|
|
677
|
+
|
|
678
|
+
| Mode | Immediate withdrawals and regular-to-tranche share swaps | New async requests |
|
|
679
|
+
| --- | --- | --- |
|
|
680
|
+
| `{ synchronous: {} }` | Allowed | Rejected |
|
|
681
|
+
| `{ asyncOnly: {} }` | Rejected | Allowed |
|
|
682
|
+
| `{ hybrid: {} }` (default) | Allowed | Allowed |
|
|
683
|
+
|
|
684
|
+
Hybrid mode lets users choose immediate withdrawal or queue a request on the
|
|
685
|
+
same vault without switching modes. Immediate withdrawals still require enough
|
|
686
|
+
available liquidity; they do not automatically create an async request on failure.
|
|
687
|
+
Existing vaults retain their configured mode until the curator changes it.
|
|
688
|
+
Configure `fulfiller` using the existing role timelock before processing requests.
|
|
689
|
+
Async-only mode also blocks fee-exempt and external regular withdrawals.
|
|
690
|
+
Junior and senior tranche redemption policies are unchanged. Upgrade the program
|
|
691
|
+
and SDK before setting hybrid mode; older SDKs cannot decode its new enum variant.
|
|
681
692
|
|
|
682
693
|
```typescript
|
|
683
694
|
await client.sendTransaction(curator, await client.tx.setVaultConfig.getTx({
|
|
684
695
|
curator: fromWeb3Pk(curator.publicKey),
|
|
685
696
|
vault,
|
|
686
|
-
redemptionMode: {
|
|
697
|
+
redemptionMode: { hybrid: {} },
|
|
698
|
+
redemptionPeriodSecs: 3_600n, // one hour for new async requests
|
|
687
699
|
}));
|
|
688
700
|
|
|
689
701
|
await client.sendTransaction(user, await client.tx.requestAsyncWithdraw.getTx({
|
|
@@ -714,7 +726,16 @@ await client.sendTransaction(fulfiller, await client.tx.fulfillAsyncWithdraw.get
|
|
|
714
726
|
```
|
|
715
727
|
|
|
716
728
|
Requests escrow shares without changing supply or NAV. Only the configured
|
|
717
|
-
fulfiller can settle regular requests
|
|
729
|
+
fulfiller can settle regular requests after their stored `expiryTs`.
|
|
730
|
+
|
|
731
|
+
The curator sets `redemptionPeriodSecs` through `setVaultConfig` (or the CLI's
|
|
732
|
+
`--redemption-period-secs` flag). It is a non-negative integer number of seconds;
|
|
733
|
+
`0` is the default and permits immediate settlement. Each new async request stores
|
|
734
|
+
`expiryTs = requestTs + redemptionPeriodSecs`. Later config changes affect only
|
|
735
|
+
new requests. Synchronous withdrawals in Hybrid mode remain immediate, and the
|
|
736
|
+
separate 30-day cancellation rule is unchanged. The field uses reserved account
|
|
737
|
+
space, so existing vaults retain their size and default to zero delay. Upgrade
|
|
738
|
+
the program before using this setting; older programs ignore the appended option.
|
|
718
739
|
Unpriced requests use current NAV, asset prices, and burn fees. The HW manager
|
|
719
740
|
can price a request once, recording `request.outputAmount` in output-token
|
|
720
741
|
atomic units, `pricedTs`, and `feeShareAmount`. A positive `pricedTs` marks a
|
|
@@ -748,13 +769,22 @@ remain fulfillable after switching back to synchronous mode. Service snapshots
|
|
|
748
769
|
include nullable `outputAmount` and `pricedTs`; fulfillment always refreshes
|
|
749
770
|
the queue before building its instruction.
|
|
750
771
|
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
772
|
+
The keeper processes regular-share requests oldest-first by `requestTs` within
|
|
773
|
+
each vault, using PDA address to break same-second ties deterministically. The
|
|
774
|
+
`queueId` remains a reusable owner slot (0–255). An unfunded or not-yet-ready
|
|
775
|
+
request blocks later regular requests in that keeper run; the keeper logs
|
|
776
|
+
`skipped-no-liquidity` and continues with other vaults and junior queues. It uses
|
|
777
|
+
on-chain time for readiness. Ordering is a keeper policy: the program allows an
|
|
778
|
+
authorized fulfiller to settle any ready request directly.
|
|
779
|
+
|
|
780
|
+
Only the request owner can cancel, at any time **before the HW manager locks the
|
|
781
|
+
payout** (`pricedTs == 0`). A locked zero payout also cannot be cancelled. There
|
|
782
|
+
is no cancellation waiting period. `cancelAsyncWithdraw.getTx({ user, vault,
|
|
783
|
+
queueId })` recreates a missing owner share ATA, returns all escrow shares
|
|
784
|
+
(including surplus), and refunds queue/escrow rent to the recorded payer without
|
|
785
|
+
charging redemption fees. The legacy junior cancellation route enforces the
|
|
786
|
+
same payout lock for regular shares; junior cancellation keeps its existing
|
|
787
|
+
behavior. Requests are independent and need no neighbouring queue accounts.
|
|
758
788
|
|
|
759
789
|
The curator console's **Redemptions** tab shows pending regular-share requests,
|
|
760
790
|
their locked payouts and pricing timestamps, and owner cancellation eligibility.
|
|
@@ -763,15 +793,14 @@ uses the HW-manager wallet's `signAllTransactions` where supported. Each request
|
|
|
763
793
|
is priced when its transaction executes; separate transactions are not a single
|
|
764
794
|
atomic snapshot. Failed batches remain pending and can be refreshed and retried.
|
|
765
795
|
|
|
766
|
-
The redemption mode
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
mode option remain valid.
|
|
796
|
+
The redemption mode and redemption period reuse reserved vault space; pricing
|
|
797
|
+
fields reuse queue padding. Existing vault account sizes and prior field offsets
|
|
798
|
+
are unchanged, and queue accounts remain 296 bytes including the discriminator.
|
|
799
|
+
No FIFO state or account migration is needed.
|
|
800
|
+
|
|
801
|
+
Deploy the updated program and publish SDK 1.0.70, then update all consumers
|
|
802
|
+
before enabling regular-share async requests. Existing config payloads omitting
|
|
803
|
+
the trailing options remain valid.
|
|
775
804
|
|
|
776
805
|
### Example: junior withdrawal queue
|
|
777
806
|
|
package/dist/index.d.ts
CHANGED
|
@@ -68,8 +68,6 @@ declare const MAX_PRICE_STALENESS_THRESHOLD_SECS: number;
|
|
|
68
68
|
declare const DEFAULT_VAULT_ID = 0;
|
|
69
69
|
declare const DEFAULT_MAX_ACCEPTABLE_APY_BPS = 10000;
|
|
70
70
|
declare const DEFAULT_JUNIOR_WITHDRAWAL_LOCKUP_SECS: number;
|
|
71
|
-
/** Cancellation requires age strictly greater than this interval. */
|
|
72
|
-
declare const ASYNC_REDEMPTION_CANCEL_DELAY_SECS: number;
|
|
73
71
|
declare const DEFAULT_JUNIOR_EARLY_UNSTAKE_FEE_BPS = 100;
|
|
74
72
|
declare const DEFAULT_JUNIOR_STANDARD_UNSTAKE_FEE_BPS = 50;
|
|
75
73
|
/** Mainnet USDC mint address. */
|
|
@@ -9445,7 +9443,8 @@ type Bankineco = {
|
|
|
9445
9443
|
{
|
|
9446
9444
|
"name": "redemptionMode";
|
|
9447
9445
|
"docs": [
|
|
9448
|
-
"Redemption policy for regular vault shares. Zero preserves existing vault behavior."
|
|
9446
|
+
"Redemption policy for regular vault shares. Zero preserves existing vault behavior.",
|
|
9447
|
+
"Numeric layout is part of the account and instruction formats; only append variants."
|
|
9449
9448
|
];
|
|
9450
9449
|
"repr": {
|
|
9451
9450
|
"kind": "rust";
|
|
@@ -9458,6 +9457,9 @@ type Bankineco = {
|
|
|
9458
9457
|
},
|
|
9459
9458
|
{
|
|
9460
9459
|
"name": "asyncOnly";
|
|
9460
|
+
},
|
|
9461
|
+
{
|
|
9462
|
+
"name": "hybrid";
|
|
9461
9463
|
}
|
|
9462
9464
|
];
|
|
9463
9465
|
};
|
|
@@ -9934,6 +9936,15 @@ type Bankineco = {
|
|
|
9934
9936
|
};
|
|
9935
9937
|
};
|
|
9936
9938
|
};
|
|
9939
|
+
},
|
|
9940
|
+
{
|
|
9941
|
+
"name": "redemptionPeriodSecs";
|
|
9942
|
+
"docs": [
|
|
9943
|
+
"Minimum delay in seconds for new regular-share async requests. Zero disables the delay."
|
|
9944
|
+
];
|
|
9945
|
+
"type": {
|
|
9946
|
+
"option": "i64";
|
|
9947
|
+
};
|
|
9937
9948
|
}
|
|
9938
9949
|
];
|
|
9939
9950
|
};
|
|
@@ -10592,12 +10603,19 @@ type Bankineco = {
|
|
|
10592
10603
|
];
|
|
10593
10604
|
"type": "u64";
|
|
10594
10605
|
},
|
|
10606
|
+
{
|
|
10607
|
+
"name": "redemptionPeriodSecs";
|
|
10608
|
+
"docs": [
|
|
10609
|
+
"Minimum delay for new regular-share async withdrawals; zero allows immediate settlement."
|
|
10610
|
+
];
|
|
10611
|
+
"type": "i64";
|
|
10612
|
+
},
|
|
10595
10613
|
{
|
|
10596
10614
|
"name": "padding3";
|
|
10597
10615
|
"type": {
|
|
10598
10616
|
"array": [
|
|
10599
10617
|
"u64",
|
|
10600
|
-
|
|
10618
|
+
20
|
|
10601
10619
|
];
|
|
10602
10620
|
};
|
|
10603
10621
|
}
|
|
@@ -12454,6 +12472,8 @@ type RedemptionModeArgs = {
|
|
|
12454
12472
|
synchronous: {};
|
|
12455
12473
|
} | {
|
|
12456
12474
|
asyncOnly: {};
|
|
12475
|
+
} | {
|
|
12476
|
+
hybrid: {};
|
|
12457
12477
|
};
|
|
12458
12478
|
interface SetVaultConfigIxArgs {
|
|
12459
12479
|
curator: Address;
|
|
@@ -12473,6 +12493,7 @@ interface SetVaultConfigIxArgs {
|
|
|
12473
12493
|
tvlLimit: BN | null;
|
|
12474
12494
|
lossesEnabled: boolean | null;
|
|
12475
12495
|
redemptionMode?: RedemptionModeArgs | null;
|
|
12496
|
+
redemptionPeriodSecs?: BN | null;
|
|
12476
12497
|
priceStalenessThresholdSecs: BN | null;
|
|
12477
12498
|
newCurator: Address | null;
|
|
12478
12499
|
userBurnLimit: {
|
|
@@ -12490,8 +12511,10 @@ interface SetVaultConfigIxArgs {
|
|
|
12490
12511
|
};
|
|
12491
12512
|
}
|
|
12492
12513
|
interface SetVaultConfigTxArgs {
|
|
12493
|
-
/** Regular-share policy.
|
|
12514
|
+
/** Regular-share policy. New vaults default to hybrid; omit to leave unchanged. */
|
|
12494
12515
|
redemptionMode?: RedemptionModeArgs;
|
|
12516
|
+
/** Minimum wait for new regular-share async withdrawals, in seconds. Zero disables it. */
|
|
12517
|
+
redemptionPeriodSecs?: bigint;
|
|
12495
12518
|
curator: Address;
|
|
12496
12519
|
vault: Address;
|
|
12497
12520
|
vaultOracle?: Address;
|
|
@@ -13020,7 +13043,7 @@ interface SetExternalLiquidityTxArgs {
|
|
|
13020
13043
|
userAccount: Address;
|
|
13021
13044
|
lookupTables?: Address[];
|
|
13022
13045
|
}
|
|
13023
|
-
/** Escrow regular shares in an async-
|
|
13046
|
+
/** Escrow regular shares in an async-enabled vault. Burned at fulfillment, optionally priced earlier. */
|
|
13024
13047
|
type RequestAsyncWithdrawIxArgs = Omit<RequestJuniorTrancheWithdrawIxArgs, "vaultTrancheState">;
|
|
13025
13048
|
interface RequestAsyncWithdrawTxArgs extends Omit<RequestJuniorTrancheWithdrawTxArgs, "vaultTrancheState" | "juniorShareMint"> {
|
|
13026
13049
|
shareMint?: Address;
|
|
@@ -14854,8 +14877,8 @@ onAccountValue?: (accountName: string, value: TrackedAccountValue) => void): Pro
|
|
|
14854
14877
|
* and the `fulfill-junior-withdraw` CLI can all share one implementation.
|
|
14855
14878
|
*
|
|
14856
14879
|
* Requests escrow shares until fulfillment or cancellation. Junior queues become
|
|
14857
|
-
* due after their lockup; regular queues
|
|
14858
|
-
* configured fulfiller. Dispatch uses the input mint, including queues that remain
|
|
14880
|
+
* due after their lockup; regular queues settle oldest-first after their notice
|
|
14881
|
+
* period through the vault's configured fulfiller. Dispatch uses the input mint, including queues that remain
|
|
14859
14882
|
* pending after a vault switches back to synchronous redemption.
|
|
14860
14883
|
*/
|
|
14861
14884
|
|
|
@@ -14882,6 +14905,8 @@ interface WithdrawalQueueSnapshot {
|
|
|
14882
14905
|
interface FulfillSummary {
|
|
14883
14906
|
fulfilled: number;
|
|
14884
14907
|
skippedNotDue: number;
|
|
14908
|
+
skippedBlocked: number;
|
|
14909
|
+
skippedNoLiquidity: number;
|
|
14885
14910
|
failed: number;
|
|
14886
14911
|
signatures: string[];
|
|
14887
14912
|
}
|
|
@@ -14908,8 +14933,8 @@ declare class WithdrawalQueueService {
|
|
|
14908
14933
|
*/
|
|
14909
14934
|
fulfill(signer: Keypair, queue: WithdrawalQueueSnapshot): Promise<string>;
|
|
14910
14935
|
/**
|
|
14911
|
-
* Fulfill
|
|
14912
|
-
*
|
|
14936
|
+
* Fulfill regular queues oldest-first by request timestamp. An older pending
|
|
14937
|
+
* request blocks later regular requests; junior queues and other vaults continue.
|
|
14913
14938
|
*/
|
|
14914
14939
|
fulfillAllDue(signer: Keypair, opts?: {
|
|
14915
14940
|
vault?: Address;
|
|
@@ -16527,4 +16552,4 @@ declare function collectVaultLookupTableAccounts(client: VaultClient, vault: Add
|
|
|
16527
16552
|
extraAccounts?: Address[];
|
|
16528
16553
|
}): Promise<Address[]>;
|
|
16529
16554
|
|
|
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 };
|
|
16555
|
+
export { ASSET_DECIMALS, ASSET_REBALANCE_COOLDOWN_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
|
@@ -2048,7 +2048,6 @@ var index_exports = {};
|
|
|
2048
2048
|
__export(index_exports, {
|
|
2049
2049
|
ASSET_DECIMALS: () => ASSET_DECIMALS,
|
|
2050
2050
|
ASSET_REBALANCE_COOLDOWN_SECS: () => ASSET_REBALANCE_COOLDOWN_SECS,
|
|
2051
|
-
ASYNC_REDEMPTION_CANCEL_DELAY_SECS: () => ASYNC_REDEMPTION_CANCEL_DELAY_SECS,
|
|
2052
2051
|
AccountClient: () => AccountClient,
|
|
2053
2052
|
ActivateCircuitBreakerBuilder: () => ActivateCircuitBreakerBuilder,
|
|
2054
2053
|
AddIncentiveRecipientBuilder: () => AddIncentiveRecipientBuilder,
|
|
@@ -2387,7 +2386,6 @@ var MAX_PRICE_STALENESS_THRESHOLD_SECS = 7 * 24 * 60 * 60;
|
|
|
2387
2386
|
var DEFAULT_VAULT_ID = 0;
|
|
2388
2387
|
var DEFAULT_MAX_ACCEPTABLE_APY_BPS = 1e4;
|
|
2389
2388
|
var DEFAULT_JUNIOR_WITHDRAWAL_LOCKUP_SECS = 7 * 24 * 60 * 60;
|
|
2390
|
-
var ASYNC_REDEMPTION_CANCEL_DELAY_SECS = 30 * 24 * 60 * 60;
|
|
2391
2389
|
var DEFAULT_JUNIOR_EARLY_UNSTAKE_FEE_BPS = 100;
|
|
2392
2390
|
var DEFAULT_JUNIOR_STANDARD_UNSTAKE_FEE_BPS = 50;
|
|
2393
2391
|
var USDC_MINT = (0, import_kit.address)(
|
|
@@ -11657,7 +11655,8 @@ var IDL = {
|
|
|
11657
11655
|
{
|
|
11658
11656
|
"name": "RedemptionMode",
|
|
11659
11657
|
"docs": [
|
|
11660
|
-
"Redemption policy for regular vault shares. Zero preserves existing vault behavior."
|
|
11658
|
+
"Redemption policy for regular vault shares. Zero preserves existing vault behavior.",
|
|
11659
|
+
"Numeric layout is part of the account and instruction formats; only append variants."
|
|
11661
11660
|
],
|
|
11662
11661
|
"repr": {
|
|
11663
11662
|
"kind": "rust"
|
|
@@ -11670,6 +11669,9 @@ var IDL = {
|
|
|
11670
11669
|
},
|
|
11671
11670
|
{
|
|
11672
11671
|
"name": "AsyncOnly"
|
|
11672
|
+
},
|
|
11673
|
+
{
|
|
11674
|
+
"name": "Hybrid"
|
|
11673
11675
|
}
|
|
11674
11676
|
]
|
|
11675
11677
|
}
|
|
@@ -12146,6 +12148,15 @@ var IDL = {
|
|
|
12146
12148
|
}
|
|
12147
12149
|
}
|
|
12148
12150
|
}
|
|
12151
|
+
},
|
|
12152
|
+
{
|
|
12153
|
+
"name": "redemption_period_secs",
|
|
12154
|
+
"docs": [
|
|
12155
|
+
"Minimum delay in seconds for new regular-share async requests. Zero disables the delay."
|
|
12156
|
+
],
|
|
12157
|
+
"type": {
|
|
12158
|
+
"option": "i64"
|
|
12159
|
+
}
|
|
12149
12160
|
}
|
|
12150
12161
|
]
|
|
12151
12162
|
}
|
|
@@ -12804,12 +12815,19 @@ var IDL = {
|
|
|
12804
12815
|
],
|
|
12805
12816
|
"type": "u64"
|
|
12806
12817
|
},
|
|
12818
|
+
{
|
|
12819
|
+
"name": "redemption_period_secs",
|
|
12820
|
+
"docs": [
|
|
12821
|
+
"Minimum delay for new regular-share async withdrawals; zero allows immediate settlement."
|
|
12822
|
+
],
|
|
12823
|
+
"type": "i64"
|
|
12824
|
+
},
|
|
12807
12825
|
{
|
|
12808
12826
|
"name": "_padding3",
|
|
12809
12827
|
"type": {
|
|
12810
12828
|
"array": [
|
|
12811
12829
|
"u64",
|
|
12812
|
-
|
|
12830
|
+
20
|
|
12813
12831
|
]
|
|
12814
12832
|
}
|
|
12815
12833
|
}
|
|
@@ -15756,6 +15774,7 @@ function toAnchorSetVaultConfigArgs(args) {
|
|
|
15756
15774
|
tvlLimit: args.tvlLimit,
|
|
15757
15775
|
lossesEnabled: args.lossesEnabled,
|
|
15758
15776
|
redemptionMode: args.redemptionMode ?? null,
|
|
15777
|
+
redemptionPeriodSecs: args.redemptionPeriodSecs ?? null,
|
|
15759
15778
|
priceStalenessThresholdSecs: args.priceStalenessThresholdSecs,
|
|
15760
15779
|
userBurnLimit: args.userBurnLimit,
|
|
15761
15780
|
managerPullLimit: args.managerPullLimit,
|
|
@@ -15955,6 +15974,7 @@ var SetVaultConfigBuilder = class extends VaultBuilderBase {
|
|
|
15955
15974
|
tvlLimit: txArgs.tvlLimit !== void 0 ? new import_core7.BN(txArgs.tvlLimit.toString()) : null,
|
|
15956
15975
|
lossesEnabled: txArgs.lossesEnabled ?? null,
|
|
15957
15976
|
redemptionMode: txArgs.redemptionMode ?? null,
|
|
15977
|
+
redemptionPeriodSecs: txArgs.redemptionPeriodSecs !== void 0 ? new import_core7.BN(txArgs.redemptionPeriodSecs.toString()) : null,
|
|
15958
15978
|
priceStalenessThresholdSecs: txArgs.priceStalenessThresholdSecs !== void 0 ? new import_core7.BN(txArgs.priceStalenessThresholdSecs.toString()) : null,
|
|
15959
15979
|
userBurnLimit: txArgs.userBurnLimit !== void 0 ? {
|
|
15960
15980
|
windowLimit: new import_core7.BN(
|
|
@@ -20473,8 +20493,8 @@ var WithdrawalQueueService = class {
|
|
|
20473
20493
|
return this.client.sendTransaction(signer, plan);
|
|
20474
20494
|
}
|
|
20475
20495
|
/**
|
|
20476
|
-
* Fulfill
|
|
20477
|
-
*
|
|
20496
|
+
* Fulfill regular queues oldest-first by request timestamp. An older pending
|
|
20497
|
+
* request blocks later regular requests; junior queues and other vaults continue.
|
|
20478
20498
|
*/
|
|
20479
20499
|
async fulfillAllDue(signer, opts = {}) {
|
|
20480
20500
|
const { vault, log } = opts;
|
|
@@ -20482,31 +20502,77 @@ var WithdrawalQueueService = class {
|
|
|
20482
20502
|
const summary = {
|
|
20483
20503
|
fulfilled: 0,
|
|
20484
20504
|
skippedNotDue: 0,
|
|
20505
|
+
skippedBlocked: 0,
|
|
20506
|
+
skippedNoLiquidity: 0,
|
|
20485
20507
|
failed: 0,
|
|
20486
20508
|
signatures: []
|
|
20487
20509
|
};
|
|
20488
|
-
const now = this.
|
|
20510
|
+
const now = Number(await this.client.account.fetchClockUnixTimestamp());
|
|
20511
|
+
const byVault = /* @__PURE__ */ new Map();
|
|
20489
20512
|
for (const queue of queues) {
|
|
20490
|
-
|
|
20491
|
-
|
|
20492
|
-
|
|
20493
|
-
|
|
20494
|
-
|
|
20495
|
-
|
|
20496
|
-
|
|
20513
|
+
const group = byVault.get(queue.vault) ?? [];
|
|
20514
|
+
group.push(queue);
|
|
20515
|
+
byVault.set(queue.vault, group);
|
|
20516
|
+
}
|
|
20517
|
+
for (const [vault2, group] of byVault) {
|
|
20518
|
+
let regularBlocked = false;
|
|
20519
|
+
let regularMint;
|
|
20497
20520
|
try {
|
|
20498
|
-
|
|
20499
|
-
|
|
20521
|
+
regularMint = (0, import_common53.fromWeb3Pk)(
|
|
20522
|
+
(await this.client.account.fetchVault(vault2, { fresh: true })).mint
|
|
20500
20523
|
);
|
|
20501
|
-
const sig = await this.fulfill(signer, queue);
|
|
20502
|
-
summary.fulfilled += 1;
|
|
20503
|
-
summary.signatures.push(sig);
|
|
20504
|
-
log?.(`fulfilled ${queue.pda} (owner ${queue.owner}): ${sig}`);
|
|
20505
20524
|
} catch (err) {
|
|
20506
|
-
summary.failed +=
|
|
20525
|
+
summary.failed += group.length;
|
|
20507
20526
|
log?.(
|
|
20508
|
-
`FAILED
|
|
20527
|
+
`FAILED vault ${vault2}: ${err instanceof Error ? err.message : String(err)}`
|
|
20509
20528
|
);
|
|
20529
|
+
continue;
|
|
20530
|
+
}
|
|
20531
|
+
const regularQueues = group.filter((q) => q.inputMint === regularMint).sort(
|
|
20532
|
+
(a, b) => a.requestTs - b.requestTs || (a.pda < b.pda ? -1 : a.pda > b.pda ? 1 : 0)
|
|
20533
|
+
);
|
|
20534
|
+
for (const queue of [
|
|
20535
|
+
...regularQueues,
|
|
20536
|
+
...group.filter((q) => q.inputMint !== regularMint)
|
|
20537
|
+
]) {
|
|
20538
|
+
const regular = queue.inputMint === regularMint;
|
|
20539
|
+
if (regular && regularBlocked) {
|
|
20540
|
+
summary.skippedBlocked += 1;
|
|
20541
|
+
log?.(
|
|
20542
|
+
`skipped-blocked ${queue.pda}: an older request is still pending`
|
|
20543
|
+
);
|
|
20544
|
+
continue;
|
|
20545
|
+
}
|
|
20546
|
+
if (!this.isDue(queue, now)) {
|
|
20547
|
+
summary.skippedNotDue += 1;
|
|
20548
|
+
if (regular) regularBlocked = true;
|
|
20549
|
+
log?.(
|
|
20550
|
+
`skip ${queue.pda} (owner ${queue.owner}) \u2014 due in ${this.secondsUntilDue(queue, now)}s`
|
|
20551
|
+
);
|
|
20552
|
+
continue;
|
|
20553
|
+
}
|
|
20554
|
+
try {
|
|
20555
|
+
log?.(
|
|
20556
|
+
`fulfilling ${queue.pda} \u2014 paying ${queue.inputAmount} shares worth of ${queue.outputMint} to owner ${queue.owner}`
|
|
20557
|
+
);
|
|
20558
|
+
const sig = await this.fulfill(signer, queue);
|
|
20559
|
+
summary.fulfilled += 1;
|
|
20560
|
+
summary.signatures.push(sig);
|
|
20561
|
+
log?.(`fulfilled ${queue.pda} (owner ${queue.owner}): ${sig}`);
|
|
20562
|
+
} catch (err) {
|
|
20563
|
+
if (regular) regularBlocked = true;
|
|
20564
|
+
const message2 = err instanceof Error ? err.message : String(err);
|
|
20565
|
+
const logs = err?.logs ?? [];
|
|
20566
|
+
if (/InsufficientVaultLiquidity/.test([message2, ...logs].join("\n"))) {
|
|
20567
|
+
summary.skippedNoLiquidity += 1;
|
|
20568
|
+
log?.(
|
|
20569
|
+
`skipped-no-liquidity ${queue.pda} (owner ${queue.owner}): ${message2}`
|
|
20570
|
+
);
|
|
20571
|
+
} else {
|
|
20572
|
+
summary.failed += 1;
|
|
20573
|
+
log?.(`FAILED ${queue.pda} (owner ${queue.owner}): ${message2}`);
|
|
20574
|
+
}
|
|
20575
|
+
}
|
|
20510
20576
|
}
|
|
20511
20577
|
}
|
|
20512
20578
|
return summary;
|
|
@@ -27267,7 +27333,6 @@ var import_common72 = __toESM(require_dist());
|
|
|
27267
27333
|
0 && (module.exports = {
|
|
27268
27334
|
ASSET_DECIMALS,
|
|
27269
27335
|
ASSET_REBALANCE_COOLDOWN_SECS,
|
|
27270
|
-
ASYNC_REDEMPTION_CANCEL_DELAY_SECS,
|
|
27271
27336
|
AccountClient,
|
|
27272
27337
|
ActivateCircuitBreakerBuilder,
|
|
27273
27338
|
AddIncentiveRecipientBuilder,
|