Questions tagged [java]

Java is a programming language.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

BTC Taproot sign transaction [closed]

I am new to taproot and trying to create taproot transaction I am using java library bitcoinj and is only support send to P2TR address and create addresses with witness v1 with some problems which i ...
Artemiks L's user avatar
1 vote
1 answer
69 views

Programming Bitcoin exercises in Java instead of Python

First I want to thank Jimmy Song for pointing me to this site. I'm running into a small problem with Chapter 4 Exercise 5: Find the Address corresponding to the public keys whose private key secrets ...
Gringo Golf's user avatar
0 votes
1 answer
72 views

pokkst/litecoinj message verification problem - Address.fromKey() returning wrong address [closed]

I have a problem with java library pokkst/litecoinj. I am using the regular bitcoinj library to verify signed messages with success. As pokkst/litecoinj is a fork of bitcoinj I have expected it to ...
hc0re's user avatar
  • 101
1 vote
1 answer
387 views

Generating HD Wallet Addresses in Java Using Bitcoinj

Is there some method that can be used to get the address, private and public key for any type of supported coin in a HD wallet? I can correctly generate these for Ethereum, which I verified on https://...
Bob Marshall's user avatar
1 vote
1 answer
153 views

Can I always set the first byte to 0x02 with the following implementation?

I've followed this tutorial on generating a Public Private key pair value and generating a valid Bitcoin address. But one part makes me wonder if the implementation is done correctly which is the ...
Purple Gang's user avatar
1 vote
1 answer
273 views

How I can get all adresses from WIF private key?

I use Java and bitcoinj. I have a private key String str="5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf"; I try to get compress and decompress 2 adresses in this format: ...
Samanta Fox's user avatar
1 vote
0 answers
104 views

Java bip32 library

I'm looking for java library that will cover bip32 address derivation (xpub to P2PKH, P2SH, P2WSH, P2WPKH, P2SH-P2WPKH). There seem to be a lot of libraries covering P2PKH, but not much else (like ...
Tony Sanak's user avatar
  • 1,664
0 votes
0 answers
235 views

Generate P2SH bitcoin address from WIF in BitcoinJ Java

I'm trying to create P2SH-Segwit bitcoin address from the WIF private key. I'm using the BitcoinJ library in Java. See the following code. String base58PrivateKeyString = "...
Lakshitha Kanchana's user avatar
0 votes
1 answer
632 views

How to transform a private key into an ECKey?

I´d like to construct an ECKey from a hardcoded private key but it´s not working... First try If I run the code in this example the key import is working just fine. But since I actually want so send ...
Greta's user avatar
  • 101
0 votes
1 answer
167 views

Add bitcoin payments to java app using BitcoinJ

I need to add Bitcoin payment to my application using the BitcoinJ library, but I'm new to using Bitcoin. I have one thought To create a new address for each new user, but I don't know if this is the ...
Oleksii Tulei's user avatar
0 votes
1 answer
159 views

API for automatical buying and selling coins in Java [closed]

I need to create a simple bot for buying and selling coins and the programming language needs to be Java due to some technical specifications. These are the functions which I need from that API: buy(...
Jakov's user avatar
  • 103
0 votes
0 answers
20 views

How to create signature for the payload (data)using private key in java with bitcoinj? [duplicate]

I have private key as 'cUN9LNcEC54HAbWAwUs6coPSc72TcQYzxf4qSqdHJPVKSapeHzFj' and payload as 'hello', now how to create the signature for this payload using private key in java with bitcoinj library? ...
Bhala T R's user avatar
0 votes
1 answer
103 views

Is there a way to import bitcoin wallet into BitcoinJ?

I tried to create bitcoin wallet that could be available as from BitcoinJ as from standart desktop wallet client (Bitcoin.com client e.g.) but it seems that I don't get something important. I exported ...
Innokentiy's user avatar
0 votes
1 answer
117 views

How to resolve eclair-node-gui-0.3.3-12ac145.jar getting CAPSULE EXCEPTION after java update to version 11.0.9.1?

I've been running Eclair node release eclair-node-gui-0.3.3-12ac145.jar smoothly for some time now on Ubuntu 18.04.5 LTS, but recently had an update to the java version i was using to the latest (?) ...
steeev's user avatar
  • 13
0 votes
1 answer
388 views

Create Raw Transaction in BitcoinJ offline starting from UTXO info

I would to create offline Raw Transaction (without signing it) in BitcoinJ. The information I know about the inout is UTXO's hash, index, amount, address, and script. I also know the receiver address ...
Andrean's user avatar
  • 103
0 votes
1 answer
351 views

Importing bitcoinj mnemonic into electrum or deriving private keys from mnemonic

I am having a really hard time backing up my bitcoinj mnemonic and importing it somewhere else. I am backing up the mnemonic like so: Wallet wallet = Wallet.createDeterministic(params, Script....
super.yang's user avatar
0 votes
2 answers
535 views

How to verify signature in java using message and public key?

I was trying different things to verify the signature but couldn't succeed. I have got the following: message in string or decimal array (ASCII code for each char) public key in decimal array (which I ...
Bhala T R's user avatar
1 vote
1 answer
245 views

Fail to sign the Segwit Transaction's input in bitcoinj

I want to spend from a segwit address and it has a P2WPH script, I created this transaction just like creating a normal P2PKH transaction, but just changed the address of the input to the segwit ...
Oiiiwk's user avatar
  • 31
1 vote
0 answers
81 views

How to sign a 2-of-2 multisig address?

I want to implement 2-of-2 multisig in bitcoinj, and I implement the methods which are used to sign the first time and the second time. But there is a bug that using the same key for the first signing ...
Oiiiwk's user avatar
  • 31
0 votes
1 answer
109 views

Error message still returned after transaction was indeed broadcast

I use bitcoinj to create the following method to broadcast a raw transacion in testnet, and I did see on bitcoin explorer that it has been broadcast. But even the transaction has been already ...
Oiiiwk's user avatar
  • 31
1 vote
1 answer
710 views

How to verify a signed message by bitcoin core?

I want to verify, in Java, a signature produced with bitcoin core's signmessagewithprivkey (equivalent to the verifymessage). I noticed a bitcoinj method similar to the bitcoin core's verifymessage - ...
Pedro's user avatar
  • 743
0 votes
1 answer
33 views

what are the dangers of transfering bitcoins between addresses?

So I heard stories about people losing bitcoins because their wallet didn't support a cerain feature.. or bitcoins getting sent to wrong address etc.. how does that happen? As a software developer I'...
Kristjan's user avatar
  • 101
0 votes
2 answers
356 views

Verify Bitcoin Transaction

Following the great post [Redeeming a raw transaction step by step example required, I came up with code below but the verification failed. // pubkeyBytes, len: 65 // ...
YongJiang Zhang's user avatar
0 votes
1 answer
485 views

Standalone Java Bitcoin Miner - Does it Exist?

I am a java developer, and currently am looking to create a standalone java class that will let people mine Bitcoin using CPU, but I have no idea if such already exists. I have found one for LiteCoin, ...
Kyoungwan Woo's user avatar
1 vote
0 answers
100 views

How to sign an Altcoin transaction manually with 2 inputs and 2 outputs

So i'm working with the altcoin denarius which has the following raw TX structure. This is a transaction I am try to sign: Original: ...
Roxas240's user avatar
0 votes
1 answer
258 views

Bitcoin Signature Verification

I am trying to implement the OP_CHECKSIG opcode of Bitcoin and verify whether a signature is valid or not. I have the signature that I recieve from the transaction data and the public key(the hex ...
Shubham Saxena's user avatar
0 votes
1 answer
282 views

How to sign Bitcoin transactions using JCE?

I need to sign Bitcoin transactions using JCE primitives(no bitcoinj), but my signatures are not considered valid by bitcoinj. I tried to simulate this process. I created a random hash and signed it ...
Tony's user avatar
  • 103
0 votes
1 answer
918 views

How can I generate public address from an xpub key in Java?

I have an xpub key with which I want to generate all addresses which have been used or will be used and then find out the keys which have balance. Here's a sample xpubkey with balance- ...
Parth Gargava's user avatar
1 vote
1 answer
2k views

How to sign rawtransaction with private key

How to sign raw transaction with private key. this is my raw transaction : ...
paul You's user avatar
3 votes
1 answer
598 views

ECDSA signature with r value of 31?

occasionally on Android we are generating an ECDSA signature. This turns out to have a "r" length of 31 bytes. Is that valid? For reference here is a nice diagram outlining the ASN.1 structure of ...
René Heuven's user avatar
1 vote
1 answer
235 views

Errors when building/sending multisig transactions

Going by the example here: https://bitcoinj.github.io/working-with-contracts I believe I've done everything correctly. Yet my program fails either to propagate correctly or because of a tx error and ...
Stephen's user avatar
  • 13
2 votes
1 answer
57 views

How to convert from Ardor time to Unix time?

What is the best approach to convert from Ardor time to Unix time?
almonte's user avatar
  • 21
0 votes
1 answer
1k views

How to create ECPoint from raw private key

How to create a bouncy castle ECPoint from a raw private key hex string? I am getting a private key using the 'dumpprivkey' RPC and removing the header byte and the 4 bytes of checksum + 1 byte of ...
bryan's user avatar
  • 11
1 vote
0 answers
62 views

Bitcoinj Spend from a address directly without wallet

I am stuck trying to send coins from arbitary privateKey in bitcoinj. How can I make the following function work without using the Kit or Wallet classes? @Override public String transferCoin( ECKey ...
Sudip Bhattarai's user avatar
1 vote
1 answer
596 views

Bitcoinj wallet can't receive coins in Testnet3

I have a problem with bitcoinj. I have created a wallet and than trying to send coins to it in Testnet3 using this faucet: https://coinfaucet.eu/en/btc-testnet/ Coins sended, transaction confirmed, ...
Ilyam's user avatar
  • 11
0 votes
1 answer
163 views

Can't see balance after some time

I'm trying to use bitcoinj library to receive bitcoin payments and monitor the balance on the address. My implementation is based on DeterministicKey watching public key. The code below is working ...
g4s8's user avatar
  • 113
0 votes
1 answer
258 views

Problematic Digital Signature with SECP256K1

I am trying to test out TestNet3 and I have a keypair generated using Java crypto library. The private key is 23F847360E1EB348A212F443C633058080A8EB9F05AD132F8B82D51FE672EADD and the public key is ...
thotheolh's user avatar
  • 167
1 vote
1 answer
904 views

Java mining solution

I am a beginner in mining algorithms and I have a general question regarding the mining using Java language. Does it make sense to use Java to develop for example ETHASH algorithm (or any other) and ...
rholovakha's user avatar
2 votes
0 answers
323 views

Broadcasting signed transaction from Watching wallet using bitcoinj

I am working with watching wallet and Offline wallet using bitcoinj, I created Watching Wallet using tpub key of Offline Wallet I am receiving payment on watching wallet Fine, now I want to ...
Zombie's user avatar
  • 548
3 votes
1 answer
3k 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
code511788465541441's user avatar
0 votes
1 answer
539 views

How to use Signed Hash to Send Coins in bitcoinj

I am very new to bitcoinj library. I am using 0.14.7 version of bitcoinj and developing my own application in java. I have created a watch-only wallet by using the tPub of the Offline wallet. Upto ...
FairyRosie's user avatar
2 votes
1 answer
188 views

Handling fees and setting them

Im trying to get the estimation of how much the fees will be when a final amount is decided on. I would say im getting familiar with bitcoinj but not completely with java so im still learning how to ...
BTCDude's user avatar
  • 41
0 votes
1 answer
171 views

connect watching wallet with blockchain

i have created watch wallet Wallet wallet = Wallet.fromWatchingKeyB58(params, tPub, DeterministicHierarchy.BIP32_STANDARDISATION_TIME_SECS); How can i link this with block chain i am using ...
Zombie's user avatar
  • 548
2 votes
2 answers
866 views

how to create Watching Address from available xPub key

Watch-only wallet can only receive payments but not spend the available coins. I am using bitcoinj (in Java). Can anyone please tell me that How to create watching addresses from available xPub key? ...
Cleo Indigo's user avatar
1 vote
1 answer
455 views

Why does my implementation of hex to Base58check produce different results than the example?

Step 8 of this wiki page gives this hex value: 00010966776006953D5567439E5E39F86A0D273BEED61967F6 Step 9 converts it to this base58 string:16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM I'm trying to implement ...
David says Reinstate Monica's user avatar
0 votes
2 answers
2k views

generate wallet addresses from extended public key

i am trying to generate addresses from Extended Public Key using bitcoinj but can't figure out, how can i possibly do this. i need those addresses for watch-only wallet, those addresses were ...
Zombie's user avatar
  • 548
0 votes
1 answer
173 views

Cancel pending transaction (bitcoinj)

I'm using bitcoincashj (https://github.com/bitcoinj-cash/bitcoinj) I created a transaction and sent it. But it didn't broadcasted to network. Can I cancel this transaction? Current wallet status is: ...
kodmanyagha's user avatar
1 vote
0 answers
336 views

List of crypto currencies built with java?

Is there a list of crypto currencies that was built with Java?
Patoshi パトシ's user avatar
2 votes
2 answers
937 views

How to find ripple faucet coin for development

I'm developing an app with ripple. I need some faucet coin for ripple. How can I find it?
kodmanyagha's user avatar
1 vote
2 answers
1k views

How do i parse the zeroMQ messages in java?

This is the code that i have. I receive messages from the zeroMQ however a hashtx message for example looks like this --> "hashtx �����v����|(8d �!��v��&�-�k�". Any help in turning that into a ...
dudious maximus's user avatar