익명 16:35

Transaction history with bitcoinj

Transaction history with bitcoinj

I am new to bitcoinj. I want to print out the list of transactions like as follow for a wallet:

1- Sent 1 BTC to Adress1 on 'A' Time
2- Received 5 BTC from Adress2 on 'B' time
3- Sent 2 BTC to Address 3 on 'C' time

How can I do this?



Top Answer/Comment:

Create an object of wallet app kit like:

WalletAppKit kit = new WalletAppKit(params, new File("."), "filename");
kit.startAsync();
kit.awaitRunning();
Iterable<WalletTransaction> walletTransactions = kit.wallet().getWalletTransactions();

this walletTransactions will give you all transactions related to the wallet.

상단 광고의 [X] 버튼을 누르면 내용이 보입니다