import { Express } from 'express'; import { Transaction } from 'js-conflux-sdk'; import { SocketParams } from '../Logger'; import { WalletWrapper } from './wrapper'; /** * Leverages `JsonRpcEngine` to intercept account-related calls, and pass any other calls down to a destination * provider, e.g. Infura. */ export declare class WalletMiddlewareServer { expressServer: Express; wrapper: WalletWrapper; dictionaryEthCfx: { [K: string]: string; }; rpcMethodHandlers: { [K: string]: any; }; rpcParamsHandlers: { [K: string]: any; }; constructor(url: string, networkId: number, privateKeys: string[], interleaveEpochs: number, defaultGas: BigInt, defaultGasPrice: number, estimateGasPrice: boolean, epochLabel: string, alwaysSynced: boolean); /** * Initializes the Express server, configures CORS, and passes requests back and forth between the Express server and * the `JsonRpcEngine`. */ initialize(): this; /** * Tells the Express server to start listening. */ listen(port: number, hostname?: string): Promise; /** * Translate to Conflux the ADDRESS value * that come as first parameter in some Eth methods. * E.g.: eth_sign */ paramsTranslateAddress(params: any[], socket: SocketParams): any[]; /** * Translate to Conflux the ADDRESS and TAG parameters * that come as first and second parameter in some Eth methods. * E.g.: */ paramsTranslateAddrAndTag(params: any[], socket: SocketParams): any[]; /** * Translate to Conflux the TAG parameter that (optionally) * comes as first parameter in some Eth methods. * E.g.: */ paramsTranslateTag(params: any[], socket: SocketParams): any[]; /** * Translate to Conflux the TRANSACTION (object) and * TAG (string) that come as first and second * parameters in some Eth methods. * E.g.: */ paramsTranslateTxAndTag(params: any[], socket: SocketParams): any[]; /** * Verbosely log incoming parameters. */ traceParams(params: any[], socket: SocketParams): any[]; /** * Lambda function to perform actual translation of Eth addresses to Conflux alphanumeric format. * See: https://github.com/Conflux-Chain/CIPs/blob/master/CIPs/cip-37.md */ translateEthAddress(address: string): any; /** * Lambda function to perform actual translation of TAG parameter, * from Eth to Conflux. */ translateTag(tag: string): string; /** * Translate to Conflux the values of `from` and `tx` fields * within passed Transaction object. */ translateEthAddressesInTransaction(tx: Transaction): Transaction; /** * Recursively mutate Conflux response object as to make it readable by Eth clients. */ translateCfxResponseObject(obj: any, socket: SocketParams): any; } //# sourceMappingURL=server.d.ts.map