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

Core concepts

Raw Custom JSON

Some protocols define their own json shape. Raw mode broadcasts your string exactly as written — the SDK adds nothing.

Try raw mode

When to use it

Use raw mode when an existing protocol owns the payload shape: Hive Engine ssc-mainnet-hive contract actions, community operations, or any third-party standard. For your own application data, prefer the standardized envelope.

Important

Nothing is validated beyond the JSON being a string. A malformed payload is accepted by the chain and silently ignored by the protocol.

customJsonRaw()

TypeScript
await hive.keychain.customJsonRaw({
  username: "alice",
  id: "ssc-mainnet-hive",
  json: JSON.stringify({
    contractName: "tokens",
    contractAction: "transfer",
    contractPayload: { symbol: "MYTOKEN", account: "bob", quantity: "1" },
  }),
  authority: "active",
  message: "tokens: transfer",
});

Parameters

hive.keychain.customJsonRaw(input)
ParameterTypeRequiredDescription
usernamestringYesHive account signing in Keychain.
idstringYescustom_json id defined by the target protocol.
jsonstringYesAlready-serialized JSON body, broadcast verbatim.
authority"posting" | "active"NoAuthority required by the protocol.
messagestringNoDisplay message inside the Keychain popup.