Class ImmutableSigner
java.lang.Object
org.xrpl.xrpl4j.model.transactions.ImmutableSigner
- All Implemented Interfaces:
Signer
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableSigner
extends Object
implements Signer
Immutable implementation of
Signer.
Use the builder to create immutable instances:
ImmutableSigner.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionaccount()TheAddressassociated with this signature, as it appears in the signer list.static ImmutableSigner.Builderbuilder()Creates a builder forImmutableSigner.static ImmutableSignerCreates an immutable copy of aSignervalue.booleanThis instance is equal to all instances ofImmutableSignerthat have equal attribute values.inthashCode()Computes a hash code from attributes:account,transactionSignature,signingPublicKey.The public key used to create this signature.toString()Prints the immutable valueSignerwith attribute values.A signature for a transaction, verifiable using theSigner.signingPublicKey().final ImmutableSignerwithAccount(Address value) Copy the current immutable object by setting a value for theaccountattribute.final ImmutableSignerwithSigningPublicKey(PublicKey value) Copy the current immutable object by setting a value for thesigningPublicKeyattribute.final ImmutableSignerCopy the current immutable object by setting a value for thetransactionSignatureattribute.
-
Method Details
-
account
TheAddressassociated with this signature, as it appears in the signer list.Note that in general, this address is derived from the
Signer.signingPublicKey(), but in the case of an account that has set a different regular key, this value may diverge from the public key. Therefore, we use the `@Default` annotation here to ensure that this value is derived from the public key if not explicitly set. -
transactionSignature
A signature for a transaction, verifiable using theSigner.signingPublicKey().- Specified by:
transactionSignaturein interfaceSigner- Returns:
- A
Stringcontaining the transaction signature.
-
signingPublicKey
The public key used to create this signature.- Specified by:
signingPublicKeyin interfaceSigner- Returns:
- A
Stringcontaining the public key used to sign the transaction.
-
withAccount
Copy the current immutable object by setting a value for theaccountattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for account- Returns:
- A modified copy of the
thisobject
-
withTransactionSignature
Copy the current immutable object by setting a value for thetransactionSignatureattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for transactionSignature- Returns:
- A modified copy of the
thisobject
-
withSigningPublicKey
Copy the current immutable object by setting a value for thesigningPublicKeyattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for signingPublicKey- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableSignerthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:account,transactionSignature,signingPublicKey. -
toString
Prints the immutable valueSignerwith attribute values. -
copyOf
Creates an immutable copy of aSignervalue. 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 Signer instance
-
builder
Creates a builder forImmutableSigner.ImmutableSigner.builder() .account(org.xrpl.xrpl4j.model.transactions.Address) // optionalaccount.transactionSignature(org.xrpl.xrpl4j.crypto.signing.Signature) // requiredtransactionSignature.signingPublicKey(org.xrpl.xrpl4j.crypto.keys.PublicKey) // requiredsigningPublicKey.build();- Returns:
- A new ImmutableSigner builder
-