Token Configuration & Logic
Fuze enables access gating using Solana-based tokens; whether fungible (SPL tokens) or NFTs (Metaplex standard). This lets you tokenize access to content, products, and communities directly through the Solana ecosystem.
🔑 Key Attributes
data-token
The Solana token mint address used for access gating
data-chain
Blockchain (should be "solana"
in all cases)
data-type
Type of gating (content-gate
, product-access
, etc.)
data-threshold
(Optional) Minimum token balance required (e.g., 1
)
data-role
(Optional) Custom logic roles, if needed
🧠 Examples of Gating Logic (Solana)
✅ 1. SPL Token Ownership
Allow access to anyone holding any amount of a specific Solana token:
<script
data-token="So11111111111111111111111111111111111111112"
data-chain="solana"
></script>
🔢 2. Minimum Token Threshold
Only allow users who hold a minimum amount of a fungible SPL token:
<script
data-token="Fuz3ToKenAddr3ss123456789"
data-chain="solana"
data-threshold="50"
></script>
🖼️ 3. NFT Ownership
Gate access based on NFT ownership using a Metaplex collection address:
<script
data-token="NFTCo11ectionAddres5xxxxx"
data-chain="solana"
data-type="nft-access"
></script>
🧩 React SDK Example (Solana)
const { hasAccess, isLoading } = useFuzeAccess({
token: "Fuz3ToKenAddr3ss123456789",
chain: "solana",
threshold: 1,
})
Usage in JSX:
{hasAccess ? <Dashboard /> : <ConnectToContinue />}
⚙️ Best Practices
✅ Use mint addresses from trusted sources (SPL token, NFT collection)
🔗 Ensure the wallet is connected via Solana-compatible wallet (e.g., Phantom, Solflare)
🧪 Test your logic in staging before going live
💡 Use Solana devnet for local testing (
data-network="devnet"
optional override)
Last updated