Skip to main content

RpcClientProvider

Trait RpcClientProvider 

pub trait RpcClientProvider: Send + Sync {
    // Required method
    fn rpc_client(
        &self,
        service_name: &str,
        signing_key: SigningKey,
        token: Option<String>,
    ) -> Result<Arc<dyn RpcClient>, Error>;
}
Expand description

Application-supplied construction seam for generated service clients.

The contract/client crates depend only on this trait; deployment-specific resolver authority (for example, checkpoint-backed Discovery) implements it in the service/application crate. This keeps production endpoint discovery out of permissively licensed SDK packages while still allowing callers to construct typed clients from a single provider.

Required Methods§

fn rpc_client( &self, service_name: &str, signing_key: SigningKey, token: Option<String>, ) -> Result<Arc<dyn RpcClient>, Error>

Build an object-safe RPC client bound to service_name.

Implementors§