Package org.xrpl.xrpl4j.crypto.signing
Class AbstractSignatureService
java.lang.Object
org.xrpl.xrpl4j.crypto.signing.AbstractSignatureService
- All Implemented Interfaces:
SignatureService
,TransactionSigner
,TransactionVerifier
@Deprecated
public abstract class AbstractSignatureService
extends Object
implements SignatureService
Deprecated.
An abstract implementation of
SignatureService
with common functionality that sub-classes can utilize.-
Field Summary
-
Constructor Summary
ConstructorDescriptionAbstractSignatureService
(KeyStoreType keyStoreType, SignatureUtils signatureUtils, KeyPairService keyPairService) Deprecated.Required-args Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Signature
ecDsaSign
(KeyMetadata privateKeyMetadata, UnsignedByteArray signableTransactionBytes) Deprecated.Does the actual work of computing a signature using a secp256k1 private-key, as locatable usingprivateKeyMetadata
.protected abstract boolean
ecDsaVerify
(KeyMetadata keyMetadata, SignedTransaction transactionWithSignature, UnsignedByteArray signableTransactionBytes) Deprecated.Verify a signature.protected abstract Signature
edDsaSign
(KeyMetadata privateKeyMetadata, UnsignedByteArray signableTransactionBytes) Deprecated.Does the actual work of computing a signature using a ed25519 private-key, as locatable usingprivateKeyMetadata
.protected abstract boolean
edDsaVerify
(KeyMetadata keyMetadata, SignedTransaction transactionWithSignature, UnsignedByteArray signableTransactionBytes) Deprecated.Verify a signature.final KeyStoreType
Deprecated.The type of org.xrpl4j.crypto.keystore this signer can be used with.<T extends Transaction>
SignedTransaction<T>sign
(KeyMetadata keyMetadata, T transaction) Deprecated.Obtain a signature for the supplied transaction using the private-key that corresponds tokeyMetadata
.signWithBehavior
(KeyMetadata keyMetadata, Transaction transaction, SigningBehavior behavior) Deprecated.Obtain a signature according to thebehavior
specified for the supplied transaction using the private-key that corresponds tokeyMetadata
.<T extends Transaction>
booleanverify
(KeyMetadata keyMetadata, SignedTransaction<T> transactionWithSignature) Deprecated.TransactionVerifier the supplied digital-signature to ensure that it was constructed using the private-key corresponding topublicKey
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xrpl.xrpl4j.crypto.signing.SignatureService
getPublicKey
-
Field Details
-
logger
protected final org.slf4j.Logger loggerDeprecated.A logger.
-
-
Constructor Details
-
AbstractSignatureService
public AbstractSignatureService(KeyStoreType keyStoreType, SignatureUtils signatureUtils, KeyPairService keyPairService) Deprecated.Required-args Constructor.- Parameters:
keyStoreType
- TheKeyStoreType
for this service.signatureUtils
- AnSignatureUtils
for help with signing.keyPairService
- AKeyPairService
to sign transactions.
-
-
Method Details
-
keyStoreType
Deprecated.Description copied from interface:SignatureService
The type of org.xrpl4j.crypto.keystore this signer can be used with.- Specified by:
keyStoreType
in interfaceSignatureService
- Returns:
- A
KeyStoreType
.
-
sign
Deprecated.Description copied from interface:TransactionSigner
Obtain a signature for the supplied transaction using the private-key that corresponds tokeyMetadata
. If an implementation does not contain more than a single public/private key pair, thenKeyMetadata.EMPTY
should be passed into this method.- Specified by:
sign
in interfaceTransactionSigner
- Type Parameters:
T
- The type of the transaction to be signed.- Parameters:
keyMetadata
- AKeyMetadata
that describes the public/private Keypair to use for signing operations.transaction
- ATransaction
to sign.- Returns:
- A
SignedTransaction
containing binary data that can be submitted to the XRP Ledger in order to effect a transaction.
-
signWithBehavior
public Signature signWithBehavior(KeyMetadata keyMetadata, Transaction transaction, SigningBehavior behavior) Deprecated.Description copied from interface:TransactionSigner
Obtain a signature according to thebehavior
specified for the supplied transaction using the private-key that corresponds tokeyMetadata
. This method can be used to sign a multi-signed transaction by passing inSigningBehavior.MULTI
.If an implementation does not contain more than a single public/private key pair, then
KeyMetadata.EMPTY
should be passed into this method.- Specified by:
signWithBehavior
in interfaceTransactionSigner
- Parameters:
keyMetadata
- AKeyMetadata
that describes the public/private Keypair to use for signing operations.transaction
- ATransaction
to sign.behavior
- ASigningBehavior
specifying the type of signature that should be produced.- Returns:
- A
Signature
containing the transaction signature.
-
verify
public <T extends Transaction> boolean verify(KeyMetadata keyMetadata, SignedTransaction<T> transactionWithSignature) Deprecated.Description copied from interface:TransactionVerifier
TransactionVerifier the supplied digital-signature to ensure that it was constructed using the private-key corresponding topublicKey
.- Specified by:
verify
in interfaceTransactionVerifier
- Type Parameters:
T
- The actual type ofTransaction
.- Parameters:
keyMetadata
- AKeyMetadata
that describes the public/private Keypair to use for verification.transactionWithSignature
- ASignedTransaction
with aSignature
over a suppliedTransaction
.- Returns:
true
if the signature is valid and verified;false
otherwise.
-
edDsaSign
protected abstract Signature edDsaSign(KeyMetadata privateKeyMetadata, UnsignedByteArray signableTransactionBytes) Deprecated.Does the actual work of computing a signature using a ed25519 private-key, as locatable usingprivateKeyMetadata
.- Parameters:
privateKeyMetadata
- AKeyMetadata
to describe the private-key to use for signing.signableTransactionBytes
- AUnsignedByteArray
to sign.- Returns:
- A
Signature
with data that can be used to submit a transaction to the XRP Ledger.
-
ecDsaSign
protected abstract Signature ecDsaSign(KeyMetadata privateKeyMetadata, UnsignedByteArray signableTransactionBytes) Deprecated.Does the actual work of computing a signature using a secp256k1 private-key, as locatable usingprivateKeyMetadata
.- Parameters:
privateKeyMetadata
- AKeyMetadata
to describe the private-key to use for signing.signableTransactionBytes
- AUnsignedByteArray
to sign.- Returns:
- A
Signature
with data that can be used to submit a transaction to the XRP Ledger.
-
edDsaVerify
protected abstract boolean edDsaVerify(KeyMetadata keyMetadata, SignedTransaction transactionWithSignature, UnsignedByteArray signableTransactionBytes) Deprecated.Verify a signature.- Parameters:
keyMetadata
- AKeyMetadata
.transactionWithSignature
- ASignedTransaction
.signableTransactionBytes
- AUnsignedByteArray
.- Returns:
true
if the signature is valid;false
otherwise.
-
ecDsaVerify
protected abstract boolean ecDsaVerify(KeyMetadata keyMetadata, SignedTransaction transactionWithSignature, UnsignedByteArray signableTransactionBytes) Deprecated.Verify a signature.- Parameters:
keyMetadata
- AKeyMetadata
.transactionWithSignature
- ASignedTransaction
.signableTransactionBytes
- AUnsignedByteArray
.- Returns:
true
if the signature is valid;false
otherwise.
-
org.xrpl.xrpl4j.crypto.core
instead.