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?
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?