1) A VoidSigner is a simple Signer which cannot sign.
It is useful as a read-only signer, when an API requires a Signer as a parameter, but it is known only read-only operations will be carried.
address = "0x8ba1f109551bD432803012645Ac136ddd64DBA72"
signer = new ethers.VoidSigner(address, provider)
2) Wallet
The Wallet class inherits Signer and can sign transactions and messages using a private key as a standard Externally Owned Account (EOA).
3) JsonRpcSigner
A JsonRpcSigner is a simple Signer which is backed by a connected JsonRpcProvider
jsonRpcProvider.getSigner( [ addressOrIndex ] ) ⇒ JsonRpcSignersource
Returns a JsonRpcSigner which is managed by this Ethereum node, at addressOrIndex. If no addressOrIndex is provided, the first account (account #0) is used.
The wallet knows its own private key. The JSON RPC signer sends a request to the provider, which responds with a signed request. The JSON RPC signer does not see the key itself.
So a wallet is capable of signing transactions directly, whereas an RPC signer can only request that the provider sign transactions.
Apr 20, 2022, 4:22 PM
So to sign that message directly I hafta use Wallet, I could do that via contract if it had the necessary method
https://github.com/ethers-io/ethers.js/blob/master/packages/providers/src.ts/json-rpc-provider.ts#L141
But signMessage exists....
But signMessage exists....
Apr 20, 2022, 5:02 PM