UNPKG

incubed

Version:

Typescript-version of the incubed client

15 lines (14 loc) 857 B
import { RPCRequest, RPCResponse, ChainSpec } from "../types/types"; import ChainContext from "./ChainContext"; import Client from "./Client"; export interface Module { name: string; createChainContext(client: Client, chainId: string, spec: ChainSpec): ChainContext; /** general verification-function which handles it according to its given type. */ verifyProof(request: RPCRequest, response: RPCResponse, allowWithoutProof: boolean, ctx: ChainContext): Promise<boolean>; } export declare function getModule(name: string): Module; /** general verification-function which handles it according to its given type. */ export declare function verifyProof(request: RPCRequest, response: RPCResponse, allowWithoutProof: boolean, ctx: ChainContext): Promise<boolean>; export declare function register(module: Module): void; import '../modules/eth';