@opendatalabs/vana-sdk
Version:
A TypeScript library for interacting with Vana Network smart contracts.
27 lines (26 loc) • 1.22 kB
TypeScript
/**
* Auth-specific error classes for Web3Signed verification.
*
* @remarks
* Mirrors the relevant subset of `personal-server-ts` `ProtocolError` so server
* code that consumes Web3Signed primitives can branch on typed errors. They
* extend {@link VanaError} so they fit the SDK error hierarchy.
*
* @category Error Handling
*/
import { VanaError } from "../errors";
/** Thrown when an Authorization header is missing or empty. */
export declare class MissingAuthError extends VanaError {
readonly details?: Record<string, unknown> | undefined;
constructor(message?: string, details?: Record<string, unknown> | undefined);
}
/** Thrown when a Web3Signed header is malformed or its signature does not verify. */
export declare class InvalidSignatureError extends VanaError {
readonly details?: Record<string, unknown> | undefined;
constructor(details?: Record<string, unknown> | undefined, message?: string);
}
/** Thrown when a Web3Signed token is expired or issued too far in the future. */
export declare class ExpiredTokenError extends VanaError {
readonly details?: Record<string, unknown> | undefined;
constructor(details?: Record<string, unknown> | undefined, message?: string);
}