add client-side logic for RPC calls to JB over websocket