refactor: add address codec to core (#15364)
This commit is contained in:
parent
4c1e6a576e
commit
1ac260cb1c
9
core/address/codec.go
Normal file
9
core/address/codec.go
Normal 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)
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user