GLAM Policies (Token Hook)Production
create_policy
Creates a GLAM Policies account for transfer-hook lockup enforcement.
Required conditions
- 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
| Account | Role | Description |
|---|---|---|
| policy_account | writable | Policy account used by GLAM Policies for transfer-hook lockup checks. |
| authority | signer, writable | Instruction-specific account supplied by the caller or SDK. |
| subject | read-only | Instruction-specific account supplied by the caller or SDK. |
| payer | signer, writable | Instruction-specific account supplied by the caller or SDK. |
| mint | read-only | Token mint account used by the instruction. |
| subject_token_account | read-only | Token account read or written by the instruction. |
| system_program | read-only | Standard Solana program account required by the instruction. |
Arguments
| Argument | Type | Notes |
|---|---|---|
| locked_until | u64 | Unlock time expressed in the selected time unit. |
| time_unit | TimeUnit | Whether the lockup uses slot-based or timestamp-based time. Fields: enum variants: Second, Slot |