Questions tagged [bitcoinjs]

BitcoinJS allows you to create webpages that pull information from the blockchain.

21 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
211 views

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 ...
2
votes
0answers
146 views

How to send & receive bitcoin using bitcoinjs-lib?

First I create HD Wallet using BIP32 using mnemonics. Now I want to generate new child addresses with private key using xpub & xpriv for every receive. Then for example, I received BTC in 2 ...
1
vote
2answers
42 views

How to verify the compressed signature in Bitcoin? It is 138 long in hex

I am using the bicoinjs-message npm module for signature verification. I learned that there are few signatures which are of length 138 in hexadecimal. When I tried to verify such a signature it is ...
1
vote
0answers
231 views

bitcoinjs-lib seems to skip a step in deriving addresses from a BIP 44 wallet

According to this wiki page to create a bitcoin address, 1) you have your public key of the properly derived path 2) Then SHA256 it 3) Then RIPEMD-160 it, Add version byte at the front and boom ...
1
vote
0answers
71 views

Using blockcypher BitcoinJs at clientside is secure or not?

I am trying to create new transaction using bitcoinjs at client side. Is it a secure way to create a transaction from Client side, which includes curl call. Scenario, if I start from creating the new ...
1
vote
1answer
404 views

How to get unspents for inputs using bitcoinjs-lib?

I would like my simple wallet app to automatically select UTXOs for inputs. I realize that I can't accomplish this with just bitcoinjs, but is there something I can add to it to keep track of unspents?...
1
vote
0answers
105 views

BItcoinjs - safest way to manage wallet on a potentially untrusted device

As per the title, what would be the safest way to run a Bitcoin wallet on a potentially untrusted device, such as a mobile phone? The question assumes the usage of bitcoinjs-lib (which allows, among ...
1
vote
0answers
1k views

Getting wallet balance with BitcoinJS + Bitcoin-lib (client lib)

I have server with BitcoinJS and Bitcoin ExitNode running. I try to fetch wallet balance from client with code from manual on wiki page. I have send money on client generated address, but app says ...
0
votes
0answers
17 views

Using a bitcoin library to create digital signatures in TypeScript/Javascript

I have been trying to sign my transactions with a digital signature for the past few days but seems that libraries in bitcoin, as far as to my knowledge do not provide a simple way to sign the ...
0
votes
1answer
42 views

How to calculate fee in BitcoinJS raw transaction?

I have a transaction with 3 inputs and 2 outputs. 1output is the recipient and the other output is change address. How should I calculate the fee and apply it to output?
0
votes
0answers
119 views

Bitcoinjs Transactions using PSBT in Bitcoinjs Lib

I am trying to use the bitcoinjs lib to create a tx using PSBT const testnet = Bitcoin.networks.testnet const tx = new Bitcoin.Psbt(testnet) I am not using transaction builder as it throws ...
0
votes
1answer
57 views

How to get BTC transfer amount from raw tx using bitcoinjs

Suppose I have following object console.log(bitcoinjs.Transaction.fromHex(rawTx)); The output Transaction { version: 2, locktime: 1655960, ins: [ { hash: <Buffer dc 4d aa 10 db ...
0
votes
1answer
201 views

Tracking incoming transactions using nodejs and own node

I need to verify that user from my database has sent btc to my wallet. Ideally I want to generate a unique address for each user transaction and then track all those addresses but I suppose it will ...
0
votes
0answers
23 views

How to use psbt.addBip32DerivationToInput

I want to include key derivation path for input in psbt file but do not understand how. I tried adding 'path: "m/44/0/0/0"' to addInput() but this does not seem to work. Then I found ...
0
votes
1answer
137 views

Why do I get: Error: <address> has no matching Script

The example code for psbt.addOutput() with address '1KRMKfeZcmosxALVYESdPNez1AP1mEtywp' works as expected. But if I change this to an testnet address I get this error: ' has no matching script'. I ...
0
votes
1answer
85 views

How to get Bitcoin input transaction hash string from bitcoinjslib Transaction object?

I'm using bitcoinjs-lib and its Transaction object. Transaction.ins is an array of objects, each which has a hash and script property. Both of these properties are Uint8Arrays. I am trying to get ...
0
votes
0answers
32 views

Sign a Partially Signed rawtransaction with bitcoinjs-lib

I was trying to figure out how to use the bitcoinjs-lib. I was thinking if I could sign a partially signed raw transaction in bitcoijs-lib. For example - If I have a hex String whose input1 is ...
0
votes
2answers
293 views

how to generate bitcoin adddres using seed?

Hi i am new to bitcoin all i want to know is how to generate address using mnemonic seed? let testnet =Bitcoin.networks.testnet; let keypair =Bitcoin.ECPair.makeRandom({network:testnet}); let address=...
0
votes
1answer
682 views

How to retrieve readable private key from bitcoinjs-lib

I'm still new to bitcoin and experimenting a lot with bitcoinjs-lib in JavaScript. How do I create a readable string from a private key? This is my current setup: const seed = bip39....
0
votes
1answer
164 views

Looking for JS/Node.js code example to sign a transaction (with multiple UTXOs) with only the extended private key

Is there any Javascript code out there or examples on how to sign a transaction by using the extended-private-key? What I am essentially looking for is code that will help derive the private key, ...
0
votes
1answer
108 views

how to create a transaction that can only run in bch-abc using javascript?

I use the "bitcoincashjs" or "bch-lib" and want to add a new opcode "OP_CHECKDATASIG" to output.How to do? const utxo = { 'txId' : '...