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

Hive Engine

Hive Engine overview

Hive Engine is a sidechain that reads custom_json operations under a single id. Every operation is a contract action object serialized into the json field.

Action shape

JSON
{
  "contractName": "tokens",
  "contractAction": "transfer",
  "contractPayload": {
    "symbol": "MYTOKEN",
    "to": "bob",
    "quantity": "1",
    "memo": "payout"
  }
}

Important

Quantities are always strings. Floating-point numbers lose precision and are rejected by the sidechain.

Constants

Exported from the SDK
ParameterTypeRequiredDescription
HIVE_ENGINE_CUSTOM_JSON_IDstringNoThe sidechain id, "ssc-mainnet-hive".
HIVE_ENGINE_AUTHORITY"active"NoAuthority required by contract actions.
TOKEN_CONTRACT / TOKEN_ACTIONSstring / objectNotokens contract name and its action names.
NFT_CONTRACT / NFT_ACTIONSstring / objectNonft contract name and its action names.
NFT_MAX_ISSUE_MULTIPLE_INSTANCESnumberNoInstance limit for a single issueMultiple action.

Pure builders

hive.issuer.token.actions and hive.issuer.nft.actions are the dependency-free protocol builders shared by the backend issuer and the Keychain issuer, so both paths produce identical payloads.

TypeScript
import { HiveClient } from "hivexph-sdk";

const hive = new HiveClient();
const action = hive.issuer.token.actions.buildTransfer({ symbol: "MYTOKEN", account: "bob", quantity: "1" });