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.
Prefer the variant found in org.xrpl.xrpl4j.crypto.core instead.
An abstract implementation of SignatureService with common functionality that sub-classes can utilize.
  • Field Details

    • logger

      protected final org.slf4j.Logger logger
      Deprecated.
      A logger.
  • Constructor Details

  • Method Details

    • keyStoreType

      public final KeyStoreType keyStoreType()
      Deprecated.
      Description copied from interface: SignatureService
      The type of org.xrpl4j.crypto.keystore this signer can be used with.
      Specified by:
      keyStoreType in interface SignatureService
      Returns:
      A KeyStoreType.
    • sign

      public <T extends Transaction> SignedTransaction<T> sign(KeyMetadata keyMetadata, T transaction)
      Deprecated.
      Description copied from interface: TransactionSigner
      Obtain a signature for the supplied transaction using the private-key that corresponds to keyMetadata. 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:
      sign in interface TransactionSigner
      Type Parameters:
      T - The type of the transaction to be signed.
      Parameters:
      keyMetadata - A KeyMetadata that describes the public/private Keypair to use for signing operations.
      transaction - A Transaction 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 the behavior specified for the supplied transaction using the private-key that corresponds to keyMetadata. This method can be used to sign a multi-signed transaction by passing in SigningBehavior.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 interface TransactionSigner
      Parameters:
      keyMetadata - A KeyMetadata that describes the public/private Keypair to use for signing operations.
      transaction - A Transaction to sign.
      behavior - A SigningBehavior 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 to publicKey.
      Specified by:
      verify in interface TransactionVerifier
      Type Parameters:
      T - The actual type of Transaction.
      Parameters:
      keyMetadata - A KeyMetadata that describes the public/private Keypair to use for verification.
      transactionWithSignature - A SignedTransaction with a Signature over a supplied Transaction.
      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 using privateKeyMetadata.
      Parameters:
      privateKeyMetadata - A KeyMetadata to describe the private-key to use for signing.
      signableTransactionBytes - A UnsignedByteArray 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 using privateKeyMetadata.
      Parameters:
      privateKeyMetadata - A KeyMetadata to describe the private-key to use for signing.
      signableTransactionBytes - A UnsignedByteArray 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 - A KeyMetadata.
      transactionWithSignature - A SignedTransaction.
      signableTransactionBytes - A UnsignedByteArray.
      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 - A KeyMetadata.
      transactionWithSignature - A SignedTransaction.
      signableTransactionBytes - A UnsignedByteArray.
      Returns:
      true if the signature is valid; false otherwise.