Class AbstractTransactionVerifier

java.lang.Object
org.xrpl.xrpl4j.crypto.signing.AbstractTransactionVerifier
All Implemented Interfaces:
TransactionVerifier

public abstract class AbstractTransactionVerifier extends Object implements TransactionVerifier
An abstract implementation of TransactionVerifier.
  • Constructor Details

    • AbstractTransactionVerifier

      public AbstractTransactionVerifier(SignatureUtils signatureUtils)
      Required-args Constructor.
      Parameters:
      signatureUtils - A SignatureUtils.
  • Method Details

    • verify

      public <T extends Transaction> boolean verify(Signer signer, T unsignedTransaction)
      Description copied from interface: TransactionVerifier
      Verify the supplied digital-signature to ensure that it was constructed using the private-key corresponding to signerPublicKey.
      Specified by:
      verify in interface TransactionVerifier
      Type Parameters:
      T - The actual type of Transaction.
      Parameters:
      signer - A Signer used for verification.
      unsignedTransaction - The Transaction of type TransactionVerifier that was signed.
      Returns:
      true if the signature is valid and verified; false otherwise.
    • verifyMultiSigned

      public <T extends Transaction> boolean verifyMultiSigned(Set<Signer> signerSet, T unsignedTransaction, int minSigners)
      Description copied from interface: TransactionVerifier
      Verify that minSigners from the collection of public keys have supplied signatures for a given signed transaction.
      Specified by:
      verifyMultiSigned in interface TransactionVerifier
      Type Parameters:
      T - The actual type of Transaction.
      Parameters:
      signerSet - A Set of Signer objects used for verification.
      unsignedTransaction - The transaction of type TransactionVerifier that was signed.
      minSigners - The minimum number of signatures required to form a quorum.
      Returns:
      true if a minimum number of signatures are valid for the supplied transaction; false otherwise.
    • edDsaVerify

      protected abstract boolean edDsaVerify(PublicKey publicKey, UnsignedByteArray transactionBytes, Signature signature)
      Verify a signature.
      Parameters:
      publicKey - The PublicKey used to verify the signed transaction.
      transactionBytes - An UnsignedByteArray containing the bytes of the transaction that was signed.
      signature - A Signature over the transaction.
      Returns:
      true if the signature is valid; false otherwise.
    • ecDsaVerify

      protected abstract boolean ecDsaVerify(PublicKey publicKey, UnsignedByteArray transactionBytes, Signature signature)
      Verify a signature.
      Parameters:
      publicKey - A PublicKey.
      transactionBytes - An UnsignedByteArray containing the bytes of the transaction that was signed.
      signature - A Signature over the transaction.
      Returns:
      true if the signature is valid; false otherwise.