]> git.bitcoin.ninja Git - ldk-java/blob - ts/structs/DelayedPaymentOutputDescriptor.ts
Merge pull request #20 from TheBlueMatt/main
[ldk-java] / ts / structs / DelayedPaymentOutputDescriptor.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 DelayedPaymentOutputDescriptor 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.DelayedPaymentOutputDescriptor_free(this.ptr);
19                     }
20                 }
21         public OutPoint get_outpoint() {
22                 number ret = bindings.DelayedPaymentOutputDescriptor_get_outpoint(this.ptr);
23                 const ret_hu_conv: OutPoint = new OutPoint(null, ret);
24                 ret_hu_conv.ptrs_to.add(this);
25                 return ret_hu_conv;
26         }
27
28         public void set_outpoint(OutPoint val) {
29                 bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
30                 this.ptrs_to.add(val);
31         }
32
33         public Uint8Array get_per_commitment_point() {
34                 Uint8Array ret = bindings.DelayedPaymentOutputDescriptor_get_per_commitment_point(this.ptr);
35                 return ret;
36         }
37
38         public void set_per_commitment_point(Uint8Array val) {
39                 bindings.DelayedPaymentOutputDescriptor_set_per_commitment_point(this.ptr, val);
40         }
41
42         public number get_to_self_delay() {
43                 number ret = bindings.DelayedPaymentOutputDescriptor_get_to_self_delay(this.ptr);
44                 return ret;
45         }
46
47         public void set_to_self_delay(number val) {
48                 bindings.DelayedPaymentOutputDescriptor_set_to_self_delay(this.ptr, val);
49         }
50
51         public void set_output(TxOut val) {
52                 bindings.DelayedPaymentOutputDescriptor_set_output(this.ptr, val.ptr);
53         }
54
55         public Uint8Array get_revocation_pubkey() {
56                 Uint8Array ret = bindings.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this.ptr);
57                 return ret;
58         }
59
60         public void set_revocation_pubkey(Uint8Array val) {
61                 bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val);
62         }
63
64         public Uint8Array get_channel_keys_id() {
65                 Uint8Array ret = bindings.DelayedPaymentOutputDescriptor_get_channel_keys_id(this.ptr);
66                 return ret;
67         }
68
69         public void set_channel_keys_id(Uint8Array val) {
70                 bindings.DelayedPaymentOutputDescriptor_set_channel_keys_id(this.ptr, val);
71         }
72
73         public number get_channel_value_satoshis() {
74                 number ret = bindings.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this.ptr);
75                 return ret;
76         }
77
78         public void set_channel_value_satoshis(number val) {
79                 bindings.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this.ptr, val);
80         }
81
82         public static DelayedPaymentOutputDescriptor constructor_new(OutPoint outpoint_arg, Uint8Array per_commitment_point_arg, number to_self_delay_arg, TxOut output_arg, Uint8Array revocation_pubkey_arg, Uint8Array channel_keys_id_arg, number channel_value_satoshis_arg) {
83                 number ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, per_commitment_point_arg, to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg, channel_keys_id_arg, channel_value_satoshis_arg);
84                 const ret_hu_conv: DelayedPaymentOutputDescriptor = new DelayedPaymentOutputDescriptor(null, ret);
85                 ret_hu_conv.ptrs_to.add(ret_hu_conv);
86                 ret_hu_conv.ptrs_to.add(outpoint_arg);
87                 return ret_hu_conv;
88         }
89
90         public DelayedPaymentOutputDescriptor clone() {
91                 number ret = bindings.DelayedPaymentOutputDescriptor_clone(this.ptr);
92                 const ret_hu_conv: DelayedPaymentOutputDescriptor = new DelayedPaymentOutputDescriptor(null, ret);
93                 ret_hu_conv.ptrs_to.add(this);
94                 return ret_hu_conv;
95         }
96
97         public Uint8Array write() {
98                 Uint8Array ret = bindings.DelayedPaymentOutputDescriptor_write(this.ptr);
99                 return ret;
100         }
101
102         public static Result_DelayedPaymentOutputDescriptorDecodeErrorZ constructor_read(Uint8Array ser) {
103                 number ret = bindings.DelayedPaymentOutputDescriptor_read(ser);
104                 Result_DelayedPaymentOutputDescriptorDecodeErrorZ ret_hu_conv = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.constr_from_ptr(ret);
105                 return ret_hu_conv;
106         }
107
108 }