Hot answers tagged

4 votes
Accepted

How do I get transactions from the Bitcoin Blockchain with bcoin?

SPV Node SPV node watches your addresses on network broadcasts. So on SPV Nodes you won't be able to grab other transactions then your address. It communicates with other peers, fetches your ...
Node's user avatar
  • 316
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

How do I spend a non-standard P2SH transaction

First thing I noticed was the redeemScript, it's using OP_MUL which is disabled and you won't be able to use it in scripts. But I can show it using OP_ADD. If you want to play with bcoin and test the ...
Node's user avatar
  • 316
3 votes

What is bcoin and what is it used for?

bcoin is a Bitcoin protocol library written in Javascript for Node.js It offers a Full Node, SPV node, BIP44 wallet with multisig, address indexer, JavaScript events, and plenty of other features that ...
pinhead's user avatar
  • 4,992
3 votes

Missing transactions from full node

Bitcoin Core uses a 300 MiB limit for its mempool data structure by default. If enough transactions get submitted to the network, this limit will be reached and Bitcoin Core will start dropping ...
Murch's user avatar
  • 72.6k
3 votes

Missing transactions from full node

The full node you are running likely has the standard mempool size (300 MB) and default settings. At the moment (see e.g. https://mempool.space/), transactions with a fee less than 5.88 sat/vB are ...
deyw's user avatar
  • 478
2 votes
Accepted

How to import Multibit HD Wallet in bcoin?

MultiBit HD uses a BIP 32 derivation path that is different from basically all other wallet implementations. MultiBit HD's derivation path is m/0'/0/i whereas most wallets use derivation paths set by ...
Andrew Chow's user avatar
  • 68.5k
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
2 votes
Accepted

Bcoin - chain database location

Chain accepts parameter db, which can have multiple backends. By default it will be stored in memory. So this tip is coming from memory. If you want to store it to File(For example full node stores ...
Node's user avatar
  • 316
2 votes

How do I remove Wallet from Bcoin?

As Bucko commented in August 2017: Unfortunately right now there's no way to remove a wallet via the API in bcoin. There is a zap endpoint but I don't think it does anything yet. If you don't care ...
2 votes
Accepted

Resyncing bcoin brings up database version error

If you're running master, there was a recent migration that would cause this. you can run this to fix it: node migrate/chaindb2to3.js /path/to/chaindb.ldb That will take a very long time, but if ...
Thann's user avatar
  • 70
2 votes
Accepted

How to sign a raw multisig transaction from an external private key

The Bitcoin Wiki entry for OP_CHECKSIG answers your question. OP_CHECKMULTISIG works the same way, just applied to each signature in the sequence. First of all, it depends on the SIGHASH type you, as ...
pinhead's user avatar
  • 4,992
2 votes

Bcoin wallet always has unconfirmed balance

This probably helps you: https://github.com/bcoin-org/bcoin/issues/163 What we really needed was a "real-time" balance, and "confirmed" balance. So the simplest solution was: confirmed = what ...
user3399276's user avatar
2 votes

Is it possible to alter the source code and still have a valid Bitcoin transaction?

It depends what you change. If you don't agree with other clients on what is a valid transaction and what is a valid block, then you won't agree on who holds what bitcoins. How do miners know what ...
David Schwartz's user avatar
2 votes
Accepted

bcoin.io: Get TXs in reverse order

You're right, the reverse parameter was added recently and the example in API docs were not updated. https://bcoin.io/api-docs/#get-tx-by-address The method now accepts a second parameter which is ...
pinhead's user avatar
  • 4,992
2 votes
Accepted

how to create second node regtest bcoin

See https://github.com/pinheadmz/bcoin-guide/blob/master/week-2-nodes.md for a guide on how to connect two bcoin nodes in regtest. All you really need to do is configure one node to use non-default ...
pinhead's user avatar
  • 4,992
2 votes

Can I create an ordinals-like transaction using bcoin / btcwallet?

You can create any kind of script spend with bcoin but for taproot you will need to use the taproot branch which has not yet been sufficiently reviewed or released. You can follow along with this test ...
pinhead's user avatar
  • 4,992
1 vote

Redeem multisig tx using bcoin with multiple inputs (from an exhcnage)

That guide might be a bit outdated. There is a newer guide that just runs through the CLI commands here. You can also join us on bcoin slack or on IRC in the #bcoin channel. We'd need more information ...
pinhead's user avatar
  • 4,992
1 vote

BCoin bsock: listen to transactions and make sense of them

Looks like you are using console.log(`address: ${address}`) Which will call the custom inspect function here. What you need to do is be explicit and call address.toString('main') as defined here ...
pinhead's user avatar
  • 4,992
1 vote
Accepted

Different balance for same private key using bcoin and copay

There are several factors that could be causing the discrepancy. Make sure you are running the latest version of bcoin (v2.0.0 was just released) Make sure your node is fully synced to the testnet ...
pinhead's user avatar
  • 4,992
1 vote
Accepted

How to import an existing extended private key to bcoin?

What exactly do you have from Electrum? Is it an xprv... ? What you need to do is create a wallet and assign the master private key: https://bcoin.io/api-docs/#create-a-wallet bwallet-cli mkwallet -...
pinhead's user avatar
  • 4,992
1 vote
Accepted

How do I disable mining in `bcoin`?

Mining is disabled by default, it must be switched on with RPC commands: https://bcoin.io/api-docs/#rpc-calls-mining Keep in mind without additional hardware, bcoin can only effectively generate ...
pinhead's user avatar
  • 4,992
1 vote

Estimated Fees in BCOIN

Evebtually I decide to do it the curl way. By having my express app to make a simple GET http request to the bitcoin node, I managed to get the job done. Doing this with the request npm module is ...
Mario Mazzola's user avatar
1 vote

bcoin daemon killed over and over again [BCOIN]

At this time, bcoin requires nodejs version 10.0 or greater.
pinhead's user avatar
  • 4,992
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
Accepted

Default http port for lcoin?

lcoin listens on port 19336 by default, however you can set another port by using the --http-port=<your port> flag when starting the node
arshbot's user avatar
  • 1,710
1 vote
Accepted

Hardened address generation with BIP44 watch-only wallet with xpub

You are not deriving hardened child keys. You cannot derive hardened keys from an xpub. Just because the xpub itself is hardened does not mean that its children are.
Andrew Chow's user avatar
  • 68.5k
1 vote

Bcoin vs Bitcoin Core: query your node to list transactions of any address

bcoin can be run with —index-address or indexAddress: true in bcoin.conf. This will index all transactions by address, a feature I do not think is available in Bitcoin Core. You can read about the ...
pinhead's user avatar
  • 4,992
1 vote
Accepted

Creating a multisig wallet with bcoin and receiving transactions

There may be a few misunderstandings around BIP32/BIP44 key derivation and bcoin wallet usage in particular. I re-wrote your script below to demonstrate how to use bcoin multisig wallets and manually ...
pinhead's user avatar
  • 4,992
1 vote
Accepted

Create a transaction from a wallet coins (UTXOs) with the bcoin library

createTX() doesn't sign the transaction. That is performed by sign() in wallet.js. If your private keys are offline anyway, what kind of unexpected behavior are you getting from createTX()? It wouldn'...
pinhead's user avatar
  • 4,992

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