Class VoltrClient

Main client for interacting with the Voltr protocol

The VoltrClient provides methods for initializing and managing vaults, handling strategies, and performing deposits/withdrawals. It requires a Solana connection and optionally accepts a wallet for signing transactions.

import { VoltrClient } from '@voltr/sdk';
import { Connection } from '@solana/web3.js';

const connection = new Connection('https://api.mainnet-beta.solana.com');
const client = new VoltrClient(connection);

Hierarchy

  • AccountUtils
    • VoltrClient

Constructors

  • Creates a new VoltrClient instance

    Parameters

    • conn: Connection

      Solana connection instance

    • Optionalwallet: Keypair

      Optional keypair for signing transactions

    Returns VoltrClient

Properties

conn: Connection
provider: AnchorProvider
vaultIdl: Idl
vaultProgram: Program<VoltrVault>

Methods

  • Calculates the amount of assets that would be received for a given LP token amount

    Parameters

    • vaultPk: PublicKey

      Public key of the vault

    • lpAmount: BN

      Amount of LP tokens to calculate for

    Returns Promise<BN>

    Promise resolving to the amount of assets that would be received

    If LP supply or total assets are invalid

    If math overflow occurs during calculation

    const assetsToReceive = await client.calculateAssetsForWithdraw(
    vaultPubkey,
    new BN('1000000000')
    );
  • Parameters

    • lastUpdatedLockedProfit: BN
    • lockedProfitDegradationDuration: BN
    • currentTime: BN

    Returns BN

  • Calculates the amount of LP tokens that would be received for a given asset deposit

    Parameters

    • vaultPk: PublicKey

      Public key of the vault

    • assetAmount: BN

      Amount of assets to deposit

    Returns Promise<BN>

    Promise resolving to the amount of LP tokens that would be received

    If math overflow occurs during calculation

    const lpTokens = await client.calculateLpTokensForDeposit(
    vaultPubkey
    new BN('1000000000'),
    );
  • Calculates the amount of LP tokens that would be burned for a given asset amount

    Parameters

    • vaultPk: PublicKey

      Public key of the vault

    • assetAmount: BN

      Amount of assets to calculate for

    Returns Promise<BN>

    Promise resolving to the amount of LP tokens that would be burned

    If LP supply or total assets are invalid

    If math overflow occurs during calculation

    const lpTokensToBurn = await client.calculateLpForWithdraw(
    vaultPubkey,
    new BN('1000000000')
    );
  • Creates an instruction to add an adaptor to a vault

    Parameters

    • params: {
          adaptorProgram?: PublicKey;
          admin: PublicKey;
          payer: PublicKey;
          vault: PublicKey;
      }

      Parameters for adding adaptor to vault

      • OptionaladaptorProgram?: PublicKey

        Public key of the adaptor program

      • admin: PublicKey

        Public key of the admin

      • payer: PublicKey

        Public key of the payer

      • vault: PublicKey

        Public key of the vault

    Returns Promise<TransactionInstruction>

    Transaction instruction for adding adaptor to vault

    If the instruction creation fails

    const ix = await client.createAddAdaptorIx({
    vault: vaultPubkey,
    payer: payerPubkey,
    admin: adminPubkey,
    adaptorProgram: adaptorProgramPubkey
    });
  • Creates a cancel withdraw instruction for a vault

    Parameters

    • params: { userAuthority: PublicKey; vault: PublicKey }

      Cancel withdraw request parameters

      • userAuthority: PublicKey

        Public key of the user authority

      • vault: PublicKey

        Public key of the vault

    Returns Promise<TransactionInstruction>

    Transaction instruction for withdrawal

    If the instruction creation fails

    const ix = await client.createCancelRequestWithdrawVaultIx(
    {
    userAuthority: userPubkey,
    vault: vaultPubkey,
    }
    );
  • Creates an instruction to deposit assets into a strategy

    Parameters

    • depositArgs: DepositStrategyArgs

      Deposit arguments

      • OptionaladditionalArgs?: null | Buffer<ArrayBufferLike>
      • depositAmount: BN
      • OptionalinstructionDiscriminator?: null | Buffer<ArrayBufferLike>
    • params: {
          adaptorProgram?: PublicKey;
          assetTokenProgram: PublicKey;
          manager: PublicKey;
          remainingAccounts: {
              isSigner: boolean;
              isWritable: boolean;
              pubkey: PublicKey;
          }[];
          strategy: PublicKey;
          vault: PublicKey;
          vaultAssetMint: PublicKey;
      }

      Strategy deposit parameters

      • OptionaladaptorProgram?: PublicKey

        Public key of the adaptor program

      • assetTokenProgram: PublicKey

        Public key of the asset token program

      • manager: PublicKey

        Public key of the manager

      • remainingAccounts: { isSigner: boolean; isWritable: boolean; pubkey: PublicKey }[]

        Remaining accounts for the instruction

      • strategy: PublicKey

        Public key of the strategy

      • vault: PublicKey

        Public key of the vault

      • vaultAssetMint: PublicKey

        Public key of the vault asset mint

    Returns Promise<TransactionInstruction>

    Transaction instruction for depositing assets into strategy

    If the instruction creation fails

    const ix = await client.createDepositStrategyIx(
    {
    depositAmount: new BN('1000000000'),
    instructionDiscriminator: Buffer.from('...'),
    additionalArgs: Buffer.from('...')
    },
    {
    manager: managerPubkey,
    vault: vaultPubkey,
    vaultAssetMint: mintPubkey,
    strategy: strategyPubkey,
    assetTokenProgram: tokenProgramPubkey,
    adaptorProgram: adaptorProgramPubkey,
    remainingAccounts: []
    }
    );
  • Creates a deposit instruction for a vault

    Parameters

    • amount: BN

      Amount of tokens to deposit

    • params: {
          assetTokenProgram: PublicKey;
          userAuthority: PublicKey;
          vault: PublicKey;
          vaultAssetMint: PublicKey;
      }

      Deposit parameters

      • assetTokenProgram: PublicKey

        Public key of the asset token program

      • userAuthority: PublicKey

        Public key of the user's transfer authority

      • vault: PublicKey

        Public key of the vault

      • vaultAssetMint: PublicKey

        Public key of the vault asset mint

    Returns Promise<TransactionInstruction>

    Transaction instruction for depositing tokens

    If instruction creation fails

    const ix = await client.createDepositVaultIx(
    new BN('1000000000'),
    {
    userAuthority: userPubkey,
    vault: vaultPubkey,
    vaultAssetMint: mintPubkey,
    assetTokenProgram: tokenProgramPubkey
    }
    );
  • Creates an instruction to withdraw assets from a direct withdraw strategy

    Parameters

    • directWithdrawArgs: { userArgs?: null | Buffer<ArrayBufferLike> }

      Withdrawal arguments

      • OptionaluserArgs?: null | Buffer<ArrayBufferLike>

        Optional user arguments for the instruction

    • params: {
          adaptorProgram?: PublicKey;
          assetTokenProgram: PublicKey;
          remainingAccounts: {
              isSigner: boolean;
              isWritable: boolean;
              pubkey: PublicKey;
          }[];
          strategy: PublicKey;
          user: PublicKey;
          vault: PublicKey;
          vaultAssetMint: PublicKey;
      }

      Parameters for withdrawing assets from direct withdraw strategy

      • OptionaladaptorProgram?: PublicKey

        Public key of the adaptor program

      • assetTokenProgram: PublicKey

        Public key of the asset token program

      • remainingAccounts: { isSigner: boolean; isWritable: boolean; pubkey: PublicKey }[]

        Remaining accounts for the instruction

      • strategy: PublicKey

        Public key of the strategy

      • user: PublicKey

        Public key of the user

      • vault: PublicKey

        Public key of the vault

      • vaultAssetMint: PublicKey

        Public key of the vault asset mint

    Returns Promise<TransactionInstruction>

    Transaction instruction for withdrawing assets from direct withdraw strategy

    If instruction creation fails

    const ix = await client.createDirectWithdrawStrategyIx(
    {
    userArgs: Buffer.from('...')
    },
    {
    user: userPubkey,
    vault: vaultPubkey,
    strategy: strategyPubkey,
    vaultAssetMint: mintPubkey,
    assetTokenProgram: tokenProgramPubkey,
    adaptorProgram: adaptorProgramPubkey,
    remainingAccounts: []
    }
    );
  • Creates an instruction to initialize a direct withdraw strategy

    Parameters

    • initArgs: InitializeDirectWithdrawStrategyArgs

      Arguments for initializing direct withdraw strategy

      • OptionaladditionalArgs?: null | Buffer<ArrayBufferLike>
      • OptionalallowUserArgs?: boolean
      • OptionalinstructionDiscriminator?: null | Buffer<ArrayBufferLike>
    • params: {
          adaptorProgram?: PublicKey;
          admin: PublicKey;
          payer: PublicKey;
          strategy: PublicKey;
          vault: PublicKey;
      }

      Parameters for initializing direct withdraw strategy

      • OptionaladaptorProgram?: PublicKey

        Public key of the adaptor program

      • admin: PublicKey

        Public key of the admin

      • payer: PublicKey

        Public key of the payer

      • strategy: PublicKey

        Public key of the strategy

      • vault: PublicKey

        Public key of the vault

    Returns Promise<TransactionInstruction>

    Transaction instruction for initializing direct withdraw strategy

    If instruction creation fails

    const ix = await client.createInitializeDirectWithdrawStrategyIx(
    {
    instructionDiscriminator: Buffer.from('...'),
    additionalArgs: Buffer.from('...'),
    allowUserArgs: true
    },
    {
    payer: payerPubkey,
    admin: adminPubkey,
    vault: vaultPubkey,
    strategy: strategyPubkey,
    adaptorProgram: adaptorProgramPubkey
    }
    );
  • Creates an instruction to initialize a strategy to a vault

    Parameters

    • initArgs: InitializeStrategyArgs

      Arguments for strategy initialization

      • OptionaladditionalArgs?: null | Buffer<ArrayBufferLike>
      • OptionalinstructionDiscriminator?: null | Buffer<ArrayBufferLike>
    • Optionalparams: {
          adaptorProgram?: PublicKey;
          manager: PublicKey;
          payer: PublicKey;
          remainingAccounts: {
              isSigner: boolean;
              isWritable: boolean;
              pubkey: PublicKey;
          }[];
          strategy: PublicKey;
          vault: PublicKey;
      }

      Parameters for initializing strategy to vault

      • OptionaladaptorProgram?: PublicKey

        Public key of the adaptor program

      • manager: PublicKey

        Public key of the manager

      • payer: PublicKey

        Public key of the payer

      • remainingAccounts: { isSigner: boolean; isWritable: boolean; pubkey: PublicKey }[]

        Remaining accounts for the instruction

      • strategy: PublicKey

        Public key of the strategy

      • vault: PublicKey

        Public key of the vault

    Returns Promise<TransactionInstruction>

    Transaction instruction for initializing strategy to vault

    If the instruction creation fails

    const ix = await client.createInitializeStrategyIx(
    {
    instructionDiscriminator: Buffer.from('...'), // optional
    additionalArgs: Buffer.from('...') // optional
    },
    {
    payer: payerPubkey,
    vault: vaultPubkey,
    manager: managerPubkey,
    strategy: strategyPubkey,
    adaptorProgram: adaptorProgramPubkey,
    remainingAccounts: []
    }
    );
  • Creates an instruction to initialize a new vault

    Parameters

    • vaultParams: VaultParams

      Configuration parameters for the vault

    • params: {
          admin: PublicKey;
          manager: PublicKey;
          payer: PublicKey;
          vault: Keypair;
          vaultAssetMint: PublicKey;
      }

      Additional parameters for initializing the vault

      • admin: PublicKey

        Public key of the vault admin

      • manager: PublicKey

        Public key of the vault manager

      • payer: PublicKey

        Public key of the fee payer

      • vault: Keypair

        Keypair for the new vault

      • vaultAssetMint: PublicKey

        Public key of the vault's asset mint

    Returns Promise<TransactionInstruction>

    Transaction instruction for initializing the vault

    const ix = await client.createInitializeVaultIx(
    {
    config: {
    maxCap: new BN('1000000000'),
    startAtTs: new BN(Math.floor(Date.now() / 1000)),
    lockedProfitDegradationDuration: new BN(3600), // 1 hour
    redemptionFee: 10,
    issuanceFee: 10,
    withdrawalWaitingPeriod: new BN(3600), // 1 hour
    managerManagementFee: 50, // 0.5%
    managerPerformanceFee: 1000, // 10%
    adminManagementFee: 50, // 0.5%
    adminPerformanceFee: 1000, // 10%
    },
    name: "My Vault",
    description: "Example vault"
    },
    {
    vault: vaultKeypair,
    vaultAssetMint: new PublicKey('...'),
    admin: adminPubkey,
    manager: managerPubkey,
    payer: payerPubkey
    }
    );
  • Creates an instruction to remove a strategy from a vault

    Parameters

    • params: { adaptorProgram?: PublicKey; admin: PublicKey; vault: PublicKey }

      Parameters for removing strategy

      • OptionaladaptorProgram?: PublicKey

        Public key of the adaptor program

      • admin: PublicKey

        Public key of the admin

      • vault: PublicKey

        Public key of the vault

    Returns Promise<TransactionInstruction>

    Transaction instruction for removing adaptor from vault

    If instruction creation fails

    const ix = await client.createRemoveAdaptorIx({
    vault: vaultPubkey,
    admin: adminPubkey,
    adaptorProgram: adaptorProgramPubkey
    });
  • Creates a request withdraw instruction for a vault

    Parameters

    • requestWithdrawArgs: RequestWithdrawVaultArgs

      Arguments for withdrawing from the vault

      • amount: BN
      • isAmountInLp: boolean
      • isWithdrawAll: boolean
    • params: { payer: PublicKey; userAuthority: PublicKey; vault: PublicKey }

      Request withdraw parameters

      • payer: PublicKey

        Public key of the payer

      • userAuthority: PublicKey

        Public key of the user authority

      • vault: PublicKey

        Public key of the vault

    Returns Promise<TransactionInstruction>

    Transaction instruction for withdrawal

    If the instruction creation fails

    const ix = await client.createRequestWithdrawVaultIx(
    {
    amount: new BN('1000000000'),
    isAmountInLp: true,
    isWithdrawAll: false,
    },
    {
    payer: payerPubkey,
    userAuthority: userPubkey,
    vault: vaultPubkey,
    }
    );
  • Creates an instruction to update a vault

    Parameters

    • vaultConfig: VaultConfig

      Configuration parameters for the vault

      • adminManagementFee: number
      • adminPerformanceFee: number
      • issuanceFee: number
      • lockedProfitDegradationDuration: BN
      • managerManagementFee: number
      • managerPerformanceFee: number
      • maxCap: BN
      • redemptionFee: number
      • startAtTs: BN
      • withdrawalWaitingPeriod: BN
    • params: { admin: PublicKey; vault: PublicKey }

      Parameters for updating the vault

      • admin: PublicKey

        Public key of the vault admin

      • vault: PublicKey

        Public key of the vault

    Returns Promise<TransactionInstruction>

    Transaction instruction for updating the vault

    const ix = await client.createUpdateVaultIx(
    {
    maxCap: new BN('1000000000'),
    startAtTs: new BN(Math.floor(Date.now() / 1000)),
    managerManagementFee: 50,
    managerPerformanceFee: 1000,
    adminManagementFee: 50,
    adminPerformanceFee: 1000,
    },
    { vault: vaultPubkey, admin: adminPubkey }
    );
  • Creates an instruction to withdraw assets from a strategy

    Parameters

    • withdrawArgs: WithdrawStrategyArgs

      Withdrawal arguments

      • OptionaladditionalArgs?: null | Buffer<ArrayBufferLike>
      • OptionalinstructionDiscriminator?: null | Buffer<ArrayBufferLike>
      • withdrawAmount: BN
    • params: {
          adaptorProgram?: PublicKey;
          assetTokenProgram: PublicKey;
          manager: PublicKey;
          remainingAccounts: {
              isSigner: boolean;
              isWritable: boolean;
              pubkey: PublicKey;
          }[];
          strategy: PublicKey;
          vault: PublicKey;
          vaultAssetMint: PublicKey;
      }

      Strategy withdrawal parameters

      • OptionaladaptorProgram?: PublicKey

        Public key of the adaptor program

      • assetTokenProgram: PublicKey

        Public key of the asset token program

      • manager: PublicKey
      • remainingAccounts: { isSigner: boolean; isWritable: boolean; pubkey: PublicKey }[]

        Remaining accounts for the instruction

      • strategy: PublicKey

        Public key of the strategy

      • vault: PublicKey

        Public key of the vault

      • vaultAssetMint: PublicKey

        Public key of the vault asset mint

    Returns Promise<TransactionInstruction>

    Transaction instruction for withdrawing assets from strategy

    If the instruction creation fails

    const ix = await client.createWithdrawStrategyIx(
    {
    withdrawAmount: new BN('1000000000'),
    instructionDiscriminator: Buffer.from('...'),
    additionalArgs: Buffer.from('...')
    },
    {
    vault: vaultPubkey,
    vaultAssetMint: mintPubkey,
    strategy: strategyPubkey,
    assetTokenProgram: tokenProgramPubkey,
    adaptorProgram: adaptorProgramPubkey,
    remainingAccounts: []
    }
    );
  • Creates a withdraw instruction for a vault

    Parameters

    • params: {
          assetTokenProgram: PublicKey;
          userAuthority: PublicKey;
          vault: PublicKey;
          vaultAssetMint: PublicKey;
      }

      Withdraw parameters

      • assetTokenProgram: PublicKey

        Public key of the asset token program

      • userAuthority: PublicKey

        Public key of the user authority

      • vault: PublicKey

        Public key of the vault

      • vaultAssetMint: PublicKey

        Public key of the vault asset mint

    Returns Promise<TransactionInstruction>

    Transaction instruction for withdrawal

    If the instruction creation fails

    const ix = await client.createWithdrawVaultIx(
    {
    userAuthority: userPubkey,
    vault: vaultPubkey,
    vaultAssetMint: mintPubkey,
    assetTokenProgram: tokenProgramPubkey
    }
    );
  • Fetches an adaptor add receipt account's data

    Parameters

    • adaptorAddReceipt: PublicKey

      Public key of the adaptor add receipt account

    Returns Promise<
        {
            adaptorProgram: PublicKey;
            bump: number;
            isActive: boolean;
            lastUpdatedEpoch: BN;
            padding0: number[];
            reserved: number[];
            vault: PublicKey;
            version: number;
        },
    >

    Promise resolving to the adaptor add receipt account data

    const adaptorAddReceiptAccount = await client.fetchAdaptorAddReceiptAccount(adaptorAddReceiptPubkey);
    
  • Fetches all adaptor add receipt accounts of a vault

    Parameters

    • vault: PublicKey

      Public key of the vault

    Returns Promise<
        ProgramAccount<
            {
                adaptorProgram: PublicKey;
                bump: number;
                isActive: boolean;
                lastUpdatedEpoch: BN;
                padding0: number[];
                reserved: number[];
                vault: PublicKey;
                version: number;
            },
        >[],
    >

    Promise resolving to an array of adaptor add receipt accounts

    const adaptorAddReceiptAccounts = await client.fetchAllAdaptorAddReceiptAccountsOfVault(vaultPubkey);
    
  • Fetches all strategy init receipt accounts

    Returns Promise<
        ProgramAccount<
            {
                adaptorProgram: PublicKey;
                bump: number;
                lastUpdatedTs: BN;
                padding0: number[];
                positionValue: BN;
                reserved: number[];
                strategy: PublicKey;
                vault: PublicKey;
                vaultStrategyAuthBump: number;
                version: number;
            },
        >[],
    >

    Promise resolving to an array of strategy init receipt accounts

    const strategyInitReceiptAccounts = await client.fetchAllStrategyInitReceiptAccounts();
    
  • Fetches all strategy init receipt accounts of a vault

    Parameters

    • vault: PublicKey

      Public key of the vault

    Returns Promise<
        ProgramAccount<
            {
                adaptorProgram: PublicKey;
                bump: number;
                lastUpdatedTs: BN;
                padding0: number[];
                positionValue: BN;
                reserved: number[];
                strategy: PublicKey;
                vault: PublicKey;
                vaultStrategyAuthBump: number;
                version: number;
            },
        >[],
    >

    Promise resolving to an array of strategy init receipt accounts

    const strategyInitReceiptAccounts = await client.fetchAllStrategyInitReceiptAccountsOfVault(vaultPubkey);
    
  • Fetches a strategy init receipt account's data

    Parameters

    • strategyInitReceipt: PublicKey

      Public key of the strategy init receipt account

    Returns Promise<
        {
            adaptorProgram: PublicKey;
            bump: number;
            lastUpdatedTs: BN;
            padding0: number[];
            positionValue: BN;
            reserved: number[];
            strategy: PublicKey;
            vault: PublicKey;
            vaultStrategyAuthBump: number;
            version: number;
        },
    >

    Promise resolving to the strategy init receipt account data

    const strategyInitReceiptAccount = await client.fetchStrategyInitReceiptAccount(strategyInitReceiptPubkey);
    
  • Fetches a vault account's data

    Parameters

    • vault: PublicKey

      Public key of the vault

    Returns Promise<
        {
            admin: PublicKey;
            asset: {
                idleAta: PublicKey;
                idleAtaAuthBump: number;
                mint: PublicKey;
                reserved: number[];
                totalValue: BN;
            };
            description: number[];
            feeConfiguration: {
                adminManagementFee: number;
                adminPerformanceFee: number;
                issuanceFee: number;
                managerManagementFee: number;
                managerPerformanceFee: number;
                redemptionFee: number;
                reserved: number[];
            };
            feeState: {
                accumulatedLpAdminFees: BN;
                accumulatedLpManagerFees: BN;
                accumulatedLpProtocolFees: BN;
                reserved: number[];
            };
            highWaterMark: {
                highestAssetPerLpDecimalBits: BN;
                lastUpdatedTs: BN;
                reserved: number[];
            };
            lastUpdatedTs: BN;
            lockedProfitState: { lastReport: BN; lastUpdatedLockedProfit: BN };
            lp: {
                mint: PublicKey;
                mintAuthBump: number;
                mintBump: number;
                reserved: number[];
            };
            manager: PublicKey;
            name: number[];
            padding0: number[];
            reserved: number[];
            vaultConfiguration: {
                lockedProfitDegradationDuration: BN;
                maxCap: BN;
                reserved: number[];
                startAtTs: BN;
                withdrawalWaitingPeriod: BN;
            };
            version: number;
        },
    >

    Promise resolving to the vault account data

  • Finds the direct withdraw init receipt address

    Parameters

    • vault: PublicKey

      Public key of the vault

    • strategy: PublicKey

      Public key of the strategy

    Returns PublicKey

    The PDA for the direct withdraw init receipt

    const directWithdrawInitReceipt = client.findDirectWithdrawInitReceipt(vaultPubkey, strategyPubkey);
    
  • Finds the request withdraw vault receipt address

    Parameters

    • vault: PublicKey

      Public key of the vault

    • user: PublicKey

      Public key of the user

    Returns PublicKey

    The PDA for the request withdraw vault receipt

    const requestWithdrawVaultReceipt = client.findRequestWithdrawVaultReceipt(vaultPubkey, userPubkey);
    
  • Finds the strategy init receipt address

    Parameters

    • vault: PublicKey

      Public key of the vault

    • strategy: PublicKey

      Public key of the strategy

    Returns PublicKey

    The PDA for the strategy init receipt

    const strategyInitReceipt = client.findStrategyInitReceipt(vaultPubkey, strategyPubkey);
    
  • Finds all vault-related addresses

    Parameters

    • vault: PublicKey

      Public key of the vault

    Returns { vaultAssetIdleAuth: PublicKey; vaultLpMint: PublicKey }

    Object containing all vault-related PDAs

    const addresses = client.findVaultAddresses(vaultPubkey);
    console.log(addresses.vaultLpMint.toBase58());
    console.log(addresses.vaultAssetIdleAuth.toBase58());
    console.log(addresses.vaultLpFeeAuth.toBase58());
  • Finds the vault's asset idle authority address

    Parameters

    • vault: PublicKey

      Public key of the vault

    Returns PublicKey

    The PDA for the vault's asset idle authority

  • Finds the vault LP mint address for a given vault

    Parameters

    • vault: PublicKey

      Public key of the vault

    Returns PublicKey

    The PDA for the vault's LP mint

  • Parameters

    • vault: PublicKey
    • strategy: PublicKey

    Returns {
        directWithdrawInitReceipt: PublicKey;
        strategyInitReceipt: PublicKey;
        vaultStrategyAuth: PublicKey;
    }

  • Finds the vault strategy auth address

    Parameters

    • vault: PublicKey

      Public key of the vault

    • strategy: PublicKey

      Public key of the strategy

    Returns PublicKey

    The PDA for the vault strategy auth

    const vaultStrategyAuth = client.findVaultStrategyAuth(vaultPubkey, strategyPubkey);
    
  • Gets the balance of a Solana account

    Parameters

    • publicKey: PublicKey

      Public key to check balance for

    Returns Promise<number>

    Promise resolving to the account balance in lamports

    If fetching balance fails

  • Parameters

    • vault: PublicKey

    Returns Promise<
        {
            strategies: { amount: number; strategyId: string }[];
            totalValue: number;
        },
    >