Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidVersionByte = fmt.Errorf("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 VersionByte ¶
type VersionByte byte
VersionByte represents one of the possible prefix values for a StrKey base string--the string the when encoded using base58 yields a final StrKey.
const ( AccountAddressVersionByte VersionByte = 0x5b // Base58-encodes to 'A...' AccountSeedVersionByte VersionByte = 0xff // Base58-encodes to 'S...' DeviceSeedVersionByte VersionByte = 0x7d // Base58-encodes to 'D...' NetworkAddressVersionByte VersionByte = 0xd3 // Base58-encodes to `N...` )
func Version ¶
func Version(src string) (VersionByte, error)
Version extracts and returns the version byte from the provided source string.
Click to show internal directories.
Click to hide internal directories.