This could either be done via function overloading or new functions directly.
I guess it's also worth considering then publishing a separate ethers or viem cow-sdk package because I see the SDK is currently referencing ethers as a peer dependency.
If you can comment some pointers on which design you'd prefer, I'd be happy to open a PR.
viem is gaining traction over ethers. I think it would be beneficial for SDK adoption to support both ethers and viem.
You could accept a viem
walletClient
oraccount
as well as an ethersSigner
for order signing: https://github.com/cowprotocol/cow-sdk/blob/main/src/order-signing/utils.tsThis could either be done via function overloading or new functions directly.
I guess it's also worth considering then publishing a separate ethers or viem cow-sdk package because I see the SDK is currently referencing ethers as a peer dependency.
If you can comment some pointers on which design you'd prefer, I'd be happy to open a PR.