Opening up a draft PR to discuss adding flashbots-style auth to the rpc client. This implementation is based on a tower middleware responsible for signing request bodies and adding the signature to a header. I've also added an example showing how to set up the rpc-client with signing middleware, and sending a request.
A few questions:
should the http client with the signing middleware be abstracted into a separate "authed-client" implementation, or should we expect user to manually set up the signing middleware (like it's done in the example) whenever they want to use the client?
where should the layer implementation live? I've added it to a auth.rs file in the rpc-api crate, but not sure if this is right.
should the auth layer be an optional dependency behind a feature?
Opening up a draft PR to discuss adding flashbots-style auth to the rpc client. This implementation is based on a tower middleware responsible for signing request bodies and adding the signature to a header. I've also added an example showing how to set up the rpc-client with signing middleware, and sending a request.
A few questions:
auth.rs
file in the rpc-api crate, but not sure if this is right.