3 public class TrustedCommitmentTransaction {
5 public internal(set) var cOpaqueStruct: LDKTrustedCommitmentTransaction?;
9 public init(pointer: LDKTrustedCommitmentTransaction){
10 self.cOpaqueStruct = pointer
13 /* STRUCT_METHODS_START */
15 public func txid() -> [UInt8] {
17 return Bindings.LDKThirtyTwoBytes_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_argPointer: UnsafePointer<LDKTrustedCommitmentTransaction>) in
18 TrustedCommitmentTransaction_txid(this_argPointer)
22 public func built_transaction() -> BuiltCommitmentTransaction {
24 return BuiltCommitmentTransaction(pointer: withUnsafePointer(to: self.cOpaqueStruct!) { (this_argPointer: UnsafePointer<LDKTrustedCommitmentTransaction>) in
25 TrustedCommitmentTransaction_built_transaction(this_argPointer)
29 public func keys() -> TxCreationKeys {
31 return TxCreationKeys(pointer: withUnsafePointer(to: self.cOpaqueStruct!) { (this_argPointer: UnsafePointer<LDKTrustedCommitmentTransaction>) in
32 TrustedCommitmentTransaction_keys(this_argPointer)
36 public func get_htlc_sigs(htlc_base_key: [UInt8], channel_parameters: DirectedChannelTransactionParameters) -> Result_CVec_SignatureZNoneZ {
38 return Result_CVec_SignatureZNoneZ(pointer: withUnsafePointer(to: self.cOpaqueStruct!) { (this_argPointer: UnsafePointer<LDKTrustedCommitmentTransaction>) in
39 withUnsafePointer(to: Bindings.array_to_tuple32(array: htlc_base_key)) { (htlc_base_keyPointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in
40 withUnsafePointer(to: channel_parameters.cOpaqueStruct!) { (channel_parametersPointer: UnsafePointer<LDKDirectedChannelTransactionParameters>) in
41 TrustedCommitmentTransaction_get_htlc_sigs(this_argPointer, htlc_base_keyPointer, channel_parametersPointer)
49 if self.cOpaqueStruct?.is_owned == false {
53 TrustedCommitmentTransaction_free(self.cOpaqueStruct!)
59 /* STRUCT_METHODS_END */