You are viewing a single comment's thread from:

RE: Key Takeaways and Resources

in HiveFestlast month

@sorin.cristescu

I'd like to provide some additional insights regarding the execution of operations — particularly account updates — on Hive.

If you intend to perform these actions programmatically, as mentioned earlier, it’s best to use the Wax library. You can choose either the TypeScript or Python version.

The main advantage of using Wax (over legacy libraries such as hive-js, dhive, or beem) is that it guarantees the transaction is constructed exactly as it would be by hived itself. This is because Wax directly reuses the official Hive protocol code responsible for transaction serialization, authority verification, and validation.

This design choice eliminates discrepancies that often occur with libraries like hive-js or dhive, which reimplement these mechanisms independently in JavaScript or Python. Such inconsistencies can cause serious issues, especially in critical blockchain components responsible for transaction integrity.

Another major benefit of using Wax — particularly for the account update operation — is its far more user-friendly interface compared to working directly with raw blockchain operations.

The Wax implementation of AccountAuthorityUpdateOperation automatically retrieves existing authority data from the chain, allowing you to focus solely on the modifications you wish to make (e.g., adding a new public key to a specific authority role). It also tracks applied changes and prevents broadcasting redundant or ineffective account update transactions.

To sign a transaction prepared with Wax, you can choose among several supported signers, such as Beekeeper, which is used in the official documentation examples.

You can find an example of Beekeeper initialization (which imports a private key into a locally stored wallet) here:
Beekeeper initialization in documentation snippets

If you prefer to use a ready-made tool for managing account authorities, consider our Clive wallet implementation, which provides CLI commands for this purpose — for example:

Equivalent commands are also available for owner and posting roles.

Clive startup scripts (which automatically download and launch a Docker image) can be found here:
Clive startup scripts

I hope it will solve your problems. If you will have any doubts or questions please contact us.