1.0.0 • Published 4 years ago

@inbloxme/password-based-transaction-signing v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

Password Based Transaction Signing

How to use

Install the package by running the command,

npm install inblox-password-based-tx-sign

Import the package into your project using,

const InbloxTxSign = require('inblox-password-based-tx-sign');

Initialise the constructor using,

const txSign = new PBTS();

To encrypt the private key using the password and store it, use the function,

const encryptPrivateKey = txSign.encrypt(privateKey, password);

This will encrypt the private key using the password and will store it in the database.

To retrieve the private key and decrypt it at the client side,

const decryptedPrivateKey = txSign.decrypt(password);

This will authenticate the password, retrieve the private key and decrypt it.

Now, this decrypted private key can be used to sign trasnactions.

1.0.0

4 years ago