BIP32 HD Wallet and Vanity Address Generator

#1

I've just committed the first version of a HD wallet generator.

It can generate mainnet and testnet addresses offline.

I suggest that you download and compile the code yourself before running it on a machine that is not connected to a network.

Write down the passphrase carefully because if you lose it, you'll lose all access to the addresses contained within. Similarly, anyone with your passphrase can access all of your addresses.

Some testing has been done but please use caution!

If you find it useful, I'll continue to add features. There is no support for Z addresses - I haven't checked what's involved in Z address generation yet.

Edit: I've added vanity address generation. After generating a passphrase, use zretrieve to search for an address that matches a regex. eg to search for an address starting with "t1jl":

zretrieve -passphrase="board start difference answer blossom roll powerful million rough butterfly bedroom beam" -match "^t1jl" -i

8 Likes
Wallet Question - If I create wallet address on testnet can I use on live?
Would pools like zcash.flypool.org continue automatically mining mainnet?
Is it possible to generate a main net address already?
#2

I've pushed a new version where you can specify the number of addresses to generate. Enjoy!

#3

Thank you very very much funkyzebraz ! This solved my problem at: https://forum.zcashcommunity.com/t/would-pools-like-zcash-flypool-org-continue-automatically-mining-mainnet/3588/2

#4

I'm really confused about this addresses thing. If Zcash addresses don't depend of trust setup parameters and can already be generated, why is it that current testnet addresses won't be valid addresses in mainnet? Is the address scheme different between testnet and mainnet?

#5

@recursive it does need but you see it wrong side base on your trust setup youll move your coin (publicly) but when you Z them ( shiled it) it mean its sorta decentralize ( im using slang for picturize it )

so the T adress is sorta your public and Z your master

#6

A reminder that you should not rely on the current BIP 32 prefixes, as they have not been specified and may change:

1 Like
#7

ACK - I don't serialize to xpriv/xpub prefixes because of that. The generator derives m from the mnemonic each time.

Private keys to addresses derived from m/0'/0/0 are serialised in WIF using the PUBKEY_ADDRESS network id to maintain compatibility with the importprivkey cli command.

#8

hi funkyzebraz, i generated a address with your tool.

zgenerate
2016/10/28 19:31:32 Wallet generated!
got passphrase, address and privkey.

now i used this address to mine, now i wanted to import it with zcash-cli but:
zcash-cli importprivkey PRIVKEY
error: {"code":-5,"message":"Invalid private key encoding"}

zcashd is on mainnet.
are my ZEC coins lost or do you have an idea?

EDIT: zcash-cli --version
Zcash RPC client version v1.0.0

zcash-cli getinfo
{
"version" : 1000050,
"protocolversion" : 170002,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 497,
"timeoffset" : 0,
"connections" : 1,
"proxy" : "",
"difficulty" : 6737.07450381,
"testnet" : false,
"keypoololdest" : 1477681763,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"relayfee" : 0.00005000,
"errors" : ""
}

#9

No coins have been lost.

I've just pushed a commit which fixes the output for the private key.

Update your code to the newest version

go clean github.com/blackkeyboard/zgenerate
go install github.com/blackkeyboard/zgenerate
go install github.com/blackkeyboard/zgenerate/zretrieve

Run zretrieve with your passphrase:

zretrieve -passphrase=xxxxx

Sorry about the scare!

#10

There is no zretrieve repository.

#11

Just edited my post

go install github.com/blackkeyboard/zgenerate/zretrieve

#12

gotcha, thanks <3

great tool. mis-used it to create a vanity address :wink:

#13

thank you for help, but this command gets me exactly the same private key with same error.
but now i have some hope :slight_smile:

maybe because i get the same with -test and without test?
i hope i have not generated a test address
EDIT: forget, with -test the Address is different, only privkey is the same

#14

you have to clean first.

works for me now. (priv keys start with L/K)

#15

Nice one :slight_smile:

I'll clean up the parameterization and I might look at adding a vanity generator option. What do you reckon?

#16

id did but there was another problem with go.
WORKS NOW, thank you :slight_smile:

please send me a zcash address, i will send you a little!

#17

Not sure if you meant 5chdn or myself but anyway

t1Vq8SUDmrJAeiVphnkEzk7RykRqdKQSMPL

:slight_smile:

#18

no, he clearly does mean you, funkyzebras.

re: vanity. I was looking for a tool which generates an address which includes my nick. I was generating 5GB of keypairs until I found t1-QogAodMtoAheVkqtTg3nNCRHxSB-5chdn-t :slight_smile:

But if you do not have to write the results to disk, it should be way faster.

#19

I've pushed a new version which properly parameterizes the network

#20

Thank you chefbauer!