This project is a React Component that displays a list of JSON-RPC Requests and Responses.
- Displays Requests and Responses in a time-series format
- Supports JSON-RPC Notifications
npm install --save @open-rpc/logs-react
import JSONRPCLogger, {JSONRPCLog} from "@open-rpc/logs-react";
// Get these logs how ever you want
const logs: JSONRPCLog[] = [{
type: "request",
timestamp: new Date(),
payload: {
jsonrpc: "2.0",
method: "foo"
}
}];
<JSONRPCLogger logs={logs} />
npx create-react-app <appname> --typescript
cd <appname>
npm install .
npm install @open-rpc/logs-react --save
import React from 'react';
import ReactDOM from 'react-dom';
import JSONRPCLogger, {JSONRPCLog} from "@open-rpc/logs-react";
const logs: JSONRPCLog[] = [{
type: "request",
timestamp: new Date(),
payload: {
jsonrpc: "2.0",
method: "foo"
}
}];
ReactDOM.render(<JSONRPCLogger logs={logs} />, document.getElementById("root"));
How to contribute, build and release are outlined in CONTRIBUTING.md, BUILDING.md and RELEASING.md respectively. Commits in this repository follow the CONVENTIONAL_COMMITS.md specification.