code: func DigitalWalletIsAuthorized(scope string, scopePrefix string, authorizedLabels []DigitalWalletAuthorization) (authorized bool) {
  	if authorizedLabels == nil {
  		return
  	}
  	if scope == scopePrefix {
  		authorized = len(authorizedLabels) > 0
  		return
  	}
  	if strings.HasPrefix(scope, scopePrefix+":") {
  		requestedLabel := strings.Split(strings.TrimPrefix(scope, scopePrefix+":"), ":")[0]
  		for _, authorizationmap := range authorizedLabels {
  			if authorizationmap.RequestedLabel == requestedLabel || authorizationmap.RequestedLabel == "main" && requestedLabel == "" {
  				authorized = true
  				return
  			}
  		}
  	}
  	return
  }
docs: // DigitalWalletIsAuthorized checks if a digital wallet is authorized