12 votes

Javascript Bitcoin miner is it even worth it?

It is true that mining Bitcoins like this is impossible. (I can't speak for altcoins though.) Let us run through a back-of-envelope calculation based on some facts and assumptions. Network hash rate ...
Nayuki's user avatar
  • 882
12 votes
Accepted

Byte array to hexadecimal and back again in JavaScript

Here's something you can copy-paste in. byteArray = new Uint8Array([181,143,16,173,231,56,63,149,181,185,224,124,84,230,123,36]); function toHexString(byteArray) { return Array.prototype.map.call(...
Nick ODell's user avatar
  • 29.4k
7 votes
Accepted

Bruteforce bitcoin address - I know the words + public address but not the order

Doing this requires three things: Permutations of the seed words The address you're trying to locate The derivation path for that address. In this specific case, the address is the one this puzzle ...
Raghav Sood's user avatar
6 votes
Accepted

how do you sign and verify a message that you own a bitcoin address using javascript?

bitcoinjs-lib and bitcore-lib are both javascript libraries that allow for key signing. For example with bitcore-lib: var Message = require('bitcore-message'); var privateKey = new bitcore....
m1xolyd1an's user avatar
  • 5,626
6 votes
Accepted

What's the POST endpoint to broadcast a transaction in copay's server?

Multisig and singlesig wallets use the same flow. A Tx proposal need to be created in singlesig wallets also. Copay syncronize across devices, so you can have a non-signing copayers in a 1-1 wallet ...
ematiu's user avatar
  • 233
6 votes

Uncaught TypeError: bip32.fromSeed is not a function

I believe by now you should've figured it out but if you haven’t this is how I resolved it. const ecc = require('tiny-secp256k1') const { BIP32Factory } = require('bip32') // You must wrap a tiny-...
iamnotstatic's user avatar
5 votes

Javascript Bitcoin miner is it even worth it?

First off, without the visitor's consent it would be unethical. Besides that, no it is not impossible. In the past there were sites doing that getting a fee for the service and providing the profits ...
karask's user avatar
  • 2,530
5 votes
Accepted

How do descriptors work with miniscript in the library bitcoinerLab?

Update [2023-Nov-15]: This answer has been updated to reflect the changes in v2 of the library. As the author of the @bitcoinerlab/descriptors library, I'd like to provide some clarification on the ...
landabaso's user avatar
  • 248
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

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
4 votes

Ripple testnet explorer

There is a variant of viewing the transaction history at a certain address: http://ripplerm.github.io/ripple-wallet/ Dont forget to switch the network to the test in the upper left corner. Good luck =...
Дима Марков's user avatar
4 votes
Accepted

How can I check the hash of a bitcoin block?

Seems to me that you are hashing the whole block instead of header only. Take my code (in C++). void test ( ) { const MyByteArray header ( QByteArray::fromHex ( "00000020" // version "...
amaclin's user avatar
  • 6,720
4 votes

How to use `scantxoutset`

You are trying to use a mainnet encoded address on testnet. That is not valid. You need to use a testnet encoded address. The testnet form of the address you are trying to use is ...
Ava Chow's user avatar
  • 70k
4 votes
Accepted

How to build a transaction using bitcoinjs-lib

In P2SH, the output script is created by applying HASH160 (SHA256+RIPEMD160) to the redeem script, which is then revealed at spend time. So if you created the previous output, you should know what the ...
Vojtěch Strnad's user avatar
3 votes
Accepted

Is the bitdigger chrome extension fraud?

I just want to know is it fraud or legit? I have never used it. But: It's not profitable. Big mining pools use ASICs to mine bitcoins. In the past, people used GPU. But mining in your browser means ...
hardfork's user avatar
  • 2,107
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

Is the generated Public Key from Private Key Unique in Bitcoin?

The base58 number 16w4zZWjWnhfEasJcSbfDQeHJRk1LytPHF5ir1ZS9mtUD5adsdH is a base58Check encoding of the (compressed) public key: 030d4018f164d58e41e0c5fb99eb5ec26b4f21fc8ad0db726d51a7cce60c75df0a ...
Sven Williamson's user avatar
3 votes
Accepted

How can I verify my merkle root function is correct?

Most likely, you have some endian-ness issues. Remember that the merkle root published is in little-endian and so are the transaction hashes. You'll have to reverse them and then calculate merkle ...
Jimmy Song's user avatar
  • 7,759
3 votes
Accepted

Bitfinex get credits and convert timestamp to JS Date

The problem is not with the timestamp, it's with your method of converting the timestamp to local time. As this SO question describes, convert it this way: var dt = new Date(0); dt.setUTCSeconds(...
morsecoder's user avatar
  • 14.1k
3 votes

How to use `scantxoutset`

I resolved this. Here is the functional command: client.command('scantxoutset', 'start' ['addr(mfe87Qheq7SSveCDedyDUBEjMD9tgzRiU7)']) <!-- Address is valid. This address: '...
Michael's user avatar
  • 173
3 votes
Accepted

Understand how transaction size and fees calculation works in caravan

The fee rate is pulled here: export function fetchFeeEstimate(network, client) { if (client.type === BLOCK_EXPLORER) { return blockExplorerGetFeeEstimate(network); } return ...
Destry's user avatar
  • 46
3 votes
Accepted

How to make bitcoin hd wallet in typescript?

Paul Miller has created a number of modern typescript libraries to help with this: https://github.com/paulmillr/scure-bip39 https://github.com/paulmillr/scure-bip32 https://github.com/paulmillr/micro-...
aulneau's user avatar
  • 46
3 votes
Accepted

"Witness program hash mismatch" code -26 when broadcasting a transaction

"Witness program hash mismatch" in a Taproot script path spend means the Taproot commitment wasn't successfully verified, in other words the internal key tweaked with the taptweak hash (...
Vojtěch Strnad's user avatar
2 votes

Javascript Bitcoin miner is it even worth it?

I think there are some great answers here, hopefully this isn't too repetitive... First, the metric you gave (2m daily unique visitors) is a great number, but it's not the right one when you're ...
JJ Geewax's user avatar
  • 355
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 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

How to send portion of funds from a private key programmatically?

You can either use your own bitcoind server or you can use a 3rd party API service. Let's do a few examples of what you are asking. I'll use short fake addresses and private keys as examples to make ...
m1xolyd1an's user avatar
  • 5,626
2 votes
Accepted

Is the generated Public Key from Private Key Unique in Bitcoin?

To a private key corresponds a unique public key. In your case, 16reZXagkyToongduimD25SEerXwP3MQ4n is an address (the hash + encoding of a public key).
hartmut's user avatar
  • 681
2 votes
Accepted

Coinhive for bitcoin/ethereum

I did this, actually! In terms of disclosure, @eric allam is absolutely correct, above; you should let your users know that's going on, at a minimum, and ideally have some sort of "Start mining" ...
Will Jobs's user avatar
  • 136
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 ...

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