BIP38

The BIP38 class provides methods to extract the numerical value out of any currency representation by normalizing the input and removing any locale specific rules like symbols and use of commas.

Importing the BIP38 class

1import { BIP38 } from "@ardenthq/sdk-cryptography";

Encrypt a buffer with the given mnemonic

1BIP38.encrypt(someBuffer, "password");

Decrypt an encrypted string with the given mnemonic

1BIP38.decrypt(BIP38.encrypt(someBuffer, "password"), "password");

Decrypt a string with the given mnemonic

1BIP38.verify(BIP38.encrypt("message", "password"));
Last updated 2 years ago
Edit Page
Share: