codechain-sdk-js
codechain-sdk-js copied to clipboard
Support WebSocket connection
Proposal:
const sdk = new SDK({ server: "ws://..." });
await sdk.rpc.node.ping(); // rejects with Error("Not connected");
await sdk.rpc.connect(); // open
await sdk.rpc.node.ping(); // pong
await sdk.rpc.disconnect(); // close
Any suggestions are welcome