Open esolskjaer opened 4 weeks ago
@esolskjaer is attempting to deploy a commit to the coral-xyz Team on Vercel.
A member of the Team first needs to authorize it.
Implemented your suggestion, but this still keeps it incompatible with normal keypairs in some cases unfortunately, look in client/example/blocking.rs
for example. Reason being that from within functions receiving a Client<C>
there is no fixed definition for what C
is in that scope, meaning if we want to add signers these also have to be the generic type C
.
One way I'd suggest to fix this would be to have two kinds of RequestBuilder
- one with dyn Signer
like we have it right now, and one with a second generic that can be set by the user for the signers. Wdyt @acheroncrypto ?
We have
The fact that
payer
inRequestBuilder
is kept generic is very useful, as that makes it easy to extend functionality (e.g. when we need a threadsafe signer when using tokio like in my issue here https://github.com/coral-xyz/anchor/issues/3004). On the flip side, the fact thatsigner
is explicitly constrained toSigner
messes this all up, which is the problem I ran into in my issue.This PR changes signers to be a vec of
C
. I'm opening it as a draft PR for now, as I don't believe this is the perfect solution, but I do think it is a step in the right direction:C
, as this would require allSigners
to be of the exact same type.Maybe having a separate
RequestBuilder
that allows for this might be a solution, although idk how confusing that would be. Anyway, would love to get your take on this @acheroncrypto