9e0474f570694d33499e9c6882b70c13383f0354
[ldk-java] / ts / structs / RouteHint.ts
1
2             
3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
5
6
7
8             export default class RouteHint extends CommonBase {
9                 constructor(_dummy: object, ptr: number) {
10                     super(ptr);
11                 }
12
13                 
14                 protected finalize() {
15                     super.finalize();
16
17                     if (this.ptr != 0) {
18                         bindings.RouteHint_free(this.ptr);
19                     }
20                 }
21         public Uint8Array get_src_node_id() {
22                 Uint8Array ret = bindings.RouteHint_get_src_node_id(this.ptr);
23                 return ret;
24         }
25
26         public void set_src_node_id(Uint8Array val) {
27                 bindings.RouteHint_set_src_node_id(this.ptr, val);
28         }
29
30         public number get_short_channel_id() {
31                 number ret = bindings.RouteHint_get_short_channel_id(this.ptr);
32                 return ret;
33         }
34
35         public void set_short_channel_id(number val) {
36                 bindings.RouteHint_set_short_channel_id(this.ptr, val);
37         }
38
39         public RoutingFees get_fees() {
40                 number ret = bindings.RouteHint_get_fees(this.ptr);
41                 const ret_hu_conv: RoutingFees = new RoutingFees(null, ret);
42                 ret_hu_conv.ptrs_to.add(this);
43                 return ret_hu_conv;
44         }
45
46         public void set_fees(RoutingFees val) {
47                 bindings.RouteHint_set_fees(this.ptr, val == null ? 0 : val.ptr & ~1);
48                 this.ptrs_to.add(val);
49         }
50
51         public number get_cltv_expiry_delta() {
52                 number ret = bindings.RouteHint_get_cltv_expiry_delta(this.ptr);
53                 return ret;
54         }
55
56         public void set_cltv_expiry_delta(number val) {
57                 bindings.RouteHint_set_cltv_expiry_delta(this.ptr, val);
58         }
59
60         public RouteHint clone() {
61                 number ret = bindings.RouteHint_clone(this.ptr);
62                 const ret_hu_conv: RouteHint = new RouteHint(null, ret);
63                 ret_hu_conv.ptrs_to.add(this);
64                 return ret_hu_conv;
65         }
66
67 }