Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Ethers.js EXT examples for signRecover #510

Merged
merged 4 commits into from
Oct 6, 2023

Conversation

nohkwak
Copy link
Member

@nohkwak nohkwak commented Sep 18, 2023

  • signRecover for transaction (legacy, pubkey, multisig, rolebased)
  • signRecover for message (legacy, pubkey, multisig, rolebased)

console.log(senderTxHashRLP);
console.log(wallet.decodeTxFromRLP(senderTxHashRLP));

const recoverAddr = await provider.send("klay_recoverFromTransaction", [senderTxHashRLP, "latest"]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change it to the web3rpc function

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, through another PR, we will test and update the two lines below.

const { Wallet, parseKlay, TxType } = require("../../dist/src");
->
const { Wallet, parseKlay } = require("@klaytn/ethers-ext");

const recoverAddr = await provider.send("klay_recoverFromTransaction", [senderTxHashRLP, "latest"]);
->
const recoverAddr = await provider.klay.recoverFromTransaction(senderTxHashRLP, "latest");

@kjeom kjeom self-requested a review October 4, 2023 15:27
@nohkwak nohkwak merged commit 529e264 into klaytn:dev Oct 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants