1

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?

0

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
    "r":"0x1b5e176d927f8e9ab405058b2d2457392da3e20f328b16ddabcebc33eaac5fea",
    "s":"0x4ba69724e8f69de52f0125ad8b3c5c2cef33019bac3249e2c0a2192766d1721c"
  }
}

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.