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
| Setting | Purpose | Where it comes from |
|---|---|---|
| apiEndpoint | Connect to the hazBase HTTP API | https://api.hazbase.com / Confirm a dedicated test endpoint with your provider |
| chainId | Identifies the target chain | The first read uses 11155111 (Sepolia). Confirm operational support per environment. |
| RPC_URL | Connect ethers to the chain | Obtain from a provider for the chosen network |
| Contract address | The deployed contract you will operate | Your deployment receipt or environment address registry |
| Client key / Origin | App identity and feature access | Arrange 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.