I am trying to create a function which can be used to get the v, r, s parameters (ECDSA) of the signature.
So i am thinking to pass a random tx hash from etherscan and it will return v,r,s parameters of the signed tx.

Can somebody please help me in this?


Unfortunately it seems both web3.js v0.20 and v1.0 will strip r, s, v parameters.

But if you use the JSON RPC directly it return those values.

In the wiki https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_gettransactionbyhash they gave an example using curl:

// Request
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"],"id":1}'

// Result
    ... // some other data

    "v":"0x25", // 37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.