[TS] Update auto-generated TypeScript Bindings
[ldk-java] / ts / structs / HTLCUpdate.mts
index 49fccab023e101bbf0ac0a48f64522460b004087..b792216e55f53f9932adcb83aec4c14f3cd606fc 100644 (file)
@@ -281,6 +281,11 @@ import CommonBase from './CommonBase.mjs';
 import * as bindings from '../bindings.mjs'
 
 
+/**
+ * Simple structure sent back by `chain::Watch` when an HTLC from a forward channel is detected on
+ * chain. Used to update the corresponding HTLC in the backward channel. Failing to pass the
+ * preimage claim backward will lead to loss of funds.
+ */
 export class HTLCUpdate extends CommonBase {
        /* @internal */
        public constructor(_dummy: object, ptr: number) {
@@ -292,6 +297,9 @@ export class HTLCUpdate extends CommonBase {
                return ret;
        }
 
+       /**
+        * Creates a copy of the HTLCUpdate
+        */
        public clone(): HTLCUpdate {
                const ret: number = bindings.HTLCUpdate_clone(this.ptr);
                const ret_hu_conv: HTLCUpdate = new HTLCUpdate(null, ret);
@@ -299,12 +307,18 @@ export class HTLCUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       /**
+        * Serialize the HTLCUpdate object into a byte array which can be read by HTLCUpdate_read
+        */
        public write(): Uint8Array {
                const ret: number = bindings.HTLCUpdate_write(this.ptr);
                const ret_conv: Uint8Array = bindings.decodeUint8Array(ret);
                return ret_conv;
        }
 
+       /**
+        * Read a HTLCUpdate from a byte array, created by HTLCUpdate_write
+        */
        public static constructor_read(ser: Uint8Array): Result_HTLCUpdateDecodeErrorZ {
                const ret: number = bindings.HTLCUpdate_read(bindings.encodeUint8Array(ser));
                const ret_hu_conv: Result_HTLCUpdateDecodeErrorZ = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);