Skip to main content
The create_hive_chain() factory function creates an online interface for Hive blockchain operations. This provides full blockchain access including API calls, transaction broadcasting, and automatic TAPOS data retrieval.

Factory function

Parameters

WaxChainOptions | None
Optional configuration. Defaults to mainnet via hive.blog if not provided.

Returns

Returns an IHiveChainInterface instance with full online capabilities including all offline features from IWaxBaseInterface.

Basic usage

Custom configuration

API access

The api property provides access to Hive blockchain APIs.

Database API

Query blockchain data:

Resource Credits API

Query RC (Resource Credit) information:

Network Broadcast API

Broadcast transactions directly:

Creating transactions

Create transactions with automatic TAPOS data:

Signing and broadcasting

Sign with Beekeeper and broadcast to the network:

On-chain verification

Transactions created with create_transaction() return IOnlineTransaction which supports automatic verification:
The broadcast() method automatically calls perform_on_chain_verification() for IOnlineTransaction instances before broadcasting.

Collecting account authorities

Retrieve account permission data:

Extending the API

Add custom API endpoints or override existing ones:
You can also extend REST APIs using extend_rest():

Resource management

Clean up resources when done:
Or use as an async context manager pattern:

Offline features

All offline capabilities from create_wax_foundation() are available:

Error handling

Complete example

Next steps

Transaction management

Learn more about building and managing transactions

API calls

Explore available API endpoints

Examples

See complete working examples