rampkit-latam-core
v1.0.1
Published
Enterprise Multi-Anchor Router SDK for Stellar — Unified API routing for Etherfuse, Manteca, and Koywe fiat ramps in LATAM
Maintainers
Readme
rampkit-latam-core
Enterprise Multi-Anchor Router SDK for Stellar — Unified API routing for Etherfuse, Manteca, and Koywe fiat ramps in Latin America.
Executive Summary
rampkit-latam-core is an open-source, enterprise-grade TypeScript SDK built for developers integrating Latin American financial payment rails onto the Stellar network.
Traditionally, supporting regional fiat payment methods—such as PIX (Brazil), SPEI (Mexico), Khipu (Chile), and ACH (USA)—requires reading disparate Anchor documentation (SEP-24 / SEP-6) and maintaining custom integration code for vendors like Etherfuse, Manteca, and Koywe.
rampkit-latam-core abstracts this fragmentation into a single Multi-Anchor Smart Router, enabling developers to fetch optimal quotes in parallel, execute transactions, and monitor real-time order states with unified type definitions.
Core Features
- Multi-Anchor Smart Rate Routing: Concurrently queries quotes from Etherfuse, Manteca, and Koywe, ordering results by lowest fee structure and best exchange rates.
- Etherfuse Real API Integration: Fully compliant adapter connected to the live Etherfuse Sandbox API (
POST /ramp/order,GET /ramp/orders,GET /ramp/bank-accounts). - Stellar Horizon Transaction Hash Resolver: Automatically resolves Base58 signature strings into 64-character hexadecimal hashes for direct Stellar Expert Explorer lookup.
- Standardized SEP Schemas: Unified TypeScript interfaces across asset definitions, payment rails, quote payloads, and status responses.
- Hybrid Sandbox Mode: Simulates fiat bank transfers while executing real on-chain ledger operations on Stellar Testnet.
Installation
Install via npm, yarn, or pnpm:
npm install rampkit-latam-core @stellar/stellar-sdkyarn add rampkit-latam-core @stellar/stellar-sdkpnpm add rampkit-latam-core @stellar/stellar-sdkDeveloper Guide & Code Examples
1. Initializing the Router Engine
import { RampRouter } from 'rampkit-latam-core';
export const router = new RampRouter({
network: 'testnet', // 'testnet' | 'mainnet'
anchors: {
etherfuse: {
apiKey: process.env.ETHERFUSE_API_KEY!,
sandbox: true,
},
manteca: {
apiKey: process.env.MANTECA_API_KEY!,
sandbox: true,
},
koywe: {
apiKey: process.env.KOYWE_API_KEY!,
sandbox: true,
},
},
});2. Querying Multi-Anchor Quotes in Parallel
// Fetch live quotes across all supported anchors simultaneously
const quotes = await router.getQuotes({
direction: 'on-ramp',
sourceAsset: 'BRL',
destAsset: 'USDC',
amount: '100',
country: 'BR',
});
// Returns an array sorted by best payout rate
console.log('Top Recommended Quote:', quotes[0]);3. Executing an On-Ramp Order & Generating Payment QR
const order = await router.executeOrder({
quoteId: quotes[0].id,
anchorId: quotes[0].anchorId,
publicKey: 'GBAEGEMNJHS5KP5CORUKHYITFI562KK3WP3CO7YRU7B3522MSC6UZ22P',
});
console.log('PIX Payment Instructions:', order.paymentInstructions);4. Polling Live Order Status & Horizon Resolution
const status = await router.getOrderStatus(order.id, 'etherfuse');
console.log('Status:', status.status); // 'completed' | 'pending' | 'failed'
console.log('Stellar Explorer URL:', status.explorerUrl);Regional Corridor Compatibility
| Country | Currency | Payment Rail | Anchors Handled | Supported Tokens | Yield Capability | |---------|----------|--------------|-----------------|------------------|------------------| | Brazil | BRL | PIX | Etherfuse, Manteca | USDC, TESOURO | 13.25% APY | | Mexico | MXN | SPEI | Etherfuse, Koywe | USDC, CETES | 10.50% APY | | Chile | CLP | Khipu | Koywe | USDC | — | | USA | USD | ACH / Wire | Etherfuse | USDC, USTRY | 4.80% APY |
API Reference Summary
| Method | Parameters | Return Type | Description |
|--------|------------|-------------|-------------|
| getQuotes(params) | QuoteRequest | Promise<RampQuote[]> | Fetches live quotes from all anchors in parallel |
| executeOrder(params) | OrderRequest | Promise<RampOrder> | Submits order to selected anchor and returns payment info |
| getOrderStatus(id, anchor) | string, string | Promise<OrderStatusResponse> | Checks current order state and resolves 64-hex transaction hash |
| getYieldBearingAssets() | — | Promise<AnchorAsset[]> | Returns tokenized sovereign debt assets (TESOURO, CETES, USTRY) |
Related Resources
- UI Kit:
rampkit-latam-ui - Live Production Demo: https://rampkit-latam.vercel.app
- Repository: GitHub - diegoucampos-tech/rampkit-latam
License
MIT © RampKit LATAM Team
