WalletTemplate P2WPKH Send Not working

2020-06-15 Thread java4tech
  

I have tried to use WalletTemplate sub-project inside bitcoinJ 
 lib. I have tried p2pkh sends and 
they work fine. But then I tried to make P2WPKH payment but it failed with 
the following error message

>  org.bitcoinj.core.RejectedTransactionException: Reject: tx
>  539c7f25b14b20dfad1ad66923fa59bf7531cd1ebda967e8346793fa2464f5dc for
>  reason 'non-mandatory-script-verify-flag (Signature must be zero for
>  failed CHECK(MULTI)SIG operation)' (64)
>
> This behavior doesn't exist before commit 
.
 
So I'm not sure how to handle the changes introduced since this change. I 
have also create github issue 
 to get more information 
but I haven't got any response yet. I have tried code outside of bitcoinj's 
walletTemplate in another project as follows: 

> NetworkParameters params = TestNet3Params.get(); 
> Address destination = Address.fromString(params, strDest); 
> Coin value = Coin.parseCoin(strValue); 
> SendRequest request = SendRequest.to(destination, value); 
> SendResult result = wallet.sendCoins(request);
>
> Any help would be appreciated. Thanks

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bitcoinj/56658bd7-c3d2-443d-ad78-958cd97433d8o%40googlegroups.com.


Wallet Template- Send Request

2020-06-15 Thread java4tech
Has anyone tried to send P2WPKH transaction using bitcoinJ WalletTemplate.

P2PKH transactions works fine. I was able to send payments back and forth. 
Even payments to P2WPKH were fine.

But I have noticed that P2WPKH outbound transactions are failing since this 
commit 
.
 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bitcoinj/be49ddb6-e4bf-4ed1-b722-0010e63b86ddo%40googlegroups.com.


Re: Wallet Template- Send Request

2020-07-02 Thread java4tech
Thanks Sean for replying. Issue was resolved via 7c31dcb 
<https://github.com/bitcoinj/bitcoinj/commit/7c31dcbf99e1d8b6b3d37fb14a3069037b6fc1ca>

On Thursday, 18 June 2020 13:26:44 UTC+10, Sean Gilligan wrote:
>
> I've successfully done it in the past but before the commit you reference 
> (and have plans to return to that work in the next month or two.)
>
> -- Sean
>
> On 6/15/20 7:50 PM, java4tech wrote:
>
> Has anyone tried to send P2WPKH transaction using bitcoinJ WalletTemplate.
>
> P2PKH transactions works fine. I was able to send payments back and forth. 
> Even payments to P2WPKH were fine.
>
> But I have noticed that P2WPKH outbound transactions are failing since 
> this commit 
> <https://github.com/bitcoinj/bitcoinj/commit/bc46e8518d677088b5b5a3a8dbdefa9958461c90>.
>  
>
> -- 
> 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 bitc...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bitcoinj/be49ddb6-e4bf-4ed1-b722-0010e63b86ddo%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/bitcoinj/be49ddb6-e4bf-4ed1-b722-0010e63b86ddo%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bitcoinj/51d50a8b-7bdf-4c51-a3b4-3374ef595560o%40googlegroups.com.


Re: Please validate my thinking Web Wallets

2020-07-02 Thread java4tech
To be honest, you are trying to use wrong tool for the Job. Bitcoinj 
doesn't scale well with multi wallet setup.

On Tuesday, 30 June 2020 21:17:24 UTC+10, Kwabena Aning wrote:
>
> I am trying to create a service that allows users to create HDWallets and 
> transact with them. I understand that the server will need to set up a peer 
> group and build up it's block store (using FullPrunnedDatabaseStore btw) 
> and so on... 
>
> However, is it possible for users arriving later (after the store is built 
> up) to then create a new wallet and progress with the store as it continues 
> to build up... I know when I create a new wallet I need to stop the peer 
> group and readd all addresses I have thus far to a new instance of a peer 
> group. 
>
> So here are the steps so far as I can think of
>
> - Server starts
> - Blockchain, and Store configured
> - Any wallets that already exist are loaded
> - utxoprovider specified on all wallets with blockstore... that may 
> already be at chain height
> - Peer group configured
> - Peer group starts
> - Weeks later new user = new wallet
> - Wallet created
> - utxoprovider specified on new wallet with blockstore... that may already 
> be at chain height
> - Peer group stops
> - All wallets reloaded
> - UTXOProvider specified for all loaded wallets
> - Peer group starts
>
> Is this a valid approach?
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bitcoinj/c1a4cbe4-ac5b-4889-93ba-7addb18646b4o%40googlegroups.com.