AI-assisted plugin development for ReineiraOS. Build condition resolvers and insurance policies with Claude Code.
Platform 0.1 — Generates contracts compatible with ReineiraOS v0.1 interfaces. Check
reineira.jsonfor version details.
git clone https://github.com/ReineiraOS/reineira-code.git
cd reineira-code
npm install --legacy-peer-deps
cp .env.example .env
# Add your private key and RPC URL to .envOpen in an editor with Claude Code. Use slash commands:
| Command | What it does |
|---|---|
/new-resolver |
Build a condition resolver from a description |
/new-policy |
Build an insurance policy with FHE from a description |
/deploy |
Deploy any contract to Arbitrum Sepolia |
/test |
Run tests, diagnose and fix failures |
/audit |
Security audit against the protocol checklist |
/integrate |
Generate SDK code to attach your contract to an escrow |
/scaffold-test |
Generate tests for an existing contract |
/verify |
Verify a deployed contract on Arbiscan |
/new-resolver A resolver that verifies PayPal payment via zkTLS proof from Reclaim Protocol
Claude Code generates the Solidity contract, tests, and deployment script — all pre-configured for the ReineiraOS protocol.
| Repo | What you do there | Platform |
|---|---|---|
| reineira-atlas | Run the startup — strategy, ops, growth, compliance, pitch | 0.1 |
| reineira-code (this repo) | Build smart contracts — resolvers, policies, tests, deploy | 0.1 |
| platform-modules | Ship the product — backend, platform app, payment link | 0.1 |
All repos declare their platform compatibility in reineira.json. When the platform version bumps, breaking contract interface changes may require upgrading.
# Compile
forge build
# Test
forge test
# Deploy
forge script script/DeployTimeLockResolver.s.sol --rpc-url $ARBITRUM_SEPOLIA_RPC_URL --broadcast --verify
# Verify on Arbiscan (if not done during deployment)
forge verify-contract <address> <contract> --chain arbitrum-sepolia --etherscan-api-key $ETHERSCAN_API_KEYA complete end-to-end test of the Reclaim Protocol zkFetch integration is deployed and working on Arbitrum Sepolia:
Deployed Contracts:
- ReclaimResolver:
0x5f6F022740320c49F3F3868a75599d7fE0ac65c9 - SimpleEscrow:
0x58eba8b9258907bE0BEeAD6F25D7EEfda9735ff0 - ZkFetchVerifier (Mock):
0x4a0Bd08E23AdEE060CB3a45C38A01268C6753b4d
Run the E2E test:
# Ensure you have Reclaim credentials in .env
node scripts/zkFetchE2ETest.jsWhat it does:
- Generates real zkTLS proof from GitHub API using Reclaim's zkFetch
- Verifies proof cryptographically off-chain using Reclaim SDK
- Submits proof to on-chain ReclaimResolver
- Releases escrow funds when proof is valid
- Demonstrates complete flow from API call → proof → on-chain settlement
Note: The on-chain verifier is currently a mock for testing. Real cryptographic verification happens off-chain in step 2. Production deployments should use Reclaim's production verifier contract.
Status: Active development with working testnet deployment
What's working:
- ✅ Reclaim zkFetch E2E test on Arbitrum Sepolia
- ✅ Pluggable condition resolver architecture
- ✅ Base abstractions for oracle, prediction market, and zkTLS resolvers
What's in progress:
- 🔄 FHE dependency migration (cofhe v0.4.0 → v0.5.0) - migration window: April 27, 12:00-15:00 UTC
- 🔄 Production-ready concrete resolver implementations
- 🔄 Additional zkTLS provider integrations (TLSNotary, etc.)
Known limitations:
- FHE-dependent contracts (policies) temporarily excluded from compilation during FHE migration
- Mock verifier used for on-chain testing (real verification happens off-chain)
| Component | Requirement |
|---|---|
| Platform | ReineiraOS 0.1 |
| Solidity | ^0.8.24 |
| Foundry | Latest |
| SDK | @reineira-os/sdk ^0.1.0 |
| cofhejs | ^0.5.0 (migrating) |
| Reclaim | @reclaimprotocol/zk-fetch ^0.8.0 |
| Node.js | 18+ |
This project uses Foundry for smart contract development:
- Forge: Ethereum testing framework
- Cast: CLI for interacting with contracts
- Anvil: Local Ethereum node for testing
For more details, see the Foundry Book.
MIT