Skip to main content
The WAX SDK provides typed access to all Hive blockchain APIs. Query accounts, blocks, witnesses, resource credits, and more with full TypeScript support.

Available APIs

The SDK includes these APIs:
  • database_api - Account data, blocks, witnesses, proposals, and chain properties
  • block_api - Block fetching and block ranges
  • network_broadcast_api - Transaction broadcasting
  • rc_api - Resource credits information
  • account_by_key_api - Account lookup by public key
  • REST APIs - High-performance REST endpoints

API setup

Access APIs through a chain instance:

database_api

Query blockchain data and account information.

Find accounts

Get dynamic global properties

Get witness schedule

Find witnesses

Verify authority

Check if a transaction has valid signatures:

List proposals

Get feed history

Get price feed information:

Get transaction hex

Get the hexadecimal representation of a signed transaction:

block_api

Fetch block data from the blockchain.

Get single block

Get block range

Fetch multiple blocks:

Get block header

Fetch only the block header:

rc_api

Query resource credits information.

Find RC accounts

Calculate RC manabar:

account_by_key_api

Find accounts by public key.

Get key references

network_broadcast_api

Broadcast transactions to the network.

Broadcast transaction

Note: You can also use the convenience method:

REST API

Access high-performance REST endpoints.

Configure REST endpoints

Extending APIs

Add custom JSON-RPC methods

Extend the chain with custom API methods:

Add custom REST endpoints

Extend the chain with custom REST endpoints:

Request/response interception

Intercept and modify API requests and responses:
Use cases:
  • Logging - Track all API calls for debugging
  • Authentication - Add auth headers to requests
  • Retry logic - Retry failed requests automatically
  • Caching - Cache responses for repeated queries
  • Metrics - Collect performance metrics

Error handling

Handle API errors gracefully:

Timeout configuration

Configure API timeouts:

Complete example

A comprehensive API usage example:

Next steps

Explore more SDK capabilities: