Allow passing fetchOptions (headers) per request #3793
Unanswered
tunnckoCore
asked this question in
Idea / Feature Request
Replies: 1 comment
-
@jxom ping pong |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Heya there.
I want to ask or propose adding option like
fetchOptions
oronFetchRequest
to some of the actions likeclient.sendTransaction(args, options)
, or something likesetRpc(url, fetchOptions)
that would be only for the action's request.The idea is, that i want to deploy per-user RPCs, and would need to set different rpc url per user. and auth headers.
Now, you can say.. well, create a client per user cuz we can put headers and etc there. Yeah, but that's not desirable, at the very least.. maybe.. performance. But if not that then.. we cannot always define clients wherever we want, usually it happens in wagmi, and usually it's "at the top"/root of everything or the app.
I want it to be easily integrateable without too much headache, they can just continue to use the whole stack but when a transaction is requested or signing a message, then they (third parties) can pass auth headers and etc.
The other variant is to use
ox
and to build eip1193 provider, which then can be passed withcustom()
in viem/wagmi. Thought about that cuz i love that library even more than wagmi and viem.Beta Was this translation helpful? Give feedback.
All reactions