21centurymotorcompany / bitd Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED. Replaced with Planaria https://planaria.network
DEPRECATED. Replaced with Planaria https://planaria.network
I found this while testing my bitd-importer
First input should have address pzcgf24w3f6slgzn2nm5e08dv6lch4ngvgedfc4e4z
however it doesn't show up. The other inputs address does show up.
Another example is:
390a6806e8ebe0eb7d6fa83fa14810fef0669a9b4aafbdc4bb7389068f2fb81b / pzcf8fn0wc8aphkw4cgqjuzpd2xpeyggqu4v3vzqln
I think it is related to how p2sh addresses are parsed. It may be an issue upstream to bitcoincashlib ? It'd probably be useful to check first if it is fixed in bitcore-lib-cash if that's the case.
It looks like that the TNA module doesn't utilize the credentials specified in the config file, but rather looks at environment variables.
var fromHash = function(hash) {
const RpcClient = require('bitcoind-rpc');
const rpc = new RpcClient({
protocol: 'http',
user: process.env.BITCOIN_USERNAME ? process.env.BITCOIN_USERNAME : 'root',
pass: process.env.BITCOIN_PASSWORD ? process.env.BITCOIN_PASSWORD : 'bitcoin',
host: process.env.BITCOIN_IP ? process.env.BITCOIN_IP : '127.0.0.1',
port: process.env.BITCOIN_PORT ? process.env.BITCOIN_PORT : '8332',
})
So the Init needs something like:
process.env.BITCOIN_USERNAME = Config.rpc.user;
process.env.BITCOIN_PASSWORD = Config.rpc.pass;
process.env.BITCOIN_IP = Config.rpc.host;
process.env.BITCOIN_PORT = Config.rpc.port;
Memo is using tx.h in reverse form. Something like 'tx.rh' is needed to allow lookups.
Unless I am missing a way to do it without additional field of cоurse
Sometimes the same transaction gets crawled twice.
Investigate what's causing this, and come up with a solution.
node-jq/bin/jq is not found
I had an issue trying to install one of the dependencies:
unwriter/bigjq#1
This might have been particular to my machine but i got a solution.
Solution:
In this lib, you can fix this by running npm install --save --unsafe-perm [email protected]; npm install --save --unsafe-perm --no-bin-links
The package maintainer can fix this by adding "node-jq:":"=1.5.0" to the package.json. I'm not sure why no-bin-links is needed but it was necessary to do the final install on my machine
Support Unspent outputs.
Currently it's easy to aggregate and filter outputs in many different ways, but bitdb doesn't provide info on which one of them are already spent.
Thinking about some potential use cases for this would be helpful in designing the architecture.
Currently BitDB internally uses LevelDB to store a few key/value pairs, one of which is block height: https://github.com/21centurymotorcompany/bitd/blob/master/info.js#L28 but this is only internal and not exposed as an endpoint.
Create an endpoint that exposes this.
Also maybe there are other things we could store in the key/value store other than the most recent height?
Id like to be able to query blocks similarly to transactions. Among other things, this could allow for implementation of a block explorer. It could also be useful for analytics. These are some some suggestions for fields:
Hi, I've copy/paste the example using bitdb.network server but am getting an error I don't understand. Here's my code and the caught error is underneath.
exports.queryBlockchain = functions.https.onRequest((request, response) => {
var query = {
v: 3,
q: { find: {}, limit: 5 }
};
var s = JSON.stringify(query);
var b64 = Buffer.from(s).toString('base64');
var url = "https://bitgraph.network/q/" + b64;
var header = {
headers: { key: "1Bk7ku4FF5fNngcquF6evGHEWNVQeXbB6g" }
};
axios
.get(url, header)
.then((r) => {
console.log("Fetched: ", r.data)
return response.send(JSON.stringify(r.data))
})
.catch((err) => {
return response.send(err)
})
})
{"message":"connect ECONNREFUSED 198.54.117.200:443","name":"Error","stack":"Error: connect ECONNREFUSED 198.54.117.200:443\n at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14)","config":{"url":"https://bitgraph.network/q/eyJ2IjozLCJxIjp7ImZpbmQiOnt9LCJsaW1pdCI6NX19","method":"get","headers":{"Accept":"application/json, text/plain, */*","key":"1Bk7ku4FF5fNngcquF6evGHEWNVQeXbB6g","User-Agent":"axios/0.19.0"},"transformRequest":[null],"transformResponse":[null],"timeout":0,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","maxContentLength":-1},"code":"ECONNREFUSED"}
Add ideas here
bitcoincashjs is not being maintained, lets upgrade to bitcore-lib-cash which is maintained by bitpay, who's the original author of the bitcode-lib from which both bitcore-lib-cash and bitcoincashjs forked.
Technically this won't be difficult since both libraries are forked from the same upstream so have exactly the same API, but will need some testing.
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.