Interface PaymentChannelClaim

All Superinterfaces:
Transaction
All Known Implementing Classes:
ImmutablePaymentChannelClaim

@Immutable public interface PaymentChannelClaim extends Transaction
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.
  • Method Details

    • builder

      Construct a builder for this class.
      Returns:
      An ImmutablePaymentChannelClaim.Builder.
    • flags

      @Default default PaymentChannelClaimFlags flags()
      Bit-map of boolean PaymentChannelClaimFlags to set for this transaction.
      Returns:
      The PaymentChannelClaimFlags for this transaction.
    • channel

      Hash256 channel()
      The unique ID of the channel, as a Hash256.
      Returns:
      A Hash256 representing the channel ID.
    • 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 the amount() of the signed claim. Must be provided except when closing the channel.
      Returns:
      An Optional of type XrpCurrencyAmount representing the payment channel balance.
    • amount

      The amount of XRP, in drops, authorized by the signature(). 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 Optional of type XrpCurrencyAmount representing the payment channel amount.
    • signature

      Optional<String> 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.
      Returns:
      An Optional of type String containing the payment channel signature.
    • publicKey

      Optional<String> publicKey()
      The public key used for the signature(), 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 the signature() 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.)
      Returns:
      An Optional of type String containing the public key used to sign this payment channel.
    • credentialIds

      List<Hash256> 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()
      Validate credentialIds() has less than or equal to 8 credentials.
    • validateUniqueCredentialIds

      @Check default void validateUniqueCredentialIds()
      Validate credentialIds() are unique.