Questions tagged [javascript]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
28
votes
3answers
47k views

How useful is a JavaScript miner?

I don't have a great understanding of how bitcoin mining works, but how useful would a JavaScript miner be for collecting revenue from visitors? Stupid question, but if I put the user in as part of a ...
13
votes
6answers
7k views

How can I stop websites running an integrated Bitcoin miner without disabling javascript altogether?

"Bitcoin Plus" is one example of a javascript bitcoin mining client that can CPU mine bitcoins through a browser when viewing a website. Here is a screenshot from 4bitcoins dot com which automatically ...
10
votes
3answers
14k views

Javascript Bitcoin miner is it even worth it?

I know that mining bitcoins via JavaScript is just pointless at this point in time, but is there any other altcoin that is worthwhile mining via a GPU/CPU via a JavaScript embedded into a web page? ...
7
votes
1answer
15k views

Byte array to hexadecimal and back again in JavaScript [closed]

I can generate a byte array with var myByteArray = window.crypto.getRandomValues(new Uint8Array(16)) and I get 181,143,16,173,231,56,63,149,181,185,224,124,84,230,123,36 I can then turn this into ...
6
votes
3answers
11k views

Is there a way to access Ethereum Smart Contract's variables by name in JavaScript?

Say I have a simple smart contract: contract Simple { string32 message; function Simple() { message = "Hello world!"; } } How can I easily access the message variable by name in ...
5
votes
4answers
5k views

Ripple testnet explorer

This is Ripple main Explorer. But where can i find the transactions ledger from wallets on Ripple testnet.
5
votes
1answer
564 views

Prevent rounding errors when displaying bitcoin values in javascript

What is the correct way to prevent Floating Point Precision errors when displaying bitcon values in javascript? I've seen many answers on the topic, but they all seem to have their drawbacks. Here's ...
5
votes
1answer
1k views

How do I remove Wallet from Bcoin?

I'm playing with bcoin cli and created lots of wallets. Is there any way to remove wallet via WalletDB Api?
4
votes
2answers
742 views

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

I am generating public key from my private key. I did in Java script and C#. but generated public keys are different. My Code in c# (KeyCore.NET): PrivateKey pv = new PrivateKey(Globals....
4
votes
1answer
966 views

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

Is there a bitcoin library or even just pure javascript way of signing and verifying you own a btc address?
4
votes
1answer
238 views

How do the JavaScript SecureRandom() vulnerabilities affect me?

A recent post on the Bitcoin-dev mailing list talks about multiple vulnerabilities in JavaScript SecureRandom() class. Apparently this class has been used in multiple cryptocurrency wallets that use ...
3
votes
1answer
1k views

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

I have a long list of 1million+ permutations of a 12 word BIP39 seed. How can I try them all on a bitcoin address? edit: I know the address and the 12 words but i don't know the order of the words
3
votes
1answer
244 views

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

Is this possible with bcoin? Do I need a full node to get transactions or does it work with an SPV?
3
votes
1answer
681 views

How can I verify my merkle root function is correct?

I've started playing with Bitcoin on a more technical level recently (I'm an experienced software developer but just a user of Bitcoin up until now). I'm trying to implement a function to calculate a ...
2
votes
2answers
304 views

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

AFAIU, copay's server implementation is bitcore-wallet-service. From its README, I can deduce that a multi-sig wallet will use the /v1/txproposals/ endpoint to create a new transaction proposal that ...
2
votes
2answers
439 views

how to use bitcoin blockchain be useful to authenticate documents?

have read a little about blockchains and found there is lot of blockchain npm libraries available. How can I take benefit of the bitcoin blockchain to authenticate documents : to obtain a proof a ...
2
votes
2answers
888 views

How can I check the hash of a bitcoin block?

Let's pick an example bitcoin block: #499583 This is the block: https://insight.bitpay.com/api/rawblock/000000000000000000677c4077da7c9f01dde5f332ba2fbff962ee699714d5da It starts with ...
2
votes
1answer
184 views

Bcoin - Database backend not found

/root/BCoin/node_modules/bcoin/lib/db/backends.js:16 throw new Error('Database backend "' + name + '" not found.'); ^ Error: Database backend "leveldown" not found. at Object.get (/root/...
2
votes
1answer
725 views

Bitfinex get credits and convert timestamp to JS Date

I'm fetching my active credits in BFX and trying to discover when I'll have my funding back. This is a response example: /v1/credits [{ amount: "294.4316181", currency: "USD", id: ...
2
votes
1answer
144 views

Resyncing bcoin brings up database version error

I was resyncing my bcoin node and got the following error: Error: Warning: Your database does not match the current database version. This is likely because the database layout or serialization ...
2
votes
1answer
601 views

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

I'm building an app and one of my features is being able to scan a bitcoin private key and then send a portion of its funds to another address. How can I do something like this in javascript or php? ...
2
votes
1answer
28 views

Ardor: How to decide if an asset can be send?

My (Javascript) frontend needs to decide whether the user can send an Ardor/Ignis asset in his account. My code checked for: quantityQNT >= amount_to_send But I realise that this doesn't work if ...
2
votes
1answer
94 views

I have a 100 character text message and I want to encrypt this message with my bitcoin “PUBLIC KEY” and decrypt it with my private key in Javascript

Are there any javascript libraries that can encrypt a 100 character text message using your bitcoin public key, but only be able to decrypt it with your bitcoin private key? I'm looking to create a ...
2
votes
3answers
321 views

Is there a website widget or javascript library that turns any Bitcoin address into a clickable widget?

Was wondering is there a javascript widget or library that turns any BTC address on a website into a popup QR code on hover?
2
votes
1answer
406 views

Websocket API: Uknown mtgox message type

Here's a bit of node.js code: var WebSocket = require('ws'); var ws = new WebSocket('ws://websocket.mtgox.com:80/mtgox?Currency=USD'); ws.on('open', function() {    console.log('Connection opened'); ...
2
votes
1answer
533 views

A NodeJS implementation on creating addresses from a Bitcoin (zpub, xpub) address

I'm looking for a lightweight node package which can handle creating btc receiving addresses on the server using an extended public key (segwit). Like this one: ...
1
vote
3answers
6k views

Is the bitdigger chrome extension fraud?

Today, while I was watching a video on YouTube, I found the video on the bitdigger extension that mine bitcoins with chrome browser. I just want to know if it is fraud or legit? Is it possible to mine ...
1
vote
2answers
81 views

How to use `scantxoutset`

Looking to fetch the UTXOs for a given address and can't seem to find the correct command syntax. Here is an implementation in bitcoin-core via javascript, but I also experience the same on bitcoin-...
1
vote
1answer
638 views

Creating Testnet Bitcoin Transaction with bitcoinjs-lib

I'm trying to setup a simple bitcoin testnet transaction using the bitcoinjs-lib npm module. It seems like I'm building the transaction correctly, and I receive the hex code but I think I'm unable to ...
1
vote
1answer
184 views

Bcoin crashes with node version error

I installed bcoin and I get this error about the version: $ node -v v8.2.1 $ npm -v 5.3.0 $ bcoin /usr/lib/node_modules/bcoin/lib/db/backends.js:26 throw e; ^ Error: The module '/usr/lib/...
1
vote
1answer
254 views

OP_EQUALVERIFY Problem

I'm making a full-service wallet, I already made the UTXOs selection algorithm and now I want to push the transaction hex bytes. It works when I push only a transaction with only 1 input, but if I try ...
1
vote
1answer
292 views

Derive next HD segwit address from xpub/ypub

I've been using the smartbit api to derive the next receiving address for a while now. However it only works for Legacy addresses and not Segwit addresses. I now have a Ledger Nano s and need a ...
1
vote
1answer
50 views

How can I generate the qrcode client-side that would be compatible with the Ardor Wallet qrcode

I'd like to generate a qrcode the same way the Ardor Wallet generates it, such that it would be compatible. I found qrcode related javascript shipped with the Ardor node download in ardor/html/www/js/...
1
vote
1answer
158 views

Can you explain this JS code?

Can someone explain this JS code to me please? Maybe line by line? I am trying to understand and learn from it. Is this code creating a raw transaction based on an existing redeemScript? Or is it ...
1
vote
1answer
182 views

Bitcoin - BitGO - Save all wallet objects into Array of Objects

My Setup: With the help of Mongoose module we handle all Mongo Database operations. For each new user a wallet is generated and stored inside a Mongo collection. METHOD: If we use User.find({}, ...
1
vote
1answer
2k views

avoid rounding errors in javascript with bigdecimal?

a user submits a buy request: 0.0104 BTC at a rate of 345.92 EUR config: var mode = RoundingMode.HALF_EVEN(); var satoshi = new BigDecimal("100000000"); user input: var btc_b = new BigDecimal("0....
1
vote
1answer
1k views

Get a JavaScript notification when Bitcoin transaction arrives to a certain address

I'd like to implement a very simple address monitoring feature on a site I'm working on. I'd like to just be able to say "Listen to this address on the testnet for money to come in", and update the ...
1
vote
2answers
2k views

How do I use Blockchain.info's Receive Payments API with node JS / Express?

Blockchain has great documentation for PHP, but nothing really for node! Does anyone here have any projects,where they used the blockchain.info Receive Payments API, in their node apps, to receive ...
1
vote
1answer
470 views

Is BitcoinJS under active development?

I love the idea of a powerful alternative to bitcoind, and especially the ability to subscribe on blockchain events and easily process them on the server side. However, I see the last activity on ...
1
vote
1answer
308 views

Ardor API: Not able to use POST requests with Axios due to CORS issues [closed]

I am having issues with POST requests to the Ardor API. This code: <!DOCTYPE html> <html> <head> <script src="https://unpkg.com/axios/dist/axios.min.js"></script> &...
1
vote
2answers
87 views

Bitcoinja-lib. bitcoin.payments is null

I installed bitcoinjs-lib with command: meteor npm install bitcoinjs-lib. The installation command "flow-typed install -f 0.27 bitcoinjs-lib@2.2.0" didn't work. No idea what flow-typed is and the ...
1
vote
0answers
96 views

Wordpress exchange platform [closed]

Hello from where I should start to built my own cryptocurrency exchange and Fiat/crypto exchange on wordpress? What steps I should take to built that kind of platform? I have some knowledge of ...
1
vote
0answers
326 views

Decrypting BitcoinJ/MultiBit key (scrypt/aes-256) from protobuf with NodeJS

I'm trying to decrypt an encrypted private key from an encrypted Multibit Classic .wallet file but the resulting public key / wif doesn't match the original. Here is my code: 'use strict' var fs = ...
1
vote
0answers
49 views

How to sign messages deterministically with bitcore?

How do you sign messages deterministically with bitcore?
0
votes
1answer
1k views

Coinhive for bitcoin/ethereum

I know that CPU mining wouldn't pay for electricity bill, but what if some sort of CPU miner was deployed to a website? Similarly to CoinHive with Monero. Would such mining make sense? I started ...
0
votes
1answer
23 views

JavaScript Mining System Design

How do I verify a unconfirmed transaction using JavaScript ?
0
votes
1answer
68 views

Javascript library or code that can convert an “uncompressed” bitcoin private key to a compressed one

I forked a pretty old brain wallet generator: https://dvdbng.github.io/memwallet/ -- Currently it generates uncompressed bitcoin private keys. Is there a javascript library that can convert an ...
0
votes
1answer
603 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
177 views

Creating a raw bitcoin transaction and signing it with the private key using php and javascript

I have a full bitcoin core node setup and would like to use it to just "broadcast" my signed transactions. But what is required to make a raw transaction using PHP and Javascript? The variables I have ...
0
votes
1answer
2k views

generating private key from bip39 seed

according to bip39, I maked 12 mnemonic words and then get a 512 bit seed from them. now I want to know how must I convert this seed to private key ? what functions must I use ? please introduce me ...