Fee Controller
Pay transaction fees for other accounts.
High level overview of creating paying transaction fees for another user:
Context
Alice is generating transaction proofs that will be sent to the sequencer by Bob. Bob will pay the transaction fees to process Alice's transaction proofs.
Process
- Alice sets up the transaction creation controller.
registerController = aztecSdk.createRegisterController(...)
- Alice generates the transaction proof using the controller.
registerController.createProof()
- Alice exports the proof data and sends it to Bob.
proofTxs = registerController.exportProofTxs()
- Bob queries the Aztec client for the current transaction fee rate.
fee = aztecSdk.getProofTxsFees(assetId, proofTxs)
- Bob creates a FeeController, generates the proof and sends the transactions to the sequencer.
feeController = aztecSdk.createFeeController(alicesUserId, bobsSigner, proofTxs, fee)
feeController.createProof()
feeController.send()