Interface SecpXOnlyPubKey

All Known Implementing Classes:
SecpXOnlyPubKeyImpl

public interface SecpXOnlyPubKey
An x-only public key from a point on the secp256k1 curve
  • Method Details

    • getX

      BigInteger getX()
      Get X as a BigInteger
      Returns:
      X as a BigInteger
    • serialize

      byte[] serialize()
      Serialize as a 32-byte, Big-endian byte array
      Returns:
      Big-endian, 32 bytes
    • parse

      static SecpResult<SecpXOnlyPubKey> parse(byte[] serialized)
      Parses a serialized x-only pubkey and returns an instance of the default implementation
      Parameters:
      serialized - byte string in x-only pubkey serialization format
      Returns:
      an instance of the default implementation
    • of

      static SecpXOnlyPubKey of(BigInteger x)
      Create an X-only public key from a BigInteger.
      Parameters:
      x - X
      Returns:
      an instance of the default implementation
    • of

      static SecpXOnlyPubKey of(byte[] xBytes)
      Create an X-only public key from a 32-byte, big-endian byte[].
      Parameters:
      xBytes - X
      Returns:
      an instance of the default implementation