How to use the @liskhq/lisk-client.cryptography function in @liskhq/lisk-client

To help you get started, we’ve selected a few @liskhq/lisk-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LiskHQ / lisk-desktop / src / components / screens / signMessage / confirmMessage.js View on Github external
sign() {
    const { message, account } = this.props;
    const signedMessage = Lisk.cryptography.signMessageWithPassphrase(
      message,
      account.passphrase,
      account.publicKey,
    );
    const result = Lisk.cryptography.printSignedMessage({
      message,
      publicKey: account.publicKey,
      signature: signedMessage.signature,
    });
    return result;
  }
github LiskHQ / lisk-desktop / src / components / screens / signMessage / confirmMessage.js View on Github external
sign() {
    const { message, account } = this.props;
    const signedMessage = Lisk.cryptography.signMessageWithPassphrase(
      message,
      account.passphrase,
      account.publicKey,
    );
    const result = Lisk.cryptography.printSignedMessage({
      message,
      publicKey: account.publicKey,
      signature: signedMessage.signature,
    });
    return result;
  }
github LiskHQ / lisk-desktop / src / utils / account.js View on Github external
export const extractAddress = (data) => {
  if (!data) {
    return false;
  }
  if (data.indexOf(' ') < 0) {
    return Lisk.cryptography.getAddressFromPublicKey(data);
  }
  return Lisk.cryptography.getAddressFromPassphrase(data);
};
github LiskHQ / lisk-desktop / src / utils / rawTransactionWrapper.js View on Github external
export const getBufferToHex = buffer => Lisk.cryptography.bufferToHex(buffer);
export const calculateTxId = transaction => Lisk.transaction.utils.getTransactionId(transaction);
github LiskHQ / lisk-desktop / src / utils / account.js View on Github external
export const extractPublicKey = passphrase =>
  Lisk.cryptography.getKeys(passphrase).publicKey;
github LiskHQ / lisk-desktop / app / src / utils.js View on Github external
export const getBufferToHex = buffer => Lisk.cryptography.bufferToHex(buffer);
github LiskHQ / lisk-mobile / src / utilities / api / lisk / account.js View on Github external
export const extractPublicKey = passphrase =>
  Lisk.cryptography.getKeys(passphrase).publicKey;
github LiskHQ / lisk-desktop / app / src / ledger.js View on Github external
const getBufferToHex = buffer => Lisk.cryptography.bufferToHex(buffer);
github LiskHQ / lisk-mobile / src / utilities / api / lisk / account.js View on Github external
export const extractAddress = passphrase =>
  Lisk.cryptography.getAddressFromPassphrase(passphrase);