]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/ChannelCounterparty.ts
Merge pull request #29 from TheBlueMatt/main
[ldk-java] / ts / structs / ChannelCounterparty.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 ChannelCounterparty 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.ChannelCounterparty_free(this.ptr);
19                     }
20                 }
21         public Uint8Array get_node_id() {
22                 Uint8Array ret = bindings.ChannelCounterparty_get_node_id(this.ptr);
23                 return ret;
24         }
25
26         public void set_node_id(Uint8Array val) {
27                 bindings.ChannelCounterparty_set_node_id(this.ptr, val);
28         }
29
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);
34                 return ret_hu_conv;
35         }
36
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);
40         }
41
42         public number get_unspendable_punishment_reserve() {
43                 number ret = bindings.ChannelCounterparty_get_unspendable_punishment_reserve(this.ptr);
44                 return ret;
45         }
46
47         public void set_unspendable_punishment_reserve(number val) {
48                 bindings.ChannelCounterparty_set_unspendable_punishment_reserve(this.ptr, val);
49         }
50
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);
55                 return ret_hu_conv;
56         }
57
58 }