Testing & Sandbox Environment

Localcredit provides a full sandbox environment for developers to test integrations safely before going live. The sandbox mirrors production functionality but uses mock data, testnet tokens, and isolated scoring – ensuring no real user data or funds are affected.Key Features of the Sandbox

  • Isolated Scoring: Scores are generated from mock signals and do not impact production models.

  • Test $CREDIT: Pre-funded test wallets with unlimited $CREDIT for queries and subscriptions.

  • Mock Verifications: Simulated email/phone/X/traditional credit/KYC flows return instant proofs.

  • Testnet Oracles: On-chain queries work on TON testnet and Sepolia (EVM).

  • No Real Fees: All API calls and oracle requests are free in sandbox.

Getting Started

  1. Create Developer Account Visit docs.localcredit.org/dashboard and sign up (Telegram login or wallet connect).

  2. Switch to Sandbox Mode In your dashboard, toggle “Environment: Sandbox” (default for new keys).

  3. Get Sandbox API Key Automatically generated – separate from production key.

  4. Test $CREDIT Wallet

    • TON Testnet: Use provided faucet wallet or request test tokens.

    • EVM (Sepolia): Faucet link provided in dashboard.

SDK Configuration for Sandboxtypescript

import { Localcredit } from '@localcredit/sdk-js';

const lc = new Localcredit({
  apiKey: 'your_sandbox_api_key',
  environment: 'test'  // switches base URL and mock mode
});

All SDK methods work identically – getScore() returns realistic mock results based on simulated user proofs.On-Chain Sandbox Contracts

  • TON Testnet Oracle: kQ...test (address in dashboard)

  • Sepolia Oracle: 0x...test (verified on Etherscan testnet)

Use the same Solidity/Tact code as production – just point to testnet addresses.Simulating User Flows

  • New User Redirect: Deep links work with ?startapp=test_mode for instant mock onboarding.

  • Mock Boosts: Dashboard in sandbox auto-applies random boosts for testing.

  • Outcome Reporting: Reports are logged but discarded after testing.

Common Test Scenarios

  • User with score 85 (excellent repayments + full verifications)

  • User with score 45 (wallet only, some negative signals)

  • Edge cases: Invalid proofs, rate limit exceeds, insufficient test funds

Switching to Production

  1. Generate a production API key in dashboard.

  2. Update SDK: environment: 'production'

  3. Fund your real wallet with $CREDIT.

  4. Deploy to mainnet/TON mainnet.

All code and flows remain the same – just the environment changes.Support for Testing

  • Detailed logs in developer dashboard for every sandbox request.

  • Example test users and proofs provided.

  • Dedicated sandbox support channel in Telegram/Discord.

The sandbox lets you build, test, and iterate confidently with realistic data before touching production. Most developers go live within days of sandbox testing.

Last updated