1.1.6 • Published 7 months ago

@objectivelabs/oracle-sdk v1.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Oracle SDK

A JavaScript/TypeScript utility library for interacting with various price oracle providers on Euler.

Overview

Oracle SDK is a comprehensive toolkit that provides a unified interface for interacting with multiple price oracle providers. It simplifies the process of fetching and managing metadata and price data from various sources including Chainlink, Pyth, RedStone, Pendle, and more.

Features

  • Unified interface for multiple oracle providers: Chainlink, Pyth, Pendle, RedStone, Chronicle, and more
  • Support for indexing Euler contracts: SnapshotRegistry, EulerRouterFactory, EulerRouter, and more
  • Canonical deployment and verification artifacts for Euler oracle adapters
  • TypeScript support with full type definitions
  • Modern ESM and CommonJS support

Metadata

Depending on the provider, there may be metadata available off-chain. This metadata can be used to decide which contracts / configurations are valid and official according to the provider.

ProviderMetadata LocationMetedata Contents
Chainlinkhttps://reference-data-directory.vercel.app/[slug].jsonProxy address, description, heartbeat, threshold...
RedStonehttps://github.com/redstone-finance/redstone-oracles-monorepo/tree/main/packages/on-chain-relayer/relayer-manifestsProxy address, description, heartbeat, threshold...
Pythhttps://hermes.pyth.network/v2/price_feedsFeed id, feed type, symbol, description...
Pendlehttps://api-v2.pendle.finance/bff/v3/markets/all?chainId=${chainId}Market address, accounting asset, underlying asset, expiry, and more

Installation

npm install @objectivelabs/oracle-sdk
# or
yarn add @objectivelabs/oracle-sdk
# or
pnpm add @objectivelabs/oracle-sdk

Development

See DEVELOPMENT.md for details on adding support for a new chain, oracle provider or adapter class.

Prerequisites

  • Node.js (v16 or higher recommended)
  • npm, yarn, or pnpm

Setup

  1. Clone the repository:
git clone https://github.com/objectivedefi/oracle-sdk.git
cd oracle-sdk
  1. Install dependencies:
npm install

Available Scripts

  • npm run build - Build the project (outputs both CJS and ESM formats)
  • npm run dev - Watch mode for development
  • npm run test - Run tests
  • npm run lint - Run ESLint
  • npm run lint:fix - Fix ESLint issues
  • npm run format - Format code with Prettier

Dependencies

  • viem - Ethereum interaction library

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Developed and maintained by Objective Labs.

1.1.6

7 months ago

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.2

8 months ago

1.1.0

8 months ago

1.0.5

8 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago

0.3.5

9 months ago

0.3.4

9 months ago

0.3.3

9 months ago

0.3.2

10 months ago

0.3.1

10 months ago

0.3.0

10 months ago

0.2.7

10 months ago

0.2.6

10 months ago

0.2.5

10 months ago

0.2.4

10 months ago

0.2.3

10 months ago

0.2.2

10 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago