Agent skill
aztec-typescript
Generate TypeScript client code for interacting with Aztec contracts. Use when building frontend integrations, creating contract clients, or setting up wallet connections.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/aztec-typescript
SKILL.md
Aztec TypeScript Integration
Generate TypeScript code for interacting with Aztec contracts.
Subskills
- Contract Client - Type-safe contract interaction wrapper
- Wallet Setup - Wallet and node connection patterns
- Transaction Patterns - Common transaction patterns
- AuthWit Frontend - Client-side authorization witness implementation
Quick Start: Contract Interaction
import { MyContract } from "../artifacts/MyContract.js";
import { SponsoredFeePaymentMethod } from "@aztec/aztec.js/fee";
// Get contract instance
const contract = MyContract.at(contractAddress, wallet);
// Call a method
const tx = await contract.methods.myMethod(arg1, arg2).send({
from: account.address,
fee: { paymentMethod },
wait: { timeout: 600 }
});
console.log('Transaction successful');
Generated Artifacts
After running aztec codegen, you get TypeScript bindings:
// src/artifacts/MyContract.ts
import { MyContractContract } from "../artifacts/MyContract.js";
// Available methods
MyContractContract.deploy(wallet, ...args) // Deploy new contract
MyContractContract.at(address, wallet) // Connect to existing
contract.methods.myFunction(args) // Call contract method
Key Imports
// Contract and wallet
import { Wallet } from "@aztec/aztec.js/wallet";
import { AztecAddress } from "@aztec/aztec.js/addresses";
// Transaction handling
import { TxReceipt } from "@aztec/stdlib/tx";
// Fee payment
import { SponsoredFeePaymentMethod } from "@aztec/aztec.js/fee";
// Fields and types
import { Fr, GrumpkinScalar } from "@aztec/aztec.js/fields";
// Logging
import { type Logger, createLogger } from "@aztec/foundation/log";
Transaction Flow
- Get contract instance (
at()ordeploy()) - Call method via
contract.methods.xxx() - Send with fee payment and wait
.send({ from, fee, wait: { timeout } }) - Transaction resolves when confirmed
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?