Skip to content
    hazBasehazBaseDocs
    IMPLEMENTATION GUIDE

    Environments & connections

    The HTTP API endpoint, blockchain RPC and contract addresses are separate settings. Confirm which connections your integration needs.

    Keep connection settings separate

    SettingPurposeWhere it comes from
    apiEndpointConnect to the hazBase HTTP APIhttps://api.hazbase.com / Confirm a dedicated test endpoint with your provider
    chainIdIdentifies the target chainThe first read uses 11155111 (Sepolia). Confirm operational support per environment.
    RPC_URLConnect ethers to the chainObtain from a provider for the chosen network
    Contract addressThe deployed contract you will operateYour deployment receipt or environment address registry
    Client key / OriginApp identity and feature accessArrange access for the relevant feature. Installing the SDK does not issue these values.

    Switch environments

    javascript
    import { createHazbaseWalletClient } from "@hazbase/kit/wallet";
    
    const wallet = createHazbaseWalletClient({
      apiEndpoint: process.env.HAZBASE_API_ENDPOINT,
    });

    The Day 1 sample accepts HAZBASE_API_ENDPOINT and CHAIN_ID environment variables, and uses defaults when they are not set.

    Keys and permissions

    • Use a Provider for contract reads. Connect a Signer only for writes.
    • Do not place private keys in public environment variables such as VITE_*, source code or repositories.
    • Validate roles, transfer conditions and pause behavior in an isolated environment before handling real assets.