IHiveChainInterface extends IWaxBaseInterface with online chain access capabilities, including API calls, transaction broadcasting, and enhanced transaction creation with automatic TAPOS.
Inheritance
IHiveChainInterface extends all methods and properties from IWaxBaseInterface.
Properties
api
Access to all Hive blockchain APIs through typed interfaces.Available APIs
object
Account lookup by public key
object
Block data retrieval
object
Core database queries
object
Transaction broadcasting
object
Resource credit queries
restApi
Access to REST API endpoints for hafbe (Hive Application Framework Backend).Configuration
Setting endpoint URLs
You can customize endpoint URLs per API or globally:Enhanced transaction methods
createTransaction
Creates a transaction with automatic TAPOS using current head block.TTimestamp
Optional expiration time. Can be:
- Date object
- Unix timestamp (number)
- ISO 8601 string
- Relative time:
"+10s","+30m","+1h"
"+1m"Promise<IOnlineTransaction>
Promise that resolves to an online transaction with verification capabilities
Usage example
API usage examples
Get dynamic global properties
Find accounts
Get block
Get key references
Find RC accounts
Broadcast transaction
Online transaction features
IOnlineTransaction
TheIOnlineTransaction interface extends ITransaction with additional verification methods.
performOnChainVerification
Performs transaction checks that require chain API access.- Private key leakage prevention
- Authority validation
generateAuthorityVerificationTrace
Generates authority verification trace for the transaction.boolean
Optional flag to use legacy (pre-HF26) serialization
ITransaction
Optional external transaction for verification
Promise<IVerifyAuthorityTrace>
Authority verification trace data
Usage example
API customization
Extending APIs
You can extend the API with custom endpoints:Setting API timeout
API timeout is configured during chain creation:Custom API caller header
Identify your application with the X-Wax-Api-Caller header:TypeScript types
Error handling
See also
- createHiveChain - Factory function
- IWaxBaseInterface - Base interface methods
- ITransaction - Transaction interface