@zkp2p/reclaim-witness-sdk
Version:
<div> <div> <img src="https://raw.githubusercontent.com/reclaimprotocol/.github/main/assets/banners/Attestor-Core.png" /> </div> </div>
11 lines (10 loc) • 483 B
TypeScript
import type { Transaction } from 'elastic-apm-node';
import type { IAttestorServerSocket } from '../types/client';
import type { Logger } from '../types/general';
import type { RPCRequestData, RPCResponseData, RPCType } from '../types/rpc';
export type RPCHandlerMetadata = {
logger: Logger;
tx?: Transaction;
client: IAttestorServerSocket;
};
export type RPCHandler<R extends RPCType> = (data: RPCRequestData<R>, ctx: RPCHandlerMetadata) => Promise<RPCResponseData<R>>;