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);
32 public number get_selected_contest_delay() {
33 number ret = bindings.CounterpartyChannelTransactionParameters_get_selected_contest_delay(this.ptr);
37 public void set_selected_contest_delay(number val) {
38 bindings.CounterpartyChannelTransactionParameters_set_selected_contest_delay(this.ptr, val);
41 public static CounterpartyChannelTransactionParameters constructor_new(ChannelPublicKeys pubkeys_arg, number selected_contest_delay_arg) {
42 number ret = bindings.CounterpartyChannelTransactionParameters_new(pubkeys_arg == null ? 0 : pubkeys_arg.ptr & ~1, selected_contest_delay_arg);
43 const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret);
44 ret_hu_conv.ptrs_to.add(ret_hu_conv);
48 public CounterpartyChannelTransactionParameters clone() {
49 number ret = bindings.CounterpartyChannelTransactionParameters_clone(this.ptr);
50 const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret);
51 ret_hu_conv.ptrs_to.add(this);
55 public Uint8Array write() {
56 Uint8Array ret = bindings.CounterpartyChannelTransactionParameters_write(this.ptr);
60 public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_read(Uint8Array ser) {
61 number ret = bindings.CounterpartyChannelTransactionParameters_read(ser);
62 Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);