0.0.46 • Published 2 years ago

@pulsechain/generate-address v0.0.46

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
2 years ago

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

  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 \
  --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

  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.

0.0.45

2 years ago

0.0.46

2 years ago

0.0.44

3 years ago

0.0.42

3 years ago

0.0.43

3 years ago

0.0.40

3 years ago

0.0.41

3 years ago

0.0.37

3 years ago

0.0.39

3 years ago

0.0.36

3 years ago

0.0.33

3 years ago

0.0.34

3 years ago

0.0.35

3 years ago

0.0.30

3 years ago

0.0.31

3 years ago

0.0.32

3 years ago

0.0.29

3 years ago

0.0.26

3 years ago

0.0.27

3 years ago

0.0.28

3 years ago

0.0.25

3 years ago

0.0.22

3 years ago

0.0.23

3 years ago

0.0.24

3 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.14

3 years ago

0.0.15

3 years ago

0.0.16

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.13

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago