Class ImmutableBatchSigner
java.lang.Object
org.xrpl.xrpl4j.model.transactions.ImmutableBatchSigner
- All Implemented Interfaces:
BatchSigner
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableBatchSigner
extends Object
implements BatchSigner
Immutable implementation of
BatchSigner.
Use the builder to create immutable instances:
ImmutableBatchSigner.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableBatchSigner. -
Method Summary
Modifier and TypeMethodDescriptionaccount()The account address of the signer.static ImmutableBatchSigner.Builderbuilder()Creates a builder forImmutableBatchSigner.static ImmutableBatchSignercopyOf(BatchSigner instance) Creates an immutable copy of aBatchSignervalue.booleanThis instance is equal to all instances ofImmutableBatchSignerthat have equal attribute values.inthashCode()Computes a hash code from attributes:account,transactionSignature,signingPublicKey,sortedSigners,signers.com.google.common.collect.ImmutableList<SignerWrapper> signers()The array of signers for multi-signing (sorted).The public key used to create the signature.booleantoString()Prints the immutable valueBatchSignerwith attribute values.The signature for the transaction.final ImmutableBatchSignerwithAccount(Address value) Copy the current immutable object by setting a value for theaccountattribute.final ImmutableBatchSignerwithSigners(Iterable<? extends SignerWrapper> elements) Copy the current immutable object with elements that replace the content ofsigners.final ImmutableBatchSignerwithSigners(SignerWrapper... elements) Copy the current immutable object with elements that replace the content ofsigners.final ImmutableBatchSignerwithSigningPublicKey(Optional<? extends PublicKey> optional) Copy the current immutable object by setting an optional value for thesigningPublicKeyattribute.final ImmutableBatchSignerwithSigningPublicKey(PublicKey value) Copy the current immutable object by setting a present value for the optionalsigningPublicKeyattribute.final ImmutableBatchSignerwithSortedSigners(boolean value) Copy the current immutable object by setting a value for thesortedSignersattribute.final ImmutableBatchSignerwithTransactionSignature(Optional<? extends Signature> optional) Copy the current immutable object by setting an optional value for thetransactionSignatureattribute.final ImmutableBatchSignerCopy the current immutable object by setting a present value for the optionaltransactionSignatureattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.xrpl.xrpl4j.model.transactions.BatchSigner
checkAndNormalize
-
Method Details
-
account
The account address of the signer. This must match either the outer transaction's Account or one of the inner transaction accounts.- Specified by:
accountin interfaceBatchSigner- Returns:
- An
Address.
-
transactionSignature
The signature for the transaction. Present for direct signing.- Specified by:
transactionSignaturein interfaceBatchSigner- Returns:
- An optionally-present
Signature.
-
signingPublicKey
The public key used to create the signature. Present for direct signing.- Specified by:
signingPublicKeyin interfaceBatchSigner- Returns:
- An optionally-present
PublicKey.
-
sortedSigners
public boolean sortedSigners()- Specified by:
sortedSignersin interfaceBatchSigner- Returns:
- The value of the
sortedSignersattribute
-
signers
The array of signers for multi-signing (sorted). Present when using multi-sig instead of direct signing.Note: When building a BatchSigner, you can provide signers in any order, and they will be automatically sorted by account address for serialization and signing via the
BatchSigner.checkAndNormalize()function.- Specified by:
signersin interfaceBatchSigner- Returns:
- A
ListofSignerWrappers in the order they were added.
-
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 present value for the optionaltransactionSignatureattribute.- Parameters:
value- The value for transactionSignature- Returns:
- A modified copy of
thisobject
-
withTransactionSignature
Copy the current immutable object by setting an optional value for thetransactionSignatureattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for transactionSignature- Returns:
- A modified copy of
thisobject
-
withSigningPublicKey
Copy the current immutable object by setting a present value for the optionalsigningPublicKeyattribute.- Parameters:
value- The value for signingPublicKey- Returns:
- A modified copy of
thisobject
-
withSigningPublicKey
Copy the current immutable object by setting an optional value for thesigningPublicKeyattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for signingPublicKey- Returns:
- A modified copy of
thisobject
-
withSortedSigners
Copy the current immutable object by setting a value for thesortedSignersattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for sortedSigners- Returns:
- A modified copy of the
thisobject
-
withSigners
Copy the current immutable object with elements that replace the content ofsigners.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSigners
Copy the current immutable object with elements that replace the content ofsigners. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of signers elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableBatchSignerthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:account,transactionSignature,signingPublicKey,sortedSigners,signers. -
toString
Prints the immutable valueBatchSignerwith attribute values. -
copyOf
Creates an immutable copy of aBatchSignervalue. 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 BatchSigner instance
-
builder
Creates a builder forImmutableBatchSigner.ImmutableBatchSigner.builder() .account(org.xrpl.xrpl4j.model.transactions.Address) // requiredaccount.transactionSignature(org.xrpl.xrpl4j.crypto.signing.Signature) // optionaltransactionSignature.signingPublicKey(org.xrpl.xrpl4j.crypto.keys.PublicKey) // optionalsigningPublicKey.sortedSigners(boolean) // optionalsortedSigners.addSigners|addAllSigners(org.xrpl.xrpl4j.model.transactions.SignerWrapper) //signerselements .build();- Returns:
- A new ImmutableBatchSigner builder
-