+ /**
+ * 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
+ */
+ public get_introduction_node_id(): Uint8Array {
+ const ret: number = bindings.BlindedPath_get_introduction_node_id(this.ptr);
+ const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * 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
+ */
+ public set_introduction_node_id(val: Uint8Array): void {
+ bindings.BlindedPath_set_introduction_node_id(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33)));
+ }
+
+ /**
+ * Used by the introduction node to decrypt its [`encrypted_payload`] to forward the onion
+ * message or payment.
+ *
+ * [`encrypted_payload`]: BlindedHop::encrypted_payload
+ */
+ public get_blinding_point(): Uint8Array {
+ const ret: number = bindings.BlindedPath_get_blinding_point(this.ptr);
+ const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
+ return ret_conv;
+ }
+
+ /**
+ * Used by the introduction node to decrypt its [`encrypted_payload`] to forward the onion
+ * message or payment.
+ *
+ * [`encrypted_payload`]: BlindedHop::encrypted_payload
+ */
+ public set_blinding_point(val: Uint8Array): void {
+ bindings.BlindedPath_set_blinding_point(this.ptr, bindings.encodeUint8Array(bindings.check_arr_len(val, 33)));
+ }
+
+ /**
+ * The hops composing the blinded path.
+ */
+ public get_blinded_hops(): BlindedHop[] {
+ const ret: number = bindings.BlindedPath_get_blinded_hops(this.ptr);
+ const ret_conv_12_len: number = bindings.getArrayLength(ret);
+ const ret_conv_12_arr: BlindedHop[] = new Array(ret_conv_12_len).fill(null);
+ for (var m = 0; m < ret_conv_12_len; m++) {
+ const ret_conv_12: bigint = bindings.getU64ArrayElem(ret, m);
+ const ret_conv_12_hu_conv: BlindedHop = new BlindedHop(null, ret_conv_12);
+ CommonBase.add_ref_from(ret_conv_12_hu_conv, this);
+ ret_conv_12_arr[m] = ret_conv_12_hu_conv;
+ }
+ bindings.freeWasmMemory(ret)
+ return ret_conv_12_arr;
+ }
+
+ /**
+ * The hops composing the blinded path.
+ */
+ public set_blinded_hops(val: BlindedHop[]): void {
+ bindings.BlindedPath_set_blinded_hops(this.ptr, bindings.encodeUint64Array(val.map(val_conv_12 => val_conv_12 == null ? 0n : CommonBase.get_ptr_of(val_conv_12))));
+ val.forEach((val_conv_12: BlindedHop) => { CommonBase.add_ref_from(this, val_conv_12); });
+ }
+
+ /**
+ * Constructs a new BlindedPath given each field
+ */
+ public static constructor_new(introduction_node_id_arg: Uint8Array, blinding_point_arg: Uint8Array, blinded_hops_arg: BlindedHop[]): BlindedPath {
+ const ret: bigint = bindings.BlindedPath_new(bindings.encodeUint8Array(bindings.check_arr_len(introduction_node_id_arg, 33)), bindings.encodeUint8Array(bindings.check_arr_len(blinding_point_arg, 33)), bindings.encodeUint64Array(blinded_hops_arg.map(blinded_hops_arg_conv_12 => blinded_hops_arg_conv_12 == null ? 0n : CommonBase.get_ptr_of(blinded_hops_arg_conv_12))));
+ const ret_hu_conv: BlindedPath = new BlindedPath(null, ret);
+ CommonBase.add_ref_from(ret_hu_conv, ret_hu_conv);
+ blinded_hops_arg.forEach((blinded_hops_arg_conv_12: BlindedHop) => { CommonBase.add_ref_from(ret_hu_conv, blinded_hops_arg_conv_12); });
+ return ret_hu_conv;
+ }
+