Package org.ldk.structs
Class NodeId
- java.lang.Object
-
- org.ldk.structs.NodeId
-
public class NodeId extends Object
Represents the compressed public key of a node
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Result_PublicKeyErrorZ
as_pubkey()
Get the public key from this NodeIdbyte[]
as_slice()
Get the public key slice from this NodeIdNodeId
clone()
Creates a copy of the NodeIdprotected void
finalize()
static NodeId
from_pubkey(byte[] pubkey)
Create a new NodeId from a public keylong
hash()
Generates a non-cryptographic 64-bit hash of the NodeId.int
hashCode()
static Result_NodeIdDecodeErrorZ
read(byte[] ser)
Read a NodeId from a byte array, created by NodeId_writebyte[]
write()
Serialize the NodeId object into a byte array which can be read by NodeId_read
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
from_pubkey
public static NodeId from_pubkey(byte[] pubkey)
Create a new NodeId from a public key
-
as_slice
public byte[] as_slice()
Get the public key slice from this NodeId
-
as_pubkey
public Result_PublicKeyErrorZ as_pubkey()
Get the public key from this NodeId
-
hash
public long hash()
Generates a non-cryptographic 64-bit hash of the NodeId.
-
write
public byte[] write()
Serialize the NodeId object into a byte array which can be read by NodeId_read
-
read
public static Result_NodeIdDecodeErrorZ read(byte[] ser)
Read a NodeId from a byte array, created by NodeId_write
-
-