Documentation Index Fetch the complete documentation index at: https://mintlify.com/openhive-network/wax/llms.txt
Use this file to discover all available pages before exploring further.
WAX is available for both Python and TypeScript. Choose your preferred language and follow the installation steps below.
Prerequisites Before installing WAX for Python, ensure you have:
Python 3.12 or higher (3.14+ recommended)
pip or Poetry package manager
We recommend using Poetry for Python dependency management. Install it with: curl -sSL https://install.python-poetry.org | python3 - --version 2.1.3
Install WAX
Create a virtual environment
It’s recommended to use a virtual environment for your project: python3 -m venv venv
source ./venv/bin/activate
Set registry environment variables
Configure pip to use the WAX package registry: export FIRST_INDEX = "https://gitlab.syncad.com/api/v4/projects/362/packages/pypi/simple"
export SECOND_INDEX = "https://gitlab.syncad.com/api/v4/projects/434/packages/pypi/simple"
export THIRD_INDEX = "https://gitlab.syncad.com/api/v4/projects/198/packages/pypi/simple"
Install the package
Install WAX using pip: python3 -m pip install \
--index-url $FIRST_INDEX \
--extra-index-url $SECOND_INDEX \
--extra-index-url $THIRD_INDEX \
hiveio-wax
Or with Poetry:
Verify installation
Test that WAX is installed correctly: from wax import create_wax_foundation
wax = create_wax_foundation()
print (wax.hive( 5 )) # Output: HIVE in NAI format
Installing Beekeeper (optional) For transaction signing, you’ll need a wallet integration. The recommended option is Beekeeper: Beekeeper provides a secure in-memory wallet for managing private keys. Dependencies WAX for Python includes the following key dependencies:
protobuf - Protocol buffer support
httpx - Async HTTP client with HTTP/2
loguru - Logging
python-dateutil - Date utilities
hiveio-api - Hive API definitions
These are installed automatically when you install WAX. Prerequisites Before installing WAX for TypeScript, ensure you have:
Node.js 20.11 or higher (or Node.js 21.2+)
npm or pnpm package manager
WAX works with various package managers, but we recommend pnpm for better performance and disk space efficiency. Install WAX
Configure registry for development versions
If you want to use development versions, configure npm to use the GitLab registry for @hiveio scope: echo @hiveio:registry=https://gitlab.syncad.com/api/v4/groups/136/-/packages/npm/ >> .npmrc
Skip this step if you only need stable releases from npm.
Install the package
Install WAX using your preferred package manager:
Verify installation
Create a test file to verify WAX is working: import { createWaxFoundation } from '@hiveio/wax' ;
const wax = await createWaxFoundation ();
// Creates a representation of 5 HIVE coins in NAI format
console . log ( wax . hiveCoins ( 5 ));
Run it with: Installing wallet signers (optional) For transaction signing, you can install various wallet integrations: Beekeeper
Keychain
MetaMask
PeakVault
npm install @hiveio/beekeeper
Framework-specific setup WAX works seamlessly with popular frameworks: Next.js No additional configuration needed. WAX automatically detects SSR environments. import { createHiveChain } from '@hiveio/wax' ;
export default async function Home () {
const chain = await createHiveChain ();
// Use chain in your component
}
React + Vite WAX works out of the box with Vite: import { createWaxFoundation } from '@hiveio/wax' ;
function App () {
const [ wax , setWax ] = useState ( null );
useEffect (() => {
createWaxFoundation (). then ( setWax );
}, []);
}
Vue + Vite Similar to React, no special configuration required: import { createHiveChain } from '@hiveio/wax' ;
const chain = await createHiveChain ();
Nuxt WAX automatically handles Nuxt’s SSR environment: import { createHiveChain } from '@hiveio/wax' ;
export default defineNuxtComponent ({
async setup () {
const chain = await createHiveChain ();
return { chain };
}
}) ;
Webpack WebAssembly is automatically handled by Webpack 5+. For older versions, you may need to configure WASM support. Parcel Parcel requires the Buffer polyfill: Environment detection WAX automatically resolves to the correct version based on your environment:
Web environments : Uses the web version with WASM
Node.js : Uses the Node.js version with optimized imports
SSR : Automatically handles server-side rendering scenarios
You don’t need to configure anything - it just works! API definitions (optional) WAX core is intentionally lightweight. Install API definitions as needed: JSON-RPC API
Block Explorer API
Account History API
Balance Tracker API
Reputation Tracker API
npm install @hiveio/wax-api-jsonrpc
This modular approach keeps your bundle size small by only including the APIs you actually use.
Troubleshooting
Python: ModuleNotFoundError
If you get a ModuleNotFoundError, ensure:
Your virtual environment is activated
You’ve set the registry environment variables correctly
You’re using Python 3.12 or higher
TypeScript: Cannot find module
If imports fail, try:
Delete node_modules and reinstall: rm -rf node_modules && npm install
Ensure you’re using Node.js 20.11+ or 21.2+
Check that your bundler supports ESM modules
WASM loading errors
If you see WASM-related errors in the browser:
Check that your bundler is configured for WASM support
Ensure you’re serving the application over HTTP/HTTPS (not file://)
For Vite, make sure assets are being copied correctly
Next steps
Quick start guide Learn how to create your first Hive transaction with WAX