3 public class SpendableOutputDescriptor {
5 public internal(set) var cOpaqueStruct: LDKSpendableOutputDescriptor?;
9 public init(pointer: LDKSpendableOutputDescriptor){
10 self.cOpaqueStruct = pointer
13 /* OPTION_METHODS_START */
15 public enum SpendableOutputDescriptorValueType {
16 case StaticOutput, DelayedPaymentOutput, StaticPaymentOutput
19 public func getValueType() -> SpendableOutputDescriptorValueType? {
20 switch self.cOpaqueStruct?.tag {
22 case LDKSpendableOutputDescriptor_StaticOutput:
24 case LDKSpendableOutputDescriptor_DelayedPaymentOutput:
25 return .DelayedPaymentOutput
26 case LDKSpendableOutputDescriptor_StaticPaymentOutput:
27 return .StaticPaymentOutput
34 public func getValueAsStaticOutput() -> StaticOutput? {
35 if self.cOpaqueStruct?.tag != LDKSpendableOutputDescriptor_StaticOutput {
38 return StaticOutput(pointer: self.cOpaqueStruct!.static_output)
41 public func getValueAsDelayedPaymentOutput() -> DelayedPaymentOutputDescriptor? {
42 if self.cOpaqueStruct?.tag != LDKSpendableOutputDescriptor_DelayedPaymentOutput {
45 return DelayedPaymentOutputDescriptor(pointer: self.cOpaqueStruct!.delayed_payment_output)
48 public func getValueAsStaticPaymentOutput() -> StaticPaymentOutputDescriptor? {
49 if self.cOpaqueStruct?.tag != LDKSpendableOutputDescriptor_StaticPaymentOutput {
52 return StaticPaymentOutputDescriptor(pointer: self.cOpaqueStruct!.static_payment_output)
56 /* OPTION_METHODS_END */
60 public class StaticOutput {
63 var cOpaqueStruct: LDKSpendableOutputDescriptor_LDKStaticOutput_Body?;
64 fileprivate init(pointer: LDKSpendableOutputDescriptor_LDKStaticOutput_Body) {
65 self.cOpaqueStruct = pointer
70 public func getOutpoint() -> OutPoint {
71 return OutPoint(pointer: self.cOpaqueStruct!.outpoint)
74 public func getOutput() -> TxOut {
75 return TxOut(pointer: self.cOpaqueStruct!.output)