Interface DelegatedTransactionVerifier

All Superinterfaces:
DelegatedPublicKeyProvider
All Known Subinterfaces:
DelegatedSignatureService
All Known Implementing Classes:
AbstractDelegatedSignatureService, AbstractDelegatedTransactionVerifier

public interface DelegatedTransactionVerifier extends DelegatedPublicKeyProvider
Defines how to verify an XRPL transaction using public key material that is not accessible to this JVM. For example, an implementation of this interface might make a call to an HSM that never exposes private-key material. Alternatively, an implementation may use supplied key meta-data to lookup key material in some custom manner (e.g., by deriving it from a secret value).
  • Method Details

    • verifySingleSigned

      <T extends Transaction> boolean verifySingleSigned(SignatureWithKeyMetadata signatureWithKeyMetadata, T unsignedTransaction)
      TransactionVerifier the supplied digital-signature to ensure that it was constructed using the private-key corresponding to publicKey.
      Type Parameters:
      T - A Transaction.
      Parameters:
      signatureWithKeyMetadata - A SignatureWithKeyMetadata that contains a signature and a public key that can be used to verify the transaction signature.
      unsignedTransaction - A DelegatedTransactionVerifier that was signed.
      Returns:
      true if the signature is valid and verified; false otherwise.
    • verifyMultiSigned

      default <T extends Transaction> boolean verifyMultiSigned(Set<SignatureWithKeyMetadata> signatureWithKeyMetadataSet, T unsignedTransaction)
      Verify that all signers have properly signed the unsignedTransaction.
      Type Parameters:
      T - The actual type of Transaction.
      Parameters:
      signatureWithKeyMetadataSet - A Set of SignatureWithKeyMetadata used for verification.
      unsignedTransaction - The Transaction of type DelegatedTransactionVerifier that was signed.
      Returns:
      true if a minimum number of signatures are valid for the supplied transaction; false otherwise.
    • verifyMultiSigned

      <T extends Transaction> boolean verifyMultiSigned(Set<SignatureWithKeyMetadata> signatureWithKeyMetadataSet, T unsignedTransaction, int minSigners)
      Verify that minSigners from the collection of public keys have supplied signatures for the given the unsignedTransaction.
      Type Parameters:
      T - The actual type of Transaction.
      Parameters:
      signatureWithKeyMetadataSet - A Set of SignatureWithKeyMetadata used for verification.
      unsignedTransaction - The transaction of type DelegatedTransactionVerifier 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.