litecore-archive / insight-lite-api Goto Github PK
View Code? Open in Web Editor NEWThis project forked from bitpay/insight-api
A bitcoin blockchain API for web wallets
Home Page: https://bitcore.io/guides/full-node
This project forked from bitpay/insight-api
A bitcoin blockchain API for web wallets
Home Page: https://bitcore.io/guides/full-node
I'm seeing this error on a fresh install:
curl -d 'addrs=an-address&from=0' 'http://127.0.0.1:3001/insight-lite-api/addrs/txs/'
Method not found. Code:-32601
Other calls working fine.
"bitcoinAddress: new transaction concerning received from network. This event is published in the bitcoinAddress room."
I send:
and then:
But nothing happens. Transactions in the blockchain appear, but I do not get them.
Litecore works:
info: ::ffff:127.0.0.1 web socket subscribe: LTU2cds4aSdXFip9sV4gXphnhxGQjgfjmg
What am I doing wrong? Or how to do it? Just do not understand from the documentation .. :(
Please, help me.
Thank you!
None of the routes are working such as /insight-api/tx/
I'm running node v4.8.4
Sending a POST request to a number of different API endpoints is incorrectly dumping the stack trace, this information might help an attacker gain more information and potentially focus on the development of further attacks for the target system or leverage the incorrect error handling to create a new attack.
Example -
{
,
}
This will return the following HTTP reply -
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>SyntaxError: Unexpected token ,
<br> at Object.parse (native)
<br> at parse (/home/livenet/livenet/node_modules/litecore-node/node_modules/body-parser/lib/types/json.js:89:19)
<br> at /home/livenet/livenet/node_modules/litecore-node/node_modules/body-parser/lib/read.js:121:18
<br> at invokeCallback (/home/livenet/livenet/node_modules/litecore-node/node_modules/body-parser/node_modules/raw-body/index.js:224:16)
<br> at done (/home/livenet/livenet/node_modules/litecore-node/node_modules/body-parser/node_modules/raw-body/index.js:213:7)
<br> at IncomingMessage.onEnd (/home/livenet/livenet/node_modules/litecore-node/node_modules/body-parser/node_modules/raw-body/index.js:273:7)
<br> at emitNone (events.js:67:13)
<br> at IncomingMessage.emit (events.js:166:7)
<br> at endReadableNT (_stream_readable.js:923:12)
<br> at nextTickCallbackWith2Args (node.js:511:9)
</pre>
</body>
</html>
There's also more stack trace dumping in other errors, see PayloadTooLargeError for eg -
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>PayloadTooLargeError: request entity too large
<br> at readStream (/home/livenet/livenet/node_modules/litecore-node/node_modules/body-parser/node_modules/raw-body/index.js:155:17)
<br> at getRawBody (/home/livenet/livenet/node_modules/litecore-node/node_modules/body-parser/node_modules/raw-body/index.js:108:12)
<br> at read (/home/livenet/livenet/node_modules/litecore-node/node_modules/body-parser/lib/read.js:77:3)
<br> at jsonParser (/home/livenet/livenet/node_modules/litecore-node/node_modules/body-parser/lib/types/json.js:134:5)
<br> at Layer.handle [as handle_request] (/home/livenet/livenet/node_modules/litecore-node/node_modules/express/lib/router/layer.js:95:5)
<br> at trim_prefix (/home/livenet/livenet/node_modules/litecore-node/node_modules/express/lib/router/index.js:317:13)
<br> at /home/livenet/livenet/node_modules/litecore-node/node_modules/express/lib/router/index.js:284:7
<br> at Function.process_params (/home/livenet/livenet/node_modules/litecore-node/node_modules/express/lib/router/index.js:335:12)
<br> at next (/home/livenet/livenet/node_modules/litecore-node/node_modules/express/lib/router/index.js:275:10)
<br> at expressInit (/home/livenet/livenet/node_modules/litecore-node/node_modules/express/lib/middleware/init.js:40:5)
</pre>
</body>
</html>
Fix -
[sulijia@localhost mynode]$ litecore-node start
/home/sulijia/litecoin/mynode/node_modules/insight-lite-api/node_modules/async/dist/async.js:52
function apply(fn, ...args) {
^^^
SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/home/sulijia/litecoin/mynode/node_modules/insight-lite-api/lib/blocks.js:3:13)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
not matter ubuntu18.04 or centos 7,error is the same,node version is 4.6.0,what's wrong?
I'm a noob when it comes to npm, could anyone help please?
Thank you!
c:\API>npm install -g litecore-node@latest
[email protected] preinstall C:\Users\Administrator\AppData\Roaming\npm\nod
e_modules\litecore-node
./scripts/download
'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] preinstall: ./scripts/download
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2018-01-19T0
6_07_23_261Z-debug.log
c:\API>
in lib/currency.js there is a ticker dependency on btc-e.
maybe one of these should be used instead now:
Hello,
I am working with a multicurrency wallet to be used for use your crypto on debit cards.
I am using HD wallets, but seems that the insight api is not correctly configurated, is just receiving btc as ticker, it will work if I was just using it, but I am using 6 or 7 apis.
So, anybody can work it to use ltc ticker, or should I create my own api.
I am using this website: https://insight.litecore.io/
Hi guys,
The list blocks api /blocks
doesn't work, I inspect source code and realized Bitcore
has getBlockHashesByTimestamp
method and this method call getblockhashes
.
I tested litecoin-cli commands (litecoin 0.13.2) with method getblockhashes
(method returns an array of block hashes for a specified block range, ex: two timestamps) but it return Method not found
, is it removed?
If it was removed, so is there a method that has the same feature with above method?
Hi
I used the current version of litecore-node and run insight. but when I try to get block details or transaction I got this error message Method not found. Code:-32601
while just status page work fine.
What's wrong in this case?
Everyday 8pm EST like a clockwork the call:
/insight-lite-api/blocks?limit=1
returns empty blocks array:
{"blocks":[],"length":0,"pagination":{"next":"2018-06-15","prev":"2018-06-13","currentTs":1529020799,"current":"2018-06-14","isToday":true,"more":false}}
this problem lasts a minute or two and then all returns to normal.
Why is that???
While running command
litecore-node install insight-lite-api
got an error
/usr/local/lib/node_modules/litecore-node/lib/cli/main.js:75
throw new Error('Could not find configuration, see litecore-node create --help
');
^
Error: Could not find configuration, see litecore-node create --help
at Command. (/usr/local/lib/node_modules/litecore-node/lib/cli/main.js:75:15)
at Command.listener (/usr/local/lib/node_modules/litecore-node/node_modules/commander/index.js:315:8)
at emitTwo (events.js:87:13)
at Command.emit (events.js:172:7)
at Command.parseArgs (/usr/local/lib/node_modules/litecore-node/node_modules/commander/index.js:651:12)
at Command.parse (/usr/local/lib/node_modules/litecore-node/node_modules/commander/index.js:474:21)
at Object.main (/usr/local/lib/node_modules/litecore-node/lib/cli/main.js:143:11)
at Liftoff. (/usr/local/lib/node_modules/litecore-node/lib/cli/bitcore.js:31:16)
at Liftoff.execute (/usr/local/lib/node_modules/litecore-node/node_modules/liftoff/index.js:203:12)
at module.exports (/usr/local/lib/node_modules/litecore-node/node_modules/liftoff/node_modules/flagged-respawn/index.js:51:3)
Any ideas?
Request: https://localhost:3001/insight-lite-api/utils/estimatefee[?nbBlocks=2]
Response:
{
status: 404,
url: "/insight-lite-api/utils/estimatefee[?nbBlocks=2]",
error: "Not found"
}
I'm facing this issue, when $ curl localhost:3001/insight-lite-api/ , i get {"status":404,"url":"/insight-lite-api/","error":"Not found"} . Has anyone encountered this issue?
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.