Class ImmutableSignableTransaction

java.lang.Object
org.xrpl.xrpl4j.crypto.core.signing.ImmutableSignableTransaction
All Implemented Interfaces:
SignableTransaction

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSignableTransaction extends Object implements SignableTransaction
Immutable implementation of SignableTransaction.

Use the builder to create immutable instances: ImmutableSignableTransaction.builder().

  • Method Details

    • originalUnsignedTransaction

      public Transaction originalUnsignedTransaction()
      The original transaction (unsigned) that corresponds this signed transcation.
      Specified by:
      originalUnsignedTransaction in interface SignableTransaction
      Returns:
      A Transaction.
    • signableTransactionBytes

      public UnsignedByteArray signableTransactionBytes()
      The (unsigned) bytes of the transaction to be signed, in canonical format.
      Specified by:
      signableTransactionBytes in interface SignableTransaction
      Returns:
      An UnsignedByteArray.
    • withOriginalUnsignedTransaction

      public final ImmutableSignableTransaction withOriginalUnsignedTransaction(Transaction value)
      Copy the current immutable object by setting a value for the originalUnsignedTransaction attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for originalUnsignedTransaction
      Returns:
      A modified copy of the this object
    • withSignableTransactionBytes

      public final ImmutableSignableTransaction withSignableTransactionBytes(UnsignedByteArray value)
      Copy the current immutable object by setting a value for the signableTransactionBytes attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for signableTransactionBytes
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableSignableTransaction that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: originalUnsignedTransaction, signableTransactionBytes.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value SignableTransaction with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableSignableTransaction copyOf(SignableTransaction instance)
      Creates an immutable copy of a SignableTransaction value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable SignableTransaction instance
    • builder

      public static ImmutableSignableTransaction.Builder builder()
      Creates a builder for ImmutableSignableTransaction.
       ImmutableSignableTransaction.builder()
          .originalUnsignedTransaction(org.xrpl.xrpl4j.model.transactions.Transaction) // required originalUnsignedTransaction
          .signableTransactionBytes(org.xrpl.xrpl4j.codec.addresses.UnsignedByteArray) // required signableTransactionBytes
          .build();
       
      Returns:
      A new ImmutableSignableTransaction builder