Socket
Socket
Sign inDemoInstall

redstone-api

Package Overview
Dependencies
17
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.2 to 0.4.3

2

lib/proxies/arweave-proxy.js

@@ -51,3 +51,3 @@ "use strict";

this.arweaveClient = arweave_1.default.init({
host: "arweave.dev",
host: "arweave.net",
port: 443,

@@ -54,0 +54,0 @@ protocol: "https",

{
"name": "redstone-api",
"version": "0.4.2",
"version": "0.4.3",
"description": "Javascript library for fetching trusted token pricing data from Redstone data ecosystem",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -7,6 +7,8 @@ # Redstone API

[![NPM](https://img.shields.io/npm/v/redstone-api)](https://www.npmjs.com/package/redstone-api)
[![Twitter](https://img.shields.io/twitter/follow/redstone_defi?style=flat&logo=twitter)](https://twitter.com/intent/follow?screen_name=redstone_defi)
Redstone API is a Javascript library for fetching trusted token pricing data from [Redstone data ecosystem](https://github.com/redstone-finance/redstone/blob/master/README.md).
<!-- TODO: uncomment when redstone twitter account will be ready -->
<!-- [![Twitter](https://img.shields.io/twitter/follow/limestone_defi?style=flat&logo=twitter)](https://twitter.com/intent/follow?screen_name=limestone_defi) -->
Redstone API is a Javascript library for fetching trusted token pricing data from [Redstone data ecosystem](docs/REDSTONE_DATA_ECOSYSTEM.md).
It is a Javascript wrapper for [Redstone HTTP Api](docs/HTTP_API.md).

@@ -17,3 +19,3 @@

Redstone pricing data is secured on Arweave and protected by the provider's collateral.
[Learn more](https://github.com/redstone-finance/redstone/blob/master/README.md)
[Learn more](docs/REDSTONE_DATA_ECOSYSTEM.md)

@@ -30,6 +32,6 @@ ### ✓ Easy to use

Redstone API is fully written in Typescript and then compiled to JavaScript.
[Source code](https://github.com/redstone-finance/redstone-api)
[Source code](https://github.com/redstone-finance/redstone-api/)
## 📖 Documentation
This readme should provide you with all the information you need to start using redstone api. If you want to see the full documentation, visit [docs.redstone.finance](https://docs.redstone.finance)
This readme should provide you with all the information you need to start using redstone api. If you want to see the full documentation, visit [api.docs.redstone.finance](https://api.docs.redstone.finance)

@@ -229,4 +231,4 @@ ## 📦 Installation

const prices = await redstone.getHistoricalPrices("AR", {
offset: 1000,
limit: 100,
offset: 1000,
limit: 100,
});

@@ -250,2 +252,9 @@ ```

### Fluent Interface
Redstone implements a fluent interface to simplify query creation thanks to a human readable syntax. [Learn more](docs/FLUENT_INTERFACE.md)
![redstone fluent interface example](docs/redstone-query-example.gif)
----------------------------------------------
### Using a custom cache api url

@@ -260,3 +269,3 @@ #### Option 1. Using a setCacheApiUrl method

```js
const redstoneApi = new redstone.RedstoneApi({
const redstoneApi = new redstone.Api({
cacheApiUrl: "http://localhost:9000/prices",

@@ -279,8 +288,6 @@ });

We strongly recommend using the default fetching mechanism which leverages cache to speed up queries. But if you want to fetch data directly from Arweave you can do it by initialising a new `RedstoneApi` client and setting `useCache` option to `false`.
We strongly recommend using the default fetching mechanism which leverages cache to speed up queries. But if you want to fetch data directly from Arweave you can do it by initialising a new `Api` client and setting `useCache` option to `false`.
```js
const redstoneArweaveClient = new redstone.RedstoneApi({
useCache: false,
});
const redstoneArweaveClient = new redstone.Api({ useCache: false });

@@ -292,10 +299,5 @@ const price = await redstoneArweaveClient.getPrice("AR");

----------------------------------------------
### Fluent Interface
Redstone implements a fluent interface to simplify query creation thanks to a human readable syntax. [Learn more](docs/FLUENT_INTERFACE.md)
## 🚀 Examples
- [Discord bot](examples/discord-bot)
- [Web app](https://github.com/redstone-finance/redstone)
- [Discord bots](examples/discord-bots/)
- [Web app](https://github.com/redstone-finance/redstone-app)

@@ -302,0 +304,0 @@ ## 💬 Contributing

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc