Skip to main content

createWrapperManageVaultSettingsInstruction

Applies vault settings changes via self-CPI using the vault’s signer seeds. This instruction enforces that the vault has zero AUM (empty vault only), ensuring configuration is finalized before deposits are accepted. Typically called during initial vault setup to configure token entries, withdrawal periods, and other vault parameters.

Usage

import { createWrapperManageVaultSettingsInstruction } from "@exponent-labs/exponent-sdk/client/vaults";
import { PublicKey, SystemProgram } from "@solana/web3.js";

const ix = createWrapperManageVaultSettingsInstruction(
  {
    manager: managerKeypair.publicKey,
    vault: vaultAddress,
    exponentPrices: exponentPricesAddress,
    systemProgram: SystemProgram.programId,
  },
  {
    actions: [
      { addTokenEntry: { mint: usdcMint, oracle: usdcOracleAddress } },
      { setWithdrawalPeriod: { seconds: 86400 } },
    ],
  }
);

Accounts

NameSignerWritableDescription
managerYesYesVault manager applying the settings
vaultNoYesVault account (must have zero AUM)
exponentPricesNoYesExponentPrices account for token valuations
systemProgramNoNoSystem program

Args

NameTypeDescription
actionsVaultSettingsAction[]Array of settings actions to apply (e.g., add/remove token entries, set withdrawal periods)

Returns

TransactionInstruction — a transaction instruction ready to be added to a transaction.