// Generated by bynkc — do not edit by hand.
// adapter tokens

import { Ok, Err, Some, None, type Result, type Option, type ValidationError } from "./runtime.js";

import * as bynk from "./bynk.js";

export interface Claims {
  readonly sub: string;
  readonly exp: number;
}

export const Claims = {
};

export type JwtError =
    { readonly tag: "Invalid" }
  | { readonly tag: "Expired" };

export const JwtError = {
  Invalid: { tag: "Invalid" } as JwtError,
  Expired: { tag: "Expired" } as JwtError,
};

export interface Jwt {
  sign(claims: Claims): Promise<string>;
  verify(token: string): Promise<Result<Claims, JwtError>>;
}

export const JwtToken: unique symbol = Symbol("Jwt");

