For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quickstart

Get a minimal Epoch integration running in your app.

Prerequisites

  • Node.js 18+

  • A React (or similar) app with wallet connection — wagmi + viem recommended

  • Epoch SDK apiBaseUrl — testnet: https://testnet-dev.epochprotocol.xyz

Install

npm install @epoch-protocol/epoch-intents-sdk @epoch-protocol/epoch-commons-sdk viem

Initialize the SDK

import { EpochIntentSDK } from "@epoch-protocol/epoch-intents-sdk";
import { TaskType } from "@epoch-protocol/epoch-commons-sdk";
import { useWalletClient, useAccount } from "wagmi";

const EPOCH_API_BASE = "https://testnet-dev.epochprotocol.xyz"; // testnet

// Inside your component:
const { data: walletClient } = useWalletClient();
const { address } = useAccount();

const sdk = new EpochIntentSDK({
  apiBaseUrl: EPOCH_API_BASE,
  walletClient: walletClient!,
});

Minimal flow: quote and solve

This example swaps toward a target token on a destination chain using GetTokenOut:

Checklist

Testnet

Use testnet chain IDs and tokens from Supported Chains & Tokens. Set apiBaseUrl to https://testnet-dev.epochprotocol.xyz.

For testnet ERC-20 mints and a live Compact UI, use the Epoch User Dashboard (source).

Next steps

Last updated