- Notifications
You must be signed in to change notification settings - Fork2
License
smartcontractkit/cre-sdk-typescript
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Build decentralized workflows that combine off-chain computation with on-chain execution using the Chainlink Runtime Environment (CRE) SDK.
The Chainlink Runtime Environment enables developers to create workflows that:
- Fetch data from external APIs with built-in consensus
- Interact with blockchains across multiple networks
- Coordinate complex operations with triggers and scheduling
- Aggregate results from multiple data sources reliably
Perfect for building price feeds, automated trading strategies, cross-chain applications, and any workflow requiring reliable off-chain computation with on-chain execution.
This monorepo contains:
- @chainlink/cre-sdk - Main SDK for building CRE workflows
- @chainlink/cre-sdk-examples - Example workflows and patterns
- @chainlink/cre-sdk-javy-plugin - WebAssembly compilation tools
// Execute every 5 minutesconstcron=newcre.capabilities.CronCapability();cron.trigger({schedule:"0 */5 * * * *"});
// Fetch with built-in consensus across nodesconstprice=awaitcre.runInNodeMode(fetchPriceData,consensusMedianAggregation())(config);
// Read/write to any EVM chainconstevmClient=newcre.capabilities.EVMClient(undefined,BigInt("5009297550715157269")// Ethereum Sepolia);
- 🔄 Multi-Node Consensus - Aggregate data from multiple sources reliably
- ⚡ Cross-Chain Support - Work with 200+ blockchain networks
- 📊 Built-in Aggregation - Median, mean, and custom consensus mechanisms
- 🛡️ Type Safety - Full TypeScript support with Zod validation
- 🎯 Event-Driven - Cron triggers, HTTP webhooks, and custom events
- 🔗 Viem Integration - Native support for Ethereum interactions
🏦 DeFi Applications
- Automated yield farming strategies
- Cross-chain arbitrage bots
- Dynamic rebalancing portfolios
- Liquidation protection systems
📊 Data Oracles
- Custom price feeds with multiple sources
- Weather data aggregation
- Sports scores and betting odds
- Real-world asset tokenization data
🔗 Cross-Chain Operations
- Bridge monitoring and alerts
- Multi-chain governance voting
- Cross-chain token transfers
- Unified liquidity management
This monorepo uses:
- Bun - Package manager and TypeScript runtime
- Biome - Formatting and linting
- Javy - WebAssembly compilation
# Clone with submodules (for protobuf definitions)git clone --recursive https://github.com/smartcontractkit/cre-sdk-typescriptcd cre-sdk-typescript# Install dependenciesbun install# Build everythingbun build
# Developmentbun build# Build all packages using turbobun check# Format and lint code using biomebun format# Format code using biomebun lint# Lint code using biomebun typecheck# Type check all packages# Package-specific builds (run from packages/cre-sdk/)bun generate:proto# Generate types from protobufbun generate:chain-selectors# Update chain selector typesbun generate:sdk# Generate all SDK types and code
For detailed development setup, see individual package READMEs:
This project uses Git submodules for external dependencies:
# Clone with submodulesgit clone --recursive https://github.com/smartcontractkit/cre-sdk-typescript# Or initialize submodules after cloninggit submodule update --init --recursive# Update submodules to latestgit submodule update --remote
Current submodules:
chainlink-protos
- Protocol buffer definitions
See LICENSE in individual package directories.
About
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors9
Uh oh!
There was an error while loading.Please reload this page.