3 public class QueryShortChannelIds {
5 public internal(set) var cOpaqueStruct: LDKQueryShortChannelIds?;
7 /* DEFAULT_CONSTRUCTOR_START */
8 public init(chain_hash_arg: [UInt8], short_channel_ids_arg: [UInt64]) {
10 self.cOpaqueStruct = QueryShortChannelIds_new(Bindings.new_LDKThirtyTwoBytes(array: chain_hash_arg), Bindings.new_LDKCVec_u64Z(array: short_channel_ids_arg))
12 /* DEFAULT_CONSTRUCTOR_END */
14 public init(pointer: LDKQueryShortChannelIds){
15 self.cOpaqueStruct = pointer
18 /* STRUCT_METHODS_START */
20 public func get_chain_hash() -> [UInt8] {
22 return Bindings.tuple32_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKQueryShortChannelIds>) in
23 QueryShortChannelIds_get_chain_hash(this_ptrPointer)
27 public func set_chain_hash(val: [UInt8]) -> Void {
29 let this_ptrPointer = UnsafeMutablePointer<LDKQueryShortChannelIds>.allocate(capacity: 1)
30 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
32 return QueryShortChannelIds_set_chain_hash(this_ptrPointer, Bindings.new_LDKThirtyTwoBytes(array: val));
35 public func set_short_channel_ids(val: [UInt64]) -> Void {
37 let this_ptrPointer = UnsafeMutablePointer<LDKQueryShortChannelIds>.allocate(capacity: 1)
38 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
40 return QueryShortChannelIds_set_short_channel_ids(this_ptrPointer, Bindings.new_LDKCVec_u64Z(array: val));
43 public func clone(orig: QueryShortChannelIds) -> QueryShortChannelIds {
45 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKQueryShortChannelIds>) in
46 QueryShortChannelIds(pointer: QueryShortChannelIds_clone(origPointer))
50 public func read(ser: [UInt8]) -> Result_QueryShortChannelIdsDecodeErrorZ {
52 return Result_QueryShortChannelIdsDecodeErrorZ(pointer: QueryShortChannelIds_read(Bindings.new_LDKu8slice(array: ser)));
55 public func write(obj: QueryShortChannelIds) -> [UInt8] {
57 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKQueryShortChannelIds>) in
58 QueryShortChannelIds_write(objPointer)
64 if self.cOpaqueStruct?.is_owned == false {
68 QueryShortChannelIds_free(self.cOpaqueStruct!)
74 /* STRUCT_METHODS_END */