Documentation
¶
Overview ¶
Helper functions for encoding and decoding Travel Addresses, which are used to specify which VASP controls a specific virtual asset address. OpenVASP and TRP have replaced LNURLs in recent versions to more easily facilitate travel rule transfers and the TRISA protocol recommends the use of a travel address over the use of an LNURL.
The base58 encoding implementation was ported from the https://github.com/btcsuite/btcd repository per their ISC license.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrChecksum indicates that the checksum of a check-encoded string does not // verify against the checksum. ErrChecksum = errors.New("checksum error") // ErrInvalidFormat indicates that the check-encoded string has an invalid format. ErrInvalidFormat = errors.New("invalid format: version and/or checksum bytes missing") // ErrUnhandledScheme indicates that the travel address was not prefixed with ta. ErrUnhandledScheme = errors.New("unhandled travel address scheme") // ErrMissingQuery indicates that the travel address does not have the query string t=i ErrMissingQueryString = errors.New("missing query string") // ErrURIScheme indicates that there is a protocol scheme, e.g. https:// in the url ErrURIScheme = errors.New("travel address should not contain protocol scheme") // ErrInvalidTLD indicates that the URL has no top-level domain ErrInvalidTLD = errors.New("invalid top level domain") )
Functions ¶
func Decode ¶
Decode a travel address string into a raw URI. The decode method is strict, which means that the travel address must contain the t=i query parameter, a valid TLD, and must not have a URI scheme such as https:// which is implied by the address.