Testing and Sandbox
This section explains how to configure and use the SDK’s testnet environment, covering environment setup, testnet-specific parameters, and how to validate integrations before deploying to mainnet.
Environment Selection
The SDK supports multiple environments. Use Env.testnet for development:
import { createConfig, Env } from '@lombard.finance/sdk';
const config = createConfig({
env: Env.testnet,
partner: {
partnerId: 'test', // Bypasses captcha in non-prod environments
},
providers: {
evm: () => window.ethereum,
},
});Environment Details
| Environment | Network | Chains | Use Case |
|---|---|---|---|
Env.prod | Mainnet | Ethereum, Arbitrum, Base, etc. | Production |
Env.testnet | Testnet | Sepolia | Development and testing |
Env.dev | Testnet | Sepolia | Internal development |
Testnet Faucets
To test on testnets, you’ll need:
- Sepolia ETH — For gas fees on Ethereum Sepolia
- Signet BTC — For BTC staking tests
Switching Environments
Use environment variables to switch between environments at runtime:
import { createConfig, Env } from '@lombard.finance/sdk';
const env = process.env.LOMBARD_ENV === 'production' ? Env.prod : Env.testnet;
const config = createConfig({
env,
partner: {
partnerId: env === Env.prod ? 'YOUR_PARTNER_ID' : 'test',
},
providers: {
evm: () => window.ethereum,
},
});Note: Use
partnerId: 'test'in non-production environments to bypass captcha. See Partners for production setup.
Last updated on