Documentation ¶
Overview ¶
Package guards provides validation functions which are used throughout the entire library.
Index ¶
- func IsAddressWithChecksum(addr Trytes) bool
- func IsAttachedTrytes(trytes Trytes) bool
- func IsEmptyTrytes(trytes Trytes) bool
- func IsHash(trytes Trytes) bool
- func IsTag(trytes Trytes) bool
- func IsTransactionHash(trytes Trytes) bool
- func IsTransactionHashWithMWM(trytes Trytes, mwm uint) bool
- func IsTransactionTrytes(trytes Trytes) bool
- func IsTransactionTrytesWithMWM(trytes Trytes, mwm uint) (bool, error)
- func IsTrytes(trytes Trytes) bool
- func IsTrytesOfExactLength(trytes Trytes, length int) bool
- func IsTrytesOfMaxLength(trytes Trytes, max int) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAddressWithChecksum ¶
func IsAddressWithChecksum(addr Trytes) bool
IsAddressWithChecksum checks if the given address is exactly 90 trytes long.
func IsAttachedTrytes ¶
func IsAttachedTrytes(trytes Trytes) bool
IsAttachedTrytes checks if input is valid attached transaction trytes. For attached transactions the last 243 trytes are non-zero.
func IsEmptyTrytes ¶
func IsEmptyTrytes(trytes Trytes) bool
IsEmptyTrytes checks if input is null (all 9s trytes)
func IsHash ¶
func IsHash(trytes Trytes) bool
IsHash checks if input is correct hash (81 trytes or 90)
func IsTransactionHash ¶
func IsTransactionHash(trytes Trytes) bool
IsTransactionHash checks whether the given trytes can be a transaction hash.
func IsTransactionHashWithMWM ¶
IsTransactionHashWithMWM checks if input is correct transaction hash (81 trytes) with given MWM
func IsTransactionTrytes ¶
func IsTransactionTrytes(trytes Trytes) bool
IsTransactionTrytes checks if input is correct transaction trytes (2673 trytes)
func IsTransactionTrytesWithMWM ¶
IsTransactionTrytesWithMWM checks if input is correct transaction trytes (2673 trytes) with given MWM
func IsTrytes ¶
func IsTrytes(trytes Trytes) bool
IsTrytes checks if input is correct trytes consisting of [9A-Z]
func IsTrytesOfExactLength ¶
IsTrytesOfExactLength checks if input is correct trytes consisting of [9A-Z] and given length
func IsTrytesOfMaxLength ¶
IsTrytesOfMaxLength checks if input is correct trytes consisting of [9A-Z] and length <= maxLength
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package validators leverages package guards to provide easy to use validation functions.
|
Package validators leverages package guards to provide easy to use validation functions. |