X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FClosingSignedFeeRange.mts;h=3fe3c79e6308de0d8e1f3a87d69bbad0c7c489a5;hp=13da9438aeb94f991d500699bf632a54de27ee33;hb=c629a01650402c8e2f9b9db8ced9ed63ce687727;hpb=d1d0121c000b713c10fd0bedd249eb8dda2e4db7 diff --git a/ts/structs/ClosingSignedFeeRange.mts b/ts/structs/ClosingSignedFeeRange.mts index 13da9438..3fe3c79e 100644 --- a/ts/structs/ClosingSignedFeeRange.mts +++ b/ts/structs/ClosingSignedFeeRange.mts @@ -281,30 +281,54 @@ import CommonBase from './CommonBase.mjs'; import * as bindings from '../bindings.mjs' +/** + * The minimum and maximum fees which the sender is willing to place on the closing transaction. + * This is provided in [`ClosingSigned`] by both sides to indicate the fee range they are willing + * to use. + */ export class ClosingSignedFeeRange extends CommonBase { /* @internal */ public constructor(_dummy: object, ptr: number) { super(ptr, bindings.ClosingSignedFeeRange_free); } + /** + * The minimum absolute fee, in satoshis, which the sender is willing to place on the closing + * transaction. + */ public get_min_fee_satoshis(): bigint { const ret: bigint = bindings.ClosingSignedFeeRange_get_min_fee_satoshis(this.ptr); return ret; } + /** + * The minimum absolute fee, in satoshis, which the sender is willing to place on the closing + * transaction. + */ public set_min_fee_satoshis(val: bigint): void { bindings.ClosingSignedFeeRange_set_min_fee_satoshis(this.ptr, val); } + /** + * The maximum absolute fee, in satoshis, which the sender is willing to place on the closing + * transaction. + */ public get_max_fee_satoshis(): bigint { const ret: bigint = bindings.ClosingSignedFeeRange_get_max_fee_satoshis(this.ptr); return ret; } + /** + * The maximum absolute fee, in satoshis, which the sender is willing to place on the closing + * transaction. + */ public set_max_fee_satoshis(val: bigint): void { bindings.ClosingSignedFeeRange_set_max_fee_satoshis(this.ptr, val); } + /** + * Constructs a new ClosingSignedFeeRange given each field + */ public static constructor_new(min_fee_satoshis_arg: bigint, max_fee_satoshis_arg: bigint): ClosingSignedFeeRange { const ret: number = bindings.ClosingSignedFeeRange_new(min_fee_satoshis_arg, max_fee_satoshis_arg); const ret_hu_conv: ClosingSignedFeeRange = new ClosingSignedFeeRange(null, ret); @@ -317,6 +341,9 @@ export class ClosingSignedFeeRange extends CommonBase { return ret; } + /** + * Creates a copy of the ClosingSignedFeeRange + */ public clone(): ClosingSignedFeeRange { const ret: number = bindings.ClosingSignedFeeRange_clone(this.ptr); const ret_hu_conv: ClosingSignedFeeRange = new ClosingSignedFeeRange(null, ret); @@ -324,12 +351,18 @@ export class ClosingSignedFeeRange extends CommonBase { return ret_hu_conv; } + /** + * Serialize the ClosingSignedFeeRange object into a byte array which can be read by ClosingSignedFeeRange_read + */ public write(): Uint8Array { const ret: number = bindings.ClosingSignedFeeRange_write(this.ptr); const ret_conv: Uint8Array = bindings.decodeUint8Array(ret); return ret_conv; } + /** + * Read a ClosingSignedFeeRange from a byte array, created by ClosingSignedFeeRange_write + */ public static constructor_read(ser: Uint8Array): Result_ClosingSignedFeeRangeDecodeErrorZ { const ret: number = bindings.ClosingSignedFeeRange_read(bindings.encodeUint8Array(ser)); const ret_hu_conv: Result_ClosingSignedFeeRangeDecodeErrorZ = Result_ClosingSignedFeeRangeDecodeErrorZ.constr_from_ptr(ret);