0.0.6 • Published 9 months ago

@polkadot-api/logs-provider v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@polkadot-api/logs-provider

This package exports a JsonRpcProvider enhancer to record logs of messages sent & received, and a provider that reads from these logs to replay existing sessions.

This can be useful to set up reproduction cases with a provider that behaves consistently.

withLogsRecorder

function withLogsRecorder(
  persistLog: (line: string) => void,
  provider: JsonRpcProvider,
): JsonRpcProvider

logsProvider

function logsProvider(logs: string[]): JsonRpcProvider