Mesh LogoMesh

Smart Contracts

Production-ready smart contracts for Cardano with complete documentation, TypeScript SDK, and live demos

Mesh provides a suite of open-source, audited smart contracts that you can deploy to Cardano mainnet or testnet. Each contract includes TypeScript bindings, comprehensive documentation, and working examples.

Available Contracts

Quick Start

Install the contracts package to get started:

npm install @meshsdk/contract @meshsdk/core

Every contract follows the same initialization pattern:

import { BlockfrostProvider, MeshTxBuilder } from "@meshsdk/core";

// 1. Set up your provider
const provider = new BlockfrostProvider("<Your-API-Key>");

// 2. Create a transaction builder
const meshTxBuilder = new MeshTxBuilder({
  fetcher: provider,
  submitter: provider,
});

// 3. Initialize any contract with the same config
const contract = new MeshContractName({
  mesh: meshTxBuilder,
  fetcher: provider,
  wallet: wallet, // Your connected wallet
  networkId: 0,   // 0 for testnet, 1 for mainnet
});

Contract Categories

CategoryContractsUse Cases
Asset ManagementHello World, Vesting, GiftcardLock and unlock assets with conditions
TradingMarketplace, Swap, EscrowBuy, sell, and exchange assets
PaymentsPayment SplitterSplit payments among multiple recipients
NFTsPlutus NFT, Content OwnershipMint NFTs with on-chain logic

Network Support

All contracts work on:

  • Preprod Testnet (networkId: 0) - For development and testing
  • Mainnet (networkId: 1) - For production deployments

Source Code

All on-chain (Aiken) and off-chain (TypeScript) code is open-source and available on GitHub.

On this page