3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class ChannelDetails extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.ChannelDetails_free(this.ptr);
21 public Uint8Array get_channel_id() {
22 Uint8Array ret = bindings.ChannelDetails_get_channel_id(this.ptr);
26 public void set_channel_id(Uint8Array val) {
27 bindings.ChannelDetails_set_channel_id(this.ptr, val);
30 public Option_u64Z get_short_channel_id() {
31 number ret = bindings.ChannelDetails_get_short_channel_id(this.ptr);
32 Option_u64Z ret_hu_conv = Option_u64Z.constr_from_ptr(ret);
33 ret_hu_conv.ptrs_to.add(this);
37 public void set_short_channel_id(Option_u64Z val) {
38 bindings.ChannelDetails_set_short_channel_id(this.ptr, val.ptr);
41 public Uint8Array get_remote_network_id() {
42 Uint8Array ret = bindings.ChannelDetails_get_remote_network_id(this.ptr);
46 public void set_remote_network_id(Uint8Array val) {
47 bindings.ChannelDetails_set_remote_network_id(this.ptr, val);
50 public InitFeatures get_counterparty_features() {
51 number ret = bindings.ChannelDetails_get_counterparty_features(this.ptr);
52 const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
53 ret_hu_conv.ptrs_to.add(this);
57 public void set_counterparty_features(InitFeatures val) {
58 bindings.ChannelDetails_set_counterparty_features(this.ptr, val == null ? 0 : val.ptr & ~1);
59 this.ptrs_to.add(val);
62 public number get_channel_value_satoshis() {
63 number ret = bindings.ChannelDetails_get_channel_value_satoshis(this.ptr);
67 public void set_channel_value_satoshis(number val) {
68 bindings.ChannelDetails_set_channel_value_satoshis(this.ptr, val);
71 public number get_user_id() {
72 number ret = bindings.ChannelDetails_get_user_id(this.ptr);
76 public void set_user_id(number val) {
77 bindings.ChannelDetails_set_user_id(this.ptr, val);
80 public number get_outbound_capacity_msat() {
81 number ret = bindings.ChannelDetails_get_outbound_capacity_msat(this.ptr);
85 public void set_outbound_capacity_msat(number val) {
86 bindings.ChannelDetails_set_outbound_capacity_msat(this.ptr, val);
89 public number get_inbound_capacity_msat() {
90 number ret = bindings.ChannelDetails_get_inbound_capacity_msat(this.ptr);
94 public void set_inbound_capacity_msat(number val) {
95 bindings.ChannelDetails_set_inbound_capacity_msat(this.ptr, val);
98 public boolean get_is_live() {
99 boolean ret = bindings.ChannelDetails_get_is_live(this.ptr);
103 public void set_is_live(boolean val) {
104 bindings.ChannelDetails_set_is_live(this.ptr, val);
107 public ChannelDetails clone() {
108 number ret = bindings.ChannelDetails_clone(this.ptr);
109 const ret_hu_conv: ChannelDetails = new ChannelDetails(null, ret);
110 ret_hu_conv.ptrs_to.add(this);