Aiken
Build and deploy Cardano smart contracts with Aiken and Mesh
Overview
Aiken is a functional programming language designed specifically for Cardano smart contract development. It compiles to Plutus Core and prioritizes security, efficiency, and developer experience.
Mesh provides seamless integration with Aiken, allowing you to:
- Compile Aiken contracts and use them in your TypeScript applications
- Build transactions that interact with Aiken validators
- Apply parameters to scripts and resolve addresses
When to use Aiken with Mesh:
- You need to write custom on-chain logic (validators, minting policies)
- You want a modern, type-safe language for smart contracts
- You prefer functional programming patterns
Quick Start
Write and deploy an Aiken smart contract in 4 steps.
1. Install Aiken CLI
curl -sSfL https://install.aiken-lang.org | bash
aikup2. Create a new project
aiken new meshjs/hello_world
cd hello_world3. Write your validator
// validators/hello_world.ak
validator hello_world {
spend(datum: Data, redeemer: Data, context: Data) {
True
}
}4. Build and integrate with Mesh
aiken buildimport { MeshTxBuilder, applyParamsToScript, resolvePlutusScriptAddress } from "@meshsdk/core";
import blueprint from "./plutus.json";
const scriptCbor = applyParamsToScript(blueprint.validators[0].compiledCode, []);
const scriptAddress = resolvePlutusScriptAddress({ code: scriptCbor, version: "V3" }, 0);What's Included
Getting Started
Setting up your system to compile Aiken smart contracts
Write a Smart Contract
Learn how to write your first Aiken script, with a simple redeemer
Build Transactions
Build transactions to interact with smart contracts
Smart Contracts Library
A library of smart contracts to help you start building and learning
Related Links
- Getting Started - Install Aiken and set up your environment
- Write a Smart Contract - Create your first validator
- Build Transactions - Lock and redeem assets
- Aiken Documentation - Official Aiken language reference