GLAMIDL Reference

cpi_proxy

Internal authorization proxy that enabled integration programs use to request vault-signed CPI under core GLAM access checks.

Handler narrative

  1. Load the GLAM state or program account required by the instruction and verify the signer.
  2. Apply the requested state, policy, pricing, or system action after enforcing owner/delegate checks.
  3. Only accessible by integration programs

Required conditions

  • The submitted accounts must match the declared account list, signer requirements, writable requirements, fixed program addresses, and account relationships shown below.
  • The GLAM state account is the source of truth for owner, enabled integrations, delegate permissions, policies, assets, borrowable assets, timelock settings, mint linkage, and pricing records.
  • The vault account must be the PDA controlled by the core protocol program and derived conceptually from the state account; instructions use it as the vault authority for SOL, token accounts, and external positions.
  • Owner-level actions must be signed by the state owner unless the instruction is explicitly an integration callback, mint-authority callback, delegate action, or emergency access update.

Accounts

AccountRoleDescription
glam_statewritableState account owned by the GLAM Protocol program; it records vault configuration, policies, and pricing records.
glam_vaultwritableVault account controlled by the GLAM Protocol program; conceptually derived from the state account and used as the vault authority.
glam_signersigner, writableCalling authority. It must be the owner or a delegate with the explicit permission required by this instruction.
cpi_programread-onlyExternal program invoked by this instruction.
integration_authoritysignerProgram-derived authority used by an integration during CPI into an external protocol.
system_programread-onlyStandard Solana program account required by the instruction.

Arguments

ArgumentTypeNotes
databytesInstruction data forwarded to the destination program after GLAM authorization checks pass.
extra_paramsvec<ExtraParams>Additional forwarding and account hints used by the proxy while preparing the downstream CPI. Fields: action_type: ActionType; pubkey: pubkey; amount: option<u64>

Policy & permissions

  • No external integration enablement is required beyond the program-level functionality involved in this instruction.
  • Caller must be the owner or a delegate with the explicit protocol permission required by this instruction.

Cross-instruction constraints

  • No additional cross-instruction constraint is documented beyond account initialization, authority checks, and policy validation.