Skills for building private escrow contracts and TypeScript SDKs on Aztec Network.
A skills-only repo. The skills/ directory teaches an agent how to:
- Scaffold an Aztec private escrow contract package from scratch
- Write Noir smart contracts for private escrow and atomic swap patterns
- Generate TypeScript bindings and SDK helpers for deployment, registration, authwits, manifests, and private calls
There is intentionally no API, CLI, orderflow server, or runnable app scaffold right now. Those can be added back later on top of the contract + SDK layer.
| Skill | What it does |
|---|---|
scaffold-escrow-project |
Scaffolds the contracts package, Noir sources, artifacts, and TypeScript SDK |
write-escrow-contract |
Guides private escrow contract design, shared private state, role gates, and authwit patterns |
build-escrow-contract |
Compiles Noir contracts and generates TypeScript bindings |
All skills target Aztec v5.1.0. All @aztec/* packages are pinned at the same version via the root package.json workspaces.catalog. The wallet API is EmbeddedWallet from @aztec/wallets/embedded.
aztec-otc-desk/
├── package.json
├── deps/aztec-standards/
├── scripts/token.ts
└── packages/
└── contracts/
├── Nargo.toml
├── src/main.nr
├── src/types/config_note.nr
├── src/types/state_note.nr
└── ts/src/
├── contract.ts
├── constants.ts
├── fees.ts
├── manifest.ts
├── utils.ts
└── artifacts/
The skill now treats secret contracts and contract-owned shared private state as the foundation:
- Artifact, instance, and initialization data let a participant instantiate/register/call the contract wrapper.
- The contract secret key is required to read contract-owned private notes.
- Noir role checks still decide who may execute privileged escrow actions.
- Offchain manifests carry only the escrow address, serialized contract instance, contract secret key, deployment block, and optional transaction hash. Encrypt the whole manifest for participant handoff.
- Escrow lifecycle phases are explicit private state: constructor-funded
OPEN,VOID, optionalACCEPTED, optionalSETTLEMENT_IN_PROGRESS, andFILLED. - Private creator auth uses a caller-sampled role secret. The contract stores only
Poseidon2([caller, secret])in config/state and emitsRoleAdded { secret }back to the caller for recovery; taker/filler pseudonyms are stored only when a runtime phase such asACCEPTEDbinds the accepting caller or the user explicitly asks for allowlisting. - Immutable terms live in
ConfigNote; mutable phase/timer/cancellation data always lives inStateNote. - Atomic one-shot onchain settlement still uses
StateNotesoVOIDandFILLEDare durable terminal states. - Sensitive usernames, handles, and addresses are committed onchain and delivered offchain with the same care as key material.
- Fresh projects should run a short design intake first; Plan mode is preferred when available.
The Noir contract uses u128 amounts and does not care about decimals. Any display or denomination assumptions belong in downstream apps, not in the contract.