Skip to main content

Integration Guide

This guide walks you through integrating the CRYMBO Oracle into your existing systems. Whether you use the REST API, SDK, or webhook-based integration, this document covers the complete technical flow.

Integration Options

MethodBest ForComplexity
REST APIFull control, custom implementationsMedium
Oracle SDK (@crymbo/oracle-sdk)Fastest integration, pre-built methodsLow
WebhooksEvent-driven systems, real-time notificationsLow
Smart Contract HooksOn-chain native compliance enforcementHigh

Prerequisites

Before integrating, ensure you have:

Quick Start (SDK)

npm install @crymbo/oracle-sdk
const { CrymboOracle } = require('@crymbo/oracle-sdk');

const oracle = new CrymboOracle({
apiKey: 'YOUR_API_KEY',
environment: 'production' // or 'sandbox'
});

// Check compliance status before executing a transaction
const result = await oracle.validateTransaction({
senderWallet: '0x...',
receiverWallet: '0x...',
amount: '1000',
asset: 'USDC',
chain: 'ethereum'
});

if (result.status === 'compliant') {
// Proceed with transaction
} else {
// Handle compliance failure
}

API Authentication

All API requests require authentication via API key in the header:

curl -H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
https://api.crymbo.link/v1/oracle/validate

Webhook Setup

Configure webhooks to receive real-time notifications:

{
"url": "https://your-domain.com/webhooks/crymbo",
"events": [
"identity.request.received",
"identity.exchange.completed",
"compliance.check.passed",
"compliance.check.failed",
"transaction.validated"
]
}

Testing in Sandbox

The sandbox environment mirrors production but uses testnet tokens and simulated identity data. Use it to:

  • Test your integration end-to-end
  • Validate identity exchange flows
  • Verify webhook delivery
  • Test error handling

Sandbox base URL: https://sandbox-api.crymbo.link/v1/

Next Steps