Overview
The hive-tx library provides TypeScript type definitions for all Hive blockchain operations. These types ensure type safety when constructing transactions and operations.Operation Type
TheOperation type is a union of all available operation types, structured as tuples of [operationName, operationBody].
Helper Types
Extract the operation name from the Operation union type.
Extract the operation body type for a specific operation name.
Content Operations
VoteOperation
Upvote or downvote content on the blockchain.The account name casting the vote
The author of the content being voted on
The permlink of the content being voted on
Vote weight from -10000 to 10000 (100% to -100%)
CommentOperation
Create a post or comment on the blockchain.Author of the parent post (empty string for top-level posts)
Permlink of the parent post (category for top-level posts)
Author of the comment or post
Unique permlink for the post or comment
Title of the post (empty for comments)
Content body in Markdown format
JSON string containing metadata (tags, app info, etc.)
DeleteCommentOperation
Author of the comment to delete
Permlink of the comment to delete
CommentOptionsOperation
Author of the comment
Permlink of the comment
Maximum payout accepted (e.g., “1000.000 HBD”)
Percentage of payout in HBD (0-10000)
Whether to allow votes on this content
Whether to allow curation rewards
Array of beneficiaries for reward sharing
Transfer Operations
TransferOperation
Transfer HIVE or HBD between accounts.Sender account name
Recipient account name
Amount to transfer (e.g., “10.000 HIVE” or “5.000 HBD”)
Transfer memo (can be encrypted or plain text)
RecurrentTransferOperation
Sender account name
Recipient account name
Amount to transfer per execution
Transfer memo
Hours between executions
Number of executions (2-730)
Extensions for pairing transfers
TransferToVestingOperation
Account sending HIVE
Account receiving VESTS (can be same as from)
Amount of HIVE to power up
WithdrawVestingOperation
Account powering down
Amount of VESTS to power down
DelegateVestingSharesOperation
Account delegating VESTS
Account receiving delegation
Amount of VESTS to delegate (0 to remove)
TransferToSavingsOperation
Account sending to savings
Account receiving in savings
Amount to transfer to savings
Transfer memo
TransferFromSavingsOperation
Account withdrawing from savings
Unique request ID
Destination account
Amount to withdraw
Withdrawal memo
CancelTransferFromSavingsOperation
Account canceling withdrawal
Request ID to cancel
Account Operations
AccountCreateOperation
Account creation fee
Account creating the new account
Name of the new account
Owner authority
Active authority
Posting authority
Memo public key
Account metadata
AccountCreateWithDelegationOperation
Extends AccountCreateOperation with delegation.Amount of VESTS to delegate
Extensions array
ClaimAccountOperation
Account claiming the account creation token
Fee (can be 0 HIVE if using RC)
Extensions array
CreateClaimedAccountOperation
Account using the claimed token
Name of the new account
Owner authority
Active authority
Posting authority
Memo public key
Account metadata
Extensions array
AccountUpdateOperation
Account to update
New owner authority (optional)
New active authority (optional)
New posting authority (optional)
New memo key
Updated metadata
AccountUpdate2Operation
Account to update
New owner authority (optional)
New active authority (optional)
New posting authority (optional)
New memo key (optional)
Updated metadata
Updated posting metadata
Extensions array
Witness Operations
AccountWitnessVoteOperation
Account voting for witness
Witness account name
true to vote, false to unvote
AccountWitnessProxyOperation
Account setting proxy
Proxy account (empty to clear)
WitnessUpdateOperation
Witness account name
Witness announcement URL
Block signing public key
Proposed chain properties
Operation fee
WitnessSetPropertiesOperation
Witness account name
Array of property key-value pairs
Extensions array
Conversion Operations
ConvertOperation
Account initiating conversion
Unique request ID
Amount to convert (HBD to HIVE)
CollateralizedConvertOperation
Account initiating conversion
Unique request ID
Amount to convert (HIVE to HBD)
Market Operations
LimitOrderCreateOperation
Account creating the order
Unique order ID for this account
Amount being sold
Minimum amount to receive
Fill completely or cancel
Order expiration time
LimitOrderCreate2Operation
Account creating the order
Unique order ID
Amount being sold
Fill completely or cancel
Exchange rate as Price object
Order expiration time
LimitOrderCancelOperation
Account canceling the order
Order ID to cancel
FeedPublishOperation
Witness publishing the price feed
HBD/HIVE exchange rate
Reward Operations
ClaimRewardBalanceOperation
Account claiming rewards
Amount of HIVE to claim
Amount of HBD to claim
Amount of VESTS to claim
SetWithdrawVestingRouteOperation
Account setting the route
Destination account
Percentage to route (0-10000)
Auto power up the received amount
Proposal Operations
CreateProposalOperation
Proposal creator
Funding receiver
Funding start date
Funding end date
Daily payment amount
Proposal subject
Proposal permlink
Extensions array
UpdateProposalOperation
Proposal ID to update
Proposal creator
Updated daily payment
Updated subject
Updated permlink
Extensions with optional end_date
UpdateProposalVotesOperation
Account voting on proposals
Array of proposal IDs
true to approve, false to remove vote
Extensions array
RemoveProposalOperation
Proposal owner
Array of proposal IDs to remove
Extensions array
Custom Operations
CustomOperation
Accounts whose active authority is required
Custom operation ID
Operation data
CustomJsonOperation
Accounts whose active authority is required
Accounts whose posting authority is required
Custom JSON identifier
JSON string payload
Account Recovery Operations
RecoverAccountOperation
Account being recovered
New owner authority
Recent owner authority for verification
Extensions array
RequestAccountRecoveryOperation
Recovery account
Account to recover
New owner authority
Extensions array
ChangeRecoveryAccountOperation
Account changing recovery account
New recovery account
Extensions array
ResetAccountOperation
Account performing the reset
Account being reset
New owner authority
SetResetAccountOperation
Account setting reset account
Current reset account
New reset account
DeclineVotingRightsOperation
Account declining voting rights
true to decline, false to re-enable
Escrow Operations
EscrowTransferOperation
Sender account
Recipient account
HBD amount in escrow
HIVE amount in escrow
Unique escrow ID
Escrow agent account
Agent fee
JSON metadata
Deadline for ratification
Escrow expiration time
EscrowDisputeOperation
Sender account
Recipient account
Escrow agent
Account raising dispute
Escrow ID
EscrowReleaseOperation
Sender account
Recipient account
Escrow agent
Account releasing funds
Account receiving funds
Escrow ID
HBD amount to release
HIVE amount to release
EscrowApproveOperation
Sender account
Recipient account
Escrow agent
Account approving
Escrow ID
true to approve, false to reject