Skip to main content

default_config_with_ohttp

Function default_config_with_ohttp 

Source
pub fn default_config_with_ohttp(
    environment: &Environment,
    rpc_url: Option<String>,
    region: Option<Region>,
) -> Result<Config, WalletKitError>
Expand description

Builds a Config for the given Environment using OHTTP endpoints.

Opt-in alternative to default_config for consumers that want their indexer/gateway traffic to flow through the Cloudflare OHTTP relay. The indexer endpoint follows the caller’s region; the gateway endpoint is always pinned to the US OHTTP relay because the world-id-gateway is centralised in the US cluster.

§Errors

Returns WalletKitError if the configuration cannot be constructed (e.g. invalid RPC URL).