Mental Model
HieroKit is designed to be the "missing layer" between the raw SDK and your application logic.
The Problem
The raw Hiero SDK (@hiero-ledger/sdk) is powerful but low-level. It requires you to:
- Manually handle client connection logic.
- Manually sign transactions (sometimes).
- Manually wait for consensus (receipts).
- Manually handle retries for various network errors.
The HieroKit Solution
HieroKit abstracts these steps into declarative flows:
- Client: A configured instance that manages connection and operator identity.
- Transaction Handle: A promise-like object that represents a submitted transaction, allowing you to wait for finality or check status.
- Flows: High-level methods for common tasks (e.g.,
transferHbar,createTopic).
Lifecycle
- Construct: Create the transaction object (SDK level).
- Submit: Send it to the network via HieroKit Client.
- Wait: HieroKit handles the polling for consensus.
- Result: You get a finalized Receipt or Record.

