Skip to content

Commit ceac980

Browse files
committed
add content accessors to result types
1 parent 074035e commit ceac980

File tree

95 files changed

+981
-335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+981
-335
lines changed

bindings/LDK/Bindings.swift

Lines changed: 331 additions & 331 deletions
Large diffs are not rendered by default.

bindings/LDK/results/Result_AcceptChannelDecodeErrorZ.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ public class Result_AcceptChannelDecodeErrorZ {
2727
return nil
2828
}
2929

30+
public func getValue() -> AcceptChannel? {
31+
if self.cOpaqueStruct?.result_ok == true {
32+
return AcceptChannel(pointer: self.cOpaqueStruct!.contents.result.pointee)
33+
}
34+
return nil
35+
}
36+
3037
/* RESULT_METHODS_END */
3138

3239
}

bindings/LDK/results/Result_AnnouncementSignaturesDecodeErrorZ.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ public class Result_AnnouncementSignaturesDecodeErrorZ {
2727
return nil
2828
}
2929

30+
public func getValue() -> AnnouncementSignatures? {
31+
if self.cOpaqueStruct?.result_ok == true {
32+
return AnnouncementSignatures(pointer: self.cOpaqueStruct!.contents.result.pointee)
33+
}
34+
return nil
35+
}
36+
3037
/* RESULT_METHODS_END */
3138

3239
}

bindings/LDK/results/Result_BuiltCommitmentTransactionDecodeErrorZ.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ public class Result_BuiltCommitmentTransactionDecodeErrorZ {
2727
return nil
2828
}
2929

30+
public func getValue() -> BuiltCommitmentTransaction? {
31+
if self.cOpaqueStruct?.result_ok == true {
32+
return BuiltCommitmentTransaction(pointer: self.cOpaqueStruct!.contents.result.pointee)
33+
}
34+
return nil
35+
}
36+
3037
/* RESULT_METHODS_END */
3138

3239
}

bindings/LDK/results/Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ public class Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ {
2727
return nil
2828
}
2929

30+
public func getValue() -> C2Tuple_BlockHashChannelManagerZ? {
31+
if self.cOpaqueStruct?.result_ok == true {
32+
return C2Tuple_BlockHashChannelManagerZ(pointer: self.cOpaqueStruct!.contents.result.pointee)
33+
}
34+
return nil
35+
}
36+
3037
/* RESULT_METHODS_END */
3138

3239
}

bindings/LDK/results/Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ public class Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ {
2727
return nil
2828
}
2929

30+
public func getValue() -> C2Tuple_BlockHashChannelMonitorZ? {
31+
if self.cOpaqueStruct?.result_ok == true {
32+
return C2Tuple_BlockHashChannelMonitorZ(pointer: self.cOpaqueStruct!.contents.result.pointee)
33+
}
34+
return nil
35+
}
36+
3037
/* RESULT_METHODS_END */
3138

3239
}

bindings/LDK/results/Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ public class Result_C2Tuple_SignatureCVec_SignatureZZNoneZ {
2020

2121
/* RESULT_METHODS_START */
2222

23+
public func getValue() -> C2Tuple_SignatureCVec_SignatureZZ? {
24+
if self.cOpaqueStruct?.result_ok == true {
25+
return C2Tuple_SignatureCVec_SignatureZZ(pointer: self.cOpaqueStruct!.contents.result.pointee)
26+
}
27+
return nil
28+
}
29+
2330
/* RESULT_METHODS_END */
2431

2532
}

bindings/LDK/results/Result_CResult_NetAddressu8ZDecodeErrorZ.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ public class Result_CResult_NetAddressu8ZDecodeErrorZ {
2727
return nil
2828
}
2929

30+
public func getValue() -> Result_NetAddressu8Z? {
31+
if self.cOpaqueStruct?.result_ok == true {
32+
return Result_NetAddressu8Z(pointer: self.cOpaqueStruct!.contents.result.pointee)
33+
}
34+
return nil
35+
}
36+
3037
/* RESULT_METHODS_END */
3138

3239
}

bindings/LDK/results/Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ public class Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ {
2727
return nil
2828
}
2929

30+
public func getValue() -> [LDKC2Tuple_BlockHashChannelMonitorZ]? {
31+
if self.cOpaqueStruct?.result_ok == true {
32+
return Bindings.LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_to_array(nativeType: self.cOpaqueStruct!.contents.result.pointee)
33+
}
34+
return nil
35+
}
36+
3037
/* RESULT_METHODS_END */
3138

3239
}

bindings/LDK/results/Result_CVec_CVec_u8ZZNoneZ.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ public class Result_CVec_CVec_u8ZZNoneZ {
2020

2121
/* RESULT_METHODS_START */
2222

23+
public func getValue() -> [[UInt8]]? {
24+
if self.cOpaqueStruct?.result_ok == true {
25+
return Bindings.LDKCVec_CVec_u8ZZ_to_array(nativeType: self.cOpaqueStruct!.contents.result.pointee)
26+
}
27+
return nil
28+
}
29+
2330
/* RESULT_METHODS_END */
2431

2532
}

0 commit comments

Comments
 (0)