Skip to main content

Javascript SDK

Welcome to the VerifiedX Web SDK documentation. This SDK provides a unified interface for interacting with both the VerifiedX blockchain and Bitcoin network, enabling powerful cross-chain applications.

SDK Overview

The VerifiedX Web SDK is designed with simplicity and power in mind:

import { VfxClient, btc, Network } from 'vfx-web-sdk';

// VerifiedX operations
const vfxClient = new VfxClient(Network.Testnet);

// Bitcoin operations
const btcClient = new btc.BtcClient('testnet');

Key Features

Dual Blockchain Support

  • Native VFX Operations: Full support for VerifiedX blockchain transactions, domain management, and address operations
  • Bitcoin Integration: Complete Bitcoin functionality including wallet management, transactions, and mempool interaction
  • Cross-Chain Compatibility: Seamless integration between VFX and Bitcoin operations

Developer Experience

  • TypeScript First: Full type safety with comprehensive definitions
  • Universal Compatibility: Works in Node.js, browsers, and modern bundlers
  • Multiple Build Targets: CommonJS, ES Modules, and browser-ready bundles
  • Consistent API: Similar patterns across VFX and Bitcoin operations

Quick Start

Installation

npm install vfx-web-sdk

Basic Usage

import { VfxClient, btc, Network } from 'vfx-web-sdk';

function quickStart() {
// Initialize clients
const vfxClient = new VfxClient(Network.Testnet);
const btcClient = new btc.BtcClient('testnet');

// Generate VFX wallet
const vfxPrivateKey = vfxClient.generatePrivateKey();
const vfxAddress = vfxClient.addressFromPrivate(vfxPrivateKey);

// Generate Bitcoin wallet
const btcKeypair = btcClient.generatePrivateKey();

console.log('VFX Address:', vfxAddress);
console.log('BTC Address:', btcKeypair.address);
}

Documentation Structure

This documentation is organized into several sections:

Getting Started

API Reference

Examples

Community and Support

Next Steps

Ready to start building? Choose your path:

  1. New to VerifiedX? Start with VFX Basics
  2. Bitcoin Developer? Jump to Bitcoin Basics
  3. Building Cross-Chain? Explore Cross-Chain Guide
  4. Need Examples? Browse Complete Applications

Let's build the future of cross-chain applications together!