github.com/pokt-network/tendermint@v0.32.11-0.20230426215212-59310158d3e9/types/codec.go (about)

     1  package types
     2  
     3  import (
     4  	amino "github.com/tendermint/go-amino"
     5  
     6  	cryptoamino "github.com/tendermint/tendermint/crypto/encoding/amino"
     7  )
     8  
     9  var cdc = amino.NewCodec()
    10  
    11  func init() {
    12  	RegisterBlockAmino(cdc)
    13  }
    14  
    15  func RegisterBlockAmino(cdc *amino.Codec) {
    16  	cryptoamino.RegisterAmino(cdc)
    17  	RegisterEvidences(cdc)
    18  }
    19  
    20  // GetCodec returns a codec used by the package. For testing purposes only.
    21  func GetCodec() *amino.Codec {
    22  	return cdc
    23  }
    24  
    25  // For testing purposes only
    26  func RegisterMockEvidencesGlobal() {
    27  	RegisterMockEvidences(cdc)
    28  }