public class NativeWalletCoinsReceivedEventListener extends Object implements WalletCoinsReceivedEventListener
Modifier and Type | Field and Description |
---|---|
long |
ptr |
Constructor and Description |
---|
NativeWalletCoinsReceivedEventListener() |
Modifier and Type | Method and Description |
---|---|
void |
onCoinsReceived(Wallet wallet,
Transaction tx,
Coin prevBalance,
Coin newBalance)
This is called when a transaction is seen that sends coins to this wallet, either because it
was broadcast across the network or because a block was received.
|
public NativeWalletCoinsReceivedEventListener()
public void onCoinsReceived(Wallet wallet, Transaction tx, Coin prevBalance, Coin newBalance)
WalletCoinsReceivedEventListener
TransactionConfidence
event listener using
the object retrieved via Transaction.getConfidence()
. It's safe to modify the
wallet in this callback, for example, by spending the transaction just received.onCoinsReceived
in interface WalletCoinsReceivedEventListener
wallet
- The wallet object that received the coinstx
- The transaction which sent us the coins.prevBalance
- Balance before the coins were received.newBalance
- Current balance of the wallet. This is the 'estimated' balance.Copyright © 2016. All rights reserved.