3 public class AcceptChannel {
5 public internal(set) var cOpaqueStruct: LDKAcceptChannel?;
9 public init(pointer: LDKAcceptChannel){
10 self.cOpaqueStruct = pointer
13 /* STRUCT_METHODS_START */
15 public func get_temporary_channel_id() -> [UInt8] {
17 return Bindings.tuple32_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
18 AcceptChannel_get_temporary_channel_id(this_ptrPointer)
22 public func set_temporary_channel_id(val: [UInt8]) -> Void {
24 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
25 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
27 return AcceptChannel_set_temporary_channel_id(this_ptrPointer, Bindings.new_LDKThirtyTwoBytes(array: val));
30 public func get_dust_limit_satoshis() -> UInt64 {
32 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
33 AcceptChannel_get_dust_limit_satoshis(this_ptrPointer)
37 public func set_dust_limit_satoshis(val: UInt64) -> Void {
39 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
40 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
42 return AcceptChannel_set_dust_limit_satoshis(this_ptrPointer, val);
45 public func get_max_htlc_value_in_flight_msat() -> UInt64 {
47 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
48 AcceptChannel_get_max_htlc_value_in_flight_msat(this_ptrPointer)
52 public func set_max_htlc_value_in_flight_msat(val: UInt64) -> Void {
54 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
55 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
57 return AcceptChannel_set_max_htlc_value_in_flight_msat(this_ptrPointer, val);
60 public func get_channel_reserve_satoshis() -> UInt64 {
62 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
63 AcceptChannel_get_channel_reserve_satoshis(this_ptrPointer)
67 public func set_channel_reserve_satoshis(val: UInt64) -> Void {
69 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
70 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
72 return AcceptChannel_set_channel_reserve_satoshis(this_ptrPointer, val);
75 public func get_htlc_minimum_msat() -> UInt64 {
77 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
78 AcceptChannel_get_htlc_minimum_msat(this_ptrPointer)
82 public func set_htlc_minimum_msat(val: UInt64) -> Void {
84 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
85 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
87 return AcceptChannel_set_htlc_minimum_msat(this_ptrPointer, val);
90 public func get_minimum_depth() -> UInt32 {
92 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
93 AcceptChannel_get_minimum_depth(this_ptrPointer)
97 public func set_minimum_depth(val: UInt32) -> Void {
99 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
100 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
102 return AcceptChannel_set_minimum_depth(this_ptrPointer, val);
105 public func get_to_self_delay() -> UInt16 {
107 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
108 AcceptChannel_get_to_self_delay(this_ptrPointer)
112 public func set_to_self_delay(val: UInt16) -> Void {
114 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
115 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
117 return AcceptChannel_set_to_self_delay(this_ptrPointer, val);
120 public func get_max_accepted_htlcs() -> UInt16 {
122 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
123 AcceptChannel_get_max_accepted_htlcs(this_ptrPointer)
127 public func set_max_accepted_htlcs(val: UInt16) -> Void {
129 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
130 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
132 return AcceptChannel_set_max_accepted_htlcs(this_ptrPointer, val);
135 public func get_funding_pubkey() -> [UInt8] {
137 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
138 AcceptChannel_get_funding_pubkey(this_ptrPointer)
142 public func set_funding_pubkey(val: [UInt8]) -> Void {
144 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
145 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
147 return AcceptChannel_set_funding_pubkey(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
150 public func get_revocation_basepoint() -> [UInt8] {
152 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
153 AcceptChannel_get_revocation_basepoint(this_ptrPointer)
157 public func set_revocation_basepoint(val: [UInt8]) -> Void {
159 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
160 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
162 return AcceptChannel_set_revocation_basepoint(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
165 public func get_payment_point() -> [UInt8] {
167 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
168 AcceptChannel_get_payment_point(this_ptrPointer)
172 public func set_payment_point(val: [UInt8]) -> Void {
174 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
175 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
177 return AcceptChannel_set_payment_point(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
180 public func get_delayed_payment_basepoint() -> [UInt8] {
182 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
183 AcceptChannel_get_delayed_payment_basepoint(this_ptrPointer)
187 public func set_delayed_payment_basepoint(val: [UInt8]) -> Void {
189 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
190 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
192 return AcceptChannel_set_delayed_payment_basepoint(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
195 public func get_htlc_basepoint() -> [UInt8] {
197 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
198 AcceptChannel_get_htlc_basepoint(this_ptrPointer)
202 public func set_htlc_basepoint(val: [UInt8]) -> Void {
204 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
205 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
207 return AcceptChannel_set_htlc_basepoint(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
210 public func get_first_per_commitment_point() -> [UInt8] {
212 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKAcceptChannel>) in
213 AcceptChannel_get_first_per_commitment_point(this_ptrPointer)
217 public func set_first_per_commitment_point(val: [UInt8]) -> Void {
219 let this_ptrPointer = UnsafeMutablePointer<LDKAcceptChannel>.allocate(capacity: 1)
220 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
222 return AcceptChannel_set_first_per_commitment_point(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
225 public func clone(orig: AcceptChannel) -> AcceptChannel {
227 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKAcceptChannel>) in
228 AcceptChannel(pointer: AcceptChannel_clone(origPointer))
232 public func write(obj: AcceptChannel) -> [UInt8] {
234 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKAcceptChannel>) in
235 AcceptChannel_write(objPointer)
239 public func read(ser: [UInt8]) -> Result_AcceptChannelDecodeErrorZ {
241 return Result_AcceptChannelDecodeErrorZ(pointer: AcceptChannel_read(Bindings.new_LDKu8slice(array: ser)));
246 if self.cOpaqueStruct?.is_owned == false {
250 AcceptChannel_free(self.cOpaqueStruct!)
256 /* STRUCT_METHODS_END */