1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
8 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
9 public class RouteHint extends CommonBase {
10 RouteHint(Object _dummy, long ptr) { super(ptr); }
11 @Override @SuppressWarnings("deprecation")
12 protected void finalize() throws Throwable {
14 if (ptr != 0) { bindings.RouteHint_free(ptr); }
17 public static RouteHint constructor_clone(RouteHint orig) {
18 long ret = bindings.RouteHint_clone(orig == null ? 0 : orig.ptr & ~1);
19 RouteHint ret_hu_conv = new RouteHint(null, ret);
20 ret_hu_conv.ptrs_to.add(orig);
24 public byte[] get_src_node_id() {
25 byte[] ret = bindings.RouteHint_get_src_node_id(this.ptr);
29 public void set_src_node_id(byte[] val) {
30 bindings.RouteHint_set_src_node_id(this.ptr, val);
33 public long get_short_channel_id() {
34 long ret = bindings.RouteHint_get_short_channel_id(this.ptr);
38 public void set_short_channel_id(long val) {
39 bindings.RouteHint_set_short_channel_id(this.ptr, val);
42 public RoutingFees get_fees() {
43 long ret = bindings.RouteHint_get_fees(this.ptr);
44 RoutingFees ret_hu_conv = new RoutingFees(null, ret);
48 public void set_fees(RoutingFees val) {
49 bindings.RouteHint_set_fees(this.ptr, val == null ? 0 : val.ptr & ~1);
50 this.ptrs_to.add(val);
53 public short get_cltv_expiry_delta() {
54 short ret = bindings.RouteHint_get_cltv_expiry_delta(this.ptr);
58 public void set_cltv_expiry_delta(short val) {
59 bindings.RouteHint_set_cltv_expiry_delta(this.ptr, val);
62 public long get_htlc_minimum_msat() {
63 long ret = bindings.RouteHint_get_htlc_minimum_msat(this.ptr);
67 public void set_htlc_minimum_msat(long val) {
68 bindings.RouteHint_set_htlc_minimum_msat(this.ptr, val);
71 public static RouteHint constructor_new(byte[] src_node_id_arg, long short_channel_id_arg, RoutingFees fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg) {
72 long ret = bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
73 RouteHint ret_hu_conv = new RouteHint(null, ret);
74 ret_hu_conv.ptrs_to.add(fees_arg);