# Parameters

## `authentication_rpc_url` (string)

RPC URL for the Oasis Sapphire network endpoint. Used for authentication contract calls via eth_call method.

Supported Networks:

- Oasis Sapphire Testnet: https://testnet.sapphire.oasis.dev

- Oasis Sapphire Mainnet: https://sapphire.oasis.io

Environment Variable: AUTHENTICATION_RPC_URL

Default: "https://testnet.sapphire.oasis.dev"

### Setting the `authentication_rpc_url` parameter

    ...
    modparam("auth_web3", "authentication_rpc_url", "https://sapphire.oasis.io")
    ...

## `authentication_contract_address` (string)

Smart contract address on Oasis Sapphire that handles authentication. Must implement authenticateUser() and getWalletAddress() functions.

Required Contract Interface:

    function authenticateUser(
        string memory username,
        string memory realm,
        string memory method,
        string memory uri,
        string memory nonce,
        uint8 algorithm,
        bytes memory response
    ) public view returns (bool)

    function getWalletAddress(
        string memory username
    ) public view returns (address)

Environment Variable: AUTHENTICATION_CONTRACT_ADDRESS

Default: "0xE773BB79689379d32Ad1Db839868b6756B493aea"

### Setting the `authentication_contract_address` parameter

    ...
    modparam("auth_web3", "authentication_contract_address", "0x1234567890abcdef1234567890abcdef12345678")
    ...

## `ens_rpc_url` (string)

RPC URL for ENS queries. Enables multi-network authentication where ENS is on Ethereum while authentication contracts are on Oasis Sapphire. If not set, uses authentication_rpc_url for ENS queries.

Common Endpoints:

- Ethereum Mainnet: https://eth.drpc.org

- Ethereum Sepolia: https://ethereum-sepolia-rpc.publicnode.com

Environment Variable: ENS_RPC_URL

Default: "https://ethereum-sepolia-rpc.publicnode.com"

### Setting the `ens_rpc_url` parameter

    ...
    modparam("auth_web3", "ens_rpc_url", "https://eth.drpc.org")
    ...

## `ens_registry_address` (string)

ENS Registry contract address. Standard address on Ethereum mainnet and testnets.

Environment Variable: ENS_REGISTRY_ADDRESS

Default: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"

### Setting the `ens_registry_address` parameter

    ...
    modparam("auth_web3", "ens_registry_address", "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e")
    ...

## `contract_debug_mode` (integer)

Enable debug logging for authentication and ENS operations. Warning: May log sensitive authentication data.

Values:

- 0 - Debug disabled

- 1 - Debug enabled

Environment Variable: CONTRACT_DEBUG_MODE

Default: 0

### Setting the `contract_debug_mode` parameter

    ...
    modparam("auth_web3", "contract_debug_mode", 1)
    ...

## `rpc_timeout` (integer)

Timeout in seconds for RPC calls to blockchain networks. Includes both authentication and ENS queries.

Recommended Values:

- 5-10s - Development/testing

- 15-30s - Production

Environment Variable: RPC_TIMEOUT

Default: 10

### Setting the `rpc_timeout` parameter

    ...
    modparam("auth_web3", "rpc_timeout", 15)
    ...