@zkportal/aleo-oracle-sdk
Version:
Aleo Oracle SDK
15 lines (14 loc) • 822 B
TypeScript
import type { AttestationResponse, CustomBackendConfig, DebugRequestResponse, EnclaveInfo } from './types';
import { type Response } from './fetch';
import { type IpAndUrl } from './address';
export type BackendMesh = {
backend: Required<CustomBackendConfig>;
ipAndUrl: IpAndUrl[];
}[];
export declare function resolveBackends(backends: Required<CustomBackendConfig>[], path: string): Promise<BackendMesh>;
export declare function requestBackendMesh(backendMesh: BackendMesh, method: string, body?: object, abortSignal?: AbortSignal): Promise<Response[]>;
export declare function handleInfoResponse(resp: Response): Promise<EnclaveInfo>;
export declare function handleAttestationResponse(options: {
timeout?: number;
debug: boolean;
}, resp: Response): Promise<DebugRequestResponse | AttestationResponse>;