]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/InitFeatures.ts
Update auto-generate bindings (incl new RL clone methods)
[ldk-java] / ts / structs / InitFeatures.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 InitFeatures 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.InitFeatures_free(this.ptr);
19                     }
20                 }
21         public boolean eq(InitFeatures b) {
22                 boolean ret = bindings.InitFeatures_eq(this.ptr, b == null ? 0 : b.ptr & ~1);
23                 this.ptrs_to.add(b);
24                 return ret;
25         }
26
27         public InitFeatures clone() {
28                 number ret = bindings.InitFeatures_clone(this.ptr);
29                 const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
30                 ret_hu_conv.ptrs_to.add(this);
31                 return ret_hu_conv;
32         }
33
34         public static InitFeatures constructor_empty() {
35                 number ret = bindings.InitFeatures_empty();
36                 const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
37                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
38                 return ret_hu_conv;
39         }
40
41         public static InitFeatures constructor_known() {
42                 number ret = bindings.InitFeatures_known();
43                 const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
44                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
45                 return ret_hu_conv;
46         }
47
48         public boolean requires_unknown_bits() {
49                 boolean ret = bindings.InitFeatures_requires_unknown_bits(this.ptr);
50                 return ret;
51         }
52
53         public boolean supports_payment_secret() {
54                 boolean ret = bindings.InitFeatures_supports_payment_secret(this.ptr);
55                 return ret;
56         }
57
58         public Uint8Array write() {
59                 Uint8Array ret = bindings.InitFeatures_write(this.ptr);
60                 return ret;
61         }
62
63         public static Result_InitFeaturesDecodeErrorZ constructor_read(Uint8Array ser) {
64                 number ret = bindings.InitFeatures_read(ser);
65                 Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
66                 return ret_hu_conv;
67         }
68
69 }