3 public class DelayedPaymentOutputDescriptor {
5 public internal(set) var cOpaqueStruct: LDKDelayedPaymentOutputDescriptor?;
7 /* DEFAULT_CONSTRUCTOR_START */
8 public init(outpoint_arg: OutPoint, per_commitment_point_arg: [UInt8], to_self_delay_arg: UInt16, output_arg: LDKTxOut, revocation_pubkey_arg: [UInt8], channel_keys_id_arg: [UInt8], channel_value_satoshis_arg: UInt64) {
10 self.cOpaqueStruct = DelayedPaymentOutputDescriptor_new(outpoint_arg.cOpaqueStruct!, Bindings.new_LDKPublicKey(array: per_commitment_point_arg), to_self_delay_arg, output_arg, Bindings.new_LDKPublicKey(array: revocation_pubkey_arg), Bindings.new_LDKThirtyTwoBytes(array: channel_keys_id_arg), channel_value_satoshis_arg)
12 /* DEFAULT_CONSTRUCTOR_END */
14 public init(pointer: LDKDelayedPaymentOutputDescriptor){
15 self.cOpaqueStruct = pointer
18 /* STRUCT_METHODS_START */
20 public func get_outpoint() -> OutPoint {
22 return OutPoint(pointer: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKDelayedPaymentOutputDescriptor>) in
23 DelayedPaymentOutputDescriptor_get_outpoint(this_ptrPointer)
27 public func set_outpoint(val: OutPoint) -> Void {
29 let this_ptrPointer = UnsafeMutablePointer<LDKDelayedPaymentOutputDescriptor>.allocate(capacity: 1)
30 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
32 return DelayedPaymentOutputDescriptor_set_outpoint(this_ptrPointer, val.cOpaqueStruct!);
35 public func get_per_commitment_point() -> [UInt8] {
37 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKDelayedPaymentOutputDescriptor>) in
38 DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptrPointer)
42 public func set_per_commitment_point(val: [UInt8]) -> Void {
44 let this_ptrPointer = UnsafeMutablePointer<LDKDelayedPaymentOutputDescriptor>.allocate(capacity: 1)
45 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
47 return DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
50 public func get_to_self_delay() -> UInt16 {
52 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKDelayedPaymentOutputDescriptor>) in
53 DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptrPointer)
57 public func set_to_self_delay(val: UInt16) -> Void {
59 let this_ptrPointer = UnsafeMutablePointer<LDKDelayedPaymentOutputDescriptor>.allocate(capacity: 1)
60 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
62 return DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptrPointer, val);
65 public func set_output(val: LDKTxOut) -> Void {
67 let this_ptrPointer = UnsafeMutablePointer<LDKDelayedPaymentOutputDescriptor>.allocate(capacity: 1)
68 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
70 return DelayedPaymentOutputDescriptor_set_output(this_ptrPointer, val);
73 public func get_revocation_pubkey() -> [UInt8] {
75 return Bindings.LDKPublicKey_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKDelayedPaymentOutputDescriptor>) in
76 DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptrPointer)
80 public func set_revocation_pubkey(val: [UInt8]) -> Void {
82 let this_ptrPointer = UnsafeMutablePointer<LDKDelayedPaymentOutputDescriptor>.allocate(capacity: 1)
83 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
85 return DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptrPointer, Bindings.new_LDKPublicKey(array: val));
88 public func get_channel_keys_id() -> [UInt8] {
90 return Bindings.tuple32_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKDelayedPaymentOutputDescriptor>) in
91 DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptrPointer)
95 public func set_channel_keys_id(val: [UInt8]) -> Void {
97 let this_ptrPointer = UnsafeMutablePointer<LDKDelayedPaymentOutputDescriptor>.allocate(capacity: 1)
98 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
100 return DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptrPointer, Bindings.new_LDKThirtyTwoBytes(array: val));
103 public func get_channel_value_satoshis() -> UInt64 {
105 return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer<LDKDelayedPaymentOutputDescriptor>) in
106 DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptrPointer)
110 public func set_channel_value_satoshis(val: UInt64) -> Void {
112 let this_ptrPointer = UnsafeMutablePointer<LDKDelayedPaymentOutputDescriptor>.allocate(capacity: 1)
113 this_ptrPointer.initialize(to: self.cOpaqueStruct!)
115 return DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptrPointer, val);
118 public func clone(orig: DelayedPaymentOutputDescriptor) -> DelayedPaymentOutputDescriptor {
120 return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKDelayedPaymentOutputDescriptor>) in
121 DelayedPaymentOutputDescriptor(pointer: DelayedPaymentOutputDescriptor_clone(origPointer))
125 public func write(obj: DelayedPaymentOutputDescriptor) -> [UInt8] {
127 return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer<LDKDelayedPaymentOutputDescriptor>) in
128 DelayedPaymentOutputDescriptor_write(objPointer)
132 public func read(ser: [UInt8]) -> Result_DelayedPaymentOutputDescriptorDecodeErrorZ {
134 return Result_DelayedPaymentOutputDescriptorDecodeErrorZ(pointer: DelayedPaymentOutputDescriptor_read(Bindings.new_LDKu8slice(array: ser)));
139 if self.cOpaqueStruct?.is_owned == false {
143 DelayedPaymentOutputDescriptor_free(self.cOpaqueStruct!)
149 /* STRUCT_METHODS_END */