Skip to content

Getting Started


To use the VoidAI Bridge SDK, you must first register as a Tenant.

  1. Contact the VoidAI team to register your tenant contract. The team will validate your request and register your tenant with a Primary Wallet (Bittensor).

  2. Log in to the VoidAI Admin Panel using your Primary Wallet at app.voidai.com.

  3. Navigate to the API Keys section to retrieve your apiKey (Public) and secretKey (Private).

Once registered, the portal provides a full management dashboard:

FeatureDescription
PerformanceView API key performance, rate limits, and quota usage.
Transaction HistoryTrack transactions per key with status visibility.
Fee ManagementSet your tenant fee percentage for bridge, swap, and CCIP operations.
RewardsView your accumulated fees and request manual payouts.

Terminal window
npm install @voidaisdk/bridge-sdk

If you plan to use wallet integrations, install the relevant peer dependencies:

Terminal window
# Bittensor / Polkadot
npm install @polkadot/api @polkadot/extension-dapp
# EVM
npm install ethers
# or
npm install viem wagmi
# Solana
npm install @solana/web3.js @solana/wallet-adapter-react

The SDK supports two modes: Frontend (browser) and Backend (server). Choose based on your deployment context.

Use BridgeSDK for client-side applications. Only your apiKey is required.

import { BridgeSDK } from '@voidaisdk/bridge-sdk';
const sdk = new BridgeSDK({
apiKey: 'YOUR_PUBLIC_API_KEY',
environment: 'mainnet', // 'devnet' | 'testnet' | 'mainnet'
});
// Wait for authentication (JWT exchange) to complete
await sdk.ready;
console.log('Bridge SDK is ready!');

EnvironmentBase URLBridge Contract (EVM)Purpose
devnethttps://api-sdk-dev.voidai.envistudios.com/api0x6266ce15aC4f32F096Ff91881dd887a0F4bBa569Development & Testing
testnethttps://sdk-backend.voidai.com/sdk0x4aA4396BfD6F268b427077079800F420dF947b63Staging / Pre-Production
mainnethttps://sdk.voidai.com/sdk0x604e8Ef901C0E69E79463D997ba7D0724A909b84Production

The SDK ships with full TypeScript type definitions. Import types directly as needed:

import { BridgeSwapRequest, BridgeSwapResponse } from '@voidaisdk/bridge-sdk';

  • Initialize the SDK with only your public apiKey.
  • Configure Domain Whitelisting in the VoidAI Tenant Portal. The backend validates the Origin header — requests from non-whitelisted domains are rejected.
  • Only whitelist domains you control (e.g. https://myapp.com, http://localhost:3000 for development).
  • Use both apiKey and secretKey. The SDK exchanges these credentials for a JWT Access Token via POST /api/v1/auth/login.
  • The JWT is automatically managed and refreshed by the SDK for all subsequent API calls.
  • Always store keys in environment variables (e.g. .env files) — never hardcode them in source files or commit them to version control.