Package ch.bitagent.bitcoin.lib.ecc
Class S256Point
- java.lang.Object
-
- ch.bitagent.bitcoin.lib.ecc.Point
-
- ch.bitagent.bitcoin.lib.ecc.S256Point
-
public class S256Point extends Point
A point (public key) on a secp256k1 elliptic curve
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description S256Pointadd(Point other)add.Stringaddress(Boolean compressed, boolean testnet)Returns the address stringStringaddressBech32P2wpkh(boolean testnet)Returns the bech32 p2wpkh addressstatic S256PointgetG()Getter for the fieldg.byte[]hash160(Boolean compressed)hash160.S256Pointmul(Int coefficient)mul.static S256Pointparse(byte[] secBin)returns a Point object from a SEC binary (not hex)byte[]sec(Boolean compressed)returns the binary version of the SEC formatStringtoString()booleanverify(Int z, Signature signature)verify.
-
-
-
Field Detail
-
N
public static final Int N
ConstantN
-
-
Method Detail
-
sec
public byte[] sec(Boolean compressed)
returns the binary version of the SEC format- Parameters:
compressed- aBooleanobject- Returns:
- an array of
byteobjects
-
hash160
public byte[] hash160(Boolean compressed)
hash160.
- Parameters:
compressed- aBooleanobject- Returns:
- an array of
byteobjects
-
addressBech32P2wpkh
public String addressBech32P2wpkh(boolean testnet)
Returns the bech32 p2wpkh address- Parameters:
testnet-- Returns:
-
parse
public static S256Point parse(byte[] secBin)
returns a Point object from a SEC binary (not hex)- Parameters:
secBin- an array ofbyteobjects- Returns:
- a
S256Pointobject
-
-