wavesplatform / data-service Goto Github PK
View Code? Open in Web Editor NEWWaves data service and API
License: MIT License
Waves data service and API
License: MIT License
กู้กระเป๋าwaves
Hi!
First of, thank you for developing this awesome service! It increases transparency and makes digging into the blockchain very easy.
I'm trying out multiple queries, and noticed a problem:
When I'm querying https://api.wavesplatform.com/v0/transactions/transfer?recipient=XXX
The earliest transactions I can get start at 2017-01-16.
However, I know for sure that for that particular address, there exists some earlier transfers. When I query a particular tx (from 2016) by id, it correctly shows up:
https://api.wavesplatform.com/v0/transactions/all/XXX
Just wanted to let you know :)
Keep up the great work guys!
The latest clients makes calls to an API 1 level above /v0/ for example;
https://api.wavesplatform.com/assets/search/bitcoin
and
https://api.wavesplatform.com/candles/WAVES/Ft8X1v1LTa1ABafufpaCWyVj8KkaxUWE6xBhW6sNFJck?timeStart=1532080038877&timeEnd=1534758438879&interval=223m
But these are not handled by the service. Is there another service thats not published here, or is this code out of date? I'm service this repo on the /v0/ path
cc @dvshur
Describe the bug
The following URL shows transactions happening today (24th Sept)
and when reviewing candles service for the same time period all is null;
To Reproduce
Review both URLs
Expected behavior
There should be candles generated for the dates where transactions happened. And the value of those should be correct.
Matcher: 3PJe4pG5fRwZh5EPwvtyQHCMpG7NVp7HBwh
Hi team ,
I have run this cmd - ( docker run -p=:3000 --env-file=variables.env wavesplatform/data-service )
I got following error ( PFA )
And also i have run node js cmd - ( export $(cat variables.env | xargs) && NODE_ENV=production node src/index.js )
But the index.js file doesn't exist.
I am struggling on last 2 days.
So kindly provide solution ASAP.
Hello!
Please tell me the repository of the documentation Swagger program located on the link https://api.wavesplatform.com/v0/docs and how to install it?
The comment says it all. Manually compiled. Docs load but nothing seems to work other than the ability to visit the page. All commands return 404.
i follow read.me file and get this error :
root@:~/data-service# npm install
npm WARN optional Skipping failed optional dependency /sane/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
root@:~/data-service# export $(cat variables.env | xargs) &&
NODE_ENV=production node src/index.js
module.js:549
throw err;
^
Error: Cannot find module 'folktale/Maybe'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/root/data-service/src/utils/db/index.js:1:77)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Issue Report - data by invokeScript isn’t available by API:
https://wavesexplorer.com/testnet/address/3N4GgQWCckqUn1H9y8rNRyCXZPkgKTNKznT
data: several key-value pairs generated by call of invokeScript
dapp address: 3N4GgQWCckqUn1H9y8rNRyCXZPkgKTNKznT
Results doesn’t contain invokeScript data
https://api.testnet.wavesplatform.com/v0/docs/#/transactions/searchTxsData
Issue 1: SCRIPT-transactions cannot be found by GET /transactions/data/
After generation of several “classical” data transactions - all transactions and data were found by API
Issue 2: SCRIPT-transactions cannot be found by GET /transactions/all/
https://api.testnet.wavesplatform.com/v0/docs/#/transactions/searchTxsAll
Issue 3: script and invokescript transactions are invisible for GET /transactions/all/ for sender (invokeTransaction caller)
https://wavesexplorer.com/testnet/address/3Mt9UZD5iajUxsfo7aTw11F8GTNQZHJKAUP
P.S.: Interesting that waves explorer works fine and I can see all key-value data pairs even generated by invokeScript
Prototype Override Protection Bypass
Vulnerable module: qs
Introduced through: [email protected]
Detailed paths
Introduced through: data-service@wavesplatform/data-service#7f17ec615f4a24958b074bfbdaeb6582cc22d1a9 › [email protected] › [email protected]
Overview
qs is a querystring parser that supports nesting and arrays, with a depth limit.
By default qs protects against attacks that attempt to overwrite an object's existing prototype properties, such as toString(), hasOwnProperty(),etc.
From qs documentation:
By default parameters that would overwrite properties on the object prototype are ignored, if you wish to keep the data from those fields either use plainObjects as mentioned above, or set allowPrototypes to true which will allow user input to overwrite those properties. WARNING It is generally a bad idea to enable this option as it can cause problems when attempting to use the properties that have been overwritten. Always be careful with this option.
Overwriting these properties can impact application logic, potentially allowing attackers to work around security controls, modify data, make the application unstable and more.
In versions of the package affected by this vulnerability, it is possible to circumvent this protection and overwrite prototype properties and functions by prefixing the name of the parameter with [ or ]. e.g. qs.parse("]=toString") will return {toString = true}, as a result, calling toString() on the object will throw an exception.
Example:
qs.parse('toString=foo', { allowPrototypes: false })
// {}
qs.parse("]=toString", { allowPrototypes: false })
// {toString = true} <== prototype overwritten
When calling the following endpoint the 'close' number is 2.55;
{"__type":"list","data":[{"__type":"candle","data":{"time":"2020-01-08T12:00:00.000Z","open":2.55,"close":2.55,"high":2.6,"low":2.51,"volume":2576,"quoteVolume":6553.28,"weightedAveragePrice":2.54,"maxHeight":1875505,"txsCount":4}},{"__type":"candle","data":{"time":"2020-01-09T00:00:00.000Z","open":null,"close":null,"high":null,"low":null,"volume":null,"quoteVolume":null,"weightedAveragePrice":null,"maxHeight":null,"txsCount":0}}]}
But when I list transactions in date order decending the most recent tx price is 2.51
{"__type":"list","isLastPage":true,"lastCursor":"MjAyMC0wMS0wOFQxMjowMjoxNi43ODVaOjpIOW9Yd1cxNDhDc2JMc0ZqOG5yWGRuVUpxYUNlRUJMZUJXN014WlhTUUNweDo6ZGVzYw==","data":[{"__type":"transaction","data":{"id":"EqHxcWRJwZAAqNRqjS83ozkpAhgBqa6r48JSWDvS2FeR","timestamp":"2020-01-08T14:16:43.762Z","height":1875505,"type":7,"version":2,"proofs":["VCdNpbVhSpwWVCDiJPskp244zA2ynTjBNcA8YnndBUdikxHXgN98jujBEcynzdE3N5gMSpknAXv3o3MyrNs6cru"],"fee":0.003,"sender":"3P4vjfsebcfiv3oNTdFyXqGpFAnwY2c74HD","senderPublicKey":"4gHpbhVJeuHrb6yv5RuPYBEXn6MJdx4ZbjEqtmjx6mdQ","buyMatcherFee":0.003,"sellMatcherFee":0.003,"price":2.51,"am...
The expected result would be that the candles service returns the last trade price in this case with a close of 2.51
Describe the bug
A clear and concise description of what the bug is.
When running the test in the project, the tests in sql.test.js that involve date time require the runner to be in UTC+3 to be successful.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Regardless of what time-zone the tests are run in, the outcome should be the same
Additional context
Running using vscode Jest Runner
Hi team ,
I have completed private node configuration.
But still now we can't find how to implement api service( like data service - https://api.testnet.wavesplatform.com/v0/ ) .
So please explain how to implement that functionality ?
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
Ex. I'm always frustrated when
[waves-lite-client cann't loading the market candles.]
Describe the solution you'd like
A clear and concise description of what you want to happen.
I want to you realize the backward compatibility of this API with old API: https://github.com/PyWaves/WavesDataFeed, and make your api compatible with this.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I just see in client-side waves-lite-client
the following link: https://marketdata.wavesplatform.com
and there is another API.
There is warning, about this old api is deprecated, but this API is working good.
I see here: https://forum.wavesplatform.com/t/marketdata-deprecation-migration-guide/11050
the guide to migration, and I see here https://api.wavesplatform.com/v0/docs/
the API with another directives.
This API working, as default, on https://waves.exchange/
but this API not woking in client-side waves-lite-client.
Then, I go here: https://api.wavesplatform.com/v0/ and I see there the link to this project.
After this, I decided to create this issue.
Additional context
Add any other context about the feature request here.
As you can see, DATAFEED API on https://marketdata.wavesplatform.com
using another directives, like: /symbols
, /markets
, /tickers
, /ticker
, /candles
, etc...
But many from this not available in new API.
So, you can add this, to save the backward compatibility.
Best regards.
Describe the bug
When running the repository from tag v0.28.0 there are test issues and build issues.
To Reproduce
Steps to reproduce the behavior:
npm install
npm run buiild
Expected behavior
Project can build
Tests all pass
Please complete as much of the following information as you can:
Is your feature request related to a problem? Please describe.
Hello,
Our web applications are using api.wavesplatform.com/v0/ to list all recent actions of our dapps or users in several places.
With the new tx 18 release, we started to implement MetaMask support but realized that invoke made with metamask then don't show up in all these place relying on invoke history (based on /transactions/invoke-script).
Describe the solution you'd like
Since an invoke script is an invoke script, it would make sens for us that they show in invoke-script end point (maybe optional), regardless if the call was made with MetaMask or a native waves signing tool. It is still an invoke call to a dapp generating the same result from the same action.
Describe alternatives you've considered
If this don't make enough sense then at least a separated endpoint for 18 that allow the same filtering as regular invoke-script so we could call both and merge the results and then get all invoke script calls for a specific dapp and / or callable
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.