From 1ac260cb1c6f05666f47e67f8b2cfd6229a55c3b Mon Sep 17 00:00:00 2001 From: Marko Date: Mon, 13 Mar 2023 07:32:29 +0100 Subject: [PATCH] refactor: add address codec to core (#15364) --- core/address/codec.go | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 core/address/codec.go 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) +}