UNPKG

@iexec/iexec-oracle-factory-wrapper

Version:
17 lines (16 loc) 934 B
import { OracleValue, ReadOracleOptions, ReadOracleParams } from '../types/common.js'; import { EthersProviderConsumer } from '../types/internal.js'; /** * Reads data from an oracle based on the provided parameters. * @param paramSetOrCidOrOracleId Param set, CID, or oracle ID. * @param dataType Type of data to read. * @param ethersProvider Ethereum provider. * @param ipfsGateway IPFS gateway URL. * @param oracleContract Address of the oracle contract. * @returns Promise resolving to the Oracle data. * @throws {NoValueError} If no value is stored for the oracle. * @throws {ValidationError} If there is a validation error. * @throws {WorkflowError} If there is an unexpected workflow error. */ declare const readOracle: ({ paramSetOrCidOrOracleId, dataType, ethersProvider, ipfsGateway, oracleContract, }: ReadOracleParams & ReadOracleOptions & EthersProviderConsumer) => Promise<OracleValue>; export { readOracle };