npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

@dazaar/eth-tweak

1.1.1

@mafintosh

npmHomeRepoSnykSocket
Downloads:5
$ npm install @dazaar/eth-tweak
DailyWeeklyMonthlyYearly

@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