Skip to main content
Operations represent actions on the Hive blockchain. The WAX SDK supports both inline operations and complex operation builders for common tasks.

Operation structure

Protobuf operations

Operations in protobuf format use a discriminated union structure:

API operations

Operations in API format use a type-value structure:

Example

Common operations

vote

Upvote or downvote content.
string
required
Account name casting the vote
string
required
Author of the content being voted on
Unique identifier of the content
number
required
Vote weight from -10000 (full downvote) to 10000 (full upvote)

Usage example

comment_operation

Create or update a post or comment.
Note: For easier comment/post creation, use BlogPostOperation or ReplyOperation.

transfer

Transfer HIVE or HBD between accounts.
string
required
Sender account name
string
required
Recipient account name
NaiAsset
required
Amount to transfer in NAI format
string
Optional memo. Can be encrypted by using startEncrypt/stopEncrypt.

Usage example

transfer_to_savings

Transfer funds to savings.

transfer_from_savings

Withdraw funds from savings (requires 3-day waiting period).

transfer_to_vesting

Power up HIVE to Hive Power.

withdraw_vesting

Power down Hive Power (13-week withdrawal).

delegate_vesting_shares

Delegate Hive Power to another account.

custom_json

Submit custom JSON data (used by layer 2 applications).

Usage example

account_update2

Update account authorities and metadata.

witness_vote

Vote for a witness.

account_witness_proxy

Set witness voting proxy.

recurrent_transfer

Set up recurring transfer.
Note: For easier recurrent transfer management, use DefineRecurrentTransferOperation.

claim_reward_balance

Claim rewards from the reward balance.

Complex operation builders

Complex operations provide high-level interfaces for common tasks.

BlogPostOperation

Creates a blog post with metadata.
string
required
Author account name
string
required
Community identifier (e.g., “hive-174695”) or main tag
string
required
Post title
string
required
Post content (markdown/HTML)
Unique identifier. Auto-generated if not provided.
string[]
Post tags
string
Post description
string[]
Image URLs in the post
Array<{account: string, weight: number}>
Beneficiaries for post rewards. Creates an additional comment_options operation.

ReplyOperation

Creates a reply to a post or comment.
string
required
Author of the post/comment being replied to
Permlink of the post/comment being replied to
string
required
Reply author account name
string
required
Reply content

DefineRecurrentTransferOperation

Creates or updates a recurrent transfer.

RecurrentTransferRemovalOperation

Removes an existing recurrent transfer.

AccountAuthorityUpdateOperation

Updates account authorities.

UpdateProposalOperation

Updates a DHF proposal.

WitnessSetPropertiesOperation

Sets witness properties with automatic serialization.

Hive apps operations

FollowOperation

Manage follow relationships.

CommunityOperation

Manage community settings.

ResourceCreditsOperation

Delegate or remove delegation of resource credits.

Custom operation base class

You can create custom complex operations by extending OperationBase:

TypeScript types

NaiAsset

authority

operation

See also