Configuration
SDK

Configuration

Initializing SplitPayContractClient with RPC endpoints and network passphrases.

Configure RPC endpoints and contract identifiers for the SplitPay client.

Initializing the Client

typescript
import { SplitPayContractClient } from "@/lib/contract/splitpay";
// Initialize with a specific contract ID or fall back to environment config
const client = new SplitPayContractClient(
"CCOXHXGFTYVRRCJ7U32QZJCWXDTNQLRMDS3IAGW5MGFEWOUEXNYYKLHF"
);

Overriding Contract ID Dynamically

The client supports runtime overrides (persisted to localStorage in browser environments):

typescript
client.setContractId("CNEWCONTRACTID123...");
const activeId = client.getContractId();