Skip to main content
Transactions are the fundamental building blocks for interacting with the Hive blockchain. Learn how to build, sign, validate, and broadcast transactions using the WAX SDK.

Transaction basics

A transaction contains:
  • Operations - One or more blockchain actions (votes, transfers, posts, etc.)
  • TaPoS - Transaction as Proof of Stake (reference block)
  • Expiration - When the transaction becomes invalid
  • Signatures - Cryptographic proofs from required authorities

Creating transactions

Online transactions

Use createHiveChain() for automatic TaPoS handling:
With custom expiration:

Offline transactions

Use createWaxFoundation() with a block ID:

Adding operations

Simple operations

Push operations as inline objects:

Complex operations

Use operation factories for multi-operation scenarios:
Recurrent transfer:
Update account authority:

Hive Apps operations

Specialized operations for Hive applications:

Transaction properties

Transaction ID

Get the transaction hash:

Signature digest

Get the digest for signing:

Impacted accounts

Find which accounts are affected:

Required authorities

Determine which authorities must sign:

Signing transactions

The sign() method is deprecated. Use dedicated signer packages instead.

Using Beekeeper

Using Hive Keychain

Using MetaMask Snaps

Validating transactions

Validate transaction structure before broadcasting:
For online transactions, perform on-chain verification:

Broadcasting transactions

Send a signed transaction to the network:

Transaction formats

Convert to API JSON

Convert to Hive API format:
Output:

Convert to legacy format

Output (deprecated format):

Convert to binary

Serialize to hexadecimal string:

Parse from JSON

Create transaction from Hive API JSON:
Parse from legacy JSON:

Encryption

Encrypt sensitive operation fields:
Supported encrypted fields:
  • comment_operation.body
  • custom_json_operation.json
  • transfer.memo
  • transfer_to_savings.memo
  • transfer_from_savings.memo
  • recurrent_transfer.memo

Authority verification trace

Generate a detailed authority verification trace:

Complete example

A full transaction workflow:

Next steps

Explore more transaction capabilities: