@voltr/vault-sdk 1.0.6 → 1.0.7
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 +26 -0
- package/dist/client.js +31 -0
- package/dist/idl/voltr_vault.json +1101 -45
- package/dist/types/voltr_vault.d.ts +1101 -45
- package/package.json +2 -2
package/dist/client.d.ts
CHANGED
|
@@ -645,6 +645,32 @@ export declare class VoltrClient extends AccountUtils {
|
|
|
645
645
|
protocolAdmin: PublicKey;
|
|
646
646
|
vault: PublicKey;
|
|
647
647
|
}): Promise<TransactionInstruction>;
|
|
648
|
+
/**
|
|
649
|
+
* Creates an instruction to close a strategy
|
|
650
|
+
* @param {Object} params - Parameters for closing strategy
|
|
651
|
+
* @param {PublicKey} params.payer - Public key of the payer
|
|
652
|
+
* @param {PublicKey} params.manager - Public key of the manager
|
|
653
|
+
* @param {PublicKey} params.vault - Public key of the vault
|
|
654
|
+
* @param {PublicKey} params.strategy - Public key of the strategy
|
|
655
|
+
* @returns {Promise<TransactionInstruction>} Transaction instruction for closing strategy
|
|
656
|
+
* @throws {Error} If instruction creation fails
|
|
657
|
+
*
|
|
658
|
+
* @example
|
|
659
|
+
* ```typescript
|
|
660
|
+
* const ix = await client.createCloseStrategyIx({
|
|
661
|
+
* payer: payerPubkey,
|
|
662
|
+
* manager: managerPubkey,
|
|
663
|
+
* vault: vaultPubkey,
|
|
664
|
+
* strategy: strategyPubkey,
|
|
665
|
+
* });
|
|
666
|
+
* ```
|
|
667
|
+
*/
|
|
668
|
+
createCloseStrategyIx({ payer, manager, vault, strategy, }: {
|
|
669
|
+
payer: PublicKey;
|
|
670
|
+
manager: PublicKey;
|
|
671
|
+
vault: PublicKey;
|
|
672
|
+
strategy: PublicKey;
|
|
673
|
+
}): Promise<TransactionInstruction>;
|
|
648
674
|
/**
|
|
649
675
|
* Fetches all strategy init receipt accounts
|
|
650
676
|
* @returns Promise resolving to an array of strategy init receipt accounts
|
package/dist/client.js
CHANGED
|
@@ -831,6 +831,37 @@ class VoltrClient extends AccountUtils {
|
|
|
831
831
|
})
|
|
832
832
|
.instruction();
|
|
833
833
|
}
|
|
834
|
+
/**
|
|
835
|
+
* Creates an instruction to close a strategy
|
|
836
|
+
* @param {Object} params - Parameters for closing strategy
|
|
837
|
+
* @param {PublicKey} params.payer - Public key of the payer
|
|
838
|
+
* @param {PublicKey} params.manager - Public key of the manager
|
|
839
|
+
* @param {PublicKey} params.vault - Public key of the vault
|
|
840
|
+
* @param {PublicKey} params.strategy - Public key of the strategy
|
|
841
|
+
* @returns {Promise<TransactionInstruction>} Transaction instruction for closing strategy
|
|
842
|
+
* @throws {Error} If instruction creation fails
|
|
843
|
+
*
|
|
844
|
+
* @example
|
|
845
|
+
* ```typescript
|
|
846
|
+
* const ix = await client.createCloseStrategyIx({
|
|
847
|
+
* payer: payerPubkey,
|
|
848
|
+
* manager: managerPubkey,
|
|
849
|
+
* vault: vaultPubkey,
|
|
850
|
+
* strategy: strategyPubkey,
|
|
851
|
+
* });
|
|
852
|
+
* ```
|
|
853
|
+
*/
|
|
854
|
+
async createCloseStrategyIx({ payer, manager, vault, strategy, }) {
|
|
855
|
+
return await this.vaultProgram.methods
|
|
856
|
+
.closeStrategy()
|
|
857
|
+
.accounts({
|
|
858
|
+
payer,
|
|
859
|
+
manager,
|
|
860
|
+
vault,
|
|
861
|
+
strategy,
|
|
862
|
+
})
|
|
863
|
+
.instruction();
|
|
864
|
+
}
|
|
834
865
|
// --------------------------------------- Account Fetching All
|
|
835
866
|
/**
|
|
836
867
|
* Fetches all strategy init receipt accounts
|