@hieco/runtime
v1.0.0
Published
Runtime-aware Hiero SDK adapter for browser, workers, and Node.js
Maintainers
Readme
@hieco/runtime
@hieco/runtime is the runtime-aware adapter around the Hiero JavaScript SDK used by the Hieco package family.
It exists so Hieco packages can depend on one stable import path while package resolution still does the right thing in browsers, workers, workerd, and Node-style runtimes.
Why This Package Exists
Hieco packages use this package as the shared boundary around the underlying Hiero SDK:
@hieco/sdkre-exports core SDK types from@hieco/runtime@hieco/walletuses it for signer and transaction interop- the package manifest can declare different entrypoints for browser and node consumers without every sibling package having to solve that problem on its own
Most Hieco users will touch this package indirectly through @hieco/sdk or @hieco/wallet. Reach for it directly when you need raw Hiero SDK exports but want to stay aligned with Hieco’s runtime packaging.
When To Use It
Use @hieco/runtime when you need:
- raw SDK classes such as
Client,PrivateKey, orTransaction - SDK types like
Signerin shared code that already depends on Hieco packages - one import path that can resolve correctly in browser, worker, and node environments
If you want Hieco’s fluent application client, use @hieco/sdk instead.
Installation
npm install @hieco/runtimepnpm add @hieco/runtimeyarn add @hieco/runtimebun add @hieco/runtimeQuick Start
import { Client, PrivateKey, type Signer } from "@hieco/runtime";
const client = Client.forTestnet();
const key = PrivateKey.generateED25519();
export function useSigner(signer: Signer) {
return { client, signer, key };
}Runtime Resolution
The package publishes explicit runtime-aware entrypoints:
@hieco/runtimeresolves to the browser build by default@hieco/runtime/nodegives you the node entry explicitly@hieco/runtime/browsergives you the browser entry explicitly
The root export also declares browser, worker, workerd, node, and default conditions, so supported bundlers can pick the right file automatically.
What It Exports
The package re-exports the underlying Hiero SDK surface. That means the familiar SDK classes and types are available here, including:
ClientSignerPrivateKeyPublicKeyMnemonic- transaction, query, and receipt types
Build And Publish Behavior
@hieco/runtime is the public package in the workspace that ships separate browser and node build outputs:
dist/browser.jsdist/node.js
Everything else in the workspace can stay on a single browser-friendly ESM build and rely on conditional exports plus externalized dependencies.
Related Packages
@hieco/sdkfor the higher-level fluent Hieco client@hieco/walletfor wallet-derived signers built on this runtime boundary
