@voltr/vault-sdk 1.0.19 → 1.0.21

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/client.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Program, AnchorProvider, Idl } from "@coral-xyz/anchor";
2
2
  import BN from "bn.js";
3
3
  import { ConfirmOptions, Connection, Keypair, PublicKey, TransactionInstruction } from "@solana/web3.js";
4
- import { VaultParams, VoltrVault, InitializeStrategyArgs, DepositStrategyArgs, WithdrawStrategyArgs, InitializeDirectWithdrawStrategyArgs, RequestWithdrawVaultArgs, VaultConfigField } from "./types";
4
+ import { VaultParams, VoltrVault, InitializeStrategyArgs, DepositStrategyArgs, WithdrawStrategyArgs, InitializeDirectWithdrawStrategyArgs, RequestWithdrawVaultArgs, InstantWithdrawVaultArgs, InstantWithdrawStrategyArgs, VaultConfigField, ProtocolConfigField, ProtocolFeeField } from "./types";
5
5
  declare class AccountUtils {
6
6
  conn: Connection;
7
7
  constructor(conn: Connection);
@@ -135,6 +135,92 @@ export declare class VoltrClient extends AccountUtils {
135
135
  * ```
136
136
  */
137
137
  findLpMetadataAccount(vault: PublicKey): PublicKey;
138
+ /**
139
+ * Finds the protocol PDA address
140
+ * @returns The PDA for the protocol account
141
+ *
142
+ * @example
143
+ * ```typescript
144
+ * const protocol = client.findProtocol();
145
+ * ```
146
+ */
147
+ findProtocol(): PublicKey;
148
+ /**
149
+ * Creates an instruction to initialize the protocol
150
+ *
151
+ * @param {number} operationalState - Bitflags for allowed operations (e.g., CREATE_VAULT = 1, DEPOSIT_VAULT = 2, etc.)
152
+ * @param {Object} params - Parameters for initializing the protocol
153
+ * @param {PublicKey} params.payer - Public key of the fee payer
154
+ * @param {PublicKey} params.admin - Public key of the protocol admin
155
+ * @returns {Promise<TransactionInstruction>} Transaction instruction for initializing the protocol
156
+ *
157
+ * @example
158
+ * ```typescript
159
+ * const ix = await client.createInitProtocolIx(
160
+ * 0xFFFF, // enable all operations
161
+ * {
162
+ * payer: payerPubkey,
163
+ * admin: adminPubkey,
164
+ * }
165
+ * );
166
+ * ```
167
+ */
168
+ createInitProtocolIx(operationalState: number, { payer, admin, }: {
169
+ payer: PublicKey;
170
+ admin: PublicKey;
171
+ }): Promise<TransactionInstruction>;
172
+ /**
173
+ * Creates an instruction to update the protocol configuration
174
+ *
175
+ * @param {ProtocolConfigField} field - The protocol configuration field to update
176
+ * @param {Buffer} data - The serialized data for the new value
177
+ * @param {Object} params - Parameters for updating the protocol
178
+ * @param {PublicKey} params.admin - Public key of the protocol admin
179
+ * @returns {Promise<TransactionInstruction>} Transaction instruction for updating the protocol
180
+ *
181
+ * @throws {Error} If the field is unknown
182
+ *
183
+ * @example Update operational state
184
+ * ```typescript
185
+ * const data = Buffer.alloc(2);
186
+ * data.writeUInt16LE(0xFFFF, 0);
187
+ * const ix = await client.createUpdateProtocolIx(
188
+ * ProtocolConfigField.OperationalState,
189
+ * data,
190
+ * { admin: adminPubkey }
191
+ * );
192
+ * ```
193
+ *
194
+ * @example Set pending admin for 2-step transfer
195
+ * ```typescript
196
+ * const data = newAdmin.toBuffer();
197
+ * const ix = await client.createUpdateProtocolIx(
198
+ * ProtocolConfigField.PendingAdmin,
199
+ * data,
200
+ * { admin: adminPubkey }
201
+ * );
202
+ * ```
203
+ */
204
+ createUpdateProtocolIx(field: ProtocolConfigField, data: Buffer, { admin, }: {
205
+ admin: PublicKey;
206
+ }): Promise<TransactionInstruction>;
207
+ /**
208
+ * Creates an instruction to accept a protocol admin transfer (2-step admin transfer)
209
+ *
210
+ * @param {Object} params - Parameters for accepting protocol admin
211
+ * @param {PublicKey} params.pendingAdmin - Public key of the pending admin (must be signer)
212
+ * @returns {Promise<TransactionInstruction>} Transaction instruction for accepting protocol admin
213
+ *
214
+ * @example
215
+ * ```typescript
216
+ * const ix = await client.createAcceptProtocolAdminIx({
217
+ * pendingAdmin: pendingAdminPubkey,
218
+ * });
219
+ * ```
220
+ */
221
+ createAcceptProtocolAdminIx({ pendingAdmin, }: {
222
+ pendingAdmin: PublicKey;
223
+ }): Promise<TransactionInstruction>;
138
224
  /**
139
225
  * Creates an instruction to initialize a new vault
140
226
  *
@@ -399,6 +485,45 @@ export declare class VoltrClient extends AccountUtils {
399
485
  vaultAssetMint: PublicKey;
400
486
  assetTokenProgram: PublicKey;
401
487
  }): Promise<TransactionInstruction>;
488
+ /**
489
+ * Creates an instant withdraw instruction for a vault (no waiting period required)
490
+ *
491
+ * @param {InstantWithdrawVaultArgs} args - Instant withdrawal arguments
492
+ * @param {BN} args.amount - Amount to withdraw (in LP tokens or asset, depending on isAmountInLp)
493
+ * @param {boolean} args.isAmountInLp - Whether the amount is denominated in LP tokens
494
+ * @param {boolean} args.isWithdrawAll - Whether to withdraw all user's LP tokens
495
+ * @param {Object} params - Instant withdraw parameters
496
+ * @param {PublicKey} params.userTransferAuthority - Public key of the user's transfer authority
497
+ * @param {PublicKey} params.vault - Public key of the vault
498
+ * @param {PublicKey} params.vaultAssetMint - Public key of the vault asset mint
499
+ * @param {PublicKey} params.assetTokenProgram - Public key of the asset token program
500
+ * @returns {Promise<TransactionInstruction>} Transaction instruction for instant withdrawal
501
+ *
502
+ * @throws {Error} If the vault's withdrawal waiting period is not zero
503
+ *
504
+ * @example
505
+ * ```typescript
506
+ * const ix = await client.createInstantWithdrawVaultIx(
507
+ * {
508
+ * amount: new BN('1000000000'),
509
+ * isAmountInLp: true,
510
+ * isWithdrawAll: false,
511
+ * },
512
+ * {
513
+ * userTransferAuthority: userPubkey,
514
+ * vault: vaultPubkey,
515
+ * vaultAssetMint: mintPubkey,
516
+ * assetTokenProgram: tokenProgramPubkey,
517
+ * }
518
+ * );
519
+ * ```
520
+ */
521
+ createInstantWithdrawVaultIx({ amount, isAmountInLp, isWithdrawAll }: InstantWithdrawVaultArgs, { userTransferAuthority, vault, vaultAssetMint, assetTokenProgram, }: {
522
+ userTransferAuthority: PublicKey;
523
+ vault: PublicKey;
524
+ vaultAssetMint: PublicKey;
525
+ assetTokenProgram: PublicKey;
526
+ }): Promise<TransactionInstruction>;
402
527
  /**
403
528
  * Creates an instruction to add an adaptor to a vault
404
529
  * @param {Object} params - Parameters for adding adaptor to vault
@@ -424,7 +549,7 @@ export declare class VoltrClient extends AccountUtils {
424
549
  vault: PublicKey;
425
550
  payer: PublicKey;
426
551
  admin: PublicKey;
427
- adaptorProgram?: PublicKey;
552
+ adaptorProgram: PublicKey;
428
553
  }): Promise<TransactionInstruction>;
429
554
  /**
430
555
  * Creates an instruction to initialize a strategy to a vault
@@ -464,7 +589,7 @@ export declare class VoltrClient extends AccountUtils {
464
589
  vault: PublicKey;
465
590
  manager: PublicKey;
466
591
  strategy: PublicKey;
467
- adaptorProgram?: PublicKey;
592
+ adaptorProgram: PublicKey;
468
593
  remainingAccounts: Array<{
469
594
  pubkey: PublicKey;
470
595
  isSigner: boolean;
@@ -515,7 +640,7 @@ export declare class VoltrClient extends AccountUtils {
515
640
  vaultAssetMint: PublicKey;
516
641
  strategy: PublicKey;
517
642
  assetTokenProgram: PublicKey;
518
- adaptorProgram?: PublicKey;
643
+ adaptorProgram: PublicKey;
519
644
  remainingAccounts: Array<{
520
645
  pubkey: PublicKey;
521
646
  isSigner: boolean;
@@ -564,7 +689,7 @@ export declare class VoltrClient extends AccountUtils {
564
689
  vaultAssetMint: PublicKey;
565
690
  strategy: PublicKey;
566
691
  assetTokenProgram: PublicKey;
567
- adaptorProgram?: PublicKey;
692
+ adaptorProgram: PublicKey;
568
693
  remainingAccounts: Array<{
569
694
  pubkey: PublicKey;
570
695
  isSigner: boolean;
@@ -592,7 +717,7 @@ export declare class VoltrClient extends AccountUtils {
592
717
  createRemoveAdaptorIx({ vault, admin, adaptorProgram, }: {
593
718
  vault: PublicKey;
594
719
  admin: PublicKey;
595
- adaptorProgram?: PublicKey;
720
+ adaptorProgram: PublicKey;
596
721
  }): Promise<TransactionInstruction>;
597
722
  /**
598
723
  * Creates an instruction to initialize a direct withdraw strategy
@@ -632,7 +757,7 @@ export declare class VoltrClient extends AccountUtils {
632
757
  admin: PublicKey;
633
758
  vault: PublicKey;
634
759
  strategy: PublicKey;
635
- adaptorProgram?: PublicKey;
760
+ adaptorProgram: PublicKey;
636
761
  }): Promise<TransactionInstruction>;
637
762
  /**
638
763
  * Creates an instruction to withdraw assets from a direct withdraw strategy
@@ -675,7 +800,7 @@ export declare class VoltrClient extends AccountUtils {
675
800
  strategy: PublicKey;
676
801
  vaultAssetMint: PublicKey;
677
802
  assetTokenProgram: PublicKey;
678
- adaptorProgram?: PublicKey;
803
+ adaptorProgram: PublicKey;
679
804
  remainingAccounts: Array<{
680
805
  pubkey: PublicKey;
681
806
  isSigner: boolean;
@@ -683,19 +808,20 @@ export declare class VoltrClient extends AccountUtils {
683
808
  }>;
684
809
  }): Promise<TransactionInstruction>;
685
810
  /**
686
- * Creates an instruction to withdraw assets from a strategy via direct withdrawal with tolerance
687
- * @param {Object} args - Arguments for the withdrawal
688
- * @param {Buffer | null} args.userArgs - Optional user arguments
689
- * @param {BN} args.tolerance - Tolerance amount for the withdrawal
811
+ * Creates an instruction to withdraw assets from a direct withdraw strategy with slippage tolerance
812
+ *
813
+ * @param {Object} directWithdrawArgs - Withdrawal arguments
814
+ * @param {Buffer | null} [directWithdrawArgs.userArgs] - Optional user arguments for the instruction
815
+ * @param {BN} directWithdrawArgs.tolerance - Slippage tolerance in asset amount (max difference between requested and actual)
690
816
  * @param {Object} params - Parameters for withdrawing assets from direct withdraw strategy
691
817
  * @param {PublicKey} params.user - Public key of the user
692
818
  * @param {PublicKey} params.vault - Public key of the vault
693
819
  * @param {PublicKey} params.strategy - Public key of the strategy
694
820
  * @param {PublicKey} params.vaultAssetMint - Public key of the vault asset mint
695
821
  * @param {PublicKey} params.assetTokenProgram - Public key of the asset token program
696
- * @param {PublicKey} params.adaptorProgram - Public key of the adaptor program
822
+ * @param {PublicKey} [params.adaptorProgram] - Public key of the adaptor program (defaults to lending adaptor)
697
823
  * @param {Array<{ pubkey: PublicKey, isSigner: boolean, isWritable: boolean }>} params.remainingAccounts - Remaining accounts for the instruction
698
- * @returns {Promise<TransactionInstruction>} Transaction instruction for withdrawing assets from direct withdraw strategy with tolerance
824
+ * @returns {Promise<TransactionInstruction>} Transaction instruction for direct withdraw with tolerance
699
825
  * @throws {Error} If instruction creation fails
700
826
  *
701
827
  * @example
@@ -703,7 +829,7 @@ export declare class VoltrClient extends AccountUtils {
703
829
  * const ix = await client.createDirectWithdrawStrategyWithToleranceIx(
704
830
  * {
705
831
  * userArgs: Buffer.from('...'),
706
- * tolerance: new BN(1)
832
+ * tolerance: new BN(1000),
707
833
  * },
708
834
  * {
709
835
  * user: userPubkey,
@@ -711,8 +837,7 @@ export declare class VoltrClient extends AccountUtils {
711
837
  * strategy: strategyPubkey,
712
838
  * vaultAssetMint: mintPubkey,
713
839
  * assetTokenProgram: tokenProgramPubkey,
714
- * adaptorProgram: adaptorProgramPubkey,
715
- * remainingAccounts: []
840
+ * remainingAccounts: [],
716
841
  * }
717
842
  * );
718
843
  * ```
@@ -726,7 +851,113 @@ export declare class VoltrClient extends AccountUtils {
726
851
  strategy: PublicKey;
727
852
  vaultAssetMint: PublicKey;
728
853
  assetTokenProgram: PublicKey;
729
- adaptorProgram?: PublicKey;
854
+ adaptorProgram: PublicKey;
855
+ remainingAccounts: Array<{
856
+ pubkey: PublicKey;
857
+ isSigner: boolean;
858
+ isWritable: boolean;
859
+ }>;
860
+ }): Promise<TransactionInstruction>;
861
+ /**
862
+ * Creates an instant withdraw instruction for a strategy (no waiting period, withdraws directly from strategy)
863
+ *
864
+ * @param {InstantWithdrawStrategyArgs} args - Instant withdrawal arguments
865
+ * @param {BN} args.amount - Amount to withdraw (in LP tokens or asset, depending on isAmountInLp)
866
+ * @param {boolean} args.isAmountInLp - Whether the amount is denominated in LP tokens
867
+ * @param {boolean} args.isWithdrawAll - Whether to withdraw all user's LP tokens
868
+ * @param {Buffer | null} [args.userArgs] - Optional user arguments passed to the adaptor
869
+ * @param {Object} params - Instant withdraw strategy parameters
870
+ * @param {PublicKey} params.userTransferAuthority - Public key of the user's transfer authority
871
+ * @param {PublicKey} params.vault - Public key of the vault
872
+ * @param {PublicKey} params.strategy - Public key of the strategy
873
+ * @param {PublicKey} params.vaultAssetMint - Public key of the vault asset mint
874
+ * @param {PublicKey} params.assetTokenProgram - Public key of the asset token program
875
+ * @param {PublicKey} [params.adaptorProgram] - Public key of the adaptor program (defaults to lending adaptor)
876
+ * @param {Array<{ pubkey: PublicKey, isSigner: boolean, isWritable: boolean }>} params.remainingAccounts - Remaining accounts for the instruction
877
+ * @returns {Promise<TransactionInstruction>} Transaction instruction for instant strategy withdrawal
878
+ * @throws {Error} If the vault's withdrawal waiting period is not zero
879
+ *
880
+ * @example
881
+ * ```typescript
882
+ * const ix = await client.createInstantWithdrawStrategyIx(
883
+ * {
884
+ * amount: new BN('1000000000'),
885
+ * isAmountInLp: true,
886
+ * isWithdrawAll: false,
887
+ * },
888
+ * {
889
+ * userTransferAuthority: userPubkey,
890
+ * vault: vaultPubkey,
891
+ * strategy: strategyPubkey,
892
+ * vaultAssetMint: mintPubkey,
893
+ * assetTokenProgram: tokenProgramPubkey,
894
+ * remainingAccounts: [],
895
+ * }
896
+ * );
897
+ * ```
898
+ */
899
+ createInstantWithdrawStrategyIx({ amount, isAmountInLp, isWithdrawAll, userArgs, }: InstantWithdrawStrategyArgs, { userTransferAuthority, vault, strategy, vaultAssetMint, assetTokenProgram, adaptorProgram, remainingAccounts, }: {
900
+ userTransferAuthority: PublicKey;
901
+ vault: PublicKey;
902
+ strategy: PublicKey;
903
+ vaultAssetMint: PublicKey;
904
+ assetTokenProgram: PublicKey;
905
+ adaptorProgram: PublicKey;
906
+ remainingAccounts: Array<{
907
+ pubkey: PublicKey;
908
+ isSigner: boolean;
909
+ isWritable: boolean;
910
+ }>;
911
+ }): Promise<TransactionInstruction>;
912
+ /**
913
+ * Creates an instant withdraw instruction for a strategy with slippage tolerance
914
+ *
915
+ * @param {InstantWithdrawStrategyArgs & { tolerance: BN }} args - Instant withdrawal arguments with tolerance
916
+ * @param {BN} args.amount - Amount to withdraw (in LP tokens or asset, depending on isAmountInLp)
917
+ * @param {boolean} args.isAmountInLp - Whether the amount is denominated in LP tokens
918
+ * @param {boolean} args.isWithdrawAll - Whether to withdraw all user's LP tokens
919
+ * @param {Buffer | null} [args.userArgs] - Optional user arguments passed to the adaptor
920
+ * @param {BN} args.tolerance - Slippage tolerance in asset amount (max difference between requested and actual)
921
+ * @param {Object} params - Instant withdraw strategy parameters
922
+ * @param {PublicKey} params.userTransferAuthority - Public key of the user's transfer authority
923
+ * @param {PublicKey} params.vault - Public key of the vault
924
+ * @param {PublicKey} params.strategy - Public key of the strategy
925
+ * @param {PublicKey} params.vaultAssetMint - Public key of the vault asset mint
926
+ * @param {PublicKey} params.assetTokenProgram - Public key of the asset token program
927
+ * @param {PublicKey} [params.adaptorProgram] - Public key of the adaptor program (defaults to lending adaptor)
928
+ * @param {Array<{ pubkey: PublicKey, isSigner: boolean, isWritable: boolean }>} params.remainingAccounts - Remaining accounts for the instruction
929
+ * @returns {Promise<TransactionInstruction>} Transaction instruction for instant strategy withdrawal with tolerance
930
+ * @throws {Error} If the vault's withdrawal waiting period is not zero
931
+ *
932
+ * @example
933
+ * ```typescript
934
+ * const ix = await client.createInstantWithdrawStrategyWithToleranceIx(
935
+ * {
936
+ * amount: new BN('1000000000'),
937
+ * isAmountInLp: true,
938
+ * isWithdrawAll: false,
939
+ * tolerance: new BN(1000),
940
+ * },
941
+ * {
942
+ * userTransferAuthority: userPubkey,
943
+ * vault: vaultPubkey,
944
+ * strategy: strategyPubkey,
945
+ * vaultAssetMint: mintPubkey,
946
+ * assetTokenProgram: tokenProgramPubkey,
947
+ * remainingAccounts: [],
948
+ * }
949
+ * );
950
+ * ```
951
+ */
952
+ createInstantWithdrawStrategyWithToleranceIx({ amount, isAmountInLp, isWithdrawAll, userArgs, tolerance, }: InstantWithdrawStrategyArgs & {
953
+ tolerance: BN;
954
+ }, { userTransferAuthority, vault, strategy, vaultAssetMint, assetTokenProgram, adaptorProgram, remainingAccounts, }: {
955
+ userTransferAuthority: PublicKey;
956
+ vault: PublicKey;
957
+ strategy: PublicKey;
958
+ vaultAssetMint: PublicKey;
959
+ assetTokenProgram: PublicKey;
960
+ adaptorProgram: PublicKey;
730
961
  remainingAccounts: Array<{
731
962
  pubkey: PublicKey;
732
963
  isSigner: boolean;
@@ -808,6 +1039,26 @@ export declare class VoltrClient extends AccountUtils {
808
1039
  vault: PublicKey;
809
1040
  admin: PublicKey;
810
1041
  }): Promise<TransactionInstruction>;
1042
+ /**
1043
+ * Creates an instruction to calibrate the high water mark without fee clawback (unsafe)
1044
+ * @param {Object} params - Parameters for calibrating the high water mark
1045
+ * @param {PublicKey} params.vault - Public key of the vault (must be whitelisted)
1046
+ * @param {PublicKey} params.admin - Public key of the admin
1047
+ * @returns {Promise<TransactionInstruction>} Transaction instruction for unsafe calibration
1048
+ * @throws {Error} If instruction creation fails or vault is not whitelisted
1049
+ *
1050
+ * @example
1051
+ * ```typescript
1052
+ * const ix = await client.createCalibrateHighWaterMarkUnsafeIx({
1053
+ * vault: vaultPubkey,
1054
+ * admin: adminPubkey,
1055
+ * });
1056
+ * ```
1057
+ */
1058
+ createCalibrateHighWaterMarkUnsafeIx({ vault, admin, }: {
1059
+ vault: PublicKey;
1060
+ admin: PublicKey;
1061
+ }): Promise<TransactionInstruction>;
811
1062
  /**
812
1063
  * Creates an instruction to create LP metadata
813
1064
  * @param {Object} createLpMetadataArgs - Parameters for creating LP metadata
@@ -839,6 +1090,34 @@ export declare class VoltrClient extends AccountUtils {
839
1090
  admin: PublicKey;
840
1091
  vault: PublicKey;
841
1092
  }): Promise<TransactionInstruction>;
1093
+ /**
1094
+ * Creates an instruction to update per-vault protocol fees (admin-only, protocol level)
1095
+ *
1096
+ * @param {ProtocolFeeField} field - The protocol fee field to update
1097
+ * @param {number} feeBps - The new fee value in basis points
1098
+ * @param {Object} params - Parameters for updating the protocol fee
1099
+ * @param {PublicKey} params.admin - Public key of the protocol admin
1100
+ * @param {PublicKey} params.vault - Public key of the vault
1101
+ * @returns {Promise<TransactionInstruction>} Transaction instruction for updating the protocol fee
1102
+ *
1103
+ * @throws {Error} If the total fee (protocol + admin + manager) exceeds 10000 BPS
1104
+ *
1105
+ * @example
1106
+ * ```typescript
1107
+ * const ix = await client.createUpdateVaultProtocolFeeIx(
1108
+ * ProtocolFeeField.ProtocolPerformanceFee,
1109
+ * 500, // 5%
1110
+ * {
1111
+ * admin: protocolAdminPubkey,
1112
+ * vault: vaultPubkey,
1113
+ * }
1114
+ * );
1115
+ * ```
1116
+ */
1117
+ createUpdateVaultProtocolFeeIx(field: ProtocolFeeField, feeBps: number, { admin, vault, }: {
1118
+ admin: PublicKey;
1119
+ vault: PublicKey;
1120
+ }): Promise<TransactionInstruction>;
842
1121
  /**
843
1122
  * Fetches all strategy init receipt accounts
844
1123
  * @returns Promise resolving to an array of strategy init receipt accounts
@@ -925,6 +1204,24 @@ export declare class VoltrClient extends AccountUtils {
925
1204
  * @param vault - Public key of the vault
926
1205
  * @returns Promise resolving to the vault account data
927
1206
  */
1207
+ /**
1208
+ * Fetches the protocol account's data
1209
+ * @returns Promise resolving to the protocol account data
1210
+ *
1211
+ * @example
1212
+ * ```typescript
1213
+ * const protocolAccount = await client.fetchProtocolAccount();
1214
+ * ```
1215
+ */
1216
+ fetchProtocolAccount(): Promise<{
1217
+ admin: PublicKey;
1218
+ operationalState: number;
1219
+ padding1: number[];
1220
+ bump: number;
1221
+ padding0: number[];
1222
+ pendingAdmin: PublicKey;
1223
+ reserved: number[];
1224
+ }>;
928
1225
  fetchVaultAccount(vault: PublicKey): Promise<{
929
1226
  name: number[];
930
1227
  description: number[];
@@ -1087,6 +1384,17 @@ export declare class VoltrClient extends AccountUtils {
1087
1384
  * ```
1088
1385
  */
1089
1386
  getAccumulatedManagerFeesForVault(vault: PublicKey): Promise<BN>;
1387
+ /**
1388
+ * Fetches the accumulated protocol fees for a vault
1389
+ * @param vault - Public key of the vault
1390
+ * @returns Promise resolving to the accumulated protocol fees
1391
+ *
1392
+ * @example
1393
+ * ```typescript
1394
+ * const accumulatedProtocolFees = await client.getAccumulatedProtocolFeesForVault(vaultPubkey);
1395
+ * ```
1396
+ */
1397
+ getAccumulatedProtocolFeesForVault(vault: PublicKey): Promise<BN>;
1090
1398
  /**
1091
1399
  * Fetches the current asset per LP for a vault
1092
1400
  * @param vault - Public key of the vault
@@ -1175,7 +1483,7 @@ export declare class VoltrClient extends AccountUtils {
1175
1483
  * Helper to calculate only the pending (unrealised) LP fees based on time elapsed.
1176
1484
  */
1177
1485
  private calculateUnrealisedLpFees;
1178
- calculateAssetsForWithdrawHelper(vaultTotalValue: BN, vaultLastUpdatedLockedProfit: BN, vaultLockedProfitDegradationDuration: BN, vaultAccumulatedLpAdminFees: BN, vaultAccumulatedLpManagerFees: BN, vaultAccumulatedLpProtocolFees: BN, vaultRedemptionFeeBps: number, vaultManagementFeeBps: number, vaultLastManagementFeeUpdateTs: BN, lpSupply: BN, lpAmount: BN): BN;
1486
+ calculateAssetsForWithdrawHelper(vaultTotalValue: BN, vaultLastUpdatedLockedProfit: BN, vaultLockedProfitDegradationDuration: BN, vaultAccumulatedLpAdminFees: BN, vaultAccumulatedLpManagerFees: BN, vaultAccumulatedLpProtocolFees: BN, vaultRedemptionFeeBps: number, vaultManagementFeeBps: number, vaultLastManagementFeeUpdateTs: BN, lpSupply: BN, lpAmount: BN, deadWeight?: BN): BN;
1179
1487
  /**
1180
1488
  * Calculates the amount of assets that would be received for a given LP token amount
1181
1489
  *