Core concepts
Architecture
One client, clearly separated namespaces. Configuration resolves accounts, the SDK signs internally, RPC broadcasts, and the browser path never touches any of it.
HiveClient
Text
HiveClient
├── configs your configuration object, stored verbatim and frozen
├── accounts key-free account references from configs.accounts
├── rpc JSON-RPC communication + node selection
├── keychain browser signing (isolated API)
├── issuer backend Hive Engine token + NFT issuance
├── reader read + normalize a transaction
├── stream block and Custom JSON async iterators
├── builder standardized Custom JSON builder
└── parser Custom JSON detection + normalizationOne client owns one configuration. hive.configs stores it as-is; the SDK never switches environments at runtime. Need another configuration? Create another client.
Layers
Text
alias -> account/key env vars -> environment resolver -> internal signing -> rpcSecurity
Nothing in the SDK stores a private key. Values are read from the environment at call time and discarded after the transaction is signed.
Two transaction paths
| Backend | Hive Keychain | |
|---|---|---|
| Runs in | Server runtime | Browser |
| Account input | Account alias | username |
| Signing key | Environment variable | User wallet |
| Signing | Configured private key | Keychain extension |
| Approval | None — automated | User approves each request |
| Broadcast | hive.rpc | Keychain extension |
| Entry point | hive.issuer | hive.keychain |
These are two separate transaction APIs. Neither one wraps the other, and there is no execution-mode switch between them.
Shared action builders
Both paths reuse the same pure builders (TokenActionBuilder, NftActionBuilder), so a payload created in the browser is byte-identical to the one a backend signs.
TypeScript
// Backend preview — offline, no keys, no network
const preview = hive.issuer.token.buildIssue({ from: hive.accounts.treasury, symbol: "MYTOKEN", account: "bob", quantity: "10" });
// Keychain preview — same contract action shape
const action = hive.keychainIssuer.token.buildIssue({ symbol: "MYTOKEN", account: "bob", quantity: "10" });