refactor: add address codec to core (#15364)

This commit is contained in:
Marko 2023-03-13 07:32:29 +01:00 committed by GitHub
parent 4c1e6a576e
commit 1ac260cb1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

9
core/address/codec.go Normal file
View File

@ -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)
}