super-jwt
Version:
Super-JWT helps to authenticate your users based on Superfluid streams using JSON Web Tokens (JWT)
16 lines (15 loc) • 702 B
TypeScript
import { JwtPayload, SignOptions, Secret } from "jsonwebtoken";
export type Chain = "sepolia" | "opsepolia" | "fuji" | "bsepolia" | "scrsepolia" | "matic" | "mainnet" | "xdai" | "optimism" | "avalanche" | "bsc" | "celo" | "base";
export interface StreamPayload {
chain: Chain;
sender: string;
receiver: string;
token: string;
[key: string]: any;
}
export interface AuthenticationResult {
token: string;
stream: StreamPayload | JwtPayload;
}
export declare function authenticateWithStream(streamPayload: StreamPayload, secret: Secret, jwtOptions: SignOptions): Promise<AuthenticationResult>;
export declare function verifyToken(jwtToken: string, secret: Secret): JwtPayload;