If you've ever gone looking for a Go library to work with Hive, you'll know there are quite a few forks floating around. They all trace back to 's original hivego — without that foundation, none of the rest of this would exist, so thank you.
The natural thing with a library like that is for everyone to fork it and add whatever they specifically need. 's fork had some great ideas, and others have contributed their own pieces too. But the result is a scattered ecosystem where no single library does everything. I wanted to change that — a complete Go client for Hive with every operation, streaming blocks, account queries, and the rest of it, without needing to glue multiple forks together.
So let me introduce github.com/cadawg/hivego
What does it do?
At its core it lets you sign and broadcast any Hive transaction from Go, and read data back from the chain. It handles the full binary serialization locally — so your keys never leave your process — and supports multi-node failover out of the box.
44 operations are implemented, covering everything you'd realistically need:
Social & content
vote,comment,comment_options,delete_comment
Transfers & savings
transfer,recurrent_transfertransfer_to_savings,transfer_from_savings,cancel_transfer_from_savings
Hive Power
transfer_to_vesting(power up),withdraw_vesting(power down)delegate_vesting_shares,set_withdraw_vesting_route,claim_reward_balance
Market
convert(HBD → HIVE, 3.5-day),collateralized_convert(HIVE → HBD, instant)limit_order_create,limit_order_cancel
Accounts
account_create,create_claimed_account,claim_accountaccount_update(legacy),account_update2
Witnesses
witness_update,witness_set_properties,account_witness_vote,account_witness_proxy,feed_publish
Proposals (DHF)
create_proposal,update_proposal,update_proposal_votes,remove_proposal
Account recovery
request_account_recovery,recover_account,change_recovery_account
Escrow
escrow_transfer,escrow_approve,escrow_dispute,escrow_release
Miscellaneous
custom_json,custom,custom_binary,decline_voting_rights
A handful of operations that exist in the protocol ID table were intentionally left out — pow_operation, pow2_operation, and report_over_production_operation are unused since the early Steem days; limit_order_create2 was never actually deployed; reset_account and set_reset_account were never activated on mainnet; and account_create_with_delegation was superseded by the claim + create flow. If you need any of them for some reason you can implement the HiveOperation interface and pass it straight in.
A few things worth mentioning
Local signing. This client does it all locally — transactions are binary-serialized and signed in your process. It took a while to get right (sorted flat_maps, fc::optional prefix bytes, the legacy STEEM/SBD wire symbols, all the edge cases) but I verified every operation against beem's output with a test vector script so it should be solid.
HiveTime. I borrowed this idea from 's fork. Hive timestamps don't have a timezone suffix, which means Go's standard JSON unmarshaling silently gives you zero-value times everywhere. The
HiveTime type handles it properly and gives you a real time.Time when you need it.
Message signing. A lot of Hive services use signed messages for login/authentication — Keychain being the obvious example. The library supports this directly: SignMessage signs any message with SHA256 and returns a compact recoverable signature, and RecoverMessageSigner recovers the public key from a message and signature so you can verify it against an account's posting keys. Same secp256k1 machinery as transaction signing, just a different digest.
Dry-run mode. You can call .WithNoBroadcast() and everything works as normal — build, sign, get back a txid — but nothing actually gets submitted. I use this for the entire integration test suite so it can run against a live node without spamming the chain.
Quick example
client := hivego.NewClient("https://api.hive.blog", "https://api.deathwing.me")
key, _ := hivego.KeyPairFromWif("5J...")
// Vote
_, txid, err := client.Broadcast.Vote("myaccount", "author", "permlink", 10000, key)
// Transfer
amount, _ := hivego.ParseAsset("1.000 HIVE")
_, txid, err = client.Broadcast.Transfer("myaccount", "friend", amount, "thanks", key)
// Read account — timestamps come back as proper time.Time
accounts, _ := client.Database.GetAccounts([]string{"myaccount"})
fmt.Println(accounts[0].Balance)
fmt.Println(accounts[0].Created.Time())
Testing & stability
It's sitting at 80%+ coverage between the unit tests and integration tests. The unit tests verify serialization byte-for-byte against beem; the integration tests hit api.deathwing.me and exercise every operation in no-broadcast mode.
It's currently at v0.1.1. I intend the existing API to be fairly stable — I'm not planning any breaking changes — but I'll wait until I've had some community feedback and usage before tagging v1.0.0 and making that official. So if something feels off or you'd like a helper that's missing, now's a good time to say so.
go get github.com/cadawg/hivego
- GitHub: https://github.com/cadawg/hivego
- Docs: https://pkg.go.dev/github.com/cadawg/hivego
- Site: https://golang.hive.uno/
As always, I'm open to feedback — give it a go and let me know what you think. And if you find it useful, a witness vote would be appreciated.
Thanks for stopping by, CA