3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class RouteHint extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.RouteHint_free(this.ptr);
21 public Uint8Array get_src_node_id() {
22 Uint8Array ret = bindings.RouteHint_get_src_node_id(this.ptr);
26 public void set_src_node_id(Uint8Array val) {
27 bindings.RouteHint_set_src_node_id(this.ptr, val);
30 public number get_short_channel_id() {
31 number ret = bindings.RouteHint_get_short_channel_id(this.ptr);
35 public void set_short_channel_id(number val) {
36 bindings.RouteHint_set_short_channel_id(this.ptr, val);
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);
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);
51 public number get_cltv_expiry_delta() {
52 number ret = bindings.RouteHint_get_cltv_expiry_delta(this.ptr);
56 public void set_cltv_expiry_delta(number val) {
57 bindings.RouteHint_set_cltv_expiry_delta(this.ptr, val);
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);