____  ___    _  _     _   _ _____     _______
 / ___|/ _ \  | || |   | | | |_ _\ \   / / ____|
| |  _| | | | | || |_  | |_| || | \ \ / /|  _|
| |_| | |_| | |__   _| |  _  || |  \ V / | |___
 \____|\___/     |_|   |_| |_|___|  \_/  |_____|

 --- A GOPHER-LIKE INTERFACE FOR HIVE BLOCKCHAIN ---

Wax Just Lost Weight - And It Feels Great!

BY: @thebeedevs | CREATED: Feb. 6, 2026, 10:23 p.m. | VOTES: 173 | PAYOUT: $21.32 | [ VOTE ]

Wax Just Lost Weight - And It Feels Great! 🏋️

Hey Hive community! 👋

We hope you've had a chance to read about the major improvements we've made recently in the Denser project, particularly regarding signer support — if not, here is the source...

Honestly, the above changes would have been impossible without a huge amount of work done in a place far less exposed and glamorous than a frontend application — deep inside a low-level, quietly living library. The Wax library, which we hope will become the standard way to interact with the Hive blockchain, thanks to its very tight integration with the Hive protocol's C++ code and its clean, modern TypeScript interface.

This short story, which I hope we'll expand in a future post with a detailed, "nerd-like" description of how we did it, actually covers roughly the last year (or perhaps even longer) of work to make things better, simpler, and cheaper in everyday maintenance.

That's why we decided to release a new version of Wax with a HUGE versioning leap (even though, honestly, the last few releases contained no major breaking changes to the public interface): TWO at the beginning just looks much more mature — or so we hope... But enough about that — let's see what we actually changed.

It is already published on npmjs. This version also comes with documentation, which you can find here.

I hope the above (perhaps a bit boring, written by yours truly — @small.minion) along with the enthusiastic words below from Wax's "daddy," @mtyszczak, will bring you a few moments of joy.

You know how we've been pushing performance optimizations for our libraries? Well, this time we went the other direction - size optimization - and the results are absolutely wild! 🤯

[IMAGE: https://media1.giphy.com/media/v1.Y2lkPTc5MGI3NjExcWtxMXBtOHV5MWpqMGJwbXBxNnZtNHZ1ZWd5aWZxdHNwcWx2MnJ5YyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/3o7TKqnN349PBUtGFO/giphy.gif]

📉 The Numbers Don't Lie

Metric Before After Reduction WASM binary 4.6 MB 2.5 MB 46% Package size (compressed) 2.5 MB 1.1 MB 56% Unpacked size 5.5 MB 3.4 MB 38%

That's right - more than half of the package size just... gone! 💨

And before you ask - no, we didn't remove any features. Everything still works exactly as before. We just taught the build system some new tricks 😎

[IMAGE: https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExY2I2YWl0NjVuYjgxdmNiYjA5emxoN2F3MnVkdDN6aWVlZjN4b3BoZiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/xT0xeJpnrWC4XWblEk/giphy.gif]

🔧 How We Did It

1. Better Crypto Library Compilation 🔐

We upgraded our emsdk toolchain to version 4.0.22 with -Oz optimized libraries. The secp256k1 cryptographic library (responsible for all the signature magic ✍️) is now pre-built with aggressive size optimizations. This alone made a HUGE difference!

2. Additional wasm-opt Pass 🪓

We added an extra optimization phase using wasm-opt. Think of it as a second round of compression, specifically designed for WebAssembly binaries. This shaved off another ~500kB

3. Smarter Exception Handling in fc 🧠

Here's a nerdy one: The fc library had exception handling code (FC_RETHROW_EXCEPTIONS) that was being duplicated across every template instantiation. We introduced an unpack_error_handler class that centralizes this logic into a single non-template function.

Translation: Instead of having ~3 catch handlers per template (and there are A LOT of templates), we now have one shared handler. Less code = smaller binary!

4. Excluding Virtual Operations from WASM Build 🚫

Virtual operations are blockchain-generated events (like author_reward_operation, curation_reward_operation, etc.) - users never create or sign them. So why include 43 extra operation types in the WASM build?

We added a compiler flag HIVE_PROTOCOL_SKIP_VOPS that excludes all virtual operations from the hive::protocol::operation type definition. Less types in the variant = less template instantiations = smaller binary!

5. Stripped-Down OpenSSL Build 🔓

OpenSSL is a beast of a library - but we don't need 90% of it for WASM! We built a minimal OpenSSL with only the crypto primitives we actually use:

Combined with -fvisibility=hidden and --gc-sections linker flags, this stripped away tons of unused code!

[IMAGE: https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExNnEzd2Vpc3NlYXN5N2JxOTI4aWswZmw2aGN4NHl4c2d0ZTNqNnRrYyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/d3mlE7uhX8KFgEmY/giphy.gif]

⚡ Same Speed, Less Weight

The best part? Zero performance impact. All those size optimizations are purely at the compilation level - the code that actually runs is still as fast as ever.

This means:

[IMAGE: https://media4.giphy.com/media/v1.Y2lkPTc5MGI3NjExaXh5Yjgxc2tkYXg0OXlwNmo4dTNsY2JwcXR0a3g2dHBrZWh0aXE5ZCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/3oriNYQX2lC6dfW2Ji/giphy.gif]

📊 How Does Wax Compare to Other Hive Libraries?

You might be thinking: "But wait, isn't WASM still bigger than pure JavaScript libraries?"

Let's talk about that. We bundled simple scripts using popular Hive libraries to see the real JavaScript bundle sizes:

Library What It Does Bundle Size Gzipped @hiveio/wax Create foundation, format coins 169 KB 43 KB @hiveio/dhive Create client, iterate blocks 927 KB 211 KB hive-js Broadcast Vote 1.2 MB 257 KB keychain-sdk Encode a memo message 2.3 MB 483 KB

Yes, you read that right. The Wax JavaScript bundle alone is 5.5x smaller than dhive and 13.5x smaller than keychain-sdk! 🤯

But What About the WASM File?

Fair point! Wax also needs to download the WASM binary (~2.5 MB, ~1 MB gzipped). But here's the thing:

  1. Browser Caching 🗄️ - The WASM file is downloaded once and cached. Subsequent page loads only need the tiny 43 KB JS bundle.

  2. CDN-Friendly 🌐 - WASM files are perfectly suited for CDN distribution with long cache headers.

  3. Parallel Loading ⚡ - Modern browsers fetch and compile WASM in parallel with JavaScript execution.

The Real Difference: What's Inside

Here's what really matters - what are you actually downloading?

Aspect @hiveio/wax dhive / hive-js Protocol Implementation Actual C++ hive code JavaScript reimplementation Serialization HF26 format (modern, preferred) Legacy format (obsolete) Crypto Native secp256k1 via WASM JS crypto libraries Correctness Verified against hived "Should work" 🤞 API Types Auto-generated from protocol Manually maintained

The other libraries essentially reinvent the wheel in JavaScript - reimplementing serialization, crypto, and protocol logic that already exists in the official hive C++ codebase. And they're stuck with the legacy serialization format from the pre-HF26 era.

Wax takes the actual hive protocol implementation, compiles it to WASM, and wraps it with a modern TypeScript interface. You get:

[IMAGE: https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExMW9lNGV2ZnBnNjJ6OXFsaXk1dWtrcWNkZ3JsNmlrOGhkcXA5MnRnMiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/3o7qDSOvfaCO9b3MlO/giphy.gif]

🚀 What's Next?

Ready to try the slimmer Wax? Getting started is simple:

npm install @hiveio/wax

📦 NPM Package: https://www.npmjs.com/package/@hiveio/wax

📚 Documentation: https://hive.pages.syncad.com/wax-doc

🔮 But Wait, There's More!

We're not done yet! 😏

There are still a few optimization opportunities we're exploring. The goal? Making Wax as lean as possible without compromising on functionality or speed.

Stay tuned for more updates - the optimization journey continues! 🚀

[IMAGE: https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExMjR3OGJ6MzRhbXNpZnY4cXVjMzd0aXM1MnJrMGV5ZHg5bjl5dDVueSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/l4FGni1RBAR2OWsGk/giphy.gif]

Happy building! 🐝

@mtyszczak from @thebeedevs

TAGS: [ #hivedevs ] [ #hive ] [ #performance ] [ #optimizations ] [ #typescript ] [ #improvements ] [ #javascript ] [ #protocol ]

Replies

@niallon11 | Feb. 7, 2026, 9:04 a.m. | Votes: 0 | [ VOTE ]

That's what we like to see.
Not sure what any of it means but it all sounds super impressive and important so well done.
[IMAGE: https://media.tenor.com/JiEUXIlkIn8AAAAC/incident.gif]

@gtg | Feb. 7, 2026, 4:58 p.m. | Votes: 1 | [ VOTE ]

> This short story, which I hope we'll expand in a future post with a detailed, "nerd-like" description of how we did it

can't wait

https://www.youtube.com/watch?v=nvoJ6cMUV5E

@small.minion | Feb. 10, 2026, 12:13 a.m. | Votes: 2 | [ VOTE ]

here is "your awaited bus". try to not miss it...

https://youtube.com/clip/UgkxFmBKl_gVsEvKPtsClKhekKxHTy7lrWA3?si=v9nfgh4zIaZT2REX

@meno | Feb. 8, 2026, 2:07 p.m. | Votes: 1 | [ VOTE ]

Playing with wax is on my to-do list...

Great job guys

@sagarkothari88 | Feb. 19, 2026, 12:06 a.m. | Votes: 0 | [ VOTE ]

[IMAGE: https://media.tenor.com/QJg3wfXCL5AAAAAC/surprise-chris-pratt.gif]

Amazing work @thebeedevs team.
Congratulations 🎉

[IMAGE: https://media.tenor.com/g5cyfFrLhD0AAAAC/despicable-me-minions.gif]

This is a huge milestone.
Keep it up.
Wish you all the best for next set of optimization 🤞

[IMAGE: https://media.tenor.com/V1oCWmxLZYcAAAAC/internin-job.gif]

I'll now have to think about this seriously.
Stop using hiveio/dhive & hiveio/hivejs & switch to this new one.
Wish me luck

[IMAGE: https://media.tenor.com/zBkr9CnepqcAAAAC/wish-me-luck-salute.gif]

[ BACK TO TRENDING ] [ BACK TO MENU ]
CMD>