X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FDirectedChannelTransactionParameters.mts;h=4bc56f481a36af74a4ad80fb9ba010bde70adffa;hp=c72939d04ec94d08f4bd262818b2641cf9e16fe8;hb=c629a01650402c8e2f9b9db8ced9ed63ce687727;hpb=d1d0121c000b713c10fd0bedd249eb8dda2e4db7 diff --git a/ts/structs/DirectedChannelTransactionParameters.mts b/ts/structs/DirectedChannelTransactionParameters.mts index c72939d0..4bc56f48 100644 --- a/ts/structs/DirectedChannelTransactionParameters.mts +++ b/ts/structs/DirectedChannelTransactionParameters.mts @@ -281,12 +281,22 @@ import CommonBase from './CommonBase.mjs'; import * as bindings from '../bindings.mjs' +/** + * Static channel fields used to build transactions given per-commitment fields, organized by + * broadcaster/countersignatory. + * + * This is derived from the holder/counterparty-organized ChannelTransactionParameters via the + * as_holder_broadcastable and as_counterparty_broadcastable functions. + */ export class DirectedChannelTransactionParameters extends CommonBase { /* @internal */ public constructor(_dummy: object, ptr: number) { super(ptr, bindings.DirectedChannelTransactionParameters_free); } + /** + * Get the channel pubkeys for the broadcaster + */ public broadcaster_pubkeys(): ChannelPublicKeys { const ret: number = bindings.DirectedChannelTransactionParameters_broadcaster_pubkeys(this.ptr); const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret); @@ -294,6 +304,9 @@ export class DirectedChannelTransactionParameters extends CommonBase { return ret_hu_conv; } + /** + * Get the channel pubkeys for the countersignatory + */ public countersignatory_pubkeys(): ChannelPublicKeys { const ret: number = bindings.DirectedChannelTransactionParameters_countersignatory_pubkeys(this.ptr); const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret); @@ -301,16 +314,29 @@ export class DirectedChannelTransactionParameters extends CommonBase { return ret_hu_conv; } + /** + * Get the contest delay applicable to the transactions. + * Note that the contest delay was selected by the countersignatory. + */ public contest_delay(): number { const ret: number = bindings.DirectedChannelTransactionParameters_contest_delay(this.ptr); return ret; } + /** + * Whether the channel is outbound from the broadcaster. + * + * The boolean representing the side that initiated the channel is + * an input to the commitment number obscure factor computation. + */ public is_outbound(): boolean { const ret: boolean = bindings.DirectedChannelTransactionParameters_is_outbound(this.ptr); return ret; } + /** + * The funding outpoint + */ public funding_outpoint(): OutPoint { const ret: number = bindings.DirectedChannelTransactionParameters_funding_outpoint(this.ptr); const ret_hu_conv: OutPoint = new OutPoint(null, ret); @@ -318,6 +344,9 @@ export class DirectedChannelTransactionParameters extends CommonBase { return ret_hu_conv; } + /** + * Whether to use anchors for this channel + */ public opt_anchors(): boolean { const ret: boolean = bindings.DirectedChannelTransactionParameters_opt_anchors(this.ptr); return ret;