X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=ts%2Fstructs%2FDirectedChannelTransactionParameters.mts;h=4bc56f481a36af74a4ad80fb9ba010bde70adffa;hp=40c2605d6c19388dc872f4829244024ea713e8fc;hb=c629a01650402c8e2f9b9db8ced9ed63ce687727;hpb=2a65456aa0b540060dcf3ca707a54dc98cc3f38a diff --git a/ts/structs/DirectedChannelTransactionParameters.mts b/ts/structs/DirectedChannelTransactionParameters.mts index 40c2605d..4bc56f48 100644 --- a/ts/structs/DirectedChannelTransactionParameters.mts +++ b/ts/structs/DirectedChannelTransactionParameters.mts @@ -279,15 +279,24 @@ import { MultiThreadedLockableScore } from '../structs/MultiThreadedLockableScor import CommonBase from './CommonBase.mjs'; import * as bindings from '../bindings.mjs' -import * as InternalUtils from '../InternalUtils.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); @@ -295,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); @@ -302,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); @@ -319,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;