GLAM Protocol StagingStaging
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
| Account | Role | Description |
|---|---|---|
| glam_state | writable | GLAM state account that stores vault configuration, integration ACLs, delegate permissions, policies, assets, mint linkage, and pricing records. |
| glam_signer | signer, writable | Calling authority or fee payer. |
Arguments
| Argument | Type | Notes |
|---|---|---|
| integration_program | pubkey | |
| protocols_bitmask | u16 | |
| set_enabled | bool |
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));