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
Section titled “SDK Overview”The VerifiedX Web SDK is designed with simplicity and power in mind:
import { VfxClient, btc, Network } from 'vfx-web-sdk';
// VerifiedX operationsconst vfxClient = new VfxClient(Network.Testnet);
// Bitcoin operationsconst btcClient = new btc.BtcClient('testnet');Key Features
Section titled “Key Features”Dual Blockchain Support
Section titled “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
Issuance and Custody
Section titled “Issuance and Custody”- Fungible Tokens (VFX20): Deploy, mint, transfer, burn, pause, ban and vote
- External Signing: Sign every transaction with an HSM, KMS or MPC key the SDK never sees
- Reserve Accounts: Time-delayed vault sends that can be called back, with key recovery
Developer Experience
Section titled “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
Section titled “Quick Start”Installation
Section titled “Installation”npm install vfx-web-sdkBasic Usage
Section titled “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
Section titled “Documentation Structure”This documentation is organized into several sections:
Getting Started
Section titled “Getting Started”- VFX Basics - Learn VerifiedX fundamentals
- Bitcoin Basics - Bitcoin operations with the SDK
- Cross-Chain Guide - Building cross-chain applications
- Fungible Tokens - Issuing and managing VFX20 tokens
- External Signing - HSM, KMS and MPC keys
- Reserve Accounts - Time-delayed, recoverable vaults
API Reference
Section titled “API Reference”- VfxClient API - Complete VFX client documentation
- BtcClient API - Complete Bitcoin client documentation
- Types & Interfaces - TypeScript definitions
Examples
Section titled “Examples”Community and Support
Section titled “Community and Support”- GitHub: VerifiedX WebSDK Repository
- Issues: Report bugs and request features
- Discussions: Join the community discussions
Next Steps
Section titled “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
- Issuing a token? Read Fungible Tokens and External Signing
- Need Examples? Browse Complete Applications
Let’s build the future of cross-chain applications together!