Docs

Build with Noir

How Noir works for developers: devices, agent policies, escrow, and the ways to integrate.

Noir turns an NFC card into a payment method on Stellar. Everything that makes that work lives in three open Soroban contracts, so any application can read a card’s rules, accept its payments and react to what happens on-chain — without asking Noir for permission.

The model in one minute

  • Device. A card is identified by the 64-hex SHA-256 of its UID (the device hash). device_registry maps it to its owner’s wallet.
  • Agent policy. The owner authorizes one agent key per device in agent_registry: which asset, a per-payment cap (maxAmount, 0 = no cap) and an optional expiry.
  • Escrow. The owner pre-funds the device in payment_escrow. Taps can only spend that balance.
  • Tap. The agent calls authorize; the contract enforces the policy and credits the merchant, who later calls claim.
  • Revoke. Revoking the agent stops spending; the owner withdraws or sweeps the remaining escrow.

Choose how to integrate

Conventions

  • Amounts are integers in the asset’s smallest unit. For XLM, 1 XLM = 10000000 stroops. The SDK uses bigint; the API uses decimal strings.
  • Addresses are Stellar strkeys: G… for accounts, C… for contracts (including token contracts such as native XLM’s SAC).
  • Noir currently runs on Stellar Testnet. Fund test accounts with Friendbot.

Everything here is MIT-licensed. Source: sdk/ and backend/contracts/.