/** * Radix Gateway API - Babylon * This API is exposed by the Babylon Radix Gateway to enable clients to efficiently query current and historic state on the RadixDLT ledger, and intelligently handle transaction submission. It is designed for use by wallets and explorers, and for light queries from front-end dApps. For exchange/asset integrations, back-end dApp integrations, or simple use cases, you should consider using the Core API on a Node. A Gateway is only needed for reading historic snapshots of ledger states or a more robust set-up. The Gateway API is implemented by the [Network Gateway](https://github.com/radixdlt/babylon-gateway), which is configured to read from [full node(s)](https://github.com/radixdlt/babylon-node) to extract and index data from the network. This document is an API reference documentation, visit [User Guide](https://docs.radixdlt.com/) to learn more about how to run a Gateway of your own. ## Migration guide Please see [the latest release notes](https://github.com/radixdlt/babylon-gateway/releases). ## Integration and forward compatibility guarantees All responses may have additional fields added at any release, so clients are advised to use JSON parsers which ignore unknown fields on JSON objects. When the Radix protocol is updated, new functionality may be added, and so discriminated unions returned by the API may need to be updated to have new variants added, corresponding to the updated data. Clients may need to update in advance to be able to handle these new variants when a protocol update comes out. On the very rare occasions we need to make breaking changes to the API, these will be warned in advance with deprecation notices on previous versions. These deprecation notices will include a safe migration path. Deprecation notes or breaking changes will be flagged clearly in release notes for new versions of the Gateway. The Gateway DB schema is not subject to any compatibility guarantees, and may be changed at any release. DB changes will be flagged in the release notes so clients doing custom DB integrations can prepare. * * The version of the OpenAPI document: v1.10.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { ErrorResponse } from './models'; export declare const BASE_PATH: string; export interface ConfigurationParameters { basePath?: string; fetchApi?: FetchAPI; agent?: any; dispatcher?: any; middleware?: Middleware[]; queryParamsStringify?: (params: HTTPQuery) => string; headers?: HTTPHeaders; credentials?: RequestCredentials; } export declare class Configuration { private configuration; constructor(configuration?: ConfigurationParameters); set config(configuration: Configuration); get basePath(): string; get fetchApi(): FetchAPI | undefined; get middleware(): Middleware[]; get queryParamsStringify(): (params: HTTPQuery) => string; get headers(): HTTPHeaders | undefined; get credentials(): RequestCredentials | undefined; get agent(): any | undefined; get dispatcher(): any | undefined; } export declare const DefaultConfig: Configuration; /** * This is the base class for all generated API classes. */ export declare class BaseAPI { protected configuration: Configuration; private middleware; constructor(configuration?: Configuration); withMiddleware(this: T, ...middlewares: Middleware[]): T; withPreMiddleware(this: T, ...preMiddlewares: Array): T; withPostMiddleware(this: T, ...postMiddlewares: Array): T; protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise; private createFetchParams; private fetchApi; /** * Create a shallow clone of `this` by constructing a new instance * and then shallow cloning data members. */ private clone; } export declare class ResponseError extends Error { fetchResponse: Response; status: number; errorResponse: ErrorResponse | undefined; name: "ResponseError"; constructor(fetchResponse: Response, status: number, errorResponse: ErrorResponse | undefined); static from(fetchResponse: Response): Promise; } export declare class RequiredError extends Error { field: string; name: "RequiredError"; constructor(field: string, msg?: string); } export declare const COLLECTION_FORMATS: { csv: string; ssv: string; tsv: string; pipes: string; }; export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; export type Json = any; export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; export type HTTPHeaders = { [key: string]: string; }; export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery; }; export type HTTPBody = Json | FormData | URLSearchParams; export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody; }; export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit; context: RequestOpts; }) => Promise; export interface FetchParams { url: string; init: RequestInit; } export interface RequestOpts { path: string; method: HTTPMethod; headers: HTTPHeaders; query?: HTTPQuery; body?: HTTPBody; } export declare function exists(json: any, key: string): boolean; export declare function querystring(params: HTTPQuery, prefix?: string): string; export declare function mapValues(data: any, fn: (item: any) => any): {}; export declare function canConsumeForm(consumes: Consume[]): boolean; export interface Consume { contentType: string; } export interface RequestContext { fetch: FetchAPI; url: string; init: RequestInit; } export interface ResponseContext { fetch: FetchAPI; url: string; init: RequestInit; response: Response; } export interface ErrorContext { fetch: FetchAPI; url: string; init: RequestInit; error: unknown; response?: Response; } export interface Middleware { pre?(context: RequestContext): Promise; post?(context: ResponseContext): Promise; onError?(context: ErrorContext): Promise; } export interface ApiResponse { raw: Response; value(): Promise; } export interface ResponseTransformer { (json: any): T; } export declare class JSONApiResponse { raw: Response; private transformer; constructor(raw: Response, transformer?: ResponseTransformer); value(): Promise; } export declare class VoidApiResponse { raw: Response; constructor(raw: Response); value(): Promise; } export declare class BlobApiResponse { raw: Response; constructor(raw: Response); value(): Promise; } export declare class TextApiResponse { raw: Response; constructor(raw: Response); value(): Promise; }