You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
459 B

10 years ago
10 years ago
  1. package main
  2. import (
  3. "encoding/hex"
  4. "fmt"
  5. . "github.com/tendermint/tendermint/account"
  6. . "github.com/tendermint/tendermint/binary"
  7. )
  8. func gen_account() {
  9. // TODO: uh, write better logic.
  10. // Generate private account
  11. privAccount := GenPrivAccount()
  12. fmt.Printf(`Generated account:
  13. Account Public Key: %v
  14. Account Private Key: %v
  15. `,
  16. hex.EncodeToString(BinaryBytes(privAccount.PubKey)),
  17. hex.EncodeToString(BinaryBytes(privAccount.PrivKey)),
  18. )
  19. }