wemeetagain / go-hdwallet

Go utilities for generating hierarchical deterministic Bitcoin wallets based on BIP 32
The Unlicense
126 stars 44 forks source link

how can i get private key #8

Open SpadeRoy opened 6 years ago

SpadeRoy commented 6 years ago

when i create master private key, how can i get it. how can i get the private key that i can copy to the wallet, and use it @wemeetagain

wemeetagain commented 5 years ago
// Generate a random 256 bit seed
seed, err := hdwallet.GenSeed(256)

// Create a master private key
masterprv := hdwallet.MasterKey(seed)

// Serialize the private key to a string
key := masterprv.String()

// Do stuff with `key`