HiveXPH SDKhivexph-sdk
NPM
Developer toolkit for Hive Custom JSON and Hive Engine transactions.

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 + normalization

One 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  ->  rpc

Security

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

BackendHive Keychain
Runs inServer runtimeBrowser
Account inputAccount aliasusername
Signing keyEnvironment variableUser wallet
SigningConfigured private keyKeychain extension
ApprovalNone — automatedUser approves each request
Broadcasthive.rpcKeychain extension
Entry pointhive.issuerhive.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" });