@hbar-kit/core
v0.2.0
Published
Zero-dependency Hedera primitives for TypeScript: network config, bigint money (tinybars & HTS decimals), id/timestamp parsing, errors.
Maintainers
Readme
@hbar-kit/core
Zero-dependency primitives for hbar-kit: network config, decimal-safe bigint money, account/token/transaction id helpers, nanosecond timestamps, and a typed error hierarchy.
import { parseHbar, formatHbar, resolveNetwork, txIdToMirror } from "@hbar-kit/core"
parseHbar("25") // 2_500_000_000n (tinybars)
formatHbar(99_306n) // "0.00099306"
resolveNetwork({ network: "testnet" }).baseUrl
// "https://testnet.mirrornode.hedera.com"
txIdToMirror("[email protected]") // "0.0.10-1748625594-000000001"All amounts are bigint in the smallest unit. See the docs.
