3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class CounterpartyChannelTransactionParameters extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.CounterpartyChannelTransactionParameters_free(this.ptr);
21 public ChannelPublicKeys get_pubkeys() {
22 number ret = bindings.CounterpartyChannelTransactionParameters_get_pubkeys(this.ptr);
23 const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
24 ret_hu_conv.ptrs_to.add(this);
28 public void set_pubkeys(ChannelPublicKeys val) {
29 bindings.CounterpartyChannelTransactionParameters_set_pubkeys(this.ptr, val == null ? 0 : val.ptr & ~1);
30 this.ptrs_to.add(val);
33 public number get_selected_contest_delay() {
34 number ret = bindings.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this.ptr);
38 public void set_selected_contest_delay(number val) {
39 bindings.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this.ptr, val);
42 public static CounterpartyChannelTransactionParameters constructor_new(ChannelPublicKeys pubkeys_arg, number selected_contest_delay_arg) {
43 number ret = bindings.CounterpartyChannelTransactionParameters_new(pubkeys_arg == null ? 0 : pubkeys_arg.ptr & ~1, selected_contest_delay_arg);
44 const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret);
45 ret_hu_conv.ptrs_to.add(ret_hu_conv);
46 ret_hu_conv.ptrs_to.add(pubkeys_arg);
50 public CounterpartyChannelTransactionParameters clone() {
51 number ret = bindings.CounterpartyChannelTransactionParameters_clone(this.ptr);
52 const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret);
53 ret_hu_conv.ptrs_to.add(this);
57 public Uint8Array write() {
58 Uint8Array ret = bindings.CounterpartyChannelTransactionParameters_write(this.ptr);
62 public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_read(Uint8Array ser) {
63 number ret = bindings.CounterpartyChannelTransactionParameters_read(ser);
64 Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);