Class ImmutableAttestationCreateAccount

java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableAttestationCreateAccount
All Implemented Interfaces:
Attestation, AttestationCreateAccount

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

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

  • Method Details

    • xChainBridge

      public XChainBridge xChainBridge()
      The bridge spec.
      Specified by:
      xChainBridge in interface Attestation
      Returns:
      An XChainBridge.
    • otherChainSource

      public Address otherChainSource()
      The account on the source chain that submitted the XChainAccountCreateCommit transaction or XChainCommit transaction that triggered the event associated with the attestation.
      Specified by:
      otherChainSource in interface Attestation
      Returns:
      An Address.
    • attestationRewardAccount

      public Address attestationRewardAccount()
      The account that should receive this signer's share of the SignatureReward.
      Specified by:
      attestationRewardAccount in interface Attestation
      Returns:
      An Address.
    • amount

      public CurrencyAmount amount()
      The amount committed by the XChainAccountCreateCommit or XChainCommit transaction on the source chain.
      Specified by:
      amount in interface Attestation
      Returns:
      A CurrencyAmount.
    • wasLockingChainSend

      public boolean wasLockingChainSend()
      A boolean representing the chain where the event occurred.
      Specified by:
      wasLockingChainSend in interface Attestation
      Returns:
      true if the event occurred on the locking chain, otherwise false.
    • xChainAccountCreateCount

      public XChainCount xChainAccountCreateCount()
      The number of accounts that have been created by the bridge.
      Specified by:
      xChainAccountCreateCount in interface AttestationCreateAccount
      Returns:
      An XChainCount.
    • destination

      public Address destination()
      The destination account for the funds on the destination chain.
      Specified by:
      destination in interface AttestationCreateAccount
      Returns:
      An Address.
    • signatureReward

      public XrpCurrencyAmount signatureReward()
      The total amount, in XRP, to be rewarded for providing a signature for cross-chain transfer or for signing for the cross-chain reward. This amount will be split among the signers.
      Specified by:
      signatureReward in interface AttestationCreateAccount
      Returns:
      An XrpCurrencyAmount.
    • withXChainBridge

      public final ImmutableAttestationCreateAccount withXChainBridge(XChainBridge value)
      Copy the current immutable object by setting a value for the xChainBridge attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for xChainBridge
      Returns:
      A modified copy of the this object
    • withOtherChainSource

      public final ImmutableAttestationCreateAccount withOtherChainSource(Address value)
      Copy the current immutable object by setting a value for the otherChainSource attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for otherChainSource
      Returns:
      A modified copy of the this object
    • withAttestationRewardAccount

      public final ImmutableAttestationCreateAccount withAttestationRewardAccount(Address value)
      Copy the current immutable object by setting a value for the attestationRewardAccount attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for attestationRewardAccount
      Returns:
      A modified copy of the this object
    • withAmount

      public final ImmutableAttestationCreateAccount withAmount(CurrencyAmount value)
      Copy the current immutable object by setting a value for the amount attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for amount
      Returns:
      A modified copy of the this object
    • withWasLockingChainSend

      public final ImmutableAttestationCreateAccount withWasLockingChainSend(boolean value)
      Copy the current immutable object by setting a value for the wasLockingChainSend attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for wasLockingChainSend
      Returns:
      A modified copy of the this object
    • withXChainAccountCreateCount

      public final ImmutableAttestationCreateAccount withXChainAccountCreateCount(XChainCount value)
      Copy the current immutable object by setting a value for the xChainAccountCreateCount attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for xChainAccountCreateCount
      Returns:
      A modified copy of the this object
    • withDestination

      public final ImmutableAttestationCreateAccount withDestination(Address value)
      Copy the current immutable object by setting a value for the destination attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for destination
      Returns:
      A modified copy of the this object
    • withSignatureReward

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableAttestationCreateAccount 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: xChainBridge, otherChainSource, attestationRewardAccount, amount, wasLockingChainSend, xChainAccountCreateCount, destination, signatureReward.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      Creates a builder for ImmutableAttestationCreateAccount.
       ImmutableAttestationCreateAccount.builder()
          .xChainBridge(org.xrpl.xrpl4j.model.transactions.XChainBridge) // required xChainBridge
          .otherChainSource(org.xrpl.xrpl4j.model.transactions.Address) // required otherChainSource
          .attestationRewardAccount(org.xrpl.xrpl4j.model.transactions.Address) // required attestationRewardAccount
          .amount(org.xrpl.xrpl4j.model.transactions.CurrencyAmount) // required amount
          .wasLockingChainSend(boolean) // required wasLockingChainSend
          .xChainAccountCreateCount(org.xrpl.xrpl4j.model.transactions.XChainCount) // required xChainAccountCreateCount
          .destination(org.xrpl.xrpl4j.model.transactions.Address) // required destination
          .signatureReward(org.xrpl.xrpl4j.model.transactions.XrpCurrencyAmount) // required signatureReward
          .build();
       
      Returns:
      A new ImmutableAttestationCreateAccount builder