Skip to main content
All API requests must be authenticated using ECDSA signature-based authentication. You’ll use your Integrator Private Key to sign each request and include the signature in the request headers.

Authentication Headers

Each API request requires the following headers:
HeaderDescription
X-PubkeyYour public key derived from your private key (hex format with 0x prefix)
X-TimestampCurrent Unix timestamp in seconds
X-SignatureECDSA signature of the request (DER-encoded hex with 0x prefix)
Content-TypeMust be application/json
Our Integrator SDK provides a convenient way to generate the authentication headers for your API requests.The getStamp method returns an object containing the required authentication headers (X-Pubkey, X-Timestamp, X-Signature, and Content-Type) that you can include in your API request.

Installation

npm install @byzantine/integrator-sdk

Initialize the Byzantine Client

import { ByzantineClient } from '@byzantine/integrator-sdk';

const client = new ByzantineClient({
  integratorPrivateKey: 'YOUR_INTEGRATOR_PRIVATE_KEY',
});

Usage example

Use the getStamp method to generate authentication headers for your API requests:
const payload = {
  // Your request payload
};

// Generate the api key stamp
const apiKeyStamp = await client.apiKey.getStamp(
  "POST",
  "/v1/submit/send-transaction-otp",
  payload
);

// Use the apiKeyStamp headers in your API call
const response = await fetch(
  "https://api.byzantine.fi/v1/submit/send-transaction-otp?chain_id=1",
  {
    method: "POST",
    headers: apiKeyStamp,
    body: payload,
  }
);
Keep your Integrator Private Key secure!

OpenAPI Specification

Explore the full structure and generate your own client using our OpenAPI specification.