Prerequisites

  • Node.js 18+
  • A wallet private key (use a throwaway key for testnet)
  • Polygon Amoy testnet MATIC — get free faucet tokens at faucet.polygon.technology

Step 1 — Install the SDK

Or install the CLI globally:

Step 2 — Initialise Your Project

The ankara init wizard scaffolds a project and generates ankara.config.json:
You’ll be prompted for:
  • Project name — used as a label in config
  • Networkpolygon-amoy recommended for testnet
  • Private key — stored in .env, never in config
This creates:
Never commit your .env file. ankara init adds it to .gitignore automatically.

Step 3 — Deploy the Token Factory

The on-chain TokenFactory contract must be deployed once per network before you can issue tokens:
This deploys the factory contract and writes its address to ankara.config.json:

Step 4 — Deploy a Token

Deploy a token from any of the six asset templates:
The interactive wizard prompts for template selection and asset-specific metadata:

Step 5 — Mint Tokens

Mint fractional shares to an investor address:

Using the SDK Directly

For programmatic use in your application:

React Hooks


Next Steps

Explore Asset Templates

See metadata schemas for all 6 asset classes.

CLI Commands

Full reference for every ankara command.

TokenFactory SDK

Programmatic deploy API with full type signatures.

Smart Contracts

Architecture, roles, and upgrade patterns.