import btcpk "github.com/steakknife/bitcoin/addr/private"
pk := btcpk.MustGenerate()
fmt.Printf("BTC Private key address (wallet format): %s", pk)
fmt.Printf("BTC Public key address: %s", pk.PublicKey())
import btcpub "github.com/steakknife/bitcoin/addr/public"
pubKey := btcpub.MustDecode("19Bq1gipWrLxFGqVH41Un2suWnGzWxNjbZ")
fmt.Printf("BTC public key: %s\n", pubKey)
fmt.Printf(" network: %s (%d, 0x%02X)\n", pubKey.Network, int(pubKey.Network), int(pubKey.Network))
fmt.Printf(" address: %v\n", pubKey.Address)
import btcpk "github.com/steakknife/bitcoin/addr/private"
privKey := btcpk.MustDecode("5Ju6hf57BPdusMDUg4C6gPKiauXSahHVnTGmTNHoJeGUwJHeqSY")
fmt.Printf("BTC private key: %s\n", privKey)
fmt.Printf(" network: %s (%d, 0x%02X)\n", privKey.Network, int(privKey.Network), int(privKey.Network))
fmt.Printf(" exponent: %v\n", privKey.Exponent())
fmt.Printf(" public key: %s\n", privKey.PublicKey())
fmt.Printf(" X: %v\n", privKey.XBytes())
fmt.Printf(" Y: %v\n", privKey.YBytes())
make
make GOTESTOPT='-bench=.'
MIT
Copyright (C) 2013-2015 Barry Allard