Skip to main content
The Wax factory module provides two main functions to create instances for working with the Hive blockchain. Use create_wax_foundation() for offline operations like transaction building and validation, or create_hive_chain() for online operations that require API connectivity.

create_wax_foundation

Creates a Wax base interface for offline blockchain operations.

Parameters

WaxOptions | None
default:"None"
Configuration options for the Wax instance.

Returns

IWaxBaseInterface
An instance providing offline blockchain operations including:
  • Transaction creation and validation
  • Cryptographic operations (signing, key generation)
  • Asset conversions and calculations
  • Manabar calculations

Example


create_hive_chain

Creates a Hive chain interface for online blockchain operations with API connectivity.

Parameters

WaxChainOptions | None
default:"None"
Configuration options for the Hive chain connection.

Returns

IHiveChainInterface
An instance providing all offline operations plus:
  • API access to Hive node endpoints
  • Transaction broadcasting
  • Automatic TAPOS data retrieval
  • Account authority collection
  • On-chain verification

Example

API access

The returned chain instance provides access to Hive API endpoints through the api property:

Extending APIs

You can extend the default API collection with custom endpoints: