java.lang.Object
com.hedera.hashgraph.sdk.Transfer
A transfer of Hbar that occurred within a transaction.
Returned with a TransactionRecord.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AccountIdThe Account ID that sends or receives crypto-currency.final HbarThe amount that the account sends (negative) or receives (positive).final booleanIf true then the transfer is expected to be an approved allowance and the accountId is expected to be the owner. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static TransferfromProtobuf(AccountAmount accountAmount) Create a transfer from a protobuf.(package private) com.google.gson.JsonObjectBuild a Gson representation of this transfer, mirroring the JS SDK'sTransfer.toJSON().(package private) AccountAmountCreate the protobuf.toString()
-
Field Details
-
accountId
The Account ID that sends or receives crypto-currency. -
amount
The amount that the account sends (negative) or receives (positive). -
isApproved
public final boolean isApprovedIf true then the transfer is expected to be an approved allowance and the accountId is expected to be the owner. The default is false.
-
-
Constructor Details
-
Transfer
-
Transfer
-
-
Method Details
-
fromProtobuf
Create a transfer from a protobuf.- Parameters:
accountAmount- the protobuf- Returns:
- the new transfer
-
toProtobuf
AccountAmount toProtobuf()Create the protobuf.- Returns:
- the protobuf representation
-
toJsonObject
com.google.gson.JsonObject toJsonObject()Build a Gson representation of this transfer, mirroring the JS SDK'sTransfer.toJSON().- Returns:
- the JSON object
-
toString
-