Questions tagged [bitcoinjs]

BitcoinJS (bitcoinjs-lib) is JavaScript Bitcoin library.

GitHub repository: https://github.com/bitcoinjs/bitcoinjs-lib

90 questions
7
votes
1 answer

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

At the moment it seems to me on the .NET side NBitcoin would compete with Bitcoin.js on the other. Update: I decided on NBitcoin. It has a great book to learn from. Note I will not form opinion on my question, I contributed a great chunk of this…
nopara73
  • 796
  • 5
  • 21
7
votes
1 answer

How to use bitcoinjs with TestNet?

One of my colleagues is trying to use bitcoinjs with TestNet, but apparently it doesn't like TestNet headers, so it doesn't work. Is there any way to make to use bitcoinjs with TestNet? Is there some specific configuration needed?
ThePiachu
  • 42,931
  • 25
  • 138
  • 347
6
votes
1 answer

How to use bitcoinjs-lib with Regtest?

I was trying to use the bitcoinjs-lib (1) with my regtest network. More specifically I was trying to build a tx with TransactionBuilder but it gave me a 'transaction has no matching Script' exception. In a closed github issue (2) I find out that…
joe.js
  • 582
  • 3
  • 14
6
votes
1 answer

Is there a good tutorial on how to use bitcoinjs exit nodes?

The documentation that I found seems to contain info about specific API calls, but no top level explaination/example. Where can I find a practical concise example of using exit nodes? I'd like to query transactions (say ... poll to see all latest…
ripper234
  • 26,452
  • 30
  • 111
  • 246
5
votes
1 answer

Are there live BitcoinJS Exit Nodes?

Where can I find some live (trusted?) BitcoinJS Exit Nodes? I'm looking it it from the client perspective - I want to write a Java app that doesn't store a blockchain. I don't want to setup an exit node, rather I want to find and use existing ones.
ripper234
  • 26,452
  • 30
  • 111
  • 246
4
votes
1 answer

How do you validate a bitcoin address using bitcoinjs library in javascript?

How would one validate a bitcoin address using the bitcoinjs library? Or is there another way to do this via javascript?
Patoshi パトシ
  • 10,956
  • 18
  • 80
  • 151
4
votes
2 answers

How do you broadcast a transaction programatically?

What is the best way to broadcast a transaction to the network programatically? I know that blockchain.info has /pushtx but I'm pretty sure it rejects XHR requests from external sources because of CORS.
4
votes
1 answer

Do all implementation of Deterministic RFC6979-compliant ECDSA signatures generate the same signed transaction given the same data?

So if I were to create the same transaction using bitcoinjs and bitcoinj, the end result of the signed transaction would be the same with both libraries, is that correct?
User134
  • 115
  • 3
4
votes
4 answers

Preventing the exposure of public addresses on a website

Rather than having a single, fixed address, I want to generate a new address on my website every time a user request comes in. I'm concerned about google or another web crawler indexing my website and tying my Bitcoin address to my website…
ken Code
  • 41
  • 2
3
votes
3 answers

How do you switch your bitcoinjs integrationfrom TransactionBuilder to transactions-psbt.js?

the code below works: const btc = require('bitcoinjs-lib'); var tx = new btc.TransactionBuilder(net); inputs.forEach(o => tx.addInput(o.txId, o.vout)); outputs.forEach(o => tx.addOutput(o.address, o.value)); tx.sign(0, owner); var body =…
ekkis
  • 167
  • 10
3
votes
2 answers

How to sweep a segwit bech32 private key?

I'm testing segwit bech32 addresses and generated the following using bitcoinjs: address: bc1qc7u5njf4nf2rj3zys642mfc7nct6kdven8j4e9 private key: 5Kkzs8XrJNAmf9VQDFeGBfaRvSByAvPK6DbDXw5BVqswWaXSG2Y When I import this private key into electrum 3.0.5,…
3
votes
1 answer

How to push a raw transaction using BitcoinJS (and Request)?

I'm using BitcoinJS to create a playground for Bitcoin transactions. I have created the following Javascript file: const request = require('request'); const proxiedRequest = request.defaults({proxy: "http://localhost:3128"}); const Btc =…
3
votes
1 answer

Understanding signing messages with bitcoinjs-lib

I'm trying to understand what a specific line of code does when signing a message using bitcoinjs-lib. Here's the code: var bitcoin = require('bitcoinjs-lib') var bitcoinMessage = require('bitcoinjs-message') var keyPair =…
3
votes
0 answers

BitcoinJS with no storage?

I have a use-case where I'd only need to be monitoring the mempool transactions and recently-committed blocks/transactions (the last month's worth of blocks would be sufficient). Is there a way to tell bitcoinjs to not store the whole blockchain,…
2
votes
1 answer

How to fetch all UTXO from a SPV wallet using bitcoin-filter.js (or other lib)?

I am using bitcoinjs-lib to create private key (WIF), addresses and sign the transactions. I would like to fetch all transactions (UTXOs) associated with a wallet. I found these libs: bitcoin-filter and bitcoin-net . But I didn't understand the…
le0
  • 187
  • 5
1
2 3 4 5 6