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 SecpXOnlyPubKeyof(byte[] xBytes) Create an X-only public key from a 32-byte, big-endianbyte[].static SecpXOnlyPubKeyof(BigInteger x) Create an X-only public key from aBigInteger.static SecpResult<SecpXOnlyPubKey> parse(byte[] serialized) Parses a serialized x-only pubkey and returns an instance of the default implementationbyte[]Serialize as a 32-byte, Big-endian byte array
-
Method Details
-
getX
-
serialize
byte[] serialize()Serialize as a 32-byte, Big-endian byte array- Returns:
- Big-endian, 32 bytes
-
parse
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
Create an X-only public key from aBigInteger.- Parameters:
x- X- Returns:
- an instance of the default implementation
-
of
Create an X-only public key from a 32-byte, big-endianbyte[].- Parameters:
xBytes- X- Returns:
- an instance of the default implementation
-