Skip to main content
Transactions are the fundamental unit for interacting with the Hive blockchain. This guide covers creating, signing, validating, and broadcasting transactions using the Python SDK.

Transaction interfaces

The SDK provides two transaction interfaces:
  • ITransaction - Base transaction interface for offline operations
  • IOnlineTransaction - Extended interface with on-chain verification

Creating transactions

Transactions can be created in three ways:

Adding operations

Add operations using Protocol Buffer messages:
The push_operation() method returns self for method chaining.

Transaction properties

Access transaction information:

Signing transactions

Sign with Beekeeper

The recommended way to sign transactions:

Add signature manually

For offline signing or external signing services:

Multi-signature transactions

For transactions requiring multiple signatures:

Validating transactions

Validate transaction structure and content:

On-chain verification

For online transactions, verify accounts exist and check for private key leaks:
The perform_on_chain_verification() method is only available for transactions created with create_transaction() (online mode).

Serializing transactions

Convert transactions to various formats:

Broadcasting transactions

With hive chain

Direct API call

Transaction expiration

Set custom expiration times:
Default expiration is 1 minute from creation time.

TAPOS (Transaction as Proof of Stake)

TAPOS links transactions to a recent block, preventing replay attacks:

Complex operations

Use high-level operation builders for complex scenarios:

Account authority update

Recurrent transfer

Complete example

Putting it all together:

Error handling

Next steps

API calls

Learn about querying blockchain data

Examples

See complete working examples