Interface TransactionVerifier
- All Known Subinterfaces:
SignatureService
- All Known Implementing Classes:
AbstractSignatureService
public interface TransactionVerifier
Defines how to verify an XRPL transaction using public key material supplied by the caller.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <T extends Transaction>
booleanverify
(Set<SignatureWithPublicKey> signatureWithPublicKeys, T unsignedTransaction) Verify that all signers have properly signed theunsignedTransaction
.<T extends Transaction>
booleanverify
(Set<SignatureWithPublicKey> signatureWithPublicKeys, T unsignedTransaction, int minSigners) Verify thatminSigners
from the collection of public keys have supplied signatures for a given signed transaction.<T extends Transaction>
booleanverify
(SignatureWithPublicKey signatureWithPublicKey, T unsignedTransaction) Verify the supplied digital-signature to ensure that it was constructed using the private-key corresponding tosignerPublicKey
.
-
Method Details
-
verify
<T extends Transaction> boolean verify(SignatureWithPublicKey signatureWithPublicKey, T unsignedTransaction) Verify the supplied digital-signature to ensure that it was constructed using the private-key corresponding tosignerPublicKey
.- Type Parameters:
T
- The actual type ofTransaction
.- Parameters:
signatureWithPublicKey
- ASignatureWithPublicKey
used for verification.unsignedTransaction
- TheTransaction
of typeTransactionVerifier
that was signed.- Returns:
true
if the signature is valid and verified;false
otherwise.
-
verify
default <T extends Transaction> boolean verify(Set<SignatureWithPublicKey> signatureWithPublicKeys, T unsignedTransaction) Verify that all signers have properly signed theunsignedTransaction
.- Type Parameters:
T
- The actual type ofTransaction
.- Parameters:
signatureWithPublicKeys
- ASet
ofSignatureWithPublicKey
used for verification.unsignedTransaction
- TheTransaction
of typeTransactionVerifier
that was signed.- Returns:
true
if a minimum number of signatures are valid for the supplied transaction;false
otherwise.
-
verify
<T extends Transaction> boolean verify(Set<SignatureWithPublicKey> signatureWithPublicKeys, T unsignedTransaction, int minSigners) Verify thatminSigners
from the collection of public keys have supplied signatures for a given signed transaction.- Type Parameters:
T
- The actual type ofTransaction
.- Parameters:
signatureWithPublicKeys
- ASet
ofSignatureWithPublicKey
used for verification.unsignedTransaction
- The transaction of typeTransactionVerifier
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.
-