Sandbox & Environments
Test environments, API endpoints, and how to develop safely.
Available Environments
DUAL provides two environments for development and production use:
| Environment | API Base URL | Cost | Rate Limit | Data Persistence |
|---|---|---|---|---|
| Sandbox | https://sandbox.blockv-labs.io | Free | 1,000 calls/day | Resets weekly |
| Production | https://blockv-labs.io | Paid (usage-based) | Based on plan | Persistent |
Sandbox Features
The sandbox environment is fully functional and ideal for development and testing:
- Pre-loaded demo organization ready to use immediately
- Sample templates for common use cases (real estate, tickets, loyalty)
- Test wallet credentials:
email: sandbox@dual.io,password: sandbox123 - Pre-populated API keys with limited scope for safe testing
- 1,000 free API calls per day (shared across your team)
- Full webhook support with test payload delivery
- Access to all developer tools and debugging features
Sandbox Limitations
The sandbox has a few limitations to note:
- No real on-chain anchoring — State is simulated; no fingerprints are actually written to Ethereum
- Weekly data reset — All data (templates, objects, wallets) is cleared every Sunday at midnight UTC
- Test webhooks — Webhooks fire but with test payloads; real event data is not included
- No payment processing — Billing and subscriptions are disabled in sandbox
- Rate limits enforced — You'll hit limits faster than production to encourage efficient API usage
Always move to production before launching a real application. Sandbox is for development only.
Switching Environments
Configure your SDK and CLI to use different environments:
SDK Configuration
import { DualClient } from '@dual/sdk';
// Development: Sandbox
const devClient = new DualClient({
apiUrl: 'https://sandbox.blockv-labs.io',
apiKey: process.env.SANDBOX_API_KEY,
orgId: process.env.SANDBOX_ORG_ID,
});
// Production: Mainnet
const prodClient = new DualClient({
apiUrl: 'https://blockv-labs.io',
apiKey: process.env.PROD_API_KEY,
orgId: process.env.PROD_ORG_ID,
});
// Or use environment variables
const client = new DualClient({
apiUrl: process.env.DUAL_API_URL,
apiKey: process.env.DUAL_API_KEY,
orgId: process.env.DUAL_ORG_ID,
});
CLI Configuration
// For sandbox
dual config set api-url https://sandbox.blockv-labs.io
dual config set api-key
// For production
dual config set api-url https://blockv-labs.io
dual config set api-key
Environment Variables
// .env.development
DUAL_API_URL=https://sandbox.blockv-labs.io
DUAL_API_KEY=sk_sandbox_...
DUAL_ORG_ID=org_sandbox_...
// .env.production
DUAL_API_URL=https://blockv-labs.io
DUAL_API_KEY=sk_prod_...
DUAL_ORG_ID=org_prod_...
Test Credentials & Data
Pre-loaded data available in sandbox for immediate testing:
| Resource | ID | Notes |
|---|---|---|
| Demo Organization | org_sandbox_demo | Full permissions for testing |
| Real Estate Template | io.example.property::v1 | Pre-created with sample schema |
| Test Wallet | wallet_sandbox_test | Email: sandbox@dual.io |
| Sample Object | obj_sandbox_property_1 | Test real estate listing |
Best Practices
Follow these patterns for safe and efficient development:
- Always develop against sandbox first. Test all flows, error handling, and edge cases before touching production.
- Use environment variables. Never hardcode API URLs, keys, or org IDs. Inject them at runtime.
- Test webhook handlers with sandbox payloads. Download example webhooks from the dashboard and verify signature validation.
- Implement proper error handling. Sandbox surfaces the same errors as production; test your retry logic.
- Monitor API usage. Check your daily quota in the dashboard; plan API-heavy operations during off-peak hours.
- Document your test data. Keep notes on which test credentials/objects you're using for which features.