Interface DelegatedTransactionVerifier
- All Superinterfaces:
DelegatedPublicKeyProvider
- All Known Subinterfaces:
DelegatedSignatureService
- All Known Implementing Classes:
AbstractDelegatedSignatureService
,AbstractDelegatedTransactionVerifier
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 Summary
Modifier and TypeMethodDescriptiondefault <T extends Transaction>
booleanverifyMultiSigned
(Set<SignatureWithKeyMetadata> signatureWithKeyMetadataSet, T unsignedTransaction) Verify that all signers have properly signed theunsignedTransaction
.<T extends Transaction>
booleanverifyMultiSigned
(Set<SignatureWithKeyMetadata> signatureWithKeyMetadataSet, T unsignedTransaction, int minSigners) Verify thatminSigners
from the collection of public keys have supplied signatures for the given theunsignedTransaction
.<T extends Transaction>
booleanverifySingleSigned
(SignatureWithKeyMetadata signatureWithKeyMetadata, T unsignedTransaction) TransactionVerifier the supplied digital-signature to ensure that it was constructed using the private-key corresponding topublicKey
.Methods inherited from interface org.xrpl.xrpl4j.crypto.core.signing.DelegatedPublicKeyProvider
getPublicKey
-
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 topublicKey
.- Type Parameters:
T
- ATransaction
.- Parameters:
signatureWithKeyMetadata
- ASignatureWithKeyMetadata
that contains a signature and a public key that can be used to verify the transaction signature.unsignedTransaction
- ADelegatedTransactionVerifier
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 theunsignedTransaction
.- Type Parameters:
T
- The actual type ofTransaction
.- Parameters:
signatureWithKeyMetadataSet
- ASet
ofSignatureWithKeyMetadata
used for verification.unsignedTransaction
- TheTransaction
of typeDelegatedTransactionVerifier
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 thatminSigners
from the collection of public keys have supplied signatures for the given theunsignedTransaction
.- Type Parameters:
T
- The actual type ofTransaction
.- Parameters:
signatureWithKeyMetadataSet
- ASet
ofSignatureWithKeyMetadata
used for verification.unsignedTransaction
- The transaction of typeDelegatedTransactionVerifier
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.
-