From dcdba268787f5a9512228318c51d483e0e950a38 Mon Sep 17 00:00:00 2001 From: starkbamse <139136798+starkbamse@users.noreply.github.com> Date: Fri, 17 May 2024 21:16:18 +0200 Subject: [PATCH] Export round via core --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/core.rs | 4 +++- src/lib.rs | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b6741a1..4a76a34 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3377,7 +3377,7 @@ dependencies = [ [[package]] name = "rustlink" -version = "0.0.1" +version = "0.0.2" dependencies = [ "async-std", "bincode", diff --git a/Cargo.toml b/Cargo.toml index b7ae800..b6f4abf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ crate-type = ["cdylib", "rlib"] [package] name = "rustlink" -version = "0.0.1" +version = "0.0.2" edition = "2021" license = "MIT OR Apache-2.0" description = "A lightweight and easy-to-use library for periodically retrieving data from the Chainlink decentralized data feed." diff --git a/src/core.rs b/src/core.rs index 68b0cd2..fd219bc 100644 --- a/src/core.rs +++ b/src/core.rs @@ -1,4 +1,4 @@ -use crate::{error::Error, fetcher::fetch_rounds, interface::Round}; +use crate::{error::Error, fetcher::fetch_rounds, interface}; use async_std::channel::{unbounded, Receiver, RecvError, Sender}; use ethers::{providers::{Http, Provider}, types::Address}; @@ -59,6 +59,8 @@ pub enum Reflector { Sender(Sender), } +pub type Round = interface::Round; + impl Rustlink { /// Creates a new Rustlink instance. /// diff --git a/src/lib.rs b/src/lib.rs index 38f1275..abaf6b5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,9 +2,9 @@ /// This library provides a simple interface to fetch price data from the Chainlink decentralized data feed. /// Core is the main module that contains the main struct `Rustlink` that you will need to interact with. pub mod core; +mod interface; mod error; mod fetcher; -mod interface; #[cfg(test)] mod tests {