rfc icon indicating copy to clipboard operation
rfc copied to clipboard

16/WAKU2-RPC: JSON RPC Debug API - Return PeerId

Open D4nte opened this issue 4 years ago • 0 comments

The get_waku_v2_debug_v1_info json RPC method returns an object with a unique field:

  • listenStr: Address that the node is listening for (e.g. /ip4/127.0.0.1/tcp/60000/p2p/16Uiu2HAkyzsXzENw5XBDYEQQAeQTCYjBJpMLgBmEXuwbtcrgxBJ4)

It would be great if it could also return the peerId in a standalone field. While the information is already present, one has to do string manipulation to extract it.

My current use case is for test purposes, where I want to ensure that nim-waku and js-waku nodes are connected: https://github.com/D4nte/waku-js-chat/blob/f0c9c3ef50f7dd9ee6ddab146f0252aa4b86e7c9/src/lib/node.spec.ts#L79

D4nte avatar Mar 11 '21 04:03 D4nte