@perena/vault-sdk 1.0.20 → 1.0.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as _solana_kit from '@solana/kit';
2
2
  import { Address, ProgramDerivedAddressBump, Rpc, SolanaRpcApi, Instruction } from '@solana/kit';
3
3
  export { address } from '@solana/kit';
4
4
  import * as _solana_web3_js from '@solana/web3.js';
5
- import { PublicKey, Connection, Keypair, TransactionInstruction } from '@solana/web3.js';
5
+ import { PublicKey, Connection, Keypair, Transaction, TransactionInstruction } from '@solana/web3.js';
6
6
  import * as _anchor_lang_core from '@anchor-lang/core';
7
7
  import { Program, IdlAccounts, BN, AnchorProvider } from '@anchor-lang/core';
8
8
  import * as common from 'common';
@@ -16,15 +16,15 @@ declare const VAULT_PROGRAM_PUBLIC_KEY: PublicKey;
16
16
  * vault's protocol performance fee (via `setProtocolFee`). Must match
17
17
  * `PROTOCOL_ADMIN` in the on-chain program constants.
18
18
  *
19
- * This is the `local`-feature dev wallet, matching the localnet program build.
20
- * TODO: replace with the real protocol admin wallet for production (in lockstep
21
- * with the non-`local` program constant).
19
+ * This is the production Squads vault, matching the non-local program build.
22
20
  */
23
21
  declare const PROTOCOL_ADMIN: Address;
22
+ /** Protocol admin compiled into the local-feature program for integration tests. */
23
+ declare const LOCAL_PROTOCOL_ADMIN: Address;
24
24
  /**
25
- * Hardcoded wallet that receives all protocol performance fees when accrued
26
- * fees are swept via `crankPerformanceFees`. Must match `PROTOCOL_FEE_RECIPIENT`
27
- * in the on-chain program constants.
25
+ * Hardcoded wallet that receives protocol fee shares when pending shares are
26
+ * minted via `crankPerformanceFees`. Must match `PROTOCOL_FEE_RECIPIENT` in the
27
+ * on-chain program constants.
28
28
  */
29
29
  declare const PROTOCOL_FEE_RECIPIENT: Address;
30
30
  declare const PROGRAM_FEE_EXEMPT_OWNER_WHITELIST: readonly Address[];
@@ -37,9 +37,7 @@ declare const PROGRAM_FEE_EXEMPT_OWNER_WHITELIST: readonly Address[];
37
37
  * every id and DoSing the protocol. Only enforced in non-`local` program builds
38
38
  * (production / staging); `local` test builds bypass it.
39
39
  *
40
- * TODO: replace the placeholder entry (the System Program id — a safe, unusable
41
- * placeholder) with the real curator wallet(s) for production, in lockstep with
42
- * the non-`local` program constant.
40
+ * Keep this list in lockstep with the non-`local` program constant.
43
41
  */
44
42
  declare const VAULT_CREATOR_WHITELIST: Address[];
45
43
  declare const TOKEN_PROGRAM_ID: Address;
@@ -277,8 +275,7 @@ type Bankineco = {
277
275
  {
278
276
  "name": "feeAssetMint";
279
277
  "docs": [
280
- "Base-asset mint used to pay performance fees on settlement. Must match",
281
- "an `is_base` holding; choose a mint whose vault ATA has liquidity."
278
+ "Legacy fee-asset account retained in this instruction's account schema."
282
279
  ];
283
280
  },
284
281
  {
@@ -341,7 +338,7 @@ type Bankineco = {
341
338
  {
342
339
  "name": "feeVault";
343
340
  "docs": [
344
- "Per-vault fee-vault PDA: token authority + accounting for accrued fees."
341
+ "Legacy fee-vault account retained in this instruction's account schema."
345
342
  ];
346
343
  "writable": true;
347
344
  },
@@ -436,83 +433,17 @@ type Bankineco = {
436
433
  },
437
434
  {
438
435
  "name": "vault";
439
- },
440
- {
441
- "name": "feeAssetMint";
442
- "docs": [
443
- "Vault base asset whose fee-vault ATA should be swept. Must match an",
444
- "`is_base` holding with a fresh price."
445
- ];
446
- },
447
- {
448
- "name": "feeVault";
449
- "docs": [
450
- "Per-vault fee-vault PDA: token authority + accounting for accrued fees."
451
- ];
452
436
  "writable": true;
453
437
  },
454
438
  {
455
- "name": "feeVaultAta";
439
+ "name": "shareMint";
456
440
  "writable": true;
457
- "pda": {
458
- "seeds": [
459
- {
460
- "kind": "account";
461
- "path": "feeVault";
462
- },
463
- {
464
- "kind": "account";
465
- "path": "feeAssetTokenProgram";
466
- },
467
- {
468
- "kind": "account";
469
- "path": "feeAssetMint";
470
- }
471
- ];
472
- "program": {
473
- "kind": "const";
474
- "value": [
475
- 140,
476
- 151,
477
- 37,
478
- 143,
479
- 78,
480
- 36,
481
- 137,
482
- 241,
483
- 187,
484
- 61,
485
- 16,
486
- 41,
487
- 20,
488
- 142,
489
- 13,
490
- 131,
491
- 11,
492
- 90,
493
- 19,
494
- 153,
495
- 218,
496
- 255,
497
- 16,
498
- 132,
499
- 4,
500
- 142,
501
- 123,
502
- 216,
503
- 219,
504
- 233,
505
- 248,
506
- 89
507
- ];
508
- };
509
- };
510
441
  },
511
442
  {
512
443
  "name": "feeCollector";
513
444
  },
514
445
  {
515
- "name": "feeCollectorFeeAssetAta";
446
+ "name": "feeCollectorShareAta";
516
447
  "writable": true;
517
448
  "pda": {
518
449
  "seeds": [
@@ -522,11 +453,11 @@ type Bankineco = {
522
453
  },
523
454
  {
524
455
  "kind": "account";
525
- "path": "feeAssetTokenProgram";
456
+ "path": "shareTokenProgram";
526
457
  },
527
458
  {
528
459
  "kind": "account";
529
- "path": "feeAssetMint";
460
+ "path": "shareMint";
530
461
  }
531
462
  ];
532
463
  "program": {
@@ -572,7 +503,7 @@ type Bankineco = {
572
503
  "name": "protocolFeeCollector";
573
504
  },
574
505
  {
575
- "name": "protocolFeeCollectorFeeAssetAta";
506
+ "name": "protocolFeeCollectorShareAta";
576
507
  "writable": true;
577
508
  "pda": {
578
509
  "seeds": [
@@ -582,11 +513,11 @@ type Bankineco = {
582
513
  },
583
514
  {
584
515
  "kind": "account";
585
- "path": "feeAssetTokenProgram";
516
+ "path": "shareTokenProgram";
586
517
  },
587
518
  {
588
519
  "kind": "account";
589
- "path": "feeAssetMint";
520
+ "path": "shareMint";
590
521
  }
591
522
  ];
592
523
  "program": {
@@ -629,7 +560,7 @@ type Bankineco = {
629
560
  };
630
561
  },
631
562
  {
632
- "name": "feeAssetTokenProgram";
563
+ "name": "shareTokenProgram";
633
564
  },
634
565
  {
635
566
  "name": "associatedTokenProgram";
@@ -1512,7 +1443,9 @@ type Bankineco = {
1512
1443
  {
1513
1444
  "name": "shareMint";
1514
1445
  "docs": [
1515
- "Curator-supplied share mint. Its decimals must match `asset_mint`.",
1446
+ "Curator-supplied share mint. Its decimals define the vault accounting",
1447
+ "precision. `asset_mint` may use a different precision, which is stored",
1448
+ "on its holding and handled by holding-price conversion.",
1516
1449
  "Unless `for_migration`, it must have zero supply with mint authority on",
1517
1450
  "the curator; authority is transferred to the vault PDA on success.",
1518
1451
  "Migration uses the legacy bank mint and defers transfer."
@@ -1736,8 +1669,8 @@ type Bankineco = {
1736
1669
  {
1737
1670
  "name": "feeVault";
1738
1671
  "docs": [
1739
- "Per-vault fee-vault PDA: token authority + accounting. The mint fee",
1740
- "accrues here and is swept to the fee collector by the permissionless crank."
1672
+ "Legacy fee-vault account retained in this instruction's account schema.",
1673
+ "New fees accrue as pending vault shares."
1741
1674
  ];
1742
1675
  "writable": true;
1743
1676
  },
@@ -2031,8 +1964,8 @@ type Bankineco = {
2031
1964
  {
2032
1965
  "name": "feeVault";
2033
1966
  "docs": [
2034
- "Per-vault fee-vault PDA: token authority + accounting. The mint fee",
2035
- "accrues here and is swept to the fee collector by the permissionless crank."
1967
+ "Legacy fee-vault account retained in this instruction's account schema.",
1968
+ "New fees accrue as pending vault shares."
2036
1969
  ];
2037
1970
  "writable": true;
2038
1971
  },
@@ -2527,8 +2460,8 @@ type Bankineco = {
2527
2460
  {
2528
2461
  "name": "feeVault";
2529
2462
  "docs": [
2530
- "Per-vault fee-vault PDA: token authority + accounting. Mint fees",
2531
- "accrue here and are swept by the permissionless fee crank."
2463
+ "Legacy fee-vault account retained in this instruction's account schema.",
2464
+ "New fees accrue as pending vault shares."
2532
2465
  ];
2533
2466
  "writable": true;
2534
2467
  },
@@ -2829,8 +2762,8 @@ type Bankineco = {
2829
2762
  {
2830
2763
  "name": "feeVault";
2831
2764
  "docs": [
2832
- "Per-vault fee-vault PDA: token authority + accounting. Mint fees",
2833
- "accrue here and are swept by the permissionless fee crank."
2765
+ "Legacy fee-vault account retained in this instruction's account schema.",
2766
+ "New fees accrue as pending vault shares."
2834
2767
  ];
2835
2768
  "writable": true;
2836
2769
  },
@@ -3620,8 +3553,8 @@ type Bankineco = {
3620
3553
  {
3621
3554
  "name": "feeVault";
3622
3555
  "docs": [
3623
- "Per-vault fee-vault PDA: token authority + accounting. The burn fee accrues",
3624
- "here and is swept to the fee collector by the permissionless crank."
3556
+ "Legacy fee-vault account retained in this instruction's account schema.",
3557
+ "New fees accrue as pending vault shares."
3625
3558
  ];
3626
3559
  "writable": true;
3627
3560
  },
@@ -3909,8 +3842,8 @@ type Bankineco = {
3909
3842
  {
3910
3843
  "name": "feeVault";
3911
3844
  "docs": [
3912
- "Per-vault fee-vault PDA: token authority + accounting. The burn fee accrues",
3913
- "here and is swept to the fee collector by the permissionless crank."
3845
+ "Legacy fee-vault account retained in this instruction's account schema.",
3846
+ "New fees accrue as pending vault shares."
3914
3847
  ];
3915
3848
  "writable": true;
3916
3849
  },
@@ -4204,8 +4137,8 @@ type Bankineco = {
4204
4137
  {
4205
4138
  "name": "feeVault";
4206
4139
  "docs": [
4207
- "Per-vault fee-vault PDA: token authority + accounting. The burn fee accrues",
4208
- "here and is swept to the fee collector by the permissionless crank."
4140
+ "Legacy fee-vault account retained in this instruction's account schema.",
4141
+ "New fees accrue as pending vault shares."
4209
4142
  ];
4210
4143
  "writable": true;
4211
4144
  },
@@ -4509,8 +4442,8 @@ type Bankineco = {
4509
4442
  {
4510
4443
  "name": "feeVault";
4511
4444
  "docs": [
4512
- "Per-vault fee-vault PDA: token authority + accounting. The burn fee accrues",
4513
- "here and is swept to the fee collector by the permissionless crank."
4445
+ "Legacy fee-vault account retained in this instruction's account schema.",
4446
+ "New fees accrue as pending vault shares."
4514
4447
  ];
4515
4448
  "writable": true;
4516
4449
  },
@@ -5931,9 +5864,6 @@ type Bankineco = {
5931
5864
  },
5932
5865
  {
5933
5866
  "name": "idleBankTranche";
5934
- "docs": [
5935
- "path rejects initialized state because it cannot represent junior claims."
5936
- ];
5937
5867
  "pda": {
5938
5868
  "seeds": [
5939
5869
  {
@@ -6092,7 +6022,7 @@ type Bankineco = {
6092
6022
  {
6093
6023
  "name": "yieldingBankTranche";
6094
6024
  "docs": [
6095
- "state so an active senior-price regime cannot be hidden by omission."
6025
+ "tranche was already consumed by its regular vault migrations."
6096
6026
  ];
6097
6027
  "pda": {
6098
6028
  "seeds": [
@@ -6270,9 +6200,6 @@ type Bankineco = {
6270
6200
  },
6271
6201
  {
6272
6202
  "name": "vaultTrancheState";
6273
- "docs": [
6274
- "be initialized and consistent with destination.tranching_enabled."
6275
- ];
6276
6203
  "writable": true;
6277
6204
  "pda": {
6278
6205
  "seeds": [
@@ -8296,6 +8223,69 @@ type Bankineco = {
8296
8223
  }
8297
8224
  ];
8298
8225
  },
8226
+ {
8227
+ "name": "triggerBankCircuitBreaker";
8228
+ "discriminator": [
8229
+ 250,
8230
+ 236,
8231
+ 165,
8232
+ 211,
8233
+ 181,
8234
+ 241,
8235
+ 74,
8236
+ 84
8237
+ ];
8238
+ "accounts": [
8239
+ {
8240
+ "name": "bankState";
8241
+ "writable": true;
8242
+ "pda": {
8243
+ "seeds": [
8244
+ {
8245
+ "kind": "const";
8246
+ "value": [
8247
+ 66,
8248
+ 65,
8249
+ 78,
8250
+ 75
8251
+ ];
8252
+ },
8253
+ {
8254
+ "kind": "account";
8255
+ "path": "bankState";
8256
+ }
8257
+ ];
8258
+ };
8259
+ },
8260
+ {
8261
+ "name": "bankManager";
8262
+ "writable": true;
8263
+ "signer": true;
8264
+ },
8265
+ {
8266
+ "name": "systemProgram";
8267
+ "address": "11111111111111111111111111111111";
8268
+ },
8269
+ {
8270
+ "name": "tokenProgram";
8271
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
8272
+ }
8273
+ ];
8274
+ "args": [
8275
+ {
8276
+ "name": "isHalted";
8277
+ "type": "bool";
8278
+ },
8279
+ {
8280
+ "name": "isHaltedDeposit";
8281
+ "type": "bool";
8282
+ },
8283
+ {
8284
+ "name": "isHaltedWithdrawal";
8285
+ "type": "bool";
8286
+ }
8287
+ ];
8288
+ },
8299
8289
  {
8300
8290
  "name": "triggerVaultCircuitBreaker";
8301
8291
  "discriminator": [
@@ -9057,8 +9047,8 @@ type Bankineco = {
9057
9047
  {
9058
9048
  "name": "destinationFeeVault";
9059
9049
  "docs": [
9060
- "Destination vault's fee-vault PDA: the mint fee accrues here and is swept",
9061
- "to the fee collector by the permissionless crank."
9050
+ "Legacy fee-vault account retained in this instruction's account schema.",
9051
+ "New fees accrue as pending vault shares."
9062
9052
  ];
9063
9053
  "writable": true;
9064
9054
  },
@@ -9543,224 +9533,239 @@ type Bankineco = {
9543
9533
  ];
9544
9534
  "errors": [
9545
9535
  {
9546
- "code": 6000;
9547
- "name": "mintSupplyNonZero";
9548
- "msg": "Supplied share mint already has non-zero supply";
9536
+ "code": 14001;
9537
+ "name": "unauthorized";
9538
+ "msg": "You are not authorized to perform this action.";
9539
+ },
9540
+ {
9541
+ "code": 14002;
9542
+ "name": "invalidBankMint";
9543
+ "msg": "Invalid mint";
9549
9544
  },
9550
9545
  {
9551
- "code": 6001;
9552
- "name": "invalidAssetMint";
9553
- "msg": "Supplied mint is not accepted by this vault";
9546
+ "code": 14003;
9547
+ "name": "accountingIssue";
9548
+ "msg": "Accounting issue";
9554
9549
  },
9555
9550
  {
9556
- "code": 6002;
9557
- "name": "zeroDepositAmount";
9558
- "msg": "Deposit amount must be greater than zero";
9551
+ "code": 14004;
9552
+ "name": "vaultAccountingIssue";
9553
+ "msg": "Vault accounting issue";
9559
9554
  },
9560
9555
  {
9561
- "code": 6003;
9562
- "name": "exceedsTvlLimit";
9563
- "msg": "Deposit would exceed the vault's TVL limit";
9556
+ "code": 14005;
9557
+ "name": "bankAccountingIssue";
9558
+ "msg": "Bank accounting issue";
9564
9559
  },
9565
9560
  {
9566
- "code": 6004;
9567
- "name": "zeroBurnAmount";
9568
- "msg": "Burn amount must be greater than zero";
9561
+ "code": 14006;
9562
+ "name": "onchainAccountingIssue";
9563
+ "msg": "Onchain accounting issue";
9569
9564
  },
9570
9565
  {
9571
- "code": 6005;
9572
- "name": "zeroAssetAmount";
9573
- "msg": "Asset amount must be greater than zero";
9566
+ "code": 14007;
9567
+ "name": "externalAccountingIssue";
9568
+ "msg": "External accounting issue";
9574
9569
  },
9575
9570
  {
9576
- "code": 6006;
9577
- "name": "insufficientVaultLiquidity";
9578
- "msg": "Insufficient vault liquidity to satisfy withdrawal";
9571
+ "code": 14008;
9572
+ "name": "mintSlippage";
9573
+ "msg": "Minting failed due to slippage.";
9579
9574
  },
9580
9575
  {
9581
- "code": 6007;
9582
- "name": "mintAuthorityNotCurator";
9583
- "msg": "Mint authority is not the curator";
9576
+ "code": 14009;
9577
+ "name": "burningSlippage";
9578
+ "msg": "Burning failed due to slippage.";
9584
9579
  },
9585
9580
  {
9586
- "code": 6008;
9587
- "name": "zeroTotalSupply";
9588
- "msg": "Vault total supply is zero";
9581
+ "code": 14010;
9582
+ "name": "teamAccountAlreadyExists";
9583
+ "msg": "Team account already exists";
9589
9584
  },
9590
9585
  {
9591
- "code": 6009;
9586
+ "code": 14011;
9587
+ "name": "oracleAccountAlreadyExists";
9588
+ "msg": "Oracle account already exists";
9589
+ },
9590
+ {
9591
+ "code": 14012;
9592
9592
  "name": "staleOracle";
9593
- "msg": "Vault oracle is stale";
9593
+ "msg": "Stale oracle";
9594
9594
  },
9595
9595
  {
9596
- "code": 6010;
9597
- "name": "invalidOracleUpdate";
9598
- "msg": "Invalid oracle update";
9596
+ "code": 14013;
9597
+ "name": "localSignificantPriceChange";
9598
+ "msg": "Price change is too large locally";
9599
9599
  },
9600
9600
  {
9601
- "code": 6011;
9602
- "name": "invalidInitialMintSharePrice";
9603
- "msg": "Initial mint share price must be greater than zero";
9601
+ "code": 14014;
9602
+ "name": "significantPriceChange";
9603
+ "msg": "Price change is too large";
9604
9604
  },
9605
9605
  {
9606
- "code": 6012;
9607
- "name": "maxApyExceeded";
9608
- "msg": "Oracle NAV update exceeds the vault's maximum acceptable APY";
9606
+ "code": 14015;
9607
+ "name": "roundingImpact";
9608
+ "msg": "Rounding impacts the protocol";
9609
9609
  },
9610
9610
  {
9611
- "code": 6013;
9612
- "name": "invalidApyConfig";
9613
- "msg": "Invalid APY configuration";
9611
+ "code": 14016;
9612
+ "name": "bankIsHalted";
9613
+ "msg": "Bank is halted";
9614
9614
  },
9615
9615
  {
9616
- "code": 6014;
9617
- "name": "invalidFeeConfig";
9618
- "msg": "Invalid fee configuration";
9616
+ "code": 14017;
9617
+ "name": "vaultIsHalted";
9618
+ "msg": "Vault is halted";
9619
9619
  },
9620
9620
  {
9621
- "code": 6015;
9622
- "name": "vaultHasLiveAssets";
9623
- "msg": "Vault has live supply, TVL, or holdings";
9621
+ "code": 14018;
9622
+ "name": "conversionOverflow";
9623
+ "msg": "Conversion Overflow";
9624
9624
  },
9625
9625
  {
9626
- "code": 6016;
9627
- "name": "depositMintsZeroShares";
9628
- "msg": "Deposit would mint zero shares";
9626
+ "code": 14019;
9627
+ "name": "reserved8019";
9628
+ "msg": "reserved";
9629
9629
  },
9630
9630
  {
9631
- "code": 6017;
9632
- "name": "insufficientAccruedApyBalance";
9633
- "msg": "Insufficient accrued APY balance";
9631
+ "code": 14020;
9632
+ "name": "invalidArgument";
9633
+ "msg": "Invalid argument";
9634
9634
  },
9635
9635
  {
9636
- "code": 6018;
9637
- "name": "invalidRole";
9638
- "msg": "Invalid role configuration";
9636
+ "code": 14021;
9637
+ "name": "userSanityCheck";
9638
+ "msg": "User Sanity Check";
9639
9639
  },
9640
9640
  {
9641
- "code": 6019;
9642
- "name": "invalidProtocolInteraction";
9643
- "msg": "Invalid protocol interaction CPI";
9641
+ "code": 14022;
9642
+ "name": "mathOverflow";
9643
+ "msg": "Math overflow";
9644
9644
  },
9645
9645
  {
9646
- "code": 6020;
9647
- "name": "reserved7020";
9648
- "msg": "reserved";
9646
+ "code": 14023;
9647
+ "name": "invalidMarginFiAccount";
9648
+ "msg": "Invalid MarginFi account - must be correct PDA for this vault";
9649
9649
  },
9650
9650
  {
9651
- "code": 6021;
9652
- "name": "invalidExternalLiquidity";
9653
- "msg": "Invalid external liquidity configuration";
9651
+ "code": 14024;
9652
+ "name": "invalidStartMarker";
9653
+ "msg": "Invalid start marker";
9654
9654
  },
9655
9655
  {
9656
- "code": 6022;
9657
- "name": "swapBalanceUnchanged";
9658
- "msg": "Swap did not change both source and destination balances";
9656
+ "code": 14025;
9657
+ "name": "oracleUpdateOnEmptyReserve";
9658
+ "msg": "Unable to push oracle update on an empty vault reserve";
9659
9659
  },
9660
9660
  {
9661
- "code": 6023;
9662
- "name": "protocolBalanceUnchanged";
9663
- "msg": "Protocol interaction did not change the affected token balance";
9661
+ "code": 14026;
9662
+ "name": "invalidRemainingAccountsLength";
9663
+ "msg": "Invalid remaining accounts length";
9664
9664
  },
9665
9665
  {
9666
- "code": 6024;
9667
- "name": "excessiveSwapSlippage";
9668
- "msg": "Swap TVL loss exceeds the allowed slippage";
9666
+ "code": 14027;
9667
+ "name": "withdrawalExceedsBalance";
9668
+ "msg": "Specified withdrawal exceeds available balance";
9669
9669
  },
9670
9670
  {
9671
- "code": 6025;
9672
- "name": "tranchingNotEnabled";
9673
- "msg": "Vault tranching is not enabled";
9671
+ "code": 14028;
9672
+ "name": "insufficientPendingYield";
9673
+ "msg": "Insufficient pending yield";
9674
9674
  },
9675
9675
  {
9676
- "code": 6026;
9677
- "name": "tranchingAlreadyEnabled";
9678
- "msg": "Vault tranching is already enabled";
9676
+ "code": 14029;
9677
+ "name": "notSupported";
9678
+ "msg": "Not supported";
9679
9679
  },
9680
9680
  {
9681
- "code": 6027;
9682
- "name": "trancheStateRequired";
9683
- "msg": "Tranche state account is required";
9681
+ "code": 14030;
9682
+ "name": "exceedsMaxYieldingTvl";
9683
+ "msg": "Exceeds maximum yielding TVL";
9684
9684
  },
9685
9685
  {
9686
- "code": 6028;
9687
- "name": "invalidTrancheConfig";
9688
- "msg": "Invalid tranche configuration";
9686
+ "code": 14031;
9687
+ "name": "tranchingNotEnabled";
9688
+ "msg": "Tranching is not enabled for this bank";
9689
9689
  },
9690
9690
  {
9691
- "code": 6029;
9692
- "name": "invalidTrancheMint";
9693
- "msg": "Invalid tranche mint";
9691
+ "code": 14032;
9692
+ "name": "invalidLeverageFactor";
9693
+ "msg": "Invalid leverage factor - must be at least 10000 (1x)";
9694
9694
  },
9695
9695
  {
9696
- "code": 6030;
9697
- "name": "lossesDisabled";
9698
- "msg": "Vault losses are not enabled";
9696
+ "code": 14033;
9697
+ "name": "insufficientStakedAmount";
9698
+ "msg": "Insufficient staked amount";
9699
9699
  },
9700
9700
  {
9701
- "code": 6031;
9702
- "name": "withdrawalQueueNotExpired";
9703
- "msg": "Withdrawal queue is not yet expired";
9701
+ "code": 14034;
9702
+ "name": "juniorTrancheEmpty";
9703
+ "msg": "Junior tranche has no value";
9704
9704
  },
9705
9705
  {
9706
- "code": 6032;
9707
- "name": "invalidWithdrawalQueue";
9708
- "msg": "Invalid withdrawal queue";
9706
+ "code": 14035;
9707
+ "name": "invalidTrancheConfig";
9708
+ "msg": "Invalid tranche config parameter";
9709
+ },
9710
+ {
9711
+ "code": 14036;
9712
+ "name": "withdrawalQueueNotExpired";
9713
+ "msg": "Withdrawal queue lockup period has not expired";
9709
9714
  },
9710
9715
  {
9711
- "code": 6033;
9712
- "name": "assetPriceNotSet";
9713
- "msg": "Destination asset has no price set; a consensus oracle price is required before swapping";
9716
+ "code": 14037;
9717
+ "name": "invalidWithdrawalQueue";
9718
+ "msg": "Withdrawal queue entry is not in a valid state";
9714
9719
  },
9715
9720
  {
9716
- "code": 6034;
9717
- "name": "assetHoldingNotEmpty";
9718
- "msg": "Asset holding still has a balance and cannot be removed";
9721
+ "code": 14038;
9722
+ "name": "invalidAccount";
9723
+ "msg": "Account does not belong to the expected parent";
9719
9724
  },
9720
9725
  {
9721
- "code": 6035;
9722
- "name": "cannotRemoveBaseHolding";
9723
- "msg": "The base asset holding cannot be removed";
9726
+ "code": 14039;
9727
+ "name": "missingAccount";
9728
+ "msg": "Required optional account is missing";
9724
9729
  },
9725
9730
  {
9726
- "code": 6036;
9727
- "name": "unauthorizedPriceUpdater";
9728
- "msg": "Caller is not authorized to trigger an asset price update";
9731
+ "code": 14040;
9732
+ "name": "trancheWipedOut";
9733
+ "msg": "Junior tranche is wiped out and cannot accept new stakes";
9729
9734
  },
9730
9735
  {
9731
- "code": 6037;
9732
- "name": "invalidStalenessConfig";
9733
- "msg": "Invalid asset-price staleness threshold";
9736
+ "code": 14041;
9737
+ "name": "vaultLossNotAccepted";
9738
+ "msg": "Vault does not accept losses — enable losses_accepted before retrying";
9734
9739
  },
9735
9740
  {
9736
- "code": 6038;
9737
- "name": "assetRebalanceRateLimitExceeded";
9738
- "msg": "Asset was rebalanced too recently";
9741
+ "code": 14042;
9742
+ "name": "capitalLossExceedsReserve";
9743
+ "msg": "Capital loss exceeds available yielding reserve";
9739
9744
  },
9740
9745
  {
9741
- "code": 6039;
9742
- "name": "invalidShareTokenProgram";
9743
- "msg": "Share token program does not match the vault/tranche mint configuration";
9746
+ "code": 14043;
9747
+ "name": "rollingWithdrawalLimitExceeded";
9748
+ "msg": "Rolling withdrawal limit exceeded";
9744
9749
  },
9745
9750
  {
9746
- "code": 6040;
9747
- "name": "unauthorizedVaultCreator";
9748
- "msg": "Caller is not on the vault-creator whitelist";
9751
+ "code": 14044;
9752
+ "name": "vaultAlreadyMigrated";
9753
+ "msg": "Legacy vault has already been migrated";
9749
9754
  },
9750
9755
  {
9751
- "code": 6041;
9752
- "name": "invalidShareMintDecimals";
9753
- "msg": "Share mint decimals must match the deposit asset mint decimals";
9756
+ "code": 14045;
9757
+ "name": "invalidMigrationState";
9758
+ "msg": "Legacy vault migration is incomplete or invalid";
9754
9759
  },
9755
9760
  {
9756
- "code": 6042;
9757
- "name": "invalidFeeExemption";
9758
- "msg": "Invalid fee-exemption PDA signer or seeds";
9761
+ "code": 14046;
9762
+ "name": "invalidMigrationMintAuthority";
9763
+ "msg": "Mint authority does not match the expected migration source";
9759
9764
  },
9760
9765
  {
9761
- "code": 6043;
9762
- "name": "exceedsJuniorDepositCap";
9763
- "msg": "Deposit would exceed the junior tranche deposit cap";
9766
+ "code": 14047;
9767
+ "name": "bankMigrationIncomplete";
9768
+ "msg": "Legacy bank or tranche migration is incomplete — source accounting and escrow must be fully drained before mint authority transfer";
9764
9769
  }
9765
9770
  ];
9766
9771
  "types": [
@@ -10360,21 +10365,11 @@ type Bankineco = {
10360
10365
  {
10361
10366
  "name": "feeVault";
10362
10367
  "docs": [
10363
- "Per-vault fee custody + accounting account.",
10364
- "",
10365
- "The PDA is both the token authority over the fee-asset ATAs that physically",
10366
- "hold accrued fees and the ledger of what is owed to whom. All four fee types",
10367
- "— mint, burn, performance, and protocol — accrue here.",
10368
- "",
10369
- "Ledger amounts (`*_owed` / `*_collected`) are denominated in the vault's",
10370
- "**accounting unit** (the same unit as TVL / holding prices), not raw token",
10371
- "units. Token custody may still be split across ATAs for different base-asset",
10372
- "mints; the permissionless fee crank converts each ATA's balance to accounting",
10373
- "value via that mint's fresh holding price, pays out, and reduces these",
10374
- "counters by the accounting value cleared.",
10368
+ "Legacy per-vault fee custody account.",
10375
10369
  "",
10376
- "Mint/burn/performance go to `vault.roles.fee_collector`, protocol goes to the",
10377
- "hardcoded protocol fee recipient."
10370
+ "New fee accrual is denominated in canonical vault shares and stored on",
10371
+ "`VaultAccounting`. This account remains in existing instruction schemas for",
10372
+ "compatibility; its historical accounting-unit counters are no longer updated."
10378
10373
  ];
10379
10374
  "serialization": "bytemuck";
10380
10375
  "repr": {
@@ -10599,8 +10594,9 @@ type Bankineco = {
10599
10594
  {
10600
10595
  "name": "migrateAmount";
10601
10596
  "docs": [
10602
- "Reserved for partial migration; partial migration is unsupported, so this",
10603
- "must be `None` (a full vault migration). A `Some(_)` value is rejected."
10597
+ "Partial migration remains unsupported. `None` performs a regular full",
10598
+ "vault migration; `Some(0)` explicitly marks the final in-scope vault and",
10599
+ "permits bounded terminal source-accounting reconciliation."
10604
10600
  ];
10605
10601
  "type": {
10606
10602
  "option": "u64";
@@ -11904,10 +11900,16 @@ type Bankineco = {
11904
11900
  };
11905
11901
  },
11906
11902
  {
11907
- "name": "paddingBool";
11903
+ "name": "migrationInProgress";
11908
11904
  "docs": [
11909
- "Reserved padding (previously `apy_settle_skip`). Kept as a field to",
11910
- "preserve the on-chain account layout for already-deployed vaults."
11905
+ "True while a legacy migration destination is still receiving backing",
11906
+ "and receipt-supply accounting. Oracle mutation and NAV settlement stay",
11907
+ "disabled until every configured receipt mint authority has moved to this vault",
11908
+ "and migration finalization clears the flag.",
11909
+ "",
11910
+ "This occupies the former `apy_settle_skip` padding byte, preserving the",
11911
+ "on-chain account layout for already-deployed vaults. Existing vaults read",
11912
+ "it as false."
11911
11913
  ];
11912
11914
  "type": {
11913
11915
  "defined": {
@@ -12218,7 +12220,7 @@ type Bankineco = {
12218
12220
  {
12219
12221
  "name": "tvlLimit";
12220
12222
  "docs": [
12221
- "Maximum TVL in deposit-asset base units. `0` disables the cap."
12223
+ "Maximum TVL in vault accounting units. `0` disables the cap."
12222
12224
  ];
12223
12225
  "type": "u64";
12224
12226
  },
@@ -13278,7 +13280,7 @@ type Bankineco = {
13278
13280
  {
13279
13281
  "name": "totalMintSupply";
13280
13282
  "docs": [
13281
- "Total supply of the vault's share mint."
13283
+ "Effective share supply: physical mint supply plus unminted fee shares."
13282
13284
  ];
13283
13285
  "type": "u64";
13284
13286
  },
@@ -13332,12 +13334,26 @@ type Bankineco = {
13332
13334
  };
13333
13335
  };
13334
13336
  },
13337
+ {
13338
+ "name": "pendingCuratorFeeShares";
13339
+ "docs": [
13340
+ "Vault shares owed to the curator but not yet minted."
13341
+ ];
13342
+ "type": "u64";
13343
+ },
13344
+ {
13345
+ "name": "pendingProtocolFeeShares";
13346
+ "docs": [
13347
+ "Vault shares owed to the protocol but not yet minted."
13348
+ ];
13349
+ "type": "u64";
13350
+ },
13335
13351
  {
13336
13352
  "name": "padding1";
13337
13353
  "type": {
13338
13354
  "array": [
13339
13355
  "u64",
13340
- 32
13356
+ 30
13341
13357
  ];
13342
13358
  };
13343
13359
  },
@@ -13386,8 +13402,8 @@ type Bankineco = {
13386
13402
  {
13387
13403
  "name": "assetDecimals";
13388
13404
  "docs": [
13389
- "Decimals of the deposit asset, cached so deposit/withdraw paths don't",
13390
- "need to deserialize the mint account."
13405
+ "Vault accounting precision. This matches the vault share mint; each",
13406
+ "holding stores its own mint precision independently."
13391
13407
  ];
13392
13408
  "type": "u8";
13393
13409
  },
@@ -13419,7 +13435,7 @@ type Bankineco = {
13419
13435
  {
13420
13436
  "name": "tvlLimit";
13421
13437
  "docs": [
13422
- "Maximum TVL in deposit-asset base units. `0` disables the cap."
13438
+ "Maximum TVL in vault accounting units. `0` disables the cap."
13423
13439
  ];
13424
13440
  "type": "u64";
13425
13441
  },
@@ -13949,7 +13965,7 @@ interface CreateVaultTxArgs {
13949
13965
  lossesEnabled?: boolean;
13950
13966
  /** Base-asset oracle: 1 = ConsensusOracle (default), 2 = Pyth, 3 = PerenaVault. */
13951
13967
  basePriceOracleType?: number;
13952
- /** Initial base-asset price in the accounting unit. Defaults to 1.0, scaled by the deposit mint's decimals. */
13968
+ /** Initial base-asset price in the accounting unit. Defaults to 1.0, scaled by the share/accounting decimals. */
13953
13969
  basePrice?: bigint;
13954
13970
  /** Price-source account when basePriceOracleType is Pyth/PerenaVault. */
13955
13971
  basePriceOracleAccount?: Address;
@@ -13966,7 +13982,9 @@ type ConsensusAssetUpdate = {
13966
13982
  holdingIndex: number;
13967
13983
  /** Set only when registering a brand-new consensus holding. */
13968
13984
  mint?: Address | null;
13985
+ /** Price in vault accounting units, scaled by `vault.config.assetDecimals`. */
13969
13986
  price: bigint;
13987
+ /** External token balance in the holding mint's native base units. */
13970
13988
  externalAmount: bigint;
13971
13989
  };
13972
13990
  type TrancheKindArgs = {
@@ -14127,25 +14145,21 @@ interface UpdateAssetPriceTxArgs {
14127
14145
  interface CrankPerformanceFeesIxArgs {
14128
14146
  cranker: Address;
14129
14147
  vault: Address;
14130
- feeAssetMint: Address;
14131
- feeVault: Address;
14132
- feeVaultAta: Address;
14148
+ shareMint: Address;
14133
14149
  feeCollector: Address;
14134
- feeCollectorFeeAssetAta: Address;
14150
+ feeCollectorShareAta: Address;
14135
14151
  protocolFeeCollector: Address;
14136
- protocolFeeCollectorFeeAssetAta: Address;
14137
- feeAssetTokenProgram: Address;
14152
+ protocolFeeCollectorShareAta: Address;
14153
+ shareTokenProgram: Address;
14138
14154
  }
14139
14155
  interface CrankPerformanceFeesTxArgs {
14140
14156
  cranker: Address;
14141
14157
  vault: Address;
14142
- /** Base asset the accrued fees are denominated in (defaults to vault base). */
14143
- feeAssetMint?: Address;
14144
14158
  /** Override the curator fee collector (defaults to vault.roles.feeCollector). */
14145
14159
  feeCollector?: Address;
14146
14160
  /** Override the hardcoded protocol fee recipient (defaults to PROTOCOL_FEE_RECIPIENT). */
14147
14161
  protocolFeeCollector?: Address;
14148
- feeAssetTokenProgram?: Address;
14162
+ shareTokenProgram?: Address;
14149
14163
  }
14150
14164
  interface CreateTrancheStateIxArgs {
14151
14165
  curator: Address;
@@ -14923,7 +14937,6 @@ declare class CrankNavBuilder extends VaultBuilderBase<CrankNavIxArgs, CrankNavT
14923
14937
  declare class CrankPerformanceFeesBuilder extends VaultBuilderBase<CrankPerformanceFeesIxArgs, CrankPerformanceFeesTxArgs> {
14924
14938
  getIx(args: CrankPerformanceFeesIxArgs): Promise<_solana_kit.Instruction<string, readonly (_solana_kit.AccountLookupMeta<string, string> | _solana_kit.AccountMeta<string>)[]>>;
14925
14939
  protected deriveIxArgs(txArgs: CrankPerformanceFeesTxArgs): Promise<CrankPerformanceFeesIxArgs>;
14926
- protected buildPreambleInstructions(args: CrankPerformanceFeesIxArgs): Promise<_solana_kit.Instruction<string, readonly (_solana_kit.AccountLookupMeta<string, string> | _solana_kit.AccountMeta<string>)[]>[]>;
14927
14940
  protected buildPlanExtras(args: CrankPerformanceFeesIxArgs): Promise<{
14928
14941
  postSuccessCacheInvalidations: {
14929
14942
  vaultPda: _solana_kit.Address;
@@ -15397,6 +15410,68 @@ declare function makeProvider(connection: Connection, payer: Keypair): AnchorPro
15397
15410
 
15398
15411
  declare function createRpcFromConnection(connection: Connection): Rpc<SolanaRpcApi>;
15399
15412
 
15413
+ /**
15414
+ * Maps a transaction-proposing wallet to the Squads vault it operates.
15415
+ *
15416
+ * The member wallet pays for and signs proposal creation. The derived Squads
15417
+ * vault PDA is the authority that signs the instructions when the proposal is
15418
+ * eventually executed.
15419
+ */
15420
+ interface SquadsWalletRouteConfig {
15421
+ wallet: string;
15422
+ multisigPda: string;
15423
+ vaultIndex: number;
15424
+ memo?: string;
15425
+ }
15426
+ interface ResolvedSquadsWalletRoute {
15427
+ wallet: PublicKey;
15428
+ multisigPda: PublicKey;
15429
+ vaultIndex: number;
15430
+ vaultPda: PublicKey;
15431
+ memo?: string;
15432
+ }
15433
+ interface PreparedDirectTransaction {
15434
+ kind: "direct";
15435
+ transaction: Transaction;
15436
+ authority: PublicKey;
15437
+ }
15438
+ interface PreparedSquadsTransaction {
15439
+ kind: "squads";
15440
+ transaction: Transaction;
15441
+ authority: PublicKey;
15442
+ multisigPda: PublicKey;
15443
+ vaultIndex: number;
15444
+ transactionIndex: bigint;
15445
+ proposalPda: PublicKey;
15446
+ vaultTransactionPda: PublicKey;
15447
+ }
15448
+ type PreparedVaultTransaction = PreparedDirectTransaction | PreparedSquadsTransaction;
15449
+ /** Resolve and validate a configured wallet route, including its vault PDA. */
15450
+ declare function resolveSquadsWalletRoute(route: SquadsWalletRouteConfig): ResolvedSquadsWalletRoute;
15451
+ /** Find the optional Squads route for a connected proposer wallet. */
15452
+ declare function findSquadsWalletRoute(wallet: PublicKey | string, routes: readonly SquadsWalletRouteConfig[]): ResolvedSquadsWalletRoute | undefined;
15453
+ /** Fail fast on ambiguous wallet mappings or malformed route values. */
15454
+ declare function validateSquadsWalletRoutes(routes: readonly SquadsWalletRouteConfig[]): void;
15455
+ /**
15456
+ * Return the authority that should be used while building vault instructions.
15457
+ * For a configured member wallet this is the Squads vault PDA; otherwise it is
15458
+ * the wallet itself.
15459
+ */
15460
+ declare function vaultAuthorityForWallet(wallet: PublicKey | string, routes: readonly SquadsWalletRouteConfig[]): PublicKey;
15461
+ /**
15462
+ * Build either a normal transaction or a Squads proposal-creation transaction,
15463
+ * based on whether `proposer` has a configured wallet route.
15464
+ *
15465
+ * The returned Squads transaction creates both the vault transaction and its
15466
+ * proposal. It does not approve or execute the proposal.
15467
+ */
15468
+ declare function prepareVaultTransaction(args: {
15469
+ connection: Connection;
15470
+ proposer: PublicKey;
15471
+ instructions: readonly TransactionInstruction[];
15472
+ squadsRoutes?: readonly SquadsWalletRouteConfig[];
15473
+ }): Promise<PreparedVaultTransaction>;
15474
+
15400
15475
  interface CreateTokenMintIxs {
15401
15476
  mint: Keypair;
15402
15477
  ixs: TransactionInstruction[];
@@ -15784,38 +15859,22 @@ interface YieldAccountSnapshot {
15784
15859
  accrualStart: Date;
15785
15860
  accrualEnd: Date;
15786
15861
  }
15862
+ /** Payment state used to interlock oracle publication with yield settlement. */
15863
+ interface YieldPaymentSnapshot {
15864
+ id: string;
15865
+ /** Only `confirmed` is safe; present or future intermediate states block. */
15866
+ status: string;
15867
+ }
15787
15868
  /**
15788
- * Queries accrued yield for named accounts. Mirrors the method surface of the
15789
- * real HTTP client (`yieldApi.ts`) so a production implementation can be dropped
15790
- * in without touching {@link ConsensusOracleService}.
15869
+ * Read-only yield-tracker surface required by the oracle. The live implementation
15870
+ * delegates to the HTTP API; the in-memory implementation also exposes mutation
15871
+ * helpers for tests and local operation.
15791
15872
  */
15792
15873
  interface YieldTracker {
15793
- getYield(accountName: string, start?: Date, end?: Date): Promise<YieldAccountSnapshot>;
15794
- /** Sum of `totalYield` (UI amount) across the named accounts. */
15795
- getTotalYield(accountNames: string[], start?: Date, end?: Date): Promise<number>;
15874
+ /** All payments for an account, including payments not yet confirmed. */
15875
+ getYieldPayments(accountName: string): Promise<YieldPaymentSnapshot[]>;
15796
15876
  /** Sum of oracle-safe outstanding yield across the named accounts. */
15797
15877
  getTotalOutstandingYield(accountNames: string[], start?: Date, end?: Date): Promise<number>;
15798
- /** Current balance (principal + outstanding yield), UI amount. */
15799
- getBalance(accountName: string, atTime?: Date): Promise<number>;
15800
- addCashflow(params: {
15801
- accountName: string;
15802
- amount: number;
15803
- date?: Date;
15804
- cashflowType: "deposit" | "withdraw";
15805
- }): Promise<void>;
15806
- /** Register an expected payment. Pending payments remain outstanding. */
15807
- createYieldPayment(params: {
15808
- accountName: string;
15809
- paymentId: string;
15810
- amount: number;
15811
- effectiveAt: Date;
15812
- }): Promise<void>;
15813
- /** Confirm only after the payment is observable in the destination wallet. */
15814
- confirmYieldPayment(params: {
15815
- accountName: string;
15816
- paymentId: string;
15817
- transactionSignature: string;
15818
- }): Promise<void>;
15819
15878
  }
15820
15879
  /** Injectable wall clock (ms since epoch). Lets tests pin time deterministically. */
15821
15880
  interface Clock {
@@ -15866,6 +15925,10 @@ interface VaultOracleResult {
15866
15925
  vault: Address;
15867
15926
  updates: HoldingUpdatePreview[];
15868
15927
  dryRun: boolean;
15928
+ /** Exact read-only projection of consensus aggregation + `crank_nav`. */
15929
+ settlementSimulation?: SettlementSimulation;
15930
+ /** Present when a dry run could source updates but could not build a projection. */
15931
+ settlementSimulationError?: string;
15869
15932
  /** `update_consensus_oracle` signature (absent on dry runs / no holdings). */
15870
15933
  updateSignature?: string;
15871
15934
  /** `crank_nav` signature (absent on dry runs / no holdings / skipped crank). */
@@ -15893,11 +15956,24 @@ interface DecodedHolding {
15893
15956
  decimals: number;
15894
15957
  priceOracleType: unknown;
15895
15958
  isBase: unknown;
15959
+ localAmount?: unknown;
15960
+ externalAmount?: unknown;
15961
+ price?: unknown;
15962
+ lastUpdateTs?: unknown;
15896
15963
  }
15897
15964
  /** Minimal shape of a decoded vault account the service relies on. */
15898
15965
  interface DecodedVault {
15966
+ /** Regular vault-share mint. Never a price-source target for this vault. */
15967
+ mint?: unknown;
15968
+ /** Whether this vault has a vault-scoped junior/senior tranche state. */
15969
+ tranchingEnabled?: unknown;
15970
+ lossesEnabled?: unknown;
15971
+ accounting?: Record<string, unknown>;
15899
15972
  config: {
15900
15973
  assetDecimals: number;
15974
+ priceStalenessThresholdSecs?: unknown;
15975
+ fees?: Record<string, unknown>;
15976
+ apy?: Record<string, unknown>;
15901
15977
  };
15902
15978
  roles: {
15903
15979
  manager: unknown;
@@ -15906,6 +15982,67 @@ interface DecodedVault {
15906
15982
  /** Raw on-chain ExternalLiquiditySlot array (byte buffers); parsed by the service. */
15907
15983
  externalLiquidity?: unknown;
15908
15984
  }
15985
+ /** Minimal decoded tranche-state shape used to exclude its receipt mints. */
15986
+ interface DecodedVaultTrancheState {
15987
+ config: {
15988
+ juniorMint: unknown;
15989
+ seniorMint: unknown;
15990
+ seniorFixedApyBps?: unknown;
15991
+ };
15992
+ junior?: Record<string, unknown>;
15993
+ senior?: Record<string, unknown>;
15994
+ lastSettledTs?: unknown;
15995
+ seniorApyAnchorSharePrice?: unknown;
15996
+ seniorApyAnchorTs?: unknown;
15997
+ }
15998
+ interface ConsensusHoldingSimulation {
15999
+ holdingIndex: number;
16000
+ mint: Address;
16001
+ reportCount: number;
16002
+ /** Aggregated values written by `update_consensus_oracle`, when consensus lands. */
16003
+ settledPrice?: bigint;
16004
+ settledExternalAmount?: bigint;
16005
+ wouldUpdateHolding: boolean;
16006
+ reason?: string;
16007
+ }
16008
+ interface SimulatedShareClass {
16009
+ value: bigint;
16010
+ totalSupply: bigint;
16011
+ sharePrice: bigint;
16012
+ }
16013
+ interface SettlementSimulationSnapshot {
16014
+ tvl: bigint;
16015
+ regular: SimulatedShareClass;
16016
+ junior?: SimulatedShareClass;
16017
+ senior?: SimulatedShareClass;
16018
+ }
16019
+ /**
16020
+ * Result of replaying the relevant on-chain consensus and NAV-settlement math.
16021
+ * All numbers remain in raw on-chain fixed-point/base units.
16022
+ */
16023
+ interface SettlementSimulation {
16024
+ nowTs: bigint;
16025
+ assetDecimals: number;
16026
+ /** True only when every holding in this signer's proposed batch would land. */
16027
+ allProposedUpdatesLand: boolean;
16028
+ proposedUpdatesLanded: number;
16029
+ proposedUpdatesTotal: number;
16030
+ /** Whether the subsequent `crank_nav` would succeed (possibly on unchanged slots). */
16031
+ canSettle: boolean;
16032
+ blockers: string[];
16033
+ warnings: string[];
16034
+ consensus: ConsensusHoldingSimulation[];
16035
+ grossNav?: bigint;
16036
+ settledAccountingNav?: bigint;
16037
+ current: SettlementSimulationSnapshot;
16038
+ projected?: SettlementSimulationSnapshot;
16039
+ performanceFees?: {
16040
+ curator: bigint;
16041
+ protocol: bigint;
16042
+ total: bigint;
16043
+ mintedShares: bigint;
16044
+ };
16045
+ }
15909
16046
  /** A consensus-priced holding paired with its on-chain slot index. */
15910
16047
  interface ConsensusHoldingEntry {
15911
16048
  holding: DecodedHolding;
@@ -15945,6 +16082,47 @@ declare class JupiterPriceSource implements PriceSource {
15945
16082
  fetchUsdPrices(mints: Address[]): Promise<Record<string, number>>;
15946
16083
  }
15947
16084
 
16085
+ /** Nest's Perena vault-share price feed. */
16086
+
16087
+ declare const NEST_API_BASE_URL = "https://api.nest.credit/v1";
16088
+ declare const NEST_VAULT_SLUG = "nest-perena-vault";
16089
+ declare const NEST_RWA_SHARE_MINT: Address;
16090
+ interface FetchNestTokenPriceOptions {
16091
+ baseUrl?: string;
16092
+ fetchFn?: typeof fetch;
16093
+ }
16094
+ /**
16095
+ * Fetch the USD price of one Nest vault share. This is the price reader that
16096
+ * historically lived in bankineco-sdk's `nestUtils`; the vault SDK owns it now
16097
+ * because nested Nest shares are a consensus-oracle price source.
16098
+ */
16099
+ declare function fetchNestTokenPrice(nestVaultSlug?: string, opts?: FetchNestTokenPriceOptions): Promise<number>;
16100
+ interface NestPriceSourceOptions extends FetchNestTokenPriceOptions {
16101
+ nestVaultSlug?: string;
16102
+ shareMint?: Address;
16103
+ }
16104
+ /** PriceSource adapter for the canonical Nest Perena share mint. */
16105
+ declare class NestPriceSource implements PriceSource {
16106
+ readonly shareMint: Address;
16107
+ private readonly nestVaultSlug;
16108
+ private readonly options;
16109
+ constructor(opts?: NestPriceSourceOptions);
16110
+ fetchUsdPrices(mints: Address[]): Promise<Record<string, number>>;
16111
+ }
16112
+
16113
+ /** Routes known nested-vault shares to their native API and all other mints to Jupiter. */
16114
+
16115
+ interface LivePriceSourceOptions {
16116
+ jupiter?: PriceSource;
16117
+ nest?: NestPriceSource;
16118
+ }
16119
+ declare class LivePriceSource implements PriceSource {
16120
+ private readonly jupiter;
16121
+ private readonly nest;
16122
+ constructor(opts?: LivePriceSourceOptions);
16123
+ fetchUsdPrices(mints: Address[]): Promise<Record<string, number>>;
16124
+ }
16125
+
15948
16126
  /**
15949
16127
  * {@link WalletBalanceSource} backed by the Jupiter "portfolio" / Ultra balances
15950
16128
  * API, with an on-chain RPC fallback.
@@ -16074,6 +16252,7 @@ declare class MockYieldTracker implements YieldTracker {
16074
16252
  /** Register (or replace) a tracked account. */
16075
16253
  setAccount(name: string, cfg: MockYieldAccountConfig): void;
16076
16254
  private require;
16255
+ getYieldPayments(accountName: string): Promise<YieldPaymentSnapshot[]>;
16077
16256
  getYield(accountName: string, start?: Date, end?: Date): Promise<YieldAccountSnapshot>;
16078
16257
  getTotalYield(accountNames: string[], start?: Date, end?: Date): Promise<number>;
16079
16258
  getTotalOutstandingYield(accountNames: string[], start?: Date, end?: Date): Promise<number>;
@@ -16097,6 +16276,38 @@ declare class MockYieldTracker implements YieldTracker {
16097
16276
  }): Promise<void>;
16098
16277
  }
16099
16278
 
16279
+ /**
16280
+ * Pure dry-run simulator for the two transactions emitted by the consensus
16281
+ * oracle service:
16282
+ *
16283
+ * 1. `update_consensus_oracle` overlays this signer's report and averages all
16284
+ * fresh, agreeing reports.
16285
+ * 2. `crank_nav` derives gross NAV and applies fixed APY, tranche allocation,
16286
+ * high-water-mark performance fees, and pending fee-share accrual.
16287
+ *
16288
+ * Keep this module side-effect free. The service owns account/RPC reads; this
16289
+ * file owns deterministic program-math parity and is straightforward to test.
16290
+ */
16291
+
16292
+ interface SimulateSettlementArgs {
16293
+ vault: DecodedVault;
16294
+ oracleData: readonly number[];
16295
+ trancheState?: DecodedVaultTrancheState;
16296
+ updates: readonly HoldingUpdatePreview[];
16297
+ signer: Address;
16298
+ nowTs: bigint;
16299
+ /** Canonical SPL mint supplies read immediately before simulation. */
16300
+ physicalShareSupply?: bigint;
16301
+ physicalJuniorSupply?: bigint;
16302
+ physicalSeniorSupply?: bigint;
16303
+ }
16304
+ /** Replay consensus aggregation and NAV settlement without sending a transaction. */
16305
+ declare function simulateConsensusOracleSettlement(args: SimulateSettlementArgs): SettlementSimulation;
16306
+ /** Exact bigint port of common::utils::number::apply_effective_apy. */
16307
+ declare function applyEffectiveApy(anchor: bigint, apyBps: number, elapsedSecs: bigint): bigint;
16308
+ /** Human-readable CLI lines for a raw settlement projection. */
16309
+ declare function formatSettlementSimulation(simulation: SettlementSimulation): string[];
16310
+
16100
16311
  declare class ConsensusOracleService {
16101
16312
  private readonly client;
16102
16313
  private readonly deps;
@@ -16105,6 +16316,14 @@ declare class ConsensusOracleService {
16105
16316
  constructor(client: VaultClient, deps: ConsensusOracleDeps);
16106
16317
  /** Drive one vault: source prices/balances, push consensus update, crank NAV. */
16107
16318
  runOnce(signer: Keypair, target: ConsensusOracleTarget, opts?: RunOptions): Promise<VaultOracleResult>;
16319
+ /** Read canonical supplies and replay the exact on-chain settlement path. */
16320
+ private simulateDryRunSettlement;
16321
+ /**
16322
+ * Fail closed while any configured yield account has an unsettled payment.
16323
+ * The payout must be confirmed only after it is visible in the same wallet
16324
+ * balance source used by this service. Until then, no oracle update is safe.
16325
+ */
16326
+ private assertNoUnconfirmedYieldPayments;
16108
16327
  /**
16109
16328
  * Drive several vaults in sequence. Non-fatal: a failure on one vault is
16110
16329
  * recorded and the rest still run (mirrors the oracle-updater daemon).
@@ -16122,6 +16341,12 @@ declare class ConsensusOracleService {
16122
16341
  log?: (msg: string) => void;
16123
16342
  }): Promise<ConsensusOracleTarget[]>;
16124
16343
  private fetchDecodedVault;
16344
+ /**
16345
+ * Receipt mints issued by this vault are liabilities/shares, not underlying
16346
+ * assets for its own NAV. Exclude them even if they were registered as
16347
+ * consensus-priced holdings.
16348
+ */
16349
+ private fetchReceiptMints;
16125
16350
  /** Fetch every external input the per-holding updates draw on, in parallel-ish. */
16126
16351
  private gatherPricingInputs;
16127
16352
  /** Live-LP balances for the target, summed by mint (empty if no provider). */
@@ -16187,4 +16412,4 @@ declare class ExternalLiquidityIntegrityService {
16187
16412
  private depositIntoMarginfi;
16188
16413
  }
16189
16414
 
16190
- export { ASSET_DECIMALS, type AccountBalanceResponse, AccountClient, type AccountYieldResponse, ActivateCircuitBreakerBuilder, type ActivateCircuitBreakerIxArgs, type ActivateCircuitBreakerTxArgs, type AssetPriceOracleConfigIxArgs, type AssetPriceOracleConfigTxArgs, type AssetPriceRefreshTarget, type AssetRefreshResult, type Bankineco, type BasicAuthCredentials, type Bigintish, CancelJuniorTrancheWithdrawBuilder, type CancelJuniorTrancheWithdrawIxArgs, type CancelJuniorTrancheWithdrawTxArgs, type Clock, type ConsensusAssetUpdate, type ConsensusHoldingEntry, type ConsensusOracleDeps, type ConsensusOracleHoldingConfig, ConsensusOracleService, type ConsensusOracleTarget, CrankNavBuilder, type CrankNavIxArgs, type CrankNavTxArgs, CrankPerformanceFeesBuilder, type CrankPerformanceFeesIxArgs, type CrankPerformanceFeesTxArgs, type CreateAccountParams, CreateAssetHoldingBuilder, type CreateAssetHoldingIxArgs, type CreateAssetHoldingTxArgs, type CreateTokenMintIxs, CreateTrancheStateBuilder, type CreateTrancheStateIxArgs, type CreateTrancheStateTxArgs, CreateVaultBuilder, type CreateVaultClientOptions, type CreateVaultIxArgs, type CreateVaultParams, type CreateVaultTxArgs, type CreateYieldPaymentParams, DEFAULT_JUNIOR_EARLY_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_STANDARD_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_WITHDRAWAL_LOCKUP_SECS, DEFAULT_MAX_ACCEPTABLE_APY_BPS, DEFAULT_ORACLE_STALENESS_THRESHOLD_SECS, DEFAULT_PRICE_ORACLE_ACCOUNT, DEFAULT_PRICE_STALENESS_THRESHOLD_SECS, DEFAULT_VAULT_ID, type DecodedHolding, type DecodedVault, type DeleteAccountParams, DisableCircuitBreakerBuilder, type DisableCircuitBreakerIxArgs, type DisableCircuitBreakerTxArgs, ExecuteDepositBuilder, type ExecuteDepositIxArgs, type ExecuteDepositTxArgs, ExecuteShareSwapBuilder, type ExecuteShareSwapIxArgs, type ExecuteShareSwapTxArgs, ExecuteTrancheDepositBuilder, type ExecuteTrancheDepositIxArgs, type ExecuteTrancheDepositTxArgs, ExecuteTrancheWithdrawBuilder, type ExecuteTrancheWithdrawIxArgs, type ExecuteTrancheWithdrawTxArgs, ExecuteWithdrawBuilder, type ExecuteWithdrawIxArgs, type ExecuteWithdrawTxArgs, type ExternalLiquidityIntegrityResult, ExternalLiquidityIntegrityService, type ExternalLiquidityIntegritySummary, type ExternalLiquiditySlot, type ExternalLiquiditySourceArgs, type ExternalPosition, type ExternalPositionContext, type ExternalPositionProvider, type ExternalPositionRef, ExternalPositionRegistry, FEE_VAULT_CACHE_CATEGORY, type FeeVaultAccountData, FulfillJuniorTrancheWithdrawBuilder, type FulfillJuniorTrancheWithdrawIxArgs, type FulfillJuniorTrancheWithdrawTxArgs, type FulfillSummary, type HoldingUpdatePreview, IDL, InitializeVaultRolesBuilder, type InitializeVaultRolesIxArgs, type InitializeVaultRolesTxArgs, type JuniorWithdrawalMode, JupiterBalanceSource, type JupiterBalanceSourceOptions, JupiterPriceSource, type JupiterPriceSourceOptions, JupiterSwapBuilder, type JupiterSwapIxArgs, type JupiterSwapTxArgs, KaminoPositionProvider, type LiveConsensusOracleDepsOptions, MAX_PRICE_STALENESS_THRESHOLD_SECS, ManagerRedepositAssetBuilder, type ManagerRedepositAssetIxArgs, type ManagerRedepositAssetTxArgs, ManagerWithdrawAssetBuilder, type ManagerWithdrawAssetIxArgs, type ManagerWithdrawAssetTxArgs, MarginfiPositionProvider, type MockYieldAccountConfig, MockYieldTracker, type MockYieldTrackerOptions, type NavCrankBlocker, type NavCrankBlockerReason, type NavCrankReadiness, type NavCrankResult, OracleService, PROGRAM_FEE_EXEMPT_OWNER_WHITELIST, PROTOCOL_ADMIN, PROTOCOL_FEE_RECIPIENT, PdaClient, type PriceOracleTypeArgs, type PriceSource, ProtocolInteractionBuilder, type ProtocolInteractionIxArgs, type ProtocolInteractionTxArgs, type QuoteFeeUnit, RemoveAssetHoldingBuilder, type RemoveAssetHoldingIxArgs, type RemoveAssetHoldingTxArgs, RequestJuniorTrancheWithdrawBuilder, type RequestJuniorTrancheWithdrawIxArgs, type RequestJuniorTrancheWithdrawTxArgs, type RollingLimitConfig, type RunLiveConsensusOracleOptions, type RunOptions, type RunSummary, SHARE_DECIMALS, SetAssetPriceOracleBuilder, type SetAssetPriceOracleIxArgs, type SetAssetPriceOracleTxArgs, SetExternalLiquidityBuilder, type SetExternalLiquidityIxArgs, type SetExternalLiquidityTxArgs, SetProtocolFeeBuilder, type SetProtocolFeeIxArgs, type SetProtocolFeeTxArgs, SetVaultConfigBuilder, type SetVaultConfigIxArgs, type SetVaultConfigTxArgs, 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 YieldTracker, addCashflowUpdate, confirmYieldPayment, createAccount, createLiveConsensusOracleDeps, createRpcFromConnection, createTokenMint, createTokenMintIxs, createVaultClient, createYieldPayment, dateToStr, defaultKeypairPath, deleteAccount, fromUiAmount, getAccounts, getBalance, getCashflows, getRpcUrl, getTotalOutstandingYield, getTotalYield, getVaultProgramId, getYield, getYieldPayments, isVaultEnv, keypairAddress, loadKeypair, makeProvider, mintTokensTo, resolveKeypairPath, roundToNextUtcMidnight, runLiveConsensusOracle, systemClock, toUiAmount, updateAccount, updateDynamicApr };
16415
+ export { ASSET_DECIMALS, type AccountBalanceResponse, AccountClient, type AccountYieldResponse, ActivateCircuitBreakerBuilder, type ActivateCircuitBreakerIxArgs, type ActivateCircuitBreakerTxArgs, type AssetPriceOracleConfigIxArgs, type AssetPriceOracleConfigTxArgs, type AssetPriceRefreshTarget, type AssetRefreshResult, type Bankineco, type BasicAuthCredentials, type Bigintish, CancelJuniorTrancheWithdrawBuilder, type CancelJuniorTrancheWithdrawIxArgs, type CancelJuniorTrancheWithdrawTxArgs, type Clock, type ConsensusAssetUpdate, type ConsensusHoldingEntry, type ConsensusHoldingSimulation, type ConsensusOracleDeps, type ConsensusOracleHoldingConfig, ConsensusOracleService, type ConsensusOracleTarget, CrankNavBuilder, type CrankNavIxArgs, type CrankNavTxArgs, CrankPerformanceFeesBuilder, type CrankPerformanceFeesIxArgs, type CrankPerformanceFeesTxArgs, type CreateAccountParams, CreateAssetHoldingBuilder, type CreateAssetHoldingIxArgs, type CreateAssetHoldingTxArgs, type CreateTokenMintIxs, CreateTrancheStateBuilder, type CreateTrancheStateIxArgs, type CreateTrancheStateTxArgs, CreateVaultBuilder, type CreateVaultClientOptions, type CreateVaultIxArgs, type CreateVaultParams, type CreateVaultTxArgs, type CreateYieldPaymentParams, DEFAULT_JUNIOR_EARLY_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_STANDARD_UNSTAKE_FEE_BPS, DEFAULT_JUNIOR_WITHDRAWAL_LOCKUP_SECS, DEFAULT_MAX_ACCEPTABLE_APY_BPS, DEFAULT_ORACLE_STALENESS_THRESHOLD_SECS, DEFAULT_PRICE_ORACLE_ACCOUNT, DEFAULT_PRICE_STALENESS_THRESHOLD_SECS, DEFAULT_VAULT_ID, type DecodedHolding, type DecodedVault, type DecodedVaultTrancheState, type DeleteAccountParams, DisableCircuitBreakerBuilder, type DisableCircuitBreakerIxArgs, type DisableCircuitBreakerTxArgs, ExecuteDepositBuilder, type ExecuteDepositIxArgs, type ExecuteDepositTxArgs, ExecuteShareSwapBuilder, type ExecuteShareSwapIxArgs, type ExecuteShareSwapTxArgs, ExecuteTrancheDepositBuilder, type ExecuteTrancheDepositIxArgs, type ExecuteTrancheDepositTxArgs, ExecuteTrancheWithdrawBuilder, type ExecuteTrancheWithdrawIxArgs, type ExecuteTrancheWithdrawTxArgs, ExecuteWithdrawBuilder, type ExecuteWithdrawIxArgs, type ExecuteWithdrawTxArgs, type ExternalLiquidityIntegrityResult, ExternalLiquidityIntegrityService, type ExternalLiquidityIntegritySummary, type ExternalLiquiditySlot, type ExternalLiquiditySourceArgs, type ExternalPosition, type ExternalPositionContext, type ExternalPositionProvider, type ExternalPositionRef, ExternalPositionRegistry, FEE_VAULT_CACHE_CATEGORY, type FeeVaultAccountData, type FetchNestTokenPriceOptions, FulfillJuniorTrancheWithdrawBuilder, type FulfillJuniorTrancheWithdrawIxArgs, type FulfillJuniorTrancheWithdrawTxArgs, type FulfillSummary, type HoldingUpdatePreview, IDL, InitializeVaultRolesBuilder, type InitializeVaultRolesIxArgs, type InitializeVaultRolesTxArgs, type JuniorWithdrawalMode, JupiterBalanceSource, type JupiterBalanceSourceOptions, JupiterPriceSource, type JupiterPriceSourceOptions, JupiterSwapBuilder, type JupiterSwapIxArgs, type JupiterSwapTxArgs, KaminoPositionProvider, LOCAL_PROTOCOL_ADMIN, type LiveConsensusOracleDepsOptions, LivePriceSource, type LivePriceSourceOptions, MAX_PRICE_STALENESS_THRESHOLD_SECS, ManagerRedepositAssetBuilder, type ManagerRedepositAssetIxArgs, type ManagerRedepositAssetTxArgs, ManagerWithdrawAssetBuilder, type ManagerWithdrawAssetIxArgs, type ManagerWithdrawAssetTxArgs, MarginfiPositionProvider, type MockYieldAccountConfig, MockYieldTracker, type MockYieldTrackerOptions, NEST_API_BASE_URL, NEST_RWA_SHARE_MINT, NEST_VAULT_SLUG, type NavCrankBlocker, type NavCrankBlockerReason, type NavCrankReadiness, type NavCrankResult, NestPriceSource, type NestPriceSourceOptions, OracleService, 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, RemoveAssetHoldingBuilder, type RemoveAssetHoldingIxArgs, type RemoveAssetHoldingTxArgs, RequestJuniorTrancheWithdrawBuilder, type RequestJuniorTrancheWithdrawIxArgs, type RequestJuniorTrancheWithdrawTxArgs, type ResolvedSquadsWalletRoute, type RollingLimitConfig, type RunLiveConsensusOracleOptions, type RunOptions, type RunSummary, SHARE_DECIMALS, SetAssetPriceOracleBuilder, type SetAssetPriceOracleIxArgs, type SetAssetPriceOracleTxArgs, SetExternalLiquidityBuilder, type SetExternalLiquidityIxArgs, type SetExternalLiquidityTxArgs, SetProtocolFeeBuilder, type SetProtocolFeeIxArgs, type SetProtocolFeeTxArgs, SetVaultConfigBuilder, type SetVaultConfigIxArgs, type SetVaultConfigTxArgs, type SettlementSimulation, type SettlementSimulationSnapshot, 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, addCashflowUpdate, applyEffectiveApy, confirmYieldPayment, createAccount, createLiveConsensusOracleDeps, createRpcFromConnection, createTokenMint, createTokenMintIxs, createVaultClient, createYieldPayment, dateToStr, defaultKeypairPath, deleteAccount, fetchNestTokenPrice, findSquadsWalletRoute, formatSettlementSimulation, fromUiAmount, getAccounts, getBalance, getCashflows, getRpcUrl, getTotalOutstandingYield, getTotalYield, getVaultProgramId, getYield, getYieldPayments, isVaultEnv, keypairAddress, loadKeypair, makeProvider, mintTokensTo, prepareVaultTransaction, resolveKeypairPath, resolveSquadsWalletRoute, roundToNextUtcMidnight, runLiveConsensusOracle, simulateConsensusOracleSettlement, systemClock, toUiAmount, updateAccount, updateDynamicApr, validateSquadsWalletRoutes, vaultAuthorityForWallet };