Prerequisites

  • Node.js 18+
  • A Stellar testnet account + secret key (S...)
  • Testnet XLM (for fees)
Never commit your secret key. Keep STELLAR_SECRET_KEY in .env only.

Step 1 — Install the SDK

Or use the CLI without installing:

Step 2 — Initialise Your Project

Create a new config and pick Stellar Testnet (Soroban) when prompted:
This creates:
Your .env will include:

Step 3 — Set the Token Factory Address

You need a deployed TokenFactory contract ID on Stellar. Use the TokenFactory address from the repo’s Stellar deployment list: Then set it in ankara.config.json:

Option B: Deploy your own factories

If you want your own factory addresses, deploy the Soroban contracts from:
This uses stellar-cli identities (not STELLAR_SECRET_KEY) and prints the contract IDs you can paste into ankara.config.json.

Step 4 — Deploy a Token

Deploy a token using the same ankara deploy flow as EVM networks:
The wizard will prompt for the same metadata fields and will save the deployed contract ID into ankara.config.json.

Step 5 — Mint Tokens


Step 6 — Create a Milestone Escrow Deal

To deploy a MilestoneEscrow, you need an EscrowFactory address in ankara.config.json (already shown in Step 3 if you used the existing testnet deployment). Deploy an escrow:
For a simple testnet demo, you can use the native XLM Stellar Asset Contract as the escrow token: CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
XLM is not a stablecoin. Use it only for testnet demos, not real production flows.

Using the SDK Directly

For programmatic use in your app:

Next Steps

Stellar Overview

How the Soroban contracts map to the same SDK API as EVM networks.

CLI Commands

Full reference for every ankara command.

Smart Contracts

Architecture, roles, and upgrade patterns.

Escrow

Milestone-based escrow deals for tranche-based payments.