Class SecpXOnlyPubKeyImpl

java.lang.Object
org.bitcoinj.secp.internal.SecpXOnlyPubKeyImpl
All Implemented Interfaces:
Comparable<ByteArray>, ByteArray, SecpXOnlyPubKey

public class SecpXOnlyPubKeyImpl extends Object implements SecpXOnlyPubKey, ByteArray
Simple implementation using {code @byte[]} as internal storage.
  • Constructor Details

    • SecpXOnlyPubKeyImpl

      public SecpXOnlyPubKeyImpl(SecpPubKey pubKey)
    • SecpXOnlyPubKeyImpl

      public SecpXOnlyPubKeyImpl(byte[] xBytes)
    • SecpXOnlyPubKeyImpl

      public SecpXOnlyPubKeyImpl(BigInteger x)
  • Method Details

    • getX

      public BigInteger getX()
      Description copied from interface: SecpXOnlyPubKey
      Get X as a BigInteger
      Specified by:
      getX in interface SecpXOnlyPubKey
      Returns:
      X as a BigInteger
    • bytes

      public byte[] bytes()
      Description copied from interface: ByteArray
      Get the bytes as an array
      Specified by:
      bytes in interface ByteArray
      Returns:
      the bytes as an array
    • serialize

      public byte[] serialize()
      Description copied from interface: SecpXOnlyPubKey
      Serialize as a 32-byte, Big-endian byte array
      Specified by:
      serialize in interface SecpXOnlyPubKey
      Returns:
      Big-endian, 32 bytes
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      A hex string representing the default binary serialization format