Developers

Veilsplit API

A free, read-only JSON API over the Veilsplit contracts, and the contracts themselves for anything that moves money. No key, no sign up. Every number comes from the chain at the moment you ask.Pre-launch: the contracts deploy on Elysium mainnet on 9 November 2026. Until then only /status, /abi and the index answer with data; the rest return not_live. Read the launch plan.

Overview

Base URL https://veilsplit.xyz/api/v1. Every response is JSON with open CORS, so you can call it from a browser, a bot or a server. Responses are cached for about 5 seconds.

Amounts come as wei strings with a readable hype next to them, for example { "wei": "1500000000000000000", "hype": "1.5" }. Times are unix seconds. Addresses are checksummed.

The API never holds keys and cannot move funds. To create a route, pay one or run a payout, call the contracts from your own wallet (see ).

Status

GET /api/v1/status is the one call to check before anything else. It returns live: false and the plan until the factory is deployed, then live: true with the factory address, owner, fee, whether new routes are open, the keeper and swap router, and the route count, read from the chain.

TypeScript
const status = await fetch("https://veilsplit.xyz/api/v1/status").then((r) => r.json());

if (!status.live) {
  console.log(status.message);          // what happens and when
} else {
  console.log(status.factory.address);  // the Veilsplit factory
}

Endpoints

Each one can be tried here against the live API.

  • GET/api/v1

    Lists every endpoint and the network the API reads.

  • GET/api/v1/status

    Whether Veilsplit is live, the factory and its settings, the $PAYRAIL contract address once set, and the launch plan. Works before launch.

  • GET/api/v1/routes

    Every route, newest first.

    Query: offset (default 0), limit (default 25, max 100)

  • GET/api/v1/routes/{address}

    One route with its owner, schedule, what is waiting and every destination.

  • GET/api/v1/routes/{address}/payouts

    A route's payout record, newest first. Every payout is stored in the route contract.

    Query: offset, limit (max 100)

  • GET/api/v1/wallets/{address}

    Routes a wallet owns, and routes whose current split pays it.

  • GET/api/v1/abi

    The Factory and Route ABIs as JSON. Works before launch.

Route object

Returned by the route, routes and wallet endpoints.

addressThe route contract. Send HYPE or tokens here.
name / ownerSet at creation. The owner can edit the split and schedule until the route is locked.
lockedtrue means the split and schedule can never change.
feeBpsProtocol fee written into this route at creation, in basis points. It can never rise.
versionSplit version. Every earlier version stays readable onchain.
scheduleintervalSeconds (0 = every payment), minPayout, lastPayoutAt, nextPayoutAt (unix seconds) and due.
waitingHYPE in the route that the next payout will split.
heldForCoinBuysHYPE already split to coin buy destinations, waiting to be swapped.
routed / payoutsLifetime HYPE paid out and number of payouts.
destinations[]name, kind (wallet, treasury, creators, reserve, buy), to, bps, and for coin buys the coin and what is held for it.

Errors

Errors come as { "error": "code", "message": "..." } with an HTTP status.

503not_liveVeilsplit is not deployed yet. Every data endpoint answers this until launch on 9 November 2026.
400bad_addressThe address in the path is not a 0x address.
404not_a_routeThe address is not a route made by the Veilsplit factory.
502rpc_errorThe chain could not be read. Retry shortly.

Onchain

Network Elysium mainnet, chain id 99901, gas in HYPE. The factory address is published here, in the docs and in /api/v1/status the moment it is deployed.

ABIs: GET /api/v1/abi. Every function is listed in the docs. A route can have 1 to 6 destinations whose shares add up to exactly 10,000 basis points.

Events worth indexing:

Events
Factory  RouteCreated(route, owner, name, locked, feeBps)
Route    Received(from, amount)
         PaidOut(index, token, amount, fee, version)
         Sent(token, to, amount, pushed)
         Queued(token, coin, to, amount)     // held for a coin buy
         Bought(token, coin, to, spent, got) // coin buy filled
         SplitsChanged(version)  ScheduleChanged(interval, minPayout)  Locked()

Examples

Pay a route. A plain HYPE transfer to the route address is all it takes. It pays out on the route's schedule.

TypeScript
import { parseEther } from "viem";

await wallet.sendTransaction({ to: ROUTE, value: parseEther("1") });

Create a route from your own contract or script. Kinds: 0 wallet, 1 treasury, 2 creators, 3 reserve, 4 buy a coin (coin set, otherwise the zero address).

TypeScript
const { factory } = await fetch("https://veilsplit.xyz/api/v1/abi").then((r) => r.json());

await wallet.writeContract({
  address: FACTORY,
  abi: factory,
  functionName: "createRoute",
  args: [
    "Studio revenue",
    [
      { to: TEAM,     bps: 6000, kind: 0, coin: ZERO, label: "Team wallet" },
      { to: TREASURY, bps: 4000, kind: 1, coin: ZERO, label: "Treasury" },
    ],
    false,   // locked
    86400,   // pay out at most once a day (0 = every payment)
    0n,      // minimum HYPE waiting before a payout
  ],
});

Watch a route without a node: poll the API.

TypeScript
const r = await fetch("https://veilsplit.xyz/api/v1/routes/" + ROUTE).then((r) => r.json());
console.log(r.waiting.hype, "HYPE waiting, due:", r.schedule.due);