func GenerateJWTToken(addr hash.Hash, key bmcrypto.PrivKey) (string, error) {
	// Get the current 30 second block of time
	now := jwt.TimeFunc()
	ct := (now.Unix() / 30) * 30

	claims := &jwt.StandardClaims{
		ExpiresAt: ct + 30 + 30, // Expires after the NEXT 30 second block
		NotBefore: ct - 30,      // Start accepting in the previous 30 second block
		IssuedAt:  ct - 30,      // IssuesAt cannot be more than NotBefore
		Subject:   addr.String(),
	}

	token := jwt.NewWithClaims(key.Type.JWTSignMethod(), claims)

	return token.SignedString(key.K)
}
// GenerateJWTToken generates a JWT token with the address and singed by the given private key
GenerateJWTToken generates a JWT token with the address and singed by the given private key
// GenerateJWTToken generates a JWT token with the address and singed by the given private key
func GenerateJWTToken(addr hash.Hash, key bmcrypto.PrivKey) (string, error) {
	now := jwt.TimeFunc()
	ct := (now.Unix() / 30) * 30
	claims := &jwt.StandardClaims{
		ExpiresAt: ct + 30 + 30, 
		NotBefore: ct - 30,      
		IssuedAt:  ct - 30,      
		Subject:   addr.String(),
	}
	token := jwt.NewWithClaims(key.Type.JWTSignMethod(), claims)
	return token.SignedString(key.K)
}
func GenerateJWTToken ( addr hash . Hash , key bmcrypto . PrivKey ) ( string , error ) { now := jwt . TimeFunc ( ) ct := ( now . Unix ( ) / 30 ) * 30 claims := & jwt . StandardClaims { ExpiresAt : ct + 30 + 30 , NotBefore : ct - 30 , IssuedAt : ct - 30 , Subject : addr . String ( ) , } token := jwt . NewWithClaims ( key . Type . JWTSignMethod ( ) , claims ) return token . SignedString ( key . K ) }
GenerateJWTToken generates a JWT token with the address and singed by the given private key
GenerateJWTToken generates a JWT token with the address and singed by the given private key
// Get the current 30 second block of time // Expires after the NEXT 30 second block // Start accepting in the previous 30 second block // IssuesAt cannot be more than NotBefore