Questions tagged [java]

Java is a programming language.

Filter by
Sorted by
Tagged with
0
votes
1answer
34 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 ...
5
votes
1answer
370 views

How to build Merkle root from merkle branches?

Is there any help/tutorial on how to build the Merkle root from stratum data? The Slushpool's stratum protocol has an example of a mining job but it does not contain any Merkle branches and I don't ...
0
votes
1answer
57 views

I need a bitcoin or usd payment for my site

Just service with simple API. I want to allow clients to pay usd or bitcoin. Then after payment complete i need to add my custom value on my site client purse. Is there simple system for it? Back end ...
0
votes
1answer
22 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
0answers
19 views

Sign Multisignature Transaction with only 1 of the needed keys using BitcoinJ?

If I have an unsigned Raw Transaction whose inputs are from a multisignature wallet, can I sign the transaction with only of the N needed keys and having the output as raw transaction again using ...
0
votes
1answer
49 views

How can Server-less communication take place between clients?

I was thinking to design a application which is not dependent on server and can directly send and receive data to and from other clients.I learned it is possible with UDP but how can new users join in ...
1
vote
1answer
2k views

Java: way to convert a 256-bit private key to WIF?

I have a question concerning Java and sha-256. I try to do these steps discribed here to create a WIF key: https://en.bitcoin.it/wiki/Wallet_import_format step: String string = "...
1
vote
1answer
22 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 ...
0
votes
2answers
146 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 // ...
2
votes
1answer
620 views

How to sign a transaction using BitcoinJ

I am having problem signing the transaction using BitcoinJ library without the Wallet instance, I only have the Transaction class instance and the ECKey in order to sign the transaction. Is there a ...
5
votes
1answer
542 views

Test Network Genesis Block

I am using BitcoinJ for my java application which fetches the test network's genesis block. I referred to the basics mentioned at JavaWorld and BitcoinJ's Google Code wiki. I am able to get it ...
0
votes
1answer
55 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....
1
vote
1answer
560 views

can i use one Mnemonic Code to create both(TestNet and MainNet) wallets

currently i am using bitcoinj library to create wallet for both Main-net and Test-net using Mnemonic code(Mnemonic Code is different for both), my question is can i create both Wallets(Test-net and ...
0
votes
1answer
264 views

GDAX Java Limit Order (HTTP Post)

Trying to send HTTP Post request to GDAX with auth. The 'GET' requests work fine and I'm unsure if I am passing the json params correctly as I keep getting Bad Request. private static JsonObject ...
0
votes
1answer
52 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
1answer
307 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 ...
1
vote
1answer
271 views

Is there anything I can do to speed up the synchronization of litecoinj?

I am using litecoinj which is forked from bitcoinj but compared to bitcoinj, the wallet creation and block synching is slow when using litecoinj. So, I searched for a solution and found a post that ...
3
votes
1answer
1k views

Building Signed Bitcoin Transaction in Java

I have been attempting to build my own raw transaction generator in Java which I can then broadcast on the testnet network. The problem is when I attempt to broadcast the transaction it says there is ...
0
votes
0answers
25 views

How to get transaction info by hash using bitcoinj?

I have a transaction hash (transaction does not belong to my wallet). How can I get information about this transaction through bitcoinj API? I need information like: number of confirmations sender &...
1
vote
1answer
219 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
2answers
107 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
1answer
779 views

How to sign rawtransaction with private key

How to sign raw transaction with private key. this is my raw transaction : ...
1
vote
0answers
32 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 ...
-1
votes
1answer
109 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, ...
0
votes
1answer
23 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'...
1
vote
2answers
1k views

JAVA JSON-RPC for Litecoin

I am looking for Java Json-Rpc for Litecoin or any implementation for Litecoin
1
vote
0answers
74 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
1answer
97 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
1answer
138 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
0answers
268 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- ...
6
votes
1answer
4k views

How to sign raw transaction given a private key and SHA hash (in java)

I have followed the instructions here to build my own bitcoin transaction. Redeeming a raw transaction step by step example required Currently my code can create a transaction and compute the SHA ...
7
votes
8answers
7k views

How to communicate between Java and bitcoind?

I am having problems communicating between Java and bitcoind - every JSON RPC library I try has some issues. Can anyone provide a working implementation of even the most basic JSON RPC communication ...
3
votes
1answer
230 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
3answers
2k views

How to get compressed public key with ECKey

Here some java code. What i need to change to get compressed public address in getPublicAddress? import com.google.bitcoin.core.Address; import com.google.bitcoin.core.ECKey; import com.google....
1
vote
1answer
127 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 ...
1
vote
1answer
480 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, ...
1
vote
0answers
53 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 ...
2
votes
1answer
42 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
1answer
117 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: ...
2
votes
1answer
101 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
1answer
580 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 ...
0
votes
1answer
113 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 ...
1
vote
3answers
3k views

Get uncompressed public key from compressed form

A similar question has an answer in Python which links to the bitcointalk forum: How can I get the uncompressed public key from the compressed public key in openssl? https://bitcointalk.org/index.php?...
3
votes
1answer
1k views

How to develop with the Bitcoin cash?

I have a simple wallet created with the BitcoinJ. I can create the address, track the transactions, check account balance etc with the wallet. I would like to extend the wallet for the Bitcoin cash ...
0
votes
1answer
395 views

WalletAppKit creates an address every time Bitcoinj gets initialized

I'm implementing an app using BitcoinJ, but every time I run the code, a new address is created. Is there any way to work with the very first address that was created and stop creating new addresses? ...
4
votes
1answer
5k views

Generating an address from a private key in Java?

I'd like to write a function in Java that takes a private key and generates the address to use in a QR code. I'd like to make this , but I'm not very good with the hashing algorithms. I've checked ...
0
votes
1answer
204 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 ...
2
votes
0answers
268 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 ...
1
vote
1answer
501 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
1answer
614 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? ...