Skip to main content
The WAX factory functions provide entry points to create instances for working with the Hive blockchain. Use createWaxFoundation() for offline operations and createHiveChain() for full chain access.

createWaxFoundation

Creates a WAX foundation instance for offline operations including transaction building, signing, and validation.

Parameters

Partial<IWaxOptions>
default:"{}"
Optional configuration for the WAX instance

Returns

Promise<IWaxBaseInterface>
Promise that resolves to a WAX base interface instance

Usage example

Error handling

Error
Throws WaxError on any WAX API-related error during initialization

createHiveChain

Creates a WAX Hive chain instance with full chain access including API calls and transaction broadcasting.

Parameters

Partial<IWaxOptionsChain>
default:"{}"
Optional configuration for the Hive chain instance

Returns

Promise<IHiveChainInterface>
Promise that resolves to a Hive chain interface instance with full API access

Usage example

Error handling

Error
Throws WaxError on any WAX API-related error during initialization

TypeScript types

IWaxOptions

IWaxOptionsChain

Default options

See also