2 import CommonBase from './CommonBase';
3 import * as bindings from '../bindings' // TODO: figure out location
5 public class DirectionalChannelInfo extends CommonBase {
6 DirectionalChannelInfo(Object _dummy, long ptr) { super(ptr); }
7 @Override @SuppressWarnings("deprecation")
8 protected void finalize() throws Throwable {
10 if (ptr != 0) { bindings.DirectionalChannelInfo_free(ptr); }
13 public int get_last_update() {
14 int ret = bindings.DirectionalChannelInfo_get_last_update(this.ptr);
18 public void set_last_update(int val) {
19 bindings.DirectionalChannelInfo_set_last_update(this.ptr, val);
22 public boolean get_enabled() {
23 boolean ret = bindings.DirectionalChannelInfo_get_enabled(this.ptr);
27 public void set_enabled(boolean val) {
28 bindings.DirectionalChannelInfo_set_enabled(this.ptr, val);
31 public short get_cltv_expiry_delta() {
32 short ret = bindings.DirectionalChannelInfo_get_cltv_expiry_delta(this.ptr);
36 public void set_cltv_expiry_delta(short val) {
37 bindings.DirectionalChannelInfo_set_cltv_expiry_delta(this.ptr, val);
40 public long get_htlc_minimum_msat() {
41 long ret = bindings.DirectionalChannelInfo_get_htlc_minimum_msat(this.ptr);
45 public void set_htlc_minimum_msat(long val) {
46 bindings.DirectionalChannelInfo_set_htlc_minimum_msat(this.ptr, val);
49 public RoutingFees get_fees() {
50 uint32_t ret = bindings.DirectionalChannelInfo_get_fees(this.ptr);
51 RoutingFees ret_hu_conv = new RoutingFees(null, ret);
55 public void set_fees(RoutingFees val) {
56 bindings.DirectionalChannelInfo_set_fees(this.ptr, val == null ? 0 : val.ptr & ~1);
57 this.ptrs_to.add(val);
60 public ChannelUpdate get_last_update_message() {
61 uint32_t ret = bindings.DirectionalChannelInfo_get_last_update_message(this.ptr);
62 ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
66 public void set_last_update_message(ChannelUpdate val) {
67 bindings.DirectionalChannelInfo_set_last_update_message(this.ptr, val == null ? 0 : val.ptr & ~1);
68 this.ptrs_to.add(val);
71 public byte[] write() {
72 byte[] ret = bindings.DirectionalChannelInfo_write(this.ptr);
76 public static DirectionalChannelInfo constructor_read(byte[] ser) {
77 uint32_t ret = bindings.DirectionalChannelInfo_read(ser);
78 DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);