openoracle-sdk-js
Version:
OpenOracle Node.js SDK - Intelligent Oracle Routing with Multiple LLM Providers
108 lines (107 loc) • 3.52 kB
TypeScript
/**
* OpenOracle SDK - Intelligent Oracle Routing for Prediction Markets
*
* A comprehensive Node.js SDK for building prediction markets with intelligent
* oracle selection and data verification.
*
* Key Components:
* - OracleRouter: Intelligent routing to optimal oracle providers
* - TwitterParser: Social media integration and analysis
* - ReActAgent: AI-driven decision making with explainable reasoning
* - MultiOracleAggregator: Consensus mechanisms across oracle networks
* - SchemaValidator: Type-safe data validation
*
* @example
* ```typescript
* import { OracleRouter, TwitterParser, OracleConfig } from 'openoracle-sdk'
*
* // Initialize the router with API keys
* const config = OracleConfig.fromEnv()
* const router = new OracleRouter(config)
*
* // Route a question to the best oracle
* const response = await router.routeQuestion(
* "Will BTC exceed $100k by end of 2024?"
* )
* console.log(`Selected: ${response.oracleProvider}`)
* console.log(`Confidence: ${response.confidence}`)
*
* // Parse Twitter content for prediction markets
* const twitter = new TwitterParser(config)
* const prediction = await twitter.createPredictionFromTweet(tweetData)
* ```
*/
export declare const VERSION = "0.1.0";
export declare const AUTHOR = "OpenOracle Team";
export declare const LICENSE = "MIT";
export declare const DESCRIPTION = "Intelligent Oracle Routing for Prediction Markets";
export { OracleRouter } from './core/router';
export { OracleConfig, getConfig, setConfig } from './core/config';
export { OracleClient } from './core/client';
export * from './core/exceptions';
export { OracleAPI } from './api/oracle-api';
export { TwitterAPI } from './api/twitter-api';
export { PollAPI } from './api/poll-api';
export * from './schemas/oracle-schemas';
export { BaseOracleProvider } from './providers/base';
export { ChainlinkProvider } from './providers/chainlink';
export { PythProvider } from './providers/pyth';
export { UMAProvider } from './providers/uma';
export { BandProvider } from './providers/band';
export { API3Provider } from './providers/api3';
export * from './types/enums';
export { getLogger, OracleLogger, createTimer, logPerformance } from './utils/logger';
export * from './utils/async-helpers';
export { AIRoutingService } from './ai-oracle-routing-service';
export declare const META: {
name: string;
version: string;
description: string;
author: string;
license: string;
nodeRequires: string;
homepage: string;
documentation: string;
repository: string;
};
/**
* Get the current version of the OpenOracle SDK.
*/
export declare function getVersion(): string;
/**
* Get package information as an object.
*/
export declare function getInfo(): typeof META;
declare const _default: {
OracleRouter: any;
OracleConfig: any;
OracleClient: any;
getConfig: any;
setConfig: any;
OracleAPI: any;
TwitterAPI: any;
PollAPI: any;
BaseOracleProvider: any;
ChainlinkProvider: any;
PythProvider: any;
UMAProvider: any;
BandProvider: any;
API3Provider: any;
AIRoutingService: any;
getLogger: any;
getVersion: typeof getVersion;
getInfo: typeof getInfo;
VERSION: string;
META: {
name: string;
version: string;
description: string;
author: string;
license: string;
nodeRequires: string;
homepage: string;
documentation: string;
repository: string;
};
};
export default _default;