0.0.46 • Public • Published

Address Generation

code used to generate addresses for pulsechain sacrifice




copy .env.example to .env and change the bracketed values to private keys and mnemonics

run examples

# `--` passes arg to script
yarn run ex --nonce=0 --network=bitcoin-cash


spends the network funds. edit array for now to match the address and nonce generated by ex.js

yarn run spend --nonce=0 --network=bitcoin-cash

generate addresses

npm run generate --nonce=5 --count=10 --with-private --network=avalanche

check balances

# balance-check.csv is a csv in your file system
# at least with the columns, "network,address"
yarn run balances --address-list=balance-check.csv

you can also just pass in an address, or series of addresses with a network

yarn run balances --addresses=0xdeadbeef,0xdeadbeaa --network=ethereum


in order to use the balances api for networks like ethereum, an etherscan key is required. please add the appropriate keys to your file


binaries needed to run: node@16.2 - install an upgraded version using n package

  1. install the dependencies by running yarn
  2. create a .env file from an .env.example file you will note that some of the envs are commented out. these are proving difficult to generate keys for so they are being skipped for the time being.
  3. where a mnemonic or seed is asked for, simply create one using the iancoleman.io generation tool or provide your own.
  4. if you use the ian coleman generation tool you can check the output xprv + xpub keys against derivation-path(bip32) -> client(coinomi, ledger) in the interface
  5. below is an example of generating a bunch of addresses from seeds. a series of generated .csv files will be written to the generated folder. if you change the seed and use the same parameters (nonce + count), these will be overwritten
yarn run generate --nonce=0 --count=2 --with-private --network=all

to start from a different nonce offset, generate a new network or change the count of messages to generate, simply change the parameters.

yarn run generate
  --nonce=0 \
  --count=2 \
  --with-private \

the seeds and xpub addresses will be printed to the console, none of the seeds should be entered as commands or flags

some notes on individual networks

  1. cardano - needs the xpub key from adalite.io under the advanced tab or equivalent in hex to work
  2. bitcoin, bitcoin-cash, litecoin, dogecoin, zcash, ripple, and cardano all use xpub or derived addresses from public keys
  3. avalanche can use ethereum addresses - we just tell users to deposit to c-network on avalanche

quick note on flags passed in command line

yargs does not like parsing certain arg orders. i have found that having --network at the end makes things go much smoother for some reason.




npm i @pulsechain/generate-address

DownloadsWeekly Downloads






Unpacked Size

74.5 kB

Total Files


Last publish


  • 3commascapital