]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/HTLCOutputInCommitment.ts
Fix CI
[ldk-java] / ts / structs / HTLCOutputInCommitment.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 HTLCOutputInCommitment 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.HTLCOutputInCommitment_free(this.ptr);
19                     }
20                 }
21         public boolean get_offered() {
22                 boolean ret = bindings.HTLCOutputInCommitment_get_offered(this.ptr);
23                 return ret;
24         }
25
26         public void set_offered(boolean val) {
27                 bindings.HTLCOutputInCommitment_set_offered(this.ptr, val);
28         }
29
30         public number get_amount_msat() {
31                 number ret = bindings.HTLCOutputInCommitment_get_amount_msat(this.ptr);
32                 return ret;
33         }
34
35         public void set_amount_msat(number val) {
36                 bindings.HTLCOutputInCommitment_set_amount_msat(this.ptr, val);
37         }
38
39         public number get_cltv_expiry() {
40                 number ret = bindings.HTLCOutputInCommitment_get_cltv_expiry(this.ptr);
41                 return ret;
42         }
43
44         public void set_cltv_expiry(number val) {
45                 bindings.HTLCOutputInCommitment_set_cltv_expiry(this.ptr, val);
46         }
47
48         public Uint8Array get_payment_hash() {
49                 Uint8Array ret = bindings.HTLCOutputInCommitment_get_payment_hash(this.ptr);
50                 return ret;
51         }
52
53         public void set_payment_hash(Uint8Array val) {
54                 bindings.HTLCOutputInCommitment_set_payment_hash(this.ptr, val);
55         }
56
57         public Option_u32Z get_transaction_output_index() {
58                 number ret = bindings.HTLCOutputInCommitment_get_transaction_output_index(this.ptr);
59                 Option_u32Z ret_hu_conv = Option_u32Z.constr_from_ptr(ret);
60                 ret_hu_conv.ptrs_to.add(this);
61                 return ret_hu_conv;
62         }
63
64         public void set_transaction_output_index(Option_u32Z val) {
65                 bindings.HTLCOutputInCommitment_set_transaction_output_index(this.ptr, val.ptr);
66         }
67
68         public static HTLCOutputInCommitment constructor_new(boolean offered_arg, number amount_msat_arg, number cltv_expiry_arg, Uint8Array payment_hash_arg, Option_u32Z transaction_output_index_arg) {
69                 number ret = bindings.HTLCOutputInCommitment_new(offered_arg, amount_msat_arg, cltv_expiry_arg, payment_hash_arg, transaction_output_index_arg.ptr);
70                 const ret_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, ret);
71                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
72                 return ret_hu_conv;
73         }
74
75         public HTLCOutputInCommitment clone() {
76                 number ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
77                 const ret_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, ret);
78                 ret_hu_conv.ptrs_to.add(this);
79                 return ret_hu_conv;
80         }
81
82         public Uint8Array write() {
83                 Uint8Array ret = bindings.HTLCOutputInCommitment_write(this.ptr);
84                 return ret;
85         }
86
87         public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_read(Uint8Array ser) {
88                 number ret = bindings.HTLCOutputInCommitment_read(ser);
89                 Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
90                 return ret_hu_conv;
91         }
92
93 }