Class NodeId


  • public class NodeId
    extends Object
    Represents the compressed public key of a node
    • Method Detail

      • clone

        public NodeId clone()
        Creates a copy of the NodeId
        Overrides:
        clone in class Object
      • 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
      • hash

        public long hash()
        Generates a non-cryptographic 64-bit hash of the NodeId.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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