API Reference

Build powerful cross-chain applications with PulseChain Bridge API. RESTful endpoints, WebSocket support, and comprehensive SDKs.

99.9% API Uptime
<50ms Response Time
24/7 Support

Quick Start

Get up and running in minutes

1. Install the SDK

npm install @pulsechain/bridge-sdk

2. Initialize the Client

import { PulseChainBridge } from '@pulsechain/bridge-sdk';

const bridge = new PulseChainBridge({
  apiKey: 'YOUR_API_KEY',
  network: 'mainnet'
});

3. Bridge Tokens

const tx = await bridge.initiateBridge({
  token: 'ETH',
  amount: '1.0',
  from: 'ethereum',
  to: 'pulsechain',
  recipient: '0x...'
});

console.log('Transaction:', tx.hash);

REST API Endpoints

Base URL: https://api.pulse-bridge.com/v1

Get Bridge Status

GET /bridge/status

Check if the bridge is operational and get current gas prices.

Response

{
  "status": "operational",
  "uptime": 99.98,
  "ethereum": {
    "gasPrice": "28 gwei",
    "blockNumber": 18520145
  },
  "pulsechain": {
    "gasPrice": "1 gwei",
    "blockNumber": 15420987
  }
}

Get Supported Tokens

GET /tokens/supported

List all tokens supported by the bridge.

Response

{
  "tokens": [
    {
      "symbol": "ETH",
      "name": "Ethereum",
      "ethereum": "native",
      "pulsechain": "0x...",
      "decimals": 18,
      "minBridge": "0.01"
    },
    {
      "symbol": "USDC",
      "name": "USD Coin",
      "ethereum": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "pulsechain": "0x...",
      "decimals": 6,
      "minBridge": "10"
    }
  ]
}

Initiate Bridge Transaction

POST /bridge/initiate

Start a new bridge transaction.

Request Body

{
  "token": "ETH",
  "amount": "1.0",
  "from": "ethereum",
  "to": "pulsechain",
  "recipient": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb5"
}

Response

{
  "bridgeId": "0x1234...5678",
  "status": "pending",
  "estimatedTime": "10-15 minutes",
  "fees": {
    "network": "0.005 ETH",
    "bridge": "0.001 ETH",
    "total": "0.006 ETH"
  }
}

Track Bridge Transaction

GET /bridge/track/:id

Get the status of a bridge transaction.

Response

{
  "bridgeId": "0x1234...5678",
  "status": "completed",
  "progress": 100,
  "txHash": {
    "ethereum": "0xabcd...ef01",
    "pulsechain": "0x9876...5432"
  },
  "timestamps": {
    "initiated": "2025-12-01T10:00:00Z",
    "completed": "2025-12-01T10:12:34Z"
  }
}

WebSocket API

Real-time updates for bridge transactions

Connection

wss://api.pulse-bridge.com/v1/ws

Subscribe to Transaction Updates

const ws = new WebSocket('wss://api.pulse-bridge.com/v1/ws');

ws.onopen = () => {
  ws.send(JSON.stringify({
    action: 'subscribe',
    bridgeId: '0x1234...5678'
  }));
};

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log('Bridge update:', data);
};

Event Types

  • initiated - Bridge transaction created
  • confirmed - Source transaction confirmed
  • processing - Bridge is processing
  • minted - Tokens minted on destination
  • completed - Bridge completed successfully
  • failed - Bridge transaction failed

Webhooks

Receive HTTP POST notifications for bridge events

Configure Webhook

Set up webhook endpoints in your dashboard to receive notifications.

Webhook Payload

{
  "event": "bridge.completed",
  "bridgeId": "0x1234...5678",
  "token": "ETH",
  "amount": "1.0",
  "from": "ethereum",
  "to": "pulsechain",
  "txHash": {
    "ethereum": "0xabcd...ef01",
    "pulsechain": "0x9876...5432"
  },
  "timestamp": "2025-12-01T10:12:34Z"
}

Verify Webhook Signature

const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const hmac = crypto.createHmac('sha256', secret);
  const computed = hmac.update(payload).digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(computed)
  );
}

Rate Limits & Authentication

API usage limits and authentication requirements

Authentication

Include your API key in the header:

Authorization: Bearer YOUR_API_KEY

Rate Limits

  • Free: 100 requests/hour
  • Pro: 1,000 requests/hour
  • Enterprise: Unlimited

Error Codes

  • 400 - Bad Request
  • 401 - Unauthorized
  • 429 - Rate Limit Exceeded
  • 500 - Server Error

Need Help with Integration?

Our developer support team is here to help you get started.