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?

2 Answers 2


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

if you use the raw tx hash from etherscan you can get the v,r,s. for this raw tx example:


in that hash, look for "a0".

0xf86c01850c4b201000825208949cbfd6ebdb9cfcccd6b043f43e524583486d455e880490283b23ec8f768025 a067da959a6d114d42016b5fb43ff8ae018efe6e4c784d40dfb2f2aad8fb2d4f6c a00b019b1e457b592e5bfd553e3b73742de625c7b65145494a57dbca17e5e9d842

1 byte, 2 chars before first "a0" is the v value:


32 bytes after first "a0" is the r value

     a0 =160

     a0-0x80=160-128=32 bytes


32 bytes after second "a0" is the s value


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.