0.0.2 • Published 1 year ago

@kudos-protocol/keys v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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.