Libnexa-TS 4.0.0: A New Cryptographic Foundation

The Nexa ecosystem infrastructure is constantly being developed and improved, and this time it is our pleasure to present Libnexa-TS 4.0.0, whose major improvement is native big integers across the library. Libnexa-TS is an open-source library and provides a reliable SDK for TypeScript/JavaScript apps that need to interface with the Nexa network.

There are more upgrades, such as Noble Curves for elliptic curve operations, native crypto hashing, faster key derivation and signing, small bug fixes and various other improvements.

What’s New

Every API that took or returned a BN now uses a native big integers. JavaScript has big integers built in, and it handles the very large numbers that cryptography uses everywhere, from private keys to signatures.

Noble Curves is an audited and minimal JS implementation of elliptic curve cryptography. Elliptic curve cryptography is behind the keys and digital signatures that secure Nexa wallets and transactions. HD key derivation is about 4x faster, public key parsing about 12x, and Schnorr signing and verification about 1.7x to 1.9x (measured in Node.js). A wallet uses HD key derivation to create its addresses from one recovery phrase, so apps using Libnexa-TS 4.0.0 can create addresses and sign transactions faster.

Transaction IDs and addresses on the blockchain come from hashing, which turns data into a short digital fingerprint. Hashing uses the native crypto module when available: node:crypto in Node.js, or a global crypto polyfill with createHash (for example react-native-quick-crypto), and falls back to Nobles Hashes otherwise. react-native-quick-crypto is a fast implementation of Node’s crypto module.

If your app only uses the high-level API (addresses, transactions, HD keys, message signing), it likely needs few or no changes: amounts were already bigint in v3.

Quick start (requires Node.js 22.18+):

npm install [email protected]

This library is fully compatible with both Node.js (server-side) and modern browsers (client-side).

To Wrap Up

The decentralized nature of the Nexa network allows for highly resilient Nexa infrastructure, and the developer community needs reliable, open-source tools to implement Nexa apps and services. Libnexa-TS provides a reliable SDK for TypeScript and JavaScript developers.

For this release, we are grateful to B.U. developer vgrunner.

If you have any suggestions or feedback, please use the GitLab issues section, or join the Nexa community groups and channels and inform the community moderators.

​

Documentation: https://nexa.gitlab.io/libnexa-ts/

Release notes: https://gitlab.com/nexa/libnexa-ts/-/releases/v4.0.0

Migration guide: https://nexa.gitlab.io/libnexa-ts/migration-v4/