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
- VFX Basics - Learn VerifiedX fundamentals
- Bitcoin Basics - Bitcoin operations with the SDK
- Cross-Chain Guide - Building cross-chain applications
API Reference
- VfxClient API - Complete VFX client documentation
- BtcClient API - Complete Bitcoin client documentation
- Types & Interfaces - TypeScript definitions
Examples
Community and Support
- GitHub: VerifiedX WebSDK Repository
- Issues: Report bugs and request features
- Discussions: Join the community discussions
Next Steps
Ready to start building? Choose your path:
- New to VerifiedX? Start with VFX Basics
- Bitcoin Developer? Jump to Bitcoin Basics
- Building Cross-Chain? Explore Cross-Chain Guide
- Need Examples? Browse Complete Applications
Let's build the future of cross-chain applications together!