RPC Access
# curl to get the polygon Cdk block height
curl https://demouser:[email protected]/rpc \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}'# Web socket to get the block number
npx wscat -c wss://demouser:[email protected]/ws
# calling the JSON-RPC method after the WebSocket connection
{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}Last updated
Was this helpful?