3 import CommonBase from './CommonBase';
4 import * as bindings from '../bindings' // TODO: figure out location
8 export default class UpdateAddHTLC extends CommonBase {
9 constructor(_dummy: object, ptr: number) {
14 protected finalize() {
18 bindings.UpdateAddHTLC_free(this.ptr);
21 public Uint8Array get_channel_id() {
22 Uint8Array ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
26 public void set_channel_id(Uint8Array val) {
27 bindings.UpdateAddHTLC_set_channel_id(this.ptr, val);
30 public number get_htlc_id() {
31 number ret = bindings.UpdateAddHTLC_get_htlc_id(this.ptr);
35 public void set_htlc_id(number val) {
36 bindings.UpdateAddHTLC_set_htlc_id(this.ptr, val);
39 public number get_amount_msat() {
40 number ret = bindings.UpdateAddHTLC_get_amount_msat(this.ptr);
44 public void set_amount_msat(number val) {
45 bindings.UpdateAddHTLC_set_amount_msat(this.ptr, val);
48 public Uint8Array get_payment_hash() {
49 Uint8Array ret = bindings.UpdateAddHTLC_get_payment_hash(this.ptr);
53 public void set_payment_hash(Uint8Array val) {
54 bindings.UpdateAddHTLC_set_payment_hash(this.ptr, val);
57 public number get_cltv_expiry() {
58 number ret = bindings.UpdateAddHTLC_get_cltv_expiry(this.ptr);
62 public void set_cltv_expiry(number val) {
63 bindings.UpdateAddHTLC_set_cltv_expiry(this.ptr, val);
66 public UpdateAddHTLC clone() {
67 number ret = bindings.UpdateAddHTLC_clone(this.ptr);
68 const ret_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, ret);
69 ret_hu_conv.ptrs_to.add(this);
73 public Uint8Array write() {
74 Uint8Array ret = bindings.UpdateAddHTLC_write(this.ptr);
78 public static Result_UpdateAddHTLCDecodeErrorZ constructor_read(Uint8Array ser) {
79 number ret = bindings.UpdateAddHTLC_read(ser);
80 Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);