A TypeScript SDK for interacting with YieldSpace markets on Celo Mainnet.
- core - Core SDK functionality for pool interactions and protocol data
- react - React adaptor with hooks and components
- math - YieldSpace AMM math calculations
- contracts - TypeChain-generated contract wrappers
- redux - Redux adaptor for state management
- (cli) - Command-line interface tools
- (utils) - Shared utilities
- Celo Mainnet (Chain ID: 42220) ✨
Bun is required for this SDK. Install it first:
curl -fsSL https://bun.sh/install | bash💡 Why Bun? 4x faster installs, native TypeScript support, built-in tools. Learn more
Add to your frontend project's package.json:
{
"dependencies": {
"@numo-engine/core": "github:numo/sdk#main:packages/core",
"@numo-engine/math": "github:numo/sdk#main:packages/math",
"ethers": "^5.7.0"
}
}Then:
bun installimport { ethers } from 'ethers';
import { yieldFunctions, yieldObservables } from '@numo-engine/core';
// Connect to Celo Mainnet
const provider = new ethers.providers.JsonRpcProvider('https://forno.celo.org');
yieldFunctions.updateConfig({
defaultChainId: 42220,
defaultProviderMap: new Map([[42220, () => provider]]),
});
// Subscribe to pool data
yieldObservables.seriesø.subscribe(pools => {
console.log('Celo pools:', pools);
});- basic react app
- ( cli )
curl -fsSL https://bun.sh/install | bashbun install
bun run clean
bun run bootstrap
bun run compilebun run compilebun startlerna publishbun version --patch
bun publishIn the SDK package directory:
bun run compile
bun linkIn your frontend app:
bun link @numo-engine/core
bun install