Files
1641c3c852 feat: update for Ledger v2 (#468)
Co-authored-by: Antoine Wacheux <[email protected]>
Co-authored-by: Maxence Maireaux <[email protected]>
Co-authored-by: Brieuc Caillot <[email protected]>
2023-09-20 16:40:28 +02:00

14 lines
232 B
Go

package ledger
import (
"regexp"
)
const AssetPattern = `[A-Z][A-Z0-9]{0,16}(\/\d{1,6})?`
var AssetRegexp = regexp.MustCompile("^" + AssetPattern + "$")
func AssetIsValid(v string) bool {
return AssetRegexp.Match([]byte(v))
}