eth-permit icon indicating copy to clipboard operation
eth-permit copied to clipboard

Add support for local signer

Open ryanc414 opened this issue 2 years ago • 0 comments

Hey, this looks like a really useful library as getting permit txs right can be confusing!

It seems to me that the library is designed to be used on the client-side in conjunction with a remote signer. However sometimes it is useful to sign transactions from the backend, using e.g. https://github.com/MetaMask/eth-sig-util. It would be useful if there was a function within eth-permit which constructed the typedData and returned it without signing, allowing the calling code to decide how it should be signed.

I think this could be achieved by exporting the createTypedERC2612Data function as public, and similar for the Dai version. What do you think?

ryanc414 avatar Apr 26 '22 10:04 ryanc414