Package org.xrpl.xrpl4j.crypto.signing
Class ImmutableMultiSignedTransaction<T extends Transaction>
java.lang.Object
org.xrpl.xrpl4j.crypto.signing.ImmutableMultiSignedTransaction<T>
- All Implemented Interfaces:
MultiSignedTransaction<T>,SignedTransaction<T>
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableMultiSignedTransaction<T extends Transaction>
extends Object
implements MultiSignedTransaction<T>
Immutable implementation of
MultiSignedTransaction.
Use the builder to create immutable instances:
ImmutableMultiSignedTransaction.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableMultiSignedTransaction. -
Field Summary
Fields inherited from interface org.xrpl.xrpl4j.crypto.signing.SignedTransaction
SIGNED_TRANSACTION_HASH_PREFIX -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Transaction>
ImmutableMultiSignedTransaction.Builder<T> builder()Creates a builder forImmutableMultiSignedTransaction.static <T extends Transaction>
ImmutableMultiSignedTransaction<T> copyOf(MultiSignedTransaction<T> instance) Creates an immutable copy of aMultiSignedTransactionvalue.booleanThis instance is equal to all instances ofImmutableMultiSignedTransactionthat have equal attribute values.hash()The hash of thesignedTransactionBytes()which can be used as a handle to the transaction even though the transaction hasn't yet been submitted to the XRP Ledger.inthashCode()Computes a hash code from attributes:unsignedTransaction,signedTransactionBytes,hash,signerSet,signedTransaction.The transaction with all signers insignerSet()added to theTransaction.signers()field in the correct order.ThesignedTransaction()encoded into bytes that are suitable for submission to the XRP Ledger.com.google.common.collect.ImmutableSet<Signer> The set of signatures and public keys used to sign.toString()Prints the immutable valueMultiSignedTransactionwith attribute values.The original transaction with no signature attached.final ImmutableMultiSignedTransaction<T> withSignerSet(Iterable<? extends Signer> elements) Copy the current immutable object with elements that replace the content ofsignerSet.final ImmutableMultiSignedTransaction<T> withSignerSet(Signer... elements) Copy the current immutable object with elements that replace the content ofsignerSet.final ImmutableMultiSignedTransaction<T> withUnsignedTransaction(T value) Copy the current immutable object by setting a value for theunsignedTransactionattribute.
-
Method Details
-
unsignedTransaction
The original transaction with no signature attached.- Specified by:
unsignedTransactionin interfaceSignedTransaction<T extends Transaction>- Returns:
- A
Transaction.
-
signedTransactionBytes
ThesignedTransaction()encoded into bytes that are suitable for submission to the XRP Ledger.- Specified by:
signedTransactionBytesin interfaceSignedTransaction<T extends Transaction>- Returns:
- A byte-array containing the signed transaction blob.
-
hash
The hash of thesignedTransactionBytes()which can be used as a handle to the transaction even though the transaction hasn't yet been submitted to the XRP Ledger. This field is derived by computing the SHA512-Half of the Signed Transaction hash prefix concatenated withsignedTransactionBytes().- Specified by:
hashin interfaceSignedTransaction<T extends Transaction>- Returns:
- A
Hash256containing the transaction hash.
-
signerSet
The set of signatures and public keys used to sign.- Specified by:
signerSetin interfaceMultiSignedTransaction<T extends Transaction>- Returns:
- A
SetofSigners.
-
signedTransaction
The transaction with all signers insignerSet()added to theTransaction.signers()field in the correct order.- Specified by:
signedTransactionin interfaceMultiSignedTransaction<T extends Transaction>- Specified by:
signedTransactionin interfaceSignedTransaction<T extends Transaction>- Returns:
- A
ImmutableMultiSignedTransaction.
-
withUnsignedTransaction
Copy the current immutable object by setting a value for theunsignedTransactionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for unsignedTransaction- Returns:
- A modified copy of the
thisobject
-
withSignerSet
Copy the current immutable object with elements that replace the content ofsignerSet.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withSignerSet
Copy the current immutable object with elements that replace the content ofsignerSet. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of signerSet elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableMultiSignedTransactionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:unsignedTransaction,signedTransactionBytes,hash,signerSet,signedTransaction. -
toString
Prints the immutable valueMultiSignedTransactionwith attribute values. -
copyOf
public static <T extends Transaction> ImmutableMultiSignedTransaction<T> copyOf(MultiSignedTransaction<T> instance) Creates an immutable copy of aMultiSignedTransactionvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
T- generic parameter T- Parameters:
instance- The instance to copy- Returns:
- A copied immutable MultiSignedTransaction instance
-
builder
Creates a builder forImmutableMultiSignedTransaction.ImmutableMultiSignedTransaction.<T>builder() .unsignedTransaction(T) // requiredunsignedTransaction.addSignerSet|addAllSignerSet(org.xrpl.xrpl4j.model.transactions.Signer) //signerSetelements .build();- Type Parameters:
T- generic parameter T- Returns:
- A new ImmutableMultiSignedTransaction builder
-