Skip to main content
ProofBridge is designed to be embedded into any frontend or backend that needs cross-chain transfers. There are two integration surfaces:
  1. REST API (available today) — the relayer exposes a versioned HTTP API at api.pfbridge.xyz. Anyone can integrate against it now.
  2. @proofbridge/sdk TypeScript package (in development) — a thin typed wrapper over the REST API plus on-chain helpers, scheduled to publish to npm alongside the mainnet release.
The @proofbridge/sdk npm package is in development and ships as part of the mainnet release tranche (see the Roadmap). Until it lands on npm, integrate against the REST API directly — the SDK is a typed wrapper over the same surface, so any work you do against the API today maps cleanly onto the SDK later.

What the SDK will cover

The first stable release (@proofbridge/sdk@1.0.0) will target four integration concerns:
  • SDK init — configure base URL, chain providers, and authenticated session in one place.
  • Bridge initiation — call a single method to create an order, sign the deposit, and submit it on-chain.
  • Status polling — subscribe to order lifecycle events without writing a polling loop.
  • Webhook setup — register HTTPS callbacks so your backend learns about settlement instead of polling.
Final method signatures, parameter shapes, and event names will be published with the 1.0.0 release.

Today: integrate against the REST API

You can build everything the SDK will offer by composing the existing endpoints. See the API Reference for the full surface.

1. Initialize a client

For now, “init” is just configuring a base URL and storing tokens. The SDK will collapse this into a single constructor call. See Authentication for the SIWE / SEP-10 challenge flow that produces a Bearer access token.

2. Initiate a bridge transfer

A bridge transfer today is a three-step server interaction plus one on-chain transaction — list ads, create the trade, deposit on the source chain, then notify the relayer. The SDK will hide that orchestration behind a single bridge() call. See Trades for parameter details and error semantics.

3. Poll order status

Until the public socket feed is wired up, status polling is a GET /v1/trades/:id loop until the order reaches a terminal state. The SDK will replace this with an async event stream backed by the same endpoint plus the relayer’s socket.io feed.

4. Webhook setup (planned)

Webhook registration is part of the SDK / dashboard release tranche — see the Roadmap. Until then, settlement notifications are available via polling the trade endpoint or the in-app socket.io channel that the frontend already uses.

Tracking SDK availability

  • The @proofbridge/sdk package is being built in lockstep with the mainnet contracts. Track the release in the Roadmap.
  • The OpenAPI spec is exposed at api.pfbridge.xyz/openapi.json — once the SDK ships, types are generated directly from this spec.
  • Interactive Swagger UI is available at api.pfbridge.xyz/docs.
If you are integrating now and want a heads-up when the SDK lands on npm, watch the GitHub repository — the 1.0.0 tag triggers the published release.

Next steps

API Overview

The full REST surface — base URL, error codes, pagination.

Authentication

Obtain Bearer tokens via SIWE (EVM) or SEP-10 (Stellar).

Trades endpoints

Create, confirm, lock, and unlock cross-chain orders.

Roadmap

See where SDK and webhook delivery fall in the release plan.