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
| Parameter | Type | Required | Description |
|---|---|---|---|
| HIVE_ENGINE_CUSTOM_JSON_ID | string | No | The sidechain id, "ssc-mainnet-hive". |
| HIVE_ENGINE_AUTHORITY | "active" | No | Authority required by contract actions. |
| TOKEN_CONTRACT / TOKEN_ACTIONS | string / object | No | tokens contract name and its action names. |
| NFT_CONTRACT / NFT_ACTIONS | string / object | No | nft contract name and its action names. |
| NFT_MAX_ISSUE_MULTIPLE_INSTANCES | number | No | Instance 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" });