3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class ChannelUpdate extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.ChannelUpdate_free(this.ptr);
21 public Uint8Array get_signature() {
22 Uint8Array ret = bindings.ChannelUpdate_get_signature(this.ptr);
26 public void set_signature(Uint8Array val) {
27 bindings.ChannelUpdate_set_signature(this.ptr, val);
30 public UnsignedChannelUpdate get_contents() {
31 number ret = bindings.ChannelUpdate_get_contents(this.ptr);
32 const ret_hu_conv: UnsignedChannelUpdate = new UnsignedChannelUpdate(null, ret);
33 ret_hu_conv.ptrs_to.add(this);
37 public void set_contents(UnsignedChannelUpdate val) {
38 bindings.ChannelUpdate_set_contents(this.ptr, val == null ? 0 : val.ptr & ~1);
39 this.ptrs_to.add(val);
42 public static ChannelUpdate constructor_new(Uint8Array signature_arg, UnsignedChannelUpdate contents_arg) {
43 number ret = bindings.ChannelUpdate_new(signature_arg, contents_arg == null ? 0 : contents_arg.ptr & ~1);
44 const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
45 ret_hu_conv.ptrs_to.add(ret_hu_conv);
46 ret_hu_conv.ptrs_to.add(contents_arg);
50 public ChannelUpdate clone() {
51 number ret = bindings.ChannelUpdate_clone(this.ptr);
52 const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
53 ret_hu_conv.ptrs_to.add(this);
57 public Uint8Array write() {
58 Uint8Array ret = bindings.ChannelUpdate_write(this.ptr);
62 public static Result_ChannelUpdateDecodeErrorZ constructor_read(Uint8Array ser) {
63 number ret = bindings.ChannelUpdate_read(ser);
64 Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);