Skip to main content
Every ankara command reads ankara.config.json from your current working directory and signing credentials from .env. Run ankara init once in a new project before using any other command. Commands marked read-only do not require a private key — they query the chain directly.

Project Setup

ankara init [project-name]

Scaffolds a new Ankara Chain project in your current directory. The wizard prompts you for a network, an optional factory address, and an optional custom RPC URL, then writes ankara.config.json and a .env stub.
Interactive prompts Example output
If ankara.config.json already exists, the wizard asks whether to reinitialise. Your existing deployments array is preserved.

ankara deploy-factory

Prints the Hardhat (EVM) or Stellar CLI commands you need to run to deploy the full Ankara Chain contract suite — TokenFactory, NFTFactory, MultiTokenFactory, EscrowFactory, RampSettlementFactory, and FactoryRegistry — to the configured network.
This command prints deployment instructions rather than deploying directly. You will need a local copy of the ankara-core contracts repository to run the printed Hardhat or Stellar CLI commands. After deploying, paste the resulting TokenFactory address into ankara.config.json as "factoryAddress".
Example output (EVM)

Token Deployment

ankara deploy

Interactive wizard that deploys an ERC-20 RWA token through your configured TokenFactory. Prompts you to choose a template and fill in all asset-specific metadata fields. The deployed address is saved automatically to ankara.config.json.
string
Skip the template selection prompt. Accepted values: farmland, commodity, real-estate, invoice, carbon-credit, mining-rights.
Template-specific metadata fields
Example output

ankara deploy-nft

Deploys an ERC-721 NFT contract representing a single unique asset record. Use this alongside — or instead of — ERC-20 fungible tokens when your asset is a one-of-a-kind deed, title, or certificate.
Supported templates
Your ankara.config.json must contain an "nftFactoryAddress" field pointing to a deployed NFTFactory contract before you can use this command.
Example output

ankara deploy-batch

Deploys a CommodityBatchToken (ERC-1155) contract — a multi-token warehouse receipt where each token ID represents a distinct commodity batch stored in the same facility.
Interactive prompts
Requires a "multiTokenFactoryAddress" in ankara.config.json.

ankara deploy-pool

Deploys a PoolVault — an ERC-20 fund contract that accepts multiple underlying RWA token addresses as collateral and issues pool shares to depositors.
Interactive prompts

Token Operations

ankara mint

Mints ERC-20 tokens to a recipient address. If you have only one deployment in your config, the CLI uses it automatically; otherwise it presents a selection list.
string
Token contract address. Skips the interactive selection prompt.
string
Recipient wallet address (EVM or Stellar, depending on configured network).
string
Number of tokens to mint, in whole units (e.g. "1000"). Default: "1000".
Example output

ankara batch-mint

Mints ERC-1155 commodity batch tokens to a single recipient. Use this to issue warehouse receipt shares for a specific batch ID on a deployed CommodityBatchToken contract.
Interactive prompts Example output

ankara transfer

Transfers tokens from your deployer wallet to another address. The CLI auto-detects whether the contract is an ERC-20 fungible token or an ERC-721 NFT (via ERC-165) and adjusts the prompts accordingly. On Stellar networks, you choose the asset type manually.
Interactive prompts: contract address; then recipient address and amount (fungible), or recipient address and token ID (NFT).

ankara status

Queries an Ankara Chain token contract and prints its on-chain metadata. If you omit the address, the command lists every deployment recorded in ankara.config.json. This command is read-only — no private key is needed.
Example output
Asset lifecycle statuses: DRAFT → ACTIVE → SUSPENDED → REDEEMED / EXPIRED.

ankara register-batch

Registers a new commodity batch on an existing CommodityBatchToken (ERC-1155) contract, assigning it a token ID and storing its metadata on-chain.
Interactive prompts

Escrow

Ankara Chain’s milestone escrow supports tranche-based payments — a common pattern for diaspora remittances and construction financing. Funds are held in a smart contract and released only when each milestone is marked delivered and approved.

ankara deploy-escrow

Deploys a MilestoneEscrow contract. You define the number of milestones and the token amount for each one at deploy time. The total amount (sum of all milestones) must later be deposited by the payer via ankara escrow-fund.
Interactive prompts Example output

ankara escrow-fund

Approves the stablecoin allowance and deposits the full agreed amount into the escrow contract. Only the payer should run this command.
Prompt: Escrow contract address. Example output

ankara escrow-deliver

Marks a milestone as delivered. Only the payee should run this command after completing the work for a given milestone.
Prompts: escrow address, milestone ID (0-indexed). Example output

ankara escrow-approve

Approves a delivered milestone and releases its funds to the payee. Only the payer should run this command.
Prompts: escrow address, milestone ID (0-indexed). Example output

ankara escrow-dispute

Raises a dispute on a delivered milestone, blocking the release of funds until the arbiter resolves it. Either the payer or the payee may raise a dispute.
Prompts: escrow address, milestone ID.

ankara escrow-resolve

Resolves a disputed milestone. Only the arbiter designated at deployment can run this command. You choose whether to release the funds to the payee or refund them to the payer.
Prompts: escrow address, milestone ID, release to payee (yes/no).

ankara escrow-claim-timelock

Force-releases a delivered milestone to the payee after the configured timelock period has elapsed with no dispute raised. This can be called by any address — it is a safety valve for unresponsive payers.
Prompts: escrow address, milestone ID.

ankara escrow-status

Reads the full state of an escrow contract — parties, balances, and per-milestone status — without requiring a private key.
Prompts: escrow address. Milestone status values: PENDING → DELIVERED → RELEASED / DISPUTED → REFUNDED.

Fiat Ramp

All ramp commands use ManualRampProvider — a reference implementation that returns simulated data. For production, inject a real provider adapter (Yellow Card, Flutterwave, Transak, etc.) at the SDK level before running the CLI.

ankara ramp-quote

Gets a fiat-to-token or token-to-fiat exchange quote for a given currency pair and country.
Interactive prompts Example output

ankara onramp-initiate

Starts an on-ramp session (fiat → tokens) with the ramp provider. Returns a session ID and payment URL. This command does not mint tokens — you must mint them separately once your backend confirms the fiat payment via the provider webhook.
Prompts: fiat amount, fiat currency, token symbol, recipient wallet address, country code. Example output

ankara offramp-initiate

Starts an off-ramp session (tokens → fiat). Approves the RampSettlement contract to spend the specified token amount, deposits the tokens into custody, and initiates a fiat payout session with the provider.
Interactive prompts Example output

ankara offramp-confirm

Confirms that the fiat payout was successfully delivered to the recipient, releasing the custodied tokens to the settlement treasury. Requires SETTLER_ROLE on the RampSettlement contract.
Prompts: settlement contract address, session reference ID.

ankara offramp-refund

Refunds custodied tokens back to the original depositor when a fiat payout fails. Requires MANAGER_ROLE on the RampSettlement contract.
Prompts: settlement contract address, session reference ID.

ankara ramp-status

Reads the on-chain record for an off-ramp deposit or on-ramp attestation by reference ID. Read-only — no private key required.
Prompts: settlement contract address, reference ID.

ankara deploy-ramp-settlement

Deploys a RampSettlement contract — the on-chain custody component of the fiat off-ramp flow. The treasury address you provide receives settled tokens after each confirmed payout.
Prompts: treasury address.

ankara onramp-record

Records an on-chain attestation that an on-ramp mint has occurred, linking the mint to a provider session reference. This does not move funds — mint the recipient’s tokens first, then call this command.
Prompts: settlement contract address, reference string, recipient address, token address, amount minted.

Payments

These commands are Stellar-only. See Payments.

ankara batch-pay

Pays every recipient in a CSV file through a deployed batch-disburser contract, with up to 100 recipients per transaction.
Amounts are integers in the token’s smallest unit. A header row and # comment lines are allowed:
Each transaction is atomic. If any recipient in a batch fails, for example because the token’s identity verifier hasn’t approved them, that whole batch reverts.

Oracle & Collateral

ankara oracle-set

Pushes a new price value to your deployed ManualOracle contract. Use this in development and testing; production deployments should use an automated price feed.
Prompts: oracle contract address, token address to price, price in USD (e.g. 1.50).

ankara deposit

Deposits tokens into a PoolVault as collateral, receiving vault shares in return.
Prompts: pool vault address, token address to deposit, amount.

ankara pool-status

Reads the current state of a PoolVault — total assets, share price, management fee accrual, and collateral breakdown. Read-only.
Prompts: pool vault address.