Skip to content

Instantly share code, notes, and snippets.

@sogoiii
Created June 9, 2017 05:58
Show Gist options
  • Save sogoiii/42a9b816a39ace8159643a5583cec6c1 to your computer and use it in GitHub Desktop.
Save sogoiii/42a9b816a39ace8159643a5583cec6c1 to your computer and use it in GitHub Desktop.
Call the Ethereum RPC api with curl
curl -X POST localhost:8545 --data '{
"jsonrpc":"2.0",
"method": "eth_sign",
"params":["0x2fb5949a6a1dc03b6d59d4723bc913230a155d0d", "0x0564b25c8fcd6766f672d43252c8ee2597ad6c7a35315cf13e3b4d00bafc2e9f"],
"id":1
}'
@sivachaitanya
Copy link

So I have done this on my local windows cmd - curl -X POST --data '{"jsonrpc":"2.0","method":"eth_sign","params":["0x525c846b777d003048dbabd0f2dd677086839812", "0xdeadbeaf"],"id":1}' which gives me - curl: (3) [globbing] unmatched close brace/bracket in column 11 . Can you help me resolve this ?

@sivachaitanya
Copy link

No worries, got it solved by escaping the characters - curl -X POST localhost:8545 -d "{"jsonrpc":"2.0","method":"eth_sign","params":["0x525c846b777d003048dbabd0f2dd677086839812", "0xdeadbeaf"],"id":1}"

@mgkao
Copy link

mgkao commented Mar 14, 2018

curl -X POST localhost:8545 --data '{
"jsonrpc":"2.0",
"method": "eth_sign",
"params":["0x2fb5949a6a1dc03b6d59d4723bc913230a155d0d", "0x0564b25c8fcd6766f672d43252c8ee2597ad6c7a35315cf13e3b4d00bafc2e9f"],
"id":1
}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment