GLAMIDL Reference

close_user_bundle_account

Close an empty Neutral user bundle account and remove it from GLAM registered positions.

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.
  • The target account must be writable and controlled by the program or authority expected by the instruction.
  • The rent refund destination or signer account must be writable because closing returns lamports to that account.
  • Any protocol-specific empty-state requirement, such as zero balance, zero supply, no pending request, or no active position, must be satisfied before closure.
  • The instruction metadata names CloseUserBundleAccount as the delegate permission for this instruction.
  • bundle_account must be present in the Neutral bundles allowlist.

Accounts

Uses the standard Big Seven account pattern, plus the instruction-specific accounts below.

AccountRoleDescription
user_bundle_accountwritableNeutral user bundle account that tracks this vault's bundle deposit or withdrawal requests.
bundle_accountread-onlyNeutral bundle account for the asset bundle being deposited into or withdrawn from.

No arguments

Policy & permissions

  • Enable the Neutral integration program on the vault integration ACL before Neutral bundle actions.
  • Delegate permission: CloseUserBundleAccount.

Cross-instruction constraints

  • The Neutral bundle depositor account must be initialized and the bundle must remain allowlisted.