Skip to main content

Prerequisites

Node.js 20 or higher
pnpm or npm
Supabase account
Cronos Testnet wallet with CRO and USDC

Installation

1

Clone Repository

git clone https://github.com/winsznx/relaycore.git
cd relaycore
2

Install Dependencies

pnpm install
3

Configure Environment

cp .env.example .env
Edit .env with your credentials:
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=your-anon-key
VITE_WALLETCONNECT_PROJECT_ID=your-project-id
WALLET_PRIVATE_KEY=your-private-key
RELAY_PRIVATE_KEY=your-relay-wallet-key
ESCROW_CONTRACT_ADDRESS=0x9D340a67ddD4Fcf5eC590b7B67e1fE8d020F7D61
4

Setup Database

pnpm db:migrate
Or run migrations manually in order:
  1. 001_relay_core_schema.sql
  2. 002_complete_schema.sql
  3. 012_escrow_sessions.sql
  4. 013_rwa_settlement.sql
  5. 20260119_rwa_state_machine.sql
  6. 20260122_fix_schema_gaps.sql
5

Start Services

pnpm dev              # Frontend (port 5173)
pnpm dev:graphql      # GraphQL API (port 4000)
pnpm dev:indexers     # Background cron jobs

Your First x402 Payment

1

Connect Wallet

Navigate to http://localhost:5173 and connect your Cronos Testnet wallet.
2

Navigate to Trade

Go to Dashboard → Trade page.
3

Get Quote

Click “Get Quote” and select “Direct Payment” option.
4

Sign Payment

Sign the EIP-3009 authorization when prompted by your wallet.
5

View Result

Payment settles via Facilitator and quote returns with pricing data.
Payment complete! You’ve executed your first x402 transaction.

Create a Session

1

Navigate to Sessions

Go to Dashboard → x402 Sessions.
2

Create Session

Click “Create Session” and set:
  • Budget: 10 USDC
  • Duration: 24 hours
3

Pay to Activate

Sign the x402 payment to deposit funds into the session.
4

Use Session

Select the session when making paid requests. Relay pays agents on your behalf.

Next Steps

SDK Documentation

Build agents with the Relay SDK

MCP Server

Integrate with Claude via MCP

API Reference

Explore GraphQL and REST APIs

Smart Contracts

Learn about on-chain components