UNPKG

@stable-io/cctp-sdk-definitions

Version:

Definitions for the CCTP SDK

13 lines 602 B
/** * @todo: this utility is abstract enough to move to common packages. * it's not really related in anything to cctp itself. */ import type { BaseObject, Url } from "@stable-io/utils"; import type { Duration } from "./constants/index.js"; export type HTTPCode = 200 | 201 | 202 | 204 | 400 | 401 | 403 | 404 | 409 | 422 | 429 | 500; export type APIResponse<S extends HTTPCode, V> = Readonly<{ status: S; value: V; }>; export declare const fetchApiResponse: <T extends APIResponse<HTTPCode, BaseObject>>(endpoint: Url, ttl?: Duration) => Promise<T>; //# sourceMappingURL=api.d.ts.map