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 (no prefix byte)
      Returns:
      Big-endian, 32 bytes
    • serializeCompressed

      byte[] serializeCompressed()
      Serialize as SECG Compressed (i.e. an even value, prefixed with a 0x02 byte).
      Returns:
      SECG Compressed (even) value
    • parse

      @Deprecated(forRemoval=true) static SecpResult<SecpXOnlyPubKey> parse(byte[] serialized)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parses a serialized x-only pubkey and returns an instance of the default implementation

      This method is deprecated because it does not validate they x-only pubkey.

      Parameters:
      serialized - byte string in x-only pubkey serialization format
      Returns:
      an instance of the default implementation