Add wallet-based token gating to a Next.js page in under 50 lines. If the connected wallet holds a token under a specific policy ID, show the content. No smart contract required — wallet asset queries are off-chain operations. Add wallet-based token gating to a Next.js page in under 50 lines.…
Write a time-lock vesting validator in Aiken that lets an owner lock ADA for a beneficiary. The beneficiary can only claim after a deadline; the owner can reclaim at any time. Compile the validator, lock funds using Mesh, then unlock them after the deadline passes. Write a time-lock vesting validator…
Build a one-shot minting policy in Mesh SDK that mints a single NFT with CIP-25 metadata on Cardano’s preview testnet. A one-shot policy uses a specific UTxO as a parameter — once that UTxO is spent, the policy can never mint again, making the NFT truly unique. Background: why this…
Use the Blockfrost REST API to fetch all UTxOs at a Cardano address, parse ADA and native token balances, and handle pagination. This is the foundation of almost every Cardano DApp’s off-chain logic. Background: reading state on Cardano On Ethereum, you call view functions on a contract to read state…
Write inline unit tests directly in Aiken using the test keyword. Test your vesting validator against valid claims, invalid signers, and early withdrawals. Run everything with aiken check. No test framework needed — testing is built into the language. Background: testing in Aiken Aiken tests are first-class. You write test…
Build a simple ADA transfer with Evolution SDK (formerly cardano-js-sdk). Understand where Evolution fits vs Mesh — Evolution is lower-level, more flexible, and better suited for wallets and complex applications. Mesh is faster for DApp builders who want to ship fast. Background: Mesh vs Evolution — which one do you…
Use CIP-8 to request a cryptographic signature from a connected wallet, then verify it server-side. This proves the user controls a Cardano address — no passwords, no accounts, just a wallet. Equivalent to eth_sign on Ethereum but with a formalised standard. Background: Why wallet signing for auth? Traditional auth: user…
Reference scripts (CIP-0033, introduced in Babbage era) let you deploy a compiled Aiken validator once to a UTxO, then reference that UTxO in future transactions instead of re-including the full script bytes every time. For large scripts, this cuts transaction fees by 60–80% and is now standard practice for any…