GLAMIDL Reference
SPL IntegrationProduction

token_transfer_checked

Transfers vault SPL/Token-2022 tokens with checked mint decimals under GLAM authorization and transfer policy.

Required conditions

  • The vault integration ACL must enable this integration before the instruction is accepted; that enablement is defined on the GLAM state account.
  • If the signer is not the owner, the delegate ACL on the GLAM state must contain the exact protocol permission required by this instruction; registering a delegate alone is insufficient.
  • Instruction-specific destination accounts must satisfy the external protocol's own account model; GLAM validates the accounts it needs for authorization and policy enforcement, then passes the remaining protocol accounts through CPI.

Accounts

AccountRoleDescription
glam_statewritableGLAM state account that stores vault configuration, integration ACLs, delegate permissions, policies, assets, mint linkage, and pricing records.
glam_vaultwritableVault PDA associated with the GLAM state and used as the vault authority.
glam_signersigner, writableCalling authority or fee payer.
integration_authorityread-onlyProgram-derived authority used by the integration for downstream invocation.
cpi_programread-onlyDownstream program invoked by this instruction.
glam_protocol_programread-onlyGLAM Protocol program account used for authorization or CPI.
system_programread-onlySolana System Program.
fromwritablefrom account read or updated by SPL Integration's token transfer checked instruction.
mintread-onlyToken mint account used or validated by this instruction.
towritableto account read or updated by SPL Integration's token transfer checked instruction.

Arguments

ArgumentTypeNotes
amountu64
decimalsu8

Policy & permissions

  • TokenTransferPolicy is checked against the destination token account's owner only — no mint/asset or amount policy is consulted.
  • Allowlisted destination owners require SPL Transfer.
  • For the GLAM-owner-destination path: the GLAM owner must sign and the vault must not be a tokenized vault.

TypeScript SDK usage

await glamClient.vault.tokenTransfer(
  usdcMint,
  50_000_000,
  recipient,
);