Is there a way to query a running (local) node and list all available RPC and/or extrinsic endpoints?
I want to create an overview for new team members and for our company, and maybe even pipe the output to a diagram tool!
Substrate and Polkadot Stack Exchange is a question and answer site for developers building blockchains with the Substrate SDK. It only takes a minute to sign up.
Sign up to join this communitycurl http://127.0.0.1:9933 -X POST -H "Content-Type:application/json" -d '{"jsonrpc":"2.0","method":"rpc_methods","params":[],"id":1}'
The result example, extrinsic relates:
author_pendingExtrinsics
author_removeExtrinsic
author_submitAndWatchExtrinsic
author_submitExtrinsic
author_unwatchExtrinsic
You could also use substrate-api-sidecar to query a running local node. By default, it provides a series of endpoints to retrieve chain information (blocks, extrinsics and storage) from nodes. Highlighting here some extrinsics/transaction related endpoints :
/blocks/{blockId}/extrinsics/{extrinsicIndex}
/node/transaction-pool
/transaction
/transaction/dry-run
/transaction/fee-estimate
/transaction/material
but you can also check the full endpoints docs here