package main

import (
  "fmt"
  "encoding/hex"
  dg "github.com/cosmos/basecoin-delegationgame"
  "github.com/tendermint/go-wire"
  "github.com/tendermint/go-crypto"
)

func main () {
  txBytes, err := hex.DecodeString("018300372D8D8A1DB5EF8299240A462F91027A43F1C83F154C6756C66CBAEAC4F3018BF70A3665DB0701AC3293F47A1DA51EA014581DF3BC5EA2785A0EF2C664254897A2245E057A664E1D7CC9A113DFEB15E8EB64D94EFFD5B1947F907DA7909A0E01086173646661736466014573717565657A652065726F646520736F667420666F7373696C20646F6720746F7373206F6666206361626C6520646566696E6520656D65726765206D696E7574652061697201025553014573717565657A652065726F646520736F667420666F7373696C20646F6720746F7373206F6666206361626C6520646566696E6520656D65726765206D696E75746520616972000112687474703A2F2F6578616D706C652E636F6D02BC0000007B")
  if err != nil {
    panic(err)
  }

  fmt.Printf("txBytes: %v\n", txBytes)

  txs := &dg.Candidate{} 
  wire.ReadBinaryBytes(txBytes, &txs)
  fmt.Printf("%v\n", txs.ValidatorPubKey)

  pub := &crypto.PubKey{}
  wire.ReadBinaryBytes(txBytes, &pub)
  fmt.Println(pub)
}

