GLAMIDL Reference

initialize_mint

Initializes a new GLAM Token-2022 mint and, for tokenized vaults, the linked GLAM state.

Handler narrative

  1. Load the GLAM state or program account required by the instruction and verify the signer.
  2. Apply mint lifecycle, token-account, ACL, or policy changes after verifying the required authority.
  3. Initialize a new GLAM mint with extensions and metadata. - mint_model - Configuration model containing mint parameters and metadata - created_key - 8-byte key used in the GLAM state PDA derivation - account_type - Fund (for tokenized vault mint) or Mint - decimals - Decimals of new mint

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.
  • Mint actions must satisfy the linked GLAM state, Token-2022 mint configuration, mint policy, and any request queue or escrow state involved in the flow.
  • Creation-style flows require the target account or PDA to be uninitialized or intentionally updatable, the fee payer to be writable, and the System Program to be present when rent or allocation is needed.

Accounts

AccountRoleDescription
glam_statewritableState account owned by the GLAM Protocol program; it records vault configuration, policies, and pricing records.
signersigner, writableCalling authority. It must be the owner or a delegate with the explicit permission required by this instruction.
new_mintwritableToken-2022 mint being created for the GLAM mint or tokenized vault.
request_queuewritable, optionalProgram-derived queue associated with the mint for queued subscriptions and redemptions.
extra_metas_accountwritableToken-2022 transfer-hook extra-account-metas account associated with the mint.
base_asset_mintread-onlyToken mint account used by the instruction.
system_programread-onlyStandard Solana program account required by the instruction.
token_2022_programread-onlyStandard Solana program account required by the instruction.
policies_programread-onlyGLAM Policies program account used for Token-2022 transfer-hook behavior.
glam_protocolread-onlyGLAM Protocol program account used for authorization or CPI.

Arguments

ArgumentTypeNotes
mint_modelMintModelsymbol: option<string>; name: option<[u8; 32]>; uri: option<string>; year_in_seconds: option<u32>; permanent_delegate: option<pubkey>; default_account_state_frozen: option<bool> - Whether new Token-2022 token accounts start frozen for permissioned distribution.; fee_structure: option<FeeStructure> - Manager, vault, and protocol fee configuration for tokenized vault shares.; notify_and_settle: option<NotifyAndSettle> - Notice, settlement, cancellation window, and fulfillment timing settings.; lockup_period: option<u32> - Time-based restriction enforced through Token-2022 transfer hooks and GLAM Policies.; max_cap: option<u64> - Maximum vault capacity.; min_subscription: option<u64> - Minimum subscription amount.; min_redemption: option<u64> - Minimum redemption amount.; allowlist: option<vec<pubkey>> - Investor allowlist.; blocklist: option<vec<pubkey>> - Investor blocklist.
created_key[u8; 8]Eight-byte creation key used to make the mint initialization deterministic and distinguish related mint records.
account_typeAccountTypeGLAM account type being initialized, such as tokenized vault, mint, or single-asset vault. Fields: enum variants: Vault, TokenizedVault, Mint, SingleAssetVault
decimalsoption<u8>Optional Token-2022 mint decimals; omit it when the default configured by the mint model should be used.

Policy & permissions

  • No external integration enablement is required beyond the program-level functionality involved in this instruction.
  • Only the owner is expected. Delegates do not receive this capability by being added; it must be granted explicitly if supported.

TypeScript SDK usage

import { GlamClient, StateAccountType, WSOL, nameToChars } from "@glamsystems/glam-sdk";
import { BN } from "@coral-xyz/anchor";

const glamClient = new GlamClient();
await glamClient.mint.initialize({
  accountType: StateAccountType.TOKENIZED_VAULT,
  name: nameToChars("My Fund"),
  symbol: "gFUND",
  baseAssetMint: WSOL,
  maxCap: new BN(1_000_000_000_000),
});

Cross-instruction constraints

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