Gates
Gates are reusable bundles of conditions that restrict who can mint from a sale. A gate is owned by an account; attach a gate to a sale by setting accessMode: "GATED" and gateId when creating the sale.
For the full access-controlled sale flow, see gated sales.
const res = await client.gate.list();Lists gates owned by the authenticated account.
const res = await client.gate.get({ gateId });Create
Section titled “Create”const res = await client.gate.create({ name: "Holder Gate", matchMode: "ALL", // "ALL" (AND) | "ANY" (OR); default "ALL" conditions: [ { type: "TOKEN_OWNERSHIP", config: { contractAddress: "0x...", chainId: 8453, minAmount: 1, // optional, defaults to 1 }, }, ],});Update
Section titled “Update”Replaces the entire gate. Partial updates are not supported for conditions:
await client.gate.update({ gateId, name: "Renamed", matchMode: "ANY", conditions: [ /* full replacement */ ],});Delete
Section titled “Delete”await client.gate.remove({ gateId });Gates referenced by a live sale cannot be deleted.
Condition types
Section titled “Condition types”Every condition has type and config. On-chain conditions require a chainId.
ALLOWLIST
Section titled “ALLOWLIST”{ type: "ALLOWLIST", config: { addresses: ["0x1111...", "0x2222..."], },}TOKEN_OWNERSHIP
Section titled “TOKEN_OWNERSHIP”{ type: "TOKEN_OWNERSHIP", config: { contractAddress: "0x...", chainId: 8453, minAmount: 1, // optional },}SPECIFIC_TOKEN
Section titled “SPECIFIC_TOKEN”{ type: "SPECIFIC_TOKEN", config: { contractAddress: "0x...", chainId: 8453, tokenId: "42", // string },}TOKEN_ATTRIBUTE
Section titled “TOKEN_ATTRIBUTE”{ type: "TOKEN_ATTRIBUTE", config: { contractAddress: "0x...", chainId: 8453, traitType: "Background", traitValue: "Gold", },}CURRENCY_BALANCE
Section titled “CURRENCY_BALANCE”{ type: "CURRENCY_BALANCE", config: { chainId: 8453, contractAddress: "0x...", // optional — omit for native currency minBalance: "0.1", // decimal string of the currency's major unit },}FARCASTER_FOLLOW
Section titled “FARCASTER_FOLLOW”{ type: "FARCASTER_FOLLOW", config: { fid: 12345, },}Constraints
Section titled “Constraints”RANKED_AUCTION + GATEDis rejected at sale validation.- Gate condition checks run at claim time, not gate-creation time — token-ownership conditions can fail later if the caller transfers out.
- Gates can be reused across many sales.
Related
Section titled “Related”- Gates concept
- Gated sales guide — attach + claim flow
- Errors: gate errors
- REST API: gate