Questions tagged [java]
Java is a programming language.
134
questions
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 ...
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 ...
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 ...
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://...
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 ...
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:
...
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 ...
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 = "...
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 ...
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 ...
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(...
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?
...
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 ...
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 (?) ...
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 ...
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....
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 ...
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 ...
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 ...
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 ...
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 - ...
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'...
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
// ...
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, ...
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:
...
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 ...
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 ...
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- ...
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 :
...
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 ...
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 ...
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?
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
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 ...
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? ...
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 ...
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
...
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:
...
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?
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?
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 ...