Constructors
Properties
Methods
addAsset
- addAsset(
vault: PublicKey,
authority: PublicKey,
assetMint: PublicKey,
assetOracle: PublicKey,
assetTokenProgram: PublicKey,
): Promise<TransactionInstruction[]> Parameters
- vault: PublicKey
- authority: PublicKey
- assetMint: PublicKey
- assetOracle: PublicKey
- assetTokenProgram: PublicKey
Returns Promise<TransactionInstruction[]>
chestStrategyDeposit
- chestStrategyDeposit(
vault: PublicKey,
authority: PublicKey,
assetMint: PublicKey,
strategy: PublicKey,
chest: PublicKey,
coin: PublicKey,
driftVault: PublicKey,
driftSpotMarketIndex: number,
driftRemainingAccounts: AccountMeta[],
amount: BN,
): Promise<TransactionInstruction[]> Parameters
- vault: PublicKey
- authority: PublicKey
- assetMint: PublicKey
- strategy: PublicKey
- chest: PublicKey
- coin: PublicKey
- driftVault: PublicKey
- driftSpotMarketIndex: number
- driftRemainingAccounts: AccountMeta[]
- amount: BN
Returns Promise<TransactionInstruction[]>
chestStrategyInit
- chestStrategyInit(
vault: PublicKey,
authority: PublicKey,
assetMint: PublicKey,
chest: PublicKey,
coin: PublicKey,
strategyName: string,
strategyIndex: number,
): Promise<{ ixns: TransactionInstruction[]; strategy: PublicKey }> Parameters
- vault: PublicKey
- authority: PublicKey
- assetMint: PublicKey
- chest: PublicKey
- coin: PublicKey
- strategyName: string
- strategyIndex: number
Returns Promise<{ ixns: TransactionInstruction[]; strategy: PublicKey }>
chestStrategyRequestWithdraw
- chestStrategyRequestWithdraw(
vault: PublicKey,
authority: PublicKey,
assetMint: PublicKey,
strategy: PublicKey,
chest: PublicKey,
coin: PublicKey,
driftVault: PublicKey,
chestRedemptionRequestIndex: BN,
driftRemainingAccounts: AccountMeta[],
assetAmount: BN,
): Promise<TransactionInstruction[]> Parameters
- vault: PublicKey
- authority: PublicKey
- assetMint: PublicKey
- strategy: PublicKey
- chest: PublicKey
- coin: PublicKey
- driftVault: PublicKey
- chestRedemptionRequestIndex: BN
- driftRemainingAccounts: AccountMeta[]
- assetAmount: BN
Returns Promise<TransactionInstruction[]>
chestStrategyWithdraw
- chestStrategyWithdraw(
vault: PublicKey,
authority: PublicKey,
assetMint: PublicKey,
strategy: PublicKey,
chest: PublicKey,
coin: PublicKey,
chestRedemptionRequest: PublicKey,
strategyAssetTokenAccount: PublicKey,
driftVault: PublicKey,
driftRemainingAccounts: AccountMeta[],
): Promise<TransactionInstruction[]> Parameters
- vault: PublicKey
- authority: PublicKey
- assetMint: PublicKey
- strategy: PublicKey
- chest: PublicKey
- coin: PublicKey
- chestRedemptionRequest: PublicKey
- strategyAssetTokenAccount: PublicKey
- driftVault: PublicKey
- driftRemainingAccounts: AccountMeta[]
Returns Promise<TransactionInstruction[]>
claimEmissions
- claimEmissions(
vault: PublicKey,
authority: PublicKey,
strategy: Common.Strategy,
assetTokenProgram: PublicKey,
): Promise<TransactionInstruction> Parameters
- vault: PublicKey
- authority: PublicKey
- strategy: Common.Strategy
- assetTokenProgram: PublicKey
Returns Promise<TransactionInstruction>
deposit
- deposit(
vault: PublicKey,
authority: PublicKey,
strategy: Common.Strategy,
amount: BN,
assetTokenProgram: PublicKey,
): Promise<TransactionInstruction[]> Parameters
- vault: PublicKey
- authority: PublicKey
- strategy: Common.Strategy
- amount: BN
- assetTokenProgram: PublicKey
Returns Promise<TransactionInstruction[]>
distributeVaultFees
- distributeVaultFees(
vault: PublicKey,
sharesMint: PublicKey,
authority: PublicKey,
feeDestination: PublicKey,
remainingAccountKeys: PublicKey[],
): Promise<TransactionInstruction> Parameters
- vault: PublicKey
- sharesMint: PublicKey
- authority: PublicKey
- feeDestination: PublicKey
- remainingAccountKeys: PublicKey[]
Returns Promise<TransactionInstruction>
driftInsuranceFundStrategyInit
- driftInsuranceFundStrategyInit(
vault: PublicKey,
authority: PublicKey,
assetMint: PublicKey,
driftState: PublicKey,
driftSpotMarket: PublicKey,
driftSpotMarketVault: PublicKey,
driftMarketIndex: number,
strategyName: string,
strategyIndex: number,
): Promise<{ ix: TransactionInstruction; strategy: PublicKey }> Parameters
- vault: PublicKey
- authority: PublicKey
- assetMint: PublicKey
- driftState: PublicKey
- driftSpotMarket: PublicKey
- driftSpotMarketVault: PublicKey
- driftMarketIndex: number
- strategyName: string
- strategyIndex: number
Returns Promise<{ ix: TransactionInstruction; strategy: PublicKey }>
driftInsuranceFundStrategyStake
- driftInsuranceFundStrategyStake(
vault: PublicKey,
authority: PublicKey,
assetMint: PublicKey,
assetTokenProgram: PublicKey,
strategy: PublicKey,
driftState: PublicKey,
driftSpotMarket: PublicKey,
driftSpotMarketVault: PublicKey,
driftMarketIndex: number,
amount: BN,
): Promise<TransactionInstruction> Parameters
- vault: PublicKey
- authority: PublicKey
- assetMint: PublicKey
- assetTokenProgram: PublicKey
- strategy: PublicKey
- driftState: PublicKey
- driftSpotMarket: PublicKey
- driftSpotMarketVault: PublicKey
- driftMarketIndex: number
- amount: BN
Returns Promise<TransactionInstruction>
driftInsuranceFundStrategyUnstake
- driftInsuranceFundStrategyUnstake(
vault: PublicKey,
authority: PublicKey,
strategy: PublicKey,
driftSpotMarket: PublicKey,
driftMarketIndex: number,
amount: BN,
): Promise<TransactionInstruction> Parameters
- vault: PublicKey
- authority: PublicKey
- strategy: PublicKey
- driftSpotMarket: PublicKey
- driftMarketIndex: number
- amount: BN
Returns Promise<TransactionInstruction>
driftInsuranceFundStrategyWithdraw
- driftInsuranceFundStrategyWithdraw(
vault: PublicKey,
authority: PublicKey,
strategy: PublicKey,
assetMint: PublicKey,
assetTokenProgram: PublicKey,
driftSpotMarket: PublicKey,
driftState: PublicKey,
driftMarketIndex: number,
): Promise<TransactionInstruction> Parameters
- vault: PublicKey
- authority: PublicKey
- strategy: PublicKey
- assetMint: PublicKey
- assetTokenProgram: PublicKey
- driftSpotMarket: PublicKey
- driftState: PublicKey
- driftMarketIndex: number
Returns Promise<TransactionInstruction>
driftSupplyStrategyInit
- driftSupplyStrategyInit(
vault: PublicKey,
authority: PublicKey,
assetMint: PublicKey,
driftState: PublicKey,
driftSpotMarket: PublicKey,
driftPerpMarket: PublicKey,
driftSpotMarketVault: PublicKey,
spotPythOracle: PublicKey,
perpPythOracle: PublicKey,
driftMarketIndex: number,
driftSubAccountId: number,
strategyName: string,
strategyIndex: number,
): Promise<{ ix: TransactionInstruction; strategy: PublicKey }> Parameters
- vault: PublicKey
- authority: PublicKey
- assetMint: PublicKey
- driftState: PublicKey
- driftSpotMarket: PublicKey
- driftPerpMarket: PublicKey
- driftSpotMarketVault: PublicKey
- spotPythOracle: PublicKey
- perpPythOracle: PublicKey
- driftMarketIndex: number
- driftSubAccountId: number
- strategyName: string
- strategyIndex: number
Returns Promise<{ ix: TransactionInstruction; strategy: PublicKey }>
initialize
- initialize(
authority: PublicKey,
shares: PublicKey,
redemptionFeeBps: number,
managementFeeBps: number,
performanceFeeBps: number,
): Promise<TransactionInstruction[]> Parameters
- authority: PublicKey
- shares: PublicKey
- redemptionFeeBps: number
- managementFeeBps: number
- performanceFeeBps: number
Returns Promise<TransactionInstruction[]>
issue
- issue(
shares: PublicKey,
user: PublicKey,
asset: PublicKey,
assetTokenProgram: PublicKey,
amount: BN,
remainingAccountKeys: PublicKey[],
): Promise<TransactionInstruction[]> Parameters
- shares: PublicKey
- user: PublicKey
- asset: PublicKey
- assetTokenProgram: PublicKey
- amount: BN
- remainingAccountKeys: PublicKey[]
Returns Promise<TransactionInstruction[]>
klendSupplyStrategyInit
- klendSupplyStrategyInit(
vault: PublicKey,
authority: PublicKey,
assetMint: PublicKey,
assetPythOracle: PublicKey,
lendingMarket: PublicKey,
reserve: PublicKey,
reserveFarmState: PublicKey,
reserveCollateralMint: PublicKey,
reserveLiquiditySupply: PublicKey,
reserveDestinationDepositCollateral: PublicKey,
scopePrices: PublicKey,
strategyName: string,
strategyIndex: number,
): Promise<{ ix: TransactionInstruction; strategy: PublicKey }> Parameters
- vault: PublicKey
- authority: PublicKey
- assetMint: PublicKey
- assetPythOracle: PublicKey
- lendingMarket: PublicKey
- reserve: PublicKey
- reserveFarmState: PublicKey
- reserveCollateralMint: PublicKey
- reserveLiquiditySupply: PublicKey
- reserveDestinationDepositCollateral: PublicKey
- scopePrices: PublicKey
- strategyName: string
- strategyIndex: number
Returns Promise<{ ix: TransactionInstruction; strategy: PublicKey }>
mangoSupplyStrategyInit
- mangoSupplyStrategyInit(
vault: PublicKey,
authority: PublicKey,
assetMint: PublicKey,
mangoGroup: PublicKey,
mangoBank: PublicKey,
mangoVault: PublicKey,
pythOracle: PublicKey,
switchboardOracle: PublicKey,
strategyName: string,
strategyIndex: number,
): Promise<{ ix: TransactionInstruction; strategy: PublicKey }> Parameters
- vault: PublicKey
- authority: PublicKey
- assetMint: PublicKey
- mangoGroup: PublicKey
- mangoBank: PublicKey
- mangoVault: PublicKey
- pythOracle: PublicKey
- switchboardOracle: PublicKey
- strategyName: string
- strategyIndex: number
Returns Promise<{ ix: TransactionInstruction; strategy: PublicKey }>
marginfiSupplyStrategyInit
- marginfiSupplyStrategyInit(
vault: PublicKey,
assetMint: PublicKey,
authority: PublicKey,
marginfiGroup: PublicKey,
marginfiBank: PublicKey,
marginfiBankLiquidityVault: PublicKey,
marginfiBankLiquidityVaultAuthority: PublicKey,
marginfiOracle: PublicKey,
strategyName: string,
strategyIndex: number,
): Promise<
{
ix: TransactionInstruction;
marginfiAccount: Keypair;
strategy: PublicKey;
},
> Parameters
- vault: PublicKey
- assetMint: PublicKey
- authority: PublicKey
- marginfiGroup: PublicKey
- marginfiBank: PublicKey
- marginfiBankLiquidityVault: PublicKey
- marginfiBankLiquidityVaultAuthority: PublicKey
- marginfiOracle: PublicKey
- strategyName: string
- strategyIndex: number
Returns Promise<
{
ix: TransactionInstruction;
marginfiAccount: Keypair;
strategy: PublicKey;
},
>
migrateVaultAccount
- migrateVaultAccount(
vault: PublicKey,
authority: PublicKey,
): Promise<TransactionInstruction> Parameters
- vault: PublicKey
- authority: PublicKey
Returns Promise<TransactionInstruction>
pauseVault
- pauseVault(
vault: PublicKey,
authority: PublicKey,
paused: boolean,
): Promise<TransactionInstruction> Parameters
- vault: PublicKey
- authority: PublicKey
- paused: boolean
Returns Promise<TransactionInstruction>
redeem
- redeem(
shares: PublicKey,
user: PublicKey,
asset: PublicKey,
assetTokenProgram: PublicKey,
amount: BN,
remainingAccountKeys: PublicKey[],
): Promise<TransactionInstruction[]> Parameters
- shares: PublicKey
- user: PublicKey
- asset: PublicKey
- assetTokenProgram: PublicKey
- amount: BN
- remainingAccountKeys: PublicKey[]
Returns Promise<TransactionInstruction[]>
removeAsset
- removeAsset(
vault: PublicKey,
authority: PublicKey,
assetMint: PublicKey,
assetTokenProgram: PublicKey,
): Promise<TransactionInstruction[]> Parameters
- vault: PublicKey
- authority: PublicKey
- assetMint: PublicKey
- assetTokenProgram: PublicKey
Returns Promise<TransactionInstruction[]>
removeStrategy
- removeStrategy(
vault: PublicKey,
authority: PublicKey,
strategy: PublicKey,
): Promise<TransactionInstruction[]> Parameters
- vault: PublicKey
- authority: PublicKey
- strategy: PublicKey
Returns Promise<TransactionInstruction[]>
solendSupplyStrategyInit
- solendSupplyStrategyInit(
vault: PublicKey,
authority: PublicKey,
assetMint: PublicKey,
assetPythOracle: PublicKey,
assetSwitchboardOracle: PublicKey,
reserve: PublicKey,
reserveCollateralMint: PublicKey,
reserveLiquiditySupply: PublicKey,
depositCollateralAta: PublicKey,
lendingMarket: PublicKey,
lendingMarketAuthority: PublicKey,
strategyName: string,
strategyIndex: number,
): Promise<{ ixns: TransactionInstruction[]; strategy: PublicKey }> Parameters
- vault: PublicKey
- authority: PublicKey
- assetMint: PublicKey
- assetPythOracle: PublicKey
- assetSwitchboardOracle: PublicKey
- reserve: PublicKey
- reserveCollateralMint: PublicKey
- reserveLiquiditySupply: PublicKey
- depositCollateralAta: PublicKey
- lendingMarket: PublicKey
- lendingMarketAuthority: PublicKey
- strategyName: string
- strategyIndex: number
Returns Promise<{ ixns: TransactionInstruction[]; strategy: PublicKey }>
transferVaultAuthority
- transferVaultAuthority(
vault: PublicKey,
oldAuthority: PublicKey,
newAuthority: PublicKey,
): Promise<TransactionInstruction> Parameters
- vault: PublicKey
- oldAuthority: PublicKey
- newAuthority: PublicKey
Returns Promise<TransactionInstruction>
updateAsset
- updateAsset(
vault: PublicKey,
authority: PublicKey,
assetId: number,
assetNewOracle: PublicKey,
): Promise<TransactionInstruction[]> Parameters
- vault: PublicKey
- authority: PublicKey
- assetId: number
- assetNewOracle: PublicKey
Returns Promise<TransactionInstruction[]>
updateFee
- updateFee(
vault: PublicKey,
authority: PublicKey,
newRedemptionFeeBps: null | number,
newManagementFeeBps: null | number,
newPerformanceFeeBps: null | number,
): Promise<TransactionInstruction[]> Parameters
- vault: PublicKey
- authority: PublicKey
- newRedemptionFeeBps: null | number
- newManagementFeeBps: null | number
- newPerformanceFeeBps: null | number
Returns Promise<TransactionInstruction[]>
updateStrategy
- updateStrategy(
vault: PublicKey,
authority: PublicKey,
strategy: PublicKey,
newStrategyType: Common.StrategyType,
): Promise<TransactionInstruction[]> Parameters
- vault: PublicKey
- authority: PublicKey
- strategy: PublicKey
- newStrategyType: Common.StrategyType
Returns Promise<TransactionInstruction[]>
updateSwitchboardOraclePrice
- updateSwitchboardOraclePrice(
vault: PublicKey,
shares: PublicKey,
queue: PublicKey,
feed: PublicKey,
remainingAccountKeys: PublicKey[],
): Promise<TransactionInstruction> Parameters
- vault: PublicKey
- shares: PublicKey
- queue: PublicKey
- feed: PublicKey
- remainingAccountKeys: PublicKey[]
Returns Promise<TransactionInstruction>
withdraw
- withdraw(
vault: PublicKey,
authority: PublicKey,
strategy: Common.Strategy,
amount: BN,
assetTokenProgram: PublicKey,
): Promise<TransactionInstruction[]> Parameters
- vault: PublicKey
- authority: PublicKey
- strategy: Common.Strategy
- amount: BN
- assetTokenProgram: PublicKey
Returns Promise<TransactionInstruction[]>