bitcoinj 0.16.3

2024-06-25 Thread 'Andreas Schildbach' via bitcoinj
I'm pleased to announce the release of bitcoinj 0.16.3, a bug fix and maintenance update to the Java implementation of the Bitcoin protocol. This release fixes a bug that prevents blockchain sync of mainnet blocks 849,138 and beyond. For a thorough list of changes, have a look at the release

Re: bitcoinj disconnecting/connecting from node continuously

2023-04-08 Thread Andreas Schildbach
If "wallets are loaded with 13k addresses" means you derived 13k addresses from the wallet, that's really a lot! I doubt we have ever tested it with that many addresses. Under normal usage, one address would be created for each incoming payment (for receiving) and one address for most outgoing

Re: Bitcoinj Bech32m

2022-11-06 Thread Andreas Schildbach
On 16/09/2022 14.08, Ybg1527 Odyssey wrote: Does bitcoinj currently support Bech32m encoding/decoding? Is the SegwitAddress able to parse bech32m encoded (P2TR) addresses? Yes, you can send to P2TR (Bech23m) addresses. The encoder is also in place already afaicr. Just the wallet can't

Re: 1-of-1 P2SH Wallet in bitcoinj

2022-02-07 Thread Andreas Schildbach
This isn't supported by the Wallet class. It uses either P2PKH or P2WPKH. Can you describe your usecase? On 04/02/2022 15.05, Pooja Rai wrote: Hi everyone, I am able to create a 1-of-1 P2SH address. How can I create a Wallet with 1-of-1 P2SH address. Using this code throws exception- Wallet

Re: Reading bisq.spvchain without wallet password

2022-01-06 Thread Andreas Schildbach
".spvchain" files do not contain any information about wallets. In fact, they only contain block headers of the last weeks worth of blocks. You can read and write those files using the SPVBlockStore class. On 06/01/2022 03.21, Scott Pullano wrote: Hey all! I was looking to see if it was

Re: Protobuf newb

2022-01-03 Thread Andreas Schildbach
If you use Gradle for building, it should use the correct versions automatically. On current master, we use Protobuf 3.18.0. On 04/01/2022 01.18, Geoffrey Schulman wrote: Curious which version of protobuf I should be building with as 3.19.1 java source has come compilation errors... Thank

Re: How to read transaction comments in BitcoinJ?

2021-12-15 Thread Andreas Schildbach
Comments are local to your wallet. They are not transmitted via the Bitcoin P2P network. Also if you replay your wallet, they will currently be lost. Apart from that, you can just get/set the field. On 09/12/2021 11.14, Dmitrii Pisarenko wrote: Hello! I have a addCoinsReceivedEventListener

Re: Is there an easy way to iterate forward starting from the genesis block?

2021-11-21 Thread Andreas Schildbach
There are a few examples and tools that operate with the protocol directly, without any wallet. Classes to look at are Peer and PeerGroup, and the entire Message hierarchy. On 21/11/2021 09.46, Sean Shubin wrote: Just started looking at bitcoinj.  I am familiar with the bitcoin data

bitcoinj 0.16

2021-11-12 Thread Andreas Schildbach
I'm pleased to announce the release of bitcoinj 0.16! This release represents about 31 months of work by many contributors: thanks to you all! The main theme of this release is Taproot, specifically sending to Bech32m/P2TR addresses! There are also lots of smaller enhancements like support

Re: CancelledKeyException when trying to connect to a local regtest net

2021-11-07 Thread Andreas Schildbach
The CancelledKeyException isn't a bad sign. It just happens if some peer remotely disconnects. PeerGroup will connect the next peer in place. I don't see the code that actually observes the address. Can you show it? On 06/11/2021 12.02, Dmitrii Pisarenko wrote: Hi! I want to write a piece

Call for testing: bitcoinj 0.16-rc1

2021-11-04 Thread Andreas Schildbach
I've uploaded release candidate 1, almost identical to beta 2. Please update your Gradle dependencies to implementation 'org.bitcoinj:bitcoinj-core:0.16-rc1' If all goes well, I'll release 0.16 next week. -- You received this message because you are subscribed to the Google Groups "bitcoinj"

Call for testing: bitcoinj 0.16-beta2

2021-10-22 Thread Andreas Schildbach
On 13/10/2021 18.34, Andreas Schildbach wrote: The 0.16 release branch (release-0.16) is now branched off, and there is a first beta to test. We have decided from now on to put betas on Maven Central, just like regular releases, to make testing easier. Please update your Gradle dependencies

Re: Windows Set-Up Help

2021-10-17 Thread Andreas Schildbach
re step 3: mkdir ~/bitcoinj is on its own command line. ./tools/build/install/wallet-tool/bin/wallet-tool --net=TEST --wallet=$HOME/bitcoinj/bitcoinj-test.wallet create is then the next command. I'll make this clearer in the README. On 17/10/2021 17.49, Anna Bergin wrote: Can someone

Call for testing: bitcoinj 0.16-beta1

2021-10-13 Thread Andreas Schildbach
The 0.16 release branch (release-0.16) is now branched off, and there is a first beta to test. We have decided from now on to put betas on Maven Central, just like regular releases, to make testing easier. Please update your Gradle dependencies to implementation

bitcoinj 0.16 freeze/testing/release soon

2021-09-26 Thread Andreas Schildbach
I like to issue a last call for PRs to get into bitcoinj 0.16. Taproot will activate in Nov, only ~7 weeks from now. Basically I'd like to merge https://github.com/bitcoinj/bitcoinj/pull/2099, which allows us to send to Taproot addresses, and then branch off for 0.16 – ideally before end of

Re: How connect to a pruned node??

2021-09-05 Thread Andreas Schildbach
Currently bitcoinj requires a peer to advertise NODE_NETWORK in order for it to be selected as a download peer. Pruned nodes don't do that. We could probably improve this behaviour by only requiring NODE_NETWORK_LIMITED if the last block is not older than 2 days. On 05/09/2021 10.58, Ahmad

Re: Pull Request suggestion or feedback request

2021-04-14 Thread Andreas Schildbach
It depends on the issue being fixed. Not all Lint warnings are properly fixable, and some are not even desirable to fix (in my eyes). For this kind of PR, I prefer PRs that refactor a specific issue on the entire repository. Then, the discussion on wether it's an improvement or not can happen

Re: blockchain sync

2021-02-21 Thread Andreas Schildbach
58K addresses is really a lot, probably too much for current code. Can you try to find the bottleneck, e.g. with a profiler while sync is running? On 11/01/2021 23.31, Ahmad Amin wrote: > Hi,  > Recently I've upgraded to bitcoinj 0.15.8 and started sync process since > 3 days with a wallet file

New PGP key

2020-12-02 Thread Andreas Schildbach
>From today on, I will use my new PGP key for signing bitcoinj releases and important announcements. Fingerprint: 9BF5 ECEB 3869 D58C AA1F 5917 C76A 8D3D 0A99 D052 The new key is attached to this message and is signed by my old key (E944AE667CF960B1004BC32FCA662BE18B877A60). -- You received

Re: bitcoinj 0.15.7 release notes question

2020-09-25 Thread Andreas Schildbach
I was referring to the bloom filter recalculations. It's done asynchronously in bitcoinj and I suspect race conditions. (I've seen missed transactions after transactions sent by users. I suspect the issues were not visible before SegWit since non-SegWit doesn't really require recalculations.) By

Re: This forum

2020-02-01 Thread Andreas Schildbach
I don't use Slack or Telegram because of it's centralization, and in the case of Telegram the forced identification via phone number. What do you think about using a Matrix group (aka Riot)? On 30/01/2020 11.42, Robert de Wilde wrote: > It surprised me that this project still uses a forum. Most

Re: libsecp256k1 JNI Deprecation Notice

2020-01-22 Thread Andreas Schildbach
Thanks for the notice. If no one objects, and if no one steps up to maintain these bindings in a useful form for JVM developers, I'll probably remove them for the next release. -- You received this message because you are subscribed to the Google Groups "bitcoinj" group. To unsubscribe from

Re: How checkpoints-testnet.txt is generated

2019-12-21 Thread Andreas Schildbach
On 21/12/2019 12.59, 余忠荣 wrote: > How btc-based private chain generates checkpoints.txt Have a look at the BuildCheckpoints tool. -- You received this message because you are subscribed to the Google Groups "bitcoinj" group. To unsubscribe from this group and stop receiving emails from it,

Re: How to verify a signed message?

2019-12-19 Thread Andreas Schildbach
If you look at the org.bitcoinj.core.ECKeyTest#signTextMessage unit test, it shows how it works. It uses org.bitcoinj.core.ECKey#signMessage(java.lang.String) and org.bitcoinj.core.ECKey#verifyMessage On 17/12/2019 19.26, Pedro Roberto wrote: > I am looking for the bitcoinj equivalent of the

Re: Tests are flaky on clean checkout

2019-10-07 Thread Andreas Schildbach
Do tests actually fail? If all you see is errors on the console that's normal because the unit tests try to test all error cases too. Obviously tests shouldn't fail. We managed to fix almost all flakes, only once every approx 100 builds I've got a hanging test. That's on Ubuntu 18.04, OpenJDK 8.

Re: irc?

2019-10-07 Thread Andreas Schildbach
Yes, the IRC channel has become very quiet. I'm not much of an IRC guy, so I have it running only now and then. The other projects I'm in have migrated their IRC to Matrix, either entirely or by bridging their IRC channel. I wonder if we should do that for bitcoinj too. On 04/10/2019 19.08,

Re: Elliptic Curve encryption support for ECKey?

2019-09-20 Thread Andreas Schildbach
I guess it's because Bitcoin doesn't use encryption. Is there a specific usecase you're thinking of? On 19/09/2019 07.03, Nelson Perez wrote: > The ECKey class javadocs states:|| > > Represents an elliptic curve public and (optionally) private key, > usable for digital signatures but

Re: Can anyone suggest or provide the links how to send bitcoin from one address to another address

2019-07-23 Thread Andreas Schildbach
Have a look at the ForwardingService example, it shows how to receive and then send any received coins to another address. On 22/07/2019 12.45, Ravi kiran wrote: > Hi, > > I am new to bitcoinj can anyone suggest me how to do raw transaction i.e > send bitcoin from one address to another

Re: How to sign bitcoin transactions using JCE primitives?

2019-07-02 Thread Andreas Schildbach
There is no built-in support for signing via HSM. You could try to implement a org.bitcoinj.signers.TransactionSigner. On 27/06/2019 16.15, Антон Долгополов wrote: > Our company decided to use cloud HSM solutions instead of storing > private keys in wallet files. That means that could HSM will

Re: Claiming forks from Bitcoin Wallet

2019-07-02 Thread Andreas Schildbach
This mailing list is for development related to bitcoinj. Feel free to contact the Bitcoin Wallet devs via their support email address. On 26/06/2019 14.59, Alejandro Martínez wrote: > Hello, > > I've had some bitcoin in this app for many years and never did anything > with it. This is from

Re: onCoinsReceived not triggering.

2019-06-17 Thread Andreas Schildbach
I assume you've registered the listener. The callback should fire immediately after bitcoinj first learns of an incoming transaction, either by unconfirmed broadcast or by block (if it missed the broadcast). Generally it's a good idea to *not* do a lot of work in your callack, however your line

Re: Bitcoinj Importing Private Keys

2019-05-20 Thread Andreas Schildbach
Something is weird. The Wallet.toString() should print the imported keys. But it doesn't in your case. On 04/05/2019 14.50, Sentient Being wrote: > For re syncing i just delete the .svpchain file and all init again. > > | > D/Wallet: Wallet containing 0.00 BTC (spendable: 0.00 BTC) in: >      

Re: P2SH-P2WPKH support (segwit compatible, 3* addresses)

2019-05-18 Thread Andreas Schildbach
I decided to skip P2SH-P2WPKH. Virtually all wallets support at least sending to Bech32, only a couple of ATMs and exchanges are left. In these cases, you still can use classic P2PKH. On 17/05/2019 13.22, Přemysl Vyhnal wrote: > Hi,  > is generating and receiving to P2SH-P2WPKH (segwit

Re: Future of wallet-template?

2019-05-11 Thread Andreas Schildbach
y. (Though we > could make the effort setup dependent CI builds, etc.) > > I'll try to brainstorm a list of existing and new components that I have > in mind over the next few days. > > I'm hoping others will respond as I'd love to see a real community > effort around bitc

Re: Issue getting fromAddress from transaction

2019-05-11 Thread Andreas Schildbach
Generally it's not a good idea trying to derive a "from address". Your code can only work in very specific cases (inputs spending P2PKH outputs). You should assert that chunks.size() == 2. Also the example transaction is a BCH transaction. I'm not sure how similar BCH is to Bitcoin these days

Re: Bitcoinj Importing Private Keys

2019-05-04 Thread Andreas Schildbach
Half of your code example has nothing to do with bitcoinj. And on the other hand, your "resync" code is missing. Can you post the logfile (console output) and a wallet.toString() from just after your resync has finished? On 04/05/2019 04.20, Sentient Being wrote: > I imported the private keys

Future of wallet-template?

2019-04-30 Thread Andreas Schildbach
I'm breaking out the discussion from https://github.com/bitcoinj/bitcoinj/pull/1780 and https://github.com/bitcoinj/bitcoinj/issues/1819 to here for everyone to participate. For me, wallet-template always was not much more than an example, being in its own subproject only for the reason that Mike

Re: hashForWitnessSignature function difference between 0.15.1 vs Segwit Branch

2019-04-29 Thread Andreas Schildbach
According to BIP143, there is no such length. So I assume 0.15.1 is the correct implementation. https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki On 29/04/2019 09.31, jingi.jay.j...@gmail.com wrote: > Hi all, > > I have a question for the hashForWitnessSignature funciton. > There

Re: Server-side filter privacy enhancements and simplification

2019-04-29 Thread Andreas Schildbach
One more proposal: * When sending filtered blocks, also send the witnesses (if any). On 23/04/2019 13.43, Andreas Schildbach wrote: > Since client-side filtering (BIP157/158) isn't really an option for > light wallets, I'm thinking about how to improve server-side connection > filteri

Re: intance multiple blockStore, chain and peerGroup, generates memory consumption in the java memory

2019-04-25 Thread Andreas Schildbach
e show this: > > Caused by: java.lang.NoClassDefFoundError: > org/bouncycastle/crypto/ec/CustomNamedCurves > > > El jueves, 28 de marzo de 2019, 11:14:49 (UTC-4), Andreas Schildbach > escribió: > > Could you try the patch from > https://github.com/bitc

Re: Server-side filter privacy enhancements and simplification

2019-04-25 Thread Andreas Schildbach
r email to bitcoin-dev mailing list. > Looking forward to seeing what they will say. > > > > On Tue, Apr 23, 2019 at 8:43 AM Andreas Schildbach > wrote: >> >> Since client-side filtering (BIP157/158) isn't really an option for >> light wallets, I'm thinking

Re: Bip44 Wallet migration from 0.14 to 0.15

2019-04-23 Thread Andreas Schildbach
/oscarguindzberg/bisq/blob/437d720e7db08e8a6b733ab5b40e7ad7497a5a88/core/src/main/java/bisq/core/btc/setup/BisqKeyChainFactory.java >> https://github.com/oscarguindzberg/bisq/blob/437d720e7db08e8a6b733ab5b40e7ad7497a5a88/core/src/main/java/bisq/core/btc/setup/WalletConfig.java#L462 >&

Server-side filter privacy enhancements and simplification

2019-04-23 Thread Andreas Schildbach
Since client-side filtering (BIP157/158) isn't really an option for light wallets, I'm thinking about how to improve server-side connection filtering (BIP37 aka "bloom filters"). I propose the following changes to BIP37 (via a new BIP of course): --- * A new matching rule For each tx, each

Re: bitcoinj and eclipse

2019-04-22 Thread Andreas Schildbach
What versions of Gradle and Eclipse are you using? What Java SDK are you using? I'm using Eclipse 2019-03 and "gradle eclipse" worked fine for me just a few weeks ago. Only "bitcoinj-wallettemplate" is always problematic because of its dependency to OpenJFX, but it's excluded nowadays on Java

Re: Bip44 Wallet migration from 0.14 to 0.15

2019-04-19 Thread Andreas Schildbach
On 18/04/2019 20.57, Oscar Guindzberg wrote: > On bitcoinj 0.14 to use a bip32 custom path (eg bip44) we had to > subclass DeterministicKeyChain and override getAccountPath(). > Subclassing KeyChainFactory and KeyChainGroup was also required to > make everything work. Maybe we weren't aware of

Re: Upload video on simple GUI wallet application

2019-04-19 Thread Andreas Schildbach
On 19/04/2019 12.43, parwinder gill wrote: > Please Upload video on simple GUI wallet application. I need some > references from them. I start working on this. If you're referring to what was linked from the bitcoinj webpage as "bitcoinj TV", I'm afraid the videos were lost due to the creator

Re: DNS seed

2019-04-15 Thread Andreas Schildbach
You can start by simply staticly resolving your seed address into a list of known full nodes for your currency. Use any DNS server for that, e.g. bind. On 14/04/2019 14.17, showstage2...@gmail.com wrote: > > I understand what you mean, but the current code must have a seed to > start the

Re: Bip 49 and 84

2019-04-09 Thread Andreas Schildbach
On 09/04/2019 00.54, parm.sing...@gmail.com wrote: > Bitcoinj has skipped P2SH-P2WPKH, so I recommend using P2WPKH > for modern wallets and keep P2PKH as a fallback for compatibility. > > So when we are sending and receiving payments, can we used mixed UTXOs > with P2PKH and

Re: Bip 49 and 84

2019-04-08 Thread Andreas Schildbach
Have a look at the KeyChainGroupStructure class. You can define the paths for P2PKH and P2WPKH chains there, and then pass it into the various method variants that use a KeyChainGroupStructure. It's kind of a replacement for the single path you could provide before 0.15. By default, bitcoinj is

Re: getAddr / addr msg support

2019-03-28 Thread Andreas Schildbach
Yes, I think we were just too lazy. And the DNS/HTTP seeds work very well. But I'd be happy to review code, just as Mike was. The Google group discussion sounds like a good starting point. I guess for starters we could do with an implementation that doesn't persist, but long-term we'd also need

Re: intance multiple blockStore, chain and peerGroup, generates memory consumption in the java memory

2019-03-28 Thread Andreas Schildbach
Could you try the patch from https://github.com/bitcoinj/bitcoinj/pull/1738 ? You'd need to apply it on the version of bitcoinj you're using and then try your profiling again. Speaking of profiling: a memory profiler should show which instances are using up all the memory. Can you check that and

Re: New wallet refresh

2019-03-24 Thread Andreas Schildbach
Have you tried using WalletAppKit? How long does it take using that? On 21/03/2019 13.51, icl...@gmail.com wrote: > Good day. Can you help me? > > I create new wallet in this way > > KeyChainGroup kg = KeyChainGroup.builder(networkParameters).fromSeed(new > DeterministicSeed(new

Re: Send from Simple Wallet throw IllegalStateException: doesn't support deterministic chains

2019-03-24 Thread Andreas Schildbach
I filed this as an issue at: https://github.com/bitcoinj/bitcoinj/issues/1747 On 23/03/2019 20.03, Juan Ibarra wrote: > Hello, I try to send from Wallet.createBasic and importKey, this work > good to sync, but when try to send the logs throw this: > > java.lang.IllegalStateException: doesn't

Re: update to v0.15.1 no Sync Simple Wallet

2019-03-19 Thread Andreas Schildbach
Ok, I found and fixed a couple of issues with basic wallets. Your unit test now works for me. Can you pull the current master branch and try your app on that? -- You received this message because you are subscribed to the Google Groups "bitcoinj" group. To unsubscribe from this group and stop

Re: Creating Wallet

2019-03-19 Thread Andreas Schildbach
h full path to > wallet and/or create a wrapper method which will create a folder with > the name of the network (MAINNET). > I'll do the enhancement if it's a good idea. > > On Monday, March 18, 2019 at 10:49:29 AM UTC-4, Andreas Schildbach wrote: > > Hmmm, I think gene

Re: update to v0.15.1 no Sync Simple Wallet

2019-03-19 Thread Andreas Schildbach
out keychains (only imported keys) has received less testing. Can you share the public key part of your key, so that I can run the exact same test? Or, if your key is worthless, you can just as well share the private key. On 18/03/2019 22.10, Juan Ibarra wrote: > Sure! > > El lu

Re: update to v0.15.1 no Sync Simple Wallet

2019-03-18 Thread Andreas Schildbach
Can you show the full wallet dumps, not just the balances? And please attach them as text files, not images. Also, can you attach the two logfiles that result from the two runs? On 18/03/2019 19.20, Juan Ibarra wrote: > hello everyone, I Have a backend service this sync wallets whit cron, >

Re: Documentation and getting started

2019-03-18 Thread Andreas Schildbach
Indeed, the tutorials haven't been updated yet. If someone would like to volunteer -- even just for a single page -- it would be much appreciated! On 17/03/2019 13.09, parm.sing...@gmail.com wrote: > Hi All, > > Thanks for your hard work on this lib. I'm new to this project and I > checked its

Re: Creating Wallet

2019-03-18 Thread Andreas Schildbach
Hmmm, I think generally command line tools do not automatically create directories. You're supposed to use mkdir (or similar) explicitly. On 18/03/2019 04.50, Tom Va wrote: > When I run WalletTool to create a wallet why not create the wallet in a > folder named after network (MAIN, TEST,

Re: Re broadcasting of txs

2019-03-14 Thread Andreas Schildbach
gt; proposal to remove reject messages > https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-March/016701.html > . Andreas replied suggesting to keep the "reject" messages. > > > On Wed, Mar 13, 2019 at 1:26 PM Andreas Schildbach > wrote: >> >> I think it's

Re: Re broadcasting of txs

2019-03-13 Thread Andreas Schildbach
I can imagine someone already thought about this, but I could not find > any discussion on this subject here nor on the bitcoin-dev mailing > list, but maybe I missed something. > > > On Wed, Mar 13, 2019 at 9:20 AM Andreas Schildbach > wrote: >> >> On 13/03/2019 00.

Re: How do you recover a wallet when using a WalletAppKit?

2019-03-13 Thread Andreas Schildbach
On 13/03/2019 02.12, jh...@seekerslab.com wrote: > Same problem here. > > When restorefrom seed , my wallet losts child path. > > 캡처.PNG Are you using a custom path? Maybe the restoreFromSeed method doesn't handle this case. We should check if the restore process is covered well with unit tests

Re: Re broadcasting of txs

2019-03-13 Thread Andreas Schildbach
On 13/03/2019 00.26, Oscar Guindzberg wrote: > Is there any email thread or doc about what happens when there is a > problem on tx broadcast? > > Maybe discussions about whether bitcoinj should rebroadcast the tx, if > that is the user responsibility, when to do the rebroadcast, etc. Currently

Re: How do you recover a wallet when using a WalletAppKit?

2019-03-12 Thread Andreas Schildbach
The wallettemplate sub-project uses WalletAppKit and implements full backup and restore via mnemonic code. I recommend having a look at that. On 12/03/2019 18.46, Ben Moore wrote: > I am attempting create a wallet recovery function in my application > which utilises the WalletAppKit's

Re: getScriptPubKey() Null Pointer Exception

2019-03-12 Thread Andreas Schildbach
ssage: > > Method invocation 'getScriptPubKey' may produce 'NullPointerException' > > I don't know if this might be useful to know if the problem comes from my > code, I just modified the wallettemplate.MainController class to check how > inputs/outputs work and I haven't d

Re: No lost key from seed

2019-03-12 Thread Andreas Schildbach
The industry consensus seems to be: make the user write down the 12 words (aka mnenonic) on a piece of paper and store it at a safe place. Then you can use these words to restore your seed. Bitcoinj supports this using the org.bitcoinj.crypto.MnemonicCode class; have a look at the wallettemplate

Re: getScriptPubKey() Null Pointer Exception

2019-03-11 Thread Andreas Schildbach
4.7 > > El lunes, 11 de marzo de 2019, 12:32:34 (UTC+1), Andreas Schildbach > escribió: > > Also, what version of bitcoinj are you using? > > > On 11/03/2019 10.02, J wrote: > > This is the exception: > > java.lang.NullPointerException > &g

Re: getScriptPubKey() Null Pointer Exception

2019-03-11 Thread Andreas Schildbach
$152(WinApplication.java:177) > at java.lang.Thread.run(Thread.java:748) > > and this is the piece of code: > > tx_out.getScriptPubKey().getToAddress(MainNetParams.get());     //tx_out > is one of the outputs of the transaction > > El lunes, 11 de marzo de 2019, 2:27

Re: getScriptPubKey() Null Pointer Exception

2019-03-10 Thread Andreas Schildbach
Can you post the exception and the piece of code you're using? Also, what version of bitcoinj are you using? On 10/03/2019 20.04, J wrote: > When trying to get the address of an output, if I call the method > getScriptPubKey() I always get a null pointer exception.  > I checked this >

Re: Bitcoinj Can specific send from address?

2019-03-08 Thread Andreas Schildbach
Regarding your first question: Bitcoinj has a CoinSelector interface you can implement. The defaut implementation always picks the oldest coins (UTXOs) first, but you can implement a different strategy if you want. On 07/03/2019 07.06, jh...@seekerslab.com wrote: > For example > > Think , My A

Re: Tx.getFee() is always null

2019-03-06 Thread Andreas Schildbach
It's a limitation of the Bitcoin protocol. The fee is not an explicit data field. To calculate the fee of a transaction, you need to know the values of all inputs and outputs. And input values are not explicit fields either; you need to know their connected outputs and use their value. In SPV

Re: Community Chat ?

2019-03-03 Thread Andreas Schildbach
The IRC channel is still the "official" live chat. I must admit I only run my IRC client now and then. I just removed the link to G+, thanks for spotting this. On 03/03/2019 00.29, steven.my...@gmail.com wrote: > Hi, general question, in addition to this email group is there a live > chat venue

bitcoinj 0.15

2019-03-02 Thread Andreas Schildbach
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I'm pleased to announce the release of bitcoinj 0.15! This release represents about 30 months of work by more than 100 contributors: thanks to you all! The main theme of this release is Segregated Witness! You can create P2WPKH keychains and receive

Re: How to cancel pendingtransaction?

2019-03-01 Thread Andreas Schildbach
You cannot cancel pending transactions. At least not if they already have been broadcasted on the network. If your wallet hasn't had the chance to broadcast it yet, you can reset your wallet and replay the blockchain (sync again). On 01/03/2019 07.44, Jose Luis Estevez wrote: > Hi, > > I have

Re: Import money from another wallet

2019-02-25 Thread Andreas Schildbach
t; any issue, > > Thank you, > > > On Monday, February 25, 2019 at 5:50:05 PM UTC+7, Andreas Schildbach wrote: > > On 19/01/2019 20.26, Danielecker1993 wrote: > > Thanks. And practically, how I do this in BitcoinJ ? > > You can use Wallet.im

Re: Import money from another wallet

2019-02-25 Thread Andreas Schildbach
On 19/01/2019 20.26, Danielecker1993 wrote: > Thanks. And practically, how I do this in BitcoinJ ? You can use Wallet.importKey() or .importKeys() to import keys into your wallet. The replaying is described here: https://bitcoinj.github.io/working-with-the-wallet -- You received this message

Re: changing wallettemplate displayed address

2019-02-24 Thread Andreas Schildbach
After you changed that line, delete the wallet file (or rename it) so that wallet-template creates a fresh wallet. On 24/02/2019 18.25, J wrote: > I'm trying to modify the wallettemplate project and one thing I can't > get to change is the displayed address, which is currently a testnet > bech32

Re: Android wallet will not download blockchain, is there something wrong with my code?

2019-02-22 Thread Andreas Schildbach
Looks like peer discovery doesn't work. I would for now use a plain DnsDiscovery. Let's see if it discovers peers. Also perhaps try on the bitcoinj release-0.15 branch. It will get tagged for release soon anyway. On 20/02/2019 22.21, Ben Moore wrote: > I am currently trying to build an Android

Re: tx not getting confirmed at all.

2019-02-19 Thread Andreas Schildbach
You're posting to the wrong list. This list is about bitcoinj. Likely you should be posting to a general Bitcoin mailing list. On 19/02/2019 01.22, Bobby_Bouche wrote: > this is for btc testnet > > https://live.blockcypher.com/btc-testnet/address/mqu38F8YbWmmCV9tLWMukanQ2dCUEiT4PD/ > > this tx

Re: Simple GUI wallet video removed

2019-02-16 Thread Andreas Schildbach
I'm not sure, I think the creator was Mike Hearn. I've messaged him but he didn't reply so far. But the video was likely quite outdated anyway. Guess I'll remove the "bitcoinj TV" section from the homepage. On 15/02/2019 15.40, tommyjeans12...@gmail.com wrote: > hi, i am very new to crypto and

Branched for 0.15!

2019-02-15 Thread Andreas Schildbach
I just created a release branch for bitcoinj 0.15: https://github.com/bitcoinj/bitcoinj/commits/release-0.15 This starts a stabilization phase of a couple of weeks. If you have an application, please give it a try with 0.15! I've worked on the release notes; that should help you migrating. See

Re: 0.15 release notes

2019-02-11 Thread Andreas Schildbach
On 06/02/2019 20.34, Oscar Guindzberg wrote: > Is there any draft for the release notes of 0.15? Currently there is only the "git log". I'm planning to assemble a changelog as soon as we're branched. It will go here: https://bitcoinj.github.io/release-notes (source:

Re: Branch/Freeze for 0.15 incoming!

2019-02-05 Thread Andreas Schildbach
Implemented this on master, and rebased the segwit branch. On 05/02/2019 16.26, Andreas Schildbach wrote: > I'm working on it now. > > > On 05/02/2019 00.28, Andreas Schildbach wrote: >> It doesn't seem necessary, as signatures are not verified anyway with SPV. >&g

Re: Branch/Freeze for 0.15 incoming!

2019-02-04 Thread Andreas Schildbach
; we want to receive txs serialized with the segwit format. > Is there a TODO list to have full segwit support on bitcoinj? > > Regards, > Oscar. > > On Sat, Feb 2, 2019 at 7:15 PM Manfred Karrer > wrote: >> >> Ah great news! >> >>> On 2 Feb 2

Re: Fee value is null

2019-01-24 Thread Andreas Schildbach
That is because the fee is defined as the difference of all input values and all output values. And the Bitcoin protocol doesn't actually have explicit input values ... you have to derive them from the connected outputs. This means your transaction need to have all of its inputs connected to the

Re: Import money from another wallet

2019-01-19 Thread Andreas Schildbach
You can import a private key (containing Bitcoins) and rescan the blockchain from the birthdate of the key. It has serious downsides in terms of security and usability so generally you're advised not to this. If you want to move value, use a Bitcoin transaction. On 18/01/2019 18.17,

Re: Strange value of getBalance from kit.wallet

2019-01-14 Thread Andreas Schildbach
eer? > > Or Do I need explicitly broadcast the send request? > > On Sunday, January 13, 2019 at 1:37:19 AM UTC+8, Andreas Schildbach wrote: > > Have you set up a PeerGroup to connect to the Bitcoin Testnet network, > so that your transaction is actually broad

Re: Upgrading Guava dependency to Guava 22

2019-01-14 Thread Andreas Schildbach
Master is on 25.1-android already. On 12/01/2019 09.00, Stephen Davis wrote: > Using guava 23-0 android.  Works fine so far.  Guava 18.0 breaks > createredeemscript functionality and versions higher than 23 seem to > also not be compatible with certain functions of bitcoinj. > > On Tuesday, May

Re: Will bitcoinJ support bitcoinSV in future?

2019-01-14 Thread Andreas Schildbach
forks somewhat make the effect distributed and hard to get > some synergy > Is the original bitcoinj has some plan in future to align those forks, > at least part of it? > > On Sunday, January 13, 2019 at 1:31:15 AM UTC+8, Andreas Schildbach wrote: > > So far, we have never sup

Re: Create transactions without local copy

2019-01-10 Thread Andreas Schildbach
The Wallet class supports you with that. See the examples and/or the WalletTool's 'send' implementation. On 26/12/2018 19.17, Davy Van Roy wrote: > Hi, > > I have a question regarding the bitcoinj library. On the website there > is explanation on the library stating "/It can maintain a wallet,

Re: How to get the generate public address the after base58

2019-01-10 Thread Andreas Schildbach
On 07/01/2019 13.46, Fossil Liao wrote: > I am new to bitcoinJ, and want to generate the public address > (1xx...) of my wallet.  > > From the doc, It looks I suppose to use LegacyAddress to generate the > address after base68. > > But why the output of  > LegacyAddress.fromKey(params,

Re: Using master for production

2019-01-01 Thread Andreas Schildbach
I have a version of Bitcoin Wallet that runs on master. So far I didn't encounter any problems, but of course my testing is limited. Yes, if no one objects my plan is to branch as soon everything that's needed for receiving and sending to/from segwit native addresses is implemented. We should

Re: Download stalled at 91MB at testnet

2018-12-04 Thread Andreas Schildbach
The stall messages are just a symptom. For finding the cause have a look at the logfile of both bitcoinj and Bitcoin Core. On 04/12/2018 00.12, Manfred Karrer wrote: > I use whitelist=127.0.0.1 in the bitcoin.conf file. There was another > property but that does require the port as well and we

Re: tests failing in the latest build?

2018-11-01 Thread Andreas Schildbach
For the archive: this is now fixed on master, by specifying source encodings. -- You received this message because you are subscribed to the Google Groups "bitcoinj" group. To unsubscribe from this group and stop receiving emails from it, send an email to bitcoinj+unsubscr...@googlegroups.com.

Re: How to prevent from persisting private keys

2018-10-29 Thread Andreas Schildbach
t$1.onSetupCompleted(BitcoinJTest.java:28) > > > What can I do with Wallet without WalletAppKit? How can I embed it into > WalletAppKit? Or just how can I sync it? > > > > > sob., 20 paź 2018 o 21:49 Andreas Schildbach <mailto:andr...@schildbach.de>> napisał(a): >

Migration of SpongyCastle back to BouncyCastle

2018-10-23 Thread Andreas Schildbach
For years, we've been using SpongyCastle as a replacement for BouncyCastle. This was done because Google used to bundle a (broken) BouncyCastle version with Android, which would clash with a BC castle provided in an APK. Google fixed the problem with Android 3.0 by repackaging the affected

Re: Using an HSM with a BitcoinJ wallet

2018-10-23 Thread Andreas Schildbach
I'm not sure if anyone has ever done it. Are there any HSMs that can do the BIP32 derivation of private keys? Trezor and its cousins are probably the best bets, as they're designed for Bitcoin. On master there is already the ability to derive from other paths if needed. That should solve your

Re: How to prevent from persisting private keys

2018-10-20 Thread Andreas Schildbach
key); > bitcoin.kit.wallet().saveToFile(bitcoin.getWalletFile()); > > Is it possible ? > > > On Wed, Oct 17, 2018 at 12:20 AM Andreas Schildbach > mailto:andr...@schildbach.de>> wrote: > > Yes, you either could encrypt the keys (and keep the decryption key

Re: BIP32 Spec Seed vs DeterministicSeed

2018-10-19 Thread Andreas Schildbach
Btw. I think the BIP32Test.java class already implements what you're searching for. On 19/10/2018 11.49, Andreas Schildbach wrote: > Have you tried the > > public DeterministicSeed(byte[] seed, List mnemonic, long > creationTimeSeconds) > > constructor? > > >

Re: Block Chain is not downloding while WalletAppKit setup , this is the my code

2018-10-19 Thread Andreas Schildbach
After importing a previously unknown key, you need to rescan the whole blockchain for any UTXOs that might be relevant. Only after that is finished you can prepare and sign a spending transaction. That's the decentralized way to do it. Alternatively, you could query an external service like a

  1   2   3   >