Class BlindedPath


  • public class BlindedPath
    extends Object
    Onion messages and payments can be sent and received to blinded paths, which serve to hide the identity of the recipient.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      BlindedPath clone()
      Creates a copy of the BlindedPath
      boolean eq​(BlindedPath b)
      Checks if two BlindedPaths contain equal inner contents.
      boolean equals​(Object o)  
      protected void finalize()  
      BlindedHop[] get_blinded_hops()
      The hops composing the blinded path.
      byte[] get_blinding_point()
      Used by the introduction node to decrypt its [`encrypted_payload`] to forward the onion message or payment.
      byte[] get_introduction_node_id()
      To send to a blinded path, the sender first finds a route to the unblinded `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion message or payment's next hop and forward it along.
      long hash()
      Generates a non-cryptographic 64-bit hash of the BlindedPath.
      int hashCode()  
      static Result_BlindedPathNoneZ new_for_message​(byte[][] node_pks, EntropySource entropy_source)
      Create a blinded path for an onion message, to be forwarded along `node_pks`.
      static BlindedPath of​(byte[] introduction_node_id_arg, byte[] blinding_point_arg, BlindedHop[] blinded_hops_arg)
      Constructs a new BlindedPath given each field
      static Result_BlindedPathDecodeErrorZ read​(byte[] ser)
      Read a BlindedPath from a byte array, created by BlindedPath_write
      void set_blinded_hops​(BlindedHop[] val)
      The hops composing the blinded path.
      void set_blinding_point​(byte[] val)
      Used by the introduction node to decrypt its [`encrypted_payload`] to forward the onion message or payment.
      void set_introduction_node_id​(byte[] val)
      To send to a blinded path, the sender first finds a route to the unblinded `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion message or payment's next hop and forward it along.
      byte[] write()
      Serialize the BlindedPath object into a byte array which can be read by BlindedPath_read
    • Method Detail

      • get_introduction_node_id

        public byte[] get_introduction_node_id()
        To send to a blinded path, the sender first finds a route to the unblinded `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion message or payment's next hop and forward it along. [`encrypted_payload`]: BlindedHop::encrypted_payload
      • set_introduction_node_id

        public void set_introduction_node_id​(byte[] val)
        To send to a blinded path, the sender first finds a route to the unblinded `introduction_node_id`, which can unblind its [`encrypted_payload`] to find out the onion message or payment's next hop and forward it along. [`encrypted_payload`]: BlindedHop::encrypted_payload
      • get_blinding_point

        public byte[] get_blinding_point()
        Used by the introduction node to decrypt its [`encrypted_payload`] to forward the onion message or payment. [`encrypted_payload`]: BlindedHop::encrypted_payload
      • set_blinding_point

        public void set_blinding_point​(byte[] val)
        Used by the introduction node to decrypt its [`encrypted_payload`] to forward the onion message or payment. [`encrypted_payload`]: BlindedHop::encrypted_payload
      • get_blinded_hops

        public BlindedHop[] get_blinded_hops()
        The hops composing the blinded path.
      • set_blinded_hops

        public void set_blinded_hops​(BlindedHop[] val)
        The hops composing the blinded path.
      • of

        public static BlindedPath of​(byte[] introduction_node_id_arg,
                                     byte[] blinding_point_arg,
                                     BlindedHop[] blinded_hops_arg)
        Constructs a new BlindedPath given each field
      • hash

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

        public int hashCode()
        Overrides:
        hashCode in class Object
      • eq

        public boolean eq​(BlindedPath b)
        Checks if two BlindedPaths contain equal inner contents. This ignores pointers and is_owned flags and looks at the values in fields. Two objects with NULL inner values will be considered "equal" here.
      • new_for_message

        public static Result_BlindedPathNoneZ new_for_message​(byte[][] node_pks,
                                                              EntropySource entropy_source)
        Create a blinded path for an onion message, to be forwarded along `node_pks`. The last node pubkey in `node_pks` will be the destination node. Errors if less than two hops are provided or if `node_pk`(s) are invalid.
      • write

        public byte[] write()
        Serialize the BlindedPath object into a byte array which can be read by BlindedPath_read