Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Default = AddressDecoderV2{}
)
View Source
var ErrInvalidChecksum = errors.New("invalid checksum")
ErrInvalidChecksum is returned when Validate determines either the checksum or the payload has been corrupted
View Source
var ErrInvalidVersionByte = errors.New("invalid version byte")
ErrInvalidVersionByte is returned when the version byte from a provided strkey-encoded string is not one of the valid values.
Functions ¶
Types ¶
type AddressDecoderV2 ¶
type AddressDecoderV2 struct { }
AddressDecoderV2
func (*AddressDecoderV2) AddressDecode ¶
func (dec *AddressDecoderV2) AddressDecode(addr string, opts ...interface{}) ([]byte, error)
AddressDecode 地址解析
func (*AddressDecoderV2) AddressEncode ¶
func (dec *AddressDecoderV2) AddressEncode(hash []byte, opts ...interface{}) (string, error)
AddressEncode 地址编码
type VersionByte ¶
type VersionByte byte
VersionByte represents one of the possible prefix values for a StrKey base string--the string the when encoded using base32 yields a final StrKey.
const ( //VersionByteAccountID is the version byte used for encoded stellar addresses VersionByteAccountID VersionByte = 6 << 3 // Base32-encodes to 'G...' )
Click to show internal directories.
Click to hide internal directories.