Key features
The SDK offers two main entry points based on your use case:- Offline operations - Use
createWaxFoundation()for transaction building, signing, and cryptographic operations without network access - Online operations - Use
createHiveChain()for full blockchain interaction including API calls, transaction broadcasting, and account queries
Architecture
WAX uses WebAssembly to compile the core Hive protocol code (written in C++) directly into your JavaScript application. This provides:- Performance - Near-native speed for cryptographic operations and transaction serialization
- Accuracy - Identical behavior to the Hive blockchain nodes
- Type safety - Full TypeScript definitions for all operations and API calls
- Small bundle size - Optimized WASM modules with tree-shaking support
Core concepts
Transactions
You build transactions by pushing operations into a transaction object:Operations
Operations are the building blocks of transactions. The SDK provides:- Simple operations - Direct protocol operations as inline objects
- Complex operations - High-level factories for multi-operation scenarios (blog posts, recurrent transfers, etc.)
- Hive Apps operations - Specialized operations for communities, follows, and resource credits
Assets
Assets use NAI (Numerical Asset Identifier) format:Formatters
Use template literals withwaxify for readable output:
Package structure
The main package@hiveio/wax includes:
- Core WASM module
- TypeScript interfaces and types
- API caller implementations
- Transaction builders
- Cryptographic utilities
@hiveio/wax-signers-beekeeper- Beekeeper wallet integration@hiveio/wax-signers-keychain- Hive Keychain browser extension@hiveio/wax-signers-metamask- MetaMask Snaps integration@hiveio/wax-signers-peakvault- PeakVault mobile wallet@hiveio/wax-signers-hb-auth- HiveAuth protocol support
Use cases
Offline applications
Build transactions without network access:Online applications
Interact with the Hive network:Framework integration
WAX works seamlessly with:- React (Create React App, Vite)
- Next.js (App Router, Pages Router)
- Vue (Vite, Webpack)
- Nuxt
- Node.js applications
- Plain HTML/JavaScript
Next steps
Explore the SDK capabilities:- Install the SDK in your project
- Learn about offline operations
- Discover online operations
- Build and sign transactions
- Make API calls to the network
- Integrate with frameworks
- Study working examples