@kudos-protocol/keys

0.0.2 • Public • Published

Kudos Keys

Kudos Keys is a library that provides a set of functions to generate and manage keys for the Kudos ecosystem.

Generally you won't need to use this directly but it's used as part of other @kudos-protocol libraries.

Usage

import { hexToBytes, signMessage, getKeys, normalizePrivateKey, validate } from '@kudos-protocol/keys';

// signature = '0x' + signature + recId // recId is last byte of signature
const isValid = await validate({ signature, message, { address } });

// loop through 'WALLET_SEED_' to read in keys for an address.
// WALLET_SEED_0 = walletAddress:publicKey:privateKey
const walletKeys = getKeys(address); // only use this on dev / trusted environments

Logging

Set the LOG_LEVEL=debug environment variable to see debug logs.

Uses @kudos-protocol/logger.

Readme

Keywords

Package Sidebar

Install

npm i @kudos-protocol/keys

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

6.39 kB

Total Files

8

Last publish

Collaborators

  • mankins