@perena/vault-sdk 1.0.28 → 1.0.29
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 +20 -3
- package/dist/index.d.ts +429 -31
- package/dist/index.js +759 -53
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10929,6 +10929,106 @@ type Bankineco = {
|
|
|
10929
10929
|
];
|
|
10930
10930
|
};
|
|
10931
10931
|
},
|
|
10932
|
+
{
|
|
10933
|
+
"name": "rollingRebalanceLimit";
|
|
10934
|
+
"docs": [
|
|
10935
|
+
"Rolling-window cap on rebalance (Jupiter swap) throughput, expressed as a",
|
|
10936
|
+
"share of current TVL rather than a fixed amount.",
|
|
10937
|
+
"",
|
|
10938
|
+
"Sibling of [`super::withdrawal_limits::RollingWithdrawalLimit`]: same",
|
|
10939
|
+
"window-slide-then-charge mechanics, but the ceiling is recomputed from live",
|
|
10940
|
+
"TVL on every call, so the cap tracks the vault as it grows or shrinks",
|
|
10941
|
+
"instead of going stale at whatever amount the curator last set.",
|
|
10942
|
+
"",
|
|
10943
|
+
"Both swap directions charge the same window — the cap bounds total value",
|
|
10944
|
+
"routed through Jupiter per window, regardless of which asset is sold."
|
|
10945
|
+
];
|
|
10946
|
+
"serialization": "bytemuck";
|
|
10947
|
+
"repr": {
|
|
10948
|
+
"kind": "c";
|
|
10949
|
+
};
|
|
10950
|
+
"type": {
|
|
10951
|
+
"kind": "struct";
|
|
10952
|
+
"fields": [
|
|
10953
|
+
{
|
|
10954
|
+
"name": "windowStartTs";
|
|
10955
|
+
"docs": [
|
|
10956
|
+
"Unix timestamp the current window opened."
|
|
10957
|
+
];
|
|
10958
|
+
"type": "i64";
|
|
10959
|
+
},
|
|
10960
|
+
{
|
|
10961
|
+
"name": "windowDurationSeconds";
|
|
10962
|
+
"docs": [
|
|
10963
|
+
"Window length, in seconds (e.g. 3_600 for an hourly limit)."
|
|
10964
|
+
];
|
|
10965
|
+
"type": "u64";
|
|
10966
|
+
},
|
|
10967
|
+
{
|
|
10968
|
+
"name": "valueInWindow";
|
|
10969
|
+
"docs": [
|
|
10970
|
+
"Value rebalanced inside the current window, in the vault's accounting",
|
|
10971
|
+
"unit."
|
|
10972
|
+
];
|
|
10973
|
+
"type": "u64";
|
|
10974
|
+
},
|
|
10975
|
+
{
|
|
10976
|
+
"name": "windowLimitBps";
|
|
10977
|
+
"docs": [
|
|
10978
|
+
"Cap as a share of TVL, in bps. `0` disables the limit."
|
|
10979
|
+
];
|
|
10980
|
+
"type": "u16";
|
|
10981
|
+
},
|
|
10982
|
+
{
|
|
10983
|
+
"name": "padding1";
|
|
10984
|
+
"type": {
|
|
10985
|
+
"array": [
|
|
10986
|
+
"u8",
|
|
10987
|
+
6
|
|
10988
|
+
];
|
|
10989
|
+
};
|
|
10990
|
+
},
|
|
10991
|
+
{
|
|
10992
|
+
"name": "padding2";
|
|
10993
|
+
"type": {
|
|
10994
|
+
"array": [
|
|
10995
|
+
"u64",
|
|
10996
|
+
4
|
|
10997
|
+
];
|
|
10998
|
+
};
|
|
10999
|
+
}
|
|
11000
|
+
];
|
|
11001
|
+
};
|
|
11002
|
+
},
|
|
11003
|
+
{
|
|
11004
|
+
"name": "rollingRebalanceLimitConfig";
|
|
11005
|
+
"docs": [
|
|
11006
|
+
"Rolling rebalance-limit config applied via [`SetVaultConfigArgs`].",
|
|
11007
|
+
"",
|
|
11008
|
+
"The cap is a share of TVL rather than a fixed amount, so it stays",
|
|
11009
|
+
"meaningful as the vault grows. Both fields must be zero (disable the cap)",
|
|
11010
|
+
"or both non-zero (enable it)."
|
|
11011
|
+
];
|
|
11012
|
+
"type": {
|
|
11013
|
+
"kind": "struct";
|
|
11014
|
+
"fields": [
|
|
11015
|
+
{
|
|
11016
|
+
"name": "windowLimitBps";
|
|
11017
|
+
"docs": [
|
|
11018
|
+
"Max share of TVL rebalanced inside one window, in bps (`0` disables)."
|
|
11019
|
+
];
|
|
11020
|
+
"type": "u16";
|
|
11021
|
+
},
|
|
11022
|
+
{
|
|
11023
|
+
"name": "windowDurationSeconds";
|
|
11024
|
+
"docs": [
|
|
11025
|
+
"Window length in seconds (`0` only valid when `window_limit_bps` is `0`)."
|
|
11026
|
+
];
|
|
11027
|
+
"type": "u64";
|
|
11028
|
+
}
|
|
11029
|
+
];
|
|
11030
|
+
};
|
|
11031
|
+
},
|
|
10932
11032
|
{
|
|
10933
11033
|
"name": "setAssetPriceOracleArgs";
|
|
10934
11034
|
"type": {
|
|
@@ -11114,6 +11214,20 @@ type Bankineco = {
|
|
|
11114
11214
|
};
|
|
11115
11215
|
};
|
|
11116
11216
|
};
|
|
11217
|
+
},
|
|
11218
|
+
{
|
|
11219
|
+
"name": "rebalanceLimit";
|
|
11220
|
+
"docs": [
|
|
11221
|
+
"Rolling cap on rebalance (Jupiter swap) throughput. `None` leaves",
|
|
11222
|
+
"unchanged."
|
|
11223
|
+
];
|
|
11224
|
+
"type": {
|
|
11225
|
+
"option": {
|
|
11226
|
+
"defined": {
|
|
11227
|
+
"name": "rollingRebalanceLimitConfig";
|
|
11228
|
+
};
|
|
11229
|
+
};
|
|
11230
|
+
};
|
|
11117
11231
|
}
|
|
11118
11232
|
];
|
|
11119
11233
|
};
|
|
@@ -12035,6 +12149,14 @@ type Bankineco = {
|
|
|
12035
12149
|
"name": "seniorFixedApyBps";
|
|
12036
12150
|
"type": "u16";
|
|
12037
12151
|
},
|
|
12152
|
+
{
|
|
12153
|
+
"name": "juniorFloorApyBps";
|
|
12154
|
+
"docs": [
|
|
12155
|
+
"Floor APY for the junior tranche, in basis points. Zero disables the",
|
|
12156
|
+
"floor. Shortfalls are funded from the untranched sleeve, never senior."
|
|
12157
|
+
];
|
|
12158
|
+
"type": "u16";
|
|
12159
|
+
},
|
|
12038
12160
|
{
|
|
12039
12161
|
"name": "earlyUnstakeFeeBps";
|
|
12040
12162
|
"type": "u16";
|
|
@@ -12860,12 +12982,38 @@ type Bankineco = {
|
|
|
12860
12982
|
];
|
|
12861
12983
|
"type": "u64";
|
|
12862
12984
|
},
|
|
12985
|
+
{
|
|
12986
|
+
"name": "juniorFloorApyBps";
|
|
12987
|
+
"docs": [
|
|
12988
|
+
"Curator-set floor APY for the junior tranche, in basis points. Zero",
|
|
12989
|
+
"disables the floor.",
|
|
12990
|
+
"",
|
|
12991
|
+
"When junior's realized growth falls short of this floor, the shortfall is",
|
|
12992
|
+
"topped up from the *untranched* (regular) sleeve's value, never from the",
|
|
12993
|
+
"senior tranche -- senior's fixed-APY entitlement is settled first and is",
|
|
12994
|
+
"untouched by the floor. The top-up is best-effort: it is capped by the",
|
|
12995
|
+
"untranched sleeve's available value, and any unpaid remainder stays",
|
|
12996
|
+
"outstanding against the durable junior anchor",
|
|
12997
|
+
"(`VaultTrancheState::junior_apy_anchor_share_price`) so it can be paid on",
|
|
12998
|
+
"a later settlement."
|
|
12999
|
+
];
|
|
13000
|
+
"type": "u16";
|
|
13001
|
+
},
|
|
13002
|
+
{
|
|
13003
|
+
"name": "padding1";
|
|
13004
|
+
"type": {
|
|
13005
|
+
"array": [
|
|
13006
|
+
"u8",
|
|
13007
|
+
6
|
|
13008
|
+
];
|
|
13009
|
+
};
|
|
13010
|
+
},
|
|
12863
13011
|
{
|
|
12864
13012
|
"name": "padding2";
|
|
12865
13013
|
"type": {
|
|
12866
13014
|
"array": [
|
|
12867
13015
|
"u64",
|
|
12868
|
-
|
|
13016
|
+
12
|
|
12869
13017
|
];
|
|
12870
13018
|
};
|
|
12871
13019
|
}
|
|
@@ -12943,12 +13091,28 @@ type Bankineco = {
|
|
|
12943
13091
|
];
|
|
12944
13092
|
"type": "i64";
|
|
12945
13093
|
},
|
|
13094
|
+
{
|
|
13095
|
+
"name": "juniorApyAnchorSharePrice";
|
|
13096
|
+
"docs": [
|
|
13097
|
+
"Junior share price at the start of the current floor-APY regime. The",
|
|
13098
|
+
"anchor is durable across settlements so an unpaid floor shortfall stays",
|
|
13099
|
+
"outstanding and can be caught up later."
|
|
13100
|
+
];
|
|
13101
|
+
"type": "u64";
|
|
13102
|
+
},
|
|
13103
|
+
{
|
|
13104
|
+
"name": "juniorApyAnchorTs";
|
|
13105
|
+
"docs": [
|
|
13106
|
+
"Unix timestamp when the junior floor-APY anchor was set."
|
|
13107
|
+
];
|
|
13108
|
+
"type": "i64";
|
|
13109
|
+
},
|
|
12946
13110
|
{
|
|
12947
13111
|
"name": "padding2";
|
|
12948
13112
|
"type": {
|
|
12949
13113
|
"array": [
|
|
12950
13114
|
"u64",
|
|
12951
|
-
|
|
13115
|
+
27
|
|
12952
13116
|
];
|
|
12953
13117
|
};
|
|
12954
13118
|
}
|
|
@@ -12966,6 +13130,17 @@ type Bankineco = {
|
|
|
12966
13130
|
"option": "u16";
|
|
12967
13131
|
};
|
|
12968
13132
|
},
|
|
13133
|
+
{
|
|
13134
|
+
"name": "juniorFloorApyBps";
|
|
13135
|
+
"docs": [
|
|
13136
|
+
"Floor APY for the junior tranche, in basis points. Zero disables the",
|
|
13137
|
+
"floor. Setting this starts a fresh regime: any shortfall accrued under",
|
|
13138
|
+
"the previous value is forfeited."
|
|
13139
|
+
];
|
|
13140
|
+
"type": {
|
|
13141
|
+
"option": "u16";
|
|
13142
|
+
};
|
|
13143
|
+
},
|
|
12969
13144
|
{
|
|
12970
13145
|
"name": "earlyUnstakeFeeBps";
|
|
12971
13146
|
"type": {
|
|
@@ -13248,12 +13423,25 @@ type Bankineco = {
|
|
|
13248
13423
|
];
|
|
13249
13424
|
"type": "u64";
|
|
13250
13425
|
},
|
|
13426
|
+
{
|
|
13427
|
+
"name": "rebalanceLimit";
|
|
13428
|
+
"docs": [
|
|
13429
|
+
"Rolling cap on rebalance (Jupiter swap) throughput per window, as a",
|
|
13430
|
+
"share of TVL. Carved out of `_padding1`, so the account layout and size",
|
|
13431
|
+
"are unchanged and existing vaults decode it as disabled."
|
|
13432
|
+
];
|
|
13433
|
+
"type": {
|
|
13434
|
+
"defined": {
|
|
13435
|
+
"name": "rollingRebalanceLimit";
|
|
13436
|
+
};
|
|
13437
|
+
};
|
|
13438
|
+
},
|
|
13251
13439
|
{
|
|
13252
13440
|
"name": "padding1";
|
|
13253
13441
|
"type": {
|
|
13254
13442
|
"array": [
|
|
13255
13443
|
"u64",
|
|
13256
|
-
|
|
13444
|
+
22
|
|
13257
13445
|
];
|
|
13258
13446
|
};
|
|
13259
13447
|
},
|
|
@@ -14074,6 +14262,11 @@ interface CreateTrancheStateIxArgs {
|
|
|
14074
14262
|
*/
|
|
14075
14263
|
vaultOracle?: Address;
|
|
14076
14264
|
seniorFixedApyBps: number;
|
|
14265
|
+
/**
|
|
14266
|
+
* Junior floor APY in basis points. Zero disables the floor. Shortfalls are
|
|
14267
|
+
* funded from the untranched sleeve, never from the senior tranche.
|
|
14268
|
+
*/
|
|
14269
|
+
juniorFloorApyBps: number;
|
|
14077
14270
|
earlyUnstakeFeeBps: number;
|
|
14078
14271
|
standardUnstakeFeeBps: number;
|
|
14079
14272
|
targetLockupDurationSecs: BN;
|
|
@@ -14088,6 +14281,8 @@ interface CreateTrancheStateTxArgs {
|
|
|
14088
14281
|
seniorShareMint: Address;
|
|
14089
14282
|
vaultOracle?: Address;
|
|
14090
14283
|
seniorFixedApyBps?: number;
|
|
14284
|
+
/** Junior floor APY in basis points. Zero disables the floor. */
|
|
14285
|
+
juniorFloorApyBps?: number;
|
|
14091
14286
|
earlyUnstakeFeeBps?: number;
|
|
14092
14287
|
standardUnstakeFeeBps?: number;
|
|
14093
14288
|
targetLockupDurationSecs?: number;
|
|
@@ -14102,6 +14297,12 @@ interface UpdateTrancheConfigIxArgs {
|
|
|
14102
14297
|
vaultTrancheState: Address;
|
|
14103
14298
|
vaultOracle: Address;
|
|
14104
14299
|
seniorFixedApyBps: number | null;
|
|
14300
|
+
/**
|
|
14301
|
+
* Junior floor APY in basis points, or null to leave it unchanged. Setting it
|
|
14302
|
+
* starts a fresh regime: any shortfall accrued under the previous value is
|
|
14303
|
+
* forfeited.
|
|
14304
|
+
*/
|
|
14305
|
+
juniorFloorApyBps: number | null;
|
|
14105
14306
|
earlyUnstakeFeeBps: number | null;
|
|
14106
14307
|
standardUnstakeFeeBps: number | null;
|
|
14107
14308
|
targetLockupDurationSecs: BN | null;
|
|
@@ -14113,6 +14314,8 @@ interface UpdateTrancheConfigTxArgs {
|
|
|
14113
14314
|
vaultTrancheState?: Address;
|
|
14114
14315
|
vaultOracle?: Address;
|
|
14115
14316
|
seniorFixedApyBps?: number;
|
|
14317
|
+
/** Junior floor APY in basis points. Zero disables the floor. */
|
|
14318
|
+
juniorFloorApyBps?: number;
|
|
14116
14319
|
earlyUnstakeFeeBps?: number;
|
|
14117
14320
|
standardUnstakeFeeBps?: number;
|
|
14118
14321
|
targetLockupDurationSecs?: number;
|
|
@@ -14138,6 +14341,15 @@ interface RollingLimitConfig {
|
|
|
14138
14341
|
windowLimit: bigint;
|
|
14139
14342
|
windowDurationSeconds: bigint;
|
|
14140
14343
|
}
|
|
14344
|
+
/**
|
|
14345
|
+
* Rolling rebalance cap. Unlike {@link RollingLimitConfig} the ceiling is a
|
|
14346
|
+
* share of TVL, recomputed on every swap, so it does not go stale as the vault
|
|
14347
|
+
* grows.
|
|
14348
|
+
*/
|
|
14349
|
+
interface RollingRebalanceLimitConfig {
|
|
14350
|
+
windowLimitBps: number;
|
|
14351
|
+
windowDurationSeconds: bigint;
|
|
14352
|
+
}
|
|
14141
14353
|
interface SetVaultConfigIxArgs {
|
|
14142
14354
|
curator: Address;
|
|
14143
14355
|
vault: Address;
|
|
@@ -14165,6 +14377,10 @@ interface SetVaultConfigIxArgs {
|
|
|
14165
14377
|
windowLimit: BN;
|
|
14166
14378
|
windowDurationSeconds: BN;
|
|
14167
14379
|
} | null;
|
|
14380
|
+
rebalanceLimit: {
|
|
14381
|
+
windowLimitBps: number;
|
|
14382
|
+
windowDurationSeconds: BN;
|
|
14383
|
+
} | null;
|
|
14168
14384
|
};
|
|
14169
14385
|
}
|
|
14170
14386
|
interface SetVaultConfigTxArgs {
|
|
@@ -14190,6 +14406,11 @@ interface SetVaultConfigTxArgs {
|
|
|
14190
14406
|
userBurnLimit?: RollingLimitConfig;
|
|
14191
14407
|
/** Rolling cap on manager liquidity pulls. Omit to leave unchanged. */
|
|
14192
14408
|
managerPullLimit?: RollingLimitConfig;
|
|
14409
|
+
/**
|
|
14410
|
+
* Rolling cap on rebalance (Jupiter swap) throughput, as a share of TVL.
|
|
14411
|
+
* Omit to leave unchanged.
|
|
14412
|
+
*/
|
|
14413
|
+
rebalanceLimit?: RollingRebalanceLimitConfig;
|
|
14193
14414
|
}
|
|
14194
14415
|
interface SetProtocolFeeIxArgs {
|
|
14195
14416
|
/** The hardcoded protocol wallet, the only authority allowed to set this. */
|
|
@@ -15576,7 +15797,7 @@ interface FulfillSummary {
|
|
|
15576
15797
|
failed: number;
|
|
15577
15798
|
signatures: string[];
|
|
15578
15799
|
}
|
|
15579
|
-
type LogFn$
|
|
15800
|
+
type LogFn$3 = (msg: string) => void;
|
|
15580
15801
|
declare class WithdrawalQueueService {
|
|
15581
15802
|
private readonly client;
|
|
15582
15803
|
constructor(client: VaultClient);
|
|
@@ -15604,7 +15825,7 @@ declare class WithdrawalQueueService {
|
|
|
15604
15825
|
*/
|
|
15605
15826
|
fulfillAllDue(signer: Keypair, opts?: {
|
|
15606
15827
|
vault?: Address;
|
|
15607
|
-
log?: LogFn$
|
|
15828
|
+
log?: LogFn$3;
|
|
15608
15829
|
}): Promise<FulfillSummary>;
|
|
15609
15830
|
private toSnapshot;
|
|
15610
15831
|
}
|
|
@@ -15626,7 +15847,7 @@ declare class WithdrawalQueueService {
|
|
|
15626
15847
|
* this service only submits the resulting values on-chain.
|
|
15627
15848
|
*/
|
|
15628
15849
|
|
|
15629
|
-
type LogFn$
|
|
15850
|
+
type LogFn$2 = (msg: string) => void;
|
|
15630
15851
|
type NavCrankBlockerReason = "unpriced" | "stale";
|
|
15631
15852
|
interface NavCrankBlocker {
|
|
15632
15853
|
holdingIndex: number;
|
|
@@ -15679,12 +15900,12 @@ declare class OracleService {
|
|
|
15679
15900
|
}[];
|
|
15680
15901
|
assetMint?: Address;
|
|
15681
15902
|
assetTokenProgram?: Address;
|
|
15682
|
-
}, log?: LogFn$
|
|
15903
|
+
}, log?: LogFn$2): Promise<string>;
|
|
15683
15904
|
/** Settle the vault NAV from its current holdings (permissionless). */
|
|
15684
15905
|
crankNav(cranker: Keypair, args: {
|
|
15685
15906
|
vault: Address;
|
|
15686
15907
|
vaultTrancheState?: Address;
|
|
15687
|
-
}, log?: LogFn$
|
|
15908
|
+
}, log?: LogFn$2): Promise<string>;
|
|
15688
15909
|
/**
|
|
15689
15910
|
* Check the same active-holding price preconditions that `crank_nav` enforces
|
|
15690
15911
|
* before spending a transaction on the permissionless settlement.
|
|
@@ -15694,19 +15915,19 @@ declare class OracleService {
|
|
|
15694
15915
|
crankNavIfReady(cranker: Keypair, args: {
|
|
15695
15916
|
vault: Address;
|
|
15696
15917
|
vaultTrancheState?: Address;
|
|
15697
|
-
}, log?: LogFn$
|
|
15918
|
+
}, log?: LogFn$2): Promise<NavCrankResult>;
|
|
15698
15919
|
/** Re-price one live-oracle holding from its bound Pyth/nested-vault account. */
|
|
15699
15920
|
refreshAssetPrice(updater: Keypair, args: {
|
|
15700
15921
|
vault: Address;
|
|
15701
15922
|
mint: Address;
|
|
15702
15923
|
oracleAccount: Address;
|
|
15703
15924
|
maxAgeSecs?: bigint;
|
|
15704
|
-
}, log?: LogFn$
|
|
15925
|
+
}, log?: LogFn$2): Promise<string>;
|
|
15705
15926
|
/**
|
|
15706
15927
|
* Refresh several holdings in sequence. Non-fatal: one failure is recorded
|
|
15707
15928
|
* and the rest still run. Returns a per-mint result list.
|
|
15708
15929
|
*/
|
|
15709
|
-
refreshAssetPrices(updater: Keypair, vault: Address, targets: AssetPriceRefreshTarget[], log?: LogFn$
|
|
15930
|
+
refreshAssetPrices(updater: Keypair, vault: Address, targets: AssetPriceRefreshTarget[], log?: LogFn$2): Promise<AssetRefreshResult[]>;
|
|
15710
15931
|
}
|
|
15711
15932
|
|
|
15712
15933
|
/**
|
|
@@ -15929,12 +16150,15 @@ interface DecodedVaultTrancheState {
|
|
|
15929
16150
|
juniorMint: unknown;
|
|
15930
16151
|
seniorMint: unknown;
|
|
15931
16152
|
seniorFixedApyBps?: unknown;
|
|
16153
|
+
juniorFloorApyBps?: unknown;
|
|
15932
16154
|
};
|
|
15933
16155
|
junior?: Record<string, unknown>;
|
|
15934
16156
|
senior?: Record<string, unknown>;
|
|
15935
16157
|
lastSettledTs?: unknown;
|
|
15936
16158
|
seniorApyAnchorSharePrice?: unknown;
|
|
15937
16159
|
seniorApyAnchorTs?: unknown;
|
|
16160
|
+
juniorApyAnchorSharePrice?: unknown;
|
|
16161
|
+
juniorApyAnchorTs?: unknown;
|
|
15938
16162
|
}
|
|
15939
16163
|
interface ConsensusHoldingSimulation {
|
|
15940
16164
|
holdingIndex: number;
|
|
@@ -16526,61 +16750,235 @@ declare class ConsensusOracleService {
|
|
|
16526
16750
|
/**
|
|
16527
16751
|
* External Liquidity Integrity Service
|
|
16528
16752
|
*
|
|
16529
|
-
*
|
|
16530
|
-
*
|
|
16531
|
-
*
|
|
16532
|
-
*
|
|
16753
|
+
* Keeps each vault holding's split between local (vault-owned token account)
|
|
16754
|
+
* and external (Marginfi) balances at its target ratio. A small share of every
|
|
16755
|
+
* holding is deliberately left local — see {@link DEFAULT_TARGET_LOCAL_BPS} —
|
|
16756
|
+
* so routine payouts can be served without a Marginfi round trip; everything
|
|
16757
|
+
* above that target is deposited into the configured external position via
|
|
16758
|
+
* `protocol_interaction` (a Marginfi deposit CPI).
|
|
16759
|
+
*
|
|
16760
|
+
* The rebalance is two-sided: when the local balance has drifted *below* the
|
|
16761
|
+
* target (deposits swept too aggressively, payouts drained the buffer) the
|
|
16762
|
+
* service withdraws the shortfall back out of Marginfi. Either leg only fires
|
|
16763
|
+
* once the drift leaves the hysteresis band around the target — see
|
|
16764
|
+
* {@link DEFAULT_REBALANCE_BAND_BPS} — so ordinary flow does not generate a
|
|
16765
|
+
* transaction per run.
|
|
16533
16766
|
*
|
|
16534
|
-
* Intended to run on a recurring schedule (every ~10 minutes) so that idle
|
|
16535
|
-
*
|
|
16767
|
+
* Intended to run on a recurring schedule (every ~10 minutes) so that the idle
|
|
16768
|
+
* buffer stays close to target and the rest keeps earning yield.
|
|
16536
16769
|
*/
|
|
16537
16770
|
|
|
16538
16771
|
interface ExternalLiquidityIntegrityResult {
|
|
16539
16772
|
vault: Address;
|
|
16540
16773
|
deposited: number;
|
|
16774
|
+
withdrawn: number;
|
|
16541
16775
|
skipped: number;
|
|
16542
16776
|
failed: number;
|
|
16543
|
-
/** Signatures of sent
|
|
16777
|
+
/** Signatures of sent rebalances (empty in dry-run mode). */
|
|
16544
16778
|
signatures: string[];
|
|
16545
16779
|
}
|
|
16546
16780
|
interface ExternalLiquidityIntegritySummary {
|
|
16547
16781
|
vaultsProcessed: number;
|
|
16548
16782
|
totalDeposited: number;
|
|
16783
|
+
totalWithdrawn: number;
|
|
16549
16784
|
totalSkipped: number;
|
|
16550
16785
|
totalFailed: number;
|
|
16551
|
-
/** True when
|
|
16786
|
+
/** True when rebalances were simulated rather than sent. */
|
|
16552
16787
|
dryRun: boolean;
|
|
16553
16788
|
}
|
|
16554
|
-
type LogFn = (msg: string) => void;
|
|
16789
|
+
type LogFn$1 = (msg: string) => void;
|
|
16555
16790
|
interface ExternalLiquidityIntegrityOptions {
|
|
16556
|
-
log?: LogFn;
|
|
16557
|
-
/** Simulate each
|
|
16791
|
+
log?: LogFn$1;
|
|
16792
|
+
/** Simulate each rebalance instead of sending it. Nothing is submitted. */
|
|
16558
16793
|
dryRun?: boolean;
|
|
16559
16794
|
/**
|
|
16560
|
-
* Skip
|
|
16795
|
+
* Skip rebalances smaller than this many UI tokens. Every mint with a
|
|
16561
16796
|
* Marginfi bank is a USD stablecoin, so the default of 1 means "ignore
|
|
16562
|
-
* dust below ~$1" and keeps the tx fee from exceeding the
|
|
16797
|
+
* dust below ~$1" and keeps the tx fee from exceeding the movement.
|
|
16563
16798
|
*/
|
|
16564
16799
|
minAmountUi?: number;
|
|
16800
|
+
/**
|
|
16801
|
+
* Share of each holding (local + external) to keep in the vault's own token
|
|
16802
|
+
* account, in basis points. Defaults to {@link DEFAULT_TARGET_LOCAL_BPS}.
|
|
16803
|
+
*/
|
|
16804
|
+
targetLocalBps?: number;
|
|
16805
|
+
/**
|
|
16806
|
+
* Hysteresis band, in basis points *of the target local amount*: the local
|
|
16807
|
+
* balance must drift at least this far from target before a rebalance is
|
|
16808
|
+
* worth a transaction. Defaults to {@link DEFAULT_REBALANCE_BAND_BPS}.
|
|
16809
|
+
*/
|
|
16810
|
+
rebalanceBandBps?: number;
|
|
16565
16811
|
}
|
|
16566
16812
|
declare const DEFAULT_MIN_AMOUNT_UI = 1;
|
|
16813
|
+
/** Keep 1% of each holding local; the remaining 99% earns yield in Marginfi. */
|
|
16814
|
+
declare const DEFAULT_TARGET_LOCAL_BPS = 100;
|
|
16815
|
+
/**
|
|
16816
|
+
* Rebalance only once the local balance has drifted more than 20% away from its
|
|
16817
|
+
* target — i.e. outside 0.8%–1.2% of the holding at the default 1% target.
|
|
16818
|
+
* Without this band every arriving deposit or payout would trigger its own
|
|
16819
|
+
* transaction; with it, each rebalance restores the exact target, so the next
|
|
16820
|
+
* one is a full band away rather than one dust movement later.
|
|
16821
|
+
*/
|
|
16822
|
+
declare const DEFAULT_REBALANCE_BAND_BPS = 2000;
|
|
16823
|
+
type RebalanceDirection = "deposit" | "withdraw";
|
|
16824
|
+
/**
|
|
16825
|
+
* Decide how to move a holding back toward its target local share.
|
|
16826
|
+
*
|
|
16827
|
+
* A rebalance fires only once the drift from target exceeds both the hysteresis
|
|
16828
|
+
* band (`rebalanceBandBps` of the target) and the `minRaw` dust floor — the band
|
|
16829
|
+
* keeps the vault from paying a transaction fee for every small deposit or
|
|
16830
|
+
* payout, the floor keeps small vaults, where the band itself is dust, quiet.
|
|
16831
|
+
* When it does fire the move restores the exact target rather than the band
|
|
16832
|
+
* edge. Withdrawals are additionally capped at the external balance.
|
|
16833
|
+
*/
|
|
16834
|
+
declare function planRebalance(params: {
|
|
16835
|
+
localAmount: bigint;
|
|
16836
|
+
externalAmount: bigint;
|
|
16837
|
+
targetLocalBps: number;
|
|
16838
|
+
rebalanceBandBps: number;
|
|
16839
|
+
minRaw: bigint;
|
|
16840
|
+
}): {
|
|
16841
|
+
direction: RebalanceDirection;
|
|
16842
|
+
amount: bigint;
|
|
16843
|
+
targetLocal: bigint;
|
|
16844
|
+
} | null;
|
|
16567
16845
|
declare class ExternalLiquidityIntegrityService {
|
|
16568
16846
|
private readonly client;
|
|
16569
16847
|
constructor(client: VaultClient);
|
|
16570
16848
|
/**
|
|
16571
|
-
* Scan all vaults and
|
|
16572
|
-
*
|
|
16849
|
+
* Scan all vaults and rebalance each holding toward its target local share.
|
|
16850
|
+
* Non-fatal per vault — errors are logged and counted.
|
|
16573
16851
|
*/
|
|
16574
16852
|
runAll(hwManager: Keypair, opts?: ExternalLiquidityIntegrityOptions): Promise<ExternalLiquidityIntegritySummary>;
|
|
16575
16853
|
/**
|
|
16576
|
-
* Process a single vault: for each active external liquidity slot,
|
|
16577
|
-
*
|
|
16854
|
+
* Process a single vault: for each active external liquidity slot, move each
|
|
16855
|
+
* holding's balance toward the target local/external split.
|
|
16578
16856
|
*/
|
|
16579
|
-
processVault(vault: Address, vaultState: VaultAccountData, hwManager: Keypair, log: LogFn, opts?: {
|
|
16857
|
+
processVault(vault: Address, vaultState: VaultAccountData, hwManager: Keypair, log: LogFn$1, opts?: {
|
|
16580
16858
|
dryRun?: boolean;
|
|
16581
16859
|
minAmountUi?: number;
|
|
16860
|
+
targetLocalBps?: number;
|
|
16861
|
+
rebalanceBandBps?: number;
|
|
16582
16862
|
}): Promise<ExternalLiquidityIntegrityResult>;
|
|
16583
|
-
|
|
16863
|
+
/**
|
|
16864
|
+
* Move `amount` of `mintAddress` between the vault's own token account and
|
|
16865
|
+
* its Marginfi position, in `direction`, through `protocol_interaction`.
|
|
16866
|
+
*/
|
|
16867
|
+
private rebalanceMarginfi;
|
|
16868
|
+
}
|
|
16869
|
+
|
|
16870
|
+
/**
|
|
16871
|
+
* Idle Liquidity Service
|
|
16872
|
+
*
|
|
16873
|
+
* Keeps a floor of idle USDC in the vault so junior withdrawals and other
|
|
16874
|
+
* payouts can be served without unwinding yield positions on demand.
|
|
16875
|
+
*
|
|
16876
|
+
* Idle USDC is measured as the USDC holding's `local_amount + external_amount`
|
|
16877
|
+
* valued at the holding price — external (Marginfi-deployed) USDC counts,
|
|
16878
|
+
* because the external-liquidity service sweeps local balances into Marginfi on
|
|
16879
|
+
* its own schedule and that liquidity is withdrawable.
|
|
16880
|
+
*
|
|
16881
|
+
* When idle USDC drops below {@link IDLE_RESERVE_FLOOR_BPS} of vault TVL, the
|
|
16882
|
+
* service swaps PST into USDC through the permissioned `jupiter_swap`
|
|
16883
|
+
* instruction, sizing the swap to land at {@link IDLE_RESERVE_TARGET_BPS} of
|
|
16884
|
+
* TVL. PST is never deployed externally, so the vault's local PST balance is
|
|
16885
|
+
* the whole swappable inventory; if it cannot cover the full top-up the run is
|
|
16886
|
+
* skipped rather than partially filled.
|
|
16887
|
+
*
|
|
16888
|
+
* Every swap is simulated before the signed transaction is submitted — the same
|
|
16889
|
+
* mandatory-simulation discipline as the `swap-pst-to-usdc` script this service
|
|
16890
|
+
* generalizes.
|
|
16891
|
+
*/
|
|
16892
|
+
|
|
16893
|
+
/** Idle USDC below this share of TVL triggers a top-up. */
|
|
16894
|
+
declare const IDLE_RESERVE_FLOOR_BPS = 400;
|
|
16895
|
+
/** Top-ups are sized to land idle USDC at this share of TVL. */
|
|
16896
|
+
declare const IDLE_RESERVE_TARGET_BPS = 500;
|
|
16897
|
+
declare const DEFAULT_SLIPPAGE_BPS = 30;
|
|
16898
|
+
declare const DEFAULT_CU_PRICE_MICRO_LAMPORTS = 10000;
|
|
16899
|
+
declare const DEFAULT_MAX_ACCOUNTS = 20;
|
|
16900
|
+
/**
|
|
16901
|
+
* Mirrors `ASSET_REBALANCE_COOLDOWN_SECS` on-chain. Swapping inside the cooldown
|
|
16902
|
+
* reverts with `AssetRebalanceRateLimitExceeded`, so the run is skipped instead.
|
|
16903
|
+
*/
|
|
16904
|
+
declare const ASSET_REBALANCE_COOLDOWN_SECS = 60;
|
|
16905
|
+
type LogFn = (msg: string) => void;
|
|
16906
|
+
/** Why a run did not swap, or that it did. */
|
|
16907
|
+
type IdleLiquidityStatus = "swapped" | "simulated" | "above-floor" | "insufficient-pst" | "rebalance-cooldown" | "rebalance-limit" | "missing-holding" | "stale-price" | "no-tvl" | "failed";
|
|
16908
|
+
interface IdleLiquidityResult {
|
|
16909
|
+
vault: Address;
|
|
16910
|
+
status: IdleLiquidityStatus;
|
|
16911
|
+
/** Human-readable detail for the status, always populated. */
|
|
16912
|
+
reason: string;
|
|
16913
|
+
/** Vault TVL in accounting units. */
|
|
16914
|
+
tvl: bigint;
|
|
16915
|
+
/** Idle USDC (local + external) valued in accounting units. */
|
|
16916
|
+
idleValue: bigint;
|
|
16917
|
+
/** Idle USDC as a share of TVL, in bps. */
|
|
16918
|
+
idleBps: number;
|
|
16919
|
+
/** USDC the swap needs to produce to reach the target, in raw USDC units. */
|
|
16920
|
+
shortfallUsdc: bigint;
|
|
16921
|
+
/** PST spent (0 unless a swap was executed or simulated). */
|
|
16922
|
+
pstSpent: bigint;
|
|
16923
|
+
/** USDC received (0 unless a swap was executed or simulated). */
|
|
16924
|
+
usdcReceived: bigint;
|
|
16925
|
+
signature?: string;
|
|
16926
|
+
}
|
|
16927
|
+
interface IdleLiquidityOptions {
|
|
16928
|
+
log?: LogFn;
|
|
16929
|
+
/** Simulate the swap and stop; nothing is submitted. */
|
|
16930
|
+
dryRun?: boolean;
|
|
16931
|
+
/** Jupiter slippage tolerance for the top-up quote. */
|
|
16932
|
+
slippageBps?: number;
|
|
16933
|
+
/** Priority fee. Set to 0 to omit the compute-unit-price instruction. */
|
|
16934
|
+
cuPriceMicroLamports?: number;
|
|
16935
|
+
/**
|
|
16936
|
+
* Cap on a single swap's PST input, in raw units. Useful to bound price
|
|
16937
|
+
* impact when the shortfall is large; the deficit closes over several runs.
|
|
16938
|
+
*/
|
|
16939
|
+
maxPstInput?: bigint;
|
|
16940
|
+
}
|
|
16941
|
+
declare class IdleLiquidityService {
|
|
16942
|
+
private readonly client;
|
|
16943
|
+
constructor(client: VaultClient);
|
|
16944
|
+
/** Current unix time in seconds (override in tests). */
|
|
16945
|
+
protected now(): number;
|
|
16946
|
+
/**
|
|
16947
|
+
* Top up the vault's idle USDC reserve if it has fallen below the floor.
|
|
16948
|
+
* Never throws for an expected no-op — inspect `status` on the result.
|
|
16949
|
+
*/
|
|
16950
|
+
run(vault: Address, hwManager: Keypair, opts?: IdleLiquidityOptions): Promise<IdleLiquidityResult>;
|
|
16951
|
+
/**
|
|
16952
|
+
* Decide whether a top-up is warranted. Returns either a terminal `result`
|
|
16953
|
+
* (nothing to do) or the holdings and sizing needed to build the swap.
|
|
16954
|
+
*/
|
|
16955
|
+
private assess;
|
|
16956
|
+
/**
|
|
16957
|
+
* Value still chargeable against the vault's rolling rebalance window, in
|
|
16958
|
+
* accounting units. `undefined` when the cap is disabled (unlimited).
|
|
16959
|
+
*/
|
|
16960
|
+
private remainingRebalanceAllowance;
|
|
16961
|
+
/**
|
|
16962
|
+
* PST input that buys `shortfallUsdc` at the holdings' recorded prices.
|
|
16963
|
+
* Both prices share the vault's accounting unit, so this is a straight
|
|
16964
|
+
* value conversion; slippage is absorbed by landing slightly under target.
|
|
16965
|
+
*/
|
|
16966
|
+
private sizePstInput;
|
|
16967
|
+
private stalenessThresholdSecs;
|
|
16968
|
+
/**
|
|
16969
|
+
* Token program owning a mint. Read from the chain rather than from the
|
|
16970
|
+
* holding's enum so a Token-2022 mint can never be passed to the classic
|
|
16971
|
+
* program (and vice versa).
|
|
16972
|
+
*/
|
|
16973
|
+
private mintTokenProgram;
|
|
16974
|
+
/**
|
|
16975
|
+
* Build, simulate, and (unless `dryRun`) submit the `jupiter_swap`.
|
|
16976
|
+
*
|
|
16977
|
+
* Built as a versioned transaction here rather than through
|
|
16978
|
+
* `client.sendTransaction`, because a Jupiter route needs address lookup
|
|
16979
|
+
* tables and a raised compute-unit limit to fit.
|
|
16980
|
+
*/
|
|
16981
|
+
private executeSwap;
|
|
16584
16982
|
}
|
|
16585
16983
|
|
|
16586
|
-
export { ASSET_DECIMALS, type AccountBalanceResponse, AccountClient, type AccountYieldResponse, ActivateCircuitBreakerBuilder, type ActivateCircuitBreakerIxArgs, type ActivateCircuitBreakerTxArgs, type AssetPriceOracleConfigIxArgs, type AssetPriceOracleConfigTxArgs, type AssetPriceRefreshTarget, type AssetRefreshResult, type Bankineco, type BasicAuthCredentials, type Bigintish, CONSENSUS_ORACLE_VARIANT, CancelJuniorTrancheWithdrawBuilder, type CancelJuniorTrancheWithdrawIxArgs, type CancelJuniorTrancheWithdrawTxArgs, type Clock, type CollectSamplesOptions, type ConsensusAssetUpdate, type ConsensusHoldingEntry, type ConsensusHoldingSimulation, type ConsensusOracleDeps, type ConsensusOracleHoldingConfig, ConsensusOracleService, type ConsensusOracleTarget, CrankNavBuilder, type CrankNavIxArgs, type CrankNavTxArgs, CrankPerformanceFeesBuilder, type CrankPerformanceFeesIxArgs, type CrankPerformanceFeesTxArgs, type CreateAccountParams, CreateAssetHoldingBuilder, type CreateAssetHoldingIxArgs, type CreateAssetHoldingTxArgs, type CreateTokenMintIxs, CreateTrancheStateBuilder, type CreateTrancheStateIxArgs, type CreateTrancheStateTxArgs, CreateVaultBuilder, type CreateVaultClientOptions, type CreateVaultIxArgs, type CreateVaultParams, type CreateVaultTxArgs, type CreateYieldPaymentParams, DEFAULT_JUNIOR_EARLY_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_STANDARD_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_WITHDRAWAL_LOCKUP_SECS, DEFAULT_MAX_ACCEPTABLE_APY_BPS, DEFAULT_MIN_AMOUNT_UI, DEFAULT_ORACLE_STALENESS_THRESHOLD_SECS, DEFAULT_PRICE_ORACLE_ACCOUNT, DEFAULT_PRICE_STALENESS_SECS, DEFAULT_PRICE_STALENESS_THRESHOLD_SECS, DEFAULT_VAULT_ID, type DecodedHolding, type DecodedVault, type DecodedVaultTrancheState, type DeleteAccountParams, DisableCircuitBreakerBuilder, type DisableCircuitBreakerIxArgs, type DisableCircuitBreakerTxArgs, EXTERNAL_POSITION_SAMPLES, ExecuteDepositBuilder, type ExecuteDepositIxArgs, type ExecuteDepositTxArgs, ExecuteShareSwapBuilder, type ExecuteShareSwapIxArgs, type ExecuteShareSwapTxArgs, ExecuteTrancheDepositBuilder, type ExecuteTrancheDepositIxArgs, type ExecuteTrancheDepositTxArgs, ExecuteTrancheWithdrawBuilder, type ExecuteTrancheWithdrawIxArgs, type ExecuteTrancheWithdrawTxArgs, ExecuteWithdrawBuilder, type ExecuteWithdrawIxArgs, type ExecuteWithdrawTxArgs, type ExternalLiquidityIntegrityOptions, type ExternalLiquidityIntegrityResult, ExternalLiquidityIntegrityService, type ExternalLiquidityIntegritySummary, type ExternalLiquiditySlot, type ExternalLiquiditySourceArgs, type ExternalPosition, type ExternalPositionContext, type ExternalPositionProvider, type ExternalPositionRef, ExternalPositionRegistry, FEE_VAULT_CACHE_CATEGORY, type FeeVaultAccountData, type FetchNestTokenPriceOptions, FulfillJuniorTrancheWithdrawBuilder, type FulfillJuniorTrancheWithdrawIxArgs, type FulfillJuniorTrancheWithdrawTxArgs, type FulfillSummary, type HoldingNavContribution, type HoldingUpdatePreview, IDL, InitializeVaultRolesBuilder, type InitializeVaultRolesIxArgs, type InitializeVaultRolesTxArgs, type JuniorWithdrawalMode, JupiterBalanceSource, type JupiterBalanceSourceOptions, JupiterPriceSource, type JupiterPriceSourceOptions, JupiterSwapBuilder, type JupiterSwapIxArgs, type JupiterSwapTxArgs, KaminoPositionProvider, LIVE_ORACLE_VARIANTS, LIVE_PRICE_REFRESH_INTERVAL_SECS, LOCAL_PROTOCOL_ADMIN, type LiveConsensusOracleDepsOptions, LivePriceSource, type LivePriceSourceOptions, MAX_CONSENSUS_SIGNERS, MAX_PRICE_STALENESS_THRESHOLD_SECS, MIN_EXTERNAL_POSITION_SAMPLES, ManagerRedepositAssetBuilder, type ManagerRedepositAssetIxArgs, type ManagerRedepositAssetTxArgs, ManagerWithdrawAssetBuilder, type ManagerWithdrawAssetIxArgs, type ManagerWithdrawAssetTxArgs, MarginfiPositionProvider, type MockYieldAccountConfig, MockYieldTracker, type MockYieldTrackerOptions, NEST_RWA_SHARE_MINT, NEST_VAULT_SLUG, type NavCrankBlocker, type NavCrankBlockerReason, type NavCrankReadiness, type NavCrankResult, NestPriceSource, type NestPriceSourceOptions, ORACLE_ENTRIES_OFFSET, ORACLE_ENTRY_SIZE, ORACLE_SETTLED_NAV_TS_OFFSET, OracleService, PRICE_ORACLE_TYPES_BY_INDEX, PROGRAM_FEE_EXEMPT_OWNER_WHITELIST, PROTOCOL_ADMIN, PROTOCOL_FEE_RECIPIENT, PdaClient, type PreparedDirectTransaction, type PreparedSquadsTransaction, type PreparedVaultTransaction, type PriceOracleTypeArgs, type PriceSource, ProtocolInteractionBuilder, type ProtocolInteractionIxArgs, type ProtocolInteractionTxArgs, type QuoteFeeUnit, REPORTABLE_ORACLE_VARIANTS, type RefreshLiveOraclePricesParams, RemoveAssetHoldingBuilder, type RemoveAssetHoldingIxArgs, type RemoveAssetHoldingTxArgs, RequestJuniorTrancheWithdrawBuilder, type RequestJuniorTrancheWithdrawIxArgs, type RequestJuniorTrancheWithdrawTxArgs, type ResolvedSquadsWalletRoute, type RollingLimitConfig, type RunLiveConsensusOracleOptions, type RunOptions, type RunSummary, SHARE_DECIMALS, SYSTEM_PROGRAM, SetAssetPriceOracleBuilder, type SetAssetPriceOracleIxArgs, type SetAssetPriceOracleTxArgs, SetExternalLiquidityBuilder, type SetExternalLiquidityIxArgs, type SetExternalLiquidityTxArgs, SetProtocolFeeBuilder, type SetProtocolFeeIxArgs, type SetProtocolFeeTxArgs, SetVaultConfigBuilder, type SetVaultConfigIxArgs, type SetVaultConfigTxArgs, type SettleVaultParams, type SettleVaultResult, type SettlementSimulation, type SettlementSimulationSnapshot, type SimulateDryRunSettlementParams, type SimulateSettlementArgs, type SimulatedShareClass, type SquadsWalletRouteConfig, StaticPositionProvider, TOKEN_PROGRAM, TOKEN_PROGRAM_ID, type TrancheKindArgs, type TransactionBuilder, TransactionClient, USDC_MINT, USD_STAR_JUNIOR_MINT, USD_STAR_MINT, USD_STAR_PRINCIPAL_MINT, type UpdateAccountParams, UpdateAssetPriceBuilder, type UpdateAssetPriceIxArgs, type UpdateAssetPriceTxArgs, UpdateConsensusOracleBuilder, type UpdateConsensusOracleIxArgs, type UpdateConsensusOracleTxArgs, UpdateConsensusSignersBuilder, type UpdateConsensusSignersIxArgs, type UpdateConsensusSignersTxArgs, type UpdateDynamicAprParams, UpdateTrancheConfigBuilder, type UpdateTrancheConfigIxArgs, type UpdateTrancheConfigTxArgs, VAULT_CACHE_CATEGORY, VAULT_CREATOR_WHITELIST, VAULT_ENVIRONMENTS, VAULT_ORACLE_CACHE_CATEGORY, VAULT_PROGRAM_ID, VAULT_PROGRAM_IDS, VAULT_PROGRAM_PUBLIC_KEY, VAULT_ROLE_UPDATE_TIMELOCK_SECS, VAULT_TRANCHE_STATE_CACHE_CATEGORY, VAULT_TRANCHE_WITHDRAWAL_QUEUE_CACHE_CATEGORY, type Vault, type VaultAccountData, VaultBuilderBase, type VaultBuilderContext, type VaultCacheInvalidation, VaultClient, type VaultClientBundle, type VaultEnv, type VaultOracleAccountData, type VaultOracleResult, type VaultPricingInputs, type VaultQuote, type VaultQuoteArgs, VaultQuoteClient, type VaultQuoteDirection, type VaultQuoteShareClass, VaultReallocationBuilder, type VaultReallocationIxArgs, type VaultReallocationTxArgs, type VaultTrancheStateAccountData, type VaultTrancheWithdrawalQueueAccountData, type VaultTransactionPlan, type WalletBalanceSource, type WithdrawProtocolFeesIxArgs, type WithdrawProtocolFeesTxArgs, type WithdrawTrancheFeesIxArgs, type WithdrawTrancheFeesTxArgs, WithdrawalQueueService, type WithdrawalQueueSnapshot, type YieldAccount, type YieldAccountSnapshot, type YieldCalculationLog, type YieldPaymentResponse, type YieldPaymentSnapshot, type YieldTracker, accountingUnitPriceToUsd, addCashflowUpdate, applyEffectiveApy, assertNoUnconfirmedYieldPayments, buildHoldingUpdate, buildUpdates, coerceBool, collectSamples, confirmYieldPayment, createAccount, createLiveConsensusOracleDeps, createRpcFromConnection, createTokenMint, createTokenMintIxs, createVaultClient, createYieldPayment, dateToStr, defaultKeypairPath, deleteAccount, discoverVaultsForSigner, fetchExternalPositions, fetchNestTokenPrice, fetchReceiptMints, filterTargetHoldings, findSquadsWalletRoute, formatSettlementSimulation, fromUiAmount, gatherPricingInputs, getAccounts, getBalance, getCashflows, getRpcUrl, getTotalOutstandingYield, getTotalYield, getVaultProgramId, getYield, getYieldPayments, indexConfigByMint, isVaultEnv, keypairAddress, loadKeypair, logProspectiveApy, makeProvider, mintTokensTo, mostFrequent, parseExternalLiquidityRefs, prepareVaultTransaction, priceInAccountingUnit, readI64LE, readSplMintSupply, refreshLiveOraclePrices, resolveKeypairPath, resolveSquadsWalletRoute, resolveTrackedAmounts, roundToNextUtcMidnight, runLiveConsensusOracle, selectReportableHoldings, settleVault, signerInOracleData, simulateConsensusOracleSettlement, simulateDryRunSettlement, sumPositionsByMint, systemClock, toBigInt, toUiAmount, updateAccount, updateDynamicApr, validateSquadsWalletRoutes, variantName, vaultAuthorityForWallet, withDiscoveredYieldAccounts };
|
|
16984
|
+
export { ASSET_DECIMALS, ASSET_REBALANCE_COOLDOWN_SECS, type AccountBalanceResponse, AccountClient, type AccountYieldResponse, ActivateCircuitBreakerBuilder, type ActivateCircuitBreakerIxArgs, type ActivateCircuitBreakerTxArgs, type AssetPriceOracleConfigIxArgs, type AssetPriceOracleConfigTxArgs, type AssetPriceRefreshTarget, type AssetRefreshResult, type Bankineco, type BasicAuthCredentials, type Bigintish, CONSENSUS_ORACLE_VARIANT, CancelJuniorTrancheWithdrawBuilder, type CancelJuniorTrancheWithdrawIxArgs, type CancelJuniorTrancheWithdrawTxArgs, type Clock, type CollectSamplesOptions, type ConsensusAssetUpdate, type ConsensusHoldingEntry, type ConsensusHoldingSimulation, type ConsensusOracleDeps, type ConsensusOracleHoldingConfig, ConsensusOracleService, type ConsensusOracleTarget, CrankNavBuilder, type CrankNavIxArgs, type CrankNavTxArgs, CrankPerformanceFeesBuilder, type CrankPerformanceFeesIxArgs, type CrankPerformanceFeesTxArgs, type CreateAccountParams, CreateAssetHoldingBuilder, type CreateAssetHoldingIxArgs, type CreateAssetHoldingTxArgs, type CreateTokenMintIxs, CreateTrancheStateBuilder, type CreateTrancheStateIxArgs, type CreateTrancheStateTxArgs, CreateVaultBuilder, type CreateVaultClientOptions, type CreateVaultIxArgs, type CreateVaultParams, type CreateVaultTxArgs, type CreateYieldPaymentParams, DEFAULT_CU_PRICE_MICRO_LAMPORTS, DEFAULT_JUNIOR_EARLY_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_STANDARD_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_WITHDRAWAL_LOCKUP_SECS, DEFAULT_MAX_ACCEPTABLE_APY_BPS, DEFAULT_MAX_ACCOUNTS, 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_VAULT_ID, type DecodedHolding, type DecodedVault, type DecodedVaultTrancheState, type DeleteAccountParams, DisableCircuitBreakerBuilder, type DisableCircuitBreakerIxArgs, type DisableCircuitBreakerTxArgs, EXTERNAL_POSITION_SAMPLES, ExecuteDepositBuilder, type ExecuteDepositIxArgs, type ExecuteDepositTxArgs, ExecuteShareSwapBuilder, type ExecuteShareSwapIxArgs, type ExecuteShareSwapTxArgs, ExecuteTrancheDepositBuilder, type ExecuteTrancheDepositIxArgs, type ExecuteTrancheDepositTxArgs, ExecuteTrancheWithdrawBuilder, type ExecuteTrancheWithdrawIxArgs, type ExecuteTrancheWithdrawTxArgs, ExecuteWithdrawBuilder, type ExecuteWithdrawIxArgs, type ExecuteWithdrawTxArgs, type ExternalLiquidityIntegrityOptions, type ExternalLiquidityIntegrityResult, ExternalLiquidityIntegrityService, type ExternalLiquidityIntegritySummary, type ExternalLiquiditySlot, type ExternalLiquiditySourceArgs, type ExternalPosition, type ExternalPositionContext, type ExternalPositionProvider, type ExternalPositionRef, ExternalPositionRegistry, FEE_VAULT_CACHE_CATEGORY, type FeeVaultAccountData, type FetchNestTokenPriceOptions, FulfillJuniorTrancheWithdrawBuilder, type FulfillJuniorTrancheWithdrawIxArgs, type FulfillJuniorTrancheWithdrawTxArgs, type FulfillSummary, type HoldingNavContribution, type HoldingUpdatePreview, IDL, IDLE_RESERVE_FLOOR_BPS, IDLE_RESERVE_TARGET_BPS, type IdleLiquidityOptions, type IdleLiquidityResult, IdleLiquidityService, type IdleLiquidityStatus, InitializeVaultRolesBuilder, type InitializeVaultRolesIxArgs, type InitializeVaultRolesTxArgs, type JuniorWithdrawalMode, JupiterBalanceSource, type JupiterBalanceSourceOptions, JupiterPriceSource, type JupiterPriceSourceOptions, JupiterSwapBuilder, type JupiterSwapIxArgs, type JupiterSwapTxArgs, KaminoPositionProvider, LIVE_ORACLE_VARIANTS, LIVE_PRICE_REFRESH_INTERVAL_SECS, LOCAL_PROTOCOL_ADMIN, type LiveConsensusOracleDepsOptions, LivePriceSource, type LivePriceSourceOptions, MAX_CONSENSUS_SIGNERS, MAX_PRICE_STALENESS_THRESHOLD_SECS, MIN_EXTERNAL_POSITION_SAMPLES, ManagerRedepositAssetBuilder, type ManagerRedepositAssetIxArgs, type ManagerRedepositAssetTxArgs, ManagerWithdrawAssetBuilder, type ManagerWithdrawAssetIxArgs, type ManagerWithdrawAssetTxArgs, MarginfiPositionProvider, type MockYieldAccountConfig, MockYieldTracker, type MockYieldTrackerOptions, NEST_RWA_SHARE_MINT, NEST_VAULT_SLUG, type NavCrankBlocker, type NavCrankBlockerReason, type NavCrankReadiness, type NavCrankResult, NestPriceSource, type NestPriceSourceOptions, ORACLE_ENTRIES_OFFSET, ORACLE_ENTRY_SIZE, ORACLE_SETTLED_NAV_TS_OFFSET, OracleService, PRICE_ORACLE_TYPES_BY_INDEX, PROGRAM_FEE_EXEMPT_OWNER_WHITELIST, PROTOCOL_ADMIN, PROTOCOL_FEE_RECIPIENT, PdaClient, type PreparedDirectTransaction, type PreparedSquadsTransaction, type PreparedVaultTransaction, type PriceOracleTypeArgs, type PriceSource, ProtocolInteractionBuilder, type ProtocolInteractionIxArgs, type ProtocolInteractionTxArgs, type QuoteFeeUnit, REPORTABLE_ORACLE_VARIANTS, type RefreshLiveOraclePricesParams, RemoveAssetHoldingBuilder, type RemoveAssetHoldingIxArgs, type RemoveAssetHoldingTxArgs, RequestJuniorTrancheWithdrawBuilder, type RequestJuniorTrancheWithdrawIxArgs, type RequestJuniorTrancheWithdrawTxArgs, type ResolvedSquadsWalletRoute, type RollingLimitConfig, type RollingRebalanceLimitConfig, type RunLiveConsensusOracleOptions, type RunOptions, type RunSummary, SHARE_DECIMALS, SYSTEM_PROGRAM, SetAssetPriceOracleBuilder, type SetAssetPriceOracleIxArgs, type SetAssetPriceOracleTxArgs, SetExternalLiquidityBuilder, type SetExternalLiquidityIxArgs, type SetExternalLiquidityTxArgs, SetProtocolFeeBuilder, type SetProtocolFeeIxArgs, type SetProtocolFeeTxArgs, SetVaultConfigBuilder, type SetVaultConfigIxArgs, type SetVaultConfigTxArgs, type SettleVaultParams, type SettleVaultResult, type SettlementSimulation, type SettlementSimulationSnapshot, type SimulateDryRunSettlementParams, type SimulateSettlementArgs, type SimulatedShareClass, type SquadsWalletRouteConfig, StaticPositionProvider, TOKEN_PROGRAM, TOKEN_PROGRAM_ID, type TrancheKindArgs, type TransactionBuilder, TransactionClient, USDC_MINT, USD_STAR_JUNIOR_MINT, USD_STAR_MINT, USD_STAR_PRINCIPAL_MINT, type UpdateAccountParams, UpdateAssetPriceBuilder, type UpdateAssetPriceIxArgs, type UpdateAssetPriceTxArgs, UpdateConsensusOracleBuilder, type UpdateConsensusOracleIxArgs, type UpdateConsensusOracleTxArgs, UpdateConsensusSignersBuilder, type UpdateConsensusSignersIxArgs, type UpdateConsensusSignersTxArgs, type UpdateDynamicAprParams, UpdateTrancheConfigBuilder, type UpdateTrancheConfigIxArgs, type UpdateTrancheConfigTxArgs, VAULT_CACHE_CATEGORY, VAULT_CREATOR_WHITELIST, VAULT_ENVIRONMENTS, VAULT_ORACLE_CACHE_CATEGORY, VAULT_PROGRAM_ID, VAULT_PROGRAM_IDS, VAULT_PROGRAM_PUBLIC_KEY, VAULT_ROLE_UPDATE_TIMELOCK_SECS, VAULT_TRANCHE_STATE_CACHE_CATEGORY, VAULT_TRANCHE_WITHDRAWAL_QUEUE_CACHE_CATEGORY, type Vault, type VaultAccountData, VaultBuilderBase, type VaultBuilderContext, type VaultCacheInvalidation, VaultClient, type VaultClientBundle, type VaultEnv, type VaultOracleAccountData, type VaultOracleResult, type VaultPricingInputs, type VaultQuote, type VaultQuoteArgs, VaultQuoteClient, type VaultQuoteDirection, type VaultQuoteShareClass, VaultReallocationBuilder, type VaultReallocationIxArgs, type VaultReallocationTxArgs, type VaultTrancheStateAccountData, type VaultTrancheWithdrawalQueueAccountData, type VaultTransactionPlan, type WalletBalanceSource, type WithdrawProtocolFeesIxArgs, type WithdrawProtocolFeesTxArgs, type WithdrawTrancheFeesIxArgs, type WithdrawTrancheFeesTxArgs, WithdrawalQueueService, type WithdrawalQueueSnapshot, type YieldAccount, type YieldAccountSnapshot, type YieldCalculationLog, type YieldPaymentResponse, type YieldPaymentSnapshot, type YieldTracker, accountingUnitPriceToUsd, addCashflowUpdate, applyEffectiveApy, assertNoUnconfirmedYieldPayments, buildHoldingUpdate, buildUpdates, coerceBool, collectSamples, confirmYieldPayment, createAccount, createLiveConsensusOracleDeps, createRpcFromConnection, createTokenMint, createTokenMintIxs, createVaultClient, createYieldPayment, dateToStr, defaultKeypairPath, deleteAccount, discoverVaultsForSigner, fetchExternalPositions, fetchNestTokenPrice, fetchReceiptMints, filterTargetHoldings, findSquadsWalletRoute, formatSettlementSimulation, fromUiAmount, gatherPricingInputs, getAccounts, getBalance, getCashflows, getRpcUrl, getTotalOutstandingYield, getTotalYield, getVaultProgramId, getYield, getYieldPayments, indexConfigByMint, isVaultEnv, keypairAddress, loadKeypair, logProspectiveApy, makeProvider, mintTokensTo, mostFrequent, parseExternalLiquidityRefs, planRebalance, prepareVaultTransaction, priceInAccountingUnit, readI64LE, readSplMintSupply, refreshLiveOraclePrices, resolveKeypairPath, resolveSquadsWalletRoute, resolveTrackedAmounts, roundToNextUtcMidnight, runLiveConsensusOracle, selectReportableHoldings, settleVault, signerInOracleData, simulateConsensusOracleSettlement, simulateDryRunSettlement, sumPositionsByMint, systemClock, toBigInt, toUiAmount, updateAccount, updateDynamicApr, validateSquadsWalletRoutes, variantName, vaultAuthorityForWallet, withDiscoveredYieldAccounts };
|