tendermint/cmd/gen_account.go

25 lines
459 B
Go
Raw Normal View History

package main
import (
2014-12-31 22:13:49 -08:00
"encoding/hex"
"fmt"
2014-12-17 01:37:13 -08:00
. "github.com/tendermint/tendermint/account"
. "github.com/tendermint/tendermint/binary"
)
2014-11-07 23:27:03 -08:00
func gen_account() {
// TODO: uh, write better logic.
// Generate private account
2014-12-17 01:37:13 -08:00
privAccount := GenPrivAccount()
fmt.Printf(`Generated account:
2014-12-31 22:13:49 -08:00
Account Public Key: %v
Account Private Key: %v
`,
2014-12-31 22:13:49 -08:00
hex.EncodeToString(BinaryBytes(privAccount.PubKey)),
hex.EncodeToString(BinaryBytes(privAccount.PrivKey)),
)
}