Ghost Protocol Ghost Protocol Home

REST API

Ghost Protocol Bridge API

Integrate private Solana bridge transfers into your own app, bot or wallet. Public bridge and stats endpoints require no API key.

Introduction

The Ghost Protocol API is a small JSON REST API over HTTPS. All responses are JSON. Amounts are in SOL. Any HTTP client works.

Base URL

https://api.veilpay.app

The same endpoints are also reachable under /api on the main site.

Authentication

The public bridge and stats endpoints require no authentication. Admin endpoints are private and are not part of the public API.

Bridge Flow

  1. POST /bridge with an amount and the user's destination address.
  2. The API returns a fresh depositAddress and exact depositSol.
  3. Have the user send exactly depositSol to depositAddress.
  4. Poll GET /bridge/:id until status becomes completed, refunded, expired, or failed.

The bridge fee is 0.5%, added on top. To bridge amountSol, the user sends depositSol = amountSol * 1.005 and receives the full amountSol.

Endpoints

GET /stats

Public network statistics.

{
  "bridges": 128,
  "volumeSol": 342.5,
  "fundingWallets": 47,
  "feeBps": 50
}
GET /bridge/amounts

The selectable bridge amounts and current fee.

{
  "amounts": [0.1, 0.5, 1, 5],
  "feeBps": 50
}
POST /bridge

Create a new bridge and get a fresh deposit address.

FieldTypeDescription
amountSolnumberOne of 0.1, 0.5, 1, 5. The amount the user receives.
destinationAddressstringA valid Solana address that receives the clean payout.
curl -X POST https://api.veilpay.app/bridge \
  -H "Content-Type: application/json" \
  -d '{"amountSol": 5, "destinationAddress": "YourSolanaAddress..."}'
{
  "id": "6a5789b02410f667baad5017",
  "amountSol": 5,
  "depositSol": 5.025,
  "feeSol": 0.025,
  "depositAddress": "7EG2FMkUM87V6a9NHmUkwdZWsc1zDgLJSWSzunoX1qJs",
  "destinationAddress": "8rfY6XbZt33VJy6SPs9oWfeZdahZMhc2Z1cqRboAMhRh",
  "status": "awaiting_deposit",
  "expiresAt": "2026-07-15T14:22:56.690Z"
}
GET /bridge/:id

Fetch the current status of a bridge. Poll this until terminal.

{
  "id": "6a5789b02410f667baad5017",
  "amountSol": 5,
  "depositSol": 5.025,
  "feeSol": 0.025,
  "status": "completed",
  "depositedSol": 5.025,
  "payoutSignature": "5x8...abc",
  "refundSignature": null,
  "senderAddress": null,
  "error": null
}

Bridge Statuses

awaiting_depositWaiting for the user to send SOL to the deposit address.
paying_outDeposit detected; a clean wallet is locked and payout is sent.
completedPayout sent. See payoutSignature.
refundingNo clean wallet available; refund in progress.
refundedDeposit returned. See refundSignature.
expiredNo funds arrived before the deposit address expired.
failedAn error occurred; flagged for review.

Errors

Errors return a non-2xx status with a JSON body.

{ "error": "invalid destination address" }
400Invalid amount or address.
404Bridge not found.
500Server error.