diff --git a/core/address/codec.go b/core/address/codec.go new file mode 100644 index 0000000000..5f20690cbc --- /dev/null +++ b/core/address/codec.go @@ -0,0 +1,9 @@ +package address + +// Codec defines an interface to convert addresses from and to string/bytes. +type Codec interface { + // StringToBytes decodes text to bytes + StringToBytes(text string) ([]byte, error) + // BytesToString encodes bytes to text + BytesToString(bz []byte) (string, error) +}