nimiqscan-wallet

0.2.0 • Public • Published

Nimiq Wallet

Pure JavaScript wallet for Nimiq Blockchain, with dead simple API to use

Usage

import NimiqWallet from 'nimiqscan-wallet'
 
const mnemonic = 'strategy enlist away hurt adjust firm antenna toss rocket away side rural'
const wallet = NimiqWallet.fromMnemonic(mnemonic)
 
const address = wallet.getAddress() // NQ95 539J MQY1 QYES MVUE 6444 0C91 DK4F U0P6
 
const tx = wallet.generateTransaction({
  to: 'NQXX XXXX .... XXXX',
  value: 50000, // number in satoshis
  fee: 0, // number in satoshis
  height: 170619 // validate from the block, suggest to current block height + 1
})
 
const hex = tx.toHex() // Raw tx data, just sendRawTransaction
const txId = tx.hash() // Transaction ID

/nimiqscan-wallet/

    Package Sidebar

    Install

    npm i nimiqscan-wallet

    Weekly Downloads

    7

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    703 kB

    Total Files

    5

    Last publish

    Collaborators

    • liu9293