Class ImmutableXChainOwnedClaimIdObject

java.lang.Object
org.xrpl.xrpl4j.model.ledger.ImmutableXChainOwnedClaimIdObject
All Implemented Interfaces:
LedgerObject, XChainOwnedClaimIdObject

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

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

  • Method Details

    • ledgerEntryType

      public LedgerObject.LedgerEntryType ledgerEntryType()
      The type of ledger object, which will always be "XChainOwnedClaimID" in this case.
      Specified by:
      ledgerEntryType in interface XChainOwnedClaimIdObject
      Returns:
      Always returns LedgerObject.LedgerEntryType.XCHAIN_OWNED_CLAIM_ID.
    • flags

      public Flags flags()
      A bit-map of boolean flags. No flags are defined for XChainOwnedClaimIdObject, so this value is always 0.
      Specified by:
      flags in interface XChainOwnedClaimIdObject
      Returns:
      Always Flags.UNSET.
    • account

      public Address account()
      The account that owns this object.
      Specified by:
      account in interface XChainOwnedClaimIdObject
      Returns:
      An Address.
    • xChainBridge

      public XChainBridge xChainBridge()
      The door accounts and assets of the bridge this object correlates to.
      Specified by:
      xChainBridge in interface XChainOwnedClaimIdObject
      Returns:
      An XChainBridge.
    • xChainClaimId

      public XChainClaimId xChainClaimId()
      The unique sequence number for a cross-chain transfer.
      Specified by:
      xChainClaimId in interface XChainOwnedClaimIdObject
      Returns:
      An XChainClaimId.
    • otherChainSource

      public Address otherChainSource()
      The account that must send the corresponding XChainCommit on the source chain. The destination may be specified in the XChainCommit transaction, which means that if the OtherChainSource isn't specified, another account can try to specify a different destination and steal the funds. This also allows tracking only a single set of signatures, since we know which account will send the XChainCommit transaction.
      Specified by:
      otherChainSource in interface XChainOwnedClaimIdObject
      Returns:
      An Address.
    • xChainClaimAttestations

      public com.google.common.collect.ImmutableList<XChainClaimAttestation> xChainClaimAttestations()
      Attestations collected from the witness servers. This includes the parameters needed to recreate the message that was signed, including the amount, which chain (locking or issuing), optional destination, and reward account for that signature.
      Specified by:
      xChainClaimAttestations in interface XChainOwnedClaimIdObject
      Returns:
      A List of XChainClaimAttestations.
    • signatureReward

      public XrpCurrencyAmount signatureReward()
      The total amount to pay the witness servers for their signatures. It must be at least the value of SignatureReward in the Bridge ledger object.
      Specified by:
      signatureReward in interface XChainOwnedClaimIdObject
      Returns:
      An XrpCurrencyAmount.
    • ownerNode

      public String ownerNode()
      A hint indicating which page of the sender's owner directory links to this object, in case the directory consists of multiple pages.

      Note: The object does not contain a direct link to the owner directory containing it, since that value can be derived from the Account.

      Specified by:
      ownerNode in interface XChainOwnedClaimIdObject
      Returns:
      A String containing the owner node hint.
    • previousTransactionId

      public Hash256 previousTransactionId()
      The identifying hash of the transaction that most recently modified this object.
      Specified by:
      previousTransactionId in interface XChainOwnedClaimIdObject
      Returns:
      A Hash256 containing the previous transaction hash.
    • previousTransactionLedgerSequence

      public com.google.common.primitives.UnsignedInteger previousTransactionLedgerSequence()
      The index of the ledger that contains the transaction that most recently modified this object.
      Specified by:
      previousTransactionLedgerSequence in interface XChainOwnedClaimIdObject
      Returns:
      An UnsignedInteger representing the previous transaction ledger sequence.
    • index

      public Hash256 index()
      The unique ID of the XChainOwnedClaimIdObject.
      Specified by:
      index in interface XChainOwnedClaimIdObject
      Returns:
      A Hash256 containing the ID.
    • withAccount

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

      public final ImmutableXChainOwnedClaimIdObject 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
    • withXChainClaimId

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

      public final ImmutableXChainOwnedClaimIdObject 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
    • withXChainClaimAttestations

      public final ImmutableXChainOwnedClaimIdObject withXChainClaimAttestations(XChainClaimAttestation... elements)
      Copy the current immutable object with elements that replace the content of xChainClaimAttestations.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withXChainClaimAttestations

      public final ImmutableXChainOwnedClaimIdObject withXChainClaimAttestations(Iterable<? extends XChainClaimAttestation> elements)
      Copy the current immutable object with elements that replace the content of xChainClaimAttestations. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of xChainClaimAttestations elements to set
      Returns:
      A modified copy of this object
    • withSignatureReward

      public final ImmutableXChainOwnedClaimIdObject 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
    • withOwnerNode

      public final ImmutableXChainOwnedClaimIdObject withOwnerNode(String value)
      Copy the current immutable object by setting a value for the ownerNode attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for ownerNode
      Returns:
      A modified copy of the this object
    • withPreviousTransactionId

      public final ImmutableXChainOwnedClaimIdObject withPreviousTransactionId(Hash256 value)
      Copy the current immutable object by setting a value for the previousTransactionId attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for previousTransactionId
      Returns:
      A modified copy of the this object
    • withPreviousTransactionLedgerSequence

      public final ImmutableXChainOwnedClaimIdObject withPreviousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger value)
      Copy the current immutable object by setting a value for the previousTransactionLedgerSequence attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for previousTransactionLedgerSequence
      Returns:
      A modified copy of the this object
    • withIndex

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableXChainOwnedClaimIdObject 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: ledgerEntryType, flags, account, xChainBridge, xChainClaimId, otherChainSource, xChainClaimAttestations, signatureReward, ownerNode, previousTransactionId, previousTransactionLedgerSequence, index.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      Creates a builder for ImmutableXChainOwnedClaimIdObject.
       ImmutableXChainOwnedClaimIdObject.builder()
          .account(org.xrpl.xrpl4j.model.transactions.Address) // required account
          .xChainBridge(org.xrpl.xrpl4j.model.transactions.XChainBridge) // required xChainBridge
          .xChainClaimId(org.xrpl.xrpl4j.model.transactions.XChainClaimId) // required xChainClaimId
          .otherChainSource(org.xrpl.xrpl4j.model.transactions.Address) // required otherChainSource
          .addXChainClaimAttestations|addAllXChainClaimAttestations(org.xrpl.xrpl4j.model.ledger.XChainClaimAttestation) // xChainClaimAttestations elements
          .signatureReward(org.xrpl.xrpl4j.model.transactions.XrpCurrencyAmount) // required signatureReward
          .ownerNode(String) // required ownerNode
          .previousTransactionId(org.xrpl.xrpl4j.model.transactions.Hash256) // required previousTransactionId
          .previousTransactionLedgerSequence(com.google.common.primitives.UnsignedInteger) // required previousTransactionLedgerSequence
          .index(org.xrpl.xrpl4j.model.transactions.Hash256) // required index
          .build();
       
      Returns:
      A new ImmutableXChainOwnedClaimIdObject builder