Interface SecpXOnlyPubKey
- All Known Implementing Classes:
SecpXOnlyPubKeyImpl
public interface SecpXOnlyPubKey
An x-only public key from a point on the secp256k1 curve
-
Method Summary
Modifier and TypeMethodDescriptiongetX()Get X as aBigIntegerstatic SecpResult<SecpXOnlyPubKey> parse(byte[] serialized) Deprecated, for removal: This API element is subject to removal in a future version.byte[]Serialize as a 32-byte, Big-endian byte array (no prefix byte)byte[]Serialize as SECG Compressed (i.e. an even value, prefixed with a 0x02 byte).
-
Method Details
-
getX
-
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, for removal: This API element is subject to removal in a future version.UseSecp256k1.xOnlyPubKeyParse(byte[])insteadParses a serialized x-only pubkey and returns an instance of the default implementationThis 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
-
Secp256k1.xOnlyPubKeyParse(byte[])instead