1.1.1 • Published 3 years ago

@dazaar/eth-tweak v1.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

@dazaar/eth-tweak

Tweak an eth public key into a series of session keys for Dazaar payments.

npm install @dazaar/eth-tweak

Usage

const DazaarEthTweak = require('@dazaar/eth-tweak')

const d = new DazaarEthTweak({
  publicKey: ..., // your main eth public key
  secretKey: ..., // your main eth secret key (optional, only need to generate tweaked private keys)
  chainId: ...    // optional chain id
})

const addr = d.address(sellerKey, buyerKey) // get address for a specific session
const { publicKey, address } = d.publicData() // your public key and eth address
const { secretKey, publicKey, address } = d.keyPair(sellerKey, buyerKey) // the tweaked keypair

License

MIT