Skip to main content
4 votes

how to use bitcoin blockchain be useful to authenticate documents?

You can make a transaction with the hash (of the document) as a comment. That would proof that the file existed at that time. It doesn't however magically proof that a document hasn't been changed. ...
Penquin's user avatar
  • 671
4 votes
Accepted

Litecoin litecore-lib receive UTXO and current balance

I used the request library to manually retrieve information from the insight API. I also used the litecore-lib library to create the transaction. var Litecoin = require("litecore-lib"); var request = ...
Monstrum's user avatar
  • 1,334
4 votes
Accepted

How to do sendRawTransaction to bitcoind JSON-RPC using bitcoin-core package in nodejs

The way you pass parameters is wrong. I use the code below, got the right answer: const Client = require('bitcoin-core'); const client = new Client({username: 'admin', password: 'password', network: '...
Peili Liang's user avatar
3 votes

get the real last block

Instead of getblockcount, you can call getblockchaininfo and read the headers field. However, while this may give you a lot more blocks than the local block count, you will still only receive a count ...
Raghav Sood's user avatar
  • 17.1k
3 votes
Accepted

Bcoin - Database backend not found

This happens when your dependencies get twisted up, especially when bcoin has an update where leveldown gets upgraded. You should be good with a npm rebuild leveldown to fix the dependency tree, but ...
Bucko's user avatar
  • 183
3 votes
Accepted

Can you run a full Bitcoin node on Node.js?

Yes, bcoin: http://bcoin.io/ https://github.com/bcoin-org/bcoin bcoin is a modular Bitcoin library for nodejs with full node and SPV node functionality, as well as a scalable BIP44 wallet used in ...
pinhead's user avatar
  • 5,164
2 votes

Create OP_RETURN tx with Bitcoinjs-lib

Here's how I was able to accomplish this with the latest bitcoinjs-lib version (5.2.0) using psbt. const alice = bitcoin.ECPair.fromWIF(wif, bitcoin.networks.regtest); const inputData1 = { hash: ...
pseudozach's user avatar
2 votes
Accepted

Authenticating with npm nodejs bitcoin-core module

I tried the following, and it works: const Client = require('bitcoin-core'); const client = new Client( { username: 'yourUsernameHere', password: 'yourPasswordHere', ...
Paul's user avatar
  • 36
2 votes

Invalid Argument Error when broadcasting a transaction with Bitcore

Either create the transaction using constructor: var transaction = new Transaction(); or pass serialized transaction to broadcast method: insight.broadcast(tx.serialize(), ......
Maciej Rogoziński's user avatar
2 votes
Accepted

how to use bitcoin blockchain be useful to authenticate documents?

I'd suggest taking a look at chainpoint.org (Full disclosure, I'm the VP Engineering at Tierion, the creators of the Chainpoint open standard). Chainpoint currently uses the Tierion HashAPI, and you ...
Glenn Rempe's user avatar
2 votes

bitcoin setup using nodejs

I m using bitcore for stand alone rpc because it has many new indexes and new methods. See this link https://bitcore.io/guides/bitcoin
Alex Ishida's user avatar
2 votes
Accepted

Bitcoin RPC ECONNREFUSED

Here is the solution that worked for me... bictcoin.conf txindex=1 server=1 rpcuser=username rpcpassword=password port=8444 rpcport=8332 rpcbind=127.0.0.1 rpcallowip=127.0.0.1 Bitcoin Daemon must ...
Corbin's user avatar
  • 285
2 votes
Accepted

Creating Testnet Bitcoin Transaction with bitcoinjs-lib

The input you are trying to spend appears to be vout 1 in the tx. Your current code tries to spend vout 0, which has already been spent. Try changing transaction.addInput(input.sender_prev_txid, 0); ...
Raghav Sood's user avatar
  • 17.1k
2 votes

How to get the Bitcoin address from the bitcoin Public key?

Try bitcoinjs-lib The following will generate a P2SH(P2WPKH) address const bitcoin = require('bitcoinjs-lib') let pubkey = Buffer.from('...
JBaczuk's user avatar
  • 7,418
2 votes

Extracting Bitcoin historical ticker data by setting up Bitcoin Node?

The Bitcoin Node is part of the blockchain network. It has nothing to do with markets and trading, and has no concept of a price. As far as the node is concerned, 1 Bitcoin = 1 Bitcoin, and that's it. ...
Raghav Sood's user avatar
  • 17.1k
2 votes
Accepted

How to send Bitcoin from one addresss to another using nodejs

Learn bitcore-lib npm package: Bitcore library provides a very simple API for creating transactions. Let's take a very simple transactions: var transaction = new Transaction() .from(utxos) ...
Ishwar Chandra Tiwari's user avatar
2 votes
Accepted

bcoin chainldb Resource Temporarily unavailable

You must be running testnet in another shell or some other script that has opened the chain database. Whenever you open chain database it gets locked so only one process is in charge of it. lsof -d ...
Node's user avatar
  • 316
1 vote

Implement HTLC manually by writing scripts

Yes... ... But it is going to be a lot of work. First you should look at BIP 199 which defines htlc scripts. However that alone will only tell you how to create a htlc output. But with the ...
Rene Pickhardt's user avatar
1 vote
Accepted

How do I specify many utxo in a bitcoin cash transaction?

const bch = require('bitcoincashjs'); const privateKey = new bch.PrivateKey('L1uyy5qTuGrVXrmrsvHWHgVzW9kKdrp27wBC7Vs6nZDTF2BRUVwy'); const utxos = [{ 'txId' : '...
MCCCS's user avatar
  • 10.2k
1 vote

can not access via RPC to litecoin node

I finally found how access the node from my laptop I just adding the following to the litecoin.conf file rpcallowip=0.0.0.0/0 I saw it in this Answer
Joseratts's user avatar
1 vote

How do I interact with Bitcoin Core from NodeJS?

I highly recommend looking at Bcoin. It is a full node implementation used by Purse.io but also includes a rich API for interacting with the Node and wallets. All of it running in NodeJS. ...
Paul Puey's user avatar
1 vote
Accepted

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'fromSeedBuffer' of undefined

Try using the bip32 module. Also there are a few other things you'll need to fix as well. See Use BIP39 to generate BIP32 addresses. Note, this will generate a P2PKH address, see getAddress() function....
JBaczuk's user avatar
  • 7,418
1 vote
Accepted

Transaction fee in Bitcored

Does the transaction fee of bitcored or bitcoind change everyday? It will often change because it will estimate the fee for certain confirmation targets (e.g. confirm within 4 blocks). The fee ...
Ava Chow's user avatar
  • 71k
1 vote
Accepted

Calculate Any Address Balance Using Bitcoinn RPC getrawtransaction

Bitcoin Core does not support querying an address balance. What you can do is import the address as watch-only into your wallet (using the importaddress RPC), and completing a rescan of the ...
Pieter Wuille's user avatar
1 vote
Accepted

Can I use walletnotify or blocknotify remotely with a NodeJS application?

In your example you are telling it to place the transaction id as a GET request in the URI under the tx parameter. walletnotify=curl http://My.IP.Address:PortAppUses/walletnotify.js?tx=%s All you ...
m1xolyd1an's user avatar
  • 5,666
1 vote

Error: Unknown network starting a bcoin node

bcoin.network.get().toString() returns main which is not a valid network string, it should be one of mainnet testnet simnet or regtest.
tuxcanfly's user avatar
  • 395
1 vote

bitcoin setup using nodejs

First and foremost, install bitcoin-core. I recommend compiling it yourself but there are binaries available for download. You'll want to perform all the steps in this tutorial - follow all steps for ...
Penquin's user avatar
  • 671
1 vote

How to watch for the transactions over blockchain via nodejs?

Consider using bcoin.js which is in pure JS. It fires events when a transaction takes place. Quite simply you can do: node.on("tx", (tx) => { console.log(tx.outputs, tx.inputs) }) Note that, ...
dionyziz's user avatar
  • 1,012
1 vote

Which language has better Bitcoin API experience, C# or Node.js?

API selection with other technology selection is having major dependencies on final goal. so you have to select the best suit of technology as per the business requirement.
Pranay's user avatar
  • 41
1 vote

Create OP_RETURN tx with Bitcoinjs-lib

For bitcoinjs-lib 3.2.0 (not latest): bitcoinjs = require('bitcoinjs-lib'); const wif = 'private-key-of-sender-in-WIF'; const sender = 'miq6AWvTYZJ63hJfh1W7zozHAf1URDv5pS'; const unspent_txid = '...
thalisk's user avatar
  • 483

Only top scored, non community-wiki answers of a minimum length are eligible