@@ -2,7 +2,12 @@ public class ChannelDetails {
2
2
3
3
public internal( set) var cOpaqueStruct : LDKChannelDetails ? ;
4
4
5
-
5
+ /* DEFAULT_CONSTRUCTOR_START */
6
+ public init ( channel_id_arg: [ UInt8 ] , counterparty_arg: ChannelCounterparty , funding_txo_arg: OutPoint , short_channel_id_arg: Option_u64Z , channel_value_satoshis_arg: UInt64 , unspendable_punishment_reserve_arg: Option_u64Z , user_id_arg: UInt64 , outbound_capacity_msat_arg: UInt64 , inbound_capacity_msat_arg: UInt64 , confirmations_required_arg: Option_u32Z , force_close_spend_delay_arg: Option_u16Z , is_outbound_arg: Bool , is_funding_locked_arg: Bool , is_usable_arg: Bool , is_public_arg: Bool ) {
7
+
8
+ self . cOpaqueStruct = ChannelDetails_new ( Bindings . new_LDKThirtyTwoBytes ( array: channel_id_arg) , counterparty_arg. cOpaqueStruct!, funding_txo_arg. cOpaqueStruct!, short_channel_id_arg. cOpaqueStruct!, channel_value_satoshis_arg, unspendable_punishment_reserve_arg. cOpaqueStruct!, user_id_arg, outbound_capacity_msat_arg, inbound_capacity_msat_arg, confirmations_required_arg. cOpaqueStruct!, force_close_spend_delay_arg. cOpaqueStruct!, is_outbound_arg, is_funding_locked_arg, is_usable_arg, is_public_arg)
9
+ }
10
+ /* DEFAULT_CONSTRUCTOR_END */
6
11
7
12
public init ( pointer: LDKChannelDetails ) {
8
13
self . cOpaqueStruct = pointer
@@ -25,6 +30,21 @@ ChannelDetails_get_channel_id(this_ptrPointer)
25
30
return ChannelDetails_set_channel_id ( this_ptrPointer, Bindings . new_LDKThirtyTwoBytes ( array: val) ) ;
26
31
}
27
32
33
+ public func get_counterparty( ) -> ChannelCounterparty {
34
+
35
+ return ChannelCounterparty ( pointer: withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKChannelDetails > ) in
36
+ ChannelDetails_get_counterparty ( this_ptrPointer)
37
+ } ) ;
38
+ }
39
+
40
+ public func set_counterparty( val: ChannelCounterparty ) -> Void {
41
+
42
+ let this_ptrPointer = UnsafeMutablePointer< LDKChannelDetails> . allocate( capacity: 1 )
43
+ this_ptrPointer. initialize ( to: self . cOpaqueStruct!)
44
+
45
+ return ChannelDetails_set_counterparty ( this_ptrPointer, val. cOpaqueStruct!) ;
46
+ }
47
+
28
48
public func get_funding_txo( ) -> OutPoint {
29
49
30
50
return OutPoint ( pointer: withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKChannelDetails > ) in
@@ -55,49 +75,34 @@ ChannelDetails_get_short_channel_id(this_ptrPointer)
55
75
return ChannelDetails_set_short_channel_id ( this_ptrPointer, val. cOpaqueStruct!) ;
56
76
}
57
77
58
- public func get_remote_network_id ( ) -> [ UInt8 ] {
78
+ public func get_channel_value_satoshis ( ) -> UInt64 {
59
79
60
- return Bindings . LDKPublicKey_to_array ( nativeType : withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKChannelDetails > ) in
61
- ChannelDetails_get_remote_network_id ( this_ptrPointer)
62
- } ) ;
80
+ return withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKChannelDetails > ) in
81
+ ChannelDetails_get_channel_value_satoshis ( this_ptrPointer)
82
+ } ;
63
83
}
64
84
65
- public func set_remote_network_id ( val: [ UInt8 ] ) -> Void {
85
+ public func set_channel_value_satoshis ( val: UInt64 ) -> Void {
66
86
67
87
let this_ptrPointer = UnsafeMutablePointer< LDKChannelDetails> . allocate( capacity: 1 )
68
88
this_ptrPointer. initialize ( to: self . cOpaqueStruct!)
69
89
70
- return ChannelDetails_set_remote_network_id ( this_ptrPointer, Bindings . new_LDKPublicKey ( array : val) ) ;
90
+ return ChannelDetails_set_channel_value_satoshis ( this_ptrPointer, val) ;
71
91
}
72
92
73
- public func get_counterparty_features ( ) -> InitFeatures {
93
+ public func get_unspendable_punishment_reserve ( ) -> Option_u64Z {
74
94
75
- return InitFeatures ( pointer: withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKChannelDetails > ) in
76
- ChannelDetails_get_counterparty_features ( this_ptrPointer)
95
+ return Option_u64Z ( pointer: withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKChannelDetails > ) in
96
+ ChannelDetails_get_unspendable_punishment_reserve ( this_ptrPointer)
77
97
} ) ;
78
98
}
79
99
80
- public func set_counterparty_features ( val: InitFeatures ) -> Void {
100
+ public func set_unspendable_punishment_reserve ( val: Option_u64Z ) -> Void {
81
101
82
102
let this_ptrPointer = UnsafeMutablePointer< LDKChannelDetails> . allocate( capacity: 1 )
83
103
this_ptrPointer. initialize ( to: self . cOpaqueStruct!)
84
104
85
- return ChannelDetails_set_counterparty_features ( this_ptrPointer, val. cOpaqueStruct!) ;
86
- }
87
-
88
- public func get_channel_value_satoshis( ) -> UInt64 {
89
-
90
- return withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKChannelDetails > ) in
91
- ChannelDetails_get_channel_value_satoshis ( this_ptrPointer)
92
- } ;
93
- }
94
-
95
- public func set_channel_value_satoshis( val: UInt64 ) -> Void {
96
-
97
- let this_ptrPointer = UnsafeMutablePointer< LDKChannelDetails> . allocate( capacity: 1 )
98
- this_ptrPointer. initialize ( to: self . cOpaqueStruct!)
99
-
100
- return ChannelDetails_set_channel_value_satoshis ( this_ptrPointer, val) ;
105
+ return ChannelDetails_set_unspendable_punishment_reserve ( this_ptrPointer, val. cOpaqueStruct!) ;
101
106
}
102
107
103
108
public func get_user_id( ) -> UInt64 {
@@ -145,6 +150,36 @@ ChannelDetails_get_inbound_capacity_msat(this_ptrPointer)
145
150
return ChannelDetails_set_inbound_capacity_msat ( this_ptrPointer, val) ;
146
151
}
147
152
153
+ public func get_confirmations_required( ) -> Option_u32Z {
154
+
155
+ return Option_u32Z ( pointer: withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKChannelDetails > ) in
156
+ ChannelDetails_get_confirmations_required ( this_ptrPointer)
157
+ } ) ;
158
+ }
159
+
160
+ public func set_confirmations_required( val: Option_u32Z ) -> Void {
161
+
162
+ let this_ptrPointer = UnsafeMutablePointer< LDKChannelDetails> . allocate( capacity: 1 )
163
+ this_ptrPointer. initialize ( to: self . cOpaqueStruct!)
164
+
165
+ return ChannelDetails_set_confirmations_required ( this_ptrPointer, val. cOpaqueStruct!) ;
166
+ }
167
+
168
+ public func get_force_close_spend_delay( ) -> Option_u16Z {
169
+
170
+ return Option_u16Z ( pointer: withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKChannelDetails > ) in
171
+ ChannelDetails_get_force_close_spend_delay ( this_ptrPointer)
172
+ } ) ;
173
+ }
174
+
175
+ public func set_force_close_spend_delay( val: Option_u16Z ) -> Void {
176
+
177
+ let this_ptrPointer = UnsafeMutablePointer< LDKChannelDetails> . allocate( capacity: 1 )
178
+ this_ptrPointer. initialize ( to: self . cOpaqueStruct!)
179
+
180
+ return ChannelDetails_set_force_close_spend_delay ( this_ptrPointer, val. cOpaqueStruct!) ;
181
+ }
182
+
148
183
public func get_is_outbound( ) -> Bool {
149
184
150
185
return withUnsafePointer ( to: self . cOpaqueStruct!) { ( this_ptrPointer: UnsafePointer < LDKChannelDetails > ) in
0 commit comments