GLAM Protocol StagingStaging
grant_revoke_delegate_permissions
Grants or revokes delegate permissions limited by integration program and protocol.
Required conditions
- The delegate public key, integration program, protocol selection, and permission set must be provided explicitly; the resulting delegate ACL entry grants only those exact capabilities.
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 |
|---|---|---|
| delegate | pubkey | |
| integration_program | pubkey | |
| protocol_bitflag | u16 | |
| permissions_bitmask | u64 | |
| set_granted | bool |
Policy & permissions
- Only the GLAM owner can call; delegates cannot grant or revoke delegate permissions.
TypeScript SDK usage
import { BN } from "@coral-xyz/anchor";
import { PublicKey } from "@solana/web3.js";
await glamClient.access.grantDelegatePermissions(
new PublicKey(delegate),
new PublicKey(integrationProgram),
protocolBitflag,
new BN(0b11),
);