Wrapper for Node.js and React Native around https://github.com/openwallet-foundation/askar
This library requires and has been tested with Node.js version 18.x, 20.x and 22.x, or React Native version 0.75.x and 0.76.x. Newer versions might also work, but they have not been tested.
You can import all types and classes from the @openwallet-foundation/askar-nodejs or @openwalletfoundation/askar-react-native library:
import { Key, KeyAlgs } from "@openwallet-foundation/askar-nodejs";
const seed = Uint8Array.from(Buffer.from("testseed000000000000000000000001"));
const key = Key.fromSeed({ algorithm: KeyAlgs.Bls12381G1, seed });Note: If you want to use this library in a cross-platform environment you need to import methods from the
@openwallet-foundation/askar-sharedpackage instead. This is a platform independent package that allows to register the native bindings. The@openwallet-foundation/askar-nodejsand@openwallet-foundation/askar-react-nativepackages use this package under the hood. See the Askar Shared README for documentation on how to use this package.
The JavaScript wrapper is versioned independently from the native bindings. The following table shows the compatibility between the different versions:
| Askar | JavaScript Wrapper | React Native | 
|---|---|---|
| v0.2.9 | v0.1.x | - | 
| v0.3.x | v0.2.x | - | 
| v0.4.x | v0.3.x | 0.75, 0.76 |