3 public class UnsignedChannelAnnouncement {
5 public internal(set) var cOpaqueStruct: LDKUnsignedChannelAnnouncement?;
9 public init(pointer: LDKUnsignedChannelAnnouncement){
10 self.cOpaqueStruct = pointer
13 /* STRUCT_METHODS_START */
15 public func get_features() -> ChannelFeatures {
17 return ChannelFeatures(pointer: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUnsignedChannelAnnouncement>) in
18 UnsignedChannelAnnouncement_get_features(this_ptrPointer)
22 public func set_features(val: ChannelFeatures) -> Void {
24 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedChannelAnnouncement>.allocate(capacity: 1)
25 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
27 return UnsignedChannelAnnouncement_set_features(this_ptrPointer, val.cOpaqueStruct!);
30 public func get_chain_hash() -> [UInt8] {
32 return Bindings.tuple32_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUnsignedChannelAnnouncement>) in
33 UnsignedChannelAnnouncement_get_chain_hash(this_ptrPointer)
37 public func set_chain_hash(val: [UInt8]) -> Void {
39 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedChannelAnnouncement>.allocate(capacity: 1)
40 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
42 return UnsignedChannelAnnouncement_set_chain_hash(this_ptrPointer, Bindings.new_LDKThirtyTwoBytes(array: val));
45 public func get_short_channel_id() -> UInt64 {
47 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUnsignedChannelAnnouncement>) in
48 UnsignedChannelAnnouncement_get_short_channel_id(this_ptrPointer)
52 public func set_short_channel_id(val: UInt64) -> Void {
54 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedChannelAnnouncement>.allocate(capacity: 1)
55 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
57 return UnsignedChannelAnnouncement_set_short_channel_id(this_ptrPointer, val);
60 public func get_node_id_1() -> [UInt8] {
62 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUnsignedChannelAnnouncement>) in
63 UnsignedChannelAnnouncement_get_node_id_1(this_ptrPointer)
67 public func set_node_id_1(val: [UInt8]) -> Void {
69 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedChannelAnnouncement>.allocate(capacity: 1)
70 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
72 return UnsignedChannelAnnouncement_set_node_id_1(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
75 public func get_node_id_2() -> [UInt8] {
77 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUnsignedChannelAnnouncement>) in
78 UnsignedChannelAnnouncement_get_node_id_2(this_ptrPointer)
82 public func set_node_id_2(val: [UInt8]) -> Void {
84 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedChannelAnnouncement>.allocate(capacity: 1)
85 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
87 return UnsignedChannelAnnouncement_set_node_id_2(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
90 public func get_bitcoin_key_1() -> [UInt8] {
92 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUnsignedChannelAnnouncement>) in
93 UnsignedChannelAnnouncement_get_bitcoin_key_1(this_ptrPointer)
97 public func set_bitcoin_key_1(val: [UInt8]) -> Void {
99 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedChannelAnnouncement>.allocate(capacity: 1)
100 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
102 return UnsignedChannelAnnouncement_set_bitcoin_key_1(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
105 public func get_bitcoin_key_2() -> [UInt8] {
107 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUnsignedChannelAnnouncement>) in
108 UnsignedChannelAnnouncement_get_bitcoin_key_2(this_ptrPointer)
112 public func set_bitcoin_key_2(val: [UInt8]) -> Void {
114 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedChannelAnnouncement>.allocate(capacity: 1)
115 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
117 return UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
120 public func clone(orig: UnsignedChannelAnnouncement) -> UnsignedChannelAnnouncement {
122 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKUnsignedChannelAnnouncement>) in
123 UnsignedChannelAnnouncement(pointer: UnsignedChannelAnnouncement_clone(origPointer))
127 public func write(obj: UnsignedChannelAnnouncement) -> [UInt8] {
129 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKUnsignedChannelAnnouncement>) in
130 UnsignedChannelAnnouncement_write(objPointer)
134 public func read(ser: [UInt8]) -> Result_UnsignedChannelAnnouncementDecodeErrorZ {
136 return Result_UnsignedChannelAnnouncementDecodeErrorZ(pointer: UnsignedChannelAnnouncement_read(Bindings.new_LDKu8slice(array: ser)));
141 if self.cOpaqueStruct?.is_owned == false {
145 UnsignedChannelAnnouncement_free(self.cOpaqueStruct!)
151 /* STRUCT_METHODS_END */