Interface PaymentChannelClaim
- All Superinterfaces:
Transaction
- All Known Implementing Classes:
ImmutablePaymentChannelClaim
Claim XRP from a payment channel, adjust the payment channel's expiration, or both. This transaction can be used
differently depending on the transaction sender's role in the specified channel:
The source address of a channel can:
- Send XRP from the channel to the destination with or without a signed Claim.
- Set the channel to expire as soon as the channel's SettleDelay has passed.
- Clear a pending Expiration time.
- Close a channel immediately, with or without processing a claim first. The source address cannot close the channel immediately if the channel has XRP remaining.
The destination address of a channel can:
- Receive XRP from the channel using a signed Claim.
- Close the channel immediately after processing a Claim, refunding any unclaimed XRP to the channel's source.
Any address sending this transaction can:
- Cause a channel to be closed if its Expiration or CancelAfter time is older than the previous ledger's close time. Any validly-formed PaymentChannelClaim transaction has this effect regardless of the contents of the transaction.
-
Field Summary
Fields inherited from interface org.xrpl.xrpl4j.model.transactions.Transaction
typeMap -
Method Summary
Modifier and TypeMethodDescriptionamount()The amount of XRP, in drops, authorized by thesignature().balance()Total amount of XRP, in drops, delivered by this channel after processing this claim.builder()Construct a builder for this class.channel()The unique ID of the channel, as aHash256.Set of Credentials to authorize a deposit made by this transaction.default PaymentChannelClaimFlagsflags()Bit-map of booleanPaymentChannelClaimFlagsto set for this transaction.The public key used for thesignature(), as hexadecimal.The signature of this claim, in hexadecimal form.default voidValidatecredentialIds()has less than or equal to 8 credentials.default voidValidatecredentialIds()are unique.Methods inherited from interface org.xrpl.xrpl4j.model.transactions.Transaction
account, accountTransactionId, delegate, fee, lastLedgerSequence, memos, networkId, sequence, signers, signingPublicKey, sourceTag, ticketSequence, transactionFlags, transactionSignature, transactionType, unknownFields, validateDelegateNotSameAsAccount
-
Method Details
-
builder
Construct a builder for this class.- Returns:
- An
ImmutablePaymentChannelClaim.Builder.
-
flags
Bit-map of booleanPaymentChannelClaimFlagsto set for this transaction.- Returns:
- The
PaymentChannelClaimFlagsfor this transaction.
-
channel
Hash256 channel()The unique ID of the channel, as aHash256.- Returns:
- A
Hash256representing the channel ID.
-
balance
Optional<XrpCurrencyAmount> balance()Total amount of XRP, in drops, delivered by this channel after processing this claim. Required to deliver XRP. Must be more than the total amount delivered by the channel so far, but not greater than theamount()of the signed claim. Must be provided except when closing the channel.- Returns:
- An
Optionalof typeXrpCurrencyAmountrepresenting the payment channel balance.
-
amount
Optional<XrpCurrencyAmount> amount()The amount of XRP, in drops, authorized by thesignature(). This must match the amount in the signed message. This is the cumulative amount of XRP that can be dispensed by the channel, including XRP previously redeemed.- Returns:
- An
Optionalof typeXrpCurrencyAmountrepresenting the payment channel amount.
-
signature
The signature of this claim, in hexadecimal form. The signed message contains the channel ID and the amount of the claim. Required unless the sender of the transaction is the source address of the channel. -
publicKey
The public key used for thesignature(), as hexadecimal. This must match the PublicKey stored in the ledger for the channel. Required unless the sender of the transaction is the source address of the channel and thesignature()field is omitted. (The transaction includes the public key so that rippled can check the validity of the signature before trying to apply the transaction to the ledger.) -
credentialIds
Set of Credentials to authorize a deposit made by this transaction. Each member of the array must be the ledger entry ID of a Credential entry in the ledger.- Returns:
- A list of type
Hash256.
-
validateCredentialIdsLength
@Check default void validateCredentialIdsLength()ValidatecredentialIds()has less than or equal to 8 credentials. -
validateUniqueCredentialIds
@Check default void validateUniqueCredentialIds()ValidatecredentialIds()are unique.
-