-
Notifications
You must be signed in to change notification settings - Fork 125
Description
I've had a few people ask about how to do this and I think it'd be a good example to demonstrate signers
The problem people are trying to solve is signing a transaction using a browser wallet, and then their server, perhaps with the latter as a fee payer.
The signers API should actually make this very easy, you just need to implement a TransactionPartialSigner that passes the transaction to your fee payer signing API
Then the signers logic will sign with the wallet (a modifying signer) first, and then call the server second, passing it the partially signed transaction from the wallet.
I think it'd be worth writing a very simple react example app that demonstrates this pattern. We don't actually need to implement a server to show this, just writing a TransactionPartialSigner that calls something else to sign for it should be enough to demonstrate how it works.