3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class AcceptChannel extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.AcceptChannel_free(this.ptr);
21 public Uint8Array get_temporary_channel_id() {
22 Uint8Array ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr);
26 public void set_temporary_channel_id(Uint8Array val) {
27 bindings.AcceptChannel_set_temporary_channel_id(this.ptr, val);
30 public number get_dust_limit_satoshis() {
31 number ret = bindings.AcceptChannel_get_dust_limit_satoshis(this.ptr);
35 public void set_dust_limit_satoshis(number val) {
36 bindings.AcceptChannel_set_dust_limit_satoshis(this.ptr, val);
39 public number get_max_htlc_value_in_flight_msat() {
40 number ret = bindings.AcceptChannel_get_max_htlc_value_in_flight_msat(this.ptr);
44 public void set_max_htlc_value_in_flight_msat(number val) {
45 bindings.AcceptChannel_set_max_htlc_value_in_flight_msat(this.ptr, val);
48 public number get_channel_reserve_satoshis() {
49 number ret = bindings.AcceptChannel_get_channel_reserve_satoshis(this.ptr);
53 public void set_channel_reserve_satoshis(number val) {
54 bindings.AcceptChannel_set_channel_reserve_satoshis(this.ptr, val);
57 public number get_htlc_minimum_msat() {
58 number ret = bindings.AcceptChannel_get_htlc_minimum_msat(this.ptr);
62 public void set_htlc_minimum_msat(number val) {
63 bindings.AcceptChannel_set_htlc_minimum_msat(this.ptr, val);
66 public number get_minimum_depth() {
67 number ret = bindings.AcceptChannel_get_minimum_depth(this.ptr);
71 public void set_minimum_depth(number val) {
72 bindings.AcceptChannel_set_minimum_depth(this.ptr, val);
75 public number get_to_self_delay() {
76 number ret = bindings.AcceptChannel_get_to_self_delay(this.ptr);
80 public void set_to_self_delay(number val) {
81 bindings.AcceptChannel_set_to_self_delay(this.ptr, val);
84 public number get_max_accepted_htlcs() {
85 number ret = bindings.AcceptChannel_get_max_accepted_htlcs(this.ptr);
89 public void set_max_accepted_htlcs(number val) {
90 bindings.AcceptChannel_set_max_accepted_htlcs(this.ptr, val);
93 public Uint8Array get_funding_pubkey() {
94 Uint8Array ret = bindings.AcceptChannel_get_funding_pubkey(this.ptr);
98 public void set_funding_pubkey(Uint8Array val) {
99 bindings.AcceptChannel_set_funding_pubkey(this.ptr, val);
102 public Uint8Array get_revocation_basepoint() {
103 Uint8Array ret = bindings.AcceptChannel_get_revocation_basepoint(this.ptr);
107 public void set_revocation_basepoint(Uint8Array val) {
108 bindings.AcceptChannel_set_revocation_basepoint(this.ptr, val);
111 public Uint8Array get_payment_point() {
112 Uint8Array ret = bindings.AcceptChannel_get_payment_point(this.ptr);
116 public void set_payment_point(Uint8Array val) {
117 bindings.AcceptChannel_set_payment_point(this.ptr, val);
120 public Uint8Array get_delayed_payment_basepoint() {
121 Uint8Array ret = bindings.AcceptChannel_get_delayed_payment_basepoint(this.ptr);
125 public void set_delayed_payment_basepoint(Uint8Array val) {
126 bindings.AcceptChannel_set_delayed_payment_basepoint(this.ptr, val);
129 public Uint8Array get_htlc_basepoint() {
130 Uint8Array ret = bindings.AcceptChannel_get_htlc_basepoint(this.ptr);
134 public void set_htlc_basepoint(Uint8Array val) {
135 bindings.AcceptChannel_set_htlc_basepoint(this.ptr, val);
138 public Uint8Array get_first_per_commitment_point() {
139 Uint8Array ret = bindings.AcceptChannel_get_first_per_commitment_point(this.ptr);
143 public void set_first_per_commitment_point(Uint8Array val) {
144 bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, val);
147 public AcceptChannel clone() {
148 number ret = bindings.AcceptChannel_clone(this.ptr);
149 const ret_hu_conv: AcceptChannel = new AcceptChannel(null, ret);
150 ret_hu_conv.ptrs_to.add(this);
154 public Uint8Array write() {
155 Uint8Array ret = bindings.AcceptChannel_write(this.ptr);
159 public static Result_AcceptChannelDecodeErrorZ constructor_read(Uint8Array ser) {
160 number ret = bindings.AcceptChannel_read(ser);
161 Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);