Class HftSignerSdk

java.lang.Object
dev.sodot.hftsigner.HftSignerSdk
All Implemented Interfaces:
AutoCloseable

public class HftSignerSdk extends Object implements AutoCloseable

HftSignerSdk class.

This SDK provides methods to interact with the HFT Signer service. It allows signing messages using various algorithms (HMAC256, HMAC512, ED25519). NOTE: This class is not Thread-safe!
  • Constructor Details

  • Method Details

    • signHmacSha256

      public byte[] signHmacSha256(byte[] message, byte[] hftApiKey) throws IOException
      Signs a message using the HMAC-SHA256 algorithm.
      Parameters:
      message - an array of Byte
      hftApiKey - the HFT API key associated with the desired private key to sign the message, as a byte array (Byte)
      Returns:
      the signed message as an array of Byte.
      Throws:
      IOException - if any.
    • signHmacSha512

      public byte[] signHmacSha512(byte[] message, byte[] hftApiKey) throws IOException
      Signs a message using the HMAC-SHA512 algorithm.
      Parameters:
      message - an array of Byte
      hftApiKey - the HFT API key associated with the desired private key to sign the message, as a byte array (Byte)
      Returns:
      the signed message as an array of Byte.
      Throws:
      IOException - if any.
    • signEd25519

      public byte[] signEd25519(byte[] message, byte[] hftApiKey) throws IOException
      Signs a message using the ED25519 algorithm.
      Parameters:
      message - an array of Byte
      hftApiKey - the HFT API key associated with the desired private key to sign the message, as a byte array (Byte)
      Returns:
      the signed message as an array of Byte.
      Throws:
      IOException - if any.
    • importHmacSha256

      public byte[] importHmacSha256(SodotVertexDetails[] vertexDetails) throws IOException
      Imports HMAC-SHA256 key into the HFT Signer service.
      Parameters:
      vertexDetails - an array of SodotVertexDetails objects
      Returns:
      HftApiKey as an array of Byte.
      Throws:
      IOException - if any.
    • importHmacSha512

      public byte[] importHmacSha512(SodotVertexDetails[] vertexDetails) throws IOException
      Imports HMAC-SHA512 key into the HFT Signer service.
      Parameters:
      vertexDetails - an array of SodotVertexDetails objects
      Returns:
      HftApiKey as an array of Byte.
      Throws:
      IOException - if any.
    • importEd25519

      public byte[] importEd25519(SodotVertexDetails[] vertexDetails) throws IOException
      Imports ED25519 key into the HFT Signer service.
      Parameters:
      vertexDetails - an array of SodotVertexDetails objects
      Returns:
      HftApiKey as an array of Byte.
      Throws:
      IOException - if any.
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException