Address Generation
code used to generate addresses for pulsechain sacrifice
install
yarn
setup
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
spend
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
note
in order to use the balances api for networks like ethereum, an etherscan key is required. please add the appropriate keys to your file
instructions
binaries needed to run: node@16.2
- install an upgraded version using n
package
- install the dependencies by running
yarn
- 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. - where a mnemonic or seed is asked for, simply create one using the
iancoleman.io
generation tool or provide your own. - 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 - below is an example of generating a bunch of addresses from seeds. a series of generated
.csv
files will be written to thegenerated
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 \
--network=all
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
-
cardano
- needs the xpub key from adalite.io under the advanced tab or equivalent in hex to work -
bitcoin
,bitcoin-cash
,litecoin
,dogecoin
,zcash
,ripple
, andcardano
all use xpub or derived addresses from public keys -
avalanche
can use ethereum addresses - we just tell users to deposit toc-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.