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 modeWhen 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
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | Yes | Hive account signing in Keychain. |
| id | string | Yes | custom_json id defined by the target protocol. |
| json | string | Yes | Already-serialized JSON body, broadcast verbatim. |
| authority | "posting" | "active" | No | Authority required by the protocol. |
| message | string | No | Display message inside the Keychain popup. |
