Class ImmutableSignatureWithPublicKey

java.lang.Object
org.xrpl.xrpl4j.crypto.core.signing.ImmutableSignatureWithPublicKey
All Implemented Interfaces:
SignatureWithPublicKey

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

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

  • Method Details

    • transactionSignature

      public Signature transactionSignature()
      A signature for a transaction, verifiable using the SignatureWithPublicKey.signingPublicKey().
      Specified by:
      transactionSignature in interface SignatureWithPublicKey
      Returns:
      A Signature containing the transaction signature.
    • signingPublicKey

      public PublicKey signingPublicKey()
      The public key used to create this signature.
      Specified by:
      signingPublicKey in interface SignatureWithPublicKey
      Returns:
      A PublicKey containing the public key used to sign the transaction.
    • withTransactionSignature

      public final ImmutableSignatureWithPublicKey withTransactionSignature(Signature value)
      Copy the current immutable object by setting a value for the transactionSignature attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for transactionSignature
      Returns:
      A modified copy of the this object
    • withSigningPublicKey

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableSignatureWithPublicKey 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: transactionSignature, signingPublicKey.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      Creates an immutable copy of a SignatureWithPublicKey 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 SignatureWithPublicKey instance
    • builder

      public static ImmutableSignatureWithPublicKey.Builder builder()
      Creates a builder for ImmutableSignatureWithPublicKey.
       ImmutableSignatureWithPublicKey.builder()
          .transactionSignature(org.xrpl.xrpl4j.crypto.core.signing.Signature) // required transactionSignature
          .signingPublicKey(org.xrpl.xrpl4j.crypto.core.keys.PublicKey) // required signingPublicKey
          .build();
       
      Returns:
      A new ImmutableSignatureWithPublicKey builder