web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

Proposal to Rename `recoverTransaction()`, `recover()` and `sign()` for clarity

Open SantiagoDevRel opened this issue 2 years ago • 0 comments

  1. Proposal to rename accounts.recoverTransaction() to accounts.recoverSignerFromTx()
  2. Proposal to rename accounts.recover() to accounts.recoverSignerFromMsg()
  3. Proposal to rename accounts.sign() to accounts.signMsg()

The reason is that the functions are actually recovering the signer, not the entire transaction, this change could enhance clarity and align the function name with its purpose.

By adopting these name changes, the functions will become more intuitive and straightforward: signMsg --> recoverSignerFromMsg signTransaction --> recoverSignerFromTx

SantiagoDevRel avatar Nov 28 '23 18:11 SantiagoDevRel