Skip to main content

ixWrapperManageVaultSettings

Applies one or more settings changes to the vault. This uses the wrapper instruction which executes via self-CPI with vault signer seeds. Requires the manager role.

Usage

import { vaultSettingsAction, priceId } from "@exponent-labs/exponent-sdk/client/vaults";

// Add a new token entry
const ix = vault.ixWrapperManageVaultSettings({
  manager: wallet.publicKey,
  actions: [
    vaultSettingsAction("AddTokenEntry", [{
      mint: newTokenMint,
      priceId: priceId("Simple", { priceId: 1n }),
      tokenSquadsAccount: tokenSquadsAddress,
      forceDeallocatePolicyIds: [],
    }]),
  ],
});

const tx = new Transaction().add(ix);
await sendAndConfirmTransaction(connection, tx, [wallet]);

Parameters

NameTypeRequiredDescription
managerPublicKeyYesManager wallet (must be signer)
actionsVaultSettingsAction[]YesArray of settings changes to apply
remainingAccountsAccountMeta[]NoAdditional accounts needed for specific actions
exponentPricesPublicKeyNoExponentPrices PDA. Auto-derived
systemProgramPublicKeyNoSystem program. Defaults to SystemProgram.programId
See Manage Vault Settings (raw) for the full VaultSettingsAction variant list.

Returns

TransactionInstruction — a single instruction that applies all settings changes atomically.
Multiple actions can be batched in a single call. All changes are applied atomically — if any action fails, the entire transaction reverts.