Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
redstone-api-extended
Advanced tools
Extended javascript library for fetching data from Redstone ecosystem
This is an extended version of redstone-api.
It adds the oracle
module, allowing to fetch data packages from decentralized cache layer (including redstone-cache-layer nodes and streamr network) and use it in Blockchain Smart Contracts with tools like redstone-evm-connector.
npm install redstone-api-extended
yarn add redstone-api-extended
// Using Node.js `require()`
const redstone = require('redstone-api-extended');
// Using ES6 imports
import redstone from 'redstone-api-extended';
// Get package for all symbols
const dataPackage = await redstone.oracle.getFromDataFeed("redstone-avalanche-prod");
// Get package for one symbol
const dataPackage = await redstone.oracle.getFromDataFeed("redstone-avalanche-prod", "ETH");
const dataPackage = redstone.oracle.getDefaultDataSourcesConfig("redstone-stocks");
// Get with custom data sources config
const dataPackage = await redstone.oracle.get({
"sources": [
{
"type": "streamr",
"streamrEndpointPrefix": "0x981bdA8276ae93F567922497153de7A5683708d3/redstone-oracle",
"disabledForSinglePrices": false,
"evmSignerAddress": "0x981bdA8276ae93F567922497153de7A5683708d3"
},
{
"type": "cache-layer",
"url": "https://api.redstone.finance",
"providerId": "TEHhCDWy-vGmPSZsYJyM0aP_MM4xESgyIZdf5mVODzg",
"evmSignerAddress": "0x981bdA8276ae93F567922497153de7A5683708d3"
},
{
"type": "cache-layer",
"url": "https://api.redstone.finance",
"providerId": "ll8DlO4xMwHK7gIMsbnOnN7Jg8Sl674Ls4G0aBfHCyk",
"evmSignerAddress": "0x3BEFDd935b50F172e696A5187DBaCfEf0D208e48"
},
{
"type": "cache-layer",
"url": "https://vwx3eni8c7.eu-west-1.awsapprunner.com",
"providerId": "TEHhCDWy-vGmPSZsYJyM0aP_MM4xESgyIZdf5mVODzg",
"evmSignerAddress": "0x981bdA8276ae93F567922497153de7A5683708d3"
}
],
"valueSelectionAlgorithm": "first-valid",
"timeoutMilliseconds": 10000,
"maxTimestampDiffMilliseconds": 150000,
"preVerifySignatureOffchain": true
});
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
FAQs
Extended javascript library for fetching data from Redstone ecosystem
The npm package redstone-api-extended receives a total of 2 weekly downloads. As such, redstone-api-extended popularity was classified as not popular.
We found that redstone-api-extended demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.