3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class ChannelCounterparty extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.ChannelCounterparty_free(this.ptr);
21 public Uint8Array get_node_id() {
22 Uint8Array ret = bindings.ChannelCounterparty_get_node_id(this.ptr);
26 public void set_node_id(Uint8Array val) {
27 bindings.ChannelCounterparty_set_node_id(this.ptr, val);
30 public InitFeatures get_features() {
31 number ret = bindings.ChannelCounterparty_get_features(this.ptr);
32 const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
33 ret_hu_conv.ptrs_to.add(this);
37 public void set_features(InitFeatures val) {
38 bindings.ChannelCounterparty_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
39 this.ptrs_to.add(val);
42 public number get_unspendable_punishment_reserve() {
43 number ret = bindings.ChannelCounterparty_get_unspendable_punishment_reserve(this.ptr);
47 public void set_unspendable_punishment_reserve(number val) {
48 bindings.ChannelCounterparty_set_unspendable_punishment_reserve(this.ptr, val);
51 public ChannelCounterparty clone() {
52 number ret = bindings.ChannelCounterparty_clone(this.ptr);
53 const ret_hu_conv: ChannelCounterparty = new ChannelCounterparty(null, ret);
54 ret_hu_conv.ptrs_to.add(this);