Class TxReceiver
java.lang.Object
com.barbantfintech.tools.common.cryptojdk.tx.TxReceiver
Represents a recipient of a cryptocurrency transaction.
This class is used in the context of Bitcoin transactions to specify the address
and amount of coins to be sent to a receiver.
Usage Example in Bitcoin Transactions:
TxReceiver[] txReceivers = {
new TxReceiver("bitcoinAddress1", new BigDecimal("0.05")),
new TxReceiver("bitcoinAddress2", new BigDecimal("0.10"))
};
CryptoJDK.Transaction.Bitcoin.sign(coin, network, utxos, txReceivers);
This class is utilized in the following scenarios:
- To specify the recipient addresses of a Bitcoin transaction.
- To ensure the amount specified for each recipient is correctly formatted and within valid scale limits.
- To add outputs to a Bitcoin transaction, specifying the address and amount for each TxReceiver.
-
Constructor Summary
ConstructorsConstructorDescriptionTxReceiver
(@NonNull String address, @NonNull BigDecimal amount) Constructs a new TxReceiver with the specified address and amount. -
Method Summary
-
Constructor Details
-
TxReceiver
Constructs a new TxReceiver with the specified address and amount.- Parameters:
address
- the address of the receiveramount
- the absolute value in full units to be sent to the receiver
-