Questions tagged [bitcoinjs]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
239 views

Cannot read property 'toWIF' of undefined

I am working on a cryptocurrency site in which each user will have there own individual deposit address to put currency on site. I am using bitcoin-core, bitcoinjs-lib, along with quite a few other ...
0
votes
1answer
1k views

How do you sign data with a private key? [javascript]

Using BlockCypher’s signing tool (link), I can sign the following data: 05de69f5d37f41340eed3230f03d2394dde5e497738a76f027b7d962a0cbdf39 with the private key: ...
0
votes
1answer
878 views

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

I am getting Getting error at this line var root = bitcoin.HDNode.fromSeedBuffer(seed); UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'fromSeedBuffer' of undefined Here is ...
0
votes
1answer
211 views

Generating Output Script from Bitcoin.js or other Javascript Library

I'm attempting to use the Ledger Wallet API to sign a multi-sig transaction. The API works as follows: var inputs = [ [ "71f97fa2a21486ecd99674a8ae068d92acd2e9db49c199473be39984e6cbe0f6", "00000000"...
0
votes
1answer
141 views

Bitcoinjs module missing issue

I am trying to run this code with node and bitcoinjs-lib but I keep getting missing lib. Any idea what am I missing? I am on a Windows Server 2016. I try to create a P2SH address by hashing a ...
0
votes
1answer
144 views

How BitcoinJS sync bitcoin blockchain/transaction data?

I see the reference code in BitcoinJS website about 'Creating a Transaction': var tx = new bitcoin.TransactionBuilder() // Add the input (who is paying): // [previous transaction hash, index of the ...
0
votes
1answer
1k views

HD wallet implementation

I want to create public addresses in offline browser from master public key so that owner of master private can access the funds available in child address. but I am not able to understand how to use ...
0
votes
0answers
28 views

How to get raw tx in hex format by not fetching API from provider?

I've looking for some solution to encode raw transaction in hex format by programmatically without fetching data from any blockchain provider. Are there any way to do this?
0
votes
1answer
45 views

Can we sign a psbt raw tx having multiple inputs created from BTC node with bitcoinjs lib?

Due to secruity reasons, unavailablity of private keys on my end and as per project requirements I need to build back end apis where I will provide a PSBT raw transaction hex (having multiple inputs) ...
0
votes
0answers
41 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
85 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
1answer
78 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
229 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
112 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
40 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
3answers
502 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
836 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
0answers
31 views

How do you sign transactions from a HD wallet? [duplicate]

I'm using the following tool to generate a HD wallet: https://iancoleman.io/bip39/ However, it gives quite a few different private keys and I'm not sure which one is used to sign transactions with. ...
0
votes
1answer
177 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
497 views

Bitcoinjs-lib help with deterministc wallet

i'm learning about bitcoin, and bitcoinjs-lib (https://github.com/bitcoinjs/bitcoinjs-lib) I created a dummy wallet on coinomi using this mnemonic ('eight better wealth display father cave suffer ...
0
votes
2answers
560 views

How to change network on BitcoinJS-lib with Coininfo and generate Dogecoin address?

Can't find out how to change network on BitcoinJS-lib with Coininfo and generate Dogecoin address? In a Coininfo's example I found this: https://github.com/cryptocoinjs/coininfo#want-to-use-with-...
0
votes
0answers
64 views

Transferring partial BTC between wallets if I know both private keys [duplicate]

Is there a way to transfer/import partial amounts of BTC from one wallet to another off the chain in order to avoid transaction fees? I assume this is how services like Coinbase get around letting you ...
0
votes
1answer
250 views

Having issues broadcasting BitcoinJS transaction.

I'm trying to send testnet with bitcoinjs, but when I go to broadcast the hex, it gives me an error code that says "fee is too high: 12372928". Now, from my understanding, the fee is the input - ...
0
votes
1answer
115 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' : '...

1
2