GLAMIDL Reference

enable_disable_protocols

Enables or disables a protocol on a vault's integration ACL.

Required conditions

  • The selected integration program and protocol selection are written into the state integration ACL; disabling a protocol prevents both owner-driven delegated use and delegate-driven use of that protocol through integration checks.

Accounts

AccountRoleDescription
glam_statewritableGLAM state account that stores vault configuration, integration ACLs, delegate permissions, policies, assets, mint linkage, and pricing records.
glam_signersigner, writableCalling authority or fee payer.

Arguments

ArgumentTypeNotes
integration_programpubkey
protocols_bitmasku16
set_enabledbool

Policy & permissions

  • Only the GLAM owner can call; delegates are rejected even when they hold matching protocol permissions.
  • SingleAssetVault states are rejected; only Vault, TokenizedVault, and Mint state types are accepted.
  • When the state has a non-zero timelock duration, the change is staged into the pending state update; otherwise it is applied directly.

TypeScript SDK usage

import { GlamClient, getProgramAndBitflagByProtocolName } from "@glamsystems/glam-sdk";
import { PublicKey } from "@solana/web3.js";

const glamClient = new GlamClient({ statePda: vaultState });
const [program, bitflag] = getProgramAndBitflagByProtocolName()["KaminoVaults"];
await glamClient.access.enableProtocols(new PublicKey(program), parseInt(bitflag, 2));