X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=ts%2Fstructs%2FHTLCFailChannelUpdate.ts;h=b89c14622ff4f5af312ea9b3c1068a6dd4774c4b;hb=423fdb025202103e9f89256398c2a064d76d8743;hp=e2813c2af6f67d08104701218c2db0894c7dc5dc;hpb=822471992c6bf6f9985e531cc5940e4cc35e3e4c;p=ldk-java diff --git a/ts/structs/HTLCFailChannelUpdate.ts b/ts/structs/HTLCFailChannelUpdate.ts index e2813c2a..b89c1462 100644 --- a/ts/structs/HTLCFailChannelUpdate.ts +++ b/ts/structs/HTLCFailChannelUpdate.ts @@ -27,13 +27,14 @@ export class ChannelUpdateMessage extends HTLCFailChannelUpdate { public msg: ChannelUpdate; private constructor(ptr: number, obj: bindings.LDKHTLCFailChannelUpdate.ChannelUpdateMessage) { super(null, ptr); - const msg: uint32_t = obj.msg; - ChannelUpdate msg_hu_conv = new ChannelUpdate(null, msg); + const msg: number = obj.msg; + const msg_hu_conv: ChannelUpdate = new ChannelUpdate(null, msg); + msg_hu_conv.ptrs_to.add(this); this.msg = msg_hu_conv; } } export class ChannelClosed extends HTLCFailChannelUpdate { - public short_channel_id: long; + public short_channel_id: number; public is_permanent: boolean; private constructor(ptr: number, obj: bindings.LDKHTLCFailChannelUpdate.ChannelClosed) { super(null, ptr); @@ -42,11 +43,19 @@ export class ChannelClosed extends HTLCFailChannelUpdate { } } export class NodeFailure extends HTLCFailChannelUpdate { - public node_id: byte[]; + public node_id: Uint8Array; public is_permanent: boolean; private constructor(ptr: number, obj: bindings.LDKHTLCFailChannelUpdate.NodeFailure) { super(null, ptr); this.node_id = obj.node_id; this.is_permanent = obj.is_permanent; } +} + public HTLCFailChannelUpdate clone() { + number ret = bindings.HTLCFailChannelUpdate_clone(this.ptr); + HTLCFailChannelUpdate ret_hu_conv = HTLCFailChannelUpdate.constr_from_ptr(ret); + ret_hu_conv.ptrs_to.add(this); + return ret_hu_conv; + } + }