AllowlistManager
Manage the Allowlist Transfer Hook — KYC/AML gating for token transfers
Import
Properties
| Property | Type | Description |
|---|---|---|
registryPDA | PublicKey | The AllowlistRegistry PDA address |
extraAccountMetasPDA | PublicKey | The ExtraAccountMetas PDA address |
Methods
initialize(authority, mode)
Creates the AllowlistRegistry PDA for the mint.
| Parameter | Type | Description |
|---|---|---|
authority | PublicKey | Admin who can manage the registry |
mode | AllowlistMode | "allowlist" (only listed wallets can transfer) or "denylist" (listed wallets are blocked) |
initializeExtraAccountMetas(payer)
Creates the ExtraAccountMetaList PDA required for Token-2022 TransferHook CPI.
Must be called before any transfer.
addWallets(authority, wallets)
Batch-adds wallets to the registry. Maximum 20 wallets per call, ~300 total.
removeWallets(authority, wallets)
Batch-removes wallets from the registry using O(1) swap-remove.
updateAuthority(authority, newAuthority)
Transfers registry management to a new authority.
toggleActive(authority, isActive)
Emergency kill switch. When isActive=false, all transfers are permitted regardless of the allowlist.
fetchRegistry()
Fetches the current on-chain registry state.