3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class CommitmentSigned extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.CommitmentSigned_free(this.ptr);
21 public Uint8Array get_channel_id() {
22 Uint8Array ret = bindings.CommitmentSigned_get_channel_id(this.ptr);
26 public void set_channel_id(Uint8Array val) {
27 bindings.CommitmentSigned_set_channel_id(this.ptr, val);
30 public Uint8Array get_signature() {
31 Uint8Array ret = bindings.CommitmentSigned_get_signature(this.ptr);
35 public void set_signature(Uint8Array val) {
36 bindings.CommitmentSigned_set_signature(this.ptr, val);
39 public void set_htlc_signatures(Uint8Array[] val) {
40 bindings.CommitmentSigned_set_htlc_signatures(this.ptr, val);
43 public static CommitmentSigned constructor_new(Uint8Array channel_id_arg, Uint8Array signature_arg, Uint8Array[] htlc_signatures_arg) {
44 number ret = bindings.CommitmentSigned_new(channel_id_arg, signature_arg, htlc_signatures_arg);
45 const ret_hu_conv: CommitmentSigned = new CommitmentSigned(null, ret);
46 ret_hu_conv.ptrs_to.add(ret_hu_conv);
50 public CommitmentSigned clone() {
51 number ret = bindings.CommitmentSigned_clone(this.ptr);
52 const ret_hu_conv: CommitmentSigned = new CommitmentSigned(null, ret);
53 ret_hu_conv.ptrs_to.add(this);
57 public Uint8Array write() {
58 Uint8Array ret = bindings.CommitmentSigned_write(this.ptr);
62 public static Result_CommitmentSignedDecodeErrorZ constructor_read(Uint8Array ser) {
63 number ret = bindings.CommitmentSigned_read(ser);
64 Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);