Questions tagged [javascript]
JavaScript is a high-level programming language widely used for web development.
102
questions
1
vote
1
answer
85
views
How to get the private key & wallet address using a multi-wallet recovery seed phrase?
How can I „convert“ a 12-words-long multi wallet seed phrase (of the Blockchain.com wallet) to the wallets private key and the wallets address using any programming language?
The given multi wallet ...
2
votes
1
answer
179
views
How to spend from a custom P2SH script using bitcore-lib
My Javascript/typescript project uses bitcore-lib. It uses Script.buildScriptHashOut to build custom P2SH outputs. How do I spend from this custom output?
0
votes
0
answers
17
views
Customizing the algoritm of the private key of Bitcoin (js)
Is there a way to change the Bitcoin private key creation algorithm so that only private keys are created whose extracted addresses start with "1a"?
A guide on the feasibility of this idea ...
0
votes
0
answers
57
views
Generate a Bitcoin taproot address with specific prefix for burning assets
I would like to generate a bitcoin taproot address (bc1p) for burning assets. Which means not one would have the private key. But in the mean time I would also want a vanity address (an address start ...
0
votes
1
answer
31
views
Recreate Java code in python
I have a java code that I need to pass to python but I don't know which libraries to use and how to start and if you can help me I would really appreciate it
MNEMONIC = "twenty four mnemonic ...
2
votes
1
answer
57
views
Invalid checksum when generating BIP-39 Mnemonic
I am trying to generate a mnemonic seed in Javascript, and while everything seems to be working, I am not getting a mnemonic with a correct checksum. Here is my implementation:
export const ...
3
votes
1
answer
96
views
How do descriptors work with miniscript in the library bitcoinerLab?
What I want is to be able to spend the funds from an address, either with its private key or with the private key of another address that I designate in the policy.
As I understand it, it works like ...
0
votes
0
answers
37
views
How to sign a PSBT with BitcoinerLAB?
First of all, We are using bitcoinerLab.
From the seed, we generate the Master Key, and with the path, we create the child key 0 (the parent's) and child key 1 (the child's). Now, from these keys, we ...
0
votes
1
answer
39
views
How to implement stake.com model of deposit & withdraw flow for my crypto poker casino?
In stake.com for each user they generate separate bech32 address for deposit & displays the deposited amount as balance in top of the navigation bar.
Similarly for withdraw they just ask for the ...
1
vote
1
answer
47
views
How to send a Bitcoin transaction only using the seed phrase using NodeJS?
I am working on a NodeJS script that allows you to enter your 12-words-long Bitcoin secret recovery phrase and automatically withdraw all of your coins to a defined wallet address.
The script is for ...
0
votes
1
answer
675
views
how to place a bitforex api buy order
I have read the documentation for BitForex on placing a buy order here:
https://github.com/bitforexapi/API_Doc_en/wiki/Order
Then after understanding that, I read the API Call Description ...
0
votes
1
answer
430
views
Is it possible to talk to bitcoin RPC API with Javascript and WITHOUT using a node server?
I am planning on building a Wallet and want to know if I can hook something like an Electron native JavaScript app to Bitcoin RPC without running node.js for the server calls, so using something like ...
0
votes
1
answer
894
views
Signature for this request is not valid
im testing the binance api but cant get over the signature problem can u spot a mistake on my signature?:
const crypted = CryptoJs.HmacSHA256("timestamp=" + new Date().getTime().toString() + "&...
0
votes
1
answer
156
views
How to create an application which constructs a transaction using `bcoin` (javascript)?
I am new to development. I am working on a project and I am trying to use bcoin.
I want to create an application which has a UI, where the user will be asked to enter Destination address and amount. ...
1
vote
2
answers
133
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 ...
0
votes
1
answer
107
views
bitcoinjs-lib is installed but cannot use its functions
I've installed the latest version of bitcoinjs-lib but I cannot use the functions of the library.
I get errors like:
const keyPair = bitcoin.ECPair.fromPrivateKey(Buffer.from(privateKey, 'hex'), { ...
0
votes
2
answers
193
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 ...
1
vote
1
answer
168
views
How to make bitcoin hd wallet in typescript?
I am trying to create HD wallet for bitcoin.
I have developed an Ethereum wallet, but I am having a hard time making a Bitcoin wallet.
In my case, I am developing a server using Golang and Typescript.
...
0
votes
1
answer
92
views
What are some different ways to retrieve btc transaction information of an address using bitcoinjs?
What are some different ways to retrieve btc transaction information of an address using bitcoinjs?
I've tried using the syntax from this page (https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/...
2
votes
1
answer
1k
views
Uncaught TypeError: bip32.fromSeed is not a function
I am trying to run the below code to print the private key, the Public key and the mnemonics, but getting Uncaught TypeError: bip32.fromSeed is not a function :
//Import dependencies
const bip32 = ...
1
vote
3
answers
928
views
The best JavaScript libraries supporting Bitcoin Core?
I have downloaded and installed Bitcoin full node on my Linux server and I'd like to start working with the bitcoin core to create wallet, addresses, and transactions. What is the best JS libraries ...
1
vote
1
answer
600
views
Is there a Base58 encoder function that runs in pure javascript without node?
I see a lot of JavaScript Base58 encoder functions online, but all of them seem to require node. Is there a simple JavaScript Base58 encoder that will just run in the browser without any node ...
0
votes
1
answer
2k
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:
...
1
vote
2
answers
620
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 ...
0
votes
0
answers
62
views
Cannot unserialize chainstate transaction outputs after de-obfuscation
I was able to read chainstate database.
Getting the key and de-obfuscating to get a valid last block.
However, when it comes to transactions that follow after that,
I cannot de-serialize them no ...
0
votes
1
answer
499
views
generating a zprv from a base58 rootKey with bitcoinjs-lib
var bitcoin = require('bitcoinjs-lib');
let bip32 = require('bip32');
let rootKey = 'xprv9s21ZrQH143K32CfqoCQHtbKiEb5BqFazXX6jCtNCnuty3gUjxS4CsXWi9rcNyHdjDVPiC6P1bnyEZr2ioouRq56h6HAdwejeTty1BsSEtL'
...
0
votes
1
answer
208
views
Using Javascript, I want to generate a segwit private key (zprv) similarly to how I am generating my legacy base58 extended private key. How?
let bip32 = require('bip32');
let bip39 = require('bip39');
let { bech32, bech32m } = require('bech32')
const seed = bip39.mnemonicToSeedSync('rural catch say tooth tell soul road pilot fee board ...
1
vote
2
answers
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 ...
0
votes
0
answers
55
views
Cryptocurrency Wallet 3rd party access
Do Crypto wallets such as Exodus etc have something like an API? For example is it possible to perform a cryptocurrency transaction directly from the web browser client (using the specified amount and ...
0
votes
1
answer
33
views
Distinguishing bitcoin deposits
If i had a central Bitcoin wallet, and then allowed 3 different people to deposit bitcoin into that address, would there be anyway to distinguish who they are, without knowing who's address is who, i ...
1
vote
0
answers
68
views
Bitcoin Script - Beautify
My question is if something exists to do the job in the opposite direction of miniscript.
Miniscript's intention is to help:
...writing (a subset of) Bitcoin Scripts in a structured way, enabling ...
2
votes
2
answers
1k
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
0
answers
127
views
How can I use PSBT in a JavaScript project?
I am trying to use PSBT in a Bitcoin project.
The idea is to generate keys and sign transactions client-side.
I am already familiar with bitcoinjs-lib but I find the API rather complicated.
It would ...
0
votes
2
answers
664
views
Generating Bitcoin address from private key in browser console
I am a newbie Bitcoin evangelist and I have a recommendation to see all the code responsible for computing yourPublicKey from yourPrivateKey, especially for big deal addresses.
The easiest way to ...
1
vote
2
answers
616
views
Understand how transaction size and fees calculation works in caravan
Looks like there is no activity in caravan github repository so maybe someone here can help me with this issue. Already mentioned everything in the below link however my three basic questions are:
...
2
votes
0
answers
53
views
Sign transaction externally
I create a transaction with inputs from a given address / public key without signatures. Every input needs to be signed. I use a different method to generate the signatures so I can't provide a ...
1
vote
0
answers
485
views
bitcoind: How to get rawblock data with ZeroMQ
I am trying to use the zeromq api for bitcoind to get rawblock but its not working with the code I've provided below. I am able to get hashtx and rawtx if I remove the filter but not hashblock and ...
6
votes
5
answers
8k
views
Ripple testnet explorer
This is Ripple main Explorer. But where can i find the transactions ledger from wallets on Ripple testnet.
2
votes
1
answer
2k
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: ...
6
votes
1
answer
2k
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?
2
votes
0
answers
327
views
How to connect to an ElectrumX server using JavaScript WebSockets?
I'm trying to connect to an ElectrumX server from an HTML webpage. But I can't get a working connection.
I've tried with many servers from Electrum's servers.json list but none worked.
Here's the ...
1
vote
0
answers
28
views
Is there any 'Metamask-like' app for Bitcoin? [duplicate]
9 months ago someone asked this same question: Metamask-like web3 inject for bitcoin but I was wondering if there had been be any changes since then.
I'm currently looking for a Chrome extension that ...
0
votes
1
answer
70
views
how to sign a multiple output transaction
currently i m using below code,how to add multiple address to address.
let transaction = new bitcore.Transaction()
transaction
.from(txoSet)
.to( ...
1
vote
1
answer
691
views
How do I get old blocks while running a pruned node?
Hello I'm trying to build a NodeJS app that fetches Bitcoin blocks, potentially old ones, and I'm running into issues. I've downloaded Bitcoin Core but I don't have enough space to run a full node and ...
0
votes
0
answers
71
views
How can i mine bitcoins to direct wallet using JavaScript?
I heard that we can mine bitcoins using javascript direct to the wallet?
How can I create Program, script or application which direct mines to the wallet & I even search online but did not get ...
0
votes
0
answers
174
views
broadcasting bitcoin transaction issue using bitcore-explorers
I have been trying to do a transaction using bitcore-lib. I have successfully created transaction object.
let bitcore_transaction = new bitcore.Transaction()
.from(utxos[0])
.to(to, +...
0
votes
1
answer
46
views
JavaScript Mining System Design
How do I verify a unconfirmed transaction using JavaScript ?
0
votes
1
answer
1k
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 ...
10
votes
1
answer
32k
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 ...
1
vote
3
answers
7k
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 ...