Package org.xrpl.xrpl4j.crypto.signing
Interface TransactionVerifier
- All Known Subinterfaces:
SignatureService<PK>
- All Known Implementing Classes:
AbstractSignatureService,AbstractTransactionVerifier,BcDerivedKeySignatureService,BcSignatureService
public interface TransactionVerifier
Defines how to verify an XRPL transaction using public key material supplied by the caller.
-
Method Summary
Modifier and TypeMethodDescription<T extends Transaction>
booleanVerify the supplied digital-signature to ensure that it was constructed using the private-key corresponding tosignerPublicKey.default <T extends Transaction>
booleanverifyMultiSigned(Set<Signer> signerSet, T unsignedTransaction) Verify that all signers have properly signed theunsignedTransaction.<T extends Transaction>
booleanverifyMultiSigned(Set<Signer> signerSet, T unsignedTransaction, int minSigners) Verify thatminSignersfrom the collection of public keys have supplied signatures for a given signed transaction.
-
Method Details
-
verify
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:
signer- ASignerused for verification.unsignedTransaction- TheTransactionof typeTransactionVerifierthat was signed.- Returns:
trueif the signature is valid and verified;falseotherwise.
-
verifyMultiSigned
default <T extends Transaction> boolean verifyMultiSigned(Set<Signer> signerSet, T unsignedTransaction) Verify that all signers have properly signed theunsignedTransaction.- Type Parameters:
T- The actual type ofTransaction.- Parameters:
signerSet- ASetofSignerobjects used for verification.unsignedTransaction- TheTransactionof typeTransactionVerifierthat was signed.- Returns:
trueif a minimum number of signatures are valid for the supplied transaction;falseotherwise.
-
verifyMultiSigned
<T extends Transaction> boolean verifyMultiSigned(Set<Signer> signerSet, T unsignedTransaction, int minSigners) Verify thatminSignersfrom the collection of public keys have supplied signatures for a given signed transaction.- Type Parameters:
T- The actual type ofTransaction.- Parameters:
signerSet- ASetofSignerobjects used for verification.unsignedTransaction- The transaction of typeTransactionVerifierthat was signed.minSigners- The minimum number of signatures required to form a quorum.- Returns:
trueif a minimum number of signatures are valid for the supplied transaction;falseotherwise.
-