Veilsplit API
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.
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.
| address | The route contract. Send HYPE or tokens here. |
| name / owner | Set at creation. The owner can edit the split and schedule until the route is locked. |
| locked | true means the split and schedule can never change. |
| feeBps | Protocol fee written into this route at creation, in basis points. It can never rise. |
| version | Split version. Every earlier version stays readable onchain. |
| schedule | intervalSeconds (0 = every payment), minPayout, lastPayoutAt, nextPayoutAt (unix seconds) and due. |
| waiting | HYPE in the route that the next payout will split. |
| heldForCoinBuys | HYPE already split to coin buy destinations, waiting to be swapped. |
| routed / payouts | Lifetime 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.
| 503 | not_live | Veilsplit is not deployed yet. Every data endpoint answers this until launch on 9 November 2026. |
| 400 | bad_address | The address in the path is not a 0x address. |
| 404 | not_a_route | The address is not a route made by the Veilsplit factory. |
| 502 | rpc_error | The 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:
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.
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).
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.
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);