3 public class UnsignedNodeAnnouncement {
5 public internal(set) var cOpaqueStruct: LDKUnsignedNodeAnnouncement?;
9 public init(pointer: LDKUnsignedNodeAnnouncement){
10 self.cOpaqueStruct = pointer
13 /* STRUCT_METHODS_START */
15 public func get_features() -> NodeFeatures {
17 return NodeFeatures(pointer: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUnsignedNodeAnnouncement>) in
18 UnsignedNodeAnnouncement_get_features(this_ptrPointer)
22 public func set_features(val: NodeFeatures) -> Void {
24 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedNodeAnnouncement>.allocate(capacity: 1)
25 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
27 return UnsignedNodeAnnouncement_set_features(this_ptrPointer, val.cOpaqueStruct!);
30 public func get_timestamp() -> UInt32 {
32 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUnsignedNodeAnnouncement>) in
33 UnsignedNodeAnnouncement_get_timestamp(this_ptrPointer)
37 public func set_timestamp(val: UInt32) -> Void {
39 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedNodeAnnouncement>.allocate(capacity: 1)
40 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
42 return UnsignedNodeAnnouncement_set_timestamp(this_ptrPointer, val);
45 public func get_node_id() -> [UInt8] {
47 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUnsignedNodeAnnouncement>) in
48 UnsignedNodeAnnouncement_get_node_id(this_ptrPointer)
52 public func set_node_id(val: [UInt8]) -> Void {
54 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedNodeAnnouncement>.allocate(capacity: 1)
55 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
57 return UnsignedNodeAnnouncement_set_node_id(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
60 public func get_rgb() -> [UInt8] {
62 return Bindings.tuple3_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUnsignedNodeAnnouncement>) in
63 UnsignedNodeAnnouncement_get_rgb(this_ptrPointer)
67 public func set_rgb(val: [UInt8]) -> Void {
69 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedNodeAnnouncement>.allocate(capacity: 1)
70 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
72 return UnsignedNodeAnnouncement_set_rgb(this_ptrPointer, Bindings.new_LDKThreeBytes(array: val));
75 public func get_alias() -> [UInt8] {
77 return Bindings.tuple32_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKUnsignedNodeAnnouncement>) in
78 UnsignedNodeAnnouncement_get_alias(this_ptrPointer)
82 public func set_alias(val: [UInt8]) -> Void {
84 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedNodeAnnouncement>.allocate(capacity: 1)
85 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
87 return UnsignedNodeAnnouncement_set_alias(this_ptrPointer, Bindings.new_LDKThirtyTwoBytes(array: val));
90 public func set_addresses(val: [LDKNetAddress]) -> Void {
92 let this_ptrPointer = UnsafeMutablePointer<LDKUnsignedNodeAnnouncement>.allocate(capacity: 1)
93 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
95 return UnsignedNodeAnnouncement_set_addresses(this_ptrPointer, Bindings.new_LDKCVec_NetAddressZ(array: val));
98 public func clone(orig: UnsignedNodeAnnouncement) -> UnsignedNodeAnnouncement {
100 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKUnsignedNodeAnnouncement>) in
101 UnsignedNodeAnnouncement(pointer: UnsignedNodeAnnouncement_clone(origPointer))
105 public func write(obj: UnsignedNodeAnnouncement) -> [UInt8] {
107 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKUnsignedNodeAnnouncement>) in
108 UnsignedNodeAnnouncement_write(objPointer)
112 public func read(ser: [UInt8]) -> Result_UnsignedNodeAnnouncementDecodeErrorZ {
114 return Result_UnsignedNodeAnnouncementDecodeErrorZ(pointer: UnsignedNodeAnnouncement_read(Bindings.new_LDKu8slice(array: ser)));
119 if self.cOpaqueStruct?.is_owned == false {
123 UnsignedNodeAnnouncement_free(self.cOpaqueStruct!)
129 /* STRUCT_METHODS_END */