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_registrymaps 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 callsclaim. - Revoke. Revoking the agent stops spending; the owner withdraws or sweeps the remaining escrow.
Choose how to integrate
TypeScript SDKNode 20+, browsers, React Native. Talks to Soroban RPC directly — no server, no key.REST APIAny language. Self-hosted gateway with API keys, scopes, rate limits and webhooks.Contracts directlyCall the Soroban contracts with any Stellar SDK or the Stellar CLI.
Conventions
- Amounts are integers in the asset’s smallest unit. For XLM, 1 XLM =
10000000stroops. The SDK usesbigint; 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/.