diff --git a/bindings/LDK/Bindings.swift b/bindings/LDK/Bindings.swift index ded48238..082cd267 100644 --- a/bindings/LDK/Bindings.swift +++ b/bindings/LDK/Bindings.swift @@ -14,62 +14,62 @@ public class Bindings{ /* BYTE_ARRAY_METHODS_START */ - public class func new_LDKThirtyTwoBytes(array: [UInt8]) -> LDKThirtyTwoBytes { - let byteType = LDKThirtyTwoBytes(data: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31])) + public class func new_LDKSignature(array: [UInt8]) -> LDKSignature { + let byteType = LDKSignature(compact_form: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32], array[33], array[34], array[35], array[36], array[37], array[38], array[39], array[40], array[41], array[42], array[43], array[44], array[45], array[46], array[47], array[48], array[49], array[50], array[51], array[52], array[53], array[54], array[55], array[56], array[57], array[58], array[59], array[60], array[61], array[62], array[63])) return byteType } - public class func LDKThirtyTwoBytes_to_array(nativeType: LDKThirtyTwoBytes) -> [UInt8] { - let array = [nativeType.data.0, nativeType.data.1, nativeType.data.2, nativeType.data.3, nativeType.data.4, nativeType.data.5, nativeType.data.6, nativeType.data.7, nativeType.data.8, nativeType.data.9, nativeType.data.10, nativeType.data.11, nativeType.data.12, nativeType.data.13, nativeType.data.14, nativeType.data.15, nativeType.data.16, nativeType.data.17, nativeType.data.18, nativeType.data.19, nativeType.data.20, nativeType.data.21, nativeType.data.22, nativeType.data.23, nativeType.data.24, nativeType.data.25, nativeType.data.26, nativeType.data.27, nativeType.data.28, nativeType.data.29, nativeType.data.30, nativeType.data.31] + public class func LDKSignature_to_array(nativeType: LDKSignature) -> [UInt8] { + let array = [nativeType.compact_form.0, nativeType.compact_form.1, nativeType.compact_form.2, nativeType.compact_form.3, nativeType.compact_form.4, nativeType.compact_form.5, nativeType.compact_form.6, nativeType.compact_form.7, nativeType.compact_form.8, nativeType.compact_form.9, nativeType.compact_form.10, nativeType.compact_form.11, nativeType.compact_form.12, nativeType.compact_form.13, nativeType.compact_form.14, nativeType.compact_form.15, nativeType.compact_form.16, nativeType.compact_form.17, nativeType.compact_form.18, nativeType.compact_form.19, nativeType.compact_form.20, nativeType.compact_form.21, nativeType.compact_form.22, nativeType.compact_form.23, nativeType.compact_form.24, nativeType.compact_form.25, nativeType.compact_form.26, nativeType.compact_form.27, nativeType.compact_form.28, nativeType.compact_form.29, nativeType.compact_form.30, nativeType.compact_form.31, nativeType.compact_form.32, nativeType.compact_form.33, nativeType.compact_form.34, nativeType.compact_form.35, nativeType.compact_form.36, nativeType.compact_form.37, nativeType.compact_form.38, nativeType.compact_form.39, nativeType.compact_form.40, nativeType.compact_form.41, nativeType.compact_form.42, nativeType.compact_form.43, nativeType.compact_form.44, nativeType.compact_form.45, nativeType.compact_form.46, nativeType.compact_form.47, nativeType.compact_form.48, nativeType.compact_form.49, nativeType.compact_form.50, nativeType.compact_form.51, nativeType.compact_form.52, nativeType.compact_form.53, nativeType.compact_form.54, nativeType.compact_form.55, nativeType.compact_form.56, nativeType.compact_form.57, nativeType.compact_form.58, nativeType.compact_form.59, nativeType.compact_form.60, nativeType.compact_form.61, nativeType.compact_form.62, nativeType.compact_form.63] return array } - static func array_to_tuple32(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { - return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31]) + static func array_to_tuple64(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { + return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32], array[33], array[34], array[35], array[36], array[37], array[38], array[39], array[40], array[41], array[42], array[43], array[44], array[45], array[46], array[47], array[48], array[49], array[50], array[51], array[52], array[53], array[54], array[55], array[56], array[57], array[58], array[59], array[60], array[61], array[62], array[63]) } - static func tuple32_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { - let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3, nativeType.4, nativeType.5, nativeType.6, nativeType.7, nativeType.8, nativeType.9, nativeType.10, nativeType.11, nativeType.12, nativeType.13, nativeType.14, nativeType.15, nativeType.16, nativeType.17, nativeType.18, nativeType.19, nativeType.20, nativeType.21, nativeType.22, nativeType.23, nativeType.24, nativeType.25, nativeType.26, nativeType.27, nativeType.28, nativeType.29, nativeType.30, nativeType.31] + static func tuple64_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { + let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3, nativeType.4, nativeType.5, nativeType.6, nativeType.7, nativeType.8, nativeType.9, nativeType.10, nativeType.11, nativeType.12, nativeType.13, nativeType.14, nativeType.15, nativeType.16, nativeType.17, nativeType.18, nativeType.19, nativeType.20, nativeType.21, nativeType.22, nativeType.23, nativeType.24, nativeType.25, nativeType.26, nativeType.27, nativeType.28, nativeType.29, nativeType.30, nativeType.31, nativeType.32, nativeType.33, nativeType.34, nativeType.35, nativeType.36, nativeType.37, nativeType.38, nativeType.39, nativeType.40, nativeType.41, nativeType.42, nativeType.43, nativeType.44, nativeType.45, nativeType.46, nativeType.47, nativeType.48, nativeType.49, nativeType.50, nativeType.51, nativeType.52, nativeType.53, nativeType.54, nativeType.55, nativeType.56, nativeType.57, nativeType.58, nativeType.59, nativeType.60, nativeType.61, nativeType.62, nativeType.63] return array } - public class func new_LDKTwentyBytes(array: [UInt8]) -> LDKTwentyBytes { - let byteType = LDKTwentyBytes(data: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19])) + public class func new_LDKFourBytes(array: [UInt8]) -> LDKFourBytes { + let byteType = LDKFourBytes(data: (array[0], array[1], array[2], array[3])) return byteType } - public class func LDKTwentyBytes_to_array(nativeType: LDKTwentyBytes) -> [UInt8] { - let array = [nativeType.data.0, nativeType.data.1, nativeType.data.2, nativeType.data.3, nativeType.data.4, nativeType.data.5, nativeType.data.6, nativeType.data.7, nativeType.data.8, nativeType.data.9, nativeType.data.10, nativeType.data.11, nativeType.data.12, nativeType.data.13, nativeType.data.14, nativeType.data.15, nativeType.data.16, nativeType.data.17, nativeType.data.18, nativeType.data.19] + public class func LDKFourBytes_to_array(nativeType: LDKFourBytes) -> [UInt8] { + let array = [nativeType.data.0, nativeType.data.1, nativeType.data.2, nativeType.data.3] return array } - static func array_to_tuple20(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { - return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19]) + static func array_to_tuple4(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8) { + return (array[0], array[1], array[2], array[3]) } - static func tuple20_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { - let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3, nativeType.4, nativeType.5, nativeType.6, nativeType.7, nativeType.8, nativeType.9, nativeType.10, nativeType.11, nativeType.12, nativeType.13, nativeType.14, nativeType.15, nativeType.16, nativeType.17, nativeType.18, nativeType.19] + static func tuple4_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { + let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3] return array } - public class func new_LDKFourBytes(array: [UInt8]) -> LDKFourBytes { - let byteType = LDKFourBytes(data: (array[0], array[1], array[2], array[3])) + public class func new_LDKSixteenBytes(array: [UInt8]) -> LDKSixteenBytes { + let byteType = LDKSixteenBytes(data: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15])) return byteType } - public class func LDKFourBytes_to_array(nativeType: LDKFourBytes) -> [UInt8] { - let array = [nativeType.data.0, nativeType.data.1, nativeType.data.2, nativeType.data.3] + public class func LDKSixteenBytes_to_array(nativeType: LDKSixteenBytes) -> [UInt8] { + let array = [nativeType.data.0, nativeType.data.1, nativeType.data.2, nativeType.data.3, nativeType.data.4, nativeType.data.5, nativeType.data.6, nativeType.data.7, nativeType.data.8, nativeType.data.9, nativeType.data.10, nativeType.data.11, nativeType.data.12, nativeType.data.13, nativeType.data.14, nativeType.data.15] return array } - static func array_to_tuple4(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8) { - return (array[0], array[1], array[2], array[3]) + static func array_to_tuple16(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { + return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15]) } - static func tuple4_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { - let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3] + static func tuple16_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { + let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3, nativeType.4, nativeType.5, nativeType.6, nativeType.7, nativeType.8, nativeType.9, nativeType.10, nativeType.11, nativeType.12, nativeType.13, nativeType.14, nativeType.15] return array } @@ -94,42 +94,62 @@ public class Bindings{ } - public class func new_LDKSignature(array: [UInt8]) -> LDKSignature { - let byteType = LDKSignature(compact_form: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32], array[33], array[34], array[35], array[36], array[37], array[38], array[39], array[40], array[41], array[42], array[43], array[44], array[45], array[46], array[47], array[48], array[49], array[50], array[51], array[52], array[53], array[54], array[55], array[56], array[57], array[58], array[59], array[60], array[61], array[62], array[63])) + public class func new_LDKRecoverableSignature(array: [UInt8]) -> LDKRecoverableSignature { + let byteType = LDKRecoverableSignature(serialized_form: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32], array[33], array[34], array[35], array[36], array[37], array[38], array[39], array[40], array[41], array[42], array[43], array[44], array[45], array[46], array[47], array[48], array[49], array[50], array[51], array[52], array[53], array[54], array[55], array[56], array[57], array[58], array[59], array[60], array[61], array[62], array[63], array[64], array[65], array[66], array[67])) return byteType } - public class func LDKSignature_to_array(nativeType: LDKSignature) -> [UInt8] { - let array = [nativeType.compact_form.0, nativeType.compact_form.1, nativeType.compact_form.2, nativeType.compact_form.3, nativeType.compact_form.4, nativeType.compact_form.5, nativeType.compact_form.6, nativeType.compact_form.7, nativeType.compact_form.8, nativeType.compact_form.9, nativeType.compact_form.10, nativeType.compact_form.11, nativeType.compact_form.12, nativeType.compact_form.13, nativeType.compact_form.14, nativeType.compact_form.15, nativeType.compact_form.16, nativeType.compact_form.17, nativeType.compact_form.18, nativeType.compact_form.19, nativeType.compact_form.20, nativeType.compact_form.21, nativeType.compact_form.22, nativeType.compact_form.23, nativeType.compact_form.24, nativeType.compact_form.25, nativeType.compact_form.26, nativeType.compact_form.27, nativeType.compact_form.28, nativeType.compact_form.29, nativeType.compact_form.30, nativeType.compact_form.31, nativeType.compact_form.32, nativeType.compact_form.33, nativeType.compact_form.34, nativeType.compact_form.35, nativeType.compact_form.36, nativeType.compact_form.37, nativeType.compact_form.38, nativeType.compact_form.39, nativeType.compact_form.40, nativeType.compact_form.41, nativeType.compact_form.42, nativeType.compact_form.43, nativeType.compact_form.44, nativeType.compact_form.45, nativeType.compact_form.46, nativeType.compact_form.47, nativeType.compact_form.48, nativeType.compact_form.49, nativeType.compact_form.50, nativeType.compact_form.51, nativeType.compact_form.52, nativeType.compact_form.53, nativeType.compact_form.54, nativeType.compact_form.55, nativeType.compact_form.56, nativeType.compact_form.57, nativeType.compact_form.58, nativeType.compact_form.59, nativeType.compact_form.60, nativeType.compact_form.61, nativeType.compact_form.62, nativeType.compact_form.63] + public class func LDKRecoverableSignature_to_array(nativeType: LDKRecoverableSignature) -> [UInt8] { + let array = [nativeType.serialized_form.0, nativeType.serialized_form.1, nativeType.serialized_form.2, nativeType.serialized_form.3, nativeType.serialized_form.4, nativeType.serialized_form.5, nativeType.serialized_form.6, nativeType.serialized_form.7, nativeType.serialized_form.8, nativeType.serialized_form.9, nativeType.serialized_form.10, nativeType.serialized_form.11, nativeType.serialized_form.12, nativeType.serialized_form.13, nativeType.serialized_form.14, nativeType.serialized_form.15, nativeType.serialized_form.16, nativeType.serialized_form.17, nativeType.serialized_form.18, nativeType.serialized_form.19, nativeType.serialized_form.20, nativeType.serialized_form.21, nativeType.serialized_form.22, nativeType.serialized_form.23, nativeType.serialized_form.24, nativeType.serialized_form.25, nativeType.serialized_form.26, nativeType.serialized_form.27, nativeType.serialized_form.28, nativeType.serialized_form.29, nativeType.serialized_form.30, nativeType.serialized_form.31, nativeType.serialized_form.32, nativeType.serialized_form.33, nativeType.serialized_form.34, nativeType.serialized_form.35, nativeType.serialized_form.36, nativeType.serialized_form.37, nativeType.serialized_form.38, nativeType.serialized_form.39, nativeType.serialized_form.40, nativeType.serialized_form.41, nativeType.serialized_form.42, nativeType.serialized_form.43, nativeType.serialized_form.44, nativeType.serialized_form.45, nativeType.serialized_form.46, nativeType.serialized_form.47, nativeType.serialized_form.48, nativeType.serialized_form.49, nativeType.serialized_form.50, nativeType.serialized_form.51, nativeType.serialized_form.52, nativeType.serialized_form.53, nativeType.serialized_form.54, nativeType.serialized_form.55, nativeType.serialized_form.56, nativeType.serialized_form.57, nativeType.serialized_form.58, nativeType.serialized_form.59, nativeType.serialized_form.60, nativeType.serialized_form.61, nativeType.serialized_form.62, nativeType.serialized_form.63, nativeType.serialized_form.64, nativeType.serialized_form.65, nativeType.serialized_form.66, nativeType.serialized_form.67] return array } - static func array_to_tuple64(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { - return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32], array[33], array[34], array[35], array[36], array[37], array[38], array[39], array[40], array[41], array[42], array[43], array[44], array[45], array[46], array[47], array[48], array[49], array[50], array[51], array[52], array[53], array[54], array[55], array[56], array[57], array[58], array[59], array[60], array[61], array[62], array[63]) + static func array_to_tuple68(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { + return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32], array[33], array[34], array[35], array[36], array[37], array[38], array[39], array[40], array[41], array[42], array[43], array[44], array[45], array[46], array[47], array[48], array[49], array[50], array[51], array[52], array[53], array[54], array[55], array[56], array[57], array[58], array[59], array[60], array[61], array[62], array[63], array[64], array[65], array[66], array[67]) } - static func tuple64_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { - let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3, nativeType.4, nativeType.5, nativeType.6, nativeType.7, nativeType.8, nativeType.9, nativeType.10, nativeType.11, nativeType.12, nativeType.13, nativeType.14, nativeType.15, nativeType.16, nativeType.17, nativeType.18, nativeType.19, nativeType.20, nativeType.21, nativeType.22, nativeType.23, nativeType.24, nativeType.25, nativeType.26, nativeType.27, nativeType.28, nativeType.29, nativeType.30, nativeType.31, nativeType.32, nativeType.33, nativeType.34, nativeType.35, nativeType.36, nativeType.37, nativeType.38, nativeType.39, nativeType.40, nativeType.41, nativeType.42, nativeType.43, nativeType.44, nativeType.45, nativeType.46, nativeType.47, nativeType.48, nativeType.49, nativeType.50, nativeType.51, nativeType.52, nativeType.53, nativeType.54, nativeType.55, nativeType.56, nativeType.57, nativeType.58, nativeType.59, nativeType.60, nativeType.61, nativeType.62, nativeType.63] + static func tuple68_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { + let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3, nativeType.4, nativeType.5, nativeType.6, nativeType.7, nativeType.8, nativeType.9, nativeType.10, nativeType.11, nativeType.12, nativeType.13, nativeType.14, nativeType.15, nativeType.16, nativeType.17, nativeType.18, nativeType.19, nativeType.20, nativeType.21, nativeType.22, nativeType.23, nativeType.24, nativeType.25, nativeType.26, nativeType.27, nativeType.28, nativeType.29, nativeType.30, nativeType.31, nativeType.32, nativeType.33, nativeType.34, nativeType.35, nativeType.36, nativeType.37, nativeType.38, nativeType.39, nativeType.40, nativeType.41, nativeType.42, nativeType.43, nativeType.44, nativeType.45, nativeType.46, nativeType.47, nativeType.48, nativeType.49, nativeType.50, nativeType.51, nativeType.52, nativeType.53, nativeType.54, nativeType.55, nativeType.56, nativeType.57, nativeType.58, nativeType.59, nativeType.60, nativeType.61, nativeType.62, nativeType.63, nativeType.64, nativeType.65, nativeType.66, nativeType.67] return array } - public class func new_LDKSixteenBytes(array: [UInt8]) -> LDKSixteenBytes { - let byteType = LDKSixteenBytes(data: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15])) + public class func new_LDKPublicKey(array: [UInt8]) -> LDKPublicKey { + let byteType = LDKPublicKey(compressed_form: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32])) return byteType } - public class func LDKSixteenBytes_to_array(nativeType: LDKSixteenBytes) -> [UInt8] { - let array = [nativeType.data.0, nativeType.data.1, nativeType.data.2, nativeType.data.3, nativeType.data.4, nativeType.data.5, nativeType.data.6, nativeType.data.7, nativeType.data.8, nativeType.data.9, nativeType.data.10, nativeType.data.11, nativeType.data.12, nativeType.data.13, nativeType.data.14, nativeType.data.15] + public class func LDKPublicKey_to_array(nativeType: LDKPublicKey) -> [UInt8] { + let array = [nativeType.compressed_form.0, nativeType.compressed_form.1, nativeType.compressed_form.2, nativeType.compressed_form.3, nativeType.compressed_form.4, nativeType.compressed_form.5, nativeType.compressed_form.6, nativeType.compressed_form.7, nativeType.compressed_form.8, nativeType.compressed_form.9, nativeType.compressed_form.10, nativeType.compressed_form.11, nativeType.compressed_form.12, nativeType.compressed_form.13, nativeType.compressed_form.14, nativeType.compressed_form.15, nativeType.compressed_form.16, nativeType.compressed_form.17, nativeType.compressed_form.18, nativeType.compressed_form.19, nativeType.compressed_form.20, nativeType.compressed_form.21, nativeType.compressed_form.22, nativeType.compressed_form.23, nativeType.compressed_form.24, nativeType.compressed_form.25, nativeType.compressed_form.26, nativeType.compressed_form.27, nativeType.compressed_form.28, nativeType.compressed_form.29, nativeType.compressed_form.30, nativeType.compressed_form.31, nativeType.compressed_form.32] return array } - static func array_to_tuple16(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { - return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15]) + static func array_to_tuple33(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { + return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32]) } - static func tuple16_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { - let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3, nativeType.4, nativeType.5, nativeType.6, nativeType.7, nativeType.8, nativeType.9, nativeType.10, nativeType.11, nativeType.12, nativeType.13, nativeType.14, nativeType.15] + static func tuple33_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { + let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3, nativeType.4, nativeType.5, nativeType.6, nativeType.7, nativeType.8, nativeType.9, nativeType.10, nativeType.11, nativeType.12, nativeType.13, nativeType.14, nativeType.15, nativeType.16, nativeType.17, nativeType.18, nativeType.19, nativeType.20, nativeType.21, nativeType.22, nativeType.23, nativeType.24, nativeType.25, nativeType.26, nativeType.27, nativeType.28, nativeType.29, nativeType.30, nativeType.31, nativeType.32] + return array + } + + + public class func new_LDKThirtyTwoBytes(array: [UInt8]) -> LDKThirtyTwoBytes { + let byteType = LDKThirtyTwoBytes(data: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31])) + return byteType + } + + public class func LDKThirtyTwoBytes_to_array(nativeType: LDKThirtyTwoBytes) -> [UInt8] { + let array = [nativeType.data.0, nativeType.data.1, nativeType.data.2, nativeType.data.3, nativeType.data.4, nativeType.data.5, nativeType.data.6, nativeType.data.7, nativeType.data.8, nativeType.data.9, nativeType.data.10, nativeType.data.11, nativeType.data.12, nativeType.data.13, nativeType.data.14, nativeType.data.15, nativeType.data.16, nativeType.data.17, nativeType.data.18, nativeType.data.19, nativeType.data.20, nativeType.data.21, nativeType.data.22, nativeType.data.23, nativeType.data.24, nativeType.data.25, nativeType.data.26, nativeType.data.27, nativeType.data.28, nativeType.data.29, nativeType.data.30, nativeType.data.31] + return array + } + + static func array_to_tuple32(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { + return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31]) + } + + static func tuple32_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { + let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3, nativeType.4, nativeType.5, nativeType.6, nativeType.7, nativeType.8, nativeType.9, nativeType.10, nativeType.11, nativeType.12, nativeType.13, nativeType.14, nativeType.15, nativeType.16, nativeType.17, nativeType.18, nativeType.19, nativeType.20, nativeType.21, nativeType.22, nativeType.23, nativeType.24, nativeType.25, nativeType.26, nativeType.27, nativeType.28, nativeType.29, nativeType.30, nativeType.31] return array } @@ -154,56 +174,36 @@ public class Bindings{ } - public class func new_LDKSecretKey(array: [UInt8]) -> LDKSecretKey { - let byteType = LDKSecretKey(bytes: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31])) - return byteType - } - - public class func LDKSecretKey_to_array(nativeType: LDKSecretKey) -> [UInt8] { - let array = [nativeType.bytes.0, nativeType.bytes.1, nativeType.bytes.2, nativeType.bytes.3, nativeType.bytes.4, nativeType.bytes.5, nativeType.bytes.6, nativeType.bytes.7, nativeType.bytes.8, nativeType.bytes.9, nativeType.bytes.10, nativeType.bytes.11, nativeType.bytes.12, nativeType.bytes.13, nativeType.bytes.14, nativeType.bytes.15, nativeType.bytes.16, nativeType.bytes.17, nativeType.bytes.18, nativeType.bytes.19, nativeType.bytes.20, nativeType.bytes.21, nativeType.bytes.22, nativeType.bytes.23, nativeType.bytes.24, nativeType.bytes.25, nativeType.bytes.26, nativeType.bytes.27, nativeType.bytes.28, nativeType.bytes.29, nativeType.bytes.30, nativeType.bytes.31] - return array - } - - public class func new_LDKPublicKey(array: [UInt8]) -> LDKPublicKey { - let byteType = LDKPublicKey(compressed_form: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32])) + public class func new_LDKTwentyBytes(array: [UInt8]) -> LDKTwentyBytes { + let byteType = LDKTwentyBytes(data: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19])) return byteType } - public class func LDKPublicKey_to_array(nativeType: LDKPublicKey) -> [UInt8] { - let array = [nativeType.compressed_form.0, nativeType.compressed_form.1, nativeType.compressed_form.2, nativeType.compressed_form.3, nativeType.compressed_form.4, nativeType.compressed_form.5, nativeType.compressed_form.6, nativeType.compressed_form.7, nativeType.compressed_form.8, nativeType.compressed_form.9, nativeType.compressed_form.10, nativeType.compressed_form.11, nativeType.compressed_form.12, nativeType.compressed_form.13, nativeType.compressed_form.14, nativeType.compressed_form.15, nativeType.compressed_form.16, nativeType.compressed_form.17, nativeType.compressed_form.18, nativeType.compressed_form.19, nativeType.compressed_form.20, nativeType.compressed_form.21, nativeType.compressed_form.22, nativeType.compressed_form.23, nativeType.compressed_form.24, nativeType.compressed_form.25, nativeType.compressed_form.26, nativeType.compressed_form.27, nativeType.compressed_form.28, nativeType.compressed_form.29, nativeType.compressed_form.30, nativeType.compressed_form.31, nativeType.compressed_form.32] + public class func LDKTwentyBytes_to_array(nativeType: LDKTwentyBytes) -> [UInt8] { + let array = [nativeType.data.0, nativeType.data.1, nativeType.data.2, nativeType.data.3, nativeType.data.4, nativeType.data.5, nativeType.data.6, nativeType.data.7, nativeType.data.8, nativeType.data.9, nativeType.data.10, nativeType.data.11, nativeType.data.12, nativeType.data.13, nativeType.data.14, nativeType.data.15, nativeType.data.16, nativeType.data.17, nativeType.data.18, nativeType.data.19] return array } - static func array_to_tuple33(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { - return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32]) + static func array_to_tuple20(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { + return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19]) } - static func tuple33_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { - let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3, nativeType.4, nativeType.5, nativeType.6, nativeType.7, nativeType.8, nativeType.9, nativeType.10, nativeType.11, nativeType.12, nativeType.13, nativeType.14, nativeType.15, nativeType.16, nativeType.17, nativeType.18, nativeType.19, nativeType.20, nativeType.21, nativeType.22, nativeType.23, nativeType.24, nativeType.25, nativeType.26, nativeType.27, nativeType.28, nativeType.29, nativeType.30, nativeType.31, nativeType.32] + static func tuple20_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { + let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3, nativeType.4, nativeType.5, nativeType.6, nativeType.7, nativeType.8, nativeType.9, nativeType.10, nativeType.11, nativeType.12, nativeType.13, nativeType.14, nativeType.15, nativeType.16, nativeType.17, nativeType.18, nativeType.19] return array } - public class func new_LDKRecoverableSignature(array: [UInt8]) -> LDKRecoverableSignature { - let byteType = LDKRecoverableSignature(serialized_form: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32], array[33], array[34], array[35], array[36], array[37], array[38], array[39], array[40], array[41], array[42], array[43], array[44], array[45], array[46], array[47], array[48], array[49], array[50], array[51], array[52], array[53], array[54], array[55], array[56], array[57], array[58], array[59], array[60], array[61], array[62], array[63], array[64], array[65], array[66], array[67])) + public class func new_LDKSecretKey(array: [UInt8]) -> LDKSecretKey { + let byteType = LDKSecretKey(bytes: (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31])) return byteType } - public class func LDKRecoverableSignature_to_array(nativeType: LDKRecoverableSignature) -> [UInt8] { - let array = [nativeType.serialized_form.0, nativeType.serialized_form.1, nativeType.serialized_form.2, nativeType.serialized_form.3, nativeType.serialized_form.4, nativeType.serialized_form.5, nativeType.serialized_form.6, nativeType.serialized_form.7, nativeType.serialized_form.8, nativeType.serialized_form.9, nativeType.serialized_form.10, nativeType.serialized_form.11, nativeType.serialized_form.12, nativeType.serialized_form.13, nativeType.serialized_form.14, nativeType.serialized_form.15, nativeType.serialized_form.16, nativeType.serialized_form.17, nativeType.serialized_form.18, nativeType.serialized_form.19, nativeType.serialized_form.20, nativeType.serialized_form.21, nativeType.serialized_form.22, nativeType.serialized_form.23, nativeType.serialized_form.24, nativeType.serialized_form.25, nativeType.serialized_form.26, nativeType.serialized_form.27, nativeType.serialized_form.28, nativeType.serialized_form.29, nativeType.serialized_form.30, nativeType.serialized_form.31, nativeType.serialized_form.32, nativeType.serialized_form.33, nativeType.serialized_form.34, nativeType.serialized_form.35, nativeType.serialized_form.36, nativeType.serialized_form.37, nativeType.serialized_form.38, nativeType.serialized_form.39, nativeType.serialized_form.40, nativeType.serialized_form.41, nativeType.serialized_form.42, nativeType.serialized_form.43, nativeType.serialized_form.44, nativeType.serialized_form.45, nativeType.serialized_form.46, nativeType.serialized_form.47, nativeType.serialized_form.48, nativeType.serialized_form.49, nativeType.serialized_form.50, nativeType.serialized_form.51, nativeType.serialized_form.52, nativeType.serialized_form.53, nativeType.serialized_form.54, nativeType.serialized_form.55, nativeType.serialized_form.56, nativeType.serialized_form.57, nativeType.serialized_form.58, nativeType.serialized_form.59, nativeType.serialized_form.60, nativeType.serialized_form.61, nativeType.serialized_form.62, nativeType.serialized_form.63, nativeType.serialized_form.64, nativeType.serialized_form.65, nativeType.serialized_form.66, nativeType.serialized_form.67] + public class func LDKSecretKey_to_array(nativeType: LDKSecretKey) -> [UInt8] { + let array = [nativeType.bytes.0, nativeType.bytes.1, nativeType.bytes.2, nativeType.bytes.3, nativeType.bytes.4, nativeType.bytes.5, nativeType.bytes.6, nativeType.bytes.7, nativeType.bytes.8, nativeType.bytes.9, nativeType.bytes.10, nativeType.bytes.11, nativeType.bytes.12, nativeType.bytes.13, nativeType.bytes.14, nativeType.bytes.15, nativeType.bytes.16, nativeType.bytes.17, nativeType.bytes.18, nativeType.bytes.19, nativeType.bytes.20, nativeType.bytes.21, nativeType.bytes.22, nativeType.bytes.23, nativeType.bytes.24, nativeType.bytes.25, nativeType.bytes.26, nativeType.bytes.27, nativeType.bytes.28, nativeType.bytes.29, nativeType.bytes.30, nativeType.bytes.31] return array } - static func array_to_tuple68(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { - return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32], array[33], array[34], array[35], array[36], array[37], array[38], array[39], array[40], array[41], array[42], array[43], array[44], array[45], array[46], array[47], array[48], array[49], array[50], array[51], array[52], array[53], array[54], array[55], array[56], array[57], array[58], array[59], array[60], array[61], array[62], array[63], array[64], array[65], array[66], array[67]) - } - - static func tuple68_to_array(nativeType: (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)) -> [UInt8] { - let array = [nativeType.0, nativeType.1, nativeType.2, nativeType.3, nativeType.4, nativeType.5, nativeType.6, nativeType.7, nativeType.8, nativeType.9, nativeType.10, nativeType.11, nativeType.12, nativeType.13, nativeType.14, nativeType.15, nativeType.16, nativeType.17, nativeType.18, nativeType.19, nativeType.20, nativeType.21, nativeType.22, nativeType.23, nativeType.24, nativeType.25, nativeType.26, nativeType.27, nativeType.28, nativeType.29, nativeType.30, nativeType.31, nativeType.32, nativeType.33, nativeType.34, nativeType.35, nativeType.36, nativeType.37, nativeType.38, nativeType.39, nativeType.40, nativeType.41, nativeType.42, nativeType.43, nativeType.44, nativeType.45, nativeType.46, nativeType.47, nativeType.48, nativeType.49, nativeType.50, nativeType.51, nativeType.52, nativeType.53, nativeType.54, nativeType.55, nativeType.56, nativeType.57, nativeType.58, nativeType.59, nativeType.60, nativeType.61, nativeType.62, nativeType.63, nativeType.64, nativeType.65, nativeType.66, nativeType.67] - return array - } - - public class func array_to_tuple80(array: [UInt8]) -> (UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8) { return (array[0], array[1], array[2], array[3], array[4], array[5], array[6], array[7], array[8], array[9], array[10], array[11], array[12], array[13], array[14], array[15], array[16], array[17], array[18], array[19], array[20], array[21], array[22], array[23], array[24], array[25], array[26], array[27], array[28], array[29], array[30], array[31], array[32], array[33], array[34], array[35], array[36], array[37], array[38], array[39], array[40], array[41], array[42], array[43], array[44], array[45], array[46], array[47], array[48], array[49], array[50], array[51], array[52], array[53], array[54], array[55], array[56], array[57], array[58], array[59], array[60], array[61], array[62], array[63], array[64], array[65], array[66], array[67], array[68], array[69], array[70], array[71], array[72], array[73], array[74], array[75], array[76], array[77], array[78], array[79]) } @@ -219,28 +219,28 @@ public class Bindings{ /* VECTOR_METHODS_START */ /* SWIFT_TO_RUST_START */ - public class func new_LDKCVec_ChannelMonitorZ(array: [LDKChannelMonitor]) -> LDKCVec_ChannelMonitorZ { + public class func new_LDKCVec_SpendableOutputDescriptorZ(array: [LDKSpendableOutputDescriptor]) -> LDKCVec_SpendableOutputDescriptorZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_ChannelMonitorZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_SpendableOutputDescriptorZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_ChannelMonitorZ_to_array(nativeType: LDKCVec_ChannelMonitorZ) -> [LDKChannelMonitor] { - var array = [LDKChannelMonitor]() + public class func LDKCVec_SpendableOutputDescriptorZ_to_array(nativeType: LDKCVec_SpendableOutputDescriptorZ) -> [LDKSpendableOutputDescriptor] { + var array = [LDKSpendableOutputDescriptor]() for index in 0.. LDKCVec_APIErrorZ { + public class func new_LDKCVec_u64Z(array: [UInt64]) -> LDKCVec_u64Z { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_APIErrorZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_u64Z(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_APIErrorZ_to_array(nativeType: LDKCVec_APIErrorZ) -> [LDKAPIError] { - var array = [LDKAPIError]() + public class func LDKCVec_u64Z_to_array(nativeType: LDKCVec_u64Z) -> [UInt64] { + var array = [UInt64]() for index in 0.. LDKCVec_u64Z { + public class func new_LDKCVec_ChannelMonitorZ(array: [LDKChannelMonitor]) -> LDKCVec_ChannelMonitorZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_u64Z(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_ChannelMonitorZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_u64Z_to_array(nativeType: LDKCVec_u64Z) -> [UInt64] { - var array = [UInt64]() + public class func LDKCVec_ChannelMonitorZ_to_array(nativeType: LDKCVec_ChannelMonitorZ) -> [LDKChannelMonitor] { + var array = [LDKChannelMonitor]() for index in 0.. LDKCVec_UpdateFailMalformedHTLCZ { + public class func new_LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ(array: [LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ]) -> LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_UpdateFailMalformedHTLCZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_UpdateFailMalformedHTLCZ_to_array(nativeType: LDKCVec_UpdateFailMalformedHTLCZ) -> [LDKUpdateFailMalformedHTLC] { - var array = [LDKUpdateFailMalformedHTLC]() + public class func LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_to_array(nativeType: LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ) -> [LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ] { + var array = [LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ]() for index in 0.. LDKCVec_TransactionZ { - - var lowerDimension = [LDKTransaction]() - for currentEntry in array { - let convertedEntry = new_LDKTransaction(array: currentEntry) - lowerDimension.append(convertedEntry) - } - + public class func new_LDKCVec_TxidZ(array: [LDKThirtyTwoBytes]) -> LDKCVec_TxidZ { + /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = lowerDimension.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) - dataContainer.initialize(from: lowerDimension, count: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_TransactionZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_TxidZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_TransactionZ_to_array(nativeType: LDKCVec_TransactionZ) -> [[UInt8]] { - var array = [[UInt8]]() + public class func LDKCVec_TxidZ_to_array(nativeType: LDKCVec_TxidZ) -> [LDKThirtyTwoBytes] { + var array = [LDKThirtyTwoBytes]() for index in 0.. LDKCVec_ChannelDetailsZ { - /* DIMENSION_REDUCTION_PREP */ + public class func new_LDKCVec_CVec_u8ZZ(array: [[UInt8]]) -> LDKCVec_CVec_u8ZZ { + + var lowerDimension = [LDKCVec_u8Z]() + for currentEntry in array { + let convertedEntry = new_LDKCVec_u8Z(array: currentEntry) + lowerDimension.append(convertedEntry) + } + /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = lowerDimension.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) - dataContainer.initialize(from: array, count: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + dataContainer.initialize(from: lowerDimension, count: array.count) - let vector = LDKCVec_ChannelDetailsZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_CVec_u8ZZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_ChannelDetailsZ_to_array(nativeType: LDKCVec_ChannelDetailsZ) -> [LDKChannelDetails] { - var array = [LDKChannelDetails]() + public class func LDKCVec_CVec_u8ZZ_to_array(nativeType: LDKCVec_CVec_u8ZZ) -> [[UInt8]] { + var array = [[UInt8]]() for index in 0.. LDKCVec_u8Z { + public class func new_LDKCVec_UpdateAddHTLCZ(array: [LDKUpdateAddHTLC]) -> LDKCVec_UpdateAddHTLCZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_u8Z(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_UpdateAddHTLCZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_u8Z_to_array(nativeType: LDKCVec_u8Z) -> [UInt8] { - var array = [UInt8]() + public class func LDKCVec_UpdateAddHTLCZ_to_array(nativeType: LDKCVec_UpdateAddHTLCZ) -> [LDKUpdateAddHTLC] { + var array = [LDKUpdateAddHTLC]() for index in 0.. LDKCVec_TxidZ { + public class func new_LDKCVec_TxOutZ(array: [LDKTxOut]) -> LDKCVec_TxOutZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_TxidZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_TxOutZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_TxidZ_to_array(nativeType: LDKCVec_TxidZ) -> [LDKThirtyTwoBytes] { - var array = [LDKThirtyTwoBytes]() + public class func LDKCVec_TxOutZ_to_array(nativeType: LDKCVec_TxOutZ) -> [LDKTxOut] { + var array = [LDKTxOut]() for index in 0.. LDKCVec_C2Tuple_u32TxOutZZ { + public class func new_LDKCVec_C2Tuple_u32ScriptZZ(array: [LDKC2Tuple_u32ScriptZ]) -> LDKCVec_C2Tuple_u32ScriptZZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_C2Tuple_u32TxOutZZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_C2Tuple_u32ScriptZZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_C2Tuple_u32TxOutZZ_to_array(nativeType: LDKCVec_C2Tuple_u32TxOutZZ) -> [LDKC2Tuple_u32TxOutZ] { - var array = [LDKC2Tuple_u32TxOutZ]() + public class func LDKCVec_C2Tuple_u32ScriptZZ_to_array(nativeType: LDKCVec_C2Tuple_u32ScriptZZ) -> [LDKC2Tuple_u32ScriptZ] { + var array = [LDKC2Tuple_u32ScriptZ]() for index in 0.. LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ { + public class func new_LDKCVec_MessageSendEventZ(array: [LDKMessageSendEvent]) -> LDKCVec_MessageSendEventZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_MessageSendEventZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_to_array(nativeType: LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ) -> [LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ] { - var array = [LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ]() + public class func LDKCVec_MessageSendEventZ_to_array(nativeType: LDKCVec_MessageSendEventZ) -> [LDKMessageSendEvent] { + var array = [LDKMessageSendEvent]() for index in 0.. LDKCVec_CVec_RouteHopZZ { - - var lowerDimension = [LDKCVec_RouteHopZ]() - for currentEntry in array { - let convertedEntry = new_LDKCVec_RouteHopZ(array: currentEntry) - lowerDimension.append(convertedEntry) - } - + public class func new_LDKCVec_NodeAnnouncementZ(array: [LDKNodeAnnouncement]) -> LDKCVec_NodeAnnouncementZ { + /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = lowerDimension.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) - dataContainer.initialize(from: lowerDimension, count: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_CVec_RouteHopZZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_NodeAnnouncementZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_CVec_RouteHopZZ_to_array(nativeType: LDKCVec_CVec_RouteHopZZ) -> [[LDKRouteHop]] { - var array = [[LDKRouteHop]]() + public class func LDKCVec_NodeAnnouncementZ_to_array(nativeType: LDKCVec_NodeAnnouncementZ) -> [LDKNodeAnnouncement] { + var array = [LDKNodeAnnouncement]() for index in 0.. LDKCVec_PublicKeyZ { - - var lowerDimension = [LDKPublicKey]() - for currentEntry in array { - let convertedEntry = new_LDKPublicKey(array: currentEntry) - lowerDimension.append(convertedEntry) - } - + public class func new_LDKCVec_C2Tuple_BlockHashChannelMonitorZZ(array: [LDKC2Tuple_BlockHashChannelMonitorZ]) -> LDKCVec_C2Tuple_BlockHashChannelMonitorZZ { + /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = lowerDimension.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) - dataContainer.initialize(from: lowerDimension, count: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_PublicKeyZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_C2Tuple_BlockHashChannelMonitorZZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_PublicKeyZ_to_array(nativeType: LDKCVec_PublicKeyZ) -> [[UInt8]] { - var array = [[UInt8]]() + public class func LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_to_array(nativeType: LDKCVec_C2Tuple_BlockHashChannelMonitorZZ) -> [LDKC2Tuple_BlockHashChannelMonitorZ] { + var array = [LDKC2Tuple_BlockHashChannelMonitorZ]() for index in 0.. LDKCVec_RouteHopZ { + public class func new_LDKCVec_EventZ(array: [LDKEvent]) -> LDKCVec_EventZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_RouteHopZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_EventZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_RouteHopZ_to_array(nativeType: LDKCVec_RouteHopZ) -> [LDKRouteHop] { - var array = [LDKRouteHop]() + public class func LDKCVec_EventZ_to_array(nativeType: LDKCVec_EventZ) -> [LDKEvent] { + var array = [LDKEvent]() for index in 0.. LDKCVec_NetAddressZ { + public class func new_LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ(array: [LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ]) -> LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_NetAddressZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_NetAddressZ_to_array(nativeType: LDKCVec_NetAddressZ) -> [LDKNetAddress] { - var array = [LDKNetAddress]() + public class func LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_to_array(nativeType: LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ) -> [LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ] { + var array = [LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ]() for index in 0.. LDKCVec_MessageSendEventZ { + public class func new_LDKCVec_TransactionOutputsZ(array: [LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ]) -> LDKCVec_TransactionOutputsZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_MessageSendEventZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_TransactionOutputsZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_MessageSendEventZ_to_array(nativeType: LDKCVec_MessageSendEventZ) -> [LDKMessageSendEvent] { - var array = [LDKMessageSendEvent]() + public class func LDKCVec_TransactionOutputsZ_to_array(nativeType: LDKCVec_TransactionOutputsZ) -> [LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ] { + var array = [LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ]() for index in 0.. LDKCVec_SignatureZ { - - var lowerDimension = [LDKSignature]() - for currentEntry in array { - let convertedEntry = new_LDKSignature(array: currentEntry) - lowerDimension.append(convertedEntry) - } - + public class func new_LDKCVec_NetAddressZ(array: [LDKNetAddress]) -> LDKCVec_NetAddressZ { + /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = lowerDimension.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) - dataContainer.initialize(from: lowerDimension, count: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_SignatureZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_NetAddressZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_SignatureZ_to_array(nativeType: LDKCVec_SignatureZ) -> [[UInt8]] { - var array = [[UInt8]]() + public class func LDKCVec_NetAddressZ_to_array(nativeType: LDKCVec_NetAddressZ) -> [LDKNetAddress] { + var array = [LDKNetAddress]() for index in 0.. LDKCVec_MonitorEventZ { + public class func new_LDKCVec_RouteHintZ(array: [LDKRouteHint]) -> LDKCVec_RouteHintZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_MonitorEventZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_RouteHintZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_MonitorEventZ_to_array(nativeType: LDKCVec_MonitorEventZ) -> [LDKMonitorEvent] { - var array = [LDKMonitorEvent]() + public class func LDKCVec_RouteHintZ_to_array(nativeType: LDKCVec_RouteHintZ) -> [LDKRouteHint] { + var array = [LDKRouteHint]() for index in 0.. LDKCVec_TxOutZ { + public class func new_LDKCVec_RouteHintHopZ(array: [LDKRouteHintHop]) -> LDKCVec_RouteHintHopZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_TxOutZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_RouteHintHopZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_TxOutZ_to_array(nativeType: LDKCVec_TxOutZ) -> [LDKTxOut] { - var array = [LDKTxOut]() + public class func LDKCVec_RouteHintHopZ_to_array(nativeType: LDKCVec_RouteHintHopZ) -> [LDKRouteHintHop] { + var array = [LDKRouteHintHop]() for index in 0.. LDKCVec_C2Tuple_usizeTransactionZZ { - /* DIMENSION_REDUCTION_PREP */ + public class func new_LDKCVec_TransactionZ(array: [[UInt8]]) -> LDKCVec_TransactionZ { + + var lowerDimension = [LDKTransaction]() + for currentEntry in array { + let convertedEntry = new_LDKTransaction(array: currentEntry) + lowerDimension.append(convertedEntry) + } + /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = lowerDimension.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) - dataContainer.initialize(from: array, count: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + dataContainer.initialize(from: lowerDimension, count: array.count) - let vector = LDKCVec_C2Tuple_usizeTransactionZZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_TransactionZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_C2Tuple_usizeTransactionZZ_to_array(nativeType: LDKCVec_C2Tuple_usizeTransactionZZ) -> [LDKC2Tuple_usizeTransactionZ] { - var array = [LDKC2Tuple_usizeTransactionZ]() + public class func LDKCVec_TransactionZ_to_array(nativeType: LDKCVec_TransactionZ) -> [[UInt8]] { + var array = [[UInt8]]() for index in 0.. LDKCVec_C2Tuple_u32ScriptZZ { + public class func new_LDKCVec_UpdateFulfillHTLCZ(array: [LDKUpdateFulfillHTLC]) -> LDKCVec_UpdateFulfillHTLCZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_C2Tuple_u32ScriptZZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_UpdateFulfillHTLCZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_C2Tuple_u32ScriptZZ_to_array(nativeType: LDKCVec_C2Tuple_u32ScriptZZ) -> [LDKC2Tuple_u32ScriptZ] { - var array = [LDKC2Tuple_u32ScriptZ]() + public class func LDKCVec_UpdateFulfillHTLCZ_to_array(nativeType: LDKCVec_UpdateFulfillHTLCZ) -> [LDKUpdateFulfillHTLC] { + var array = [LDKUpdateFulfillHTLC]() for index in 0.. LDKCVec_EventZ { + public class func new_LDKCVec_RouteHopZ(array: [LDKRouteHop]) -> LDKCVec_RouteHopZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_EventZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_RouteHopZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_EventZ_to_array(nativeType: LDKCVec_EventZ) -> [LDKEvent] { - var array = [LDKEvent]() + public class func LDKCVec_RouteHopZ_to_array(nativeType: LDKCVec_RouteHopZ) -> [LDKRouteHop] { + var array = [LDKRouteHop]() for index in 0.. LDKCVec_UpdateFailHTLCZ { + public class func new_LDKCVec_u8Z(array: [UInt8]) -> LDKCVec_u8Z { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_UpdateFailHTLCZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_u8Z(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_UpdateFailHTLCZ_to_array(nativeType: LDKCVec_UpdateFailHTLCZ) -> [LDKUpdateFailHTLC] { - var array = [LDKUpdateFailHTLC]() + public class func LDKCVec_u8Z_to_array(nativeType: LDKCVec_u8Z) -> [UInt8] { + var array = [UInt8]() for index in 0.. LDKCVec_UpdateFulfillHTLCZ { - /* DIMENSION_REDUCTION_PREP */ + public class func new_LDKCVec_CVec_RouteHopZZ(array: [[LDKRouteHop]]) -> LDKCVec_CVec_RouteHopZZ { + + var lowerDimension = [LDKCVec_RouteHopZ]() + for currentEntry in array { + let convertedEntry = new_LDKCVec_RouteHopZ(array: currentEntry) + lowerDimension.append(convertedEntry) + } + /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = lowerDimension.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) - dataContainer.initialize(from: array, count: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + dataContainer.initialize(from: lowerDimension, count: array.count) - let vector = LDKCVec_UpdateFulfillHTLCZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_CVec_RouteHopZZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_UpdateFulfillHTLCZ_to_array(nativeType: LDKCVec_UpdateFulfillHTLCZ) -> [LDKUpdateFulfillHTLC] { - var array = [LDKUpdateFulfillHTLC]() + public class func LDKCVec_CVec_RouteHopZZ_to_array(nativeType: LDKCVec_CVec_RouteHopZZ) -> [[LDKRouteHop]] { + var array = [[LDKRouteHop]]() for index in 0.. LDKCVec_RouteHintZ { + public class func new_LDKCVec_ChannelDetailsZ(array: [LDKChannelDetails]) -> LDKCVec_ChannelDetailsZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_RouteHintZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_ChannelDetailsZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_RouteHintZ_to_array(nativeType: LDKCVec_RouteHintZ) -> [LDKRouteHint] { - var array = [LDKRouteHint]() + public class func LDKCVec_ChannelDetailsZ_to_array(nativeType: LDKCVec_ChannelDetailsZ) -> [LDKChannelDetails] { + var array = [LDKChannelDetails]() for index in 0.. LDKCVec_C2Tuple_BlockHashChannelMonitorZZ { + public class func new_LDKCVec_C2Tuple_u32TxOutZZ(array: [LDKC2Tuple_u32TxOutZ]) -> LDKCVec_C2Tuple_u32TxOutZZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_C2Tuple_BlockHashChannelMonitorZZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_C2Tuple_u32TxOutZZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_C2Tuple_BlockHashChannelMonitorZZ_to_array(nativeType: LDKCVec_C2Tuple_BlockHashChannelMonitorZZ) -> [LDKC2Tuple_BlockHashChannelMonitorZ] { - var array = [LDKC2Tuple_BlockHashChannelMonitorZ]() + public class func LDKCVec_C2Tuple_u32TxOutZZ_to_array(nativeType: LDKCVec_C2Tuple_u32TxOutZZ) -> [LDKC2Tuple_u32TxOutZ] { + var array = [LDKC2Tuple_u32TxOutZ]() for index in 0.. LDKCVec_RouteHintHopZ { - /* DIMENSION_REDUCTION_PREP */ + public class func new_LDKCVec_PublicKeyZ(array: [[UInt8]]) -> LDKCVec_PublicKeyZ { + + var lowerDimension = [LDKPublicKey]() + for currentEntry in array { + let convertedEntry = new_LDKPublicKey(array: currentEntry) + lowerDimension.append(convertedEntry) + } + /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = lowerDimension.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) - dataContainer.initialize(from: array, count: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + dataContainer.initialize(from: lowerDimension, count: array.count) - let vector = LDKCVec_RouteHintHopZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_PublicKeyZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_RouteHintHopZ_to_array(nativeType: LDKCVec_RouteHintHopZ) -> [LDKRouteHintHop] { - var array = [LDKRouteHintHop]() + public class func LDKCVec_PublicKeyZ_to_array(nativeType: LDKCVec_PublicKeyZ) -> [[UInt8]] { + var array = [[UInt8]]() for index in 0.. LDKCVec_UpdateAddHTLCZ { - /* DIMENSION_REDUCTION_PREP */ + public class func new_LDKCVec_SignatureZ(array: [[UInt8]]) -> LDKCVec_SignatureZ { + + var lowerDimension = [LDKSignature]() + for currentEntry in array { + let convertedEntry = new_LDKSignature(array: currentEntry) + lowerDimension.append(convertedEntry) + } + /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = lowerDimension.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) - dataContainer.initialize(from: array, count: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + dataContainer.initialize(from: lowerDimension, count: array.count) - let vector = LDKCVec_UpdateAddHTLCZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_SignatureZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_UpdateAddHTLCZ_to_array(nativeType: LDKCVec_UpdateAddHTLCZ) -> [LDKUpdateAddHTLC] { - var array = [LDKUpdateAddHTLC]() + public class func LDKCVec_SignatureZ_to_array(nativeType: LDKCVec_SignatureZ) -> [[UInt8]] { + var array = [[UInt8]]() for index in 0.. LDKCVec_TransactionOutputsZ { + public class func new_LDKCVec_MonitorEventZ(array: [LDKMonitorEvent]) -> LDKCVec_MonitorEventZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_TransactionOutputsZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_MonitorEventZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_TransactionOutputsZ_to_array(nativeType: LDKCVec_TransactionOutputsZ) -> [LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ] { - var array = [LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ]() + public class func LDKCVec_MonitorEventZ_to_array(nativeType: LDKCVec_MonitorEventZ) -> [LDKMonitorEvent] { + var array = [LDKMonitorEvent]() for index in 0.. LDKCVec_NodeAnnouncementZ { + public class func new_LDKCVec_C2Tuple_usizeTransactionZZ(array: [LDKC2Tuple_usizeTransactionZ]) -> LDKCVec_C2Tuple_usizeTransactionZZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_NodeAnnouncementZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_C2Tuple_usizeTransactionZZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_NodeAnnouncementZ_to_array(nativeType: LDKCVec_NodeAnnouncementZ) -> [LDKNodeAnnouncement] { - var array = [LDKNodeAnnouncement]() + public class func LDKCVec_C2Tuple_usizeTransactionZZ_to_array(nativeType: LDKCVec_C2Tuple_usizeTransactionZZ) -> [LDKC2Tuple_usizeTransactionZ] { + var array = [LDKC2Tuple_usizeTransactionZ]() for index in 0.. LDKCVec_SpendableOutputDescriptorZ { + public class func new_LDKCVec_CResult_NoneAPIErrorZZ(array: [LDKCResult_NoneAPIErrorZ]) -> LDKCVec_CResult_NoneAPIErrorZZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_SpendableOutputDescriptorZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_CResult_NoneAPIErrorZZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_SpendableOutputDescriptorZ_to_array(nativeType: LDKCVec_SpendableOutputDescriptorZ) -> [LDKSpendableOutputDescriptor] { - var array = [LDKSpendableOutputDescriptor]() + public class func LDKCVec_CResult_NoneAPIErrorZZ_to_array(nativeType: LDKCVec_CResult_NoneAPIErrorZZ) -> [LDKCResult_NoneAPIErrorZ] { + var array = [LDKCResult_NoneAPIErrorZ]() for index in 0.. LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ { + public class func new_LDKCVec_APIErrorZ(array: [LDKAPIError]) -> LDKCVec_APIErrorZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_APIErrorZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_to_array(nativeType: LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ) -> [LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ] { - var array = [LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ]() + public class func LDKCVec_APIErrorZ_to_array(nativeType: LDKCVec_APIErrorZ) -> [LDKAPIError] { + var array = [LDKAPIError]() for index in 0.. LDKCVec_CVec_u8ZZ { - - var lowerDimension = [LDKCVec_u8Z]() - for currentEntry in array { - let convertedEntry = new_LDKCVec_u8Z(array: currentEntry) - lowerDimension.append(convertedEntry) - } - + public class func new_LDKCVec_UpdateFailMalformedHTLCZ(array: [LDKUpdateFailMalformedHTLC]) -> LDKCVec_UpdateFailMalformedHTLCZ { + /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = lowerDimension.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) - dataContainer.initialize(from: lowerDimension, count: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_CVec_u8ZZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_UpdateFailMalformedHTLCZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_CVec_u8ZZ_to_array(nativeType: LDKCVec_CVec_u8ZZ) -> [[UInt8]] { - var array = [[UInt8]]() + public class func LDKCVec_UpdateFailMalformedHTLCZ_to_array(nativeType: LDKCVec_UpdateFailMalformedHTLCZ) -> [LDKUpdateFailMalformedHTLC] { + var array = [LDKUpdateFailMalformedHTLC]() for index in 0.. LDKCVec_CResult_NoneAPIErrorZZ { + public class func new_LDKCVec_UpdateFailHTLCZ(array: [LDKUpdateFailHTLC]) -> LDKCVec_UpdateFailHTLCZ { /* DIMENSION_REDUCTION_PREP */ /* - let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in - let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) + let dataContainer = array.withUnsafeBufferPointer { (pointer: UnsafeBufferPointer) -> UnsafeMutablePointer in + let mutablePointer = UnsafeMutablePointer(mutating: pointer.baseAddress!) return mutablePointer } */ - let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) + let dataContainer = UnsafeMutablePointer.allocate(capacity: array.count) dataContainer.initialize(from: array, count: array.count) - let vector = LDKCVec_CResult_NoneAPIErrorZZ(data: dataContainer, datalen: UInt(array.count)) + let vector = LDKCVec_UpdateFailHTLCZ(data: dataContainer, datalen: UInt(array.count)) return vector } /* SWIFT_TO_RUST_END */ /* RUST_TO_SWIFT_START */ - public class func LDKCVec_CResult_NoneAPIErrorZZ_to_array(nativeType: LDKCVec_CResult_NoneAPIErrorZZ) -> [LDKCResult_NoneAPIErrorZ] { - var array = [LDKCResult_NoneAPIErrorZ]() + public class func LDKCVec_UpdateFailHTLCZ_to_array(nativeType: LDKCVec_UpdateFailHTLCZ) -> [LDKUpdateFailHTLC] { + var array = [LDKUpdateFailHTLC]() for index in 0.. String { + + return + Bindings.LDKStr_to_string(nativeType: _ldk_get_compiled_version()) + + + } + public class func swift_ldk_c_bindings_get_compiled_version() -> String { + + return + Bindings.LDKStr_to_string(nativeType: _ldk_c_bindings_get_compiled_version()) + + + } + public class func swift_sign(msg: [UInt8], sk: [UInt8]) -> Result_StringErrorZ { + + return + Result_StringErrorZ(pointer: sign(Bindings.new_LDKu8slice(array: msg), Bindings.new_LDKSecretKey(array: sk))) + + + } + public class func swift_recover_pk(msg: [UInt8], sig: String) -> Result_PublicKeyErrorZ { + + return + Result_PublicKeyErrorZ(pointer: recover_pk(Bindings.new_LDKu8slice(array: msg), Bindings.new_LDKStr(string: sig))) + + + } + public class func swift_verify(msg: [UInt8], sig: String, pk: [UInt8]) -> Bool { + + return + verify(Bindings.new_LDKu8slice(array: msg), Bindings.new_LDKStr(string: sig), Bindings.new_LDKPublicKey(array: pk)) + + + } + public class func swift_C2Tuple_BlockHashChannelMonitorZ_read(ser: [UInt8], arg: KeysInterface) -> Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ { + + return withUnsafePointer(to: arg.cOpaqueStruct!) { (argPointer: UnsafePointer) in + + Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ(pointer: C2Tuple_BlockHashChannelMonitorZ_read(Bindings.new_LDKu8slice(array: ser), argPointer)) + +} + + } + public class func swift_C2Tuple_BlockHashChannelManagerZ_read(ser: [UInt8], arg: ChannelManagerReadArgs) -> Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ { + + return + Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ(pointer: C2Tuple_BlockHashChannelManagerZ_read(Bindings.new_LDKu8slice(array: ser), arg.cOpaqueStruct!)) + + + } + public class func swift_Result_read(ser: [UInt8]) -> Result_CResult_NetAddressu8ZDecodeErrorZ { + + return + Result_CResult_NetAddressu8ZDecodeErrorZ(pointer: Result_read(Bindings.new_LDKu8slice(array: ser))) + + + } + public class func swift_build_commitment_secret(commitment_seed: [UInt8], idx: UInt64) -> [UInt8] { + + return withUnsafePointer(to: Bindings.array_to_tuple32(array: commitment_seed)) { (commitment_seedPointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in + + Bindings.LDKThirtyTwoBytes_to_array(nativeType: build_commitment_secret(commitment_seedPointer, idx)) + +} + + } + public class func swift_derive_private_key(per_commitment_point: [UInt8], base_secret: [UInt8]) -> Result_SecretKeyErrorZ { + + return withUnsafePointer(to: Bindings.array_to_tuple32(array: base_secret)) { (base_secretPointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in + + Result_SecretKeyErrorZ(pointer: derive_private_key(Bindings.new_LDKPublicKey(array: per_commitment_point), base_secretPointer)) + +} + + } + public class func swift_derive_public_key(per_commitment_point: [UInt8], base_point: [UInt8]) -> Result_PublicKeyErrorZ { + + return + Result_PublicKeyErrorZ(pointer: derive_public_key(Bindings.new_LDKPublicKey(array: per_commitment_point), Bindings.new_LDKPublicKey(array: base_point))) + + + } + public class func swift_derive_private_revocation_key(per_commitment_secret: [UInt8], countersignatory_revocation_base_secret: [UInt8]) -> Result_SecretKeyErrorZ { + + return withUnsafePointer(to: Bindings.array_to_tuple32(array: per_commitment_secret)) { (per_commitment_secretPointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in +withUnsafePointer(to: Bindings.array_to_tuple32(array: countersignatory_revocation_base_secret)) { (countersignatory_revocation_base_secretPointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in + + Result_SecretKeyErrorZ(pointer: derive_private_revocation_key(per_commitment_secretPointer, countersignatory_revocation_base_secretPointer)) + +} +} + + } + public class func swift_derive_public_revocation_key(per_commitment_point: [UInt8], countersignatory_revocation_base_point: [UInt8]) -> Result_PublicKeyErrorZ { + + return + Result_PublicKeyErrorZ(pointer: derive_public_revocation_key(Bindings.new_LDKPublicKey(array: per_commitment_point), Bindings.new_LDKPublicKey(array: countersignatory_revocation_base_point))) + + + } + public class func swift_get_revokeable_redeemscript(revocation_key: [UInt8], contest_delay: UInt16, broadcaster_delayed_payment_key: [UInt8]) -> [UInt8] { + + return + Bindings.LDKCVec_u8Z_to_array(nativeType: get_revokeable_redeemscript(Bindings.new_LDKPublicKey(array: revocation_key), contest_delay, Bindings.new_LDKPublicKey(array: broadcaster_delayed_payment_key))) + + + } + public class func swift_get_htlc_redeemscript(htlc: HTLCOutputInCommitment, keys: TxCreationKeys) -> [UInt8] { + + return withUnsafePointer(to: htlc.cOpaqueStruct!) { (htlcPointer: UnsafePointer) in +withUnsafePointer(to: keys.cOpaqueStruct!) { (keysPointer: UnsafePointer) in + + Bindings.LDKCVec_u8Z_to_array(nativeType: get_htlc_redeemscript(htlcPointer, keysPointer)) + +} +} + + } + public class func swift_make_funding_redeemscript(broadcaster: [UInt8], countersignatory: [UInt8]) -> [UInt8] { + + return + Bindings.LDKCVec_u8Z_to_array(nativeType: make_funding_redeemscript(Bindings.new_LDKPublicKey(array: broadcaster), Bindings.new_LDKPublicKey(array: countersignatory))) + + + } + public class func swift_build_htlc_transaction(prev_hash: [UInt8], feerate_per_kw: UInt32, contest_delay: UInt16, htlc: HTLCOutputInCommitment, broadcaster_delayed_payment_key: [UInt8], revocation_key: [UInt8]) -> [UInt8] { + + return withUnsafePointer(to: Bindings.array_to_tuple32(array: prev_hash)) { (prev_hashPointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in +withUnsafePointer(to: htlc.cOpaqueStruct!) { (htlcPointer: UnsafePointer) in + + Bindings.LDKTransaction_to_array(nativeType: build_htlc_transaction(prev_hashPointer, feerate_per_kw, contest_delay, htlcPointer, Bindings.new_LDKPublicKey(array: broadcaster_delayed_payment_key), Bindings.new_LDKPublicKey(array: revocation_key))) + +} +} + + } + public class func swift_get_commitment_transaction_number_obscure_factor(broadcaster_payment_basepoint: [UInt8], countersignatory_payment_basepoint: [UInt8], outbound_from_broadcaster: Bool) -> UInt64 { + + return + get_commitment_transaction_number_obscure_factor(Bindings.new_LDKPublicKey(array: broadcaster_payment_basepoint), Bindings.new_LDKPublicKey(array: countersignatory_payment_basepoint), outbound_from_broadcaster) + + + } + public class func swift_check_platform() -> Void { + + + check_platform() + + + } + public class func swift_create_invoice_from_channelmanager(channelmanager: ChannelManager, keys_manager: KeysInterface, network: LDKCurrency, amt_msat: Option_u64Z, description: String) -> Result_InvoiceSignOrCreationErrorZ { + + return withUnsafePointer(to: channelmanager.cOpaqueStruct!) { (channelmanagerPointer: UnsafePointer) in + + Result_InvoiceSignOrCreationErrorZ(pointer: create_invoice_from_channelmanager(channelmanagerPointer, keys_manager.cOpaqueStruct!, network, amt_msat.cOpaqueStruct!, Bindings.new_LDKStr(string: description))) + +} + + } + + /* STATIC_METHODS_END */ + public class func instanceToPointer(instance: AnyObject) -> UnsafeMutableRawPointer { Unmanaged.passUnretained(instance).toOpaque() } @@ -1405,6 +1569,15 @@ public class Bindings{ } } + public class func getRoute(our_node_id: [UInt8], network: NetworkGraph, payee: [UInt8], payee_features: InvoiceFeatures, first_hops: [LDKChannelDetails], last_hops: [LDKRouteHintHop], final_value_msat: UInt64, final_cltv: UInt32, logger: Logger) -> Result_RouteLightningErrorZ { + return withUnsafePointer(to: network.cOpaqueStruct!) { (networkPointer: UnsafePointer) in + var mutableHops = Bindings.new_LDKCVec_ChannelDetailsZ(array: first_hops) + return withUnsafeMutablePointer(to: &mutableHops) { (first_hopsPointer) in + Result_RouteLightningErrorZ(pointer: get_route(Bindings.new_LDKPublicKey(array: our_node_id), networkPointer, Bindings.new_LDKPublicKey(array: payee), payee_features.cOpaqueStruct!, first_hopsPointer, Bindings.new_LDKCVec_RouteHintHopZ(array: last_hops), final_value_msat, final_cltv, logger.cOpaqueStruct!)) + } + } + } + } public class TxOut { diff --git a/bindings/LDK/structs/ChainParameters.swift b/bindings/LDK/structs/ChainParameters.swift index 0d6ecdff..fc1de6ff 100644 --- a/bindings/LDK/structs/ChainParameters.swift +++ b/bindings/LDK/structs/ChainParameters.swift @@ -45,6 +45,13 @@ ChainParameters_get_best_block(this_ptrPointer) return ChainParameters_set_best_block(this_ptrPointer, val.cOpaqueStruct!); } + public func clone(orig: ChainParameters) -> ChainParameters { + + return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in +ChainParameters(pointer: ChainParameters_clone(origPointer)) +}; + } + deinit { if self.cOpaqueStruct?.is_owned == false { diff --git a/bindings/LDK/structs/ChannelDetails.swift b/bindings/LDK/structs/ChannelDetails.swift index 54282b88..3dff86b5 100644 --- a/bindings/LDK/structs/ChannelDetails.swift +++ b/bindings/LDK/structs/ChannelDetails.swift @@ -25,6 +25,21 @@ ChannelDetails_get_channel_id(this_ptrPointer) return ChannelDetails_set_channel_id(this_ptrPointer, Bindings.new_LDKThirtyTwoBytes(array: val)); } + public func get_funding_txo() -> OutPoint { + + return OutPoint(pointer: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer) in +ChannelDetails_get_funding_txo(this_ptrPointer) +}); + } + + public func set_funding_txo(val: OutPoint) -> Void { + + let this_ptrPointer = UnsafeMutablePointer.allocate(capacity: 1) + this_ptrPointer.initialize(to: self.cOpaqueStruct!) + + return ChannelDetails_set_funding_txo(this_ptrPointer, val.cOpaqueStruct!); + } + public func get_short_channel_id() -> Option_u64Z { return Option_u64Z(pointer: withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer) in @@ -130,19 +145,64 @@ ChannelDetails_get_inbound_capacity_msat(this_ptrPointer) return ChannelDetails_set_inbound_capacity_msat(this_ptrPointer, val); } - public func get_is_live() -> Bool { + public func get_is_outbound() -> Bool { + + return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer) in +ChannelDetails_get_is_outbound(this_ptrPointer) +}; + } + + public func set_is_outbound(val: Bool) -> Void { + + let this_ptrPointer = UnsafeMutablePointer.allocate(capacity: 1) + this_ptrPointer.initialize(to: self.cOpaqueStruct!) + + return ChannelDetails_set_is_outbound(this_ptrPointer, val); + } + + public func get_is_funding_locked() -> Bool { + + return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer) in +ChannelDetails_get_is_funding_locked(this_ptrPointer) +}; + } + + public func set_is_funding_locked(val: Bool) -> Void { + + let this_ptrPointer = UnsafeMutablePointer.allocate(capacity: 1) + this_ptrPointer.initialize(to: self.cOpaqueStruct!) + + return ChannelDetails_set_is_funding_locked(this_ptrPointer, val); + } + + public func get_is_usable() -> Bool { + + return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer) in +ChannelDetails_get_is_usable(this_ptrPointer) +}; + } + + public func set_is_usable(val: Bool) -> Void { + + let this_ptrPointer = UnsafeMutablePointer.allocate(capacity: 1) + this_ptrPointer.initialize(to: self.cOpaqueStruct!) + + return ChannelDetails_set_is_usable(this_ptrPointer, val); + } + + public func get_is_public() -> Bool { return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer) in -ChannelDetails_get_is_live(this_ptrPointer) +ChannelDetails_get_is_public(this_ptrPointer) }; } - public func set_is_live(val: Bool) -> Void { + public func set_is_public(val: Bool) -> Void { let this_ptrPointer = UnsafeMutablePointer.allocate(capacity: 1) this_ptrPointer.initialize(to: self.cOpaqueStruct!) - return ChannelDetails_set_is_live(this_ptrPointer, val); + return ChannelDetails_set_is_public(this_ptrPointer, val); } public func clone(orig: ChannelDetails) -> ChannelDetails { diff --git a/bindings/LDK/structs/ChannelFeatures.swift b/bindings/LDK/structs/ChannelFeatures.swift index e20aad10..321bc3f6 100644 --- a/bindings/LDK/structs/ChannelFeatures.swift +++ b/bindings/LDK/structs/ChannelFeatures.swift @@ -15,6 +15,15 @@ public class ChannelFeatures { /* STRUCT_METHODS_START */ + public func eq(a: ChannelFeatures, b: ChannelFeatures) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +ChannelFeatures_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: ChannelFeatures) -> ChannelFeatures { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/ChannelHandshakeLimits.swift b/bindings/LDK/structs/ChannelHandshakeLimits.swift index 180d5436..e17dee81 100644 --- a/bindings/LDK/structs/ChannelHandshakeLimits.swift +++ b/bindings/LDK/structs/ChannelHandshakeLimits.swift @@ -90,36 +90,6 @@ ChannelHandshakeLimits_get_min_max_accepted_htlcs(this_ptrPointer) return ChannelHandshakeLimits_set_min_max_accepted_htlcs(this_ptrPointer, val); } - public func get_min_dust_limit_satoshis() -> UInt64 { - - return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer) in -ChannelHandshakeLimits_get_min_dust_limit_satoshis(this_ptrPointer) -}; - } - - public func set_min_dust_limit_satoshis(val: UInt64) -> Void { - - let this_ptrPointer = UnsafeMutablePointer.allocate(capacity: 1) - this_ptrPointer.initialize(to: self.cOpaqueStruct!) - - return ChannelHandshakeLimits_set_min_dust_limit_satoshis(this_ptrPointer, val); - } - - public func get_max_dust_limit_satoshis() -> UInt64 { - - return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer) in -ChannelHandshakeLimits_get_max_dust_limit_satoshis(this_ptrPointer) -}; - } - - public func set_max_dust_limit_satoshis(val: UInt64) -> Void { - - let this_ptrPointer = UnsafeMutablePointer.allocate(capacity: 1) - this_ptrPointer.initialize(to: self.cOpaqueStruct!) - - return ChannelHandshakeLimits_set_max_dust_limit_satoshis(this_ptrPointer, val); - } - public func get_max_minimum_depth() -> UInt32 { return withUnsafePointer(to: self.cOpaqueStruct!) { (this_ptrPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/DelayedPaymentOutputDescriptor.swift b/bindings/LDK/structs/DelayedPaymentOutputDescriptor.swift index 902daa3b..cf4cdea8 100644 --- a/bindings/LDK/structs/DelayedPaymentOutputDescriptor.swift +++ b/bindings/LDK/structs/DelayedPaymentOutputDescriptor.swift @@ -120,6 +120,18 @@ DelayedPaymentOutputDescriptor(pointer: DelayedPaymentOutputDescriptor_clone(ori }; } + public func write(obj: DelayedPaymentOutputDescriptor) -> [UInt8] { + + return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer) in +DelayedPaymentOutputDescriptor_write(objPointer) +}); + } + + public func read(ser: [UInt8]) -> Result_DelayedPaymentOutputDescriptorDecodeErrorZ { + + return Result_DelayedPaymentOutputDescriptorDecodeErrorZ(pointer: DelayedPaymentOutputDescriptor_read(Bindings.new_LDKu8slice(array: ser))); + } + deinit { if self.cOpaqueStruct?.is_owned == false { diff --git a/bindings/LDK/structs/Description.swift b/bindings/LDK/structs/Description.swift index 89574f07..1b61b53a 100644 --- a/bindings/LDK/structs/Description.swift +++ b/bindings/LDK/structs/Description.swift @@ -10,6 +10,15 @@ public class Description { /* STRUCT_METHODS_START */ + public func eq(a: Description, b: Description) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +Description_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: Description) -> Description { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/ExpiryTime.swift b/bindings/LDK/structs/ExpiryTime.swift index 8b4c2f0a..61f4548b 100644 --- a/bindings/LDK/structs/ExpiryTime.swift +++ b/bindings/LDK/structs/ExpiryTime.swift @@ -10,6 +10,15 @@ public class ExpiryTime { /* STRUCT_METHODS_START */ + public func eq(a: ExpiryTime, b: ExpiryTime) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +ExpiryTime_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: ExpiryTime) -> ExpiryTime { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/InitFeatures.swift b/bindings/LDK/structs/InitFeatures.swift index b362041b..041a0643 100644 --- a/bindings/LDK/structs/InitFeatures.swift +++ b/bindings/LDK/structs/InitFeatures.swift @@ -15,6 +15,15 @@ public class InitFeatures { /* STRUCT_METHODS_START */ + public func eq(a: InitFeatures, b: InitFeatures) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +InitFeatures_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: InitFeatures) -> InitFeatures { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in @@ -22,6 +31,13 @@ InitFeatures(pointer: InitFeatures_clone(origPointer)) }; } + public func supports_payment_secret() -> Bool { + + return withUnsafePointer(to: self.cOpaqueStruct!) { (this_argPointer: UnsafePointer) in +InitFeatures_supports_payment_secret(this_argPointer) +}; + } + public func write(obj: InitFeatures) -> [UInt8] { return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/Invoice.swift b/bindings/LDK/structs/Invoice.swift index aa8b371e..74b1e1a8 100644 --- a/bindings/LDK/structs/Invoice.swift +++ b/bindings/LDK/structs/Invoice.swift @@ -10,6 +10,15 @@ public class Invoice { /* STRUCT_METHODS_START */ + public func eq(a: Invoice, b: Invoice) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +Invoice_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: Invoice) -> Invoice { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/InvoiceFeatures.swift b/bindings/LDK/structs/InvoiceFeatures.swift index da7b0904..a9c2f3f5 100644 --- a/bindings/LDK/structs/InvoiceFeatures.swift +++ b/bindings/LDK/structs/InvoiceFeatures.swift @@ -15,6 +15,15 @@ public class InvoiceFeatures { /* STRUCT_METHODS_START */ + public func eq(a: InvoiceFeatures, b: InvoiceFeatures) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +InvoiceFeatures_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: InvoiceFeatures) -> InvoiceFeatures { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in @@ -22,6 +31,13 @@ InvoiceFeatures(pointer: InvoiceFeatures_clone(origPointer)) }; } + public func supports_payment_secret() -> Bool { + + return withUnsafePointer(to: self.cOpaqueStruct!) { (this_argPointer: UnsafePointer) in +InvoiceFeatures_supports_payment_secret(this_argPointer) +}; + } + public func write(obj: InvoiceFeatures) -> [UInt8] { return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/InvoiceSignature.swift b/bindings/LDK/structs/InvoiceSignature.swift index 3b5ff765..aa29af56 100644 --- a/bindings/LDK/structs/InvoiceSignature.swift +++ b/bindings/LDK/structs/InvoiceSignature.swift @@ -10,6 +10,15 @@ public class InvoiceSignature { /* STRUCT_METHODS_START */ + public func eq(a: InvoiceSignature, b: InvoiceSignature) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +InvoiceSignature_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: InvoiceSignature) -> InvoiceSignature { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/MinFinalCltvExpiry.swift b/bindings/LDK/structs/MinFinalCltvExpiry.swift index d2ab62db..2aac3234 100644 --- a/bindings/LDK/structs/MinFinalCltvExpiry.swift +++ b/bindings/LDK/structs/MinFinalCltvExpiry.swift @@ -10,6 +10,15 @@ public class MinFinalCltvExpiry { /* STRUCT_METHODS_START */ + public func eq(a: MinFinalCltvExpiry, b: MinFinalCltvExpiry) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +MinFinalCltvExpiry_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: MinFinalCltvExpiry) -> MinFinalCltvExpiry { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/NodeFeatures.swift b/bindings/LDK/structs/NodeFeatures.swift index 9ed17655..1823fed5 100644 --- a/bindings/LDK/structs/NodeFeatures.swift +++ b/bindings/LDK/structs/NodeFeatures.swift @@ -15,6 +15,15 @@ public class NodeFeatures { /* STRUCT_METHODS_START */ + public func eq(a: NodeFeatures, b: NodeFeatures) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +NodeFeatures_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: NodeFeatures) -> NodeFeatures { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in @@ -22,6 +31,13 @@ NodeFeatures(pointer: NodeFeatures_clone(origPointer)) }; } + public func supports_payment_secret() -> Bool { + + return withUnsafePointer(to: self.cOpaqueStruct!) { (this_argPointer: UnsafePointer) in +NodeFeatures_supports_payment_secret(this_argPointer) +}; + } + public func write(obj: NodeFeatures) -> [UInt8] { return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/OutPoint.swift b/bindings/LDK/structs/OutPoint.swift index 0d6b0ffb..b2800efe 100644 --- a/bindings/LDK/structs/OutPoint.swift +++ b/bindings/LDK/structs/OutPoint.swift @@ -52,6 +52,22 @@ OutPoint(pointer: OutPoint_clone(origPointer)) }; } + public func eq(a: OutPoint, b: OutPoint) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +OutPoint_eq(aPointer, bPointer) +} +}; + } + + public func hash(o: OutPoint) -> UInt64 { + + return withUnsafePointer(to: o.cOpaqueStruct!) { (oPointer: UnsafePointer) in +OutPoint_hash(oPointer) +}; + } + public func to_channel_id() -> [UInt8] { return Bindings.LDKThirtyTwoBytes_to_array(nativeType: withUnsafePointer(to: self.cOpaqueStruct!) { (this_argPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/PayeePubKey.swift b/bindings/LDK/structs/PayeePubKey.swift index b2a4e12f..f5c7318c 100644 --- a/bindings/LDK/structs/PayeePubKey.swift +++ b/bindings/LDK/structs/PayeePubKey.swift @@ -10,6 +10,15 @@ public class PayeePubKey { /* STRUCT_METHODS_START */ + public func eq(a: PayeePubKey, b: PayeePubKey) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +PayeePubKey_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: PayeePubKey) -> PayeePubKey { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/PositiveTimestamp.swift b/bindings/LDK/structs/PositiveTimestamp.swift index 60b04baa..eb92dc85 100644 --- a/bindings/LDK/structs/PositiveTimestamp.swift +++ b/bindings/LDK/structs/PositiveTimestamp.swift @@ -10,6 +10,15 @@ public class PositiveTimestamp { /* STRUCT_METHODS_START */ + public func eq(a: PositiveTimestamp, b: PositiveTimestamp) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +PositiveTimestamp_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: PositiveTimestamp) -> PositiveTimestamp { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/RawDataPart.swift b/bindings/LDK/structs/RawDataPart.swift index 3daeaf1b..45f8afcb 100644 --- a/bindings/LDK/structs/RawDataPart.swift +++ b/bindings/LDK/structs/RawDataPart.swift @@ -25,6 +25,15 @@ RawDataPart_get_timestamp(this_ptrPointer) return RawDataPart_set_timestamp(this_ptrPointer, val.cOpaqueStruct!); } + public func eq(a: RawDataPart, b: RawDataPart) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +RawDataPart_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: RawDataPart) -> RawDataPart { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/RawInvoice.swift b/bindings/LDK/structs/RawInvoice.swift index 8abebd4c..04a9750f 100644 --- a/bindings/LDK/structs/RawInvoice.swift +++ b/bindings/LDK/structs/RawInvoice.swift @@ -25,6 +25,15 @@ RawInvoice_get_data(this_ptrPointer) return RawInvoice_set_data(this_ptrPointer, val.cOpaqueStruct!); } + public func eq(a: RawInvoice, b: RawInvoice) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +RawInvoice_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: RawInvoice) -> RawInvoice { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/RouteHint.swift b/bindings/LDK/structs/RouteHint.swift index 0f5d71c1..bceb4291 100644 --- a/bindings/LDK/structs/RouteHint.swift +++ b/bindings/LDK/structs/RouteHint.swift @@ -10,6 +10,15 @@ public class RouteHint { /* STRUCT_METHODS_START */ + public func eq(a: RouteHint, b: RouteHint) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +RouteHint_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: RouteHint) -> RouteHint { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/RouteHintHop.swift b/bindings/LDK/structs/RouteHintHop.swift index 6984c87f..c7f0ac29 100644 --- a/bindings/LDK/structs/RouteHintHop.swift +++ b/bindings/LDK/structs/RouteHintHop.swift @@ -105,6 +105,15 @@ RouteHintHop_get_htlc_maximum_msat(this_ptrPointer) return RouteHintHop_set_htlc_maximum_msat(this_ptrPointer, val.cOpaqueStruct!); } + public func eq(a: RouteHintHop, b: RouteHintHop) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +RouteHintHop_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: RouteHintHop) -> RouteHintHop { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/RouteHop.swift b/bindings/LDK/structs/RouteHop.swift index fddf5f64..525c05c9 100644 --- a/bindings/LDK/structs/RouteHop.swift +++ b/bindings/LDK/structs/RouteHop.swift @@ -112,6 +112,18 @@ RouteHop(pointer: RouteHop_clone(origPointer)) }; } + public func write(obj: RouteHop) -> [UInt8] { + + return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer) in +RouteHop_write(objPointer) +}); + } + + public func read(ser: [UInt8]) -> Result_RouteHopDecodeErrorZ { + + return Result_RouteHopDecodeErrorZ(pointer: RouteHop_read(Bindings.new_LDKu8slice(array: ser))); + } + deinit { if self.cOpaqueStruct?.is_owned == false { diff --git a/bindings/LDK/structs/RoutingFees.swift b/bindings/LDK/structs/RoutingFees.swift index 873eb492..b14b36d5 100644 --- a/bindings/LDK/structs/RoutingFees.swift +++ b/bindings/LDK/structs/RoutingFees.swift @@ -45,16 +45,20 @@ RoutingFees_get_proportional_millionths(this_ptrPointer) return RoutingFees_set_proportional_millionths(this_ptrPointer, val); } - public func clone(orig: RoutingFees) -> RoutingFees { + public func eq(a: RoutingFees, b: RoutingFees) -> Bool { - return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in -RoutingFees(pointer: RoutingFees_clone(origPointer)) + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +RoutingFees_eq(aPointer, bPointer) +} }; } - public func read(ser: [UInt8]) -> Result_RoutingFeesDecodeErrorZ { + public func clone(orig: RoutingFees) -> RoutingFees { - return Result_RoutingFeesDecodeErrorZ(pointer: RoutingFees_read(Bindings.new_LDKu8slice(array: ser))); + return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in +RoutingFees(pointer: RoutingFees_clone(origPointer)) +}; } public func write(obj: RoutingFees) -> [UInt8] { @@ -64,6 +68,11 @@ RoutingFees_write(objPointer) }); } + public func read(ser: [UInt8]) -> Result_RoutingFeesDecodeErrorZ { + + return Result_RoutingFeesDecodeErrorZ(pointer: RoutingFees_read(Bindings.new_LDKu8slice(array: ser))); + } + deinit { if self.cOpaqueStruct?.is_owned == false { diff --git a/bindings/LDK/structs/Sha256.swift b/bindings/LDK/structs/Sha256.swift index 01d8a986..da7a963c 100644 --- a/bindings/LDK/structs/Sha256.swift +++ b/bindings/LDK/structs/Sha256.swift @@ -10,6 +10,15 @@ public class Sha256 { /* STRUCT_METHODS_START */ + public func eq(a: Sha256, b: Sha256) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +Sha256_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: Sha256) -> Sha256 { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/SignedRawInvoice.swift b/bindings/LDK/structs/SignedRawInvoice.swift index a3185504..8e7764fd 100644 --- a/bindings/LDK/structs/SignedRawInvoice.swift +++ b/bindings/LDK/structs/SignedRawInvoice.swift @@ -10,6 +10,15 @@ public class SignedRawInvoice { /* STRUCT_METHODS_START */ + public func eq(a: SignedRawInvoice, b: SignedRawInvoice) -> Bool { + + return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer) in +withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer) in +SignedRawInvoice_eq(aPointer, bPointer) +} +}; + } + public func clone(orig: SignedRawInvoice) -> SignedRawInvoice { return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in diff --git a/bindings/LDK/structs/StaticPaymentOutputDescriptor.swift b/bindings/LDK/structs/StaticPaymentOutputDescriptor.swift index 339378c1..1cb9fed8 100644 --- a/bindings/LDK/structs/StaticPaymentOutputDescriptor.swift +++ b/bindings/LDK/structs/StaticPaymentOutputDescriptor.swift @@ -75,6 +75,18 @@ StaticPaymentOutputDescriptor(pointer: StaticPaymentOutputDescriptor_clone(origP }; } + public func write(obj: StaticPaymentOutputDescriptor) -> [UInt8] { + + return Bindings.LDKCVec_u8Z_to_array(nativeType: withUnsafePointer(to: obj.cOpaqueStruct!) { (objPointer: UnsafePointer) in +StaticPaymentOutputDescriptor_write(objPointer) +}); + } + + public func read(ser: [UInt8]) -> Result_StaticPaymentOutputDescriptorDecodeErrorZ { + + return Result_StaticPaymentOutputDescriptorDecodeErrorZ(pointer: StaticPaymentOutputDescriptor_read(Bindings.new_LDKu8slice(array: ser))); + } + deinit { if self.cOpaqueStruct?.is_owned == false { diff --git a/bindings/LDK/structs/WatchedOutput.swift b/bindings/LDK/structs/WatchedOutput.swift index 247a7762..1fe6116a 100644 --- a/bindings/LDK/structs/WatchedOutput.swift +++ b/bindings/LDK/structs/WatchedOutput.swift @@ -60,6 +60,20 @@ WatchedOutput_get_script_pubkey(this_ptrPointer) return WatchedOutput_set_script_pubkey(this_ptrPointer, Bindings.new_LDKCVec_u8Z(array: val)); } + public func clone(orig: WatchedOutput) -> WatchedOutput { + + return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer) in +WatchedOutput(pointer: WatchedOutput_clone(origPointer)) +}; + } + + public func hash(o: WatchedOutput) -> UInt64 { + + return withUnsafePointer(to: o.cOpaqueStruct!) { (oPointer: UnsafePointer) in +WatchedOutput_hash(oPointer) +}; + } + deinit { if self.cOpaqueStruct?.is_owned == false { diff --git a/bindings/LDK/traits/BaseSign.swift b/bindings/LDK/traits/BaseSign.swift index f6140260..7081418f 100644 --- a/bindings/LDK/traits/BaseSign.swift +++ b/bindings/LDK/traits/BaseSign.swift @@ -38,7 +38,18 @@ open class BaseSign { return instance.sign_holder_commitment_and_htlcs(commitment_tx: commitment_tx).cOpaqueStruct!; } - func sign_justice_transactionCallback(pointer: UnsafeRawPointer?, justice_tx: LDKTransaction, input: uintptr_t, amount: UInt64, per_commitment_keyPointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>?, htlcPointer: UnsafePointer) -> LDKCResult_SignatureNoneZ { + func sign_justice_revoked_outputCallback(pointer: UnsafeRawPointer?, justice_tx: LDKTransaction, input: uintptr_t, amount: UInt64, per_commitment_keyPointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>?) -> LDKCResult_SignatureNoneZ { + let instance: BaseSign = Bindings.pointerToInstance(pointer: pointer!) + + var per_commitment_key: [UInt8]? = nil + if let per_commitment_keyUnwrapped = per_commitment_keyPointer { + per_commitment_key = Bindings.tuple32_to_array(nativeType: per_commitment_keyUnwrapped.pointee) + } + + return instance.sign_justice_revoked_output(justice_tx: Bindings.LDKTransaction_to_array(nativeType: justice_tx), input: input, amount: amount, per_commitment_key: per_commitment_key).cOpaqueStruct!; + } + + func sign_justice_revoked_htlcCallback(pointer: UnsafeRawPointer?, justice_tx: LDKTransaction, input: uintptr_t, amount: UInt64, per_commitment_keyPointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>?, htlcPointer: UnsafePointer) -> LDKCResult_SignatureNoneZ { let instance: BaseSign = Bindings.pointerToInstance(pointer: pointer!) var per_commitment_key: [UInt8]? = nil @@ -47,7 +58,7 @@ open class BaseSign { } let htlc = HTLCOutputInCommitment(pointer: htlcPointer.pointee); - return instance.sign_justice_transaction(justice_tx: Bindings.LDKTransaction_to_array(nativeType: justice_tx), input: input, amount: amount, per_commitment_key: per_commitment_key, htlc: htlc).cOpaqueStruct!; + return instance.sign_justice_revoked_htlc(justice_tx: Bindings.LDKTransaction_to_array(nativeType: justice_tx), input: input, amount: amount, per_commitment_key: per_commitment_key, htlc: htlc).cOpaqueStruct!; } func sign_counterparty_htlc_transactionCallback(pointer: UnsafeRawPointer?, htlc_tx: LDKTransaction, input: uintptr_t, amount: UInt64, per_commitment_point: LDKPublicKey, htlcPointer: UnsafePointer) -> LDKCResult_SignatureNoneZ { @@ -93,7 +104,8 @@ open class BaseSign { channel_keys_id: channel_keys_idCallback, sign_counterparty_commitment: sign_counterparty_commitmentCallback, sign_holder_commitment_and_htlcs: sign_holder_commitment_and_htlcsCallback, - sign_justice_transaction: sign_justice_transactionCallback, + sign_justice_revoked_output: sign_justice_revoked_outputCallback, + sign_justice_revoked_htlc: sign_justice_revoked_htlcCallback, sign_counterparty_htlc_transaction: sign_counterparty_htlc_transactionCallback, sign_closing_transaction: sign_closing_transactionCallback, sign_channel_announcement: sign_channel_announcementCallback, @@ -132,7 +144,12 @@ open class BaseSign { return Result_C2Tuple_SignatureCVec_SignatureZZNoneZ(pointer: LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ()) } - open func sign_justice_transaction(justice_tx: [UInt8], input: UInt, amount: UInt64, per_commitment_key: [UInt8]?, htlc: HTLCOutputInCommitment) -> Result_SignatureNoneZ { + open func sign_justice_revoked_output(justice_tx: [UInt8], input: UInt, amount: UInt64, per_commitment_key: [UInt8]?) -> Result_SignatureNoneZ { + /* EDIT ME */ + return Result_SignatureNoneZ(pointer: LDKCResult_SignatureNoneZ()) + } + + open func sign_justice_revoked_htlc(justice_tx: [UInt8], input: UInt, amount: UInt64, per_commitment_key: [UInt8]?, htlc: HTLCOutputInCommitment) -> Result_SignatureNoneZ { /* EDIT ME */ return Result_SignatureNoneZ(pointer: LDKCResult_SignatureNoneZ()) } @@ -214,12 +231,22 @@ public class NativelyImplementedBaseSign: BaseSign { } - public override func sign_justice_transaction(justice_tx: [UInt8], input: UInt, amount: UInt64, per_commitment_key: [UInt8]?, htlc: HTLCOutputInCommitment) -> Result_SignatureNoneZ { + public override func sign_justice_revoked_output(justice_tx: [UInt8], input: UInt, amount: UInt64, per_commitment_key: [UInt8]?) -> Result_SignatureNoneZ { + + return withUnsafePointer(to: Bindings.array_to_tuple32(array: per_commitment_key!)) { (per_commitment_keyPointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in + + Result_SignatureNoneZ(pointer: self.cOpaqueStruct!.sign_justice_revoked_output(self.cOpaqueStruct!.this_arg, Bindings.new_LDKTransaction(array: justice_tx), input, amount, per_commitment_keyPointer)) + +} + + } + + public override func sign_justice_revoked_htlc(justice_tx: [UInt8], input: UInt, amount: UInt64, per_commitment_key: [UInt8]?, htlc: HTLCOutputInCommitment) -> Result_SignatureNoneZ { return withUnsafePointer(to: Bindings.array_to_tuple32(array: per_commitment_key!)) { (per_commitment_keyPointer: UnsafePointer<(UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8,UInt8)>) in withUnsafePointer(to: htlc.cOpaqueStruct!) { (htlcPointer: UnsafePointer) in - Result_SignatureNoneZ(pointer: self.cOpaqueStruct!.sign_justice_transaction(self.cOpaqueStruct!.this_arg, Bindings.new_LDKTransaction(array: justice_tx), input, amount, per_commitment_keyPointer, htlcPointer)) + Result_SignatureNoneZ(pointer: self.cOpaqueStruct!.sign_justice_revoked_htlc(self.cOpaqueStruct!.this_arg, Bindings.new_LDKTransaction(array: justice_tx), input, amount, per_commitment_keyPointer, htlcPointer)) } } diff --git a/bindings/LDK/traits/EventsProvider.swift b/bindings/LDK/traits/EventsProvider.swift index b07775a2..561245d1 100644 --- a/bindings/LDK/traits/EventsProvider.swift +++ b/bindings/LDK/traits/EventsProvider.swift @@ -6,10 +6,10 @@ open class EventsProvider { /* NATIVE_CALLBACKS_START */ - func get_and_clear_pending_eventsCallback(pointer: UnsafeRawPointer?) -> LDKCVec_EventZ { + func process_pending_eventsCallback(pointer: UnsafeRawPointer?, handler: LDKEventHandler) -> Void { let instance: EventsProvider = Bindings.pointerToInstance(pointer: pointer!) - return Bindings.new_LDKCVec_EventZ(array: instance.get_and_clear_pending_events()); + return instance.process_pending_events(handler: EventHandler(pointer: handler)); } func freeCallback(pointer: UnsafeMutableRawPointer?) -> Void { @@ -21,7 +21,7 @@ open class EventsProvider { /* NATIVE_CALLBACKS_END */ self.cOpaqueStruct = LDKEventsProvider(this_arg: Bindings.instanceToPointer(instance: self), - get_and_clear_pending_events: get_and_clear_pending_eventsCallback, + process_pending_events: process_pending_eventsCallback, free: freeCallback) } @@ -31,9 +31,9 @@ open class EventsProvider { /* SWIFT_CALLBACKS_START */ - open func get_and_clear_pending_events() -> [LDKEvent] { + open func process_pending_events(handler: EventHandler) -> Void { /* EDIT ME */ - return [LDKEvent]() + } open func free() -> Void { @@ -49,10 +49,10 @@ open class EventsProvider { public class NativelyImplementedEventsProvider: EventsProvider { /* SWIFT_DEFAULT_CALLBACKS_START */ - public override func get_and_clear_pending_events() -> [LDKEvent] { + public override func process_pending_events(handler: EventHandler) -> Void { - return - Bindings.LDKCVec_EventZ_to_array(nativeType: self.cOpaqueStruct!.get_and_clear_pending_events(self.cOpaqueStruct!.this_arg)) + + self.cOpaqueStruct!.process_pending_events(self.cOpaqueStruct!.this_arg, handler.cOpaqueStruct!) } diff --git a/bindings/LDK/tuples/C2Tuple_PaymentHashPaymentSecretZ.swift b/bindings/LDK/tuples/C2Tuple_PaymentHashPaymentSecretZ.swift index 2e7c9a6b..e382df23 100644 --- a/bindings/LDK/tuples/C2Tuple_PaymentHashPaymentSecretZ.swift +++ b/bindings/LDK/tuples/C2Tuple_PaymentHashPaymentSecretZ.swift @@ -8,6 +8,18 @@ public class C2Tuple_PaymentHashPaymentSecretZ { /* TUPLE_METHODS_START */ + public func clone(orig: C2Tuple_PaymentHashPaymentSecretZ) -> C2Tuple_PaymentHashPaymentSecretZ { + + + let origPointer = withUnsafePointer(to: orig.cOpaqueStruct!) { (pointer: UnsafePointer) in + + pointer + + } + + return C2Tuple_PaymentHashPaymentSecretZ(pointer: C2Tuple_PaymentHashPaymentSecretZ_clone(origPointer)); + } + public func new(a: [UInt8], b: [UInt8]) -> C2Tuple_PaymentHashPaymentSecretZ { return C2Tuple_PaymentHashPaymentSecretZ(pointer: C2Tuple_PaymentHashPaymentSecretZ_new(Bindings.new_LDKThirtyTwoBytes(array: a), Bindings.new_LDKThirtyTwoBytes(array: b))); diff --git a/bindings/LDK/tuples/C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift b/bindings/LDK/tuples/C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift index de89459a..a411a2f7 100644 --- a/bindings/LDK/tuples/C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift +++ b/bindings/LDK/tuples/C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift @@ -8,6 +8,18 @@ public class C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ { /* TUPLE_METHODS_START */ + public func clone(orig: C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ) -> C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ { + + + let origPointer = withUnsafePointer(to: orig.cOpaqueStruct!) { (pointer: UnsafePointer) in + + pointer + + } + + return C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ(pointer: C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(origPointer)); + } + public func new(a: [UInt8], b: [LDKC2Tuple_u32ScriptZ]) -> C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ { return C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ(pointer: C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(Bindings.new_LDKThirtyTwoBytes(array: a), Bindings.new_LDKCVec_C2Tuple_u32ScriptZZ(array: b))); diff --git a/bindings/LDK/tuples/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift b/bindings/LDK/tuples/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift index 25d3717b..329f5122 100644 --- a/bindings/LDK/tuples/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift +++ b/bindings/LDK/tuples/C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift @@ -8,6 +8,18 @@ public class C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ { /* TUPLE_METHODS_START */ + public func clone(orig: C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ) -> C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ { + + + let origPointer = withUnsafePointer(to: orig.cOpaqueStruct!) { (pointer: UnsafePointer) in + + pointer + + } + + return C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ(pointer: C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(origPointer)); + } + public func new(a: [UInt8], b: [LDKC2Tuple_u32TxOutZ]) -> C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ { return C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ(pointer: C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(Bindings.new_LDKThirtyTwoBytes(array: a), Bindings.new_LDKCVec_C2Tuple_u32TxOutZZ(array: b))); diff --git a/bindings/LDK/tuples/C2Tuple_usizeTransactionZ.swift b/bindings/LDK/tuples/C2Tuple_usizeTransactionZ.swift index b5ece334..52f69385 100644 --- a/bindings/LDK/tuples/C2Tuple_usizeTransactionZ.swift +++ b/bindings/LDK/tuples/C2Tuple_usizeTransactionZ.swift @@ -8,6 +8,18 @@ public class C2Tuple_usizeTransactionZ { /* TUPLE_METHODS_START */ + public func clone(orig: C2Tuple_usizeTransactionZ) -> C2Tuple_usizeTransactionZ { + + + let origPointer = withUnsafePointer(to: orig.cOpaqueStruct!) { (pointer: UnsafePointer) in + + pointer + + } + + return C2Tuple_usizeTransactionZ(pointer: C2Tuple_usizeTransactionZ_clone(origPointer)); + } + public func new(a: UInt, b: [UInt8]) -> C2Tuple_usizeTransactionZ { return C2Tuple_usizeTransactionZ(pointer: C2Tuple_usizeTransactionZ_new(a, Bindings.new_LDKTransaction(array: b))); diff --git a/bindings/LDK/tuples/C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift b/bindings/LDK/tuples/C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift index d167f9d7..918565be 100644 --- a/bindings/LDK/tuples/C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift +++ b/bindings/LDK/tuples/C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift @@ -8,6 +8,18 @@ public class C3Tuple_RawInvoice_u832InvoiceSignatureZ { /* TUPLE_METHODS_START */ + public func clone(orig: C3Tuple_RawInvoice_u832InvoiceSignatureZ) -> C3Tuple_RawInvoice_u832InvoiceSignatureZ { + + + let origPointer = withUnsafePointer(to: orig.cOpaqueStruct!) { (pointer: UnsafePointer) in + + pointer + + } + + return C3Tuple_RawInvoice_u832InvoiceSignatureZ(pointer: C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(origPointer)); + } + public func new(a: RawInvoice, b: [UInt8], c: InvoiceSignature) -> C3Tuple_RawInvoice_u832InvoiceSignatureZ { return C3Tuple_RawInvoice_u832InvoiceSignatureZ(pointer: C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(a.cOpaqueStruct!, Bindings.new_LDKThirtyTwoBytes(array: b), c.cOpaqueStruct!)); diff --git a/bindings/batteries/ChannelManagerConstructor.swift b/bindings/batteries/ChannelManagerConstructor.swift index 505e2527..645e9488 100644 --- a/bindings/batteries/ChannelManagerConstructor.swift +++ b/bindings/batteries/ChannelManagerConstructor.swift @@ -22,6 +22,11 @@ public class ChannelManagerConstructor { */ public let channel_manager_latest_block_hash: [UInt8]? + let logger: Logger + fileprivate var customPersister: CustomChannelManagerPersister? + fileprivate var customEventHandler: CustomEventHandler? + public let peerManager: PeerManager + /** * A list of ChannelMonitors and the last block they each saw. You should sync the blockchain on each individually * starting with the block that builds on the hash given. @@ -32,7 +37,7 @@ public class ChannelManagerConstructor { private let chain_monitor: ChainMonitor - public init(channel_manager_serialized: [UInt8], channel_monitors_serialized: [[UInt8]], keys_interface: KeysInterface, fee_estimator: FeeEstimator, chain_monitor: ChainMonitor, filter: Filter?, tx_broadcaster: BroadcasterInterface, logger: Logger) throws { + public init(channel_manager_serialized: [UInt8], channel_monitors_serialized: [[UInt8]], keys_interface: KeysInterface, fee_estimator: FeeEstimator, chain_monitor: ChainMonitor, filter: Filter?, router: NetGraphMsgHandler?, tx_broadcaster: BroadcasterInterface, logger: Logger) throws { var monitors: [LDKChannelMonitor] = [] self.channel_monitors = [] @@ -62,6 +67,16 @@ public class ChannelManagerConstructor { self.channelManager = channelManager self.channel_manager_latest_block_hash = latestBlockHash self.chain_monitor = chain_monitor + self.logger = logger + + let random_data = keys_interface.get_secure_random_bytes(); + if let router = router { + let messageHandler = MessageHandler(chan_handler_arg: channelManager.as_ChannelMessageHandler(), route_handler_arg: router.as_RoutingMessageHandler()) + self.peerManager = PeerManager(message_handler: messageHandler, our_node_secret: keys_interface.get_node_secret(), ephemeral_random_data: random_data, logger: self.logger) + } else { + let messageHandler = MessageHandler(chan_handler_arg: channelManager.as_ChannelMessageHandler(), route_handler_arg: IgnoringMessageHandler().as_RoutingMessageHandler()) + self.peerManager = PeerManager(message_handler: messageHandler, our_node_secret: keys_interface.get_node_secret(), ephemeral_random_data: random_data, logger: self.logger) + } if let filter = filter { for (currentMonitor, _) in self.channel_monitors { @@ -74,16 +89,27 @@ public class ChannelManagerConstructor { /** * Constructs a channel manager from the given interface implementations */ - public init(network: LDKNetwork, config: UserConfig, current_blockchain_tip_hash: [UInt8], current_blockchain_tip_height: UInt32, keys_interface: KeysInterface, fee_estimator: FeeEstimator, chain_monitor: ChainMonitor, tx_broadcaster: BroadcasterInterface, logger: Logger) { + public init(network: LDKNetwork, config: UserConfig, current_blockchain_tip_hash: [UInt8], current_blockchain_tip_height: UInt32, keys_interface: KeysInterface, fee_estimator: FeeEstimator, chain_monitor: ChainMonitor, router: NetGraphMsgHandler?, tx_broadcaster: BroadcasterInterface, logger: Logger) { self.channel_monitors = [] self.channel_manager_latest_block_hash = nil self.chain_monitor = chain_monitor let block = BestBlock(block_hash: current_blockchain_tip_hash, height: current_blockchain_tip_height) let chainParameters = ChainParameters(network_arg: network, best_block_arg: block) self.channelManager = ChannelManager(fee_est: fee_estimator, chain_monitor: chain_monitor.as_Watch(), tx_broadcaster: tx_broadcaster, logger: logger, keys_manager: keys_interface, config: config, params: chainParameters) + self.logger = logger + + let random_data = keys_interface.get_secure_random_bytes(); + if let router = router { + let messageHandler = MessageHandler(chan_handler_arg: channelManager.as_ChannelMessageHandler(), route_handler_arg: router.as_RoutingMessageHandler()) + self.peerManager = PeerManager(message_handler: messageHandler, our_node_secret: keys_interface.get_node_secret(), ephemeral_random_data: random_data, logger: self.logger) + } else { + let messageHandler = MessageHandler(chan_handler_arg: channelManager.as_ChannelMessageHandler(), route_handler_arg: IgnoringMessageHandler().as_RoutingMessageHandler()) + self.peerManager = PeerManager(message_handler: messageHandler, our_node_secret: keys_interface.get_node_secret(), ephemeral_random_data: random_data, logger: self.logger) + } } var persisterWorkItem: DispatchWorkItem? + var backgroundProcessor: BackgroundProcessor? var shutdown = false /** @@ -93,8 +119,9 @@ public class ChannelManagerConstructor { * This also spawns a background thread which will call the appropriate methods on the provided * ChannelManagerPersister as required. */ - public func chain_sync_completed(persister: ChannelManagerPersister) { - if self.persisterWorkItem != nil { + public func chain_sync_completed(persister: ExtendedChannelManagerPersister) { + + if self.backgroundProcessor != nil { return } @@ -110,65 +137,50 @@ public class ChannelManagerConstructor { } } - self.persisterWorkItem = DispatchWorkItem { - var lastTimerTick = NSDate().timeIntervalSince1970 - while !self.shutdown { - var needsPersist = self.channelManager.await_persistable_update_timeout(max_wait: 1) - - let managerEventsProvider = self.channelManager.as_EventsProvider() - let rawManagerEvents = managerEventsProvider.get_and_clear_pending_events() - - let managerEvents = rawManagerEvents.map { (e: LDKEvent) -> Event in - Event(pointer: e) - } - if managerEvents.count != 0 { - persister.handle_events(events: managerEvents) - needsPersist = true - } - - let monitorEventsProvider = self.chain_monitor.as_EventsProvider() - let rawMonitorEvents = monitorEventsProvider.get_and_clear_pending_events() - - let monitorEvents = rawMonitorEvents.map { (e: LDKEvent) -> Event in - Event(pointer: e) - } - if monitorEvents.count != 0 { - persister.handle_events(events: monitorEvents) - needsPersist = true - } - - if needsPersist { - persister.persist_manager(channel_manager_bytes: self.channelManager.write(obj: self.channelManager)) - } - - if self.shutdown { - return - } - - let currentTimerTick = NSDate().timeIntervalSince1970 - if lastTimerTick < (currentTimerTick-60) { // more than 60 seconds have passed since the last timer tick - self.channelManager.timer_tick_occurred() - lastTimerTick = currentTimerTick - } - - Thread.sleep(forTimeInterval: 1) // this should hopefully not suspend the main application - } - } + self.customPersister = CustomChannelManagerPersister(handler: persister) + self.customEventHandler = CustomEventHandler(handler: persister) + self.backgroundProcessor = BackgroundProcessor(persister: self.customPersister!, event_handler: self.customEventHandler!, chain_monitor: self.chain_monitor, channel_manager: self.channelManager, peer_manager: self.peerManager, logger: self.logger) + - let backgroundQueue = DispatchQueue(label: "org.ldk.ChannelManagerConstructor.persisterThread", qos: .background) - backgroundQueue.async(execute: self.persisterWorkItem!) } public func interrupt() { self.shutdown = true - if let workItem = self.persisterWorkItem { - workItem.wait() - } + self.backgroundProcessor?.stop() + } + +} + +fileprivate class CustomChannelManagerPersister: ChannelManagerPersister { + + let handler: ExtendedChannelManagerPersister + + init(handler: ExtendedChannelManagerPersister) { + self.handler = handler + super.init() + } + + override func persist_manager(channel_manager: ChannelManager) -> Result_NoneErrorZ { + return self.handler.persist_manager(channel_manager: channel_manager) + } +} + +fileprivate class CustomEventHandler: EventHandler { + + let handler: ExtendedChannelManagerPersister + + init(handler: ExtendedChannelManagerPersister) { + self.handler = handler + super.init() } + override func handle_event(event: Event) { + self.handler.handle_event(event: event) + } + + } -public protocol ChannelManagerPersister { - func handle_events(events: [Event]) -> Void; - func persist_manager(channel_manager_bytes: [UInt8]) -> Void; +public protocol ExtendedChannelManagerPersister: ChannelManagerPersister { + func handle_event(event: Event) -> Void; } diff --git a/input/lightning.h b/input/lightning.h index 63731e32..ee21e799 100644 --- a/input/lightning.h +++ b/input/lightning.h @@ -1,7 +1,7 @@ #ifndef LDK_C_BINDINGS_H #define LDK_C_BINDINGS_H -/* Generated with cbindgen:0.17.0 */ +/* Generated with cbindgen:0.19.0 */ /* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */ @@ -328,6 +328,14 @@ typedef enum LDKSemanticError { * The invoice contains multiple descriptions and/or description hashes which isn't allowed */ LDKSemanticError_MultipleDescriptions, + /** + * The invoice contains multiple payment secrets + */ + LDKSemanticError_MultiplePaymentSecrets, + /** + * The invoice's features are invalid + */ + LDKSemanticError_InvalidFeatures, /** * The recovery id doesn't fit the signature/pub key */ @@ -450,136 +458,6 @@ typedef struct LDKTxOut { uint64_t value; } LDKTxOut; - - -/** - * Options which apply on a per-channel basis and may change at runtime or based on negotiation - * with our counterparty. - */ -typedef struct MUST_USE_STRUCT LDKChannelConfig { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativeChannelConfig *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKChannelConfig; - - - -/** - * An error in decoding a message or struct. - */ -typedef struct MUST_USE_STRUCT LDKDecodeError { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativeDecodeError *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKDecodeError; - -/** - * The contents of CResult_ChannelConfigDecodeErrorZ - */ -typedef union LDKCResult_ChannelConfigDecodeErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKChannelConfig *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKDecodeError *err; -} LDKCResult_ChannelConfigDecodeErrorZPtr; - -/** - * A CResult_ChannelConfigDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::util::config::ChannelConfig on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_ChannelConfigDecodeErrorZ { - /** - * The contents of this CResult_ChannelConfigDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_ChannelConfigDecodeErrorZPtr contents; - /** - * Whether this CResult_ChannelConfigDecodeErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_ChannelConfigDecodeErrorZ; - - - -/** - * A reference to a transaction output. - * - * Differs from bitcoin::blockdata::transaction::OutPoint as the index is a u16 instead of u32 - * due to LN's restrictions on index values. Should reduce (possibly) unsafe conversions this way. - */ -typedef struct MUST_USE_STRUCT LDKOutPoint { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativeOutPoint *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKOutPoint; - -/** - * The contents of CResult_OutPointDecodeErrorZ - */ -typedef union LDKCResult_OutPointDecodeErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKOutPoint *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKDecodeError *err; -} LDKCResult_OutPointDecodeErrorZPtr; - -/** - * A CResult_OutPointDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::chain::transaction::OutPoint on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_OutPointDecodeErrorZ { - /** - * The contents of this CResult_OutPointDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_OutPointDecodeErrorZPtr contents; - /** - * Whether this CResult_OutPointDecodeErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_OutPointDecodeErrorZ; - /** * Represents a valid secp256k1 secret key serialized as a 32 byte array. */ @@ -696,6 +574,26 @@ typedef struct MUST_USE_STRUCT LDKTxCreationKeys { bool is_owned; } LDKTxCreationKeys; + + +/** + * An error in decoding a message or struct. + */ +typedef struct MUST_USE_STRUCT LDKDecodeError { + /** + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. + */ + LDKnativeDecodeError *inner; + /** + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. + */ + bool is_owned; +} LDKDecodeError; + /** * The contents of CResult_TxCreationKeysDecodeErrorZ */ @@ -1287,405 +1185,422 @@ typedef struct LDKCResult_CVec_SignatureZNoneZ { } LDKCResult_CVec_SignatureZNoneZ; /** - * The contents of CResult_SiPrefixNoneZ + * The contents of CResult_NoneErrorZ */ -typedef union LDKCResult_SiPrefixNoneZPtr { +typedef union LDKCResult_NoneErrorZPtr { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * Note that this value is always NULL, as there are no contents in the OK variant */ - enum LDKSiPrefix *result; + void *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_SiPrefixNoneZPtr; + enum LDKIOError *err; +} LDKCResult_NoneErrorZPtr; /** - * A CResult_SiPrefixNoneZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::SiPrefix on success and a () on failure. + * A CResult_NoneErrorZ represents the result of a fallible operation, + * containing a () on success and a crate::c_types::IOError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_SiPrefixNoneZ { +typedef struct LDKCResult_NoneErrorZ { /** - * The contents of this CResult_SiPrefixNoneZ, accessible via either + * The contents of this CResult_NoneErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_SiPrefixNoneZPtr contents; + union LDKCResult_NoneErrorZPtr contents; /** - * Whether this CResult_SiPrefixNoneZ represents a success state. + * Whether this CResult_NoneErrorZ represents a success state. */ bool result_ok; -} LDKCResult_SiPrefixNoneZ; +} LDKCResult_NoneErrorZ; /** - * Represents a syntactically and semantically correct lightning BOLT11 invoice. - * - * There are three ways to construct an `Invoice`: - * 1. using `InvoiceBuilder` - * 2. using `Invoice::from_signed(SignedRawInvoice)` - * 3. using `str::parse::(&str)` + * A hop in a route */ -typedef struct MUST_USE_STRUCT LDKInvoice { +typedef struct MUST_USE_STRUCT LDKRouteHop { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeInvoice *inner; + LDKnativeRouteHop *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKInvoice; +} LDKRouteHop; /** - * The contents of CResult_InvoiceNoneZ + * The contents of CResult_RouteHopDecodeErrorZ */ -typedef union LDKCResult_InvoiceNoneZPtr { +typedef union LDKCResult_RouteHopDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKInvoice *result; + struct LDKRouteHop *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_InvoiceNoneZPtr; + struct LDKDecodeError *err; +} LDKCResult_RouteHopDecodeErrorZPtr; /** - * A CResult_InvoiceNoneZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::Invoice on success and a () on failure. + * A CResult_RouteHopDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::router::RouteHop on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_InvoiceNoneZ { +typedef struct LDKCResult_RouteHopDecodeErrorZ { /** - * The contents of this CResult_InvoiceNoneZ, accessible via either + * The contents of this CResult_RouteHopDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_InvoiceNoneZPtr contents; + union LDKCResult_RouteHopDecodeErrorZPtr contents; /** - * Whether this CResult_InvoiceNoneZ represents a success state. + * Whether this CResult_RouteHopDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_InvoiceNoneZ; +} LDKCResult_RouteHopDecodeErrorZ; + +/** + * A dynamically-allocated array of crate::lightning::routing::router::RouteHops of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_RouteHopZ { + /** + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + */ + struct LDKRouteHop *data; + /** + * The number of elements pointed to by `data`. + */ + uintptr_t datalen; +} LDKCVec_RouteHopZ; + +/** + * A dynamically-allocated array of crate::c_types::derived::CVec_RouteHopZs of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_CVec_RouteHopZZ { + /** + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + */ + struct LDKCVec_RouteHopZ *data; + /** + * The number of elements pointed to by `data`. + */ + uintptr_t datalen; +} LDKCVec_CVec_RouteHopZZ; /** - * Represents a signed `RawInvoice` with cached hash. The signature is not checked and may be - * invalid. - * - * # Invariants - * The hash has to be either from the deserialized invoice or from the serialized `raw_invoice`. + * A route directs a payment from the sender (us) to the recipient. If the recipient supports MPP, + * it can take multiple paths. Each path is composed of one or more hops through the network. */ -typedef struct MUST_USE_STRUCT LDKSignedRawInvoice { +typedef struct MUST_USE_STRUCT LDKRoute { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeSignedRawInvoice *inner; + LDKnativeRoute *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKSignedRawInvoice; +} LDKRoute; /** - * The contents of CResult_SignedRawInvoiceNoneZ + * The contents of CResult_RouteDecodeErrorZ */ -typedef union LDKCResult_SignedRawInvoiceNoneZPtr { +typedef union LDKCResult_RouteDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKSignedRawInvoice *result; + struct LDKRoute *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_SignedRawInvoiceNoneZPtr; + struct LDKDecodeError *err; +} LDKCResult_RouteDecodeErrorZPtr; /** - * A CResult_SignedRawInvoiceNoneZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::SignedRawInvoice on success and a () on failure. + * A CResult_RouteDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::router::Route on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_SignedRawInvoiceNoneZ { +typedef struct LDKCResult_RouteDecodeErrorZ { /** - * The contents of this CResult_SignedRawInvoiceNoneZ, accessible via either + * The contents of this CResult_RouteDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_SignedRawInvoiceNoneZPtr contents; + union LDKCResult_RouteDecodeErrorZPtr contents; /** - * Whether this CResult_SignedRawInvoiceNoneZ represents a success state. + * Whether this CResult_RouteDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_SignedRawInvoiceNoneZ; +} LDKCResult_RouteDecodeErrorZ; + +/** + * An enum which can either contain a u64 or not + */ +typedef enum LDKCOption_u64Z_Tag { + /** + * When we're in this state, this COption_u64Z contains a u64 + */ + LDKCOption_u64Z_Some, + /** + * When we're in this state, this COption_u64Z contains nothing + */ + LDKCOption_u64Z_None, + /** + * Must be last for serialization purposes + */ + LDKCOption_u64Z_Sentinel, +} LDKCOption_u64Z_Tag; + +typedef struct LDKCOption_u64Z { + LDKCOption_u64Z_Tag tag; + union { + struct { + uint64_t some; + }; + }; +} LDKCOption_u64Z; /** - * Represents an syntactically correct Invoice for a payment on the lightning network, - * but without the signature information. - * De- and encoding should not lead to information loss but may lead to different hashes. - * - * For methods without docs see the corresponding methods in `Invoice`. + * Details of a channel, as returned by ChannelManager::list_channels and ChannelManager::list_usable_channels */ -typedef struct MUST_USE_STRUCT LDKRawInvoice { +typedef struct MUST_USE_STRUCT LDKChannelDetails { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeRawInvoice *inner; + LDKnativeChannelDetails *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKRawInvoice; +} LDKChannelDetails; /** - * Arbitrary 32 bytes, which could represent one of a few different things. You probably want to - * look up the corresponding function in rust-lightning's docs. + * A dynamically-allocated array of crate::lightning::ln::channelmanager::ChannelDetailss of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKThirtyTwoBytes { +typedef struct LDKCVec_ChannelDetailsZ { /** - * The thirty-two bytes + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - uint8_t data[32]; -} LDKThirtyTwoBytes; + struct LDKChannelDetails *data; + /** + * The number of elements pointed to by `data`. + */ + uintptr_t datalen; +} LDKCVec_ChannelDetailsZ; /** - * Recoverable signature + * A channel descriptor which provides a last-hop route to get_route */ -typedef struct MUST_USE_STRUCT LDKInvoiceSignature { +typedef struct MUST_USE_STRUCT LDKRouteHintHop { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeInvoiceSignature *inner; + LDKnativeRouteHintHop *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKInvoiceSignature; +} LDKRouteHintHop; /** - * A tuple of 3 elements. See the individual fields for the types contained. + * A dynamically-allocated array of crate::lightning::routing::router::RouteHintHops of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ { - /** - * The element at position 0 - */ - struct LDKRawInvoice a; +typedef struct LDKCVec_RouteHintHopZ { /** - * The element at position 1 + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKThirtyTwoBytes b; + struct LDKRouteHintHop *data; /** - * The element at position 2 + * The number of elements pointed to by `data`. */ - struct LDKInvoiceSignature c; -} LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ; + uintptr_t datalen; +} LDKCVec_RouteHintHopZ; /** - * Payee public key + * An Err type for failure to process messages. */ -typedef struct MUST_USE_STRUCT LDKPayeePubKey { +typedef struct MUST_USE_STRUCT LDKLightningError { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativePayeePubKey *inner; + LDKnativeLightningError *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKPayeePubKey; +} LDKLightningError; /** - * The contents of CResult_PayeePubKeyErrorZ + * The contents of CResult_RouteLightningErrorZ */ -typedef union LDKCResult_PayeePubKeyErrorZPtr { +typedef union LDKCResult_RouteLightningErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKPayeePubKey *result; + struct LDKRoute *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - enum LDKSecp256k1Error *err; -} LDKCResult_PayeePubKeyErrorZPtr; + struct LDKLightningError *err; +} LDKCResult_RouteLightningErrorZPtr; /** - * A CResult_PayeePubKeyErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::PayeePubKey on success and a crate::c_types::Secp256k1Error on failure. + * A CResult_RouteLightningErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::router::Route on success and a crate::lightning::ln::msgs::LightningError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_PayeePubKeyErrorZ { +typedef struct LDKCResult_RouteLightningErrorZ { /** - * The contents of this CResult_PayeePubKeyErrorZ, accessible via either + * The contents of this CResult_RouteLightningErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_PayeePubKeyErrorZPtr contents; + union LDKCResult_RouteLightningErrorZPtr contents; /** - * Whether this CResult_PayeePubKeyErrorZ represents a success state. + * Whether this CResult_RouteLightningErrorZ represents a success state. */ bool result_ok; -} LDKCResult_PayeePubKeyErrorZ; +} LDKCResult_RouteLightningErrorZ; +/** + * The contents of CResult_TxOutAccessErrorZ + */ +typedef union LDKCResult_TxOutAccessErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKTxOut *result; + /** + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. + */ + enum LDKAccessError *err; +} LDKCResult_TxOutAccessErrorZPtr; +/** + * A CResult_TxOutAccessErrorZ represents the result of a fallible operation, + * containing a crate::c_types::TxOut on success and a crate::lightning::chain::AccessError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_TxOutAccessErrorZ { + /** + * The contents of this CResult_TxOutAccessErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_TxOutAccessErrorZPtr contents; + /** + * Whether this CResult_TxOutAccessErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_TxOutAccessErrorZ; /** - * Private routing information - * - * # Invariants - * The encoded route has to be <1024 5bit characters long (<=639 bytes or <=12 hops) - * + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef struct MUST_USE_STRUCT LDKRouteHint { +typedef struct LDKC2Tuple_usizeTransactionZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The element at position 0 */ - LDKnativeRouteHint *inner; + uintptr_t a; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The element at position 1 */ - bool is_owned; -} LDKRouteHint; + struct LDKTransaction b; +} LDKC2Tuple_usizeTransactionZ; /** - * A dynamically-allocated array of crate::lightning_invoice::RouteHints of arbitrary size. + * A dynamically-allocated array of crate::c_types::derived::C2Tuple_usizeTransactionZs of arbitrary size. * This corresponds to std::vector in C++ */ -typedef struct LDKCVec_RouteHintZ { +typedef struct LDKCVec_C2Tuple_usizeTransactionZZ { /** * The elements in the array. * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKRouteHint *data; + struct LDKC2Tuple_usizeTransactionZ *data; /** * The number of elements pointed to by `data`. */ uintptr_t datalen; -} LDKCVec_RouteHintZ; +} LDKCVec_C2Tuple_usizeTransactionZZ; /** - * An enum which can either contain a u64 or not + * Arbitrary 32 bytes, which could represent one of a few different things. You probably want to + * look up the corresponding function in rust-lightning's docs. */ -typedef enum LDKCOption_u64Z_Tag { +typedef struct LDKThirtyTwoBytes { /** - * When we're in this state, this COption_u64Z contains a u64 + * The thirty-two bytes */ - LDKCOption_u64Z_Some, + uint8_t data[32]; +} LDKThirtyTwoBytes; + +/** + * A dynamically-allocated array of crate::c_types::ThirtyTwoBytess of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_TxidZ { /** - * When we're in this state, this COption_u64Z contains nothing + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKCOption_u64Z_None, + struct LDKThirtyTwoBytes *data; /** - * Must be last for serialization purposes + * The number of elements pointed to by `data`. */ - LDKCOption_u64Z_Sentinel, -} LDKCOption_u64Z_Tag; - -typedef struct LDKCOption_u64Z { - LDKCOption_u64Z_Tag tag; - union { - struct { - uint64_t some; - }; - }; -} LDKCOption_u64Z; - - + uintptr_t datalen; +} LDKCVec_TxidZ; /** - * A timestamp that refers to a date after 1 January 1970 which means its representation as UNIX - * timestamp is positive. - * - * # Invariants - * The UNIX timestamp representing the stored time has to be positive and small enough so that - * a `EpiryTime` can be added to it without an overflow. + * The contents of CResult_NoneChannelMonitorUpdateErrZ */ -typedef struct MUST_USE_STRUCT LDKPositiveTimestamp { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativePositiveTimestamp *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKPositiveTimestamp; - -/** - * The contents of CResult_PositiveTimestampCreationErrorZ - */ -typedef union LDKCResult_PositiveTimestampCreationErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKPositiveTimestamp *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - enum LDKCreationError *err; -} LDKCResult_PositiveTimestampCreationErrorZPtr; - -/** - * A CResult_PositiveTimestampCreationErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::PositiveTimestamp on success and a crate::lightning_invoice::CreationError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_PositiveTimestampCreationErrorZ { - /** - * The contents of this CResult_PositiveTimestampCreationErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_PositiveTimestampCreationErrorZPtr contents; - /** - * Whether this CResult_PositiveTimestampCreationErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_PositiveTimestampCreationErrorZ; - -/** - * The contents of CResult_NoneSemanticErrorZ - */ -typedef union LDKCResult_NoneSemanticErrorZPtr { +typedef union LDKCResult_NoneChannelMonitorUpdateErrZPtr { /** * Note that this value is always NULL, as there are no contents in the OK variant */ @@ -1694,5889 +1609,6126 @@ typedef union LDKCResult_NoneSemanticErrorZPtr { * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - enum LDKSemanticError *err; -} LDKCResult_NoneSemanticErrorZPtr; + enum LDKChannelMonitorUpdateErr *err; +} LDKCResult_NoneChannelMonitorUpdateErrZPtr; /** - * A CResult_NoneSemanticErrorZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning_invoice::SemanticError on failure. + * A CResult_NoneChannelMonitorUpdateErrZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning::chain::channelmonitor::ChannelMonitorUpdateErr on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NoneSemanticErrorZ { +typedef struct LDKCResult_NoneChannelMonitorUpdateErrZ { /** - * The contents of this CResult_NoneSemanticErrorZ, accessible via either + * The contents of this CResult_NoneChannelMonitorUpdateErrZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NoneSemanticErrorZPtr contents; + union LDKCResult_NoneChannelMonitorUpdateErrZPtr contents; /** - * Whether this CResult_NoneSemanticErrorZ represents a success state. + * Whether this CResult_NoneChannelMonitorUpdateErrZ represents a success state. */ bool result_ok; -} LDKCResult_NoneSemanticErrorZ; +} LDKCResult_NoneChannelMonitorUpdateErrZ; + -/** - * The contents of CResult_InvoiceSemanticErrorZ - */ -typedef union LDKCResult_InvoiceSemanticErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKInvoice *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - enum LDKSemanticError *err; -} LDKCResult_InvoiceSemanticErrorZPtr; /** - * A CResult_InvoiceSemanticErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::Invoice on success and a crate::lightning_invoice::SemanticError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * Simple structure sent back by `chain::Watch` when an HTLC from a forward channel is detected on + * chain. Used to update the corresponding HTLC in the backward channel. Failing to pass the + * preimage claim backward will lead to loss of funds. */ -typedef struct LDKCResult_InvoiceSemanticErrorZ { +typedef struct MUST_USE_STRUCT LDKHTLCUpdate { /** - * The contents of this CResult_InvoiceSemanticErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_InvoiceSemanticErrorZPtr contents; + LDKnativeHTLCUpdate *inner; /** - * Whether this CResult_InvoiceSemanticErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_InvoiceSemanticErrorZ; + bool is_owned; +} LDKHTLCUpdate; /** - * Description string + * A reference to a transaction output. * - * # Invariants - * The description can be at most 639 __bytes__ long + * Differs from bitcoin::blockdata::transaction::OutPoint as the index is a u16 instead of u32 + * due to LN's restrictions on index values. Should reduce (possibly) unsafe conversions this way. */ -typedef struct MUST_USE_STRUCT LDKDescription { +typedef struct MUST_USE_STRUCT LDKOutPoint { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeDescription *inner; + LDKnativeOutPoint *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKDescription; +} LDKOutPoint; /** - * The contents of CResult_DescriptionCreationErrorZ + * An event to be processed by the ChannelManager. */ -typedef union LDKCResult_DescriptionCreationErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKDescription *result; +typedef enum LDKMonitorEvent_Tag { /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * A monitor event containing an HTLCUpdate. */ - enum LDKCreationError *err; -} LDKCResult_DescriptionCreationErrorZPtr; - -/** - * A CResult_DescriptionCreationErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::Description on success and a crate::lightning_invoice::CreationError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_DescriptionCreationErrorZ { + LDKMonitorEvent_HTLCEvent, /** - * The contents of this CResult_DescriptionCreationErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A monitor event that the Channel's commitment transaction was broadcasted. */ - union LDKCResult_DescriptionCreationErrorZPtr contents; + LDKMonitorEvent_CommitmentTxBroadcasted, /** - * Whether this CResult_DescriptionCreationErrorZ represents a success state. + * Must be last for serialization purposes */ - bool result_ok; -} LDKCResult_DescriptionCreationErrorZ; - + LDKMonitorEvent_Sentinel, +} LDKMonitorEvent_Tag; +typedef struct MUST_USE_STRUCT LDKMonitorEvent { + LDKMonitorEvent_Tag tag; + union { + struct { + struct LDKHTLCUpdate htlc_event; + }; + struct { + struct LDKOutPoint commitment_tx_broadcasted; + }; + }; +} LDKMonitorEvent; /** - * Positive duration that defines when (relatively to the timestamp) in the future the invoice - * expires - * - * # Invariants - * The number of seconds this expiry time represents has to be in the range - * `0...(SYSTEM_TIME_MAX_UNIX_TIMESTAMP - MAX_EXPIRY_TIME)` to avoid overflows when adding it to a - * timestamp + * A dynamically-allocated array of crate::lightning::chain::channelmonitor::MonitorEvents of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct MUST_USE_STRUCT LDKExpiryTime { +typedef struct LDKCVec_MonitorEventZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKnativeExpiryTime *inner; + struct LDKMonitorEvent *data; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The number of elements pointed to by `data`. */ - bool is_owned; -} LDKExpiryTime; + uintptr_t datalen; +} LDKCVec_MonitorEventZ; /** - * The contents of CResult_ExpiryTimeCreationErrorZ + * An enum which can either contain a crate::c_types::derived::C2Tuple_usizeTransactionZ or not */ -typedef union LDKCResult_ExpiryTimeCreationErrorZPtr { +typedef enum LDKCOption_C2Tuple_usizeTransactionZZ_Tag { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * When we're in this state, this COption_C2Tuple_usizeTransactionZZ contains a crate::c_types::derived::C2Tuple_usizeTransactionZ */ - struct LDKExpiryTime *result; + LDKCOption_C2Tuple_usizeTransactionZZ_Some, /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * When we're in this state, this COption_C2Tuple_usizeTransactionZZ contains nothing */ - enum LDKCreationError *err; -} LDKCResult_ExpiryTimeCreationErrorZPtr; + LDKCOption_C2Tuple_usizeTransactionZZ_None, + /** + * Must be last for serialization purposes + */ + LDKCOption_C2Tuple_usizeTransactionZZ_Sentinel, +} LDKCOption_C2Tuple_usizeTransactionZZ_Tag; + +typedef struct LDKCOption_C2Tuple_usizeTransactionZZ { + LDKCOption_C2Tuple_usizeTransactionZZ_Tag tag; + union { + struct { + struct LDKC2Tuple_usizeTransactionZ some; + }; + }; +} LDKCOption_C2Tuple_usizeTransactionZZ; + + /** - * A CResult_ExpiryTimeCreationErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::ExpiryTime on success and a crate::lightning_invoice::CreationError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * Information about a spendable output to a P2WSH script. See + * SpendableOutputDescriptor::DelayedPaymentOutput for more details on how to spend this. */ -typedef struct LDKCResult_ExpiryTimeCreationErrorZ { +typedef struct MUST_USE_STRUCT LDKDelayedPaymentOutputDescriptor { /** - * The contents of this CResult_ExpiryTimeCreationErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_ExpiryTimeCreationErrorZPtr contents; + LDKnativeDelayedPaymentOutputDescriptor *inner; /** - * Whether this CResult_ExpiryTimeCreationErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_ExpiryTimeCreationErrorZ; + bool is_owned; +} LDKDelayedPaymentOutputDescriptor; /** - * A channel descriptor which provides a last-hop route to get_route + * Information about a spendable output to our \"payment key\". See + * SpendableOutputDescriptor::StaticPaymentOutput for more details on how to spend this. */ -typedef struct MUST_USE_STRUCT LDKRouteHintHop { +typedef struct MUST_USE_STRUCT LDKStaticPaymentOutputDescriptor { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeRouteHintHop *inner; + LDKnativeStaticPaymentOutputDescriptor *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKRouteHintHop; +} LDKStaticPaymentOutputDescriptor; /** - * A dynamically-allocated array of crate::lightning::routing::router::RouteHintHops of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_RouteHintHopZ { - /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). - */ - struct LDKRouteHintHop *data; - /** - * The number of elements pointed to by `data`. - */ - uintptr_t datalen; -} LDKCVec_RouteHintHopZ; - -/** - * The contents of CResult_RouteHintCreationErrorZ + * When on-chain outputs are created by rust-lightning (which our counterparty is not able to + * claim at any point in the future) an event is generated which you must track and be able to + * spend on-chain. The information needed to do this is provided in this enum, including the + * outpoint describing which txid and output index is available, the full output which exists at + * that txid/index, and any keys or other information required to sign. */ -typedef union LDKCResult_RouteHintCreationErrorZPtr { +typedef enum LDKSpendableOutputDescriptor_Tag { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * An output to a script which was provided via KeysInterface directly, either from + * `get_destination_script()` or `get_shutdown_pubkey()`, thus you should already know how to + * spend it. No secret keys are provided as rust-lightning was never given any key. + * These may include outputs from a transaction punishing our counterparty or claiming an HTLC + * on-chain using the payment preimage or after it has timed out. */ - struct LDKRouteHint *result; + LDKSpendableOutputDescriptor_StaticOutput, /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * An output to a P2WSH script which can be spent with a single signature after a CSV delay. + * + * The witness in the spending input should be: + * (MINIMALIF standard rule) + * + * Note that the nSequence field in the spending input must be set to to_self_delay + * (which means the transaction is not broadcastable until at least to_self_delay + * blocks after the outpoint confirms). + * + * These are generally the result of a \"revocable\" output to us, spendable only by us unless + * it is an output from an old state which we broadcast (which should never happen). + * + * To derive the delayed_payment key which is used to sign for this input, you must pass the + * holder delayed_payment_base_key (ie the private key which corresponds to the pubkey in + * Sign::pubkeys().delayed_payment_basepoint) and the provided per_commitment_point to + * chan_utils::derive_private_key. The public key can be generated without the secret key + * using chan_utils::derive_public_key and only the delayed_payment_basepoint which appears in + * Sign::pubkeys(). + * + * To derive the revocation_pubkey provided here (which is used in the witness + * script generation), you must pass the counterparty revocation_basepoint (which appears in the + * call to Sign::ready_channel) and the provided per_commitment point + * to chan_utils::derive_public_revocation_key. + * + * The witness script which is hashed and included in the output script_pubkey may be + * regenerated by passing the revocation_pubkey (derived as above), our delayed_payment pubkey + * (derived as above), and the to_self_delay contained here to + * chan_utils::get_revokeable_redeemscript. */ - enum LDKCreationError *err; -} LDKCResult_RouteHintCreationErrorZPtr; - -/** - * A CResult_RouteHintCreationErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::RouteHint on success and a crate::lightning_invoice::CreationError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_RouteHintCreationErrorZ { + LDKSpendableOutputDescriptor_DelayedPaymentOutput, /** - * The contents of this CResult_RouteHintCreationErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * An output to a P2WPKH, spendable exclusively by our payment key (ie the private key which + * corresponds to the public key in Sign::pubkeys().payment_point). + * The witness in the spending input, is, thus, simply: + * + * + * These are generally the result of our counterparty having broadcast the current state, + * allowing us to claim the non-HTLC-encumbered outputs immediately. */ - union LDKCResult_RouteHintCreationErrorZPtr contents; + LDKSpendableOutputDescriptor_StaticPaymentOutput, /** - * Whether this CResult_RouteHintCreationErrorZ represents a success state. + * Must be last for serialization purposes */ - bool result_ok; -} LDKCResult_RouteHintCreationErrorZ; + LDKSpendableOutputDescriptor_Sentinel, +} LDKSpendableOutputDescriptor_Tag; -/** - * The contents of CResult_StringErrorZ - */ -typedef union LDKCResult_StringErrorZPtr { +typedef struct LDKSpendableOutputDescriptor_LDKStaticOutput_Body { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The outpoint which is spendable */ - struct LDKStr *result; + struct LDKOutPoint outpoint; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The output which is referenced by the given outpoint. */ - enum LDKSecp256k1Error *err; -} LDKCResult_StringErrorZPtr; + struct LDKTxOut output; +} LDKSpendableOutputDescriptor_LDKStaticOutput_Body; + +typedef struct MUST_USE_STRUCT LDKSpendableOutputDescriptor { + LDKSpendableOutputDescriptor_Tag tag; + union { + LDKSpendableOutputDescriptor_LDKStaticOutput_Body static_output; + struct { + struct LDKDelayedPaymentOutputDescriptor delayed_payment_output; + }; + struct { + struct LDKStaticPaymentOutputDescriptor static_payment_output; + }; + }; +} LDKSpendableOutputDescriptor; /** - * A CResult_StringErrorZ represents the result of a fallible operation, - * containing a crate::c_types::Str on success and a crate::c_types::Secp256k1Error on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A dynamically-allocated array of crate::lightning::chain::keysinterface::SpendableOutputDescriptors of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKCResult_StringErrorZ { +typedef struct LDKCVec_SpendableOutputDescriptorZ { /** - * The contents of this CResult_StringErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - union LDKCResult_StringErrorZPtr contents; + struct LDKSpendableOutputDescriptor *data; /** - * Whether this CResult_StringErrorZ represents a success state. + * The number of elements pointed to by `data`. */ - bool result_ok; -} LDKCResult_StringErrorZ; + uintptr_t datalen; +} LDKCVec_SpendableOutputDescriptorZ; /** - * An update generated by the underlying Channel itself which contains some new information the - * ChannelMonitor should be made aware of. + * An accept_channel message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKChannelMonitorUpdate { +typedef struct MUST_USE_STRUCT LDKAcceptChannel { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeChannelMonitorUpdate *inner; + LDKnativeAcceptChannel *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKChannelMonitorUpdate; +} LDKAcceptChannel; + + /** - * The contents of CResult_ChannelMonitorUpdateDecodeErrorZ + * An open_channel message to be sent or received from a peer */ -typedef union LDKCResult_ChannelMonitorUpdateDecodeErrorZPtr { +typedef struct MUST_USE_STRUCT LDKOpenChannel { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKChannelMonitorUpdate *result; + LDKnativeOpenChannel *inner; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKDecodeError *err; -} LDKCResult_ChannelMonitorUpdateDecodeErrorZPtr; + bool is_owned; +} LDKOpenChannel; + + /** - * A CResult_ChannelMonitorUpdateDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::chain::channelmonitor::ChannelMonitorUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A funding_created message to be sent or received from a peer */ -typedef struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ { +typedef struct MUST_USE_STRUCT LDKFundingCreated { /** - * The contents of this CResult_ChannelMonitorUpdateDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_ChannelMonitorUpdateDecodeErrorZPtr contents; + LDKnativeFundingCreated *inner; /** - * Whether this CResult_ChannelMonitorUpdateDecodeErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_ChannelMonitorUpdateDecodeErrorZ; + bool is_owned; +} LDKFundingCreated; /** - * Simple structure sent back by `chain::Watch` when an HTLC from a forward channel is detected on - * chain. Used to update the corresponding HTLC in the backward channel. Failing to pass the - * preimage claim backward will lead to loss of funds. + * A funding_signed message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKHTLCUpdate { +typedef struct MUST_USE_STRUCT LDKFundingSigned { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeHTLCUpdate *inner; + LDKnativeFundingSigned *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKHTLCUpdate; +} LDKFundingSigned; + + /** - * The contents of CResult_HTLCUpdateDecodeErrorZ + * A funding_locked message to be sent or received from a peer */ -typedef union LDKCResult_HTLCUpdateDecodeErrorZPtr { +typedef struct MUST_USE_STRUCT LDKFundingLocked { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKHTLCUpdate *result; + LDKnativeFundingLocked *inner; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKDecodeError *err; -} LDKCResult_HTLCUpdateDecodeErrorZPtr; + bool is_owned; +} LDKFundingLocked; + + /** - * A CResult_HTLCUpdateDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::chain::channelmonitor::HTLCUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * An announcement_signatures message to be sent or received from a peer */ -typedef struct LDKCResult_HTLCUpdateDecodeErrorZ { +typedef struct MUST_USE_STRUCT LDKAnnouncementSignatures { /** - * The contents of this CResult_HTLCUpdateDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_HTLCUpdateDecodeErrorZPtr contents; + LDKnativeAnnouncementSignatures *inner; /** - * Whether this CResult_HTLCUpdateDecodeErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_HTLCUpdateDecodeErrorZ; + bool is_owned; +} LDKAnnouncementSignatures; /** - * General Err type for ChannelMonitor actions. Generally, this implies that the data provided is - * inconsistent with the ChannelMonitor being called. eg for ChannelMonitor::update_monitor this - * means you tried to update a monitor for a different channel or the ChannelMonitorUpdate was - * corrupted. - * Contains a developer-readable error message. + * Struct used to return values from revoke_and_ack messages, containing a bunch of commitment + * transaction updates if they were pending. */ -typedef struct MUST_USE_STRUCT LDKMonitorUpdateError { +typedef struct MUST_USE_STRUCT LDKCommitmentUpdate { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeMonitorUpdateError *inner; + LDKnativeCommitmentUpdate *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKMonitorUpdateError; +} LDKCommitmentUpdate; -/** - * The contents of CResult_NoneMonitorUpdateErrorZ - */ -typedef union LDKCResult_NoneMonitorUpdateErrorZPtr { - /** - * Note that this value is always NULL, as there are no contents in the OK variant - */ - void *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKMonitorUpdateError *err; -} LDKCResult_NoneMonitorUpdateErrorZPtr; -/** - * A CResult_NoneMonitorUpdateErrorZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning::chain::channelmonitor::MonitorUpdateError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_NoneMonitorUpdateErrorZ { - /** - * The contents of this CResult_NoneMonitorUpdateErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_NoneMonitorUpdateErrorZPtr contents; - /** - * Whether this CResult_NoneMonitorUpdateErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_NoneMonitorUpdateErrorZ; /** - * A tuple of 2 elements. See the individual fields for the types contained. + * A revoke_and_ack message to be sent or received from a peer */ -typedef struct LDKC2Tuple_OutPointScriptZ { +typedef struct MUST_USE_STRUCT LDKRevokeAndACK { /** - * The element at position 0 + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKOutPoint a; + LDKnativeRevokeAndACK *inner; /** - * The element at position 1 + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKCVec_u8Z b; -} LDKC2Tuple_OutPointScriptZ; + bool is_owned; +} LDKRevokeAndACK; + -/** - * A tuple of 2 elements. See the individual fields for the types contained. - */ -typedef struct LDKC2Tuple_u32ScriptZ { - /** - * The element at position 0 - */ - uint32_t a; - /** - * The element at position 1 - */ - struct LDKCVec_u8Z b; -} LDKC2Tuple_u32ScriptZ; /** - * A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32ScriptZs of arbitrary size. - * This corresponds to std::vector in C++ + * A closing_signed message to be sent or received from a peer */ -typedef struct LDKCVec_C2Tuple_u32ScriptZZ { +typedef struct MUST_USE_STRUCT LDKClosingSigned { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKC2Tuple_u32ScriptZ *data; + LDKnativeClosingSigned *inner; /** - * The number of elements pointed to by `data`. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uintptr_t datalen; -} LDKCVec_C2Tuple_u32ScriptZZ; + bool is_owned; +} LDKClosingSigned; + + /** - * A tuple of 2 elements. See the individual fields for the types contained. + * A shutdown message to be sent or received from a peer */ -typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ { +typedef struct MUST_USE_STRUCT LDKShutdown { /** - * The element at position 0 + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKThirtyTwoBytes a; + LDKnativeShutdown *inner; /** - * The element at position 1 + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKCVec_C2Tuple_u32ScriptZZ b; -} LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ; + bool is_owned; +} LDKShutdown; + + /** - * A dynamically-allocated array of crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZs of arbitrary size. - * This corresponds to std::vector in C++ + * A channel_reestablish message to be sent or received from a peer */ -typedef struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ { +typedef struct MUST_USE_STRUCT LDKChannelReestablish { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *data; + LDKnativeChannelReestablish *inner; /** - * The number of elements pointed to by `data`. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uintptr_t datalen; -} LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ; + bool is_owned; +} LDKChannelReestablish; + + /** - * An event to be processed by the ChannelManager. + * A channel_announcement message to be sent or received from a peer */ -typedef enum LDKMonitorEvent_Tag { - /** - * A monitor event containing an HTLCUpdate. - */ - LDKMonitorEvent_HTLCEvent, +typedef struct MUST_USE_STRUCT LDKChannelAnnouncement { /** - * A monitor event that the Channel's commitment transaction was broadcasted. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKMonitorEvent_CommitmentTxBroadcasted, + LDKnativeChannelAnnouncement *inner; /** - * Must be last for serialization purposes + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - LDKMonitorEvent_Sentinel, -} LDKMonitorEvent_Tag; + bool is_owned; +} LDKChannelAnnouncement; + -typedef struct MUST_USE_STRUCT LDKMonitorEvent { - LDKMonitorEvent_Tag tag; - union { - struct { - struct LDKHTLCUpdate htlc_event; - }; - struct { - struct LDKOutPoint commitment_tx_broadcasted; - }; - }; -} LDKMonitorEvent; /** - * A dynamically-allocated array of crate::lightning::chain::channelmonitor::MonitorEvents of arbitrary size. - * This corresponds to std::vector in C++ + * A channel_update message to be sent or received from a peer */ -typedef struct LDKCVec_MonitorEventZ { +typedef struct MUST_USE_STRUCT LDKChannelUpdate { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKMonitorEvent *data; + LDKnativeChannelUpdate *inner; /** - * The number of elements pointed to by `data`. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uintptr_t datalen; -} LDKCVec_MonitorEventZ; + bool is_owned; +} LDKChannelUpdate; /** - * Information about a spendable output to a P2WSH script. See - * SpendableOutputDescriptor::DelayedPaymentOutput for more details on how to spend this. + * A node_announcement message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKDelayedPaymentOutputDescriptor { +typedef struct MUST_USE_STRUCT LDKNodeAnnouncement { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeDelayedPaymentOutputDescriptor *inner; + LDKnativeNodeAnnouncement *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKDelayedPaymentOutputDescriptor; +} LDKNodeAnnouncement; /** - * Information about a spendable output to our \"payment key\". See - * SpendableOutputDescriptor::StaticPaymentOutput for more details on how to spend this. + * An error message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKStaticPaymentOutputDescriptor { +typedef struct MUST_USE_STRUCT LDKErrorMessage { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeStaticPaymentOutputDescriptor *inner; + LDKnativeErrorMessage *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKStaticPaymentOutputDescriptor; +} LDKErrorMessage; /** - * When on-chain outputs are created by rust-lightning (which our counterparty is not able to - * claim at any point in the future) an event is generated which you must track and be able to - * spend on-chain. The information needed to do this is provided in this enum, including the - * outpoint describing which txid and output index is available, the full output which exists at - * that txid/index, and any keys or other information required to sign. + * Used to put an error message in a LightningError */ -typedef enum LDKSpendableOutputDescriptor_Tag { +typedef enum LDKErrorAction_Tag { /** - * An output to a script which was provided via KeysInterface directly, either from - * `get_destination_script()` or `get_shutdown_pubkey()`, thus you should already know how to - * spend it. No secret keys are provided as rust-lightning was never given any key. - * These may include outputs from a transaction punishing our counterparty or claiming an HTLC - * on-chain using the payment preimage or after it has timed out. + * The peer took some action which made us think they were useless. Disconnect them. */ - LDKSpendableOutputDescriptor_StaticOutput, + LDKErrorAction_DisconnectPeer, /** - * An output to a P2WSH script which can be spent with a single signature after a CSV delay. - * - * The witness in the spending input should be: - * (MINIMALIF standard rule) - * - * Note that the nSequence field in the spending input must be set to to_self_delay - * (which means the transaction is not broadcastable until at least to_self_delay - * blocks after the outpoint confirms). - * - * These are generally the result of a \"revocable\" output to us, spendable only by us unless - * it is an output from an old state which we broadcast (which should never happen). - * - * To derive the delayed_payment key which is used to sign for this input, you must pass the - * holder delayed_payment_base_key (ie the private key which corresponds to the pubkey in - * Sign::pubkeys().delayed_payment_basepoint) and the provided per_commitment_point to - * chan_utils::derive_private_key. The public key can be generated without the secret key - * using chan_utils::derive_public_key and only the delayed_payment_basepoint which appears in - * Sign::pubkeys(). - * - * To derive the revocation_pubkey provided here (which is used in the witness - * script generation), you must pass the counterparty revocation_basepoint (which appears in the - * call to Sign::ready_channel) and the provided per_commitment point - * to chan_utils::derive_public_revocation_key. - * - * The witness script which is hashed and included in the output script_pubkey may be - * regenerated by passing the revocation_pubkey (derived as above), our delayed_payment pubkey - * (derived as above), and the to_self_delay contained here to - * chan_utils::get_revokeable_redeemscript. + * The peer did something harmless that we weren't able to process, just log and ignore */ - LDKSpendableOutputDescriptor_DelayedPaymentOutput, + LDKErrorAction_IgnoreError, /** - * An output to a P2WPKH, spendable exclusively by our payment key (ie the private key which - * corresponds to the public key in Sign::pubkeys().payment_point). - * The witness in the spending input, is, thus, simply: - * - * - * These are generally the result of our counterparty having broadcast the current state, - * allowing us to claim the non-HTLC-encumbered outputs immediately. + * The peer did something incorrect. Tell them. */ - LDKSpendableOutputDescriptor_StaticPaymentOutput, + LDKErrorAction_SendErrorMessage, /** * Must be last for serialization purposes */ - LDKSpendableOutputDescriptor_Sentinel, -} LDKSpendableOutputDescriptor_Tag; + LDKErrorAction_Sentinel, +} LDKErrorAction_Tag; -typedef struct LDKSpendableOutputDescriptor_LDKStaticOutput_Body { +typedef struct LDKErrorAction_LDKDisconnectPeer_Body { /** - * The outpoint which is spendable + * An error message which we should make an effort to send before we disconnect. */ - struct LDKOutPoint outpoint; + struct LDKErrorMessage msg; +} LDKErrorAction_LDKDisconnectPeer_Body; + +typedef struct LDKErrorAction_LDKSendErrorMessage_Body { /** - * The output which is referenced by the given outpoint. + * The message to send. */ - struct LDKTxOut output; -} LDKSpendableOutputDescriptor_LDKStaticOutput_Body; + struct LDKErrorMessage msg; +} LDKErrorAction_LDKSendErrorMessage_Body; -typedef struct MUST_USE_STRUCT LDKSpendableOutputDescriptor { - LDKSpendableOutputDescriptor_Tag tag; +typedef struct MUST_USE_STRUCT LDKErrorAction { + LDKErrorAction_Tag tag; union { - LDKSpendableOutputDescriptor_LDKStaticOutput_Body static_output; - struct { - struct LDKDelayedPaymentOutputDescriptor delayed_payment_output; - }; - struct { - struct LDKStaticPaymentOutputDescriptor static_payment_output; - }; + LDKErrorAction_LDKDisconnectPeer_Body disconnect_peer; + LDKErrorAction_LDKSendErrorMessage_Body send_error_message; }; -} LDKSpendableOutputDescriptor; +} LDKErrorAction; /** - * A dynamically-allocated array of crate::lightning::chain::keysinterface::SpendableOutputDescriptors of arbitrary size. - * This corresponds to std::vector in C++ + * The information we received from a peer along the route of a payment we originated. This is + * returned by ChannelMessageHandler::handle_update_fail_htlc to be passed into + * RoutingMessageHandler::handle_htlc_fail_channel_update to update our network map. */ -typedef struct LDKCVec_SpendableOutputDescriptorZ { +typedef enum LDKHTLCFailChannelUpdate_Tag { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * We received an error which included a full ChannelUpdate message. */ - struct LDKSpendableOutputDescriptor *data; + LDKHTLCFailChannelUpdate_ChannelUpdateMessage, /** - * The number of elements pointed to by `data`. + * We received an error which indicated only that a channel has been closed */ - uintptr_t datalen; -} LDKCVec_SpendableOutputDescriptorZ; + LDKHTLCFailChannelUpdate_ChannelClosed, + /** + * We received an error which indicated only that a node has failed + */ + LDKHTLCFailChannelUpdate_NodeFailure, + /** + * Must be last for serialization purposes + */ + LDKHTLCFailChannelUpdate_Sentinel, +} LDKHTLCFailChannelUpdate_Tag; -/** - * An Event which you should probably take some action in response to. - * - * Note that while Writeable and Readable are implemented for Event, you probably shouldn't use - * them directly as they don't round-trip exactly (for example FundingGenerationReady is never - * written as it makes no sense to respond to it after reconnecting to peers). - */ -typedef enum LDKEvent_Tag { +typedef struct LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body { /** - * Used to indicate that the client should generate a funding transaction with the given - * parameters and then call ChannelManager::funding_transaction_generated. - * Generated in ChannelManager message handling. - * Note that *all inputs* in the funding transaction must spend SegWit outputs or your - * counterparty can steal your funds! + * The unwrapped message we received */ - LDKEvent_FundingGenerationReady, + struct LDKChannelUpdate msg; +} LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body; + +typedef struct LDKHTLCFailChannelUpdate_LDKChannelClosed_Body { /** - * Indicates we've received money! Just gotta dig out that payment preimage and feed it to - * ChannelManager::claim_funds to get it.... - * Note that if the preimage is not known or the amount paid is incorrect, you should call - * ChannelManager::fail_htlc_backwards to free up resources for this HTLC and avoid - * network congestion. - * The amount paid should be considered 'incorrect' when it is less than or more than twice - * the amount expected. - * If you fail to call either ChannelManager::claim_funds or - * ChannelManager::fail_htlc_backwards within the HTLC's timeout, the HTLC will be - * automatically failed. + * The short_channel_id which has now closed. */ - LDKEvent_PaymentReceived, + uint64_t short_channel_id; /** - * Indicates an outbound payment we made succeeded (ie it made it all the way to its target - * and we got back the payment preimage for it). - * Note that duplicative PaymentSent Events may be generated - it is your responsibility to - * deduplicate them by payment_preimage (which MUST be unique)! + * when this true, this channel should be permanently removed from the + * consideration. Otherwise, this channel can be restored as new channel_update is received */ - LDKEvent_PaymentSent, + bool is_permanent; +} LDKHTLCFailChannelUpdate_LDKChannelClosed_Body; + +typedef struct LDKHTLCFailChannelUpdate_LDKNodeFailure_Body { /** - * Indicates an outbound payment we made failed. Probably some intermediary node dropped - * something. You may wish to retry with a different route. - * Note that duplicative PaymentFailed Events may be generated - it is your responsibility to - * deduplicate them by payment_hash (which MUST be unique)! + * The node_id that has failed. */ - LDKEvent_PaymentFailed, + struct LDKPublicKey node_id; /** - * Used to indicate that ChannelManager::process_pending_htlc_forwards should be called at a - * time in the future. + * when this true, node should be permanently removed from the + * consideration. Otherwise, the channels connected to this node can be + * restored as new channel_update is received */ - LDKEvent_PendingHTLCsForwardable, + bool is_permanent; +} LDKHTLCFailChannelUpdate_LDKNodeFailure_Body; + +typedef struct MUST_USE_STRUCT LDKHTLCFailChannelUpdate { + LDKHTLCFailChannelUpdate_Tag tag; + union { + LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body channel_update_message; + LDKHTLCFailChannelUpdate_LDKChannelClosed_Body channel_closed; + LDKHTLCFailChannelUpdate_LDKNodeFailure_Body node_failure; + }; +} LDKHTLCFailChannelUpdate; + + + +/** + * A query_channel_range message is used to query a peer for channel + * UTXOs in a range of blocks. The recipient of a query makes a best + * effort to reply to the query using one or more reply_channel_range + * messages. + */ +typedef struct MUST_USE_STRUCT LDKQueryChannelRange { /** - * Used to indicate that an output was generated on-chain which you should know how to spend. - * Such an output will *not* ever be spent by rust-lightning, and are not at risk of your - * counterparty spending them due to some kind of timeout. Thus, you need to store them - * somewhere and spend them when you create on-chain transactions. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKEvent_SpendableOutputs, + LDKnativeQueryChannelRange *inner; /** - * Must be last for serialization purposes + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - LDKEvent_Sentinel, -} LDKEvent_Tag; + bool is_owned; +} LDKQueryChannelRange; -typedef struct LDKEvent_LDKFundingGenerationReady_Body { + + +/** + * A query_short_channel_ids message is used to query a peer for + * routing gossip messages related to one or more short_channel_ids. + * The query recipient will reply with the latest, if available, + * channel_announcement, channel_update and node_announcement messages + * it maintains for the requested short_channel_ids followed by a + * reply_short_channel_ids_end message. The short_channel_ids sent in + * this query are encoded. We only support encoding_type=0 uncompressed + * serialization and do not support encoding_type=1 zlib serialization. + */ +typedef struct MUST_USE_STRUCT LDKQueryShortChannelIds { /** - * The random channel_id we picked which you'll need to pass into - * ChannelManager::funding_transaction_generated. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKThirtyTwoBytes temporary_channel_id; + LDKnativeQueryShortChannelIds *inner; /** - * The value, in satoshis, that the output should have. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uint64_t channel_value_satoshis; + bool is_owned; +} LDKQueryShortChannelIds; + + + +/** + * A reply_channel_range message is a reply to a query_channel_range + * message. Multiple reply_channel_range messages can be sent in reply + * to a single query_channel_range message. The query recipient makes a + * best effort to respond based on their local network view which may + * not be a perfect view of the network. The short_channel_ids in the + * reply are encoded. We only support encoding_type=0 uncompressed + * serialization and do not support encoding_type=1 zlib serialization. + */ +typedef struct MUST_USE_STRUCT LDKReplyChannelRange { /** - * The script which should be used in the transaction output. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKCVec_u8Z output_script; + LDKnativeReplyChannelRange *inner; /** - * The value passed in to ChannelManager::create_channel + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uint64_t user_channel_id; -} LDKEvent_LDKFundingGenerationReady_Body; + bool is_owned; +} LDKReplyChannelRange; -typedef struct LDKEvent_LDKPaymentReceived_Body { +/** + * An event generated by ChannelManager which indicates a message should be sent to a peer (or + * broadcast to most peers). + * These events are handled by PeerManager::process_events if you are using a PeerManager. + */ +typedef enum LDKMessageSendEvent_Tag { /** - * The hash for which the preimage should be handed to the ChannelManager. + * Used to indicate that we've accepted a channel open and should send the accept_channel + * message provided to the given peer. */ - struct LDKThirtyTwoBytes payment_hash; + LDKMessageSendEvent_SendAcceptChannel, /** - * The preimage to the payment_hash, if the payment hash (and secret) were fetched via - * [`ChannelManager::create_inbound_payment`]. If provided, this can be handed directly to - * [`ChannelManager::claim_funds`]. - * - * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment - * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds + * Used to indicate that we've initiated a channel open and should send the open_channel + * message provided to the given peer. */ - struct LDKThirtyTwoBytes payment_preimage; + LDKMessageSendEvent_SendOpenChannel, /** - * The \"payment secret\". This authenticates the sender to the recipient, preventing a - * number of deanonymization attacks during the routing process. - * It is provided here for your reference, however its accuracy is enforced directly by - * [`ChannelManager`] using the values you previously provided to - * [`ChannelManager::create_inbound_payment`] or - * [`ChannelManager::create_inbound_payment_for_hash`]. - * - * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager - * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment - * [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash + * Used to indicate that a funding_created message should be sent to the peer with the given node_id. */ - struct LDKThirtyTwoBytes payment_secret; + LDKMessageSendEvent_SendFundingCreated, /** - * The value, in thousandths of a satoshi, that this payment is for. Note that you must - * compare this to the expected value before accepting the payment (as otherwise you are - * providing proof-of-payment for less than the value you expected!). + * Used to indicate that a funding_signed message should be sent to the peer with the given node_id. */ - uint64_t amt; + LDKMessageSendEvent_SendFundingSigned, /** - * This is the `user_payment_id` which was provided to - * [`ChannelManager::create_inbound_payment_for_hash`] or - * [`ChannelManager::create_inbound_payment`]. It has no meaning inside of LDK and is - * simply copied here. It may be used to correlate PaymentReceived events with invoice - * metadata stored elsewhere. + * Used to indicate that a funding_locked message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_SendFundingLocked, + /** + * Used to indicate that an announcement_signatures message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_SendAnnouncementSignatures, + /** + * Used to indicate that a series of HTLC update messages, as well as a commitment_signed + * message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_UpdateHTLCs, + /** + * Used to indicate that a revoke_and_ack message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_SendRevokeAndACK, + /** + * Used to indicate that a closing_signed message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_SendClosingSigned, + /** + * Used to indicate that a shutdown message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_SendShutdown, + /** + * Used to indicate that a channel_reestablish message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_SendChannelReestablish, + /** + * Used to indicate that a channel_announcement and channel_update should be broadcast to all + * peers (except the peer with node_id either msg.contents.node_id_1 or msg.contents.node_id_2). * - * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment - * [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash + * Note that after doing so, you very likely (unless you did so very recently) want to call + * ChannelManager::broadcast_node_announcement to trigger a BroadcastNodeAnnouncement event. + * This ensures that any nodes which see our channel_announcement also have a relevant + * node_announcement, including relevant feature flags which may be important for routing + * through or to us. + */ + LDKMessageSendEvent_BroadcastChannelAnnouncement, + /** + * Used to indicate that a node_announcement should be broadcast to all peers. + */ + LDKMessageSendEvent_BroadcastNodeAnnouncement, + /** + * Used to indicate that a channel_update should be broadcast to all peers. + */ + LDKMessageSendEvent_BroadcastChannelUpdate, + /** + * Broadcast an error downstream to be handled + */ + LDKMessageSendEvent_HandleError, + /** + * When a payment fails we may receive updates back from the hop where it failed. In such + * cases this event is generated so that we can inform the network graph of this information. + */ + LDKMessageSendEvent_PaymentFailureNetworkUpdate, + /** + * Query a peer for channels with funding transaction UTXOs in a block range. + */ + LDKMessageSendEvent_SendChannelRangeQuery, + /** + * Request routing gossip messages from a peer for a list of channels identified by + * their short_channel_ids. + */ + LDKMessageSendEvent_SendShortIdsQuery, + /** + * Sends a reply to a channel range query. This may be one of several SendReplyChannelRange events + * emitted during processing of the query. + */ + LDKMessageSendEvent_SendReplyChannelRange, + /** + * Must be last for serialization purposes + */ + LDKMessageSendEvent_Sentinel, +} LDKMessageSendEvent_Tag; + +typedef struct LDKMessageSendEvent_LDKSendAcceptChannel_Body { + /** + * The node_id of the node which should receive this message + */ + struct LDKPublicKey node_id; + /** + * The message which should be sent. + */ + struct LDKAcceptChannel msg; +} LDKMessageSendEvent_LDKSendAcceptChannel_Body; + +typedef struct LDKMessageSendEvent_LDKSendOpenChannel_Body { + /** + * The node_id of the node which should receive this message + */ + struct LDKPublicKey node_id; + /** + * The message which should be sent. + */ + struct LDKOpenChannel msg; +} LDKMessageSendEvent_LDKSendOpenChannel_Body; + +typedef struct LDKMessageSendEvent_LDKSendFundingCreated_Body { + /** + * The node_id of the node which should receive this message */ - uint64_t user_payment_id; -} LDKEvent_LDKPaymentReceived_Body; - -typedef struct LDKEvent_LDKPaymentSent_Body { + struct LDKPublicKey node_id; /** - * The preimage to the hash given to ChannelManager::send_payment. - * Note that this serves as a payment receipt, if you wish to have such a thing, you must - * store it somehow! + * The message which should be sent. */ - struct LDKThirtyTwoBytes payment_preimage; -} LDKEvent_LDKPaymentSent_Body; + struct LDKFundingCreated msg; +} LDKMessageSendEvent_LDKSendFundingCreated_Body; -typedef struct LDKEvent_LDKPaymentFailed_Body { +typedef struct LDKMessageSendEvent_LDKSendFundingSigned_Body { /** - * The hash which was given to ChannelManager::send_payment. + * The node_id of the node which should receive this message */ - struct LDKThirtyTwoBytes payment_hash; + struct LDKPublicKey node_id; /** - * Indicates the payment was rejected for some reason by the recipient. This implies that - * the payment has failed, not just the route in question. If this is not set, you may - * retry the payment via a different route. + * The message which should be sent. */ - bool rejected_by_dest; -} LDKEvent_LDKPaymentFailed_Body; + struct LDKFundingSigned msg; +} LDKMessageSendEvent_LDKSendFundingSigned_Body; -typedef struct LDKEvent_LDKPendingHTLCsForwardable_Body { +typedef struct LDKMessageSendEvent_LDKSendFundingLocked_Body { /** - * The minimum amount of time that should be waited prior to calling - * process_pending_htlc_forwards. To increase the effort required to correlate payments, - * you should wait a random amount of time in roughly the range (now + time_forwardable, - * now + 5*time_forwardable). + * The node_id of the node which should receive these message(s) */ - uint64_t time_forwardable; -} LDKEvent_LDKPendingHTLCsForwardable_Body; - -typedef struct LDKEvent_LDKSpendableOutputs_Body { + struct LDKPublicKey node_id; /** - * The outputs which you should store as spendable by you. + * The funding_locked message which should be sent. */ - struct LDKCVec_SpendableOutputDescriptorZ outputs; -} LDKEvent_LDKSpendableOutputs_Body; - -typedef struct MUST_USE_STRUCT LDKEvent { - LDKEvent_Tag tag; - union { - LDKEvent_LDKFundingGenerationReady_Body funding_generation_ready; - LDKEvent_LDKPaymentReceived_Body payment_received; - LDKEvent_LDKPaymentSent_Body payment_sent; - LDKEvent_LDKPaymentFailed_Body payment_failed; - LDKEvent_LDKPendingHTLCsForwardable_Body pending_htl_cs_forwardable; - LDKEvent_LDKSpendableOutputs_Body spendable_outputs; - }; -} LDKEvent; + struct LDKFundingLocked msg; +} LDKMessageSendEvent_LDKSendFundingLocked_Body; -/** - * A dynamically-allocated array of crate::lightning::util::events::Events of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_EventZ { +typedef struct LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The node_id of the node which should receive these message(s) */ - struct LDKEvent *data; + struct LDKPublicKey node_id; /** - * The number of elements pointed to by `data`. + * The announcement_signatures message which should be sent. */ - uintptr_t datalen; -} LDKCVec_EventZ; + struct LDKAnnouncementSignatures msg; +} LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body; -/** - * A dynamically-allocated array of crate::c_types::Transactions of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_TransactionZ { +typedef struct LDKMessageSendEvent_LDKUpdateHTLCs_Body { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The node_id of the node which should receive these message(s) */ - struct LDKTransaction *data; + struct LDKPublicKey node_id; /** - * The number of elements pointed to by `data`. + * The update messages which should be sent. ALL messages in the struct should be sent! */ - uintptr_t datalen; -} LDKCVec_TransactionZ; + struct LDKCommitmentUpdate updates; +} LDKMessageSendEvent_LDKUpdateHTLCs_Body; -/** - * A tuple of 2 elements. See the individual fields for the types contained. - */ -typedef struct LDKC2Tuple_usizeTransactionZ { +typedef struct LDKMessageSendEvent_LDKSendRevokeAndACK_Body { /** - * The element at position 0 + * The node_id of the node which should receive this message */ - uintptr_t a; + struct LDKPublicKey node_id; /** - * The element at position 1 + * The message which should be sent. */ - struct LDKTransaction b; -} LDKC2Tuple_usizeTransactionZ; + struct LDKRevokeAndACK msg; +} LDKMessageSendEvent_LDKSendRevokeAndACK_Body; -/** - * A dynamically-allocated array of crate::c_types::derived::C2Tuple_usizeTransactionZs of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_C2Tuple_usizeTransactionZZ { +typedef struct LDKMessageSendEvent_LDKSendClosingSigned_Body { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The node_id of the node which should receive this message */ - struct LDKC2Tuple_usizeTransactionZ *data; + struct LDKPublicKey node_id; /** - * The number of elements pointed to by `data`. + * The message which should be sent. */ - uintptr_t datalen; -} LDKCVec_C2Tuple_usizeTransactionZZ; + struct LDKClosingSigned msg; +} LDKMessageSendEvent_LDKSendClosingSigned_Body; -/** - * A tuple of 2 elements. See the individual fields for the types contained. - */ -typedef struct LDKC2Tuple_u32TxOutZ { +typedef struct LDKMessageSendEvent_LDKSendShutdown_Body { /** - * The element at position 0 + * The node_id of the node which should receive this message */ - uint32_t a; + struct LDKPublicKey node_id; /** - * The element at position 1 + * The message which should be sent. */ - struct LDKTxOut b; -} LDKC2Tuple_u32TxOutZ; + struct LDKShutdown msg; +} LDKMessageSendEvent_LDKSendShutdown_Body; -/** - * A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32TxOutZs of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_C2Tuple_u32TxOutZZ { +typedef struct LDKMessageSendEvent_LDKSendChannelReestablish_Body { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The node_id of the node which should receive this message */ - struct LDKC2Tuple_u32TxOutZ *data; + struct LDKPublicKey node_id; /** - * The number of elements pointed to by `data`. + * The message which should be sent. */ - uintptr_t datalen; -} LDKCVec_C2Tuple_u32TxOutZZ; + struct LDKChannelReestablish msg; +} LDKMessageSendEvent_LDKSendChannelReestablish_Body; -/** - * A tuple of 2 elements. See the individual fields for the types contained. - */ -typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ { +typedef struct LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body { /** - * The element at position 0 + * The channel_announcement which should be sent. */ - struct LDKThirtyTwoBytes a; + struct LDKChannelAnnouncement msg; /** - * The element at position 1 + * The followup channel_update which should be sent. */ - struct LDKCVec_C2Tuple_u32TxOutZZ b; -} LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ; + struct LDKChannelUpdate update_msg; +} LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body; -/** - * A dynamically-allocated array of crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZs of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_TransactionOutputsZ { +typedef struct LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The node_announcement which should be sent. */ - struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *data; + struct LDKNodeAnnouncement msg; +} LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body; + +typedef struct LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body { /** - * The number of elements pointed to by `data`. + * The channel_update which should be sent. */ - uintptr_t datalen; -} LDKCVec_TransactionOutputsZ; + struct LDKChannelUpdate msg; +} LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body; -/** - * A dynamically-allocated array of crate::c_types::ThirtyTwoBytess of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_TxidZ { +typedef struct LDKMessageSendEvent_LDKHandleError_Body { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The node_id of the node which should receive this message */ - struct LDKThirtyTwoBytes *data; + struct LDKPublicKey node_id; /** - * The number of elements pointed to by `data`. + * The action which should be taken. */ - uintptr_t datalen; -} LDKCVec_TxidZ; + struct LDKErrorAction action; +} LDKMessageSendEvent_LDKHandleError_Body; -/** - * The contents of CResult_NoneChannelMonitorUpdateErrZ - */ -typedef union LDKCResult_NoneChannelMonitorUpdateErrZPtr { +typedef struct LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body { /** - * Note that this value is always NULL, as there are no contents in the OK variant + * The channel/node update which should be sent to NetGraphMsgHandler */ - void *result; + struct LDKHTLCFailChannelUpdate update; +} LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body; + +typedef struct LDKMessageSendEvent_LDKSendChannelRangeQuery_Body { /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The node_id of this message recipient */ - enum LDKChannelMonitorUpdateErr *err; -} LDKCResult_NoneChannelMonitorUpdateErrZPtr; + struct LDKPublicKey node_id; + /** + * The query_channel_range which should be sent. + */ + struct LDKQueryChannelRange msg; +} LDKMessageSendEvent_LDKSendChannelRangeQuery_Body; -/** - * A CResult_NoneChannelMonitorUpdateErrZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning::chain::channelmonitor::ChannelMonitorUpdateErr on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_NoneChannelMonitorUpdateErrZ { +typedef struct LDKMessageSendEvent_LDKSendShortIdsQuery_Body { /** - * The contents of this CResult_NoneChannelMonitorUpdateErrZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The node_id of this message recipient */ - union LDKCResult_NoneChannelMonitorUpdateErrZPtr contents; + struct LDKPublicKey node_id; /** - * Whether this CResult_NoneChannelMonitorUpdateErrZ represents a success state. + * The query_short_channel_ids which should be sent. */ - bool result_ok; -} LDKCResult_NoneChannelMonitorUpdateErrZ; + struct LDKQueryShortChannelIds msg; +} LDKMessageSendEvent_LDKSendShortIdsQuery_Body; -/** - * A tuple of 2 elements. See the individual fields for the types contained. - */ -typedef struct LDKC2Tuple_SignatureCVec_SignatureZZ { +typedef struct LDKMessageSendEvent_LDKSendReplyChannelRange_Body { /** - * The element at position 0 + * The node_id of this message recipient */ - struct LDKSignature a; + struct LDKPublicKey node_id; /** - * The element at position 1 + * The reply_channel_range which should be sent. */ - struct LDKCVec_SignatureZ b; -} LDKC2Tuple_SignatureCVec_SignatureZZ; + struct LDKReplyChannelRange msg; +} LDKMessageSendEvent_LDKSendReplyChannelRange_Body; + +typedef struct MUST_USE_STRUCT LDKMessageSendEvent { + LDKMessageSendEvent_Tag tag; + union { + LDKMessageSendEvent_LDKSendAcceptChannel_Body send_accept_channel; + LDKMessageSendEvent_LDKSendOpenChannel_Body send_open_channel; + LDKMessageSendEvent_LDKSendFundingCreated_Body send_funding_created; + LDKMessageSendEvent_LDKSendFundingSigned_Body send_funding_signed; + LDKMessageSendEvent_LDKSendFundingLocked_Body send_funding_locked; + LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body send_announcement_signatures; + LDKMessageSendEvent_LDKUpdateHTLCs_Body update_htl_cs; + LDKMessageSendEvent_LDKSendRevokeAndACK_Body send_revoke_and_ack; + LDKMessageSendEvent_LDKSendClosingSigned_Body send_closing_signed; + LDKMessageSendEvent_LDKSendShutdown_Body send_shutdown; + LDKMessageSendEvent_LDKSendChannelReestablish_Body send_channel_reestablish; + LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body broadcast_channel_announcement; + LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body broadcast_node_announcement; + LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body broadcast_channel_update; + LDKMessageSendEvent_LDKHandleError_Body handle_error; + LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body payment_failure_network_update; + LDKMessageSendEvent_LDKSendChannelRangeQuery_Body send_channel_range_query; + LDKMessageSendEvent_LDKSendShortIdsQuery_Body send_short_ids_query; + LDKMessageSendEvent_LDKSendReplyChannelRange_Body send_reply_channel_range; + }; +} LDKMessageSendEvent; /** - * The contents of CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ + * A dynamically-allocated array of crate::lightning::util::events::MessageSendEvents of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef union LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr { +typedef struct LDKCVec_MessageSendEventZ { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKC2Tuple_SignatureCVec_SignatureZZ *result; + struct LDKMessageSendEvent *data; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * The number of elements pointed to by `data`. */ - void *err; -} LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr; + uintptr_t datalen; +} LDKCVec_MessageSendEventZ; + + /** - * A CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ represents the result of a fallible operation, - * containing a crate::c_types::derived::C2Tuple_SignatureCVec_SignatureZZ on success and a () on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * Features used within an `init` message. */ -typedef struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ { +typedef struct MUST_USE_STRUCT LDKInitFeatures { /** - * The contents of this CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr contents; + LDKnativeInitFeatures *inner; /** - * Whether this CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ; + bool is_owned; +} LDKInitFeatures; /** - * The contents of CResult_SignatureNoneZ + * The contents of CResult_InitFeaturesDecodeErrorZ */ -typedef union LDKCResult_SignatureNoneZPtr { +typedef union LDKCResult_InitFeaturesDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKSignature *result; + struct LDKInitFeatures *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_SignatureNoneZPtr; + struct LDKDecodeError *err; +} LDKCResult_InitFeaturesDecodeErrorZPtr; /** - * A CResult_SignatureNoneZ represents the result of a fallible operation, - * containing a crate::c_types::Signature on success and a () on failure. + * A CResult_InitFeaturesDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::features::InitFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_SignatureNoneZ { +typedef struct LDKCResult_InitFeaturesDecodeErrorZ { /** - * The contents of this CResult_SignatureNoneZ, accessible via either + * The contents of this CResult_InitFeaturesDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_SignatureNoneZPtr contents; + union LDKCResult_InitFeaturesDecodeErrorZPtr contents; /** - * Whether this CResult_SignatureNoneZ represents a success state. + * Whether this CResult_InitFeaturesDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_SignatureNoneZ; +} LDKCResult_InitFeaturesDecodeErrorZ; /** - * The unsigned part of a channel_announcement + * Features used within a `node_announcement` message. */ -typedef struct MUST_USE_STRUCT LDKUnsignedChannelAnnouncement { +typedef struct MUST_USE_STRUCT LDKNodeFeatures { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeUnsignedChannelAnnouncement *inner; + LDKnativeNodeFeatures *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKUnsignedChannelAnnouncement; +} LDKNodeFeatures; /** - * A trait to sign lightning channel transactions as described in BOLT 3. - * - * Signing services could be implemented on a hardware wallet. In this case, - * the current Sign would be a front-end on top of a communication - * channel connected to your secure device and lightning key material wouldn't - * reside on a hot server. Nevertheless, a this deployment would still need - * to trust the ChannelManager to avoid loss of funds as this latest component - * could ask to sign commitment transaction with HTLCs paying to attacker pubkeys. - * - * A more secure iteration would be to use hashlock (or payment points) to pair - * invoice/incoming HTLCs with outgoing HTLCs to implement a no-trust-ChannelManager - * at the price of more state and computation on the hardware wallet side. In the future, - * we are looking forward to design such interface. - * - * In any case, ChannelMonitor or fallback watchtowers are always going to be trusted - * to act, as liveness and breach reply correctness are always going to be hard requirements - * of LN security model, orthogonal of key management issues. + * The contents of CResult_NodeFeaturesDecodeErrorZ */ -typedef struct LDKBaseSign { - /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. - */ - void *this_arg; - /** - * Gets the per-commitment point for a specific commitment number - * - * Note that the commitment number starts at (1 << 48) - 1 and counts backwards. - */ - struct LDKPublicKey (*get_per_commitment_point)(const void *this_arg, uint64_t idx); - /** - * Gets the commitment secret for a specific commitment number as part of the revocation process - * - * An external signer implementation should error here if the commitment was already signed - * and should refuse to sign it in the future. - * - * May be called more than once for the same index. - * - * Note that the commitment number starts at (1 << 48) - 1 and counts backwards. - */ - struct LDKThirtyTwoBytes (*release_commitment_secret)(const void *this_arg, uint64_t idx); - /** - * Gets the holder's channel public keys and basepoints - */ - struct LDKChannelPublicKeys pubkeys; - /** - * Fill in the pubkeys field as a reference to it will be given to Rust after this returns - * Note that this takes a pointer to this object, not the this_ptr like other methods do - * This function pointer may be NULL if pubkeys is filled in when this object is created and never needs updating. - */ - void (*set_pubkeys)(const struct LDKBaseSign*NONNULL_PTR ); - /** - * Gets an arbitrary identifier describing the set of keys which are provided back to you in - * some SpendableOutputDescriptor types. This should be sufficient to identify this - * Sign object uniquely and lookup or re-derive its keys. - */ - struct LDKThirtyTwoBytes (*channel_keys_id)(const void *this_arg); - /** - * Create a signature for a counterparty's commitment transaction and associated HTLC transactions. - * - * Note that if signing fails or is rejected, the channel will be force-closed. - */ - struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ (*sign_counterparty_commitment)(const void *this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx); - /** - * Create a signatures for a holder's commitment transaction and its claiming HTLC transactions. - * This will only ever be called with a non-revoked commitment_tx. This will be called with the - * latest commitment_tx when we initiate a force-close. - * This will be called with the previous latest, just to get claiming HTLC signatures, if we are - * reacting to a ChannelMonitor replica that decided to broadcast before it had been updated to - * the latest. - * This may be called multiple times for the same transaction. - * - * An external signer implementation should check that the commitment has not been revoked. - * - * May return Err if key derivation fails. Callers, such as ChannelMonitor, will panic in such a case. - */ - struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ (*sign_holder_commitment_and_htlcs)(const void *this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx); - /** - * Create a signature for the given input in a transaction spending an HTLC or commitment - * transaction output when our counterparty broadcasts an old state. - * - * A justice transaction may claim multiples outputs at the same time if timelocks are - * similar, but only a signature for the input at index `input` should be signed for here. - * It may be called multiples time for same output(s) if a fee-bump is needed with regards - * to an upcoming timelock expiration. - * - * Amount is value of the output spent by this input, committed to in the BIP 143 signature. - * - * per_commitment_key is revocation secret which was provided by our counterparty when they - * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does - * not allow the spending of any funds by itself (you need our holder revocation_secret to do - * so). - * - * htlc holds HTLC elements (hash, timelock) if the output being spent is a HTLC output, thus - * changing the format of the witness script (which is committed to in the BIP 143 - * signatures). - */ - struct LDKCResult_SignatureNoneZ (*sign_justice_transaction)(const void *this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc); - /** - * Create a signature for a claiming transaction for a HTLC output on a counterparty's commitment - * transaction, either offered or received. - * - * Such a transaction may claim multiples offered outputs at same time if we know the - * preimage for each when we create it, but only the input at index `input` should be - * signed for here. It may be called multiple times for same output(s) if a fee-bump is - * needed with regards to an upcoming timelock expiration. - * - * Witness_script is either a offered or received script as defined in BOLT3 for HTLC - * outputs. - * - * Amount is value of the output spent by this input, committed to in the BIP 143 signature. - * - * Per_commitment_point is the dynamic point corresponding to the channel state - * detected onchain. It has been generated by our counterparty and is used to derive - * channel state keys, which are then included in the witness script and committed to in the - * BIP 143 signature. - */ - struct LDKCResult_SignatureNoneZ (*sign_counterparty_htlc_transaction)(const void *this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc); +typedef union LDKCResult_NodeFeaturesDecodeErrorZPtr { /** - * Create a signature for a (proposed) closing transaction. - * - * Note that, due to rounding, there may be one \"missing\" satoshi, and either party may have - * chosen to forgo their output as dust. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKCResult_SignatureNoneZ (*sign_closing_transaction)(const void *this_arg, struct LDKTransaction closing_tx); + struct LDKNodeFeatures *result; /** - * Signs a channel announcement message with our funding key, proving it comes from one - * of the channel participants. - * - * Note that if this fails or is rejected, the channel will not be publicly announced and - * our counterparty may (though likely will not) close the channel on us for violating the - * protocol. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKCResult_SignatureNoneZ (*sign_channel_announcement)(const void *this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg); + struct LDKDecodeError *err; +} LDKCResult_NodeFeaturesDecodeErrorZPtr; + +/** + * A CResult_NodeFeaturesDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::features::NodeFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_NodeFeaturesDecodeErrorZ { /** - * Set the counterparty static channel data, including basepoints, - * counterparty_selected/holder_selected_contest_delay and funding outpoint. - * This is done as soon as the funding outpoint is known. Since these are static channel data, - * they MUST NOT be allowed to change to different values once set. - * - * channel_parameters.is_populated() MUST be true. - * - * We bind holder_selected_contest_delay late here for API convenience. - * - * Will be called before any signatures are applied. + * The contents of this CResult_NodeFeaturesDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - void (*ready_channel)(void *this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters); + union LDKCResult_NodeFeaturesDecodeErrorZPtr contents; /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * Whether this CResult_NodeFeaturesDecodeErrorZ represents a success state. */ - void (*free)(void *this_arg); -} LDKBaseSign; + bool result_ok; +} LDKCResult_NodeFeaturesDecodeErrorZ; + + /** - * A cloneable signer. - * - * Although we require signers to be cloneable, it may be useful for developers to be able to use - * signers in an un-sized way, for example as `dyn BaseSign`. Therefore we separate the Clone trait, - * which implies Sized, into this derived trait. + * Features used within a `channel_announcement` message. */ -typedef struct LDKSign { +typedef struct MUST_USE_STRUCT LDKChannelFeatures { /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - void *this_arg; + LDKnativeChannelFeatures *inner; /** - * Implementation of BaseSign for this object. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKBaseSign BaseSign; + bool is_owned; +} LDKChannelFeatures; + +/** + * The contents of CResult_ChannelFeaturesDecodeErrorZ + */ +typedef union LDKCResult_ChannelFeaturesDecodeErrorZPtr { /** - * Creates a copy of the BaseSign, for a copy of this Sign. - * Because BaseSign doesn't natively support copying itself, you have to provide a full copy implementation here. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKBaseSign (*BaseSign_clone)(const struct LDKBaseSign *NONNULL_PTR orig_BaseSign); + struct LDKChannelFeatures *result; /** - * Serialize the object into a byte array + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKCVec_u8Z (*write)(const void *this_arg); + struct LDKDecodeError *err; +} LDKCResult_ChannelFeaturesDecodeErrorZPtr; + +/** + * A CResult_ChannelFeaturesDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::features::ChannelFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_ChannelFeaturesDecodeErrorZ { /** - * Creates a copy of the object pointed to by this_arg, for a copy of this Sign. - * Note that the ultimate copy of the Sign will have all function pointers the same as the original. - * May be NULL if no action needs to be taken, the this_arg pointer will be copied into the new Sign. + * The contents of this CResult_ChannelFeaturesDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - void *(*clone)(const void *this_arg); + union LDKCResult_ChannelFeaturesDecodeErrorZPtr contents; /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * Whether this CResult_ChannelFeaturesDecodeErrorZ represents a success state. */ - void (*free)(void *this_arg); -} LDKSign; + bool result_ok; +} LDKCResult_ChannelFeaturesDecodeErrorZ; /** - * A ChannelMonitor handles chain events (blocks connected and disconnected) and generates - * on-chain transactions to ensure no loss of funds occurs. - * - * You MUST ensure that no ChannelMonitors for a given channel anywhere contain out-of-date - * information and are actively monitoring the chain. - * - * Pending Events or updated HTLCs which have not yet been read out by - * get_and_clear_pending_monitor_events or get_and_clear_pending_events are serialized to disk and - * reloaded at deserialize-time. Thus, you must ensure that, when handling events, all events - * gotten are fully handled before re-serializing the new state. - * - * Note that the deserializer is only implemented for (BlockHash, ChannelMonitor), which - * tells you the last block hash which was block_connect()ed. You MUST rescan any blocks along - * the \"reorg path\" (ie disconnecting blocks until you find a common ancestor from both the - * returned block hash and the the current chain and then reconnecting blocks to get to the - * best chain) upon deserializing the object! + * Features used within an invoice. */ -typedef struct MUST_USE_STRUCT LDKChannelMonitor { +typedef struct MUST_USE_STRUCT LDKInvoiceFeatures { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeChannelMonitor *inner; + LDKnativeInvoiceFeatures *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKChannelMonitor; +} LDKInvoiceFeatures; /** - * A tuple of 2 elements. See the individual fields for the types contained. + * The contents of CResult_InvoiceFeaturesDecodeErrorZ */ -typedef struct LDKC2Tuple_BlockHashChannelMonitorZ { +typedef union LDKCResult_InvoiceFeaturesDecodeErrorZPtr { /** - * The element at position 0 + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKThirtyTwoBytes a; + struct LDKInvoiceFeatures *result; /** - * The element at position 1 + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKChannelMonitor b; -} LDKC2Tuple_BlockHashChannelMonitorZ; + struct LDKDecodeError *err; +} LDKCResult_InvoiceFeaturesDecodeErrorZPtr; /** - * The contents of CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ + * A CResult_InvoiceFeaturesDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::features::InvoiceFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef union LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr { +typedef struct LDKCResult_InvoiceFeaturesDecodeErrorZ { + /** + * The contents of this CResult_InvoiceFeaturesDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_InvoiceFeaturesDecodeErrorZPtr contents; + /** + * Whether this CResult_InvoiceFeaturesDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_InvoiceFeaturesDecodeErrorZ; + +/** + * The contents of CResult_DelayedPaymentOutputDescriptorDecodeErrorZ + */ +typedef union LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKC2Tuple_BlockHashChannelMonitorZ *result; + struct LDKDelayedPaymentOutputDescriptor *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr; +} LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZPtr; /** - * A CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ represents the result of a fallible operation, - * containing a crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZ on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_DelayedPaymentOutputDescriptorDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::keysinterface::DelayedPaymentOutputDescriptor on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ { +typedef struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ { /** - * The contents of this CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ, accessible via either + * The contents of this CResult_DelayedPaymentOutputDescriptorDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr contents; + union LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZPtr contents; /** - * Whether this CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ represents a success state. + * Whether this CResult_DelayedPaymentOutputDescriptorDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ; - +} LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ; +/** + * The contents of CResult_StaticPaymentOutputDescriptorDecodeErrorZ + */ +typedef union LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKStaticPaymentOutputDescriptor *result; + /** + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. + */ + struct LDKDecodeError *err; +} LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZPtr; /** - * A hop in a route + * A CResult_StaticPaymentOutputDescriptorDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::keysinterface::StaticPaymentOutputDescriptor on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKRouteHop { +typedef struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_StaticPaymentOutputDescriptorDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeRouteHop *inner; + union LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_StaticPaymentOutputDescriptorDecodeErrorZ represents a success state. */ - bool is_owned; -} LDKRouteHop; + bool result_ok; +} LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ; /** - * A dynamically-allocated array of crate::lightning::routing::router::RouteHops of arbitrary size. - * This corresponds to std::vector in C++ + * The contents of CResult_SpendableOutputDescriptorDecodeErrorZ */ -typedef struct LDKCVec_RouteHopZ { +typedef union LDKCResult_SpendableOutputDescriptorDecodeErrorZPtr { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKRouteHop *data; + struct LDKSpendableOutputDescriptor *result; /** - * The number of elements pointed to by `data`. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uintptr_t datalen; -} LDKCVec_RouteHopZ; + struct LDKDecodeError *err; +} LDKCResult_SpendableOutputDescriptorDecodeErrorZPtr; /** - * A dynamically-allocated array of crate::c_types::derived::CVec_RouteHopZs of arbitrary size. - * This corresponds to std::vector in C++ + * A CResult_SpendableOutputDescriptorDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::keysinterface::SpendableOutputDescriptor on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCVec_CVec_RouteHopZZ { +typedef struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The contents of this CResult_SpendableOutputDescriptorDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - struct LDKCVec_RouteHopZ *data; + union LDKCResult_SpendableOutputDescriptorDecodeErrorZPtr contents; /** - * The number of elements pointed to by `data`. + * Whether this CResult_SpendableOutputDescriptorDecodeErrorZ represents a success state. */ - uintptr_t datalen; -} LDKCVec_CVec_RouteHopZZ; + bool result_ok; +} LDKCResult_SpendableOutputDescriptorDecodeErrorZ; +/** + * A tuple of 2 elements. See the individual fields for the types contained. + */ +typedef struct LDKC2Tuple_SignatureCVec_SignatureZZ { + /** + * The element at position 0 + */ + struct LDKSignature a; + /** + * The element at position 1 + */ + struct LDKCVec_SignatureZ b; +} LDKC2Tuple_SignatureCVec_SignatureZZ; +/** + * The contents of CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ + */ +typedef union LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKC2Tuple_SignatureCVec_SignatureZZ *result; + /** + * Note that this value is always NULL, as there are no contents in the Err variant + */ + void *err; +} LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr; /** - * A route directs a payment from the sender (us) to the recipient. If the recipient supports MPP, - * it can take multiple paths. Each path is composed of one or more hops through the network. + * A CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ represents the result of a fallible operation, + * containing a crate::c_types::derived::C2Tuple_SignatureCVec_SignatureZZ on success and a () on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKRoute { +typedef struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeRoute *inner; + union LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ represents a success state. */ - bool is_owned; -} LDKRoute; + bool result_ok; +} LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ; /** - * The contents of CResult_RouteDecodeErrorZ + * The contents of CResult_SignatureNoneZ */ -typedef union LDKCResult_RouteDecodeErrorZPtr { +typedef union LDKCResult_SignatureNoneZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKRoute *result; + struct LDKSignature *result; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Note that this value is always NULL, as there are no contents in the Err variant */ - struct LDKDecodeError *err; -} LDKCResult_RouteDecodeErrorZPtr; + void *err; +} LDKCResult_SignatureNoneZPtr; /** - * A CResult_RouteDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::router::Route on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_SignatureNoneZ represents the result of a fallible operation, + * containing a crate::c_types::Signature on success and a () on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_RouteDecodeErrorZ { +typedef struct LDKCResult_SignatureNoneZ { /** - * The contents of this CResult_RouteDecodeErrorZ, accessible via either + * The contents of this CResult_SignatureNoneZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_RouteDecodeErrorZPtr contents; + union LDKCResult_SignatureNoneZPtr contents; /** - * Whether this CResult_RouteDecodeErrorZ represents a success state. + * Whether this CResult_SignatureNoneZ represents a success state. */ bool result_ok; -} LDKCResult_RouteDecodeErrorZ; +} LDKCResult_SignatureNoneZ; /** - * Details of a channel, as returned by ChannelManager::list_channels and ChannelManager::list_usable_channels + * The unsigned part of a channel_announcement */ -typedef struct MUST_USE_STRUCT LDKChannelDetails { +typedef struct MUST_USE_STRUCT LDKUnsignedChannelAnnouncement { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeChannelDetails *inner; + LDKnativeUnsignedChannelAnnouncement *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKChannelDetails; +} LDKUnsignedChannelAnnouncement; /** - * A dynamically-allocated array of crate::lightning::ln::channelmanager::ChannelDetailss of arbitrary size. - * This corresponds to std::vector in C++ + * A trait to sign lightning channel transactions as described in BOLT 3. + * + * Signing services could be implemented on a hardware wallet. In this case, + * the current Sign would be a front-end on top of a communication + * channel connected to your secure device and lightning key material wouldn't + * reside on a hot server. Nevertheless, a this deployment would still need + * to trust the ChannelManager to avoid loss of funds as this latest component + * could ask to sign commitment transaction with HTLCs paying to attacker pubkeys. + * + * A more secure iteration would be to use hashlock (or payment points) to pair + * invoice/incoming HTLCs with outgoing HTLCs to implement a no-trust-ChannelManager + * at the price of more state and computation on the hardware wallet side. In the future, + * we are looking forward to design such interface. + * + * In any case, ChannelMonitor or fallback watchtowers are always going to be trusted + * to act, as liveness and breach reply correctness are always going to be hard requirements + * of LN security model, orthogonal of key management issues. */ -typedef struct LDKCVec_ChannelDetailsZ { +typedef struct LDKBaseSign { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - struct LDKChannelDetails *data; + void *this_arg; /** - * The number of elements pointed to by `data`. + * Gets the per-commitment point for a specific commitment number + * + * Note that the commitment number starts at (1 << 48) - 1 and counts backwards. */ - uintptr_t datalen; -} LDKCVec_ChannelDetailsZ; - - - -/** - * An Err type for failure to process messages. - */ -typedef struct MUST_USE_STRUCT LDKLightningError { + struct LDKPublicKey (*get_per_commitment_point)(const void *this_arg, uint64_t idx); /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * Gets the commitment secret for a specific commitment number as part of the revocation process + * + * An external signer implementation should error here if the commitment was already signed + * and should refuse to sign it in the future. + * + * May be called more than once for the same index. + * + * Note that the commitment number starts at (1 << 48) - 1 and counts backwards. */ - LDKnativeLightningError *inner; + struct LDKThirtyTwoBytes (*release_commitment_secret)(const void *this_arg, uint64_t idx); /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Gets the holder's channel public keys and basepoints */ - bool is_owned; -} LDKLightningError; - -/** - * The contents of CResult_RouteLightningErrorZ - */ -typedef union LDKCResult_RouteLightningErrorZPtr { + struct LDKChannelPublicKeys pubkeys; /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * Fill in the pubkeys field as a reference to it will be given to Rust after this returns + * Note that this takes a pointer to this object, not the this_ptr like other methods do + * This function pointer may be NULL if pubkeys is filled in when this object is created and never needs updating. */ - struct LDKRoute *result; + void (*set_pubkeys)(const struct LDKBaseSign*NONNULL_PTR ); /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Gets an arbitrary identifier describing the set of keys which are provided back to you in + * some SpendableOutputDescriptor types. This should be sufficient to identify this + * Sign object uniquely and lookup or re-derive its keys. */ - struct LDKLightningError *err; -} LDKCResult_RouteLightningErrorZPtr; + struct LDKThirtyTwoBytes (*channel_keys_id)(const void *this_arg); + /** + * Create a signature for a counterparty's commitment transaction and associated HTLC transactions. + * + * Note that if signing fails or is rejected, the channel will be force-closed. + */ + struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ (*sign_counterparty_commitment)(const void *this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx); + /** + * Create a signatures for a holder's commitment transaction and its claiming HTLC transactions. + * This will only ever be called with a non-revoked commitment_tx. This will be called with the + * latest commitment_tx when we initiate a force-close. + * This will be called with the previous latest, just to get claiming HTLC signatures, if we are + * reacting to a ChannelMonitor replica that decided to broadcast before it had been updated to + * the latest. + * This may be called multiple times for the same transaction. + * + * An external signer implementation should check that the commitment has not been revoked. + * + * May return Err if key derivation fails. Callers, such as ChannelMonitor, will panic in such a case. + */ + struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ (*sign_holder_commitment_and_htlcs)(const void *this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx); + /** + * Create a signature for the given input in a transaction spending an HTLC transaction output + * or a commitment transaction `to_local` output when our counterparty broadcasts an old state. + * + * A justice transaction may claim multiple outputs at the same time if timelocks are + * similar, but only a signature for the input at index `input` should be signed for here. + * It may be called multiple times for same output(s) if a fee-bump is needed with regards + * to an upcoming timelock expiration. + * + * Amount is value of the output spent by this input, committed to in the BIP 143 signature. + * + * per_commitment_key is revocation secret which was provided by our counterparty when they + * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does + * not allow the spending of any funds by itself (you need our holder revocation_secret to do + * so). + */ + struct LDKCResult_SignatureNoneZ (*sign_justice_revoked_output)(const void *this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]); + /** + * Create a signature for the given input in a transaction spending a commitment transaction + * HTLC output when our counterparty broadcasts an old state. + * + * A justice transaction may claim multiple outputs at the same time if timelocks are + * similar, but only a signature for the input at index `input` should be signed for here. + * It may be called multiple times for same output(s) if a fee-bump is needed with regards + * to an upcoming timelock expiration. + * + * Amount is value of the output spent by this input, committed to in the BIP 143 signature. + * + * per_commitment_key is revocation secret which was provided by our counterparty when they + * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does + * not allow the spending of any funds by itself (you need our holder revocation_secret to do + * so). + * + * htlc holds HTLC elements (hash, timelock), thus changing the format of the witness script + * (which is committed to in the BIP 143 signatures). + */ + struct LDKCResult_SignatureNoneZ (*sign_justice_revoked_htlc)(const void *this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc); + /** + * Create a signature for a claiming transaction for a HTLC output on a counterparty's commitment + * transaction, either offered or received. + * + * Such a transaction may claim multiples offered outputs at same time if we know the + * preimage for each when we create it, but only the input at index `input` should be + * signed for here. It may be called multiple times for same output(s) if a fee-bump is + * needed with regards to an upcoming timelock expiration. + * + * Witness_script is either a offered or received script as defined in BOLT3 for HTLC + * outputs. + * + * Amount is value of the output spent by this input, committed to in the BIP 143 signature. + * + * Per_commitment_point is the dynamic point corresponding to the channel state + * detected onchain. It has been generated by our counterparty and is used to derive + * channel state keys, which are then included in the witness script and committed to in the + * BIP 143 signature. + */ + struct LDKCResult_SignatureNoneZ (*sign_counterparty_htlc_transaction)(const void *this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc); + /** + * Create a signature for a (proposed) closing transaction. + * + * Note that, due to rounding, there may be one \"missing\" satoshi, and either party may have + * chosen to forgo their output as dust. + */ + struct LDKCResult_SignatureNoneZ (*sign_closing_transaction)(const void *this_arg, struct LDKTransaction closing_tx); + /** + * Signs a channel announcement message with our funding key, proving it comes from one + * of the channel participants. + * + * Note that if this fails or is rejected, the channel will not be publicly announced and + * our counterparty may (though likely will not) close the channel on us for violating the + * protocol. + */ + struct LDKCResult_SignatureNoneZ (*sign_channel_announcement)(const void *this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg); + /** + * Set the counterparty static channel data, including basepoints, + * counterparty_selected/holder_selected_contest_delay and funding outpoint. + * This is done as soon as the funding outpoint is known. Since these are static channel data, + * they MUST NOT be allowed to change to different values once set. + * + * channel_parameters.is_populated() MUST be true. + * + * We bind holder_selected_contest_delay late here for API convenience. + * + * Will be called before any signatures are applied. + */ + void (*ready_channel)(void *this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters); + /** + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + */ + void (*free)(void *this_arg); +} LDKBaseSign; /** - * A CResult_RouteLightningErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::router::Route on success and a crate::lightning::ln::msgs::LightningError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A cloneable signer. + * + * Although we require signers to be cloneable, it may be useful for developers to be able to use + * signers in an un-sized way, for example as `dyn BaseSign`. Therefore we separate the Clone trait, + * which implies Sized, into this derived trait. */ -typedef struct LDKCResult_RouteLightningErrorZ { +typedef struct LDKSign { /** - * The contents of this CResult_RouteLightningErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - union LDKCResult_RouteLightningErrorZPtr contents; + void *this_arg; /** - * Whether this CResult_RouteLightningErrorZ represents a success state. + * Implementation of BaseSign for this object. */ - bool result_ok; -} LDKCResult_RouteLightningErrorZ; - - + struct LDKBaseSign BaseSign; + /** + * Creates a copy of the BaseSign, for a copy of this Sign. + * Because BaseSign doesn't natively support copying itself, you have to provide a full copy implementation here. + */ + struct LDKBaseSign (*BaseSign_clone)(const struct LDKBaseSign *NONNULL_PTR orig_BaseSign); + /** + * Serialize the object into a byte array + */ + struct LDKCVec_u8Z (*write)(const void *this_arg); + /** + * Creates a copy of the object pointed to by this_arg, for a copy of this Sign. + * Note that the ultimate copy of the Sign will have all function pointers the same as the original. + * May be NULL if no action needs to be taken, the this_arg pointer will be copied into the new Sign. + */ + void *(*clone)(const void *this_arg); + /** + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + */ + void (*free)(void *this_arg); +} LDKSign; /** - * An accept_channel message to be sent or received from a peer + * The contents of CResult_SignDecodeErrorZ */ -typedef struct MUST_USE_STRUCT LDKAcceptChannel { +typedef union LDKCResult_SignDecodeErrorZPtr { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKnativeAcceptChannel *inner; + struct LDKSign *result; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - bool is_owned; -} LDKAcceptChannel; - - + struct LDKDecodeError *err; +} LDKCResult_SignDecodeErrorZPtr; /** - * An open_channel message to be sent or received from a peer + * A CResult_SignDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::keysinterface::Sign on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKOpenChannel { +typedef struct LDKCResult_SignDecodeErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_SignDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeOpenChannel *inner; + union LDKCResult_SignDecodeErrorZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_SignDecodeErrorZ represents a success state. */ - bool is_owned; -} LDKOpenChannel; - + bool result_ok; +} LDKCResult_SignDecodeErrorZ; +/** + * Represents a secp256k1 signature serialized as two 32-byte numbers as well as a tag which + * allows recovering the exact public key which created the signature given the message. + */ +typedef struct LDKRecoverableSignature { + /** + * The bytes of the signature in "compact" form plus a "Recovery ID" which allows for + * recovery. + */ + uint8_t serialized_form[68]; +} LDKRecoverableSignature; /** - * A funding_created message to be sent or received from a peer + * The contents of CResult_RecoverableSignatureNoneZ */ -typedef struct MUST_USE_STRUCT LDKFundingCreated { +typedef union LDKCResult_RecoverableSignatureNoneZPtr { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKnativeFundingCreated *inner; + struct LDKRecoverableSignature *result; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Note that this value is always NULL, as there are no contents in the Err variant */ - bool is_owned; -} LDKFundingCreated; - - + void *err; +} LDKCResult_RecoverableSignatureNoneZPtr; /** - * A funding_signed message to be sent or received from a peer + * A CResult_RecoverableSignatureNoneZ represents the result of a fallible operation, + * containing a crate::c_types::RecoverableSignature on success and a () on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKFundingSigned { +typedef struct LDKCResult_RecoverableSignatureNoneZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_RecoverableSignatureNoneZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeFundingSigned *inner; + union LDKCResult_RecoverableSignatureNoneZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_RecoverableSignatureNoneZ represents a success state. */ - bool is_owned; -} LDKFundingSigned; - - + bool result_ok; +} LDKCResult_RecoverableSignatureNoneZ; /** - * A funding_locked message to be sent or received from a peer + * A dynamically-allocated array of crate::c_types::derived::CVec_u8Zs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct MUST_USE_STRUCT LDKFundingLocked { +typedef struct LDKCVec_CVec_u8ZZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKnativeFundingLocked *inner; + struct LDKCVec_u8Z *data; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The number of elements pointed to by `data`. */ - bool is_owned; -} LDKFundingLocked; - - + uintptr_t datalen; +} LDKCVec_CVec_u8ZZ; /** - * An announcement_signatures message to be sent or received from a peer + * The contents of CResult_CVec_CVec_u8ZZNoneZ */ -typedef struct MUST_USE_STRUCT LDKAnnouncementSignatures { +typedef union LDKCResult_CVec_CVec_u8ZZNoneZPtr { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKnativeAnnouncementSignatures *inner; + struct LDKCVec_CVec_u8ZZ *result; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Note that this value is always NULL, as there are no contents in the Err variant */ - bool is_owned; -} LDKAnnouncementSignatures; - - + void *err; +} LDKCResult_CVec_CVec_u8ZZNoneZPtr; /** - * Struct used to return values from revoke_and_ack messages, containing a bunch of commitment - * transaction updates if they were pending. + * A CResult_CVec_CVec_u8ZZNoneZ represents the result of a fallible operation, + * containing a crate::c_types::derived::CVec_CVec_u8ZZ on success and a () on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKCommitmentUpdate { +typedef struct LDKCResult_CVec_CVec_u8ZZNoneZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_CVec_CVec_u8ZZNoneZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeCommitmentUpdate *inner; + union LDKCResult_CVec_CVec_u8ZZNoneZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_CVec_CVec_u8ZZNoneZ represents a success state. */ - bool is_owned; -} LDKCommitmentUpdate; + bool result_ok; +} LDKCResult_CVec_CVec_u8ZZNoneZ; /** - * A revoke_and_ack message to be sent or received from a peer + * A simple implementation of Sign that just keeps the private keys in memory. + * + * This implementation performs no policy checks and is insufficient by itself as + * a secure external signer. */ -typedef struct MUST_USE_STRUCT LDKRevokeAndACK { +typedef struct MUST_USE_STRUCT LDKInMemorySigner { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeRevokeAndACK *inner; + LDKnativeInMemorySigner *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKRevokeAndACK; - - +} LDKInMemorySigner; /** - * A closing_signed message to be sent or received from a peer + * The contents of CResult_InMemorySignerDecodeErrorZ */ -typedef struct MUST_USE_STRUCT LDKClosingSigned { +typedef union LDKCResult_InMemorySignerDecodeErrorZPtr { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKnativeClosingSigned *inner; + struct LDKInMemorySigner *result; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - bool is_owned; -} LDKClosingSigned; - - + struct LDKDecodeError *err; +} LDKCResult_InMemorySignerDecodeErrorZPtr; /** - * A shutdown message to be sent or received from a peer + * A CResult_InMemorySignerDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::keysinterface::InMemorySigner on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKShutdown { +typedef struct LDKCResult_InMemorySignerDecodeErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_InMemorySignerDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeShutdown *inner; + union LDKCResult_InMemorySignerDecodeErrorZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_InMemorySignerDecodeErrorZ represents a success state. */ - bool is_owned; -} LDKShutdown; - - + bool result_ok; +} LDKCResult_InMemorySignerDecodeErrorZ; /** - * A channel_reestablish message to be sent or received from a peer + * A dynamically-allocated array of crate::c_types::TxOuts of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct MUST_USE_STRUCT LDKChannelReestablish { +typedef struct LDKCVec_TxOutZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKnativeChannelReestablish *inner; + struct LDKTxOut *data; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The number of elements pointed to by `data`. */ - bool is_owned; -} LDKChannelReestablish; - - + uintptr_t datalen; +} LDKCVec_TxOutZ; /** - * A channel_announcement message to be sent or received from a peer + * The contents of CResult_TransactionNoneZ */ -typedef struct MUST_USE_STRUCT LDKChannelAnnouncement { +typedef union LDKCResult_TransactionNoneZPtr { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKnativeChannelAnnouncement *inner; + struct LDKTransaction *result; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Note that this value is always NULL, as there are no contents in the Err variant */ - bool is_owned; -} LDKChannelAnnouncement; - - + void *err; +} LDKCResult_TransactionNoneZPtr; /** - * A channel_update message to be sent or received from a peer + * A CResult_TransactionNoneZ represents the result of a fallible operation, + * containing a crate::c_types::Transaction on success and a () on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKChannelUpdate { +typedef struct LDKCResult_TransactionNoneZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_TransactionNoneZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeChannelUpdate *inner; + union LDKCResult_TransactionNoneZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_TransactionNoneZ represents a success state. */ - bool is_owned; -} LDKChannelUpdate; + bool result_ok; +} LDKCResult_TransactionNoneZ; /** - * A node_announcement message to be sent or received from a peer + * A ChannelMonitor handles chain events (blocks connected and disconnected) and generates + * on-chain transactions to ensure no loss of funds occurs. + * + * You MUST ensure that no ChannelMonitors for a given channel anywhere contain out-of-date + * information and are actively monitoring the chain. + * + * Pending Events or updated HTLCs which have not yet been read out by + * get_and_clear_pending_monitor_events or get_and_clear_pending_events are serialized to disk and + * reloaded at deserialize-time. Thus, you must ensure that, when handling events, all events + * gotten are fully handled before re-serializing the new state. + * + * Note that the deserializer is only implemented for (BlockHash, ChannelMonitor), which + * tells you the last block hash which was block_connect()ed. You MUST rescan any blocks along + * the \"reorg path\" (ie disconnecting blocks until you find a common ancestor from both the + * returned block hash and the the current chain and then reconnecting blocks to get to the + * best chain) upon deserializing the object! */ -typedef struct MUST_USE_STRUCT LDKNodeAnnouncement { +typedef struct MUST_USE_STRUCT LDKChannelMonitor { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeNodeAnnouncement *inner; + LDKnativeChannelMonitor *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKNodeAnnouncement; - - +} LDKChannelMonitor; /** - * An error message to be sent or received from a peer + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef struct MUST_USE_STRUCT LDKErrorMessage { +typedef struct LDKC2Tuple_BlockHashChannelMonitorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The element at position 0 */ - LDKnativeErrorMessage *inner; + struct LDKThirtyTwoBytes a; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The element at position 1 */ - bool is_owned; -} LDKErrorMessage; + struct LDKChannelMonitor b; +} LDKC2Tuple_BlockHashChannelMonitorZ; /** - * Used to put an error message in a LightningError + * A dynamically-allocated array of crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef enum LDKErrorAction_Tag { +typedef struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ { /** - * The peer took some action which made us think they were useless. Disconnect them. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKErrorAction_DisconnectPeer, + struct LDKC2Tuple_BlockHashChannelMonitorZ *data; /** - * The peer did something harmless that we weren't able to process, just log and ignore + * The number of elements pointed to by `data`. */ - LDKErrorAction_IgnoreError, + uintptr_t datalen; +} LDKCVec_C2Tuple_BlockHashChannelMonitorZZ; + +/** + * The contents of CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ + */ +typedef union LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr { /** - * The peer did something incorrect. Tell them. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKErrorAction_SendErrorMessage, + struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *result; /** - * Must be last for serialization purposes + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - LDKErrorAction_Sentinel, -} LDKErrorAction_Tag; + enum LDKIOError *err; +} LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr; -typedef struct LDKErrorAction_LDKDisconnectPeer_Body { +/** + * A CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ represents the result of a fallible operation, + * containing a crate::c_types::derived::CVec_C2Tuple_BlockHashChannelMonitorZZ on success and a crate::c_types::IOError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ { /** - * An error message which we should make an effort to send before we disconnect. + * The contents of this CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - struct LDKErrorMessage msg; -} LDKErrorAction_LDKDisconnectPeer_Body; - -typedef struct LDKErrorAction_LDKSendErrorMessage_Body { + union LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr contents; /** - * The message to send. + * Whether this CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ represents a success state. */ - struct LDKErrorMessage msg; -} LDKErrorAction_LDKSendErrorMessage_Body; - -typedef struct MUST_USE_STRUCT LDKErrorAction { - LDKErrorAction_Tag tag; - union { - LDKErrorAction_LDKDisconnectPeer_Body disconnect_peer; - LDKErrorAction_LDKSendErrorMessage_Body send_error_message; - }; -} LDKErrorAction; + bool result_ok; +} LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ; /** - * The information we received from a peer along the route of a payment we originated. This is - * returned by ChannelMessageHandler::handle_update_fail_htlc to be passed into - * RoutingMessageHandler::handle_htlc_fail_channel_update to update our network map. + * Indicates an error on the client's part (usually some variant of attempting to use too-low or + * too-high values) */ -typedef enum LDKHTLCFailChannelUpdate_Tag { +typedef enum LDKAPIError_Tag { /** - * We received an error which included a full ChannelUpdate message. + * Indicates the API was wholly misused (see err for more). Cases where these can be returned + * are documented, but generally indicates some precondition of a function was violated. */ - LDKHTLCFailChannelUpdate_ChannelUpdateMessage, + LDKAPIError_APIMisuseError, /** - * We received an error which indicated only that a channel has been closed + * Due to a high feerate, we were unable to complete the request. + * For example, this may be returned if the feerate implies we cannot open a channel at the + * requested value, but opening a larger channel would succeed. */ - LDKHTLCFailChannelUpdate_ChannelClosed, + LDKAPIError_FeeRateTooHigh, /** - * We received an error which indicated only that a node has failed + * A malformed Route was provided (eg overflowed value, node id mismatch, overly-looped route, + * too-many-hops, etc). */ - LDKHTLCFailChannelUpdate_NodeFailure, + LDKAPIError_RouteError, + /** + * We were unable to complete the request as the Channel required to do so is unable to + * complete the request (or was not found). This can take many forms, including disconnected + * peer, channel at capacity, channel shutting down, etc. + */ + LDKAPIError_ChannelUnavailable, + /** + * An attempt to call watch/update_channel returned an Err (ie you did this!), causing the + * attempted action to fail. + */ + LDKAPIError_MonitorUpdateFailed, /** * Must be last for serialization purposes */ - LDKHTLCFailChannelUpdate_Sentinel, -} LDKHTLCFailChannelUpdate_Tag; + LDKAPIError_Sentinel, +} LDKAPIError_Tag; -typedef struct LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body { +typedef struct LDKAPIError_LDKAPIMisuseError_Body { /** - * The unwrapped message we received + * A human-readable error message */ - struct LDKChannelUpdate msg; -} LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body; + struct LDKStr err; +} LDKAPIError_LDKAPIMisuseError_Body; -typedef struct LDKHTLCFailChannelUpdate_LDKChannelClosed_Body { +typedef struct LDKAPIError_LDKFeeRateTooHigh_Body { /** - * The short_channel_id which has now closed. + * A human-readable error message */ - uint64_t short_channel_id; + struct LDKStr err; /** - * when this true, this channel should be permanently removed from the - * consideration. Otherwise, this channel can be restored as new channel_update is received + * The feerate which was too high. */ - bool is_permanent; -} LDKHTLCFailChannelUpdate_LDKChannelClosed_Body; + uint32_t feerate; +} LDKAPIError_LDKFeeRateTooHigh_Body; -typedef struct LDKHTLCFailChannelUpdate_LDKNodeFailure_Body { +typedef struct LDKAPIError_LDKRouteError_Body { /** - * The node_id that has failed. + * A human-readable error message */ - struct LDKPublicKey node_id; + struct LDKStr err; +} LDKAPIError_LDKRouteError_Body; + +typedef struct LDKAPIError_LDKChannelUnavailable_Body { /** - * when this true, node should be permanently removed from the - * consideration. Otherwise, the channels connected to this node can be - * restored as new channel_update is received + * A human-readable error message */ - bool is_permanent; -} LDKHTLCFailChannelUpdate_LDKNodeFailure_Body; + struct LDKStr err; +} LDKAPIError_LDKChannelUnavailable_Body; -typedef struct MUST_USE_STRUCT LDKHTLCFailChannelUpdate { - LDKHTLCFailChannelUpdate_Tag tag; +typedef struct MUST_USE_STRUCT LDKAPIError { + LDKAPIError_Tag tag; union { - LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body channel_update_message; - LDKHTLCFailChannelUpdate_LDKChannelClosed_Body channel_closed; - LDKHTLCFailChannelUpdate_LDKNodeFailure_Body node_failure; + LDKAPIError_LDKAPIMisuseError_Body api_misuse_error; + LDKAPIError_LDKFeeRateTooHigh_Body fee_rate_too_high; + LDKAPIError_LDKRouteError_Body route_error; + LDKAPIError_LDKChannelUnavailable_Body channel_unavailable; }; -} LDKHTLCFailChannelUpdate; - - +} LDKAPIError; /** - * A query_channel_range message is used to query a peer for channel - * UTXOs in a range of blocks. The recipient of a query makes a best - * effort to reply to the query using one or more reply_channel_range - * messages. + * The contents of CResult_NoneAPIErrorZ */ -typedef struct MUST_USE_STRUCT LDKQueryChannelRange { +typedef union LDKCResult_NoneAPIErrorZPtr { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * Note that this value is always NULL, as there are no contents in the OK variant */ - LDKnativeQueryChannelRange *inner; + void *result; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. + */ + struct LDKAPIError *err; +} LDKCResult_NoneAPIErrorZPtr; + +/** + * A CResult_NoneAPIErrorZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning::util::errors::APIError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_NoneAPIErrorZ { + /** + * The contents of this CResult_NoneAPIErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_NoneAPIErrorZPtr contents; + /** + * Whether this CResult_NoneAPIErrorZ represents a success state. */ - bool is_owned; -} LDKQueryChannelRange; - - + bool result_ok; +} LDKCResult_NoneAPIErrorZ; /** - * A query_short_channel_ids message is used to query a peer for - * routing gossip messages related to one or more short_channel_ids. - * The query recipient will reply with the latest, if available, - * channel_announcement, channel_update and node_announcement messages - * it maintains for the requested short_channel_ids followed by a - * reply_short_channel_ids_end message. The short_channel_ids sent in - * this query are encoded. We only support encoding_type=0 uncompressed - * serialization and do not support encoding_type=1 zlib serialization. + * A dynamically-allocated array of crate::c_types::derived::CResult_NoneAPIErrorZs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct MUST_USE_STRUCT LDKQueryShortChannelIds { +typedef struct LDKCVec_CResult_NoneAPIErrorZZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKnativeQueryShortChannelIds *inner; + struct LDKCResult_NoneAPIErrorZ *data; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The number of elements pointed to by `data`. */ - bool is_owned; -} LDKQueryShortChannelIds; - - + uintptr_t datalen; +} LDKCVec_CResult_NoneAPIErrorZZ; /** - * A reply_channel_range message is a reply to a query_channel_range - * message. Multiple reply_channel_range messages can be sent in reply - * to a single query_channel_range message. The query recipient makes a - * best effort to respond based on their local network view which may - * not be a perfect view of the network. The short_channel_ids in the - * reply are encoded. We only support encoding_type=0 uncompressed - * serialization and do not support encoding_type=1 zlib serialization. + * A dynamically-allocated array of crate::lightning::util::errors::APIErrors of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct MUST_USE_STRUCT LDKReplyChannelRange { +typedef struct LDKCVec_APIErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKnativeReplyChannelRange *inner; + struct LDKAPIError *data; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The number of elements pointed to by `data`. */ - bool is_owned; -} LDKReplyChannelRange; + uintptr_t datalen; +} LDKCVec_APIErrorZ; /** - * An event generated by ChannelManager which indicates a message should be sent to a peer (or - * broadcast to most peers). - * These events are handled by PeerManager::process_events if you are using a PeerManager. + * If a payment fails to send, it can be in one of several states. This enum is returned as the + * Err() type describing which state the payment is in, see the description of individual enum + * states for more. */ -typedef enum LDKMessageSendEvent_Tag { +typedef enum LDKPaymentSendFailure_Tag { /** - * Used to indicate that we've accepted a channel open and should send the accept_channel - * message provided to the given peer. + * A parameter which was passed to send_payment was invalid, preventing us from attempting to + * send the payment at all. No channel state has been changed or messages sent to peers, and + * once you've changed the parameter at error, you can freely retry the payment in full. */ - LDKMessageSendEvent_SendAcceptChannel, + LDKPaymentSendFailure_ParameterError, /** - * Used to indicate that we've initiated a channel open and should send the open_channel - * message provided to the given peer. + * A parameter in a single path which was passed to send_payment was invalid, preventing us + * from attempting to send the payment at all. No channel state has been changed or messages + * sent to peers, and once you've changed the parameter at error, you can freely retry the + * payment in full. + * + * The results here are ordered the same as the paths in the route object which was passed to + * send_payment. */ - LDKMessageSendEvent_SendOpenChannel, + LDKPaymentSendFailure_PathParameterError, /** - * Used to indicate that a funding_created message should be sent to the peer with the given node_id. + * All paths which were attempted failed to send, with no channel state change taking place. + * You can freely retry the payment in full (though you probably want to do so over different + * paths than the ones selected). */ - LDKMessageSendEvent_SendFundingCreated, + LDKPaymentSendFailure_AllFailedRetrySafe, /** - * Used to indicate that a funding_signed message should be sent to the peer with the given node_id. + * Some paths which were attempted failed to send, though possibly not all. At least some + * paths have irrevocably committed to the HTLC and retrying the payment in full would result + * in over-/re-payment. + * + * The results here are ordered the same as the paths in the route object which was passed to + * send_payment, and any Errs which are not APIError::MonitorUpdateFailed can be safely + * retried (though there is currently no API with which to do so). + * + * Any entries which contain Err(APIError::MonitorUpdateFailed) or Ok(()) MUST NOT be retried + * as they will result in over-/re-payment. These HTLCs all either successfully sent (in the + * case of Ok(())) or will send once channel_monitor_updated is called on the next-hop channel + * with the latest update_id. */ - LDKMessageSendEvent_SendFundingSigned, + LDKPaymentSendFailure_PartialFailure, /** - * Used to indicate that a funding_locked message should be sent to the peer with the given node_id. + * Must be last for serialization purposes */ - LDKMessageSendEvent_SendFundingLocked, + LDKPaymentSendFailure_Sentinel, +} LDKPaymentSendFailure_Tag; + +typedef struct MUST_USE_STRUCT LDKPaymentSendFailure { + LDKPaymentSendFailure_Tag tag; + union { + struct { + struct LDKAPIError parameter_error; + }; + struct { + struct LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error; + }; + struct { + struct LDKCVec_APIErrorZ all_failed_retry_safe; + }; + struct { + struct LDKCVec_CResult_NoneAPIErrorZZ partial_failure; + }; + }; +} LDKPaymentSendFailure; + +/** + * The contents of CResult_NonePaymentSendFailureZ + */ +typedef union LDKCResult_NonePaymentSendFailureZPtr { /** - * Used to indicate that an announcement_signatures message should be sent to the peer with the given node_id. + * Note that this value is always NULL, as there are no contents in the OK variant */ - LDKMessageSendEvent_SendAnnouncementSignatures, + void *result; /** - * Used to indicate that a series of HTLC update messages, as well as a commitment_signed - * message should be sent to the peer with the given node_id. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - LDKMessageSendEvent_UpdateHTLCs, + struct LDKPaymentSendFailure *err; +} LDKCResult_NonePaymentSendFailureZPtr; + +/** + * A CResult_NonePaymentSendFailureZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning::ln::channelmanager::PaymentSendFailure on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_NonePaymentSendFailureZ { /** - * Used to indicate that a revoke_and_ack message should be sent to the peer with the given node_id. + * The contents of this CResult_NonePaymentSendFailureZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKMessageSendEvent_SendRevokeAndACK, + union LDKCResult_NonePaymentSendFailureZPtr contents; /** - * Used to indicate that a closing_signed message should be sent to the peer with the given node_id. + * Whether this CResult_NonePaymentSendFailureZ represents a success state. */ - LDKMessageSendEvent_SendClosingSigned, + bool result_ok; +} LDKCResult_NonePaymentSendFailureZ; + +/** + * A 4-byte byte array. + */ +typedef struct LDKFourBytes { /** - * Used to indicate that a shutdown message should be sent to the peer with the given node_id. + * The four bytes */ - LDKMessageSendEvent_SendShutdown, + uint8_t data[4]; +} LDKFourBytes; + +/** + * A 16-byte byte array. + */ +typedef struct LDKSixteenBytes { /** - * Used to indicate that a channel_reestablish message should be sent to the peer with the given node_id. + * The sixteen bytes */ - LDKMessageSendEvent_SendChannelReestablish, + uint8_t data[16]; +} LDKSixteenBytes; + +/** + * A 10-byte byte array. + */ +typedef struct LDKTenBytes { /** - * Used to indicate that a channel_announcement and channel_update should be broadcast to all - * peers (except the peer with node_id either msg.contents.node_id_1 or msg.contents.node_id_2). - * - * Note that after doing so, you very likely (unless you did so very recently) want to call - * ChannelManager::broadcast_node_announcement to trigger a BroadcastNodeAnnouncement event. - * This ensures that any nodes which see our channel_announcement also have a relevant - * node_announcement, including relevant feature flags which may be important for routing - * through or to us. + * The ten bytes */ - LDKMessageSendEvent_BroadcastChannelAnnouncement, + uint8_t data[10]; +} LDKTenBytes; + +/** + * An address which can be used to connect to a remote peer + */ +typedef enum LDKNetAddress_Tag { /** - * Used to indicate that a node_announcement should be broadcast to all peers. + * An IPv4 address/port on which the peer is listening. */ - LDKMessageSendEvent_BroadcastNodeAnnouncement, + LDKNetAddress_IPv4, /** - * Used to indicate that a channel_update should be broadcast to all peers. + * An IPv6 address/port on which the peer is listening. */ - LDKMessageSendEvent_BroadcastChannelUpdate, + LDKNetAddress_IPv6, /** - * Broadcast an error downstream to be handled + * An old-style Tor onion address/port on which the peer is listening. */ - LDKMessageSendEvent_HandleError, + LDKNetAddress_OnionV2, /** - * When a payment fails we may receive updates back from the hop where it failed. In such - * cases this event is generated so that we can inform the network graph of this information. + * A new-style Tor onion address/port on which the peer is listening. + * To create the human-readable \"hostname\", concatenate ed25519_pubkey, checksum, and version, + * wrap as base32 and append \".onion\". */ - LDKMessageSendEvent_PaymentFailureNetworkUpdate, + LDKNetAddress_OnionV3, /** - * Query a peer for channels with funding transaction UTXOs in a block range. + * Must be last for serialization purposes */ - LDKMessageSendEvent_SendChannelRangeQuery, + LDKNetAddress_Sentinel, +} LDKNetAddress_Tag; + +typedef struct LDKNetAddress_LDKIPv4_Body { /** - * Request routing gossip messages from a peer for a list of channels identified by - * their short_channel_ids. + * The 4-byte IPv4 address */ - LDKMessageSendEvent_SendShortIdsQuery, + struct LDKFourBytes addr; /** - * Sends a reply to a channel range query. This may be one of several SendReplyChannelRange events - * emitted during processing of the query. + * The port on which the node is listening */ - LDKMessageSendEvent_SendReplyChannelRange, + uint16_t port; +} LDKNetAddress_LDKIPv4_Body; + +typedef struct LDKNetAddress_LDKIPv6_Body { /** - * Must be last for serialization purposes + * The 16-byte IPv6 address */ - LDKMessageSendEvent_Sentinel, -} LDKMessageSendEvent_Tag; + struct LDKSixteenBytes addr; + /** + * The port on which the node is listening + */ + uint16_t port; +} LDKNetAddress_LDKIPv6_Body; -typedef struct LDKMessageSendEvent_LDKSendAcceptChannel_Body { +typedef struct LDKNetAddress_LDKOnionV2_Body { /** - * The node_id of the node which should receive this message + * The bytes (usually encoded in base32 with \".onion\" appended) */ - struct LDKPublicKey node_id; + struct LDKTenBytes addr; /** - * The message which should be sent. + * The port on which the node is listening */ - struct LDKAcceptChannel msg; -} LDKMessageSendEvent_LDKSendAcceptChannel_Body; + uint16_t port; +} LDKNetAddress_LDKOnionV2_Body; -typedef struct LDKMessageSendEvent_LDKSendOpenChannel_Body { +typedef struct LDKNetAddress_LDKOnionV3_Body { /** - * The node_id of the node which should receive this message + * The ed25519 long-term public key of the peer */ - struct LDKPublicKey node_id; + struct LDKThirtyTwoBytes ed25519_pubkey; /** - * The message which should be sent. + * The checksum of the pubkey and version, as included in the onion address */ - struct LDKOpenChannel msg; -} LDKMessageSendEvent_LDKSendOpenChannel_Body; - -typedef struct LDKMessageSendEvent_LDKSendFundingCreated_Body { + uint16_t checksum; /** - * The node_id of the node which should receive this message + * The version byte, as defined by the Tor Onion v3 spec. */ - struct LDKPublicKey node_id; + uint8_t version; /** - * The message which should be sent. + * The port on which the node is listening */ - struct LDKFundingCreated msg; -} LDKMessageSendEvent_LDKSendFundingCreated_Body; + uint16_t port; +} LDKNetAddress_LDKOnionV3_Body; -typedef struct LDKMessageSendEvent_LDKSendFundingSigned_Body { +typedef struct MUST_USE_STRUCT LDKNetAddress { + LDKNetAddress_Tag tag; + union { + LDKNetAddress_LDKIPv4_Body i_pv4; + LDKNetAddress_LDKIPv6_Body i_pv6; + LDKNetAddress_LDKOnionV2_Body onion_v2; + LDKNetAddress_LDKOnionV3_Body onion_v3; + }; +} LDKNetAddress; + +/** + * A dynamically-allocated array of crate::lightning::ln::msgs::NetAddresss of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_NetAddressZ { /** - * The node_id of the node which should receive this message + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKPublicKey node_id; + struct LDKNetAddress *data; /** - * The message which should be sent. + * The number of elements pointed to by `data`. */ - struct LDKFundingSigned msg; -} LDKMessageSendEvent_LDKSendFundingSigned_Body; + uintptr_t datalen; +} LDKCVec_NetAddressZ; -typedef struct LDKMessageSendEvent_LDKSendFundingLocked_Body { +/** + * A tuple of 2 elements. See the individual fields for the types contained. + */ +typedef struct LDKC2Tuple_PaymentHashPaymentSecretZ { /** - * The node_id of the node which should receive these message(s) + * The element at position 0 */ - struct LDKPublicKey node_id; + struct LDKThirtyTwoBytes a; /** - * The funding_locked message which should be sent. + * The element at position 1 */ - struct LDKFundingLocked msg; -} LDKMessageSendEvent_LDKSendFundingLocked_Body; + struct LDKThirtyTwoBytes b; +} LDKC2Tuple_PaymentHashPaymentSecretZ; -typedef struct LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body { +/** + * The contents of CResult_PaymentSecretAPIErrorZ + */ +typedef union LDKCResult_PaymentSecretAPIErrorZPtr { /** - * The node_id of the node which should receive these message(s) + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKPublicKey node_id; + struct LDKThirtyTwoBytes *result; /** - * The announcement_signatures message which should be sent. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKAnnouncementSignatures msg; -} LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body; + struct LDKAPIError *err; +} LDKCResult_PaymentSecretAPIErrorZPtr; -typedef struct LDKMessageSendEvent_LDKUpdateHTLCs_Body { +/** + * A CResult_PaymentSecretAPIErrorZ represents the result of a fallible operation, + * containing a crate::c_types::ThirtyTwoBytes on success and a crate::lightning::util::errors::APIError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_PaymentSecretAPIErrorZ { /** - * The node_id of the node which should receive these message(s) + * The contents of this CResult_PaymentSecretAPIErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - struct LDKPublicKey node_id; + union LDKCResult_PaymentSecretAPIErrorZPtr contents; /** - * The update messages which should be sent. ALL messages in the struct should be sent! + * Whether this CResult_PaymentSecretAPIErrorZ represents a success state. */ - struct LDKCommitmentUpdate updates; -} LDKMessageSendEvent_LDKUpdateHTLCs_Body; + bool result_ok; +} LDKCResult_PaymentSecretAPIErrorZ; -typedef struct LDKMessageSendEvent_LDKSendRevokeAndACK_Body { +/** + * A dynamically-allocated array of crate::lightning::chain::channelmonitor::ChannelMonitors of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_ChannelMonitorZ { /** - * The node_id of the node which should receive this message + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKPublicKey node_id; + struct LDKChannelMonitor *data; /** - * The message which should be sent. + * The number of elements pointed to by `data`. */ - struct LDKRevokeAndACK msg; -} LDKMessageSendEvent_LDKSendRevokeAndACK_Body; + uintptr_t datalen; +} LDKCVec_ChannelMonitorZ; -typedef struct LDKMessageSendEvent_LDKSendClosingSigned_Body { + + +/** + * An update generated by the underlying Channel itself which contains some new information the + * ChannelMonitor should be made aware of. + */ +typedef struct MUST_USE_STRUCT LDKChannelMonitorUpdate { /** - * The node_id of the node which should receive this message + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKPublicKey node_id; + LDKnativeChannelMonitorUpdate *inner; /** - * The message which should be sent. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKClosingSigned msg; -} LDKMessageSendEvent_LDKSendClosingSigned_Body; + bool is_owned; +} LDKChannelMonitorUpdate; -typedef struct LDKMessageSendEvent_LDKSendShutdown_Body { +/** + * The `Watch` trait defines behavior for watching on-chain activity pertaining to channels as + * blocks are connected and disconnected. + * + * Each channel is associated with a [`ChannelMonitor`]. Implementations of this trait are + * responsible for maintaining a set of monitors such that they can be updated accordingly as + * channel state changes and HTLCs are resolved. See method documentation for specific + * requirements. + * + * Implementations **must** ensure that updates are successfully applied and persisted upon method + * completion. If an update fails with a [`PermanentFailure`], then it must immediately shut down + * without taking any further action such as persisting the current state. + * + * If an implementation maintains multiple instances of a channel's monitor (e.g., by storing + * backup copies), then it must ensure that updates are applied across all instances. Otherwise, it + * could result in a revoked transaction being broadcast, allowing the counterparty to claim all + * funds in the channel. See [`ChannelMonitorUpdateErr`] for more details about how to handle + * multiple instances. + * + * [`ChannelMonitor`]: channelmonitor::ChannelMonitor + * [`ChannelMonitorUpdateErr`]: channelmonitor::ChannelMonitorUpdateErr + * [`PermanentFailure`]: channelmonitor::ChannelMonitorUpdateErr::PermanentFailure + */ +typedef struct LDKWatch { /** - * The node_id of the node which should receive this message + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - struct LDKPublicKey node_id; + void *this_arg; /** - * The message which should be sent. + * Watches a channel identified by `funding_txo` using `monitor`. + * + * Implementations are responsible for watching the chain for the funding transaction along + * with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means + * calling [`block_connected`] and [`block_disconnected`] on the monitor. + * + * [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch + * [`block_connected`]: channelmonitor::ChannelMonitor::block_connected + * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected */ - struct LDKShutdown msg; -} LDKMessageSendEvent_LDKSendShutdown_Body; - -typedef struct LDKMessageSendEvent_LDKSendChannelReestablish_Body { + struct LDKCResult_NoneChannelMonitorUpdateErrZ (*watch_channel)(const void *this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor); /** - * The node_id of the node which should receive this message + * Updates a channel identified by `funding_txo` by applying `update` to its monitor. + * + * Implementations must call [`update_monitor`] with the given update. See + * [`ChannelMonitorUpdateErr`] for invariants around returning an error. + * + * [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor + * [`ChannelMonitorUpdateErr`]: channelmonitor::ChannelMonitorUpdateErr */ - struct LDKPublicKey node_id; + struct LDKCResult_NoneChannelMonitorUpdateErrZ (*update_channel)(const void *this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update); /** - * The message which should be sent. + * Returns any monitor events since the last call. Subsequent calls must only return new + * events. */ - struct LDKChannelReestablish msg; -} LDKMessageSendEvent_LDKSendChannelReestablish_Body; - -typedef struct LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body { + struct LDKCVec_MonitorEventZ (*release_pending_monitor_events)(const void *this_arg); /** - * The channel_announcement which should be sent. + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. */ - struct LDKChannelAnnouncement msg; + void (*free)(void *this_arg); +} LDKWatch; + +/** + * An interface to send a transaction to the Bitcoin network. + */ +typedef struct LDKBroadcasterInterface { /** - * The followup channel_update which should be sent. + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - struct LDKChannelUpdate update_msg; -} LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body; - -typedef struct LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body { + void *this_arg; /** - * The node_announcement which should be sent. + * Sends a transaction out to (hopefully) be mined. */ - struct LDKNodeAnnouncement msg; -} LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body; - -typedef struct LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body { + void (*broadcast_transaction)(const void *this_arg, struct LDKTransaction tx); /** - * The channel_update which should be sent. + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. */ - struct LDKChannelUpdate msg; -} LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body; + void (*free)(void *this_arg); +} LDKBroadcasterInterface; -typedef struct LDKMessageSendEvent_LDKHandleError_Body { +/** + * A "slice" referencing some byte array. This is simply a length-tagged pointer which does not + * own the memory pointed to by data. + */ +typedef struct LDKu8slice { /** - * The node_id of the node which should receive this message + * A pointer to the byte buffer */ - struct LDKPublicKey node_id; + const uint8_t *data; /** - * The action which should be taken. + * The number of bytes pointed to by `data`. */ - struct LDKErrorAction action; -} LDKMessageSendEvent_LDKHandleError_Body; + uintptr_t datalen; +} LDKu8slice; -typedef struct LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body { +/** + * A trait to describe an object which can get user secrets and key material. + */ +typedef struct LDKKeysInterface { /** - * The channel/node update which should be sent to NetGraphMsgHandler + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - struct LDKHTLCFailChannelUpdate update; -} LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body; - -typedef struct LDKMessageSendEvent_LDKSendChannelRangeQuery_Body { + void *this_arg; /** - * The node_id of this message recipient + * Get node secret key (aka node_id or network_key). + * + * This method must return the same value each time it is called. */ - struct LDKPublicKey node_id; + struct LDKSecretKey (*get_node_secret)(const void *this_arg); /** - * The query_channel_range which should be sent. + * Get a script pubkey which we send funds to when claiming on-chain contestable outputs. + * + * This method should return a different value each time it is called, to avoid linking + * on-chain funds across channels as controlled to the same user. */ - struct LDKQueryChannelRange msg; -} LDKMessageSendEvent_LDKSendChannelRangeQuery_Body; - -typedef struct LDKMessageSendEvent_LDKSendShortIdsQuery_Body { + struct LDKCVec_u8Z (*get_destination_script)(const void *this_arg); /** - * The node_id of this message recipient + * Get a public key which we will send funds to (in the form of a P2WPKH output) when closing + * a channel. + * + * This method should return a different value each time it is called, to avoid linking + * on-chain funds across channels as controlled to the same user. */ - struct LDKPublicKey node_id; + struct LDKPublicKey (*get_shutdown_pubkey)(const void *this_arg); /** - * The query_short_channel_ids which should be sent. + * Get a new set of Sign for per-channel secrets. These MUST be unique even if you + * restarted with some stale data! + * + * This method must return a different value each time it is called. */ - struct LDKQueryShortChannelIds msg; -} LDKMessageSendEvent_LDKSendShortIdsQuery_Body; - -typedef struct LDKMessageSendEvent_LDKSendReplyChannelRange_Body { + struct LDKSign (*get_channel_signer)(const void *this_arg, bool inbound, uint64_t channel_value_satoshis); /** - * The node_id of this message recipient + * Gets a unique, cryptographically-secure, random 32 byte value. This is used for encrypting + * onion packets and for temporary channel IDs. There is no requirement that these be + * persisted anywhere, though they must be unique across restarts. + * + * This method must return a different value each time it is called. */ - struct LDKPublicKey node_id; + struct LDKThirtyTwoBytes (*get_secure_random_bytes)(const void *this_arg); /** - * The reply_channel_range which should be sent. + * Reads a `Signer` for this `KeysInterface` from the given input stream. + * This is only called during deserialization of other objects which contain + * `Sign`-implementing objects (ie `ChannelMonitor`s and `ChannelManager`s). + * The bytes are exactly those which `::write()` writes, and + * contain no versioning scheme. You may wish to include your own version prefix and ensure + * you've read all of the provided bytes to ensure no corruption occurred. */ - struct LDKReplyChannelRange msg; -} LDKMessageSendEvent_LDKSendReplyChannelRange_Body; - -typedef struct MUST_USE_STRUCT LDKMessageSendEvent { - LDKMessageSendEvent_Tag tag; - union { - LDKMessageSendEvent_LDKSendAcceptChannel_Body send_accept_channel; - LDKMessageSendEvent_LDKSendOpenChannel_Body send_open_channel; - LDKMessageSendEvent_LDKSendFundingCreated_Body send_funding_created; - LDKMessageSendEvent_LDKSendFundingSigned_Body send_funding_signed; - LDKMessageSendEvent_LDKSendFundingLocked_Body send_funding_locked; - LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body send_announcement_signatures; - LDKMessageSendEvent_LDKUpdateHTLCs_Body update_htl_cs; - LDKMessageSendEvent_LDKSendRevokeAndACK_Body send_revoke_and_ack; - LDKMessageSendEvent_LDKSendClosingSigned_Body send_closing_signed; - LDKMessageSendEvent_LDKSendShutdown_Body send_shutdown; - LDKMessageSendEvent_LDKSendChannelReestablish_Body send_channel_reestablish; - LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body broadcast_channel_announcement; - LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body broadcast_node_announcement; - LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body broadcast_channel_update; - LDKMessageSendEvent_LDKHandleError_Body handle_error; - LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body payment_failure_network_update; - LDKMessageSendEvent_LDKSendChannelRangeQuery_Body send_channel_range_query; - LDKMessageSendEvent_LDKSendShortIdsQuery_Body send_short_ids_query; - LDKMessageSendEvent_LDKSendReplyChannelRange_Body send_reply_channel_range; - }; -} LDKMessageSendEvent; - -/** - * A dynamically-allocated array of crate::lightning::util::events::MessageSendEvents of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_MessageSendEventZ { + struct LDKCResult_SignDecodeErrorZ (*read_chan_signer)(const void *this_arg, struct LDKu8slice reader); /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * Sign an invoice's preimage (note that this is the preimage of the invoice, not the HTLC's + * preimage). By parameterizing by the preimage instead of the hash, we allow implementors of + * this trait to parse the invoice and make sure they're signing what they expect, rather than + * blindly signing the hash. */ - struct LDKMessageSendEvent *data; + struct LDKCResult_RecoverableSignatureNoneZ (*sign_invoice)(const void *this_arg, struct LDKCVec_u8Z invoice_preimage); /** - * The number of elements pointed to by `data`. + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. */ - uintptr_t datalen; -} LDKCVec_MessageSendEventZ; + void (*free)(void *this_arg); +} LDKKeysInterface; /** - * The contents of CResult_boolLightningErrorZ + * A trait which should be implemented to provide feerate information on a number of time + * horizons. + * + * Note that all of the functions implemented here *must* be reentrant-safe (obviously - they're + * called from inside the library in response to chain events, P2P events, or timer events). */ -typedef union LDKCResult_boolLightningErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - bool *result; +typedef struct LDKFeeEstimator { /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - struct LDKLightningError *err; -} LDKCResult_boolLightningErrorZPtr; - -/** - * A CResult_boolLightningErrorZ represents the result of a fallible operation, - * containing a bool on success and a crate::lightning::ln::msgs::LightningError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_boolLightningErrorZ { + void *this_arg; /** - * The contents of this CResult_boolLightningErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * Gets estimated satoshis of fee required per 1000 Weight-Units. + * + * Must be no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later round-downs + * don't put us below 1 satoshi-per-byte). + * + * This translates to: + * * satoshis-per-byte * 250 + * * ceil(satoshis-per-kbyte / 4) */ - union LDKCResult_boolLightningErrorZPtr contents; + uint32_t (*get_est_sat_per_1000_weight)(const void *this_arg, enum LDKConfirmationTarget confirmation_target); /** - * Whether this CResult_boolLightningErrorZ represents a success state. + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. */ - bool result_ok; -} LDKCResult_boolLightningErrorZ; + void (*free)(void *this_arg); +} LDKFeeEstimator; /** - * A tuple of 3 elements. See the individual fields for the types contained. + * A trait encapsulating the operations required of a logger */ -typedef struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ { +typedef struct LDKLogger { /** - * The element at position 0 + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - struct LDKChannelAnnouncement a; + void *this_arg; /** - * The element at position 1 + * Logs the `Record` */ - struct LDKChannelUpdate b; + void (*log)(const void *this_arg, const char *record); /** - * The element at position 2 + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. */ - struct LDKChannelUpdate c; -} LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ; + void (*free)(void *this_arg); +} LDKLogger; + + /** - * A dynamically-allocated array of crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZs of arbitrary size. - * This corresponds to std::vector in C++ + * Manager which keeps track of a number of channels and sends messages to the appropriate + * channel, also tracking HTLC preimages and forwarding onion packets appropriately. + * + * Implements ChannelMessageHandler, handling the multi-channel parts and passing things through + * to individual Channels. + * + * Implements Writeable to write out all channel state to disk. Implies peer_disconnected() for + * all peers during write/read (though does not modify this instance, only the instance being + * serialized). This will result in any channels which have not yet exchanged funding_created (ie + * called funding_transaction_generated for outbound channels). + * + * Note that you can be a bit lazier about writing out ChannelManager than you can be with + * ChannelMonitors. With ChannelMonitors you MUST write each monitor update out to disk before + * returning from chain::Watch::watch_/update_channel, with ChannelManagers, writing updates + * happens out-of-band (and will prevent any other ChannelManager operations from occurring during + * the serialization process). If the deserialized version is out-of-date compared to the + * ChannelMonitors passed by reference to read(), those channels will be force-closed based on the + * ChannelMonitor state and no funds will be lost (mod on-chain transaction fees). + * + * Note that the deserializer is only implemented for (BlockHash, ChannelManager), which + * tells you the last block hash which was block_connect()ed. You MUST rescan any blocks along + * the \"reorg path\" (ie call block_disconnected() until you get to a common block and then call + * block_connected() to step towards your best block) upon deserialization before using the + * object! + * + * Note that ChannelManager is responsible for tracking liveness of its channels and generating + * ChannelUpdate messages informing peers that the channel is temporarily disabled. To avoid + * spam due to quick disconnection/reconnection, updates are not sent until the channel has been + * offline for a full minute. In order to track this, you must call + * timer_tick_occurred roughly once per minute, though it doesn't have to be perfect. + * + * Rather than using a plain ChannelManager, it is preferable to use either a SimpleArcChannelManager + * a SimpleRefChannelManager, for conciseness. See their documentation for more details, but + * essentially you should default to using a SimpleRefChannelManager, and use a + * SimpleArcChannelManager when you require a ChannelManager with a static lifetime, such as when + * you're using lightning-net-tokio. */ -typedef struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ { +typedef struct MUST_USE_STRUCT LDKChannelManager { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *data; + LDKnativeChannelManager *inner; /** - * The number of elements pointed to by `data`. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uintptr_t datalen; -} LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ; + bool is_owned; +} LDKChannelManager; /** - * A dynamically-allocated array of crate::lightning::ln::msgs::NodeAnnouncements of arbitrary size. - * This corresponds to std::vector in C++ + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef struct LDKCVec_NodeAnnouncementZ { +typedef struct LDKC2Tuple_BlockHashChannelManagerZ { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The element at position 0 */ - struct LDKNodeAnnouncement *data; + struct LDKThirtyTwoBytes a; /** - * The number of elements pointed to by `data`. + * The element at position 1 */ - uintptr_t datalen; -} LDKCVec_NodeAnnouncementZ; + struct LDKChannelManager b; +} LDKC2Tuple_BlockHashChannelManagerZ; /** - * The contents of CResult_NoneLightningErrorZ + * The contents of CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ */ -typedef union LDKCResult_NoneLightningErrorZPtr { +typedef union LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr { /** - * Note that this value is always NULL, as there are no contents in the OK variant + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - void *result; + struct LDKC2Tuple_BlockHashChannelManagerZ *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKLightningError *err; -} LDKCResult_NoneLightningErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr; /** - * A CResult_NoneLightningErrorZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning::ln::msgs::LightningError on failure. + * A CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ represents the result of a fallible operation, + * containing a crate::c_types::derived::C2Tuple_BlockHashChannelManagerZ on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NoneLightningErrorZ { +typedef struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ { /** - * The contents of this CResult_NoneLightningErrorZ, accessible via either + * The contents of this CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NoneLightningErrorZPtr contents; + union LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr contents; /** - * Whether this CResult_NoneLightningErrorZ represents a success state. + * Whether this CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NoneLightningErrorZ; - -/** - * A dynamically-allocated array of crate::c_types::PublicKeys of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_PublicKeyZ { - /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). - */ - struct LDKPublicKey *data; - /** - * The number of elements pointed to by `data`. - */ - uintptr_t datalen; -} LDKCVec_PublicKeyZ; +} LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ; /** - * Error for PeerManager errors. If you get one of these, you must disconnect the socket and - * generate no further read_event/write_buffer_space_avail/socket_disconnected calls for the - * descriptor. + * Options which apply on a per-channel basis and may change at runtime or based on negotiation + * with our counterparty. */ -typedef struct MUST_USE_STRUCT LDKPeerHandleError { +typedef struct MUST_USE_STRUCT LDKChannelConfig { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativePeerHandleError *inner; + LDKnativeChannelConfig *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKPeerHandleError; +} LDKChannelConfig; /** - * The contents of CResult_CVec_u8ZPeerHandleErrorZ + * The contents of CResult_ChannelConfigDecodeErrorZ */ -typedef union LDKCResult_CVec_u8ZPeerHandleErrorZPtr { +typedef union LDKCResult_ChannelConfigDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKCVec_u8Z *result; + struct LDKChannelConfig *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKPeerHandleError *err; -} LDKCResult_CVec_u8ZPeerHandleErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_ChannelConfigDecodeErrorZPtr; /** - * A CResult_CVec_u8ZPeerHandleErrorZ represents the result of a fallible operation, - * containing a crate::c_types::derived::CVec_u8Z on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure. + * A CResult_ChannelConfigDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::util::config::ChannelConfig on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_CVec_u8ZPeerHandleErrorZ { +typedef struct LDKCResult_ChannelConfigDecodeErrorZ { /** - * The contents of this CResult_CVec_u8ZPeerHandleErrorZ, accessible via either + * The contents of this CResult_ChannelConfigDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_CVec_u8ZPeerHandleErrorZPtr contents; + union LDKCResult_ChannelConfigDecodeErrorZPtr contents; /** - * Whether this CResult_CVec_u8ZPeerHandleErrorZ represents a success state. + * Whether this CResult_ChannelConfigDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_CVec_u8ZPeerHandleErrorZ; +} LDKCResult_ChannelConfigDecodeErrorZ; /** - * The contents of CResult_NonePeerHandleErrorZ + * The contents of CResult_OutPointDecodeErrorZ */ -typedef union LDKCResult_NonePeerHandleErrorZPtr { +typedef union LDKCResult_OutPointDecodeErrorZPtr { /** - * Note that this value is always NULL, as there are no contents in the OK variant + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - void *result; + struct LDKOutPoint *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKPeerHandleError *err; -} LDKCResult_NonePeerHandleErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_OutPointDecodeErrorZPtr; /** - * A CResult_NonePeerHandleErrorZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure. + * A CResult_OutPointDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::transaction::OutPoint on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NonePeerHandleErrorZ { +typedef struct LDKCResult_OutPointDecodeErrorZ { /** - * The contents of this CResult_NonePeerHandleErrorZ, accessible via either + * The contents of this CResult_OutPointDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NonePeerHandleErrorZPtr contents; + union LDKCResult_OutPointDecodeErrorZPtr contents; /** - * Whether this CResult_NonePeerHandleErrorZ represents a success state. + * Whether this CResult_OutPointDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NonePeerHandleErrorZ; +} LDKCResult_OutPointDecodeErrorZ; /** - * The contents of CResult_boolPeerHandleErrorZ + * The contents of CResult_SiPrefixNoneZ */ -typedef union LDKCResult_boolPeerHandleErrorZPtr { +typedef union LDKCResult_SiPrefixNoneZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - bool *result; + enum LDKSiPrefix *result; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Note that this value is always NULL, as there are no contents in the Err variant */ - struct LDKPeerHandleError *err; -} LDKCResult_boolPeerHandleErrorZPtr; + void *err; +} LDKCResult_SiPrefixNoneZPtr; /** - * A CResult_boolPeerHandleErrorZ represents the result of a fallible operation, - * containing a bool on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure. + * A CResult_SiPrefixNoneZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::SiPrefix on success and a () on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_boolPeerHandleErrorZ { +typedef struct LDKCResult_SiPrefixNoneZ { /** - * The contents of this CResult_boolPeerHandleErrorZ, accessible via either + * The contents of this CResult_SiPrefixNoneZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_boolPeerHandleErrorZPtr contents; + union LDKCResult_SiPrefixNoneZPtr contents; /** - * Whether this CResult_boolPeerHandleErrorZ represents a success state. + * Whether this CResult_SiPrefixNoneZ represents a success state. */ bool result_ok; -} LDKCResult_boolPeerHandleErrorZ; +} LDKCResult_SiPrefixNoneZ; + + /** - * The contents of CResult_TxOutAccessErrorZ + * Represents a syntactically and semantically correct lightning BOLT11 invoice. + * + * There are three ways to construct an `Invoice`: + * 1. using `InvoiceBuilder` + * 2. using `Invoice::from_signed(SignedRawInvoice)` + * 3. using `str::parse::(&str)` */ -typedef union LDKCResult_TxOutAccessErrorZPtr { +typedef struct MUST_USE_STRUCT LDKInvoice { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKTxOut *result; + LDKnativeInvoice *inner; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - enum LDKAccessError *err; -} LDKCResult_TxOutAccessErrorZPtr; + bool is_owned; +} LDKInvoice; /** - * A CResult_TxOutAccessErrorZ represents the result of a fallible operation, - * containing a crate::c_types::TxOut on success and a crate::lightning::chain::AccessError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * The contents of CResult_InvoiceNoneZ */ -typedef struct LDKCResult_TxOutAccessErrorZ { +typedef union LDKCResult_InvoiceNoneZPtr { /** - * The contents of this CResult_TxOutAccessErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - union LDKCResult_TxOutAccessErrorZPtr contents; + struct LDKInvoice *result; /** - * Whether this CResult_TxOutAccessErrorZ represents a success state. + * Note that this value is always NULL, as there are no contents in the Err variant */ - bool result_ok; -} LDKCResult_TxOutAccessErrorZ; + void *err; +} LDKCResult_InvoiceNoneZPtr; /** - * An enum which can either contain a crate::c_types::derived::C2Tuple_usizeTransactionZ or not + * A CResult_InvoiceNoneZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::Invoice on success and a () on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef enum LDKCOption_C2Tuple_usizeTransactionZZ_Tag { - /** - * When we're in this state, this COption_C2Tuple_usizeTransactionZZ contains a crate::c_types::derived::C2Tuple_usizeTransactionZ - */ - LDKCOption_C2Tuple_usizeTransactionZZ_Some, +typedef struct LDKCResult_InvoiceNoneZ { /** - * When we're in this state, this COption_C2Tuple_usizeTransactionZZ contains nothing + * The contents of this CResult_InvoiceNoneZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKCOption_C2Tuple_usizeTransactionZZ_None, + union LDKCResult_InvoiceNoneZPtr contents; /** - * Must be last for serialization purposes + * Whether this CResult_InvoiceNoneZ represents a success state. */ - LDKCOption_C2Tuple_usizeTransactionZZ_Sentinel, -} LDKCOption_C2Tuple_usizeTransactionZZ_Tag; - -typedef struct LDKCOption_C2Tuple_usizeTransactionZZ { - LDKCOption_C2Tuple_usizeTransactionZZ_Tag tag; - union { - struct { - struct LDKC2Tuple_usizeTransactionZ some; - }; - }; -} LDKCOption_C2Tuple_usizeTransactionZZ; + bool result_ok; +} LDKCResult_InvoiceNoneZ; /** - * Details about one direction of a channel. Received - * within a channel update. + * Represents a signed `RawInvoice` with cached hash. The signature is not checked and may be + * invalid. + * + * # Invariants + * The hash has to be either from the deserialized invoice or from the serialized `raw_invoice`. */ -typedef struct MUST_USE_STRUCT LDKDirectionalChannelInfo { +typedef struct MUST_USE_STRUCT LDKSignedRawInvoice { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeDirectionalChannelInfo *inner; + LDKnativeSignedRawInvoice *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKDirectionalChannelInfo; +} LDKSignedRawInvoice; /** - * The contents of CResult_DirectionalChannelInfoDecodeErrorZ + * The contents of CResult_SignedRawInvoiceNoneZ */ -typedef union LDKCResult_DirectionalChannelInfoDecodeErrorZPtr { +typedef union LDKCResult_SignedRawInvoiceNoneZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKDirectionalChannelInfo *result; + struct LDKSignedRawInvoice *result; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Note that this value is always NULL, as there are no contents in the Err variant */ - struct LDKDecodeError *err; -} LDKCResult_DirectionalChannelInfoDecodeErrorZPtr; + void *err; +} LDKCResult_SignedRawInvoiceNoneZPtr; /** - * A CResult_DirectionalChannelInfoDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::network_graph::DirectionalChannelInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_SignedRawInvoiceNoneZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::SignedRawInvoice on success and a () on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_DirectionalChannelInfoDecodeErrorZ { +typedef struct LDKCResult_SignedRawInvoiceNoneZ { /** - * The contents of this CResult_DirectionalChannelInfoDecodeErrorZ, accessible via either + * The contents of this CResult_SignedRawInvoiceNoneZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_DirectionalChannelInfoDecodeErrorZPtr contents; + union LDKCResult_SignedRawInvoiceNoneZPtr contents; /** - * Whether this CResult_DirectionalChannelInfoDecodeErrorZ represents a success state. + * Whether this CResult_SignedRawInvoiceNoneZ represents a success state. */ bool result_ok; -} LDKCResult_DirectionalChannelInfoDecodeErrorZ; +} LDKCResult_SignedRawInvoiceNoneZ; /** - * Details about a channel (both directions). - * Received within a channel announcement. + * Represents an syntactically correct Invoice for a payment on the lightning network, + * but without the signature information. + * De- and encoding should not lead to information loss but may lead to different hashes. + * + * For methods without docs see the corresponding methods in `Invoice`. */ -typedef struct MUST_USE_STRUCT LDKChannelInfo { +typedef struct MUST_USE_STRUCT LDKRawInvoice { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeChannelInfo *inner; + LDKnativeRawInvoice *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKChannelInfo; +} LDKRawInvoice; + + /** - * The contents of CResult_ChannelInfoDecodeErrorZ + * Recoverable signature */ -typedef union LDKCResult_ChannelInfoDecodeErrorZPtr { +typedef struct MUST_USE_STRUCT LDKInvoiceSignature { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKChannelInfo *result; + LDKnativeInvoiceSignature *inner; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKDecodeError *err; -} LDKCResult_ChannelInfoDecodeErrorZPtr; + bool is_owned; +} LDKInvoiceSignature; /** - * A CResult_ChannelInfoDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::network_graph::ChannelInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A tuple of 3 elements. See the individual fields for the types contained. */ -typedef struct LDKCResult_ChannelInfoDecodeErrorZ { +typedef struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ { /** - * The contents of this CResult_ChannelInfoDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The element at position 0 */ - union LDKCResult_ChannelInfoDecodeErrorZPtr contents; + struct LDKRawInvoice a; /** - * Whether this CResult_ChannelInfoDecodeErrorZ represents a success state. + * The element at position 1 */ - bool result_ok; -} LDKCResult_ChannelInfoDecodeErrorZ; + struct LDKThirtyTwoBytes b; + /** + * The element at position 2 + */ + struct LDKInvoiceSignature c; +} LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ; /** - * Fees for routing via a given channel or a node + * Payee public key */ -typedef struct MUST_USE_STRUCT LDKRoutingFees { +typedef struct MUST_USE_STRUCT LDKPayeePubKey { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeRoutingFees *inner; + LDKnativePayeePubKey *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKRoutingFees; +} LDKPayeePubKey; /** - * The contents of CResult_RoutingFeesDecodeErrorZ + * The contents of CResult_PayeePubKeyErrorZ */ -typedef union LDKCResult_RoutingFeesDecodeErrorZPtr { +typedef union LDKCResult_PayeePubKeyErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKRoutingFees *result; + struct LDKPayeePubKey *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_RoutingFeesDecodeErrorZPtr; + enum LDKSecp256k1Error *err; +} LDKCResult_PayeePubKeyErrorZPtr; /** - * A CResult_RoutingFeesDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::network_graph::RoutingFees on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_PayeePubKeyErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::PayeePubKey on success and a crate::c_types::Secp256k1Error on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_RoutingFeesDecodeErrorZ { +typedef struct LDKCResult_PayeePubKeyErrorZ { /** - * The contents of this CResult_RoutingFeesDecodeErrorZ, accessible via either + * The contents of this CResult_PayeePubKeyErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_RoutingFeesDecodeErrorZPtr contents; + union LDKCResult_PayeePubKeyErrorZPtr contents; /** - * Whether this CResult_RoutingFeesDecodeErrorZ represents a success state. + * Whether this CResult_PayeePubKeyErrorZ represents a success state. */ bool result_ok; -} LDKCResult_RoutingFeesDecodeErrorZ; +} LDKCResult_PayeePubKeyErrorZ; + -/** - * A 4-byte byte array. - */ -typedef struct LDKFourBytes { - /** - * The four bytes - */ - uint8_t data[4]; -} LDKFourBytes; /** - * A 16-byte byte array. + * Private routing information + * + * # Invariants + * The encoded route has to be <1024 5bit characters long (<=639 bytes or <=12 hops) + * */ -typedef struct LDKSixteenBytes { +typedef struct MUST_USE_STRUCT LDKRouteHint { /** - * The sixteen bytes + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - uint8_t data[16]; -} LDKSixteenBytes; - -/** - * A 10-byte byte array. - */ -typedef struct LDKTenBytes { + LDKnativeRouteHint *inner; /** - * The ten bytes + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uint8_t data[10]; -} LDKTenBytes; + bool is_owned; +} LDKRouteHint; /** - * An address which can be used to connect to a remote peer + * A dynamically-allocated array of crate::lightning_invoice::RouteHints of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef enum LDKNetAddress_Tag { - /** - * An IPv4 address/port on which the peer is listening. - */ - LDKNetAddress_IPv4, - /** - * An IPv6 address/port on which the peer is listening. - */ - LDKNetAddress_IPv6, - /** - * An old-style Tor onion address/port on which the peer is listening. - */ - LDKNetAddress_OnionV2, +typedef struct LDKCVec_RouteHintZ { /** - * A new-style Tor onion address/port on which the peer is listening. - * To create the human-readable \"hostname\", concatenate ed25519_pubkey, checksum, and version, - * wrap as base32 and append \".onion\". + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKNetAddress_OnionV3, + struct LDKRouteHint *data; /** - * Must be last for serialization purposes + * The number of elements pointed to by `data`. */ - LDKNetAddress_Sentinel, -} LDKNetAddress_Tag; + uintptr_t datalen; +} LDKCVec_RouteHintZ; -typedef struct LDKNetAddress_LDKIPv4_Body { - /** - * The 4-byte IPv4 address - */ - struct LDKFourBytes addr; - /** - * The port on which the node is listening - */ - uint16_t port; -} LDKNetAddress_LDKIPv4_Body; -typedef struct LDKNetAddress_LDKIPv6_Body { - /** - * The 16-byte IPv6 address - */ - struct LDKSixteenBytes addr; - /** - * The port on which the node is listening - */ - uint16_t port; -} LDKNetAddress_LDKIPv6_Body; -typedef struct LDKNetAddress_LDKOnionV2_Body { +/** + * A timestamp that refers to a date after 1 January 1970 which means its representation as UNIX + * timestamp is positive. + * + * # Invariants + * The UNIX timestamp representing the stored time has to be positive and small enough so that + * a `EpiryTime` can be added to it without an overflow. + */ +typedef struct MUST_USE_STRUCT LDKPositiveTimestamp { /** - * The bytes (usually encoded in base32 with \".onion\" appended) + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKTenBytes addr; + LDKnativePositiveTimestamp *inner; /** - * The port on which the node is listening + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uint16_t port; -} LDKNetAddress_LDKOnionV2_Body; + bool is_owned; +} LDKPositiveTimestamp; -typedef struct LDKNetAddress_LDKOnionV3_Body { +/** + * The contents of CResult_PositiveTimestampCreationErrorZ + */ +typedef union LDKCResult_PositiveTimestampCreationErrorZPtr { /** - * The ed25519 long-term public key of the peer + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKThirtyTwoBytes ed25519_pubkey; + struct LDKPositiveTimestamp *result; /** - * The checksum of the pubkey and version, as included in the onion address + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uint16_t checksum; + enum LDKCreationError *err; +} LDKCResult_PositiveTimestampCreationErrorZPtr; + +/** + * A CResult_PositiveTimestampCreationErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::PositiveTimestamp on success and a crate::lightning_invoice::CreationError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_PositiveTimestampCreationErrorZ { /** - * The version byte, as defined by the Tor Onion v3 spec. + * The contents of this CResult_PositiveTimestampCreationErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - uint8_t version; + union LDKCResult_PositiveTimestampCreationErrorZPtr contents; /** - * The port on which the node is listening + * Whether this CResult_PositiveTimestampCreationErrorZ represents a success state. */ - uint16_t port; -} LDKNetAddress_LDKOnionV3_Body; - -typedef struct MUST_USE_STRUCT LDKNetAddress { - LDKNetAddress_Tag tag; - union { - LDKNetAddress_LDKIPv4_Body i_pv4; - LDKNetAddress_LDKIPv6_Body i_pv6; - LDKNetAddress_LDKOnionV2_Body onion_v2; - LDKNetAddress_LDKOnionV3_Body onion_v3; - }; -} LDKNetAddress; + bool result_ok; +} LDKCResult_PositiveTimestampCreationErrorZ; /** - * A dynamically-allocated array of crate::lightning::ln::msgs::NetAddresss of arbitrary size. - * This corresponds to std::vector in C++ + * The contents of CResult_NoneSemanticErrorZ */ -typedef struct LDKCVec_NetAddressZ { +typedef union LDKCResult_NoneSemanticErrorZPtr { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * Note that this value is always NULL, as there are no contents in the OK variant */ - struct LDKNetAddress *data; + void *result; /** - * The number of elements pointed to by `data`. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uintptr_t datalen; -} LDKCVec_NetAddressZ; - - + enum LDKSemanticError *err; +} LDKCResult_NoneSemanticErrorZPtr; /** - * Information received in the latest node_announcement from this node. + * A CResult_NoneSemanticErrorZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning_invoice::SemanticError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKNodeAnnouncementInfo { +typedef struct LDKCResult_NoneSemanticErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_NoneSemanticErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeNodeAnnouncementInfo *inner; + union LDKCResult_NoneSemanticErrorZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_NoneSemanticErrorZ represents a success state. */ - bool is_owned; -} LDKNodeAnnouncementInfo; + bool result_ok; +} LDKCResult_NoneSemanticErrorZ; /** - * The contents of CResult_NodeAnnouncementInfoDecodeErrorZ + * The contents of CResult_InvoiceSemanticErrorZ */ -typedef union LDKCResult_NodeAnnouncementInfoDecodeErrorZPtr { +typedef union LDKCResult_InvoiceSemanticErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKNodeAnnouncementInfo *result; + struct LDKInvoice *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_NodeAnnouncementInfoDecodeErrorZPtr; + enum LDKSemanticError *err; +} LDKCResult_InvoiceSemanticErrorZPtr; /** - * A CResult_NodeAnnouncementInfoDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::network_graph::NodeAnnouncementInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_InvoiceSemanticErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::Invoice on success and a crate::lightning_invoice::SemanticError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ { +typedef struct LDKCResult_InvoiceSemanticErrorZ { /** - * The contents of this CResult_NodeAnnouncementInfoDecodeErrorZ, accessible via either + * The contents of this CResult_InvoiceSemanticErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NodeAnnouncementInfoDecodeErrorZPtr contents; + union LDKCResult_InvoiceSemanticErrorZPtr contents; /** - * Whether this CResult_NodeAnnouncementInfoDecodeErrorZ represents a success state. + * Whether this CResult_InvoiceSemanticErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NodeAnnouncementInfoDecodeErrorZ; - -/** - * A dynamically-allocated array of u64s of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_u64Z { - /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). - */ - uint64_t *data; - /** - * The number of elements pointed to by `data`. - */ - uintptr_t datalen; -} LDKCVec_u64Z; +} LDKCResult_InvoiceSemanticErrorZ; /** - * Details about a node in the network, known from the network announcement. + * Description string + * + * # Invariants + * The description can be at most 639 __bytes__ long */ -typedef struct MUST_USE_STRUCT LDKNodeInfo { +typedef struct MUST_USE_STRUCT LDKDescription { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeNodeInfo *inner; + LDKnativeDescription *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKNodeInfo; +} LDKDescription; /** - * The contents of CResult_NodeInfoDecodeErrorZ + * The contents of CResult_DescriptionCreationErrorZ */ -typedef union LDKCResult_NodeInfoDecodeErrorZPtr { +typedef union LDKCResult_DescriptionCreationErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKNodeInfo *result; + struct LDKDescription *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_NodeInfoDecodeErrorZPtr; + enum LDKCreationError *err; +} LDKCResult_DescriptionCreationErrorZPtr; /** - * A CResult_NodeInfoDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::network_graph::NodeInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_DescriptionCreationErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::Description on success and a crate::lightning_invoice::CreationError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NodeInfoDecodeErrorZ { +typedef struct LDKCResult_DescriptionCreationErrorZ { /** - * The contents of this CResult_NodeInfoDecodeErrorZ, accessible via either + * The contents of this CResult_DescriptionCreationErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NodeInfoDecodeErrorZPtr contents; + union LDKCResult_DescriptionCreationErrorZPtr contents; /** - * Whether this CResult_NodeInfoDecodeErrorZ represents a success state. + * Whether this CResult_DescriptionCreationErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NodeInfoDecodeErrorZ; +} LDKCResult_DescriptionCreationErrorZ; /** - * Represents the network as nodes and channels between them + * Positive duration that defines when (relatively to the timestamp) in the future the invoice + * expires + * + * # Invariants + * The number of seconds this expiry time represents has to be in the range + * `0...(SYSTEM_TIME_MAX_UNIX_TIMESTAMP - MAX_EXPIRY_TIME)` to avoid overflows when adding it to a + * timestamp */ -typedef struct MUST_USE_STRUCT LDKNetworkGraph { +typedef struct MUST_USE_STRUCT LDKExpiryTime { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeNetworkGraph *inner; + LDKnativeExpiryTime *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKNetworkGraph; +} LDKExpiryTime; /** - * The contents of CResult_NetworkGraphDecodeErrorZ + * The contents of CResult_ExpiryTimeCreationErrorZ */ -typedef union LDKCResult_NetworkGraphDecodeErrorZPtr { +typedef union LDKCResult_ExpiryTimeCreationErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKNetworkGraph *result; + struct LDKExpiryTime *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_NetworkGraphDecodeErrorZPtr; + enum LDKCreationError *err; +} LDKCResult_ExpiryTimeCreationErrorZPtr; /** - * A CResult_NetworkGraphDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::network_graph::NetworkGraph on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_ExpiryTimeCreationErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::ExpiryTime on success and a crate::lightning_invoice::CreationError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NetworkGraphDecodeErrorZ { +typedef struct LDKCResult_ExpiryTimeCreationErrorZ { /** - * The contents of this CResult_NetworkGraphDecodeErrorZ, accessible via either + * The contents of this CResult_ExpiryTimeCreationErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NetworkGraphDecodeErrorZPtr contents; + union LDKCResult_ExpiryTimeCreationErrorZPtr contents; /** - * Whether this CResult_NetworkGraphDecodeErrorZ represents a success state. + * Whether this CResult_ExpiryTimeCreationErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NetworkGraphDecodeErrorZ; - +} LDKCResult_ExpiryTimeCreationErrorZ; +/** + * The contents of CResult_RouteHintCreationErrorZ + */ +typedef union LDKCResult_RouteHintCreationErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKRouteHint *result; + /** + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. + */ + enum LDKCreationError *err; +} LDKCResult_RouteHintCreationErrorZPtr; /** - * Features used within an `init` message. + * A CResult_RouteHintCreationErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::RouteHint on success and a crate::lightning_invoice::CreationError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKInitFeatures { +typedef struct LDKCResult_RouteHintCreationErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_RouteHintCreationErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeInitFeatures *inner; + union LDKCResult_RouteHintCreationErrorZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_RouteHintCreationErrorZ represents a success state. */ - bool is_owned; -} LDKInitFeatures; + bool result_ok; +} LDKCResult_RouteHintCreationErrorZ; /** - * The contents of CResult_InitFeaturesDecodeErrorZ + * The contents of CResult_StringErrorZ */ -typedef union LDKCResult_InitFeaturesDecodeErrorZPtr { +typedef union LDKCResult_StringErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKInitFeatures *result; + struct LDKStr *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_InitFeaturesDecodeErrorZPtr; + enum LDKSecp256k1Error *err; +} LDKCResult_StringErrorZPtr; /** - * A CResult_InitFeaturesDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::features::InitFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_StringErrorZ represents the result of a fallible operation, + * containing a crate::c_types::Str on success and a crate::c_types::Secp256k1Error on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_InitFeaturesDecodeErrorZ { +typedef struct LDKCResult_StringErrorZ { /** - * The contents of this CResult_InitFeaturesDecodeErrorZ, accessible via either + * The contents of this CResult_StringErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_InitFeaturesDecodeErrorZPtr contents; + union LDKCResult_StringErrorZPtr contents; /** - * Whether this CResult_InitFeaturesDecodeErrorZ represents a success state. + * Whether this CResult_StringErrorZ represents a success state. */ bool result_ok; -} LDKCResult_InitFeaturesDecodeErrorZ; - +} LDKCResult_StringErrorZ; +/** + * The contents of CResult_ChannelMonitorUpdateDecodeErrorZ + */ +typedef union LDKCResult_ChannelMonitorUpdateDecodeErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKChannelMonitorUpdate *result; + /** + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. + */ + struct LDKDecodeError *err; +} LDKCResult_ChannelMonitorUpdateDecodeErrorZPtr; /** - * Features used within a `node_announcement` message. + * A CResult_ChannelMonitorUpdateDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::channelmonitor::ChannelMonitorUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKNodeFeatures { +typedef struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_ChannelMonitorUpdateDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeNodeFeatures *inner; + union LDKCResult_ChannelMonitorUpdateDecodeErrorZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_ChannelMonitorUpdateDecodeErrorZ represents a success state. */ - bool is_owned; -} LDKNodeFeatures; + bool result_ok; +} LDKCResult_ChannelMonitorUpdateDecodeErrorZ; /** - * The contents of CResult_NodeFeaturesDecodeErrorZ + * The contents of CResult_HTLCUpdateDecodeErrorZ */ -typedef union LDKCResult_NodeFeaturesDecodeErrorZPtr { +typedef union LDKCResult_HTLCUpdateDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKNodeFeatures *result; + struct LDKHTLCUpdate *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_NodeFeaturesDecodeErrorZPtr; +} LDKCResult_HTLCUpdateDecodeErrorZPtr; /** - * A CResult_NodeFeaturesDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::features::NodeFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_HTLCUpdateDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::channelmonitor::HTLCUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NodeFeaturesDecodeErrorZ { +typedef struct LDKCResult_HTLCUpdateDecodeErrorZ { /** - * The contents of this CResult_NodeFeaturesDecodeErrorZ, accessible via either + * The contents of this CResult_HTLCUpdateDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NodeFeaturesDecodeErrorZPtr contents; + union LDKCResult_HTLCUpdateDecodeErrorZPtr contents; /** - * Whether this CResult_NodeFeaturesDecodeErrorZ represents a success state. + * Whether this CResult_HTLCUpdateDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NodeFeaturesDecodeErrorZ; +} LDKCResult_HTLCUpdateDecodeErrorZ; /** - * Features used within a `channel_announcement` message. + * General Err type for ChannelMonitor actions. Generally, this implies that the data provided is + * inconsistent with the ChannelMonitor being called. eg for ChannelMonitor::update_monitor this + * means you tried to update a monitor for a different channel or the ChannelMonitorUpdate was + * corrupted. + * Contains a developer-readable error message. */ -typedef struct MUST_USE_STRUCT LDKChannelFeatures { +typedef struct MUST_USE_STRUCT LDKMonitorUpdateError { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeChannelFeatures *inner; + LDKnativeMonitorUpdateError *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKChannelFeatures; +} LDKMonitorUpdateError; /** - * The contents of CResult_ChannelFeaturesDecodeErrorZ + * The contents of CResult_NoneMonitorUpdateErrorZ */ -typedef union LDKCResult_ChannelFeaturesDecodeErrorZPtr { +typedef union LDKCResult_NoneMonitorUpdateErrorZPtr { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * Note that this value is always NULL, as there are no contents in the OK variant */ - struct LDKChannelFeatures *result; + void *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_ChannelFeaturesDecodeErrorZPtr; + struct LDKMonitorUpdateError *err; +} LDKCResult_NoneMonitorUpdateErrorZPtr; /** - * A CResult_ChannelFeaturesDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::features::ChannelFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NoneMonitorUpdateErrorZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning::chain::channelmonitor::MonitorUpdateError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_ChannelFeaturesDecodeErrorZ { +typedef struct LDKCResult_NoneMonitorUpdateErrorZ { /** - * The contents of this CResult_ChannelFeaturesDecodeErrorZ, accessible via either + * The contents of this CResult_NoneMonitorUpdateErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_ChannelFeaturesDecodeErrorZPtr contents; + union LDKCResult_NoneMonitorUpdateErrorZPtr contents; /** - * Whether this CResult_ChannelFeaturesDecodeErrorZ represents a success state. + * Whether this CResult_NoneMonitorUpdateErrorZ represents a success state. */ bool result_ok; -} LDKCResult_ChannelFeaturesDecodeErrorZ; - - +} LDKCResult_NoneMonitorUpdateErrorZ; /** - * Features used within an invoice. + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef struct MUST_USE_STRUCT LDKInvoiceFeatures { +typedef struct LDKC2Tuple_OutPointScriptZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The element at position 0 */ - LDKnativeInvoiceFeatures *inner; + struct LDKOutPoint a; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The element at position 1 */ - bool is_owned; -} LDKInvoiceFeatures; + struct LDKCVec_u8Z b; +} LDKC2Tuple_OutPointScriptZ; /** - * The contents of CResult_InvoiceFeaturesDecodeErrorZ + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef union LDKCResult_InvoiceFeaturesDecodeErrorZPtr { +typedef struct LDKC2Tuple_u32ScriptZ { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The element at position 0 */ - struct LDKInvoiceFeatures *result; + uint32_t a; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The element at position 1 */ - struct LDKDecodeError *err; -} LDKCResult_InvoiceFeaturesDecodeErrorZPtr; + struct LDKCVec_u8Z b; +} LDKC2Tuple_u32ScriptZ; /** - * A CResult_InvoiceFeaturesDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::features::InvoiceFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32ScriptZs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKCResult_InvoiceFeaturesDecodeErrorZ { +typedef struct LDKCVec_C2Tuple_u32ScriptZZ { /** - * The contents of this CResult_InvoiceFeaturesDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - union LDKCResult_InvoiceFeaturesDecodeErrorZPtr contents; + struct LDKC2Tuple_u32ScriptZ *data; /** - * Whether this CResult_InvoiceFeaturesDecodeErrorZ represents a success state. + * The number of elements pointed to by `data`. */ - bool result_ok; -} LDKCResult_InvoiceFeaturesDecodeErrorZ; + uintptr_t datalen; +} LDKCVec_C2Tuple_u32ScriptZZ; /** - * The contents of CResult_NetAddressu8Z + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef union LDKCResult_NetAddressu8ZPtr { +typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The element at position 0 */ - struct LDKNetAddress *result; + struct LDKThirtyTwoBytes a; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The element at position 1 */ - uint8_t *err; -} LDKCResult_NetAddressu8ZPtr; + struct LDKCVec_C2Tuple_u32ScriptZZ b; +} LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ; /** - * A CResult_NetAddressu8Z represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::NetAddress on success and a u8 on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A dynamically-allocated array of crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKCResult_NetAddressu8Z { +typedef struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ { /** - * The contents of this CResult_NetAddressu8Z, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - union LDKCResult_NetAddressu8ZPtr contents; + struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *data; /** - * Whether this CResult_NetAddressu8Z represents a success state. + * The number of elements pointed to by `data`. */ - bool result_ok; -} LDKCResult_NetAddressu8Z; + uintptr_t datalen; +} LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ; /** - * The contents of CResult_CResult_NetAddressu8ZDecodeErrorZ + * An Event which you should probably take some action in response to. + * + * Note that while Writeable and Readable are implemented for Event, you probably shouldn't use + * them directly as they don't round-trip exactly (for example FundingGenerationReady is never + * written as it makes no sense to respond to it after reconnecting to peers). */ -typedef union LDKCResult_CResult_NetAddressu8ZDecodeErrorZPtr { +typedef enum LDKEvent_Tag { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * Used to indicate that the client should generate a funding transaction with the given + * parameters and then call ChannelManager::funding_transaction_generated. + * Generated in ChannelManager message handling. + * Note that *all inputs* in the funding transaction must spend SegWit outputs or your + * counterparty can steal your funds! */ - struct LDKCResult_NetAddressu8Z *result; + LDKEvent_FundingGenerationReady, /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates we've received money! Just gotta dig out that payment preimage and feed it to + * ChannelManager::claim_funds to get it.... + * Note that if the preimage is not known or the amount paid is incorrect, you should call + * ChannelManager::fail_htlc_backwards to free up resources for this HTLC and avoid + * network congestion. + * The amount paid should be considered 'incorrect' when it is less than or more than twice + * the amount expected. + * If you fail to call either ChannelManager::claim_funds or + * ChannelManager::fail_htlc_backwards within the HTLC's timeout, the HTLC will be + * automatically failed. + */ + LDKEvent_PaymentReceived, + /** + * Indicates an outbound payment we made succeeded (ie it made it all the way to its target + * and we got back the payment preimage for it). + */ + LDKEvent_PaymentSent, + /** + * Indicates an outbound payment we made failed. Probably some intermediary node dropped + * something. You may wish to retry with a different route. + */ + LDKEvent_PaymentFailed, + /** + * Used to indicate that ChannelManager::process_pending_htlc_forwards should be called at a + * time in the future. + */ + LDKEvent_PendingHTLCsForwardable, + /** + * Used to indicate that an output was generated on-chain which you should know how to spend. + * Such an output will *not* ever be spent by rust-lightning, and are not at risk of your + * counterparty spending them due to some kind of timeout. Thus, you need to store them + * somewhere and spend them when you create on-chain transactions. + */ + LDKEvent_SpendableOutputs, + /** + * Must be last for serialization purposes + */ + LDKEvent_Sentinel, +} LDKEvent_Tag; + +typedef struct LDKEvent_LDKFundingGenerationReady_Body { + /** + * The random channel_id we picked which you'll need to pass into + * ChannelManager::funding_transaction_generated. + */ + struct LDKThirtyTwoBytes temporary_channel_id; + /** + * The value, in satoshis, that the output should have. + */ + uint64_t channel_value_satoshis; + /** + * The script which should be used in the transaction output. + */ + struct LDKCVec_u8Z output_script; + /** + * The value passed in to ChannelManager::create_channel + */ + uint64_t user_channel_id; +} LDKEvent_LDKFundingGenerationReady_Body; + +typedef struct LDKEvent_LDKPaymentReceived_Body { + /** + * The hash for which the preimage should be handed to the ChannelManager. + */ + struct LDKThirtyTwoBytes payment_hash; + /** + * The preimage to the payment_hash, if the payment hash (and secret) were fetched via + * [`ChannelManager::create_inbound_payment`]. If provided, this can be handed directly to + * [`ChannelManager::claim_funds`]. + * + * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment + * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds + */ + struct LDKThirtyTwoBytes payment_preimage; + /** + * The \"payment secret\". This authenticates the sender to the recipient, preventing a + * number of deanonymization attacks during the routing process. + * It is provided here for your reference, however its accuracy is enforced directly by + * [`ChannelManager`] using the values you previously provided to + * [`ChannelManager::create_inbound_payment`] or + * [`ChannelManager::create_inbound_payment_for_hash`]. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager + * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment + * [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash + */ + struct LDKThirtyTwoBytes payment_secret; + /** + * The value, in thousandths of a satoshi, that this payment is for. Note that you must + * compare this to the expected value before accepting the payment (as otherwise you are + * providing proof-of-payment for less than the value you expected!). + */ + uint64_t amt; + /** + * This is the `user_payment_id` which was provided to + * [`ChannelManager::create_inbound_payment_for_hash`] or + * [`ChannelManager::create_inbound_payment`]. It has no meaning inside of LDK and is + * simply copied here. It may be used to correlate PaymentReceived events with invoice + * metadata stored elsewhere. + * + * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment + * [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash + */ + uint64_t user_payment_id; +} LDKEvent_LDKPaymentReceived_Body; + +typedef struct LDKEvent_LDKPaymentSent_Body { + /** + * The preimage to the hash given to ChannelManager::send_payment. + * Note that this serves as a payment receipt, if you wish to have such a thing, you must + * store it somehow! */ - struct LDKDecodeError *err; -} LDKCResult_CResult_NetAddressu8ZDecodeErrorZPtr; + struct LDKThirtyTwoBytes payment_preimage; +} LDKEvent_LDKPaymentSent_Body; -/** - * A CResult_CResult_NetAddressu8ZDecodeErrorZ represents the result of a fallible operation, - * containing a crate::c_types::derived::CResult_NetAddressu8Z on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ { +typedef struct LDKEvent_LDKPaymentFailed_Body { /** - * The contents of this CResult_CResult_NetAddressu8ZDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The hash which was given to ChannelManager::send_payment. */ - union LDKCResult_CResult_NetAddressu8ZDecodeErrorZPtr contents; + struct LDKThirtyTwoBytes payment_hash; /** - * Whether this CResult_CResult_NetAddressu8ZDecodeErrorZ represents a success state. + * Indicates the payment was rejected for some reason by the recipient. This implies that + * the payment has failed, not just the route in question. If this is not set, you may + * retry the payment via a different route. */ - bool result_ok; -} LDKCResult_CResult_NetAddressu8ZDecodeErrorZ; - - + bool rejected_by_dest; +} LDKEvent_LDKPaymentFailed_Body; -/** - * An update_add_htlc message to be sent or received from a peer - */ -typedef struct MUST_USE_STRUCT LDKUpdateAddHTLC { +typedef struct LDKEvent_LDKPendingHTLCsForwardable_Body { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The minimum amount of time that should be waited prior to calling + * process_pending_htlc_forwards. To increase the effort required to correlate payments, + * you should wait a random amount of time in roughly the range (now + time_forwardable, + * now + 5*time_forwardable). */ - LDKnativeUpdateAddHTLC *inner; + uint64_t time_forwardable; +} LDKEvent_LDKPendingHTLCsForwardable_Body; + +typedef struct LDKEvent_LDKSpendableOutputs_Body { /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The outputs which you should store as spendable by you. */ - bool is_owned; -} LDKUpdateAddHTLC; + struct LDKCVec_SpendableOutputDescriptorZ outputs; +} LDKEvent_LDKSpendableOutputs_Body; + +typedef struct MUST_USE_STRUCT LDKEvent { + LDKEvent_Tag tag; + union { + LDKEvent_LDKFundingGenerationReady_Body funding_generation_ready; + LDKEvent_LDKPaymentReceived_Body payment_received; + LDKEvent_LDKPaymentSent_Body payment_sent; + LDKEvent_LDKPaymentFailed_Body payment_failed; + LDKEvent_LDKPendingHTLCsForwardable_Body pending_htl_cs_forwardable; + LDKEvent_LDKSpendableOutputs_Body spendable_outputs; + }; +} LDKEvent; /** - * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateAddHTLCs of arbitrary size. + * A dynamically-allocated array of crate::lightning::util::events::Events of arbitrary size. * This corresponds to std::vector in C++ */ -typedef struct LDKCVec_UpdateAddHTLCZ { +typedef struct LDKCVec_EventZ { /** * The elements in the array. * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKUpdateAddHTLC *data; + struct LDKEvent *data; /** * The number of elements pointed to by `data`. */ uintptr_t datalen; -} LDKCVec_UpdateAddHTLCZ; - - - -/** - * An update_fulfill_htlc message to be sent or received from a peer - */ -typedef struct MUST_USE_STRUCT LDKUpdateFulfillHTLC { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativeUpdateFulfillHTLC *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKUpdateFulfillHTLC; +} LDKCVec_EventZ; /** - * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFulfillHTLCs of arbitrary size. + * A dynamically-allocated array of crate::c_types::Transactions of arbitrary size. * This corresponds to std::vector in C++ */ -typedef struct LDKCVec_UpdateFulfillHTLCZ { +typedef struct LDKCVec_TransactionZ { /** * The elements in the array. * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKUpdateFulfillHTLC *data; + struct LDKTransaction *data; /** * The number of elements pointed to by `data`. */ uintptr_t datalen; -} LDKCVec_UpdateFulfillHTLCZ; - - +} LDKCVec_TransactionZ; /** - * An update_fail_htlc message to be sent or received from a peer + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef struct MUST_USE_STRUCT LDKUpdateFailHTLC { +typedef struct LDKC2Tuple_u32TxOutZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The element at position 0 */ - LDKnativeUpdateFailHTLC *inner; + uint32_t a; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The element at position 1 */ - bool is_owned; -} LDKUpdateFailHTLC; + struct LDKTxOut b; +} LDKC2Tuple_u32TxOutZ; /** - * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFailHTLCs of arbitrary size. + * A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32TxOutZs of arbitrary size. * This corresponds to std::vector in C++ */ -typedef struct LDKCVec_UpdateFailHTLCZ { +typedef struct LDKCVec_C2Tuple_u32TxOutZZ { /** * The elements in the array. * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKUpdateFailHTLC *data; + struct LDKC2Tuple_u32TxOutZ *data; /** * The number of elements pointed to by `data`. */ uintptr_t datalen; -} LDKCVec_UpdateFailHTLCZ; - - +} LDKCVec_C2Tuple_u32TxOutZZ; /** - * An update_fail_malformed_htlc message to be sent or received from a peer + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef struct MUST_USE_STRUCT LDKUpdateFailMalformedHTLC { +typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The element at position 0 */ - LDKnativeUpdateFailMalformedHTLC *inner; + struct LDKThirtyTwoBytes a; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The element at position 1 */ - bool is_owned; -} LDKUpdateFailMalformedHTLC; + struct LDKCVec_C2Tuple_u32TxOutZZ b; +} LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ; /** - * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFailMalformedHTLCs of arbitrary size. + * A dynamically-allocated array of crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZs of arbitrary size. * This corresponds to std::vector in C++ */ -typedef struct LDKCVec_UpdateFailMalformedHTLCZ { +typedef struct LDKCVec_TransactionOutputsZ { /** * The elements in the array. * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKUpdateFailMalformedHTLC *data; + struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *data; /** * The number of elements pointed to by `data`. */ uintptr_t datalen; -} LDKCVec_UpdateFailMalformedHTLCZ; +} LDKCVec_TransactionOutputsZ; /** - * The contents of CResult_AcceptChannelDecodeErrorZ + * The contents of CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ */ -typedef union LDKCResult_AcceptChannelDecodeErrorZPtr { +typedef union LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKAcceptChannel *result; + struct LDKC2Tuple_BlockHashChannelMonitorZ *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_AcceptChannelDecodeErrorZPtr; +} LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr; /** - * A CResult_AcceptChannelDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::AcceptChannel on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ represents the result of a fallible operation, + * containing a crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZ on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_AcceptChannelDecodeErrorZ { +typedef struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ { /** - * The contents of this CResult_AcceptChannelDecodeErrorZ, accessible via either + * The contents of this CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_AcceptChannelDecodeErrorZPtr contents; + union LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr contents; /** - * Whether this CResult_AcceptChannelDecodeErrorZ represents a success state. + * Whether this CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_AcceptChannelDecodeErrorZ; +} LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ; /** - * The contents of CResult_AnnouncementSignaturesDecodeErrorZ + * The contents of CResult_boolLightningErrorZ */ -typedef union LDKCResult_AnnouncementSignaturesDecodeErrorZPtr { +typedef union LDKCResult_boolLightningErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKAnnouncementSignatures *result; + bool *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_AnnouncementSignaturesDecodeErrorZPtr; + struct LDKLightningError *err; +} LDKCResult_boolLightningErrorZPtr; /** - * A CResult_AnnouncementSignaturesDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::AnnouncementSignatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_boolLightningErrorZ represents the result of a fallible operation, + * containing a bool on success and a crate::lightning::ln::msgs::LightningError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_AnnouncementSignaturesDecodeErrorZ { +typedef struct LDKCResult_boolLightningErrorZ { /** - * The contents of this CResult_AnnouncementSignaturesDecodeErrorZ, accessible via either + * The contents of this CResult_boolLightningErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_AnnouncementSignaturesDecodeErrorZPtr contents; + union LDKCResult_boolLightningErrorZPtr contents; /** - * Whether this CResult_AnnouncementSignaturesDecodeErrorZ represents a success state. + * Whether this CResult_boolLightningErrorZ represents a success state. */ bool result_ok; -} LDKCResult_AnnouncementSignaturesDecodeErrorZ; +} LDKCResult_boolLightningErrorZ; /** - * The contents of CResult_ChannelReestablishDecodeErrorZ + * A tuple of 3 elements. See the individual fields for the types contained. */ -typedef union LDKCResult_ChannelReestablishDecodeErrorZPtr { +typedef struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The element at position 0 */ - struct LDKChannelReestablish *result; + struct LDKChannelAnnouncement a; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The element at position 1 */ - struct LDKDecodeError *err; -} LDKCResult_ChannelReestablishDecodeErrorZPtr; + struct LDKChannelUpdate b; + /** + * The element at position 2 + */ + struct LDKChannelUpdate c; +} LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ; /** - * A CResult_ChannelReestablishDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ChannelReestablish on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A dynamically-allocated array of crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKCResult_ChannelReestablishDecodeErrorZ { +typedef struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ { /** - * The contents of this CResult_ChannelReestablishDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - union LDKCResult_ChannelReestablishDecodeErrorZPtr contents; + struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *data; /** - * Whether this CResult_ChannelReestablishDecodeErrorZ represents a success state. + * The number of elements pointed to by `data`. */ - bool result_ok; -} LDKCResult_ChannelReestablishDecodeErrorZ; + uintptr_t datalen; +} LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ; + +/** + * A dynamically-allocated array of crate::lightning::ln::msgs::NodeAnnouncements of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_NodeAnnouncementZ { + /** + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + */ + struct LDKNodeAnnouncement *data; + /** + * The number of elements pointed to by `data`. + */ + uintptr_t datalen; +} LDKCVec_NodeAnnouncementZ; /** - * The contents of CResult_ClosingSignedDecodeErrorZ + * The contents of CResult_NoneLightningErrorZ */ -typedef union LDKCResult_ClosingSignedDecodeErrorZPtr { +typedef union LDKCResult_NoneLightningErrorZPtr { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * Note that this value is always NULL, as there are no contents in the OK variant */ - struct LDKClosingSigned *result; + void *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_ClosingSignedDecodeErrorZPtr; + struct LDKLightningError *err; +} LDKCResult_NoneLightningErrorZPtr; /** - * A CResult_ClosingSignedDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ClosingSigned on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NoneLightningErrorZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning::ln::msgs::LightningError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_ClosingSignedDecodeErrorZ { +typedef struct LDKCResult_NoneLightningErrorZ { /** - * The contents of this CResult_ClosingSignedDecodeErrorZ, accessible via either + * The contents of this CResult_NoneLightningErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_ClosingSignedDecodeErrorZPtr contents; + union LDKCResult_NoneLightningErrorZPtr contents; /** - * Whether this CResult_ClosingSignedDecodeErrorZ represents a success state. + * Whether this CResult_NoneLightningErrorZ represents a success state. */ bool result_ok; -} LDKCResult_ClosingSignedDecodeErrorZ; +} LDKCResult_NoneLightningErrorZ; + +/** + * A dynamically-allocated array of crate::c_types::PublicKeys of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_PublicKeyZ { + /** + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + */ + struct LDKPublicKey *data; + /** + * The number of elements pointed to by `data`. + */ + uintptr_t datalen; +} LDKCVec_PublicKeyZ; /** - * A commitment_signed message to be sent or received from a peer + * Error for PeerManager errors. If you get one of these, you must disconnect the socket and + * generate no further read_event/write_buffer_space_avail/socket_disconnected calls for the + * descriptor. */ -typedef struct MUST_USE_STRUCT LDKCommitmentSigned { +typedef struct MUST_USE_STRUCT LDKPeerHandleError { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeCommitmentSigned *inner; + LDKnativePeerHandleError *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKCommitmentSigned; - -/** - * The contents of CResult_CommitmentSignedDecodeErrorZ - */ -typedef union LDKCResult_CommitmentSignedDecodeErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKCommitmentSigned *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKDecodeError *err; -} LDKCResult_CommitmentSignedDecodeErrorZPtr; - -/** - * A CResult_CommitmentSignedDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::CommitmentSigned on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_CommitmentSignedDecodeErrorZ { - /** - * The contents of this CResult_CommitmentSignedDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_CommitmentSignedDecodeErrorZPtr contents; - /** - * Whether this CResult_CommitmentSignedDecodeErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_CommitmentSignedDecodeErrorZ; +} LDKPeerHandleError; /** - * The contents of CResult_FundingCreatedDecodeErrorZ + * The contents of CResult_CVec_u8ZPeerHandleErrorZ */ -typedef union LDKCResult_FundingCreatedDecodeErrorZPtr { +typedef union LDKCResult_CVec_u8ZPeerHandleErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKFundingCreated *result; + struct LDKCVec_u8Z *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_FundingCreatedDecodeErrorZPtr; + struct LDKPeerHandleError *err; +} LDKCResult_CVec_u8ZPeerHandleErrorZPtr; /** - * A CResult_FundingCreatedDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::FundingCreated on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_CVec_u8ZPeerHandleErrorZ represents the result of a fallible operation, + * containing a crate::c_types::derived::CVec_u8Z on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_FundingCreatedDecodeErrorZ { +typedef struct LDKCResult_CVec_u8ZPeerHandleErrorZ { /** - * The contents of this CResult_FundingCreatedDecodeErrorZ, accessible via either + * The contents of this CResult_CVec_u8ZPeerHandleErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_FundingCreatedDecodeErrorZPtr contents; + union LDKCResult_CVec_u8ZPeerHandleErrorZPtr contents; /** - * Whether this CResult_FundingCreatedDecodeErrorZ represents a success state. + * Whether this CResult_CVec_u8ZPeerHandleErrorZ represents a success state. */ bool result_ok; -} LDKCResult_FundingCreatedDecodeErrorZ; +} LDKCResult_CVec_u8ZPeerHandleErrorZ; /** - * The contents of CResult_FundingSignedDecodeErrorZ + * The contents of CResult_NonePeerHandleErrorZ */ -typedef union LDKCResult_FundingSignedDecodeErrorZPtr { +typedef union LDKCResult_NonePeerHandleErrorZPtr { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * Note that this value is always NULL, as there are no contents in the OK variant */ - struct LDKFundingSigned *result; + void *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_FundingSignedDecodeErrorZPtr; + struct LDKPeerHandleError *err; +} LDKCResult_NonePeerHandleErrorZPtr; /** - * A CResult_FundingSignedDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::FundingSigned on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NonePeerHandleErrorZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_FundingSignedDecodeErrorZ { +typedef struct LDKCResult_NonePeerHandleErrorZ { /** - * The contents of this CResult_FundingSignedDecodeErrorZ, accessible via either + * The contents of this CResult_NonePeerHandleErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_FundingSignedDecodeErrorZPtr contents; + union LDKCResult_NonePeerHandleErrorZPtr contents; /** - * Whether this CResult_FundingSignedDecodeErrorZ represents a success state. + * Whether this CResult_NonePeerHandleErrorZ represents a success state. */ bool result_ok; -} LDKCResult_FundingSignedDecodeErrorZ; +} LDKCResult_NonePeerHandleErrorZ; /** - * The contents of CResult_FundingLockedDecodeErrorZ + * The contents of CResult_boolPeerHandleErrorZ */ -typedef union LDKCResult_FundingLockedDecodeErrorZPtr { +typedef union LDKCResult_boolPeerHandleErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKFundingLocked *result; + bool *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_FundingLockedDecodeErrorZPtr; + struct LDKPeerHandleError *err; +} LDKCResult_boolPeerHandleErrorZPtr; /** - * A CResult_FundingLockedDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::FundingLocked on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_boolPeerHandleErrorZ represents the result of a fallible operation, + * containing a bool on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_FundingLockedDecodeErrorZ { +typedef struct LDKCResult_boolPeerHandleErrorZ { /** - * The contents of this CResult_FundingLockedDecodeErrorZ, accessible via either + * The contents of this CResult_boolPeerHandleErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_FundingLockedDecodeErrorZPtr contents; + union LDKCResult_boolPeerHandleErrorZPtr contents; /** - * Whether this CResult_FundingLockedDecodeErrorZ represents a success state. + * Whether this CResult_boolPeerHandleErrorZ represents a success state. */ bool result_ok; -} LDKCResult_FundingLockedDecodeErrorZ; +} LDKCResult_boolPeerHandleErrorZ; /** - * An init message to be sent or received from a peer + * Details about one direction of a channel. Received + * within a channel update. */ -typedef struct MUST_USE_STRUCT LDKInit { +typedef struct MUST_USE_STRUCT LDKDirectionalChannelInfo { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeInit *inner; + LDKnativeDirectionalChannelInfo *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKInit; +} LDKDirectionalChannelInfo; /** - * The contents of CResult_InitDecodeErrorZ + * The contents of CResult_DirectionalChannelInfoDecodeErrorZ */ -typedef union LDKCResult_InitDecodeErrorZPtr { +typedef union LDKCResult_DirectionalChannelInfoDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKInit *result; + struct LDKDirectionalChannelInfo *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_InitDecodeErrorZPtr; +} LDKCResult_DirectionalChannelInfoDecodeErrorZPtr; /** - * A CResult_InitDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::Init on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_DirectionalChannelInfoDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::network_graph::DirectionalChannelInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_InitDecodeErrorZ { +typedef struct LDKCResult_DirectionalChannelInfoDecodeErrorZ { /** - * The contents of this CResult_InitDecodeErrorZ, accessible via either + * The contents of this CResult_DirectionalChannelInfoDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_InitDecodeErrorZPtr contents; + union LDKCResult_DirectionalChannelInfoDecodeErrorZPtr contents; /** - * Whether this CResult_InitDecodeErrorZ represents a success state. + * Whether this CResult_DirectionalChannelInfoDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_InitDecodeErrorZ; - -/** - * The contents of CResult_OpenChannelDecodeErrorZ - */ -typedef union LDKCResult_OpenChannelDecodeErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKOpenChannel *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKDecodeError *err; -} LDKCResult_OpenChannelDecodeErrorZPtr; +} LDKCResult_DirectionalChannelInfoDecodeErrorZ; -/** - * A CResult_OpenChannelDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::OpenChannel on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_OpenChannelDecodeErrorZ { - /** - * The contents of this CResult_OpenChannelDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_OpenChannelDecodeErrorZPtr contents; - /** - * Whether this CResult_OpenChannelDecodeErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_OpenChannelDecodeErrorZ; -/** - * The contents of CResult_RevokeAndACKDecodeErrorZ - */ -typedef union LDKCResult_RevokeAndACKDecodeErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKRevokeAndACK *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKDecodeError *err; -} LDKCResult_RevokeAndACKDecodeErrorZPtr; /** - * A CResult_RevokeAndACKDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::RevokeAndACK on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * Details about a channel (both directions). + * Received within a channel announcement. */ -typedef struct LDKCResult_RevokeAndACKDecodeErrorZ { +typedef struct MUST_USE_STRUCT LDKChannelInfo { /** - * The contents of this CResult_RevokeAndACKDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_RevokeAndACKDecodeErrorZPtr contents; + LDKnativeChannelInfo *inner; /** - * Whether this CResult_RevokeAndACKDecodeErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_RevokeAndACKDecodeErrorZ; + bool is_owned; +} LDKChannelInfo; /** - * The contents of CResult_ShutdownDecodeErrorZ + * The contents of CResult_ChannelInfoDecodeErrorZ */ -typedef union LDKCResult_ShutdownDecodeErrorZPtr { +typedef union LDKCResult_ChannelInfoDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKShutdown *result; + struct LDKChannelInfo *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_ShutdownDecodeErrorZPtr; +} LDKCResult_ChannelInfoDecodeErrorZPtr; /** - * A CResult_ShutdownDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::Shutdown on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_ChannelInfoDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::network_graph::ChannelInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_ShutdownDecodeErrorZ { +typedef struct LDKCResult_ChannelInfoDecodeErrorZ { /** - * The contents of this CResult_ShutdownDecodeErrorZ, accessible via either + * The contents of this CResult_ChannelInfoDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_ShutdownDecodeErrorZPtr contents; + union LDKCResult_ChannelInfoDecodeErrorZPtr contents; /** - * Whether this CResult_ShutdownDecodeErrorZ represents a success state. + * Whether this CResult_ChannelInfoDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_ShutdownDecodeErrorZ; +} LDKCResult_ChannelInfoDecodeErrorZ; + -/** - * The contents of CResult_UpdateFailHTLCDecodeErrorZ - */ -typedef union LDKCResult_UpdateFailHTLCDecodeErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKUpdateFailHTLC *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKDecodeError *err; -} LDKCResult_UpdateFailHTLCDecodeErrorZPtr; /** - * A CResult_UpdateFailHTLCDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UpdateFailHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * Fees for routing via a given channel or a node */ -typedef struct LDKCResult_UpdateFailHTLCDecodeErrorZ { +typedef struct MUST_USE_STRUCT LDKRoutingFees { /** - * The contents of this CResult_UpdateFailHTLCDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_UpdateFailHTLCDecodeErrorZPtr contents; + LDKnativeRoutingFees *inner; /** - * Whether this CResult_UpdateFailHTLCDecodeErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_UpdateFailHTLCDecodeErrorZ; + bool is_owned; +} LDKRoutingFees; /** - * The contents of CResult_UpdateFailMalformedHTLCDecodeErrorZ + * The contents of CResult_RoutingFeesDecodeErrorZ */ -typedef union LDKCResult_UpdateFailMalformedHTLCDecodeErrorZPtr { +typedef union LDKCResult_RoutingFeesDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKUpdateFailMalformedHTLC *result; + struct LDKRoutingFees *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_UpdateFailMalformedHTLCDecodeErrorZPtr; +} LDKCResult_RoutingFeesDecodeErrorZPtr; /** - * A CResult_UpdateFailMalformedHTLCDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UpdateFailMalformedHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_RoutingFeesDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::network_graph::RoutingFees on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ { +typedef struct LDKCResult_RoutingFeesDecodeErrorZ { /** - * The contents of this CResult_UpdateFailMalformedHTLCDecodeErrorZ, accessible via either + * The contents of this CResult_RoutingFeesDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_UpdateFailMalformedHTLCDecodeErrorZPtr contents; + union LDKCResult_RoutingFeesDecodeErrorZPtr contents; /** - * Whether this CResult_UpdateFailMalformedHTLCDecodeErrorZ represents a success state. + * Whether this CResult_RoutingFeesDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ; +} LDKCResult_RoutingFeesDecodeErrorZ; /** - * An update_fee message to be sent or received from a peer + * Information received in the latest node_announcement from this node. */ -typedef struct MUST_USE_STRUCT LDKUpdateFee { +typedef struct MUST_USE_STRUCT LDKNodeAnnouncementInfo { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeUpdateFee *inner; + LDKnativeNodeAnnouncementInfo *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKUpdateFee; +} LDKNodeAnnouncementInfo; /** - * The contents of CResult_UpdateFeeDecodeErrorZ + * The contents of CResult_NodeAnnouncementInfoDecodeErrorZ */ -typedef union LDKCResult_UpdateFeeDecodeErrorZPtr { +typedef union LDKCResult_NodeAnnouncementInfoDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKUpdateFee *result; + struct LDKNodeAnnouncementInfo *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_UpdateFeeDecodeErrorZPtr; +} LDKCResult_NodeAnnouncementInfoDecodeErrorZPtr; /** - * A CResult_UpdateFeeDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UpdateFee on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NodeAnnouncementInfoDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::network_graph::NodeAnnouncementInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_UpdateFeeDecodeErrorZ { +typedef struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ { /** - * The contents of this CResult_UpdateFeeDecodeErrorZ, accessible via either + * The contents of this CResult_NodeAnnouncementInfoDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_UpdateFeeDecodeErrorZPtr contents; + union LDKCResult_NodeAnnouncementInfoDecodeErrorZPtr contents; /** - * Whether this CResult_UpdateFeeDecodeErrorZ represents a success state. + * Whether this CResult_NodeAnnouncementInfoDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_UpdateFeeDecodeErrorZ; +} LDKCResult_NodeAnnouncementInfoDecodeErrorZ; /** - * The contents of CResult_UpdateFulfillHTLCDecodeErrorZ + * A dynamically-allocated array of u64s of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef union LDKCResult_UpdateFulfillHTLCDecodeErrorZPtr { +typedef struct LDKCVec_u64Z { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKUpdateFulfillHTLC *result; + uint64_t *data; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The number of elements pointed to by `data`. */ - struct LDKDecodeError *err; -} LDKCResult_UpdateFulfillHTLCDecodeErrorZPtr; + uintptr_t datalen; +} LDKCVec_u64Z; + + /** - * A CResult_UpdateFulfillHTLCDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UpdateFulfillHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * Details about a node in the network, known from the network announcement. */ -typedef struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ { +typedef struct MUST_USE_STRUCT LDKNodeInfo { /** - * The contents of this CResult_UpdateFulfillHTLCDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_UpdateFulfillHTLCDecodeErrorZPtr contents; + LDKnativeNodeInfo *inner; /** - * Whether this CResult_UpdateFulfillHTLCDecodeErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_UpdateFulfillHTLCDecodeErrorZ; + bool is_owned; +} LDKNodeInfo; /** - * The contents of CResult_UpdateAddHTLCDecodeErrorZ + * The contents of CResult_NodeInfoDecodeErrorZ */ -typedef union LDKCResult_UpdateAddHTLCDecodeErrorZPtr { +typedef union LDKCResult_NodeInfoDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKUpdateAddHTLC *result; + struct LDKNodeInfo *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_UpdateAddHTLCDecodeErrorZPtr; +} LDKCResult_NodeInfoDecodeErrorZPtr; /** - * A CResult_UpdateAddHTLCDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UpdateAddHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NodeInfoDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::network_graph::NodeInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_UpdateAddHTLCDecodeErrorZ { +typedef struct LDKCResult_NodeInfoDecodeErrorZ { /** - * The contents of this CResult_UpdateAddHTLCDecodeErrorZ, accessible via either + * The contents of this CResult_NodeInfoDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_UpdateAddHTLCDecodeErrorZPtr contents; + union LDKCResult_NodeInfoDecodeErrorZPtr contents; /** - * Whether this CResult_UpdateAddHTLCDecodeErrorZ represents a success state. + * Whether this CResult_NodeInfoDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_UpdateAddHTLCDecodeErrorZ; +} LDKCResult_NodeInfoDecodeErrorZ; /** - * A ping message to be sent or received from a peer + * Represents the network as nodes and channels between them */ -typedef struct MUST_USE_STRUCT LDKPing { +typedef struct MUST_USE_STRUCT LDKNetworkGraph { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativePing *inner; + LDKnativeNetworkGraph *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKPing; +} LDKNetworkGraph; /** - * The contents of CResult_PingDecodeErrorZ + * The contents of CResult_NetworkGraphDecodeErrorZ */ -typedef union LDKCResult_PingDecodeErrorZPtr { +typedef union LDKCResult_NetworkGraphDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKPing *result; + struct LDKNetworkGraph *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_PingDecodeErrorZPtr; +} LDKCResult_NetworkGraphDecodeErrorZPtr; /** - * A CResult_PingDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::Ping on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NetworkGraphDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::network_graph::NetworkGraph on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_PingDecodeErrorZ { +typedef struct LDKCResult_NetworkGraphDecodeErrorZ { /** - * The contents of this CResult_PingDecodeErrorZ, accessible via either + * The contents of this CResult_NetworkGraphDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_PingDecodeErrorZPtr contents; + union LDKCResult_NetworkGraphDecodeErrorZPtr contents; /** - * Whether this CResult_PingDecodeErrorZ represents a success state. + * Whether this CResult_NetworkGraphDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_PingDecodeErrorZ; - - - -/** - * A pong message to be sent or received from a peer - */ -typedef struct MUST_USE_STRUCT LDKPong { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativePong *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKPong; +} LDKCResult_NetworkGraphDecodeErrorZ; /** - * The contents of CResult_PongDecodeErrorZ + * The contents of CResult_NetAddressu8Z */ -typedef union LDKCResult_PongDecodeErrorZPtr { +typedef union LDKCResult_NetAddressu8ZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKPong *result; + struct LDKNetAddress *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_PongDecodeErrorZPtr; + uint8_t *err; +} LDKCResult_NetAddressu8ZPtr; /** - * A CResult_PongDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::Pong on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NetAddressu8Z represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::NetAddress on success and a u8 on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_PongDecodeErrorZ { +typedef struct LDKCResult_NetAddressu8Z { /** - * The contents of this CResult_PongDecodeErrorZ, accessible via either + * The contents of this CResult_NetAddressu8Z, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_PongDecodeErrorZPtr contents; + union LDKCResult_NetAddressu8ZPtr contents; /** - * Whether this CResult_PongDecodeErrorZ represents a success state. + * Whether this CResult_NetAddressu8Z represents a success state. */ bool result_ok; -} LDKCResult_PongDecodeErrorZ; +} LDKCResult_NetAddressu8Z; /** - * The contents of CResult_UnsignedChannelAnnouncementDecodeErrorZ + * The contents of CResult_CResult_NetAddressu8ZDecodeErrorZ */ -typedef union LDKCResult_UnsignedChannelAnnouncementDecodeErrorZPtr { +typedef union LDKCResult_CResult_NetAddressu8ZDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKUnsignedChannelAnnouncement *result; + struct LDKCResult_NetAddressu8Z *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_UnsignedChannelAnnouncementDecodeErrorZPtr; +} LDKCResult_CResult_NetAddressu8ZDecodeErrorZPtr; /** - * A CResult_UnsignedChannelAnnouncementDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UnsignedChannelAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_CResult_NetAddressu8ZDecodeErrorZ represents the result of a fallible operation, + * containing a crate::c_types::derived::CResult_NetAddressu8Z on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ { +typedef struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ { /** - * The contents of this CResult_UnsignedChannelAnnouncementDecodeErrorZ, accessible via either + * The contents of this CResult_CResult_NetAddressu8ZDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_UnsignedChannelAnnouncementDecodeErrorZPtr contents; + union LDKCResult_CResult_NetAddressu8ZDecodeErrorZPtr contents; /** - * Whether this CResult_UnsignedChannelAnnouncementDecodeErrorZ represents a success state. + * Whether this CResult_CResult_NetAddressu8ZDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ; +} LDKCResult_CResult_NetAddressu8ZDecodeErrorZ; /** - * The contents of CResult_ChannelAnnouncementDecodeErrorZ + * The contents of CResult_NetAddressDecodeErrorZ */ -typedef union LDKCResult_ChannelAnnouncementDecodeErrorZPtr { +typedef union LDKCResult_NetAddressDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKChannelAnnouncement *result; + struct LDKNetAddress *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_ChannelAnnouncementDecodeErrorZPtr; +} LDKCResult_NetAddressDecodeErrorZPtr; /** - * A CResult_ChannelAnnouncementDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ChannelAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NetAddressDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::NetAddress on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_ChannelAnnouncementDecodeErrorZ { +typedef struct LDKCResult_NetAddressDecodeErrorZ { /** - * The contents of this CResult_ChannelAnnouncementDecodeErrorZ, accessible via either + * The contents of this CResult_NetAddressDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_ChannelAnnouncementDecodeErrorZPtr contents; + union LDKCResult_NetAddressDecodeErrorZPtr contents; /** - * Whether this CResult_ChannelAnnouncementDecodeErrorZ represents a success state. + * Whether this CResult_NetAddressDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_ChannelAnnouncementDecodeErrorZ; +} LDKCResult_NetAddressDecodeErrorZ; /** - * The unsigned part of a channel_update + * An update_add_htlc message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKUnsignedChannelUpdate { +typedef struct MUST_USE_STRUCT LDKUpdateAddHTLC { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeUnsignedChannelUpdate *inner; + LDKnativeUpdateAddHTLC *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKUnsignedChannelUpdate; +} LDKUpdateAddHTLC; /** - * The contents of CResult_UnsignedChannelUpdateDecodeErrorZ + * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateAddHTLCs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef union LDKCResult_UnsignedChannelUpdateDecodeErrorZPtr { +typedef struct LDKCVec_UpdateAddHTLCZ { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKUnsignedChannelUpdate *result; + struct LDKUpdateAddHTLC *data; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The number of elements pointed to by `data`. */ - struct LDKDecodeError *err; -} LDKCResult_UnsignedChannelUpdateDecodeErrorZPtr; + uintptr_t datalen; +} LDKCVec_UpdateAddHTLCZ; + -/** - * A CResult_UnsignedChannelUpdateDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UnsignedChannelUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ { - /** - * The contents of this CResult_UnsignedChannelUpdateDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_UnsignedChannelUpdateDecodeErrorZPtr contents; - /** - * Whether this CResult_UnsignedChannelUpdateDecodeErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_UnsignedChannelUpdateDecodeErrorZ; /** - * The contents of CResult_ChannelUpdateDecodeErrorZ + * An update_fulfill_htlc message to be sent or received from a peer */ -typedef union LDKCResult_ChannelUpdateDecodeErrorZPtr { +typedef struct MUST_USE_STRUCT LDKUpdateFulfillHTLC { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKChannelUpdate *result; + LDKnativeUpdateFulfillHTLC *inner; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKDecodeError *err; -} LDKCResult_ChannelUpdateDecodeErrorZPtr; + bool is_owned; +} LDKUpdateFulfillHTLC; /** - * A CResult_ChannelUpdateDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ChannelUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFulfillHTLCs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKCResult_ChannelUpdateDecodeErrorZ { +typedef struct LDKCVec_UpdateFulfillHTLCZ { /** - * The contents of this CResult_ChannelUpdateDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - union LDKCResult_ChannelUpdateDecodeErrorZPtr contents; + struct LDKUpdateFulfillHTLC *data; /** - * Whether this CResult_ChannelUpdateDecodeErrorZ represents a success state. + * The number of elements pointed to by `data`. */ - bool result_ok; -} LDKCResult_ChannelUpdateDecodeErrorZ; + uintptr_t datalen; +} LDKCVec_UpdateFulfillHTLCZ; + + /** - * The contents of CResult_ErrorMessageDecodeErrorZ + * An update_fail_htlc message to be sent or received from a peer */ -typedef union LDKCResult_ErrorMessageDecodeErrorZPtr { +typedef struct MUST_USE_STRUCT LDKUpdateFailHTLC { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKErrorMessage *result; + LDKnativeUpdateFailHTLC *inner; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKDecodeError *err; -} LDKCResult_ErrorMessageDecodeErrorZPtr; + bool is_owned; +} LDKUpdateFailHTLC; /** - * A CResult_ErrorMessageDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ErrorMessage on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFailHTLCs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKCResult_ErrorMessageDecodeErrorZ { +typedef struct LDKCVec_UpdateFailHTLCZ { /** - * The contents of this CResult_ErrorMessageDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - union LDKCResult_ErrorMessageDecodeErrorZPtr contents; + struct LDKUpdateFailHTLC *data; /** - * Whether this CResult_ErrorMessageDecodeErrorZ represents a success state. + * The number of elements pointed to by `data`. */ - bool result_ok; -} LDKCResult_ErrorMessageDecodeErrorZ; + uintptr_t datalen; +} LDKCVec_UpdateFailHTLCZ; /** - * The unsigned part of a node_announcement + * An update_fail_malformed_htlc message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKUnsignedNodeAnnouncement { +typedef struct MUST_USE_STRUCT LDKUpdateFailMalformedHTLC { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeUnsignedNodeAnnouncement *inner; + LDKnativeUpdateFailMalformedHTLC *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKUnsignedNodeAnnouncement; +} LDKUpdateFailMalformedHTLC; /** - * The contents of CResult_UnsignedNodeAnnouncementDecodeErrorZ + * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFailMalformedHTLCs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef union LDKCResult_UnsignedNodeAnnouncementDecodeErrorZPtr { +typedef struct LDKCVec_UpdateFailMalformedHTLCZ { + /** + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + */ + struct LDKUpdateFailMalformedHTLC *data; + /** + * The number of elements pointed to by `data`. + */ + uintptr_t datalen; +} LDKCVec_UpdateFailMalformedHTLCZ; + +/** + * The contents of CResult_AcceptChannelDecodeErrorZ + */ +typedef union LDKCResult_AcceptChannelDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKUnsignedNodeAnnouncement *result; + struct LDKAcceptChannel *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_UnsignedNodeAnnouncementDecodeErrorZPtr; +} LDKCResult_AcceptChannelDecodeErrorZPtr; /** - * A CResult_UnsignedNodeAnnouncementDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UnsignedNodeAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_AcceptChannelDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::AcceptChannel on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ { +typedef struct LDKCResult_AcceptChannelDecodeErrorZ { /** - * The contents of this CResult_UnsignedNodeAnnouncementDecodeErrorZ, accessible via either + * The contents of this CResult_AcceptChannelDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_UnsignedNodeAnnouncementDecodeErrorZPtr contents; + union LDKCResult_AcceptChannelDecodeErrorZPtr contents; /** - * Whether this CResult_UnsignedNodeAnnouncementDecodeErrorZ represents a success state. + * Whether this CResult_AcceptChannelDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ; +} LDKCResult_AcceptChannelDecodeErrorZ; /** - * The contents of CResult_NodeAnnouncementDecodeErrorZ + * The contents of CResult_AnnouncementSignaturesDecodeErrorZ */ -typedef union LDKCResult_NodeAnnouncementDecodeErrorZPtr { +typedef union LDKCResult_AnnouncementSignaturesDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKNodeAnnouncement *result; + struct LDKAnnouncementSignatures *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_NodeAnnouncementDecodeErrorZPtr; +} LDKCResult_AnnouncementSignaturesDecodeErrorZPtr; /** - * A CResult_NodeAnnouncementDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::NodeAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_AnnouncementSignaturesDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::AnnouncementSignatures on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NodeAnnouncementDecodeErrorZ { +typedef struct LDKCResult_AnnouncementSignaturesDecodeErrorZ { /** - * The contents of this CResult_NodeAnnouncementDecodeErrorZ, accessible via either + * The contents of this CResult_AnnouncementSignaturesDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NodeAnnouncementDecodeErrorZPtr contents; + union LDKCResult_AnnouncementSignaturesDecodeErrorZPtr contents; /** - * Whether this CResult_NodeAnnouncementDecodeErrorZ represents a success state. + * Whether this CResult_AnnouncementSignaturesDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NodeAnnouncementDecodeErrorZ; +} LDKCResult_AnnouncementSignaturesDecodeErrorZ; + +/** + * The contents of CResult_ChannelReestablishDecodeErrorZ + */ +typedef union LDKCResult_ChannelReestablishDecodeErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKChannelReestablish *result; + /** + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. + */ + struct LDKDecodeError *err; +} LDKCResult_ChannelReestablishDecodeErrorZPtr; + +/** + * A CResult_ChannelReestablishDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ChannelReestablish on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_ChannelReestablishDecodeErrorZ { + /** + * The contents of this CResult_ChannelReestablishDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_ChannelReestablishDecodeErrorZPtr contents; + /** + * Whether this CResult_ChannelReestablishDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_ChannelReestablishDecodeErrorZ; /** - * The contents of CResult_QueryShortChannelIdsDecodeErrorZ + * The contents of CResult_ClosingSignedDecodeErrorZ */ -typedef union LDKCResult_QueryShortChannelIdsDecodeErrorZPtr { +typedef union LDKCResult_ClosingSignedDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKQueryShortChannelIds *result; + struct LDKClosingSigned *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_QueryShortChannelIdsDecodeErrorZPtr; +} LDKCResult_ClosingSignedDecodeErrorZPtr; /** - * A CResult_QueryShortChannelIdsDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::QueryShortChannelIds on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_ClosingSignedDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ClosingSigned on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_QueryShortChannelIdsDecodeErrorZ { +typedef struct LDKCResult_ClosingSignedDecodeErrorZ { /** - * The contents of this CResult_QueryShortChannelIdsDecodeErrorZ, accessible via either + * The contents of this CResult_ClosingSignedDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_QueryShortChannelIdsDecodeErrorZPtr contents; + union LDKCResult_ClosingSignedDecodeErrorZPtr contents; /** - * Whether this CResult_QueryShortChannelIdsDecodeErrorZ represents a success state. + * Whether this CResult_ClosingSignedDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_QueryShortChannelIdsDecodeErrorZ; +} LDKCResult_ClosingSignedDecodeErrorZ; /** - * A reply_short_channel_ids_end message is sent as a reply to a - * query_short_channel_ids message. The query recipient makes a best - * effort to respond based on their local network view which may not be - * a perfect view of the network. + * A commitment_signed message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKReplyShortChannelIdsEnd { +typedef struct MUST_USE_STRUCT LDKCommitmentSigned { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeReplyShortChannelIdsEnd *inner; + LDKnativeCommitmentSigned *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKReplyShortChannelIdsEnd; +} LDKCommitmentSigned; /** - * The contents of CResult_ReplyShortChannelIdsEndDecodeErrorZ + * The contents of CResult_CommitmentSignedDecodeErrorZ */ -typedef union LDKCResult_ReplyShortChannelIdsEndDecodeErrorZPtr { +typedef union LDKCResult_CommitmentSignedDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKReplyShortChannelIdsEnd *result; + struct LDKCommitmentSigned *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_ReplyShortChannelIdsEndDecodeErrorZPtr; +} LDKCResult_CommitmentSignedDecodeErrorZPtr; /** - * A CResult_ReplyShortChannelIdsEndDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ReplyShortChannelIdsEnd on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_CommitmentSignedDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::CommitmentSigned on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ { +typedef struct LDKCResult_CommitmentSignedDecodeErrorZ { /** - * The contents of this CResult_ReplyShortChannelIdsEndDecodeErrorZ, accessible via either + * The contents of this CResult_CommitmentSignedDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_ReplyShortChannelIdsEndDecodeErrorZPtr contents; + union LDKCResult_CommitmentSignedDecodeErrorZPtr contents; /** - * Whether this CResult_ReplyShortChannelIdsEndDecodeErrorZ represents a success state. + * Whether this CResult_CommitmentSignedDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ; +} LDKCResult_CommitmentSignedDecodeErrorZ; /** - * The contents of CResult_QueryChannelRangeDecodeErrorZ + * The contents of CResult_FundingCreatedDecodeErrorZ */ -typedef union LDKCResult_QueryChannelRangeDecodeErrorZPtr { +typedef union LDKCResult_FundingCreatedDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKQueryChannelRange *result; + struct LDKFundingCreated *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_QueryChannelRangeDecodeErrorZPtr; +} LDKCResult_FundingCreatedDecodeErrorZPtr; /** - * A CResult_QueryChannelRangeDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::QueryChannelRange on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_FundingCreatedDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::FundingCreated on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_QueryChannelRangeDecodeErrorZ { +typedef struct LDKCResult_FundingCreatedDecodeErrorZ { /** - * The contents of this CResult_QueryChannelRangeDecodeErrorZ, accessible via either + * The contents of this CResult_FundingCreatedDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_QueryChannelRangeDecodeErrorZPtr contents; + union LDKCResult_FundingCreatedDecodeErrorZPtr contents; /** - * Whether this CResult_QueryChannelRangeDecodeErrorZ represents a success state. + * Whether this CResult_FundingCreatedDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_QueryChannelRangeDecodeErrorZ; +} LDKCResult_FundingCreatedDecodeErrorZ; /** - * The contents of CResult_ReplyChannelRangeDecodeErrorZ + * The contents of CResult_FundingSignedDecodeErrorZ */ -typedef union LDKCResult_ReplyChannelRangeDecodeErrorZPtr { +typedef union LDKCResult_FundingSignedDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKReplyChannelRange *result; + struct LDKFundingSigned *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_ReplyChannelRangeDecodeErrorZPtr; +} LDKCResult_FundingSignedDecodeErrorZPtr; /** - * A CResult_ReplyChannelRangeDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ReplyChannelRange on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_FundingSignedDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::FundingSigned on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_ReplyChannelRangeDecodeErrorZ { +typedef struct LDKCResult_FundingSignedDecodeErrorZ { /** - * The contents of this CResult_ReplyChannelRangeDecodeErrorZ, accessible via either + * The contents of this CResult_FundingSignedDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_ReplyChannelRangeDecodeErrorZPtr contents; + union LDKCResult_FundingSignedDecodeErrorZPtr contents; /** - * Whether this CResult_ReplyChannelRangeDecodeErrorZ represents a success state. + * Whether this CResult_FundingSignedDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_ReplyChannelRangeDecodeErrorZ; - - - -/** - * A gossip_timestamp_filter message is used by a node to request - * gossip relay for messages in the requested time range when the - * gossip_queries feature has been negotiated. - */ -typedef struct MUST_USE_STRUCT LDKGossipTimestampFilter { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativeGossipTimestampFilter *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKGossipTimestampFilter; +} LDKCResult_FundingSignedDecodeErrorZ; /** - * The contents of CResult_GossipTimestampFilterDecodeErrorZ + * The contents of CResult_FundingLockedDecodeErrorZ */ -typedef union LDKCResult_GossipTimestampFilterDecodeErrorZPtr { +typedef union LDKCResult_FundingLockedDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKGossipTimestampFilter *result; + struct LDKFundingLocked *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_GossipTimestampFilterDecodeErrorZPtr; +} LDKCResult_FundingLockedDecodeErrorZPtr; /** - * A CResult_GossipTimestampFilterDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::GossipTimestampFilter on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_FundingLockedDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::FundingLocked on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_GossipTimestampFilterDecodeErrorZ { +typedef struct LDKCResult_FundingLockedDecodeErrorZ { /** - * The contents of this CResult_GossipTimestampFilterDecodeErrorZ, accessible via either + * The contents of this CResult_FundingLockedDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_GossipTimestampFilterDecodeErrorZPtr contents; + union LDKCResult_FundingLockedDecodeErrorZPtr contents; /** - * Whether this CResult_GossipTimestampFilterDecodeErrorZ represents a success state. + * Whether this CResult_FundingLockedDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_GossipTimestampFilterDecodeErrorZ; +} LDKCResult_FundingLockedDecodeErrorZ; + + /** - * When signing using a fallible method either an user-supplied `SignError` or a `CreationError` - * may occur. + * An init message to be sent or received from a peer */ -typedef enum LDKSignOrCreationError_Tag { - /** - * An error occurred during signing - */ - LDKSignOrCreationError_SignError, +typedef struct MUST_USE_STRUCT LDKInit { /** - * An error occurred while building the transaction + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKSignOrCreationError_CreationError, + LDKnativeInit *inner; /** - * Must be last for serialization purposes + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - LDKSignOrCreationError_Sentinel, -} LDKSignOrCreationError_Tag; - -typedef struct MUST_USE_STRUCT LDKSignOrCreationError { - LDKSignOrCreationError_Tag tag; - union { - struct { - enum LDKCreationError creation_error; - }; - }; -} LDKSignOrCreationError; + bool is_owned; +} LDKInit; /** - * The contents of CResult_InvoiceSignOrCreationErrorZ + * The contents of CResult_InitDecodeErrorZ */ -typedef union LDKCResult_InvoiceSignOrCreationErrorZPtr { +typedef union LDKCResult_InitDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKInvoice *result; + struct LDKInit *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKSignOrCreationError *err; -} LDKCResult_InvoiceSignOrCreationErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_InitDecodeErrorZPtr; /** - * A CResult_InvoiceSignOrCreationErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::Invoice on success and a crate::lightning_invoice::SignOrCreationError on failure. + * A CResult_InitDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::Init on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_InvoiceSignOrCreationErrorZ { +typedef struct LDKCResult_InitDecodeErrorZ { /** - * The contents of this CResult_InvoiceSignOrCreationErrorZ, accessible via either + * The contents of this CResult_InitDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_InvoiceSignOrCreationErrorZPtr contents; + union LDKCResult_InitDecodeErrorZPtr contents; /** - * Whether this CResult_InvoiceSignOrCreationErrorZ represents a success state. + * Whether this CResult_InitDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_InvoiceSignOrCreationErrorZ; +} LDKCResult_InitDecodeErrorZ; /** - * The contents of CResult_SpendableOutputDescriptorDecodeErrorZ + * The contents of CResult_OpenChannelDecodeErrorZ */ -typedef union LDKCResult_SpendableOutputDescriptorDecodeErrorZPtr { +typedef union LDKCResult_OpenChannelDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKSpendableOutputDescriptor *result; + struct LDKOpenChannel *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_SpendableOutputDescriptorDecodeErrorZPtr; +} LDKCResult_OpenChannelDecodeErrorZPtr; /** - * A CResult_SpendableOutputDescriptorDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::chain::keysinterface::SpendableOutputDescriptor on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_OpenChannelDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::OpenChannel on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ { +typedef struct LDKCResult_OpenChannelDecodeErrorZ { /** - * The contents of this CResult_SpendableOutputDescriptorDecodeErrorZ, accessible via either + * The contents of this CResult_OpenChannelDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_SpendableOutputDescriptorDecodeErrorZPtr contents; + union LDKCResult_OpenChannelDecodeErrorZPtr contents; /** - * Whether this CResult_SpendableOutputDescriptorDecodeErrorZ represents a success state. + * Whether this CResult_OpenChannelDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_SpendableOutputDescriptorDecodeErrorZ; +} LDKCResult_OpenChannelDecodeErrorZ; /** - * The contents of CResult_SignDecodeErrorZ + * The contents of CResult_RevokeAndACKDecodeErrorZ */ -typedef union LDKCResult_SignDecodeErrorZPtr { +typedef union LDKCResult_RevokeAndACKDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKSign *result; + struct LDKRevokeAndACK *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_SignDecodeErrorZPtr; +} LDKCResult_RevokeAndACKDecodeErrorZPtr; /** - * A CResult_SignDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::chain::keysinterface::Sign on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_RevokeAndACKDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::RevokeAndACK on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_SignDecodeErrorZ { +typedef struct LDKCResult_RevokeAndACKDecodeErrorZ { /** - * The contents of this CResult_SignDecodeErrorZ, accessible via either + * The contents of this CResult_RevokeAndACKDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_SignDecodeErrorZPtr contents; + union LDKCResult_RevokeAndACKDecodeErrorZPtr contents; /** - * Whether this CResult_SignDecodeErrorZ represents a success state. + * Whether this CResult_RevokeAndACKDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_SignDecodeErrorZ; - -/** - * Represents a secp256k1 signature serialized as two 32-byte numbers as well as a tag which - * allows recovering the exact public key which created the signature given the message. - */ -typedef struct LDKRecoverableSignature { - /** - * The bytes of the signature in "compact" form plus a "Recovery ID" which allows for - * recovery. - */ - uint8_t serialized_form[68]; -} LDKRecoverableSignature; +} LDKCResult_RevokeAndACKDecodeErrorZ; /** - * The contents of CResult_RecoverableSignatureNoneZ + * The contents of CResult_ShutdownDecodeErrorZ */ -typedef union LDKCResult_RecoverableSignatureNoneZPtr { +typedef union LDKCResult_ShutdownDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKRecoverableSignature *result; + struct LDKShutdown *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_RecoverableSignatureNoneZPtr; + struct LDKDecodeError *err; +} LDKCResult_ShutdownDecodeErrorZPtr; /** - * A CResult_RecoverableSignatureNoneZ represents the result of a fallible operation, - * containing a crate::c_types::RecoverableSignature on success and a () on failure. + * A CResult_ShutdownDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::Shutdown on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_RecoverableSignatureNoneZ { +typedef struct LDKCResult_ShutdownDecodeErrorZ { /** - * The contents of this CResult_RecoverableSignatureNoneZ, accessible via either + * The contents of this CResult_ShutdownDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_RecoverableSignatureNoneZPtr contents; + union LDKCResult_ShutdownDecodeErrorZPtr contents; /** - * Whether this CResult_RecoverableSignatureNoneZ represents a success state. + * Whether this CResult_ShutdownDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_RecoverableSignatureNoneZ; +} LDKCResult_ShutdownDecodeErrorZ; /** - * A dynamically-allocated array of crate::c_types::derived::CVec_u8Zs of arbitrary size. - * This corresponds to std::vector in C++ + * The contents of CResult_UpdateFailHTLCDecodeErrorZ */ -typedef struct LDKCVec_CVec_u8ZZ { +typedef union LDKCResult_UpdateFailHTLCDecodeErrorZPtr { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKCVec_u8Z *data; + struct LDKUpdateFailHTLC *result; /** - * The number of elements pointed to by `data`. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uintptr_t datalen; -} LDKCVec_CVec_u8ZZ; + struct LDKDecodeError *err; +} LDKCResult_UpdateFailHTLCDecodeErrorZPtr; /** - * The contents of CResult_CVec_CVec_u8ZZNoneZ + * A CResult_UpdateFailHTLCDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UpdateFailHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef union LDKCResult_CVec_CVec_u8ZZNoneZPtr { +typedef struct LDKCResult_UpdateFailHTLCDecodeErrorZ { + /** + * The contents of this CResult_UpdateFailHTLCDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_UpdateFailHTLCDecodeErrorZPtr contents; + /** + * Whether this CResult_UpdateFailHTLCDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_UpdateFailHTLCDecodeErrorZ; + +/** + * The contents of CResult_UpdateFailMalformedHTLCDecodeErrorZ + */ +typedef union LDKCResult_UpdateFailMalformedHTLCDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKCVec_CVec_u8ZZ *result; + struct LDKUpdateFailMalformedHTLC *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_CVec_CVec_u8ZZNoneZPtr; + struct LDKDecodeError *err; +} LDKCResult_UpdateFailMalformedHTLCDecodeErrorZPtr; /** - * A CResult_CVec_CVec_u8ZZNoneZ represents the result of a fallible operation, - * containing a crate::c_types::derived::CVec_CVec_u8ZZ on success and a () on failure. + * A CResult_UpdateFailMalformedHTLCDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UpdateFailMalformedHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_CVec_CVec_u8ZZNoneZ { +typedef struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ { /** - * The contents of this CResult_CVec_CVec_u8ZZNoneZ, accessible via either + * The contents of this CResult_UpdateFailMalformedHTLCDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_CVec_CVec_u8ZZNoneZPtr contents; + union LDKCResult_UpdateFailMalformedHTLCDecodeErrorZPtr contents; /** - * Whether this CResult_CVec_CVec_u8ZZNoneZ represents a success state. + * Whether this CResult_UpdateFailMalformedHTLCDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_CVec_CVec_u8ZZNoneZ; +} LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ; /** - * A simple implementation of Sign that just keeps the private keys in memory. - * - * This implementation performs no policy checks and is insufficient by itself as - * a secure external signer. + * An update_fee message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKInMemorySigner { +typedef struct MUST_USE_STRUCT LDKUpdateFee { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeInMemorySigner *inner; + LDKnativeUpdateFee *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKInMemorySigner; +} LDKUpdateFee; /** - * The contents of CResult_InMemorySignerDecodeErrorZ + * The contents of CResult_UpdateFeeDecodeErrorZ */ -typedef union LDKCResult_InMemorySignerDecodeErrorZPtr { +typedef union LDKCResult_UpdateFeeDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKInMemorySigner *result; + struct LDKUpdateFee *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_InMemorySignerDecodeErrorZPtr; +} LDKCResult_UpdateFeeDecodeErrorZPtr; /** - * A CResult_InMemorySignerDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::chain::keysinterface::InMemorySigner on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_UpdateFeeDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UpdateFee on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_InMemorySignerDecodeErrorZ { +typedef struct LDKCResult_UpdateFeeDecodeErrorZ { /** - * The contents of this CResult_InMemorySignerDecodeErrorZ, accessible via either + * The contents of this CResult_UpdateFeeDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_InMemorySignerDecodeErrorZPtr contents; + union LDKCResult_UpdateFeeDecodeErrorZPtr contents; /** - * Whether this CResult_InMemorySignerDecodeErrorZ represents a success state. + * Whether this CResult_UpdateFeeDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_InMemorySignerDecodeErrorZ; +} LDKCResult_UpdateFeeDecodeErrorZ; /** - * A dynamically-allocated array of crate::c_types::TxOuts of arbitrary size. - * This corresponds to std::vector in C++ + * The contents of CResult_UpdateFulfillHTLCDecodeErrorZ */ -typedef struct LDKCVec_TxOutZ { +typedef union LDKCResult_UpdateFulfillHTLCDecodeErrorZPtr { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKTxOut *data; + struct LDKUpdateFulfillHTLC *result; /** - * The number of elements pointed to by `data`. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uintptr_t datalen; -} LDKCVec_TxOutZ; + struct LDKDecodeError *err; +} LDKCResult_UpdateFulfillHTLCDecodeErrorZPtr; /** - * The contents of CResult_TransactionNoneZ + * A CResult_UpdateFulfillHTLCDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UpdateFulfillHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef union LDKCResult_TransactionNoneZPtr { +typedef struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ { + /** + * The contents of this CResult_UpdateFulfillHTLCDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_UpdateFulfillHTLCDecodeErrorZPtr contents; + /** + * Whether this CResult_UpdateFulfillHTLCDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_UpdateFulfillHTLCDecodeErrorZ; + +/** + * The contents of CResult_UpdateAddHTLCDecodeErrorZ + */ +typedef union LDKCResult_UpdateAddHTLCDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKTransaction *result; + struct LDKUpdateAddHTLC *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_TransactionNoneZPtr; + struct LDKDecodeError *err; +} LDKCResult_UpdateAddHTLCDecodeErrorZPtr; /** - * A CResult_TransactionNoneZ represents the result of a fallible operation, - * containing a crate::c_types::Transaction on success and a () on failure. + * A CResult_UpdateAddHTLCDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UpdateAddHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_TransactionNoneZ { +typedef struct LDKCResult_UpdateAddHTLCDecodeErrorZ { /** - * The contents of this CResult_TransactionNoneZ, accessible via either + * The contents of this CResult_UpdateAddHTLCDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_TransactionNoneZPtr contents; + union LDKCResult_UpdateAddHTLCDecodeErrorZPtr contents; /** - * Whether this CResult_TransactionNoneZ represents a success state. + * Whether this CResult_UpdateAddHTLCDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_TransactionNoneZ; +} LDKCResult_UpdateAddHTLCDecodeErrorZ; + + /** - * The contents of CResult_NoneErrorZ + * A ping message to be sent or received from a peer */ -typedef union LDKCResult_NoneErrorZPtr { +typedef struct MUST_USE_STRUCT LDKPing { /** - * Note that this value is always NULL, as there are no contents in the OK variant + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - void *result; + LDKnativePing *inner; + /** + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. + */ + bool is_owned; +} LDKPing; + +/** + * The contents of CResult_PingDecodeErrorZ + */ +typedef union LDKCResult_PingDecodeErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKPing *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - enum LDKIOError *err; -} LDKCResult_NoneErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_PingDecodeErrorZPtr; /** - * A CResult_NoneErrorZ represents the result of a fallible operation, - * containing a () on success and a crate::c_types::IOError on failure. + * A CResult_PingDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::Ping on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NoneErrorZ { +typedef struct LDKCResult_PingDecodeErrorZ { /** - * The contents of this CResult_NoneErrorZ, accessible via either + * The contents of this CResult_PingDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NoneErrorZPtr contents; + union LDKCResult_PingDecodeErrorZPtr contents; /** - * Whether this CResult_NoneErrorZ represents a success state. + * Whether this CResult_PingDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NoneErrorZ; +} LDKCResult_PingDecodeErrorZ; + + /** - * A dynamically-allocated array of crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZs of arbitrary size. - * This corresponds to std::vector in C++ + * A pong message to be sent or received from a peer */ -typedef struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ { +typedef struct MUST_USE_STRUCT LDKPong { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKC2Tuple_BlockHashChannelMonitorZ *data; + LDKnativePong *inner; /** - * The number of elements pointed to by `data`. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uintptr_t datalen; -} LDKCVec_C2Tuple_BlockHashChannelMonitorZZ; + bool is_owned; +} LDKPong; /** - * The contents of CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ + * The contents of CResult_PongDecodeErrorZ */ -typedef union LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr { +typedef union LDKCResult_PongDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *result; + struct LDKPong *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - enum LDKIOError *err; -} LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_PongDecodeErrorZPtr; /** - * A CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ represents the result of a fallible operation, - * containing a crate::c_types::derived::CVec_C2Tuple_BlockHashChannelMonitorZZ on success and a crate::c_types::IOError on failure. + * A CResult_PongDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::Pong on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ { +typedef struct LDKCResult_PongDecodeErrorZ { /** - * The contents of this CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ, accessible via either + * The contents of this CResult_PongDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr contents; + union LDKCResult_PongDecodeErrorZPtr contents; /** - * Whether this CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ represents a success state. + * Whether this CResult_PongDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ; +} LDKCResult_PongDecodeErrorZ; /** - * Indicates an error on the client's part (usually some variant of attempting to use too-low or - * too-high values) + * The contents of CResult_UnsignedChannelAnnouncementDecodeErrorZ */ -typedef enum LDKAPIError_Tag { - /** - * Indicates the API was wholly misused (see err for more). Cases where these can be returned - * are documented, but generally indicates some precondition of a function was violated. - */ - LDKAPIError_APIMisuseError, - /** - * Due to a high feerate, we were unable to complete the request. - * For example, this may be returned if the feerate implies we cannot open a channel at the - * requested value, but opening a larger channel would succeed. - */ - LDKAPIError_FeeRateTooHigh, - /** - * A malformed Route was provided (eg overflowed value, node id mismatch, overly-looped route, - * too-many-hops, etc). - */ - LDKAPIError_RouteError, - /** - * We were unable to complete the request as the Channel required to do so is unable to - * complete the request (or was not found). This can take many forms, including disconnected - * peer, channel at capacity, channel shutting down, etc. - */ - LDKAPIError_ChannelUnavailable, - /** - * An attempt to call watch/update_channel returned an Err (ie you did this!), causing the - * attempted action to fail. - */ - LDKAPIError_MonitorUpdateFailed, - /** - * Must be last for serialization purposes - */ - LDKAPIError_Sentinel, -} LDKAPIError_Tag; - -typedef struct LDKAPIError_LDKAPIMisuseError_Body { - /** - * A human-readable error message - */ - struct LDKStr err; -} LDKAPIError_LDKAPIMisuseError_Body; - -typedef struct LDKAPIError_LDKFeeRateTooHigh_Body { +typedef union LDKCResult_UnsignedChannelAnnouncementDecodeErrorZPtr { /** - * A human-readable error message + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKStr err; + struct LDKUnsignedChannelAnnouncement *result; /** - * The feerate which was too high. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uint32_t feerate; -} LDKAPIError_LDKFeeRateTooHigh_Body; + struct LDKDecodeError *err; +} LDKCResult_UnsignedChannelAnnouncementDecodeErrorZPtr; -typedef struct LDKAPIError_LDKRouteError_Body { +/** + * A CResult_UnsignedChannelAnnouncementDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UnsignedChannelAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ { /** - * A human-readable error message + * The contents of this CResult_UnsignedChannelAnnouncementDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - struct LDKStr err; -} LDKAPIError_LDKRouteError_Body; - -typedef struct LDKAPIError_LDKChannelUnavailable_Body { + union LDKCResult_UnsignedChannelAnnouncementDecodeErrorZPtr contents; /** - * A human-readable error message + * Whether this CResult_UnsignedChannelAnnouncementDecodeErrorZ represents a success state. */ - struct LDKStr err; -} LDKAPIError_LDKChannelUnavailable_Body; - -typedef struct MUST_USE_STRUCT LDKAPIError { - LDKAPIError_Tag tag; - union { - LDKAPIError_LDKAPIMisuseError_Body api_misuse_error; - LDKAPIError_LDKFeeRateTooHigh_Body fee_rate_too_high; - LDKAPIError_LDKRouteError_Body route_error; - LDKAPIError_LDKChannelUnavailable_Body channel_unavailable; - }; -} LDKAPIError; + bool result_ok; +} LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ; /** - * The contents of CResult_NoneAPIErrorZ + * The contents of CResult_ChannelAnnouncementDecodeErrorZ */ -typedef union LDKCResult_NoneAPIErrorZPtr { +typedef union LDKCResult_ChannelAnnouncementDecodeErrorZPtr { /** - * Note that this value is always NULL, as there are no contents in the OK variant + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - void *result; + struct LDKChannelAnnouncement *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKAPIError *err; -} LDKCResult_NoneAPIErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_ChannelAnnouncementDecodeErrorZPtr; /** - * A CResult_NoneAPIErrorZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning::util::errors::APIError on failure. + * A CResult_ChannelAnnouncementDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ChannelAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NoneAPIErrorZ { +typedef struct LDKCResult_ChannelAnnouncementDecodeErrorZ { /** - * The contents of this CResult_NoneAPIErrorZ, accessible via either + * The contents of this CResult_ChannelAnnouncementDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NoneAPIErrorZPtr contents; + union LDKCResult_ChannelAnnouncementDecodeErrorZPtr contents; /** - * Whether this CResult_NoneAPIErrorZ represents a success state. + * Whether this CResult_ChannelAnnouncementDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NoneAPIErrorZ; +} LDKCResult_ChannelAnnouncementDecodeErrorZ; + + /** - * A dynamically-allocated array of crate::c_types::derived::CResult_NoneAPIErrorZs of arbitrary size. - * This corresponds to std::vector in C++ + * The unsigned part of a channel_update */ -typedef struct LDKCVec_CResult_NoneAPIErrorZZ { +typedef struct MUST_USE_STRUCT LDKUnsignedChannelUpdate { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKCResult_NoneAPIErrorZ *data; + LDKnativeUnsignedChannelUpdate *inner; /** - * The number of elements pointed to by `data`. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uintptr_t datalen; -} LDKCVec_CResult_NoneAPIErrorZZ; + bool is_owned; +} LDKUnsignedChannelUpdate; /** - * A dynamically-allocated array of crate::lightning::util::errors::APIErrors of arbitrary size. - * This corresponds to std::vector in C++ + * The contents of CResult_UnsignedChannelUpdateDecodeErrorZ */ -typedef struct LDKCVec_APIErrorZ { +typedef union LDKCResult_UnsignedChannelUpdateDecodeErrorZPtr { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKAPIError *data; + struct LDKUnsignedChannelUpdate *result; /** - * The number of elements pointed to by `data`. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uintptr_t datalen; -} LDKCVec_APIErrorZ; + struct LDKDecodeError *err; +} LDKCResult_UnsignedChannelUpdateDecodeErrorZPtr; /** - * If a payment fails to send, it can be in one of several states. This enum is returned as the - * Err() type describing which state the payment is in, see the description of individual enum - * states for more. + * A CResult_UnsignedChannelUpdateDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UnsignedChannelUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef enum LDKPaymentSendFailure_Tag { - /** - * A parameter which was passed to send_payment was invalid, preventing us from attempting to - * send the payment at all. No channel state has been changed or messages sent to peers, and - * once you've changed the parameter at error, you can freely retry the payment in full. - */ - LDKPaymentSendFailure_ParameterError, +typedef struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ { /** - * A parameter in a single path which was passed to send_payment was invalid, preventing us - * from attempting to send the payment at all. No channel state has been changed or messages - * sent to peers, and once you've changed the parameter at error, you can freely retry the - * payment in full. - * - * The results here are ordered the same as the paths in the route object which was passed to - * send_payment. + * The contents of this CResult_UnsignedChannelUpdateDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKPaymentSendFailure_PathParameterError, + union LDKCResult_UnsignedChannelUpdateDecodeErrorZPtr contents; /** - * All paths which were attempted failed to send, with no channel state change taking place. - * You can freely retry the payment in full (though you probably want to do so over different - * paths than the ones selected). + * Whether this CResult_UnsignedChannelUpdateDecodeErrorZ represents a success state. */ - LDKPaymentSendFailure_AllFailedRetrySafe, + bool result_ok; +} LDKCResult_UnsignedChannelUpdateDecodeErrorZ; + +/** + * The contents of CResult_ChannelUpdateDecodeErrorZ + */ +typedef union LDKCResult_ChannelUpdateDecodeErrorZPtr { /** - * Some paths which were attempted failed to send, though possibly not all. At least some - * paths have irrevocably committed to the HTLC and retrying the payment in full would result - * in over-/re-payment. - * - * The results here are ordered the same as the paths in the route object which was passed to - * send_payment, and any Errs which are not APIError::MonitorUpdateFailed can be safely - * retried (though there is currently no API with which to do so). - * - * Any entries which contain Err(APIError::MonitorUpdateFailed) or Ok(()) MUST NOT be retried - * as they will result in over-/re-payment. These HTLCs all either successfully sent (in the - * case of Ok(())) or will send once channel_monitor_updated is called on the next-hop channel - * with the latest update_id. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKPaymentSendFailure_PartialFailure, + struct LDKChannelUpdate *result; /** - * Must be last for serialization purposes + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - LDKPaymentSendFailure_Sentinel, -} LDKPaymentSendFailure_Tag; - -typedef struct MUST_USE_STRUCT LDKPaymentSendFailure { - LDKPaymentSendFailure_Tag tag; - union { - struct { - struct LDKAPIError parameter_error; - }; - struct { - struct LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error; - }; - struct { - struct LDKCVec_APIErrorZ all_failed_retry_safe; - }; - struct { - struct LDKCVec_CResult_NoneAPIErrorZZ partial_failure; - }; - }; -} LDKPaymentSendFailure; + struct LDKDecodeError *err; +} LDKCResult_ChannelUpdateDecodeErrorZPtr; /** - * The contents of CResult_NonePaymentSendFailureZ + * A CResult_ChannelUpdateDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ChannelUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef union LDKCResult_NonePaymentSendFailureZPtr { +typedef struct LDKCResult_ChannelUpdateDecodeErrorZ { /** - * Note that this value is always NULL, as there are no contents in the OK variant + * The contents of this CResult_ChannelUpdateDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - void *result; + union LDKCResult_ChannelUpdateDecodeErrorZPtr contents; + /** + * Whether this CResult_ChannelUpdateDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_ChannelUpdateDecodeErrorZ; + +/** + * The contents of CResult_ErrorMessageDecodeErrorZ + */ +typedef union LDKCResult_ErrorMessageDecodeErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKErrorMessage *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKPaymentSendFailure *err; -} LDKCResult_NonePaymentSendFailureZPtr; + struct LDKDecodeError *err; +} LDKCResult_ErrorMessageDecodeErrorZPtr; /** - * A CResult_NonePaymentSendFailureZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning::ln::channelmanager::PaymentSendFailure on failure. + * A CResult_ErrorMessageDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ErrorMessage on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NonePaymentSendFailureZ { +typedef struct LDKCResult_ErrorMessageDecodeErrorZ { /** - * The contents of this CResult_NonePaymentSendFailureZ, accessible via either + * The contents of this CResult_ErrorMessageDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NonePaymentSendFailureZPtr contents; + union LDKCResult_ErrorMessageDecodeErrorZPtr contents; /** - * Whether this CResult_NonePaymentSendFailureZ represents a success state. + * Whether this CResult_ErrorMessageDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NonePaymentSendFailureZ; +} LDKCResult_ErrorMessageDecodeErrorZ; + + /** - * A tuple of 2 elements. See the individual fields for the types contained. + * The unsigned part of a node_announcement */ -typedef struct LDKC2Tuple_PaymentHashPaymentSecretZ { +typedef struct MUST_USE_STRUCT LDKUnsignedNodeAnnouncement { /** - * The element at position 0 + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKThirtyTwoBytes a; + LDKnativeUnsignedNodeAnnouncement *inner; /** - * The element at position 1 + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKThirtyTwoBytes b; -} LDKC2Tuple_PaymentHashPaymentSecretZ; + bool is_owned; +} LDKUnsignedNodeAnnouncement; /** - * The contents of CResult_PaymentSecretAPIErrorZ + * The contents of CResult_UnsignedNodeAnnouncementDecodeErrorZ */ -typedef union LDKCResult_PaymentSecretAPIErrorZPtr { +typedef union LDKCResult_UnsignedNodeAnnouncementDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKThirtyTwoBytes *result; + struct LDKUnsignedNodeAnnouncement *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKAPIError *err; -} LDKCResult_PaymentSecretAPIErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_UnsignedNodeAnnouncementDecodeErrorZPtr; /** - * A CResult_PaymentSecretAPIErrorZ represents the result of a fallible operation, - * containing a crate::c_types::ThirtyTwoBytes on success and a crate::lightning::util::errors::APIError on failure. + * A CResult_UnsignedNodeAnnouncementDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UnsignedNodeAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_PaymentSecretAPIErrorZ { +typedef struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ { /** - * The contents of this CResult_PaymentSecretAPIErrorZ, accessible via either + * The contents of this CResult_UnsignedNodeAnnouncementDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_PaymentSecretAPIErrorZPtr contents; + union LDKCResult_UnsignedNodeAnnouncementDecodeErrorZPtr contents; /** - * Whether this CResult_PaymentSecretAPIErrorZ represents a success state. + * Whether this CResult_UnsignedNodeAnnouncementDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_PaymentSecretAPIErrorZ; +} LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ; /** - * A dynamically-allocated array of crate::lightning::chain::channelmonitor::ChannelMonitors of arbitrary size. - * This corresponds to std::vector in C++ + * The contents of CResult_NodeAnnouncementDecodeErrorZ */ -typedef struct LDKCVec_ChannelMonitorZ { +typedef union LDKCResult_NodeAnnouncementDecodeErrorZPtr { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKChannelMonitor *data; + struct LDKNodeAnnouncement *result; /** - * The number of elements pointed to by `data`. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uintptr_t datalen; -} LDKCVec_ChannelMonitorZ; + struct LDKDecodeError *err; +} LDKCResult_NodeAnnouncementDecodeErrorZPtr; /** - * The `Watch` trait defines behavior for watching on-chain activity pertaining to channels as - * blocks are connected and disconnected. - * - * Each channel is associated with a [`ChannelMonitor`]. Implementations of this trait are - * responsible for maintaining a set of monitors such that they can be updated accordingly as - * channel state changes and HTLCs are resolved. See method documentation for specific - * requirements. - * - * Implementations **must** ensure that updates are successfully applied and persisted upon method - * completion. If an update fails with a [`PermanentFailure`], then it must immediately shut down - * without taking any further action such as persisting the current state. - * - * If an implementation maintains multiple instances of a channel's monitor (e.g., by storing - * backup copies), then it must ensure that updates are applied across all instances. Otherwise, it - * could result in a revoked transaction being broadcast, allowing the counterparty to claim all - * funds in the channel. See [`ChannelMonitorUpdateErr`] for more details about how to handle - * multiple instances. - * - * [`ChannelMonitor`]: channelmonitor::ChannelMonitor - * [`ChannelMonitorUpdateErr`]: channelmonitor::ChannelMonitorUpdateErr - * [`PermanentFailure`]: channelmonitor::ChannelMonitorUpdateErr::PermanentFailure + * A CResult_NodeAnnouncementDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::NodeAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKWatch { - /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. - */ - void *this_arg; - /** - * Watches a channel identified by `funding_txo` using `monitor`. - * - * Implementations are responsible for watching the chain for the funding transaction along - * with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means - * calling [`block_connected`] and [`block_disconnected`] on the monitor. - * - * [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch - * [`block_connected`]: channelmonitor::ChannelMonitor::block_connected - * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected - */ - struct LDKCResult_NoneChannelMonitorUpdateErrZ (*watch_channel)(const void *this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor); - /** - * Updates a channel identified by `funding_txo` by applying `update` to its monitor. - * - * Implementations must call [`update_monitor`] with the given update. See - * [`ChannelMonitorUpdateErr`] for invariants around returning an error. - * - * [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor - * [`ChannelMonitorUpdateErr`]: channelmonitor::ChannelMonitorUpdateErr - */ - struct LDKCResult_NoneChannelMonitorUpdateErrZ (*update_channel)(const void *this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update); +typedef struct LDKCResult_NodeAnnouncementDecodeErrorZ { /** - * Returns any monitor events since the last call. Subsequent calls must only return new - * events. + * The contents of this CResult_NodeAnnouncementDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - struct LDKCVec_MonitorEventZ (*release_pending_monitor_events)(const void *this_arg); + union LDKCResult_NodeAnnouncementDecodeErrorZPtr contents; /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * Whether this CResult_NodeAnnouncementDecodeErrorZ represents a success state. */ - void (*free)(void *this_arg); -} LDKWatch; + bool result_ok; +} LDKCResult_NodeAnnouncementDecodeErrorZ; /** - * An interface to send a transaction to the Bitcoin network. + * The contents of CResult_QueryShortChannelIdsDecodeErrorZ */ -typedef struct LDKBroadcasterInterface { - /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. - */ - void *this_arg; +typedef union LDKCResult_QueryShortChannelIdsDecodeErrorZPtr { /** - * Sends a transaction out to (hopefully) be mined. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - void (*broadcast_transaction)(const void *this_arg, struct LDKTransaction tx); + struct LDKQueryShortChannelIds *result; /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void (*free)(void *this_arg); -} LDKBroadcasterInterface; + struct LDKDecodeError *err; +} LDKCResult_QueryShortChannelIdsDecodeErrorZPtr; /** - * A "slice" referencing some byte array. This is simply a length-tagged pointer which does not - * own the memory pointed to by data. + * A CResult_QueryShortChannelIdsDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::QueryShortChannelIds on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKu8slice { +typedef struct LDKCResult_QueryShortChannelIdsDecodeErrorZ { /** - * A pointer to the byte buffer + * The contents of this CResult_QueryShortChannelIdsDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - const uint8_t *data; + union LDKCResult_QueryShortChannelIdsDecodeErrorZPtr contents; /** - * The number of bytes pointed to by `data`. + * Whether this CResult_QueryShortChannelIdsDecodeErrorZ represents a success state. */ - uintptr_t datalen; -} LDKu8slice; + bool result_ok; +} LDKCResult_QueryShortChannelIdsDecodeErrorZ; + + /** - * A trait to describe an object which can get user secrets and key material. + * A reply_short_channel_ids_end message is sent as a reply to a + * query_short_channel_ids message. The query recipient makes a best + * effort to respond based on their local network view which may not be + * a perfect view of the network. */ -typedef struct LDKKeysInterface { - /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. - */ - void *this_arg; - /** - * Get node secret key (aka node_id or network_key). - * - * This method must return the same value each time it is called. - */ - struct LDKSecretKey (*get_node_secret)(const void *this_arg); - /** - * Get a script pubkey which we send funds to when claiming on-chain contestable outputs. - * - * This method should return a different value each time it is called, to avoid linking - * on-chain funds across channels as controlled to the same user. - */ - struct LDKCVec_u8Z (*get_destination_script)(const void *this_arg); +typedef struct MUST_USE_STRUCT LDKReplyShortChannelIdsEnd { /** - * Get a public key which we will send funds to (in the form of a P2WPKH output) when closing - * a channel. - * - * This method should return a different value each time it is called, to avoid linking - * on-chain funds across channels as controlled to the same user. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKPublicKey (*get_shutdown_pubkey)(const void *this_arg); + LDKnativeReplyShortChannelIdsEnd *inner; /** - * Get a new set of Sign for per-channel secrets. These MUST be unique even if you - * restarted with some stale data! - * - * This method must return a different value each time it is called. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKSign (*get_channel_signer)(const void *this_arg, bool inbound, uint64_t channel_value_satoshis); + bool is_owned; +} LDKReplyShortChannelIdsEnd; + +/** + * The contents of CResult_ReplyShortChannelIdsEndDecodeErrorZ + */ +typedef union LDKCResult_ReplyShortChannelIdsEndDecodeErrorZPtr { /** - * Gets a unique, cryptographically-secure, random 32 byte value. This is used for encrypting - * onion packets and for temporary channel IDs. There is no requirement that these be - * persisted anywhere, though they must be unique across restarts. - * - * This method must return a different value each time it is called. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKThirtyTwoBytes (*get_secure_random_bytes)(const void *this_arg); + struct LDKReplyShortChannelIdsEnd *result; /** - * Reads a `Signer` for this `KeysInterface` from the given input stream. - * This is only called during deserialization of other objects which contain - * `Sign`-implementing objects (ie `ChannelMonitor`s and `ChannelManager`s). - * The bytes are exactly those which `::write()` writes, and - * contain no versioning scheme. You may wish to include your own version prefix and ensure - * you've read all of the provided bytes to ensure no corruption occurred. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKCResult_SignDecodeErrorZ (*read_chan_signer)(const void *this_arg, struct LDKu8slice reader); + struct LDKDecodeError *err; +} LDKCResult_ReplyShortChannelIdsEndDecodeErrorZPtr; + +/** + * A CResult_ReplyShortChannelIdsEndDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ReplyShortChannelIdsEnd on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ { /** - * Sign an invoice's preimage (note that this is the preimage of the invoice, not the HTLC's - * preimage). By parameterizing by the preimage instead of the hash, we allow implementors of - * this trait to parse the invoice and make sure they're signing what they expect, rather than - * blindly signing the hash. + * The contents of this CResult_ReplyShortChannelIdsEndDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - struct LDKCResult_RecoverableSignatureNoneZ (*sign_invoice)(const void *this_arg, struct LDKCVec_u8Z invoice_preimage); + union LDKCResult_ReplyShortChannelIdsEndDecodeErrorZPtr contents; /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * Whether this CResult_ReplyShortChannelIdsEndDecodeErrorZ represents a success state. */ - void (*free)(void *this_arg); -} LDKKeysInterface; + bool result_ok; +} LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ; /** - * A trait which should be implemented to provide feerate information on a number of time - * horizons. - * - * Note that all of the functions implemented here *must* be reentrant-safe (obviously - they're - * called from inside the library in response to chain events, P2P events, or timer events). + * The contents of CResult_QueryChannelRangeDecodeErrorZ */ -typedef struct LDKFeeEstimator { +typedef union LDKCResult_QueryChannelRangeDecodeErrorZPtr { /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - void *this_arg; + struct LDKQueryChannelRange *result; /** - * Gets estimated satoshis of fee required per 1000 Weight-Units. - * - * Must be no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later round-downs - * don't put us below 1 satoshi-per-byte). - * - * This translates to: - * * satoshis-per-byte * 250 - * * ceil(satoshis-per-kbyte / 4) + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uint32_t (*get_est_sat_per_1000_weight)(const void *this_arg, enum LDKConfirmationTarget confirmation_target); + struct LDKDecodeError *err; +} LDKCResult_QueryChannelRangeDecodeErrorZPtr; + +/** + * A CResult_QueryChannelRangeDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::QueryChannelRange on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_QueryChannelRangeDecodeErrorZ { /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * The contents of this CResult_QueryChannelRangeDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - void (*free)(void *this_arg); -} LDKFeeEstimator; + union LDKCResult_QueryChannelRangeDecodeErrorZPtr contents; + /** + * Whether this CResult_QueryChannelRangeDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_QueryChannelRangeDecodeErrorZ; /** - * A trait encapsulating the operations required of a logger + * The contents of CResult_ReplyChannelRangeDecodeErrorZ */ -typedef struct LDKLogger { +typedef union LDKCResult_ReplyChannelRangeDecodeErrorZPtr { /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - void *this_arg; + struct LDKReplyChannelRange *result; /** - * Logs the `Record` + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void (*log)(const void *this_arg, const char *record); + struct LDKDecodeError *err; +} LDKCResult_ReplyChannelRangeDecodeErrorZPtr; + +/** + * A CResult_ReplyChannelRangeDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ReplyChannelRange on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_ReplyChannelRangeDecodeErrorZ { /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * The contents of this CResult_ReplyChannelRangeDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - void (*free)(void *this_arg); -} LDKLogger; + union LDKCResult_ReplyChannelRangeDecodeErrorZPtr contents; + /** + * Whether this CResult_ReplyChannelRangeDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_ReplyChannelRangeDecodeErrorZ; /** - * Manager which keeps track of a number of channels and sends messages to the appropriate - * channel, also tracking HTLC preimages and forwarding onion packets appropriately. - * - * Implements ChannelMessageHandler, handling the multi-channel parts and passing things through - * to individual Channels. - * - * Implements Writeable to write out all channel state to disk. Implies peer_disconnected() for - * all peers during write/read (though does not modify this instance, only the instance being - * serialized). This will result in any channels which have not yet exchanged funding_created (ie - * called funding_transaction_generated for outbound channels). - * - * Note that you can be a bit lazier about writing out ChannelManager than you can be with - * ChannelMonitors. With ChannelMonitors you MUST write each monitor update out to disk before - * returning from chain::Watch::watch_/update_channel, with ChannelManagers, writing updates - * happens out-of-band (and will prevent any other ChannelManager operations from occurring during - * the serialization process). If the deserialized version is out-of-date compared to the - * ChannelMonitors passed by reference to read(), those channels will be force-closed based on the - * ChannelMonitor state and no funds will be lost (mod on-chain transaction fees). - * - * Note that the deserializer is only implemented for (BlockHash, ChannelManager), which - * tells you the last block hash which was block_connect()ed. You MUST rescan any blocks along - * the \"reorg path\" (ie call block_disconnected() until you get to a common block and then call - * block_connected() to step towards your best block) upon deserialization before using the - * object! - * - * Note that ChannelManager is responsible for tracking liveness of its channels and generating - * ChannelUpdate messages informing peers that the channel is temporarily disabled. To avoid - * spam due to quick disconnection/reconnection, updates are not sent until the channel has been - * offline for a full minute. In order to track this, you must call - * timer_tick_occurred roughly once per minute, though it doesn't have to be perfect. - * - * Rather than using a plain ChannelManager, it is preferable to use either a SimpleArcChannelManager - * a SimpleRefChannelManager, for conciseness. See their documentation for more details, but - * essentially you should default to using a SimpleRefChannelManager, and use a - * SimpleArcChannelManager when you require a ChannelManager with a static lifetime, such as when - * you're using lightning-net-tokio. + * A gossip_timestamp_filter message is used by a node to request + * gossip relay for messages in the requested time range when the + * gossip_queries feature has been negotiated. */ -typedef struct MUST_USE_STRUCT LDKChannelManager { +typedef struct MUST_USE_STRUCT LDKGossipTimestampFilter { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeChannelManager *inner; + LDKnativeGossipTimestampFilter *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKChannelManager; +} LDKGossipTimestampFilter; /** - * A tuple of 2 elements. See the individual fields for the types contained. + * The contents of CResult_GossipTimestampFilterDecodeErrorZ */ -typedef struct LDKC2Tuple_BlockHashChannelManagerZ { +typedef union LDKCResult_GossipTimestampFilterDecodeErrorZPtr { /** - * The element at position 0 + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKThirtyTwoBytes a; + struct LDKGossipTimestampFilter *result; /** - * The element at position 1 + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKChannelManager b; -} LDKC2Tuple_BlockHashChannelManagerZ; + struct LDKDecodeError *err; +} LDKCResult_GossipTimestampFilterDecodeErrorZPtr; /** - * The contents of CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ + * A CResult_GossipTimestampFilterDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::GossipTimestampFilter on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef union LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr { +typedef struct LDKCResult_GossipTimestampFilterDecodeErrorZ { + /** + * The contents of this CResult_GossipTimestampFilterDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_GossipTimestampFilterDecodeErrorZPtr contents; + /** + * Whether this CResult_GossipTimestampFilterDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_GossipTimestampFilterDecodeErrorZ; + +/** + * When signing using a fallible method either an user-supplied `SignError` or a `CreationError` + * may occur. + */ +typedef enum LDKSignOrCreationError_Tag { + /** + * An error occurred during signing + */ + LDKSignOrCreationError_SignError, + /** + * An error occurred while building the transaction + */ + LDKSignOrCreationError_CreationError, + /** + * Must be last for serialization purposes + */ + LDKSignOrCreationError_Sentinel, +} LDKSignOrCreationError_Tag; + +typedef struct MUST_USE_STRUCT LDKSignOrCreationError { + LDKSignOrCreationError_Tag tag; + union { + struct { + enum LDKCreationError creation_error; + }; + }; +} LDKSignOrCreationError; + +/** + * The contents of CResult_InvoiceSignOrCreationErrorZ + */ +typedef union LDKCResult_InvoiceSignOrCreationErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKC2Tuple_BlockHashChannelManagerZ *result; + struct LDKInvoice *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr; + struct LDKSignOrCreationError *err; +} LDKCResult_InvoiceSignOrCreationErrorZPtr; /** - * A CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ represents the result of a fallible operation, - * containing a crate::c_types::derived::C2Tuple_BlockHashChannelManagerZ on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_InvoiceSignOrCreationErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::Invoice on success and a crate::lightning_invoice::SignOrCreationError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ { +typedef struct LDKCResult_InvoiceSignOrCreationErrorZ { /** - * The contents of this CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ, accessible via either + * The contents of this CResult_InvoiceSignOrCreationErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr contents; + union LDKCResult_InvoiceSignOrCreationErrorZPtr contents; /** - * Whether this CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ represents a success state. + * Whether this CResult_InvoiceSignOrCreationErrorZ represents a success state. */ bool result_ok; -} LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ; +} LDKCResult_InvoiceSignOrCreationErrorZ; /** * A trait indicating an object may generate message send events @@ -7600,7 +7752,52 @@ typedef struct LDKMessageSendEventsProvider { } LDKMessageSendEventsProvider; /** - * A trait indicating an object may generate events + * A trait implemented for objects handling events from [`EventsProvider`]. + */ +typedef struct LDKEventHandler { + /** + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. + */ + void *this_arg; + /** + * Handles the given [`Event`]. + * + * See [`EventsProvider`] for details that must be considered when implementing this method. + */ + void (*handle_event)(const void *this_arg, struct LDKEvent event); + /** + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + */ + void (*free)(void *this_arg); +} LDKEventHandler; + +/** + * A trait indicating an object may generate events. + * + * Events are processed by passing an [`EventHandler`] to [`process_pending_events`]. + * + * # Requirements + * + * See [`process_pending_events`] for requirements around event processing. + * + * When using this trait, [`process_pending_events`] will call [`handle_event`] for each pending + * event since the last invocation. The handler must either act upon the event immediately + * or preserve it for later handling. + * + * Note, handlers may call back into the provider and thus deadlocking must be avoided. Be sure to + * consult the provider's documentation on the implication of processing events and how a handler + * may safely use the provider (e.g., see [`ChannelManager::process_pending_events`] and + * [`ChainMonitor::process_pending_events`]). + * + * (C-not implementable) As there is likely no reason for a user to implement this trait on their + * own type(s). + * + * [`process_pending_events`]: Self::process_pending_events + * [`handle_event`]: EventHandler::handle_event + * [`ChannelManager::process_pending_events`]: crate::ln::channelmanager::ChannelManager#method.process_pending_events + * [`ChainMonitor::process_pending_events`]: crate::chain::chainmonitor::ChainMonitor#method.process_pending_events */ typedef struct LDKEventsProvider { /** @@ -7609,10 +7806,13 @@ typedef struct LDKEventsProvider { */ void *this_arg; /** - * Gets the list of pending events which were generated by previous actions, clearing the list - * in the process. + * Processes any events generated since the last call using the given event handler. + * + * Subsequent calls must only process new events. However, handlers must be capable of handling + * duplicate events across process restarts. This may occur if the provider was recovered from + * an old state (i.e., it hadn't been successfully persisted after processing pending events). */ - struct LDKCVec_EventZ (*get_and_clear_pending_events)(const void *this_arg); + void (*process_pending_events)(const void *this_arg, struct LDKEventHandler handler); /** * Frees any resources associated with this object given its this_arg pointer. * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. @@ -8617,6 +8817,64 @@ typedef struct MUST_USE_STRUCT LDKFilesystemPersister { +/** + * BackgroundProcessor takes care of tasks that (1) need to happen periodically to keep + * Rust-Lightning running properly, and (2) either can or should be run in the background. Its + * responsibilities are: + * * Monitoring whether the ChannelManager needs to be re-persisted to disk, and if so, + * writing it to disk/backups by invoking the callback given to it at startup. + * ChannelManager persistence should be done in the background. + * * Calling `ChannelManager::timer_tick_occurred()` and + * `PeerManager::timer_tick_occurred()` every minute (can be done in the + * background). + * + * Note that if ChannelManager persistence fails and the persisted manager becomes out-of-date, + * then there is a risk of channels force-closing on startup when the manager realizes it's + * outdated. However, as long as `ChannelMonitor` backups are sound, no funds besides those used + * for unilateral chain closure fees are at risk. + */ +typedef struct MUST_USE_STRUCT LDKBackgroundProcessor { + /** + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. + */ + LDKnativeBackgroundProcessor *inner; + /** + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. + */ + bool is_owned; +} LDKBackgroundProcessor; + +/** + * Trait which handles persisting a [`ChannelManager`] to disk. + * + * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager + */ +typedef struct LDKChannelManagerPersister { + /** + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. + */ + void *this_arg; + /** + * Persist the given [`ChannelManager`] to disk, returning an error if persistence failed + * (which will cause the [`BackgroundProcessor`] which called this method to exit. + * + * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager + */ + struct LDKCResult_NoneErrorZ (*persist_manager)(const void *this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager); + /** + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + */ + void (*free)(void *this_arg); +} LDKChannelManagerPersister; + + + /** * Data of the `RawInvoice` that is encoded in the data part */ @@ -8729,6 +8987,8 @@ extern const uint64_t MIN_RELAY_FEE_SAT_PER_1000_WEIGHT; extern const uint64_t CLOSED_CHANNEL_UPDATE_ID; +extern const uint32_t ANTI_REORG_DELAY; + extern const uint16_t BREAKDOWN_TIMEOUT; extern const uint16_t MIN_CLTV_EXPIRY_DELTA; @@ -8781,48 +9041,6 @@ struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig); */ void Str_free(struct LDKStr _res); -/** - * Creates a new CResult_ChannelConfigDecodeErrorZ in the success state. - */ -struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o); - -/** - * Creates a new CResult_ChannelConfigDecodeErrorZ in the error state. - */ -struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e); - -/** - * Frees any resources used by the CResult_ChannelConfigDecodeErrorZ. - */ -void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res); - -/** - * Creates a new CResult_ChannelConfigDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. - */ -struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig); - -/** - * Creates a new CResult_OutPointDecodeErrorZ in the success state. - */ -struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o); - -/** - * Creates a new CResult_OutPointDecodeErrorZ in the error state. - */ -struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e); - -/** - * Frees any resources used by the CResult_OutPointDecodeErrorZ. - */ -void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res); - -/** - * Creates a new CResult_OutPointDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. - */ -struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig); - /** * Creates a new CResult_SecretKeyErrorZ in the success state. */ @@ -8853,6 +9071,12 @@ struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1E */ void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res); +/** + * Creates a new CResult_PublicKeyErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig); + /** * Creates a new CResult_TxCreationKeysDecodeErrorZ in the success state. */ @@ -8910,6 +9134,12 @@ struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDK */ void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res); +/** + * Creates a new CResult_TxCreationKeysErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig); + /** * Constructs a new COption_u32Z containing a u32 */ @@ -9088,2011 +9318,2197 @@ struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LD struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void); /** - * Frees any resources used by the CResult_CVec_SignatureZNoneZ. + * Frees any resources used by the CResult_CVec_SignatureZNoneZ. + */ +void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res); + +/** + * Creates a new CResult_CVec_SignatureZNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig); + +/** + * Creates a new CResult_NoneErrorZ in the success state. + */ +struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void); + +/** + * Creates a new CResult_NoneErrorZ in the error state. + */ +struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e); + +/** + * Frees any resources used by the CResult_NoneErrorZ. + */ +void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res); + +/** + * Creates a new CResult_NoneErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig); + +/** + * Creates a new CResult_RouteHopDecodeErrorZ in the success state. + */ +struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o); + +/** + * Creates a new CResult_RouteHopDecodeErrorZ in the error state. + */ +struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e); + +/** + * Frees any resources used by the CResult_RouteHopDecodeErrorZ. + */ +void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res); + +/** + * Creates a new CResult_RouteHopDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig); + +/** + * Frees the buffer pointed to by `data` if `datalen` is non-0. + */ +void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res); + +/** + * Frees the buffer pointed to by `data` if `datalen` is non-0. + */ +void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res); + +/** + * Creates a new CResult_RouteDecodeErrorZ in the success state. + */ +struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o); + +/** + * Creates a new CResult_RouteDecodeErrorZ in the error state. + */ +struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e); + +/** + * Frees any resources used by the CResult_RouteDecodeErrorZ. + */ +void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res); + +/** + * Creates a new CResult_RouteDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig); + +/** + * Constructs a new COption_u64Z containing a u64 + */ +struct LDKCOption_u64Z COption_u64Z_some(uint64_t o); + +/** + * Constructs a new COption_u64Z containing nothing + */ +struct LDKCOption_u64Z COption_u64Z_none(void); + +/** + * Frees any resources associated with the u64, if we are in the Some state + */ +void COption_u64Z_free(struct LDKCOption_u64Z _res); + +/** + * Creates a new COption_u64Z which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig); + +/** + * Frees the buffer pointed to by `data` if `datalen` is non-0. + */ +void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res); + +/** + * Frees the buffer pointed to by `data` if `datalen` is non-0. + */ +void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res); + +/** + * Creates a new CResult_RouteLightningErrorZ in the success state. + */ +struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o); + +/** + * Creates a new CResult_RouteLightningErrorZ in the error state. + */ +struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e); + +/** + * Frees any resources used by the CResult_RouteLightningErrorZ. + */ +void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res); + +/** + * Creates a new CResult_RouteLightningErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig); + +/** + * Creates a new CResult_TxOutAccessErrorZ in the success state. + */ +struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o); + +/** + * Creates a new CResult_TxOutAccessErrorZ in the error state. + */ +struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e); + +/** + * Frees any resources used by the CResult_TxOutAccessErrorZ. + */ +void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res); + +/** + * Creates a new CResult_TxOutAccessErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res); +struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_CVec_SignatureZNoneZ which has the same data as `orig` + * Creates a new tuple which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig); +struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig); /** - * Creates a new CResult_SiPrefixNoneZ in the success state. + * Creates a new C2Tuple_usizeTransactionZ from the contained elements. */ -struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o); +struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b); /** - * Creates a new CResult_SiPrefixNoneZ in the error state. + * Frees any resources used by the C2Tuple_usizeTransactionZ. */ -struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void); +void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res); /** - * Frees any resources used by the CResult_SiPrefixNoneZ. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res); +void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res); /** - * Creates a new CResult_SiPrefixNoneZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig); +void CVec_TxidZ_free(struct LDKCVec_TxidZ _res); /** - * Creates a new CResult_InvoiceNoneZ in the success state. + * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the success state. */ -struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o); +struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void); /** - * Creates a new CResult_InvoiceNoneZ in the error state. + * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the error state. */ -struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void); +struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e); /** - * Frees any resources used by the CResult_InvoiceNoneZ. + * Frees any resources used by the CResult_NoneChannelMonitorUpdateErrZ. */ -void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res); +void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res); /** - * Creates a new CResult_InvoiceNoneZ which has the same data as `orig` + * Creates a new CResult_NoneChannelMonitorUpdateErrZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig); +struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig); /** - * Creates a new CResult_SignedRawInvoiceNoneZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o); +void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res); /** - * Creates a new CResult_SignedRawInvoiceNoneZ in the error state. + * Constructs a new COption_C2Tuple_usizeTransactionZZ containing a crate::c_types::derived::C2Tuple_usizeTransactionZ */ -struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void); +struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o); /** - * Frees any resources used by the CResult_SignedRawInvoiceNoneZ. + * Constructs a new COption_C2Tuple_usizeTransactionZZ containing nothing */ -void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res); +struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void); /** - * Creates a new CResult_SignedRawInvoiceNoneZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees any resources associated with the crate::c_types::derived::C2Tuple_usizeTransactionZ, if we are in the Some state */ -struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig); +void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new COption_C2Tuple_usizeTransactionZZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CVec_u8Z_free(struct LDKCVec_u8Z _res); +struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig); /** - * Creates a new C3Tuple_RawInvoice_u832InvoiceSignatureZ from the contained elements. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c); +void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res); /** - * Frees any resources used by the C3Tuple_RawInvoice_u832InvoiceSignatureZ. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res); +void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res); /** - * Creates a new CResult_PayeePubKeyErrorZ in the success state. + * Creates a new CResult_InitFeaturesDecodeErrorZ in the success state. */ -struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o); +struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o); /** - * Creates a new CResult_PayeePubKeyErrorZ in the error state. + * Creates a new CResult_InitFeaturesDecodeErrorZ in the error state. */ -struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e); +struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_PayeePubKeyErrorZ. + * Frees any resources used by the CResult_InitFeaturesDecodeErrorZ. */ -void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res); +void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_NodeFeaturesDecodeErrorZ in the success state. */ -void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res); +struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o); /** - * Constructs a new COption_u64Z containing a u64 + * Creates a new CResult_NodeFeaturesDecodeErrorZ in the error state. */ -struct LDKCOption_u64Z COption_u64Z_some(uint64_t o); +struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e); /** - * Constructs a new COption_u64Z containing nothing + * Frees any resources used by the CResult_NodeFeaturesDecodeErrorZ. */ -struct LDKCOption_u64Z COption_u64Z_none(void); +void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res); /** - * Frees any resources associated with the u64, if we are in the Some state + * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the success state. */ -void COption_u64Z_free(struct LDKCOption_u64Z _res); +struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o); /** - * Creates a new COption_u64Z which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the error state. */ -struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig); +struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_PositiveTimestampCreationErrorZ in the success state. + * Frees any resources used by the CResult_ChannelFeaturesDecodeErrorZ. */ -struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o); +void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res); /** - * Creates a new CResult_PositiveTimestampCreationErrorZ in the error state. + * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the success state. */ -struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e); +struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o); /** - * Frees any resources used by the CResult_PositiveTimestampCreationErrorZ. + * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the error state. */ -void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res); +struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_PositiveTimestampCreationErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees any resources used by the CResult_InvoiceFeaturesDecodeErrorZ. */ -struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig); +void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res); /** - * Creates a new CResult_NoneSemanticErrorZ in the success state. + * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the success state. */ -struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void); +struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o); /** - * Creates a new CResult_NoneSemanticErrorZ in the error state. + * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the error state. */ -struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e); +struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_NoneSemanticErrorZ. + * Frees any resources used by the CResult_DelayedPaymentOutputDescriptorDecodeErrorZ. */ -void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res); +void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res); /** - * Creates a new CResult_NoneSemanticErrorZ which has the same data as `orig` + * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig); +struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_InvoiceSemanticErrorZ in the success state. + * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the success state. */ -struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o); +struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o); /** - * Creates a new CResult_InvoiceSemanticErrorZ in the error state. + * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the error state. */ -struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e); +struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_InvoiceSemanticErrorZ. + * Frees any resources used by the CResult_StaticPaymentOutputDescriptorDecodeErrorZ. */ -void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res); +void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res); /** - * Creates a new CResult_InvoiceSemanticErrorZ which has the same data as `orig` + * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig); +struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_DescriptionCreationErrorZ in the success state. + * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the success state. */ -struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o); +struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o); /** - * Creates a new CResult_DescriptionCreationErrorZ in the error state. + * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the error state. */ -struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e); +struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_DescriptionCreationErrorZ. + * Frees any resources used by the CResult_SpendableOutputDescriptorDecodeErrorZ. */ -void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res); +void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res); /** - * Creates a new CResult_DescriptionCreationErrorZ which has the same data as `orig` + * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig); +struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ExpiryTimeCreationErrorZ in the success state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o); +struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig); /** - * Creates a new CResult_ExpiryTimeCreationErrorZ in the error state. + * Creates a new C2Tuple_SignatureCVec_SignatureZZ from the contained elements. */ -struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e); +struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b); /** - * Frees any resources used by the CResult_ExpiryTimeCreationErrorZ. + * Frees any resources used by the C2Tuple_SignatureCVec_SignatureZZ. */ -void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res); +void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res); /** - * Creates a new CResult_ExpiryTimeCreationErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the success state. */ -struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig); +struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the error state. */ -void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res); +struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void); /** - * Creates a new CResult_RouteHintCreationErrorZ in the success state. + * Frees any resources used by the CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ. */ -struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_ok(struct LDKRouteHint o); +void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res); /** - * Creates a new CResult_RouteHintCreationErrorZ in the error state. + * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_err(enum LDKCreationError e); +struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_RouteHintCreationErrorZ. + * Creates a new CResult_SignatureNoneZ in the success state. */ -void CResult_RouteHintCreationErrorZ_free(struct LDKCResult_RouteHintCreationErrorZ _res); +struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o); /** - * Creates a new CResult_RouteHintCreationErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_SignatureNoneZ in the error state. */ -struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_clone(const struct LDKCResult_RouteHintCreationErrorZ *NONNULL_PTR orig); +struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void); /** - * Creates a new CResult_StringErrorZ in the success state. + * Frees any resources used by the CResult_SignatureNoneZ. */ -struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o); +void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res); /** - * Creates a new CResult_StringErrorZ in the error state. + * Creates a new CResult_SignatureNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e); +struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_StringErrorZ. + * Creates a new CResult_SignDecodeErrorZ in the success state. */ -void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res); +struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o); /** - * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state. + * Creates a new CResult_SignDecodeErrorZ in the error state. */ -struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o); +struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the error state. + * Frees any resources used by the CResult_SignDecodeErrorZ. */ -struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e); +void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res); /** - * Frees any resources used by the CResult_ChannelMonitorUpdateDecodeErrorZ. + * Creates a new CResult_SignDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res); +struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig); +void CVec_u8Z_free(struct LDKCVec_u8Z _res); /** - * Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state. + * Creates a new CResult_RecoverableSignatureNoneZ in the success state. */ -struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o); +struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o); /** - * Creates a new CResult_HTLCUpdateDecodeErrorZ in the error state. + * Creates a new CResult_RecoverableSignatureNoneZ in the error state. */ -struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void); /** - * Frees any resources used by the CResult_HTLCUpdateDecodeErrorZ. + * Frees any resources used by the CResult_RecoverableSignatureNoneZ. */ -void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res); +void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res); /** - * Creates a new CResult_HTLCUpdateDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_RecoverableSignatureNoneZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig); /** - * Creates a new CResult_NoneMonitorUpdateErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void); +void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res); /** - * Creates a new CResult_NoneMonitorUpdateErrorZ in the error state. + * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the success state. */ -struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e); +struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o); /** - * Frees any resources used by the CResult_NoneMonitorUpdateErrorZ. + * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the error state. */ -void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res); +struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void); + +/** + * Frees any resources used by the CResult_CVec_CVec_u8ZZNoneZ. + */ +void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res); /** - * Creates a new CResult_NoneMonitorUpdateErrorZ which has the same data as `orig` + * Creates a new CResult_CVec_CVec_u8ZZNoneZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig); +struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig); /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_InMemorySignerDecodeErrorZ in the success state. */ -struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig); +struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o); /** - * Creates a new C2Tuple_OutPointScriptZ from the contained elements. + * Creates a new CResult_InMemorySignerDecodeErrorZ in the error state. */ -struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b); +struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the C2Tuple_OutPointScriptZ. + * Frees any resources used by the CResult_InMemorySignerDecodeErrorZ. */ -void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res); +void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res); /** - * Creates a new tuple which has the same data as `orig` + * Creates a new CResult_InMemorySignerDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig); +struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new C2Tuple_u32ScriptZ from the contained elements. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b); +void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res); /** - * Frees any resources used by the C2Tuple_u32ScriptZ. + * Creates a new CResult_TransactionNoneZ in the success state. */ -void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res); +struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_TransactionNoneZ in the error state. */ -void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res); +struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void); /** - * Creates a new C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ from the contained elements. + * Frees any resources used by the CResult_TransactionNoneZ. */ -struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b); +void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res); /** - * Frees any resources used by the C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ. + * Creates a new CResult_TransactionNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res); +struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new C2Tuple_BlockHashChannelMonitorZ from the contained elements. */ -void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res); +struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Frees any resources used by the C2Tuple_BlockHashChannelMonitorZ. */ -void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res); +void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res); /** * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CVec_EventZ_free(struct LDKCVec_EventZ _res); +void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ in the success state. */ -void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res); +struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o); /** - * Creates a new C2Tuple_usizeTransactionZ from the contained elements. + * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ in the error state. */ -struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b); +struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e); /** - * Frees any resources used by the C2Tuple_usizeTransactionZ. + * Frees any resources used by the CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ. */ -void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res); +void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_NoneAPIErrorZ in the success state. */ -void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res); +struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void); /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_NoneAPIErrorZ in the error state. */ -struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig); +struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e); /** - * Creates a new C2Tuple_u32TxOutZ from the contained elements. + * Frees any resources used by the CResult_NoneAPIErrorZ. */ -struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b); +void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res); /** - * Frees any resources used by the C2Tuple_u32TxOutZ. + * Creates a new CResult_NoneAPIErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res); +struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig); /** * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res); - -/** - * Creates a new C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ from the contained elements. - */ -struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b); +void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res); /** - * Frees any resources used by the C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res); +void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_NonePaymentSendFailureZ in the success state. */ -void CVec_TransactionOutputsZ_free(struct LDKCVec_TransactionOutputsZ _res); +struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_NonePaymentSendFailureZ in the error state. */ -void CVec_TxidZ_free(struct LDKCVec_TxidZ _res); +struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e); /** - * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the success state. + * Frees any resources used by the CResult_NonePaymentSendFailureZ. */ -struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void); +void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res); /** - * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the error state. + * Creates a new CResult_NonePaymentSendFailureZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e); +struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_NoneChannelMonitorUpdateErrZ. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res); +void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res); /** - * Creates a new CResult_NoneChannelMonitorUpdateErrZ which has the same data as `orig` + * Creates a new tuple which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig); +struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig); /** - * Creates a new C2Tuple_BlockHashChannelMonitorZ from the contained elements. + * Creates a new C2Tuple_PaymentHashPaymentSecretZ from the contained elements. */ -struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b); +struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b); /** - * Frees any resources used by the C2Tuple_BlockHashChannelMonitorZ. + * Frees any resources used by the C2Tuple_PaymentHashPaymentSecretZ. */ -void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res); +void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res); /** - * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the success state. + * Creates a new CResult_PaymentSecretAPIErrorZ in the success state. */ -struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o); +struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o); /** - * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the error state. + * Creates a new CResult_PaymentSecretAPIErrorZ in the error state. */ -struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e); /** - * Frees any resources used by the CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ. + * Frees any resources used by the CResult_PaymentSecretAPIErrorZ. */ -void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res); +void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_PaymentSecretAPIErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res); +struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig); /** * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res); +void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res); /** - * Creates a new CResult_RouteDecodeErrorZ in the success state. + * Creates a new C2Tuple_BlockHashChannelManagerZ from the contained elements. */ -struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o); +struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b); /** - * Creates a new CResult_RouteDecodeErrorZ in the error state. + * Frees any resources used by the C2Tuple_BlockHashChannelManagerZ. */ -struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e); +void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res); /** - * Frees any resources used by the CResult_RouteDecodeErrorZ. + * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the success state. */ -void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res); +struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o); /** - * Creates a new CResult_RouteDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the error state. */ -struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Frees any resources used by the CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ. */ -void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res); +void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res); /** - * Creates a new CResult_RouteLightningErrorZ in the success state. + * Creates a new CResult_ChannelConfigDecodeErrorZ in the success state. */ -struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o); +struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o); /** - * Creates a new CResult_RouteLightningErrorZ in the error state. + * Creates a new CResult_ChannelConfigDecodeErrorZ in the error state. */ -struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e); +struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_RouteLightningErrorZ. + * Frees any resources used by the CResult_ChannelConfigDecodeErrorZ. */ -void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res); +void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res); /** - * Creates a new CResult_RouteLightningErrorZ which has the same data as `orig` + * Creates a new CResult_ChannelConfigDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig); +struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_OutPointDecodeErrorZ in the success state. */ -void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res); +struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o); /** - * Creates a new CResult_boolLightningErrorZ in the success state. + * Creates a new CResult_OutPointDecodeErrorZ in the error state. */ -struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o); +struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_boolLightningErrorZ in the error state. + * Frees any resources used by the CResult_OutPointDecodeErrorZ. */ -struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e); +void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res); /** - * Frees any resources used by the CResult_boolLightningErrorZ. + * Creates a new CResult_OutPointDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res); +struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_boolLightningErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_SiPrefixNoneZ in the success state. */ -struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig); +struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o); /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_SiPrefixNoneZ in the error state. */ -struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig); +struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void); /** - * Creates a new C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ from the contained elements. + * Frees any resources used by the CResult_SiPrefixNoneZ. */ -struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c); +void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res); /** - * Frees any resources used by the C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ. + * Creates a new CResult_SiPrefixNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res); +struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_InvoiceNoneZ in the success state. */ -void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res); +struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_InvoiceNoneZ in the error state. */ -void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res); +struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void); /** - * Creates a new CResult_NoneLightningErrorZ in the success state. + * Frees any resources used by the CResult_InvoiceNoneZ. */ -struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void); +void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res); /** - * Creates a new CResult_NoneLightningErrorZ in the error state. + * Creates a new CResult_InvoiceNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e); +struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_NoneLightningErrorZ. + * Creates a new CResult_SignedRawInvoiceNoneZ in the success state. */ -void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res); +struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o); /** - * Creates a new CResult_NoneLightningErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_SignedRawInvoiceNoneZ in the error state. */ -struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig); +struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Frees any resources used by the CResult_SignedRawInvoiceNoneZ. */ -void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res); +void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res); /** - * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the success state. + * Creates a new CResult_SignedRawInvoiceNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o); +struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig); /** - * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e); +struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_CVec_u8ZPeerHandleErrorZ. + * Creates a new C3Tuple_RawInvoice_u832InvoiceSignatureZ from the contained elements. */ -void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res); +struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c); /** - * Creates a new CResult_CVec_u8ZPeerHandleErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees any resources used by the C3Tuple_RawInvoice_u832InvoiceSignatureZ. */ -struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig); +void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res); /** - * Creates a new CResult_NonePeerHandleErrorZ in the success state. + * Creates a new CResult_PayeePubKeyErrorZ in the success state. */ -struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void); +struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o); /** - * Creates a new CResult_NonePeerHandleErrorZ in the error state. + * Creates a new CResult_PayeePubKeyErrorZ in the error state. */ -struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e); +struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e); /** - * Frees any resources used by the CResult_NonePeerHandleErrorZ. + * Frees any resources used by the CResult_PayeePubKeyErrorZ. */ -void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res); +void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res); /** - * Creates a new CResult_NonePeerHandleErrorZ which has the same data as `orig` + * Creates a new CResult_PayeePubKeyErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig); +struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_boolPeerHandleErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o); +void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res); /** - * Creates a new CResult_boolPeerHandleErrorZ in the error state. + * Creates a new CResult_PositiveTimestampCreationErrorZ in the success state. */ -struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e); +struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o); /** - * Frees any resources used by the CResult_boolPeerHandleErrorZ. + * Creates a new CResult_PositiveTimestampCreationErrorZ in the error state. */ -void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res); +struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e); /** - * Creates a new CResult_boolPeerHandleErrorZ which has the same data as `orig` + * Frees any resources used by the CResult_PositiveTimestampCreationErrorZ. + */ +void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res); + +/** + * Creates a new CResult_PositiveTimestampCreationErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig); +struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_TxOutAccessErrorZ in the success state. + * Creates a new CResult_NoneSemanticErrorZ in the success state. */ -struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o); +struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void); /** - * Creates a new CResult_TxOutAccessErrorZ in the error state. + * Creates a new CResult_NoneSemanticErrorZ in the error state. */ -struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e); +struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e); /** - * Frees any resources used by the CResult_TxOutAccessErrorZ. + * Frees any resources used by the CResult_NoneSemanticErrorZ. */ -void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res); +void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res); /** - * Creates a new CResult_TxOutAccessErrorZ which has the same data as `orig` + * Creates a new CResult_NoneSemanticErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig); +struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig); /** - * Constructs a new COption_C2Tuple_usizeTransactionZZ containing a crate::c_types::derived::C2Tuple_usizeTransactionZ + * Creates a new CResult_InvoiceSemanticErrorZ in the success state. */ -struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o); +struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o); /** - * Constructs a new COption_C2Tuple_usizeTransactionZZ containing nothing + * Creates a new CResult_InvoiceSemanticErrorZ in the error state. */ -struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void); +struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e); /** - * Frees any resources associated with the crate::c_types::derived::C2Tuple_usizeTransactionZ, if we are in the Some state + * Frees any resources used by the CResult_InvoiceSemanticErrorZ. */ -void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res); +void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_InvoiceSemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res); +struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ in the success state. + * Creates a new CResult_DescriptionCreationErrorZ in the success state. */ -struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o); +struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o); /** - * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ in the error state. + * Creates a new CResult_DescriptionCreationErrorZ in the error state. */ -struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e); /** - * Frees any resources used by the CResult_DirectionalChannelInfoDecodeErrorZ. + * Frees any resources used by the CResult_DescriptionCreationErrorZ. */ -void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res); +void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res); /** - * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_DescriptionCreationErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ChannelInfoDecodeErrorZ in the success state. + * Creates a new CResult_ExpiryTimeCreationErrorZ in the success state. */ -struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o); +struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o); /** - * Creates a new CResult_ChannelInfoDecodeErrorZ in the error state. + * Creates a new CResult_ExpiryTimeCreationErrorZ in the error state. */ -struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e); /** - * Frees any resources used by the CResult_ChannelInfoDecodeErrorZ. + * Frees any resources used by the CResult_ExpiryTimeCreationErrorZ. */ -void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res); +void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res); /** - * Creates a new CResult_ChannelInfoDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ExpiryTimeCreationErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_RoutingFeesDecodeErrorZ in the success state. + * Creates a new CResult_RouteHintCreationErrorZ in the success state. */ -struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o); +struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_ok(struct LDKRouteHint o); /** - * Creates a new CResult_RoutingFeesDecodeErrorZ in the error state. + * Creates a new CResult_RouteHintCreationErrorZ in the error state. */ -struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_err(enum LDKCreationError e); /** - * Frees any resources used by the CResult_RoutingFeesDecodeErrorZ. + * Frees any resources used by the CResult_RouteHintCreationErrorZ. */ -void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res); +void CResult_RouteHintCreationErrorZ_free(struct LDKCResult_RouteHintCreationErrorZ _res); /** - * Creates a new CResult_RoutingFeesDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_RouteHintCreationErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_clone(const struct LDKCResult_RouteHintCreationErrorZ *NONNULL_PTR orig); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_StringErrorZ in the success state. */ -void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res); +struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o); /** - * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the success state. + * Creates a new CResult_StringErrorZ in the error state. */ -struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o); +struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e); /** - * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the error state. + * Frees any resources used by the CResult_StringErrorZ. */ -struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e); +void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res); /** - * Frees any resources used by the CResult_NodeAnnouncementInfoDecodeErrorZ. + * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state. */ -void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res); +struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o); /** - * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the error state. */ -struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Frees any resources used by the CResult_ChannelMonitorUpdateDecodeErrorZ. */ -void CVec_u64Z_free(struct LDKCVec_u64Z _res); +void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res); /** - * Creates a new CResult_NodeInfoDecodeErrorZ in the success state. + * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o); +struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_NodeInfoDecodeErrorZ in the error state. + * Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state. */ -struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o); /** - * Frees any resources used by the CResult_NodeInfoDecodeErrorZ. + * Creates a new CResult_HTLCUpdateDecodeErrorZ in the error state. */ -void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res); +struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_NodeInfoDecodeErrorZ which has the same data as `orig` + * Frees any resources used by the CResult_HTLCUpdateDecodeErrorZ. + */ +void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res); + +/** + * Creates a new CResult_HTLCUpdateDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_NetworkGraphDecodeErrorZ in the success state. + * Creates a new CResult_NoneMonitorUpdateErrorZ in the success state. */ -struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o); +struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void); /** - * Creates a new CResult_NetworkGraphDecodeErrorZ in the error state. + * Creates a new CResult_NoneMonitorUpdateErrorZ in the error state. */ -struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e); /** - * Frees any resources used by the CResult_NetworkGraphDecodeErrorZ. + * Frees any resources used by the CResult_NoneMonitorUpdateErrorZ. */ -void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res); +void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res); /** - * Creates a new CResult_NetworkGraphDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_NoneMonitorUpdateErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_InitFeaturesDecodeErrorZ in the success state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o); +struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig); /** - * Creates a new CResult_InitFeaturesDecodeErrorZ in the error state. + * Creates a new C2Tuple_OutPointScriptZ from the contained elements. */ -struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b); /** - * Frees any resources used by the CResult_InitFeaturesDecodeErrorZ. + * Frees any resources used by the C2Tuple_OutPointScriptZ. */ -void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res); +void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res); /** - * Creates a new CResult_NodeFeaturesDecodeErrorZ in the success state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o); +struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig); /** - * Creates a new CResult_NodeFeaturesDecodeErrorZ in the error state. + * Creates a new C2Tuple_u32ScriptZ from the contained elements. */ -struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b); /** - * Frees any resources used by the CResult_NodeFeaturesDecodeErrorZ. + * Frees any resources used by the C2Tuple_u32ScriptZ. */ -void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res); +void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res); /** - * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o); +void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res); /** - * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the error state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_ChannelFeaturesDecodeErrorZ. + * Creates a new C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ from the contained elements. */ -void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res); +struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b); /** - * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the success state. + * Frees any resources used by the C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ. */ -struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o); +void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res); /** - * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the error state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e); +void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res); /** - * Frees any resources used by the CResult_InvoiceFeaturesDecodeErrorZ. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res); +void CVec_EventZ_free(struct LDKCVec_EventZ _res); /** - * Creates a new CResult_NetAddressu8Z in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o); +void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res); /** - * Creates a new CResult_NetAddressu8Z in the error state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e); +struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_NetAddressu8Z. + * Creates a new C2Tuple_u32TxOutZ from the contained elements. */ -void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res); +struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b); /** - * Creates a new CResult_NetAddressu8Z which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees any resources used by the C2Tuple_u32TxOutZ. */ -struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig); +void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res); /** - * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o); +void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res); /** - * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ in the error state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_CResult_NetAddressu8ZDecodeErrorZ. + * Creates a new C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ from the contained elements. */ -void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res); +struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b); /** - * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees any resources used by the C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ. */ -struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig); +void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res); /** * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res); +void CVec_TransactionOutputsZ_free(struct LDKCVec_TransactionOutputsZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the success state. */ -void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res); +struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the error state. */ -void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res); +struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Frees any resources used by the CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ. */ -void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res); +void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res); /** - * Creates a new CResult_AcceptChannelDecodeErrorZ in the success state. + * Creates a new CResult_boolLightningErrorZ in the success state. */ -struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o); +struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o); /** - * Creates a new CResult_AcceptChannelDecodeErrorZ in the error state. + * Creates a new CResult_boolLightningErrorZ in the error state. */ -struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e); /** - * Frees any resources used by the CResult_AcceptChannelDecodeErrorZ. + * Frees any resources used by the CResult_boolLightningErrorZ. */ -void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res); +void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res); /** - * Creates a new CResult_AcceptChannelDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_boolLightningErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o); +struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig); /** - * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the error state. + * Creates a new C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ from the contained elements. */ -struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c); /** - * Frees any resources used by the CResult_AnnouncementSignaturesDecodeErrorZ. + * Frees any resources used by the C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ. */ -void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res); +void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res); /** - * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig); +void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res); /** - * Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o); +void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res); /** - * Creates a new CResult_ChannelReestablishDecodeErrorZ in the error state. + * Creates a new CResult_NoneLightningErrorZ in the success state. */ -struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void); /** - * Frees any resources used by the CResult_ChannelReestablishDecodeErrorZ. + * Creates a new CResult_NoneLightningErrorZ in the error state. */ -void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res); +struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e); /** - * Creates a new CResult_ChannelReestablishDecodeErrorZ which has the same data as `orig` + * Frees any resources used by the CResult_NoneLightningErrorZ. + */ +void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res); + +/** + * Creates a new CResult_NoneLightningErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ClosingSignedDecodeErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o); +void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res); /** - * Creates a new CResult_ClosingSignedDecodeErrorZ in the error state. + * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the success state. */ -struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o); /** - * Frees any resources used by the CResult_ClosingSignedDecodeErrorZ. + * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state. */ -void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res); +struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e); /** - * Creates a new CResult_ClosingSignedDecodeErrorZ which has the same data as `orig` + * Frees any resources used by the CResult_CVec_u8ZPeerHandleErrorZ. + */ +void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res); + +/** + * Creates a new CResult_CVec_u8ZPeerHandleErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state. + * Creates a new CResult_NonePeerHandleErrorZ in the success state. */ -struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o); +struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void); /** - * Creates a new CResult_CommitmentSignedDecodeErrorZ in the error state. + * Creates a new CResult_NonePeerHandleErrorZ in the error state. */ -struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e); /** - * Frees any resources used by the CResult_CommitmentSignedDecodeErrorZ. + * Frees any resources used by the CResult_NonePeerHandleErrorZ. */ -void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res); +void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res); /** - * Creates a new CResult_CommitmentSignedDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_NonePeerHandleErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_FundingCreatedDecodeErrorZ in the success state. + * Creates a new CResult_boolPeerHandleErrorZ in the success state. */ -struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o); +struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o); /** - * Creates a new CResult_FundingCreatedDecodeErrorZ in the error state. + * Creates a new CResult_boolPeerHandleErrorZ in the error state. */ -struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e); /** - * Frees any resources used by the CResult_FundingCreatedDecodeErrorZ. + * Frees any resources used by the CResult_boolPeerHandleErrorZ. */ -void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res); +void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res); /** - * Creates a new CResult_FundingCreatedDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_boolPeerHandleErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_FundingSignedDecodeErrorZ in the success state. + * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ in the success state. */ -struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o); +struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o); /** - * Creates a new CResult_FundingSignedDecodeErrorZ in the error state. + * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ in the error state. */ -struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_FundingSignedDecodeErrorZ. + * Frees any resources used by the CResult_DirectionalChannelInfoDecodeErrorZ. */ -void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res); +void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res); /** - * Creates a new CResult_FundingSignedDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_FundingLockedDecodeErrorZ in the success state. + * Creates a new CResult_ChannelInfoDecodeErrorZ in the success state. */ -struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o); +struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o); /** - * Creates a new CResult_FundingLockedDecodeErrorZ in the error state. + * Creates a new CResult_ChannelInfoDecodeErrorZ in the error state. */ -struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_FundingLockedDecodeErrorZ. + * Frees any resources used by the CResult_ChannelInfoDecodeErrorZ. */ -void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res); +void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res); /** - * Creates a new CResult_FundingLockedDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ChannelInfoDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_InitDecodeErrorZ in the success state. + * Creates a new CResult_RoutingFeesDecodeErrorZ in the success state. */ -struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o); +struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o); /** - * Creates a new CResult_InitDecodeErrorZ in the error state. + * Creates a new CResult_RoutingFeesDecodeErrorZ in the error state. */ -struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_InitDecodeErrorZ. + * Frees any resources used by the CResult_RoutingFeesDecodeErrorZ. */ -void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res); +void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res); /** - * Creates a new CResult_InitDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_RoutingFeesDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_OpenChannelDecodeErrorZ in the success state. + * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the success state. */ -struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o); +struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o); /** - * Creates a new CResult_OpenChannelDecodeErrorZ in the error state. + * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the error state. */ -struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_OpenChannelDecodeErrorZ. + * Frees any resources used by the CResult_NodeAnnouncementInfoDecodeErrorZ. */ -void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res); +void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res); /** - * Creates a new CResult_OpenChannelDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o); +void CVec_u64Z_free(struct LDKCVec_u64Z _res); /** - * Creates a new CResult_RevokeAndACKDecodeErrorZ in the error state. + * Creates a new CResult_NodeInfoDecodeErrorZ in the success state. */ -struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o); /** - * Frees any resources used by the CResult_RevokeAndACKDecodeErrorZ. + * Creates a new CResult_NodeInfoDecodeErrorZ in the error state. */ -void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res); +struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_RevokeAndACKDecodeErrorZ which has the same data as `orig` + * Frees any resources used by the CResult_NodeInfoDecodeErrorZ. + */ +void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res); + +/** + * Creates a new CResult_NodeInfoDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ShutdownDecodeErrorZ in the success state. + * Creates a new CResult_NetworkGraphDecodeErrorZ in the success state. */ -struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o); +struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o); /** - * Creates a new CResult_ShutdownDecodeErrorZ in the error state. + * Creates a new CResult_NetworkGraphDecodeErrorZ in the error state. */ -struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_ShutdownDecodeErrorZ. + * Frees any resources used by the CResult_NetworkGraphDecodeErrorZ. */ -void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res); +void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res); /** - * Creates a new CResult_ShutdownDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_NetworkGraphDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state. + * Creates a new CResult_NetAddressu8Z in the success state. */ -struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o); +struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o); /** - * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the error state. + * Creates a new CResult_NetAddressu8Z in the error state. */ -struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e); /** - * Frees any resources used by the CResult_UpdateFailHTLCDecodeErrorZ. + * Frees any resources used by the CResult_NetAddressu8Z. */ -void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res); +void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res); /** - * Creates a new CResult_UpdateFailHTLCDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_NetAddressu8Z which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig); /** - * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state. + * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ in the success state. */ -struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o); +struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o); /** - * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the error state. + * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ in the error state. */ -struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_UpdateFailMalformedHTLCDecodeErrorZ. + * Frees any resources used by the CResult_CResult_NetAddressu8ZDecodeErrorZ. */ -void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res); +void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res); /** - * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_UpdateFeeDecodeErrorZ in the success state. + * Creates a new CResult_NetAddressDecodeErrorZ in the success state. */ -struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o); +struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o); /** - * Creates a new CResult_UpdateFeeDecodeErrorZ in the error state. + * Creates a new CResult_NetAddressDecodeErrorZ in the error state. */ -struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_UpdateFeeDecodeErrorZ. + * Frees any resources used by the CResult_NetAddressDecodeErrorZ. */ -void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res); +void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res); /** - * Creates a new CResult_UpdateFeeDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_NetAddressDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o); +void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res); /** - * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the error state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e); +void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res); /** - * Frees any resources used by the CResult_UpdateFulfillHTLCDecodeErrorZ. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res); +void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res); /** - * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig); +void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res); /** - * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state. + * Creates a new CResult_AcceptChannelDecodeErrorZ in the success state. */ -struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o); +struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o); /** - * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the error state. + * Creates a new CResult_AcceptChannelDecodeErrorZ in the error state. */ -struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_UpdateAddHTLCDecodeErrorZ. + * Frees any resources used by the CResult_AcceptChannelDecodeErrorZ. */ -void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res); +void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res); /** - * Creates a new CResult_UpdateAddHTLCDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_AcceptChannelDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_PingDecodeErrorZ in the success state. + * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state. */ -struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o); +struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o); /** - * Creates a new CResult_PingDecodeErrorZ in the error state. + * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the error state. */ -struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_PingDecodeErrorZ. + * Frees any resources used by the CResult_AnnouncementSignaturesDecodeErrorZ. */ -void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res); +void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res); /** - * Creates a new CResult_PingDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_PongDecodeErrorZ in the success state. + * Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state. */ -struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o); +struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o); /** - * Creates a new CResult_PongDecodeErrorZ in the error state. + * Creates a new CResult_ChannelReestablishDecodeErrorZ in the error state. */ -struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_PongDecodeErrorZ. + * Frees any resources used by the CResult_ChannelReestablishDecodeErrorZ. */ -void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res); +void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res); /** - * Creates a new CResult_PongDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ChannelReestablishDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state. + * Creates a new CResult_ClosingSignedDecodeErrorZ in the success state. */ -struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o); +struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o); /** - * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the error state. + * Creates a new CResult_ClosingSignedDecodeErrorZ in the error state. */ -struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_UnsignedChannelAnnouncementDecodeErrorZ. + * Frees any resources used by the CResult_ClosingSignedDecodeErrorZ. */ -void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res); +void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res); /** - * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ClosingSignedDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state. + * Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state. */ -struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o); +struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o); /** - * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the error state. + * Creates a new CResult_CommitmentSignedDecodeErrorZ in the error state. */ -struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_ChannelAnnouncementDecodeErrorZ. + * Frees any resources used by the CResult_CommitmentSignedDecodeErrorZ. */ -void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res); +void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res); /** - * Creates a new CResult_ChannelAnnouncementDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_CommitmentSignedDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state. + * Creates a new CResult_FundingCreatedDecodeErrorZ in the success state. */ -struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o); +struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o); /** - * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the error state. + * Creates a new CResult_FundingCreatedDecodeErrorZ in the error state. */ -struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_UnsignedChannelUpdateDecodeErrorZ. + * Frees any resources used by the CResult_FundingCreatedDecodeErrorZ. */ -void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res); +void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res); /** - * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_FundingCreatedDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state. + * Creates a new CResult_FundingSignedDecodeErrorZ in the success state. */ -struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o); +struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o); /** - * Creates a new CResult_ChannelUpdateDecodeErrorZ in the error state. + * Creates a new CResult_FundingSignedDecodeErrorZ in the error state. */ -struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_ChannelUpdateDecodeErrorZ. + * Frees any resources used by the CResult_FundingSignedDecodeErrorZ. */ -void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res); +void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res); /** - * Creates a new CResult_ChannelUpdateDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_FundingSignedDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ErrorMessageDecodeErrorZ in the success state. + * Creates a new CResult_FundingLockedDecodeErrorZ in the success state. */ -struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o); +struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o); /** - * Creates a new CResult_ErrorMessageDecodeErrorZ in the error state. + * Creates a new CResult_FundingLockedDecodeErrorZ in the error state. */ -struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_ErrorMessageDecodeErrorZ. + * Frees any resources used by the CResult_FundingLockedDecodeErrorZ. */ -void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res); +void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res); /** - * Creates a new CResult_ErrorMessageDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_FundingLockedDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state. + * Creates a new CResult_InitDecodeErrorZ in the success state. */ -struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o); +struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o); /** - * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the error state. + * Creates a new CResult_InitDecodeErrorZ in the error state. */ -struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_UnsignedNodeAnnouncementDecodeErrorZ. + * Frees any resources used by the CResult_InitDecodeErrorZ. */ -void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res); +void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res); /** - * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_InitDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state. + * Creates a new CResult_OpenChannelDecodeErrorZ in the success state. */ -struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o); +struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o); /** - * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the error state. + * Creates a new CResult_OpenChannelDecodeErrorZ in the error state. */ -struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_NodeAnnouncementDecodeErrorZ. + * Frees any resources used by the CResult_OpenChannelDecodeErrorZ. */ -void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res); +void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res); /** - * Creates a new CResult_NodeAnnouncementDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_OpenChannelDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state. + * Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state. */ -struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o); +struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o); /** - * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the error state. + * Creates a new CResult_RevokeAndACKDecodeErrorZ in the error state. */ -struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_QueryShortChannelIdsDecodeErrorZ. + * Frees any resources used by the CResult_RevokeAndACKDecodeErrorZ. */ -void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res); +void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res); /** - * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_RevokeAndACKDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state. + * Creates a new CResult_ShutdownDecodeErrorZ in the success state. */ -struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o); +struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o); /** - * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the error state. + * Creates a new CResult_ShutdownDecodeErrorZ in the error state. */ -struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_ReplyShortChannelIdsEndDecodeErrorZ. + * Frees any resources used by the CResult_ShutdownDecodeErrorZ. */ -void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res); +void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res); /** - * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ShutdownDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state. + * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state. */ -struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o); +struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o); /** - * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the error state. + * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the error state. */ -struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_QueryChannelRangeDecodeErrorZ. + * Frees any resources used by the CResult_UpdateFailHTLCDecodeErrorZ. */ -void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res); +void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res); /** - * Creates a new CResult_QueryChannelRangeDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_UpdateFailHTLCDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state. + * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state. */ -struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o); +struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o); /** - * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the error state. + * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the error state. */ -struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_ReplyChannelRangeDecodeErrorZ. + * Frees any resources used by the CResult_UpdateFailMalformedHTLCDecodeErrorZ. */ -void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res); +void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res); /** - * Creates a new CResult_ReplyChannelRangeDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state. + * Creates a new CResult_UpdateFeeDecodeErrorZ in the success state. */ -struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o); +struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o); /** - * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the error state. + * Creates a new CResult_UpdateFeeDecodeErrorZ in the error state. */ -struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_GossipTimestampFilterDecodeErrorZ. + * Frees any resources used by the CResult_UpdateFeeDecodeErrorZ. */ -void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res); +void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res); /** - * Creates a new CResult_GossipTimestampFilterDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_UpdateFeeDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_InvoiceSignOrCreationErrorZ in the success state. + * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state. */ -struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o); +struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o); /** - * Creates a new CResult_InvoiceSignOrCreationErrorZ in the error state. + * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the error state. */ -struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e); +struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_InvoiceSignOrCreationErrorZ. + * Frees any resources used by the CResult_UpdateFulfillHTLCDecodeErrorZ. */ -void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res); +void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res); /** - * Creates a new CResult_InvoiceSignOrCreationErrorZ which has the same data as `orig` + * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig); +struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the success state. + * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state. */ -struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o); +struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o); /** - * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the error state. + * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the error state. */ -struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_SpendableOutputDescriptorDecodeErrorZ. + * Frees any resources used by the CResult_UpdateAddHTLCDecodeErrorZ. */ -void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res); +void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res); /** - * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_UpdateAddHTLCDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_PingDecodeErrorZ in the success state. */ -struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig); +struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o); /** - * Creates a new C2Tuple_SignatureCVec_SignatureZZ from the contained elements. + * Creates a new CResult_PingDecodeErrorZ in the error state. */ -struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b); +struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the C2Tuple_SignatureCVec_SignatureZZ. + * Frees any resources used by the CResult_PingDecodeErrorZ. */ -void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res); +void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res); /** - * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the success state. + * Creates a new CResult_PingDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o); +struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the error state. + * Creates a new CResult_PongDecodeErrorZ in the success state. */ -struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void); +struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o); /** - * Frees any resources used by the CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ. + * Creates a new CResult_PongDecodeErrorZ in the error state. */ -void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res); +struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ which has the same data as `orig` + * Frees any resources used by the CResult_PongDecodeErrorZ. + */ +void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res); + +/** + * Creates a new CResult_PongDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig); +struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_SignatureNoneZ in the success state. + * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state. */ -struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o); +struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o); /** - * Creates a new CResult_SignatureNoneZ in the error state. + * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the error state. */ -struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void); +struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_SignatureNoneZ. + * Frees any resources used by the CResult_UnsignedChannelAnnouncementDecodeErrorZ. */ -void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res); +void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res); /** - * Creates a new CResult_SignatureNoneZ which has the same data as `orig` + * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig); +struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_SignDecodeErrorZ in the success state. + * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state. */ -struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o); +struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o); /** - * Creates a new CResult_SignDecodeErrorZ in the error state. + * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the error state. */ -struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_SignDecodeErrorZ. + * Frees any resources used by the CResult_ChannelAnnouncementDecodeErrorZ. */ -void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res); +void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res); /** - * Creates a new CResult_SignDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ChannelAnnouncementDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_RecoverableSignatureNoneZ in the success state. + * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state. */ -struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o); +struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o); /** - * Creates a new CResult_RecoverableSignatureNoneZ in the error state. + * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the error state. */ -struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void); +struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_RecoverableSignatureNoneZ. + * Frees any resources used by the CResult_UnsignedChannelUpdateDecodeErrorZ. */ -void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res); +void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res); /** - * Creates a new CResult_RecoverableSignatureNoneZ which has the same data as `orig` + * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig); - -/** - * Frees the buffer pointed to by `data` if `datalen` is non-0. - */ -void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res); +struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the success state. + * Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state. */ -struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o); +struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o); /** - * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the error state. + * Creates a new CResult_ChannelUpdateDecodeErrorZ in the error state. */ -struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void); +struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_CVec_CVec_u8ZZNoneZ. + * Frees any resources used by the CResult_ChannelUpdateDecodeErrorZ. */ -void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res); +void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res); /** - * Creates a new CResult_CVec_CVec_u8ZZNoneZ which has the same data as `orig` + * Creates a new CResult_ChannelUpdateDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig); +struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_InMemorySignerDecodeErrorZ in the success state. + * Creates a new CResult_ErrorMessageDecodeErrorZ in the success state. */ -struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o); +struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o); /** - * Creates a new CResult_InMemorySignerDecodeErrorZ in the error state. + * Creates a new CResult_ErrorMessageDecodeErrorZ in the error state. */ -struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_InMemorySignerDecodeErrorZ. + * Frees any resources used by the CResult_ErrorMessageDecodeErrorZ. */ -void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res); +void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res); /** - * Creates a new CResult_InMemorySignerDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ErrorMessageDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state. */ -void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res); +struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o); /** - * Creates a new CResult_TransactionNoneZ in the success state. + * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the error state. */ -struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o); +struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_TransactionNoneZ in the error state. + * Frees any resources used by the CResult_UnsignedNodeAnnouncementDecodeErrorZ. */ -struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void); +void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res); /** - * Frees any resources used by the CResult_TransactionNoneZ. + * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res); +struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_NoneErrorZ in the success state. + * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state. */ -struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void); +struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o); /** - * Creates a new CResult_NoneErrorZ in the error state. + * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the error state. */ -struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e); +struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_NoneErrorZ. + * Frees any resources used by the CResult_NodeAnnouncementDecodeErrorZ. */ -void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res); +void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_NodeAnnouncementDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res); +struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ in the success state. + * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state. */ -struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o); +struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o); /** - * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ in the error state. + * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the error state. */ -struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e); +struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ. + * Frees any resources used by the CResult_QueryShortChannelIdsDecodeErrorZ. */ -void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res); +void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res); /** - * Creates a new CResult_NoneAPIErrorZ in the success state. + * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void); +struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_NoneAPIErrorZ in the error state. + * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state. */ -struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e); +struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o); /** - * Frees any resources used by the CResult_NoneAPIErrorZ. + * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the error state. */ -void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res); +struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_NoneAPIErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees any resources used by the CResult_ReplyShortChannelIdsEndDecodeErrorZ. */ -struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig); +void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res); +struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state. */ -void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res); +struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o); /** - * Creates a new CResult_NonePaymentSendFailureZ in the success state. + * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the error state. */ -struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void); +struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_NonePaymentSendFailureZ in the error state. + * Frees any resources used by the CResult_QueryChannelRangeDecodeErrorZ. */ -struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e); +void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res); /** - * Frees any resources used by the CResult_NonePaymentSendFailureZ. + * Creates a new CResult_QueryChannelRangeDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res); +struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_NonePaymentSendFailureZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state. */ -struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig); +struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o); /** - * Creates a new C2Tuple_PaymentHashPaymentSecretZ from the contained elements. + * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the error state. */ -struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b); +struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the C2Tuple_PaymentHashPaymentSecretZ. + * Frees any resources used by the CResult_ReplyChannelRangeDecodeErrorZ. */ -void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res); +void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res); /** - * Creates a new CResult_PaymentSecretAPIErrorZ in the success state. + * Creates a new CResult_ReplyChannelRangeDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o); +struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_PaymentSecretAPIErrorZ in the error state. + * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state. */ -struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e); +struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o); /** - * Frees any resources used by the CResult_PaymentSecretAPIErrorZ. + * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the error state. */ -void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res); +struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Frees any resources used by the CResult_GossipTimestampFilterDecodeErrorZ. */ -void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res); +void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res); /** - * Creates a new C2Tuple_BlockHashChannelManagerZ from the contained elements. + * Creates a new CResult_GossipTimestampFilterDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b); +struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig); /** - * Frees any resources used by the C2Tuple_BlockHashChannelManagerZ. + * Creates a new CResult_InvoiceSignOrCreationErrorZ in the success state. */ -void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res); +struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o); /** - * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the success state. + * Creates a new CResult_InvoiceSignOrCreationErrorZ in the error state. */ -struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o); +struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e); /** - * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the error state. + * Frees any resources used by the CResult_InvoiceSignOrCreationErrorZ. */ -struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e); +void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res); /** - * Frees any resources used by the CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ. + * Creates a new CResult_InvoiceSignOrCreationErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res); +struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig); /** * Frees any resources used by the Event @@ -11129,6 +11545,11 @@ void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr */ void EventsProvider_free(struct LDKEventsProvider this_ptr); +/** + * Calls the free function if one is set + */ +void EventHandler_free(struct LDKEventHandler this_ptr); + /** * Frees any resources used by the APIError */ @@ -11162,6 +11583,17 @@ bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk); */ enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig); +/** + * Checks if two Levels contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b); + +/** + * Checks if two Levels contain equal inner contents. + */ +uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o); + /** * Returns the most verbose logging level. */ @@ -11357,50 +11789,6 @@ uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChann */ void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val); -/** - * Outputs below a certain value will not be added to on-chain transactions. The dust value is - * required to always be higher than this value so this only applies to HTLC outputs (and - * potentially to-self outputs before any payments have been made). - * Thus, HTLCs below this amount plus HTLC transaction fees are not enforceable on-chain. - * This setting allows you to set a minimum dust limit for their commitment transactions, - * reflecting the reality that tiny outputs are not considered standard transactions and will - * not propagate through the Bitcoin network. - * - * Default value: 546, the current dust limit on the Bitcoin network. - */ -uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr); - -/** - * Outputs below a certain value will not be added to on-chain transactions. The dust value is - * required to always be higher than this value so this only applies to HTLC outputs (and - * potentially to-self outputs before any payments have been made). - * Thus, HTLCs below this amount plus HTLC transaction fees are not enforceable on-chain. - * This setting allows you to set a minimum dust limit for their commitment transactions, - * reflecting the reality that tiny outputs are not considered standard transactions and will - * not propagate through the Bitcoin network. - * - * Default value: 546, the current dust limit on the Bitcoin network. - */ -void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val); - -/** - * Maximum allowed threshold above which outputs will not be generated in their commitment - * transactions. - * HTLCs below this amount plus HTLC transaction fees are not enforceable on-chain. - * - * Default value: u64::max_value. - */ -uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr); - -/** - * Maximum allowed threshold above which outputs will not be generated in their commitment - * transactions. - * HTLCs below this amount plus HTLC transaction fees are not enforceable on-chain. - * - * Default value: u64::max_value. - */ -void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val); - /** * Before a channel is usable the funding transaction will need to be confirmed by at least a * certain number of blocks, specified by the node which is not the funder (as the funder can @@ -11464,7 +11852,7 @@ void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLi /** * Constructs a new ChannelHandshakeLimits given each field */ -MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint64_t min_dust_limit_satoshis_arg, uint64_t max_dust_limit_satoshis_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg); +MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg); /** * Creates a copy of the ChannelHandshakeLimits @@ -11750,6 +12138,16 @@ void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_p */ MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg); +/** + * Creates a copy of the WatchedOutput + */ +struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig); + +/** + * Checks if two WatchedOutputs contain equal inner contents. + */ +uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o); + /** * Calls the free function if one is set */ @@ -12079,6 +12477,18 @@ MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, */ struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig); +/** + * Checks if two OutPoints contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b); + +/** + * Checks if two OutPoints contain equal inner contents. + */ +uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o); + /** * Convert an `OutPoint` to a lightning channel id. */ @@ -12182,6 +12592,16 @@ MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescri */ struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig); +/** + * Serialize the DelayedPaymentOutputDescriptor object into a byte array which can be read by DelayedPaymentOutputDescriptor_read + */ +struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj); + +/** + * Read a DelayedPaymentOutputDescriptor from a byte array, created by DelayedPaymentOutputDescriptor_write + */ +struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser); + /** * Frees any resources used by the StaticPaymentOutputDescriptor, if is_owned is set and inner is non-NULL. */ @@ -12236,6 +12656,16 @@ MUST_USE_RES struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescript */ struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig); +/** + * Serialize the StaticPaymentOutputDescriptor object into a byte array which can be read by StaticPaymentOutputDescriptor_read + */ +struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj); + +/** + * Read a StaticPaymentOutputDescriptor from a byte array, created by StaticPaymentOutputDescriptor_write + */ +struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser); + /** * Frees any resources used by the SpendableOutputDescriptor */ @@ -12531,6 +12961,11 @@ void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ */ MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg); +/** + * Creates a copy of the ChainParameters + */ +struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig); + /** * Frees any resources used by the BestBlock, if is_owned is set and inner is non-NULL. */ @@ -12582,6 +13017,24 @@ const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NO */ void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); +/** + * The Channel's funding transaction output, if we've negotiated the funding transaction with + * our counterparty already. + * + * Note that, if this has been set, `channel_id` will be equivalent to + * `funding_txo.unwrap().to_channel_id()`. + */ +struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr); + +/** + * The Channel's funding transaction output, if we've negotiated the funding transaction with + * our counterparty already. + * + * Note that, if this has been set, `channel_id` will be equivalent to + * `funding_txo.unwrap().to_channel_id()`. + */ +void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val); + /** * The position of the funding transaction in the chain. None if the funding transaction has * not yet been confirmed and the channel fully opened. @@ -12672,17 +13125,59 @@ uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails */ void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val); +/** + * True if the channel was initiated (and thus funded) by us. + */ +bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr); + +/** + * True if the channel was initiated (and thus funded) by us. + */ +void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val); + +/** + * True if the channel is confirmed, funding_locked messages have been exchanged, and the + * channel is not currently being shut down. `funding_locked` message exchange implies the + * required confirmation count has been reached (and we were connected to the peer at some + * point after the funding transaction received enough confirmations). + */ +bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr); + +/** + * True if the channel is confirmed, funding_locked messages have been exchanged, and the + * channel is not currently being shut down. `funding_locked` message exchange implies the + * required confirmation count has been reached (and we were connected to the peer at some + * point after the funding transaction received enough confirmations). + */ +void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val); + /** * True if the channel is (a) confirmed and funding_locked messages have been exchanged, (b) - * the peer is connected, and (c) no monitor update failure is pending resolution. + * the peer is connected, (c) no monitor update failure is pending resolution, and (d) the + * channel is not currently negotiating a shutdown. + * + * This is a strict superset of `is_funding_locked`. */ -bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr); +bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr); /** * True if the channel is (a) confirmed and funding_locked messages have been exchanged, (b) - * the peer is connected, and (c) no monitor update failure is pending resolution. + * the peer is connected, (c) no monitor update failure is pending resolution, and (d) the + * channel is not currently negotiating a shutdown. + * + * This is a strict superset of `is_funding_locked`. + */ +void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val); + +/** + * True if this channel is (or will be) publicly-announced. + */ +bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr); + +/** + * True if this channel is (or will be) publicly-announced. */ -void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val); +void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val); /** * Creates a copy of the ChannelDetails @@ -12747,8 +13242,9 @@ MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const s * Gets the list of usable channels, in random order. Useful as an argument to * get_route to ensure non-announced channels are used. * - * These are guaranteed to have their is_live value set to true, see the documentation for - * ChannelDetails::is_live for more info on exactly what the criteria are. + * These are guaranteed to have their [`ChannelDetails::is_usable`] value set to true, see the + * documentation for [`ChannelDetails::is_usable`] for more info on exactly what the criteria + * are. */ MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg); @@ -12835,23 +13331,30 @@ MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_send_payme * Note that this includes RBF or similar transaction replacement strategies - lightning does * not currently support replacing a funding transaction on an existing channel. Instead, * create a new channel with a conflicting funding transaction. + * + * [`Event::FundingGenerationReady`]: crate::util::events::Event::FundingGenerationReady */ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKTransaction funding_transaction); /** - * Generates a signed node_announcement from the given arguments and creates a - * BroadcastNodeAnnouncement event. Note that such messages will be ignored unless peers have - * seen a channel_announcement from us (ie unless we have public channels open). + * Regenerates channel_announcements and generates a signed node_announcement from the given + * arguments, providing them in corresponding events via + * [`get_and_clear_pending_msg_events`], if at least one public channel has been confirmed + * on-chain. This effectively re-broadcasts all channel announcements and sends our node + * announcement to ensure that the lightning P2P network is aware of the channels we have and + * our network addresses. + * + * `rgb` is a node \"color\" and `alias` is a printable human-readable string to describe this + * node to humans. They carry no in-protocol meaning. * - * RGB is a node \"color\" and alias is a printable human-readable string to describe this node - * to humans. They carry no in-protocol meaning. + * `addresses` represent the set (possibly empty) of socket addresses on which this node + * accepts incoming connections. These will be included in the node_announcement, publicly + * tying these addresses together and to this node. If you wish to preserve user privacy, + * addresses should likely contain only Tor Onion addresses. * - * addresses represent the set (possibly empty) of socket addresses on which this node accepts - * incoming connections. These will be broadcast to the network, publicly tying these - * addresses together. If you wish to preserve user privacy, addresses should likely contain - * only Tor Onion addresses. + * Panics if `addresses` is absurdly large (more than 500). * - * Panics if addresses is absurdly large (more than 500). + * [`get_and_clear_pending_msg_events`]: MessageSendEventsProvider::get_and_clear_pending_msg_events */ void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses); @@ -12974,7 +13477,7 @@ MUST_USE_RES struct LDKC2Tuple_PaymentHashPaymentSecretZ ChannelManager_create_i * `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for * in excess of the current time. This should roughly match the expiry time set in the invoice. * After this many seconds, we will remove the inbound payment, resulting in any attempts to - * pay the invoice failing. The BOLT spec suggests 7,200 secs as a default validity time for + * pay the invoice failing. The BOLT spec suggests 3,600 secs as a default validity time for * invoices when no timeout is set. * * Note that we use block header time to time-out pending inbound payments (with some margin @@ -14284,6 +14787,11 @@ struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj) */ struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser); +/** + * Read a NetAddress from a byte array, created by NetAddress_write + */ +struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser); + /** * Frees any resources used by the UnsignedNodeAnnouncement, if is_owned is set and inner is non-NULL. */ @@ -16276,6 +16784,34 @@ MUST_USE_RES struct LDKCResult_CVec_SignatureZNoneZ TrustedCommitmentTransaction */ uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster); +/** + * Checks if two InitFeaturess contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b); + +/** + * Checks if two NodeFeaturess contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b); + +/** + * Checks if two ChannelFeaturess contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b); + +/** + * Checks if two InvoiceFeaturess contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b); + /** * Creates a copy of the InitFeatures */ @@ -16356,6 +16892,21 @@ MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void); */ MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void); +/** + * Returns whether the `payment_secret` feature is supported. + */ +MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg); + +/** + * Returns whether the `payment_secret` feature is supported. + */ +MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg); + +/** + * Returns whether the `payment_secret` feature is supported. + */ +MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg); + /** * Serialize the InitFeatures object into a byte array which can be read by InitFeatures_read */ @@ -16481,6 +17032,16 @@ MUST_USE_RES struct LDKRouteHop RouteHop_new(struct LDKPublicKey pubkey_arg, str */ struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig); +/** + * Serialize the RouteHop object into a byte array which can be read by RouteHop_read + */ +struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj); + +/** + * Read a RouteHop from a byte array, created by RouteHop_write + */ +struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser); + /** * Frees any resources used by the Route, if is_owned is set and inner is non-NULL. */ @@ -16586,6 +17147,13 @@ void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this */ MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg); +/** + * Checks if two RouteHintHops contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b); + /** * Creates a copy of the RouteHintHop */ @@ -16918,20 +17486,27 @@ void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg); /** - * Creates a copy of the RoutingFees + * Checks if two RoutingFeess contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. */ -struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig); +bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b); /** - * Read a RoutingFees from a byte array, created by RoutingFees_write + * Creates a copy of the RoutingFees */ -struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser); +struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig); /** * Serialize the RoutingFees object into a byte array which can be read by RoutingFees_read */ struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj); +/** + * Read a RoutingFees from a byte array, created by RoutingFees_write + */ +struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser); + /** * Frees any resources used by the NodeAnnouncementInfo, if is_owned is set and inner is non-NULL. */ @@ -17195,6 +17770,43 @@ MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ File */ struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg); +/** + * Frees any resources used by the BackgroundProcessor, if is_owned is set and inner is non-NULL. + */ +void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj); + +/** + * Calls the free function if one is set + */ +void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr); + +/** + * Start a background thread that takes care of responsibilities enumerated in the top-level + * documentation. + * + * If `persist_manager` returns an error, then this thread will return said error (and + * `start()` will need to be called again to restart the `BackgroundProcessor`). Users should + * wait on [`thread_handle`]'s `join()` method to be able to tell if and when an error is + * returned, or implement `persist_manager` such that an error is never returned to the + * `BackgroundProcessor` + * + * `persist_manager` is responsible for writing out the [`ChannelManager`] to disk, and/or + * uploading to one or more backup services. See [`ChannelManager::write`] for writing out a + * [`ChannelManager`]. See [`FilesystemPersister::persist_manager`] for Rust-Lightning's + * provided implementation. + * + * [`thread_handle`]: BackgroundProcessor::thread_handle + * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager + * [`ChannelManager::write`]: lightning::ln::channelmanager::ChannelManager#impl-Writeable + * [`FilesystemPersister::persist_manager`]: lightning_persister::FilesystemPersister::persist_manager + */ +MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKChannelManagerPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger); + +/** + * Stop `BackgroundProcessor`'s thread. + */ +MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg); + /** * **Call this function on startup to ensure that all assumptions about the platform are valid.** * @@ -17217,6 +17829,13 @@ void check_platform(void); */ void Invoice_free(struct LDKInvoice this_obj); +/** + * Checks if two Invoices contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b); + /** * Creates a copy of the Invoice */ @@ -17227,6 +17846,13 @@ struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig); */ void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj); +/** + * Checks if two SignedRawInvoices contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b); + /** * Creates a copy of the SignedRawInvoice */ @@ -17247,6 +17873,13 @@ struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PT */ void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val); +/** + * Checks if two RawInvoices contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b); + /** * Creates a copy of the RawInvoice */ @@ -17267,6 +17900,13 @@ struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPar */ void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val); +/** + * Checks if two RawDataParts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b); + /** * Creates a copy of the RawDataPart */ @@ -17277,6 +17917,13 @@ struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR */ void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj); +/** + * Checks if two PositiveTimestamps contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b); + /** * Creates a copy of the PositiveTimestamp */ @@ -17287,6 +17934,12 @@ struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTime */ enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig); +/** + * Checks if two SiPrefixs contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b); + /** * Returns the multiplier to go from a BTC value to picoBTC implied by this SiPrefix. * This is effectively 10^12 * the prefix multiplier @@ -17298,11 +17951,24 @@ MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR th */ enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig); +/** + * Checks if two Currencys contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b); + /** * Frees any resources used by the Sha256, if is_owned is set and inner is non-NULL. */ void Sha256_free(struct LDKSha256 this_obj); +/** + * Checks if two Sha256s contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b); + /** * Creates a copy of the Sha256 */ @@ -17313,6 +17979,13 @@ struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig); */ void Description_free(struct LDKDescription this_obj); +/** + * Checks if two Descriptions contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b); + /** * Creates a copy of the Description */ @@ -17323,6 +17996,13 @@ struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR */ void PayeePubKey_free(struct LDKPayeePubKey this_obj); +/** + * Checks if two PayeePubKeys contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b); + /** * Creates a copy of the PayeePubKey */ @@ -17333,6 +18013,13 @@ struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR */ void ExpiryTime_free(struct LDKExpiryTime this_obj); +/** + * Checks if two ExpiryTimes contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b); + /** * Creates a copy of the ExpiryTime */ @@ -17343,6 +18030,13 @@ struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR or */ void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj); +/** + * Checks if two MinFinalCltvExpirys contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b); + /** * Creates a copy of the MinFinalCltvExpiry */ @@ -17358,11 +18052,24 @@ void Fallback_free(struct LDKFallback this_ptr); */ struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig); +/** + * Checks if two Fallbacks contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b); + /** * Frees any resources used by the InvoiceSignature, if is_owned is set and inner is non-NULL. */ void InvoiceSignature_free(struct LDKInvoiceSignature this_obj); +/** + * Checks if two InvoiceSignatures contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b); + /** * Creates a copy of the InvoiceSignature */ @@ -17373,6 +18080,13 @@ struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignatu */ void RouteHint_free(struct LDKRouteHint this_obj); +/** + * Checks if two RouteHints contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b); + /** * Creates a copy of the RouteHint */ @@ -17598,6 +18312,12 @@ MUST_USE_RES struct LDKCVec_RouteHintHopZ RouteHint_into_inner(struct LDKRouteHi */ enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig); +/** + * Checks if two CreationErrors contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b); + /** * Get the string representation of a CreationError object */ @@ -17608,6 +18328,12 @@ struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o); */ enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig); +/** + * Checks if two SemanticErrors contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b); + /** * Get the string representation of a SemanticError object */ @@ -17623,6 +18349,12 @@ void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr); */ struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig); +/** + * Checks if two SignOrCreationErrors contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b); + /** * Get the string representation of a SignOrCreationError object */ diff --git a/src/generators/trait_generator.py b/src/generators/trait_generator.py index 89fff3c2..c3c45cf8 100644 --- a/src/generators/trait_generator.py +++ b/src/generators/trait_generator.py @@ -149,7 +149,6 @@ def generate_trait(self, struct_name, struct_details): # let's create a native default implementation default_callback_prepared_arguments = ConversionHelper.prepare_swift_to_native_arguments(current_lambda['argument_types'], True) default_callback_return_wrappers = ConversionHelper.prepare_return_value(current_return_type_details, is_clone) - print('default callback prepared arguments') current_default_callback_replacement = natively_implemented_callback_template current_default_callback_replacement = current_default_callback_replacement.replace('public_swift_argument_list', public_swift_argument_list) current_default_callback_replacement = current_default_callback_replacement.replace('-> Void {', f'-> {swift_return_type} {{') diff --git a/src/generators/util_generators/static_method_generator.py b/src/generators/util_generators/static_method_generator.py new file mode 100644 index 00000000..4c7248a1 --- /dev/null +++ b/src/generators/util_generators/static_method_generator.py @@ -0,0 +1,48 @@ +import re + +from generators.util_generators import UtilGenerator +from conversion_helper import ConversionHelper + + +class StaticMethodGenerator(UtilGenerator): + + def __init__(self) -> None: + super().__init__() + self.template_regex = re.compile("(\/\* STATIC_METHODS_START \*\/\n)(.*)(\n[\t ]*\/\* STATIC_METHODS_END \*\/)", flags=re.MULTILINE | re.DOTALL) + self.loadTemplate() + self.raw_tuple_generators = {} + + def generate_static_methods(self, static_methods): + genes = self.raw_tuple_generators + for current_method in static_methods: + arguments = ConversionHelper.prepare_swift_to_native_arguments(current_method['argument_types'], False) + return_wrappers = ConversionHelper.prepare_return_value(current_method['return_type'], False) + native_method_name = current_method['name']['native'] + swift_method_name = current_method['name']['swift'] + method_name = 'swift_' + swift_method_name + if swift_method_name.startswith('_'): + method_name = 'swift' + swift_method_name + + + if native_method_name == 'get_route': + continue + + swift_argument_list = ', '.join(arguments['swift_arguments']) + swift_return_type = return_wrappers['swift_type'] + + current_method_replacement = self.template + current_method_replacement = current_method_replacement.replace('swift_arguments', swift_argument_list) + current_method_replacement = current_method_replacement.replace('-> Void {', f'-> {swift_return_type} {{') + current_method_replacement = current_method_replacement.replace('func methodName(', f'func {method_name}(') + + native_arguments = arguments['native_arguments'] + default_return_prefix = 'return ' + if current_method['return_type'].swift_type == 'Void': + default_return_prefix = '' + + current_method_replacement = current_method_replacement.replace('/* STATIC_METHOD_BODY */', f''' + {default_return_prefix}{arguments['native_call_prefix']} + {return_wrappers['prefix']}{native_method_name}({', '.join(native_arguments)}){return_wrappers['suffix']} + {arguments['native_call_suffix']} + ''') + self.filled_template += current_method_replacement + "\n" diff --git a/src/lightning_header_parser.py b/src/lightning_header_parser.py index 05df974c..2fb16bb2 100644 --- a/src/lightning_header_parser.py +++ b/src/lightning_header_parser.py @@ -123,6 +123,7 @@ def populate_type_details(self): self.byte_arrays = set() self.union_enum_items = {} self.result_ptr_struct_items = {} + self.static_methods = [] fn_ptr_regex = re.compile("^extern const ([A-Za-z_0-9\* ]*) \(\*(.*)\)\((.*)\);$") fn_ret_arr_regex = re.compile("(.*) \(\*(.*)\((.*)\)\)\[([0-9]*)\];$") @@ -401,8 +402,13 @@ def populate_type_details(self): else: self.type_details[associated_type_name].methods.append(method_details) else: - # self.global_methods.add(method_details) - pass + is_independent = method_details['is_independent'] + native_method_name = method_details['name']['native'] + if is_independent or native_method_name in ['C2Tuple_BlockHashChannelManagerZ_read', 'C2Tuple_BlockHashChannelMonitorZ_read', 'FilesystemPersister_persist_manager']: + print('native method:', native_method_name) + if native_method_name not in self.global_methods: + self.global_methods.add(native_method_name) + self.static_methods.append(method_details) def parse_option_details(self, struct_name, option_field_lines, tag_field_lines): tuple_variants = {} @@ -562,6 +568,7 @@ def parse_function_details(self, line, re_match, ret_arr_len, c_call_string): inferred_tuple_name = '_'.join(method_name.split('_')[:-1]) belongs_to_struct = False belongs_to_tuple = False + is_independent = False # return_type_info = type_mapping_generator.map_type(method_return_type, True, ret_arr_len, False, False) return_type_info = swift_type_mapper.map_types_to_swift(method_return_type, ret_arr_len, True, self.tuple_types, self.unitary_enums, self.language_constants) @@ -615,7 +622,9 @@ def parse_function_details(self, line, re_match, ret_arr_len, c_call_string): native_struct_name = "LDK" + inferred_struct_name native_tuple_name = "LDK" + inferred_tuple_name # if (native_struct_name in self.opaque_structs or native_struct_name in self.trait_structs) and not is_free: - if (native_struct_name in self.opaque_structs or native_struct_name in self.trait_structs): # don't care if it's a free + if (native_struct_name not in self.type_details) and (native_tuple_name not in self.type_details): + is_independent = True + elif (native_struct_name in self.opaque_structs) or (native_struct_name in self.trait_structs): # don't care if it's a free # belongs to struct belongs_to_struct = True associated_type_name = inferred_struct_name @@ -623,7 +632,7 @@ def parse_function_details(self, line, re_match, ret_arr_len, c_call_string): # belongs in utility methods inferred_struct_name = method_name.rsplit("_", 1)[0] # elif (native_tuple_name in self.tuple_types) and not is_free: - elif (native_tuple_name in self.tuple_types): # don't care if it's a free + elif native_tuple_name in self.tuple_types: # don't care if it's a free associated_type_name = inferred_tuple_name belongs_to_tuple = True if out_java_struct is not None: @@ -636,7 +645,7 @@ def parse_function_details(self, line, re_match, ret_arr_len, c_call_string): return {'struct_method': inferred_struct_name, 'associated_type_name': None if associated_type_name is None else {'native': 'LDK' + associated_type_name, 'swift': associated_type_name}, 'is_free': is_free, 'is_constructor': is_constructor, 'is_clone': is_clone, 'takes_self': takes_self, 'name': {'native': method_name, 'swift': clean_method_name}, 'arguments': method_arguments, 'argument_types': argument_types, 'return_value': method_return_type, 'return_type': return_type_info, 'belongs_to_struct': belongs_to_struct, - 'belongs_to_tuple': belongs_to_tuple} + 'belongs_to_tuple': belongs_to_tuple, 'is_independent': is_independent} @staticmethod def camel_to_snake(s): diff --git a/src/sdk_generator.py b/src/sdk_generator.py index fdbd0f83..e9001d59 100644 --- a/src/sdk_generator.py +++ b/src/sdk_generator.py @@ -6,6 +6,7 @@ from generators.trait_generator import TraitGenerator from generators.util_generators.vector_generator import VectorGenerator from generators.util_generators.byte_array_generator import ByteArrayGenerator +from generators.util_generators.static_method_generator import StaticMethodGenerator def parse_header() -> LightningHeaderParser: @@ -20,6 +21,7 @@ def generate_binding_methods(parser: LightningHeaderParser): # firstly, let's generate the vector utilities byte_array_generator = ByteArrayGenerator() vector_generator = VectorGenerator() + static_method_generator = StaticMethodGenerator() byte_arrays = parser.byte_arrays for current_byte_array_type in byte_arrays: @@ -34,6 +36,9 @@ def generate_binding_methods(parser: LightningHeaderParser): vector_generator.generate_vector(current_vector, vector_type_details) vector_generator.finalize() + static_method_generator.generate_static_methods(parser.static_methods) + static_method_generator.finalize() + def generate_opaque_struct_wrappers(parser: LightningHeaderParser, returned_trait_instances = set()): opaque_struct_generator = OpaqueStructGenerator() diff --git a/templates/BindingsTemplate.swift b/templates/BindingsTemplate.swift index 51752441..8abd6b59 100644 --- a/templates/BindingsTemplate.swift +++ b/templates/BindingsTemplate.swift @@ -58,6 +58,12 @@ public class Bindings{ /* RUST_TO_SWIFT_END */ /* VECTOR_METHODS_END */ + /* STATIC_METHODS_START */ + public class func methodName(swift_arguments) -> Void { + /* STATIC_METHOD_BODY */ + } + /* STATIC_METHODS_END */ + public class func instanceToPointer(instance: AnyObject) -> UnsafeMutableRawPointer { Unmanaged.passUnretained(instance).toOpaque() } @@ -157,6 +163,15 @@ public class Bindings{ } } + public class func getRoute(our_node_id: [UInt8], network: NetworkGraph, payee: [UInt8], payee_features: InvoiceFeatures, first_hops: [LDKChannelDetails], last_hops: [LDKRouteHintHop], final_value_msat: UInt64, final_cltv: UInt32, logger: Logger) -> Result_RouteLightningErrorZ { + return withUnsafePointer(to: network.cOpaqueStruct!) { (networkPointer: UnsafePointer) in + var mutableHops = Bindings.new_LDKCVec_ChannelDetailsZ(array: first_hops) + return withUnsafeMutablePointer(to: &mutableHops) { (first_hopsPointer) in + Result_RouteLightningErrorZ(pointer: get_route(Bindings.new_LDKPublicKey(array: our_node_id), networkPointer, Bindings.new_LDKPublicKey(array: payee), payee_features.cOpaqueStruct!, first_hopsPointer, Bindings.new_LDKCVec_RouteHintHopZ(array: last_hops), final_value_msat, final_cltv, logger.cOpaqueStruct!)) + } + } + } + } public class TxOut { diff --git a/xcode/LDKFramework/LDKFramework.xcodeproj/project.pbxproj b/xcode/LDKFramework/LDKFramework.xcodeproj/project.pbxproj index e0bbdbef..6445f7b4 100644 --- a/xcode/LDKFramework/LDKFramework.xcodeproj/project.pbxproj +++ b/xcode/LDKFramework/LDKFramework.xcodeproj/project.pbxproj @@ -12,484 +12,6 @@ 07344C65264277ED001CD90E /* LDKFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 07344C57264277ED001CD90E /* LDKFramework.h */; settings = {ATTRIBUTES = (Public, ); }; }; 07344C8726427F95001CD90E /* LDKExampleClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344C8626427F95001CD90E /* LDKExampleClass.swift */; }; 07344C8826427F95001CD90E /* LDKExampleClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344C8626427F95001CD90E /* LDKExampleClass.swift */; }; - 07344DC52642882B001CD90E /* PaymentSendFailure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD22642882A001CD90E /* PaymentSendFailure.swift */; }; - 07344DC62642882B001CD90E /* PaymentSendFailure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD22642882A001CD90E /* PaymentSendFailure.swift */; }; - 07344DC72642882B001CD90E /* Option_u64Z.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD32642882A001CD90E /* Option_u64Z.swift */; }; - 07344DC82642882B001CD90E /* Option_u64Z.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD32642882A001CD90E /* Option_u64Z.swift */; }; - 07344DC92642882B001CD90E /* Fallback.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD42642882A001CD90E /* Fallback.swift */; }; - 07344DCA2642882B001CD90E /* Fallback.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD42642882A001CD90E /* Fallback.swift */; }; - 07344DCB2642882B001CD90E /* Option_C2Tuple_usizeTransactionZZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD52642882A001CD90E /* Option_C2Tuple_usizeTransactionZZ.swift */; }; - 07344DCC2642882B001CD90E /* Option_C2Tuple_usizeTransactionZZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD52642882A001CD90E /* Option_C2Tuple_usizeTransactionZZ.swift */; }; - 07344DCD2642882B001CD90E /* APIError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD62642882A001CD90E /* APIError.swift */; }; - 07344DCE2642882B001CD90E /* APIError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD62642882A001CD90E /* APIError.swift */; }; - 07344DCF2642882B001CD90E /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD72642882A001CD90E /* Event.swift */; }; - 07344DD02642882B001CD90E /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD72642882A001CD90E /* Event.swift */; }; - 07344DD12642882B001CD90E /* HTLCFailChannelUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD82642882A001CD90E /* HTLCFailChannelUpdate.swift */; }; - 07344DD22642882B001CD90E /* HTLCFailChannelUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD82642882A001CD90E /* HTLCFailChannelUpdate.swift */; }; - 07344DD32642882B001CD90E /* ErrorAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD92642882A001CD90E /* ErrorAction.swift */; }; - 07344DD42642882B001CD90E /* ErrorAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CD92642882A001CD90E /* ErrorAction.swift */; }; - 07344DD52642882B001CD90E /* Option_u32Z.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CDA2642882A001CD90E /* Option_u32Z.swift */; }; - 07344DD62642882B001CD90E /* Option_u32Z.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CDA2642882A001CD90E /* Option_u32Z.swift */; }; - 07344DD72642882B001CD90E /* NetAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CDB2642882A001CD90E /* NetAddress.swift */; }; - 07344DD82642882B001CD90E /* NetAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CDB2642882A001CD90E /* NetAddress.swift */; }; - 07344DD92642882B001CD90E /* SignOrCreationError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CDC2642882A001CD90E /* SignOrCreationError.swift */; }; - 07344DDA2642882B001CD90E /* SignOrCreationError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CDC2642882A001CD90E /* SignOrCreationError.swift */; }; - 07344DDB2642882B001CD90E /* MessageSendEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CDD2642882A001CD90E /* MessageSendEvent.swift */; }; - 07344DDC2642882B001CD90E /* MessageSendEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CDD2642882A001CD90E /* MessageSendEvent.swift */; }; - 07344DDD2642882B001CD90E /* MonitorEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CDE2642882A001CD90E /* MonitorEvent.swift */; }; - 07344DDE2642882B001CD90E /* MonitorEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CDE2642882A001CD90E /* MonitorEvent.swift */; }; - 07344DDF2642882B001CD90E /* SpendableOutputDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CDF2642882A001CD90E /* SpendableOutputDescriptor.swift */; }; - 07344DE02642882B001CD90E /* SpendableOutputDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CDF2642882A001CD90E /* SpendableOutputDescriptor.swift */; }; - 07344DE12642882B001CD90E /* BaseSign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE12642882A001CD90E /* BaseSign.swift */; }; - 07344DE22642882B001CD90E /* BaseSign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE12642882A001CD90E /* BaseSign.swift */; }; - 07344DE32642882B001CD90E /* Persist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE22642882A001CD90E /* Persist.swift */; }; - 07344DE42642882B001CD90E /* Persist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE22642882A001CD90E /* Persist.swift */; }; - 07344DE52642882B001CD90E /* KeysInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE32642882A001CD90E /* KeysInterface.swift */; }; - 07344DE62642882B001CD90E /* KeysInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE32642882A001CD90E /* KeysInterface.swift */; }; - 07344DE72642882B001CD90E /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE42642882A001CD90E /* Logger.swift */; }; - 07344DE82642882B001CD90E /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE42642882A001CD90E /* Logger.swift */; }; - 07344DE92642882B001CD90E /* SocketDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE52642882A001CD90E /* SocketDescriptor.swift */; }; - 07344DEA2642882B001CD90E /* SocketDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE52642882A001CD90E /* SocketDescriptor.swift */; }; - 07344DEB2642882B001CD90E /* FeeEstimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE62642882A001CD90E /* FeeEstimator.swift */; }; - 07344DEC2642882B001CD90E /* FeeEstimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE62642882A001CD90E /* FeeEstimator.swift */; }; - 07344DED2642882B001CD90E /* MessageSendEventsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE72642882A001CD90E /* MessageSendEventsProvider.swift */; }; - 07344DEE2642882B001CD90E /* MessageSendEventsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE72642882A001CD90E /* MessageSendEventsProvider.swift */; }; - 07344DEF2642882B001CD90E /* BroadcasterInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE82642882A001CD90E /* BroadcasterInterface.swift */; }; - 07344DF02642882B001CD90E /* BroadcasterInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE82642882A001CD90E /* BroadcasterInterface.swift */; }; - 07344DF12642882B001CD90E /* Confirm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE92642882A001CD90E /* Confirm.swift */; }; - 07344DF22642882B001CD90E /* Confirm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CE92642882A001CD90E /* Confirm.swift */; }; - 07344DF32642882B001CD90E /* RoutingMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CEA2642882A001CD90E /* RoutingMessageHandler.swift */; }; - 07344DF42642882B001CD90E /* RoutingMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CEA2642882A001CD90E /* RoutingMessageHandler.swift */; }; - 07344DF52642882B001CD90E /* Listen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CEB2642882A001CD90E /* Listen.swift */; }; - 07344DF62642882B001CD90E /* Listen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CEB2642882A001CD90E /* Listen.swift */; }; - 07344DF72642882B001CD90E /* ChannelMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CEC2642882A001CD90E /* ChannelMessageHandler.swift */; }; - 07344DF82642882B001CD90E /* ChannelMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CEC2642882A001CD90E /* ChannelMessageHandler.swift */; }; - 07344DF92642882B001CD90E /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CED2642882A001CD90E /* Filter.swift */; }; - 07344DFA2642882B001CD90E /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CED2642882A001CD90E /* Filter.swift */; }; - 07344DFB2642882B001CD90E /* Access.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CEE2642882A001CD90E /* Access.swift */; }; - 07344DFC2642882B001CD90E /* Access.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CEE2642882A001CD90E /* Access.swift */; }; - 07344DFD2642882B001CD90E /* EventsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CEF2642882A001CD90E /* EventsProvider.swift */; }; - 07344DFE2642882B001CD90E /* EventsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CEF2642882A001CD90E /* EventsProvider.swift */; }; - 07344DFF2642882B001CD90E /* Watch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF02642882A001CD90E /* Watch.swift */; }; - 07344E002642882B001CD90E /* Watch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF02642882A001CD90E /* Watch.swift */; }; - 07344E012642882B001CD90E /* Sign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF12642882A001CD90E /* Sign.swift */; }; - 07344E022642882B001CD90E /* Sign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF12642882A001CD90E /* Sign.swift */; }; - 07344E032642882B001CD90E /* C2Tuple_BlockHashChannelMonitorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF32642882A001CD90E /* C2Tuple_BlockHashChannelMonitorZ.swift */; }; - 07344E042642882B001CD90E /* C2Tuple_BlockHashChannelMonitorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF32642882A001CD90E /* C2Tuple_BlockHashChannelMonitorZ.swift */; }; - 07344E052642882B001CD90E /* C2Tuple_SignatureCVec_SignatureZZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF42642882A001CD90E /* C2Tuple_SignatureCVec_SignatureZZ.swift */; }; - 07344E062642882B001CD90E /* C2Tuple_SignatureCVec_SignatureZZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF42642882A001CD90E /* C2Tuple_SignatureCVec_SignatureZZ.swift */; }; - 07344E072642882B001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF52642882A001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift */; }; - 07344E082642882B001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF52642882A001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift */; }; - 07344E092642882B001CD90E /* C2Tuple_BlockHashChannelManagerZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF62642882A001CD90E /* C2Tuple_BlockHashChannelManagerZ.swift */; }; - 07344E0A2642882B001CD90E /* C2Tuple_BlockHashChannelManagerZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF62642882A001CD90E /* C2Tuple_BlockHashChannelManagerZ.swift */; }; - 07344E0B2642882B001CD90E /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF72642882A001CD90E /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift */; }; - 07344E0C2642882B001CD90E /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF72642882A001CD90E /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift */; }; - 07344E0D2642882B001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF82642882A001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift */; }; - 07344E0E2642882B001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF82642882A001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift */; }; - 07344E0F2642882B001CD90E /* C2Tuple_PaymentHashPaymentSecretZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF92642882A001CD90E /* C2Tuple_PaymentHashPaymentSecretZ.swift */; }; - 07344E102642882B001CD90E /* C2Tuple_PaymentHashPaymentSecretZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CF92642882A001CD90E /* C2Tuple_PaymentHashPaymentSecretZ.swift */; }; - 07344E112642882B001CD90E /* C2Tuple_u32TxOutZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CFA2642882A001CD90E /* C2Tuple_u32TxOutZ.swift */; }; - 07344E122642882B001CD90E /* C2Tuple_u32TxOutZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CFA2642882A001CD90E /* C2Tuple_u32TxOutZ.swift */; }; - 07344E132642882B001CD90E /* C2Tuple_OutPointScriptZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CFB2642882A001CD90E /* C2Tuple_OutPointScriptZ.swift */; }; - 07344E142642882B001CD90E /* C2Tuple_OutPointScriptZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CFB2642882A001CD90E /* C2Tuple_OutPointScriptZ.swift */; }; - 07344E152642882B001CD90E /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CFC2642882A001CD90E /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift */; }; - 07344E162642882B001CD90E /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CFC2642882A001CD90E /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift */; }; - 07344E172642882B001CD90E /* C2Tuple_u32ScriptZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CFD2642882A001CD90E /* C2Tuple_u32ScriptZ.swift */; }; - 07344E182642882B001CD90E /* C2Tuple_u32ScriptZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CFD2642882A001CD90E /* C2Tuple_u32ScriptZ.swift */; }; - 07344E192642882B001CD90E /* C2Tuple_usizeTransactionZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CFE2642882A001CD90E /* C2Tuple_usizeTransactionZ.swift */; }; - 07344E1A2642882B001CD90E /* C2Tuple_usizeTransactionZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CFE2642882A001CD90E /* C2Tuple_usizeTransactionZ.swift */; }; - 07344E1B2642882B001CD90E /* Bindings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CFF2642882A001CD90E /* Bindings.swift */; }; - 07344E1C2642882B001CD90E /* Bindings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344CFF2642882A001CD90E /* Bindings.swift */; }; - 07344E1D2642882B001CD90E /* Result_ChannelConfigDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D012642882A001CD90E /* Result_ChannelConfigDecodeErrorZ.swift */; }; - 07344E1E2642882B001CD90E /* Result_ChannelConfigDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D012642882A001CD90E /* Result_ChannelConfigDecodeErrorZ.swift */; }; - 07344E1F2642882B001CD90E /* Result_ChannelTransactionParametersDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D022642882A001CD90E /* Result_ChannelTransactionParametersDecodeErrorZ.swift */; }; - 07344E202642882B001CD90E /* Result_ChannelTransactionParametersDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D022642882A001CD90E /* Result_ChannelTransactionParametersDecodeErrorZ.swift */; }; - 07344E212642882B001CD90E /* Result_QueryChannelRangeDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D032642882A001CD90E /* Result_QueryChannelRangeDecodeErrorZ.swift */; }; - 07344E222642882B001CD90E /* Result_QueryChannelRangeDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D032642882A001CD90E /* Result_QueryChannelRangeDecodeErrorZ.swift */; }; - 07344E232642882B001CD90E /* Result_FundingCreatedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D042642882A001CD90E /* Result_FundingCreatedDecodeErrorZ.swift */; }; - 07344E242642882B001CD90E /* Result_FundingCreatedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D042642882A001CD90E /* Result_FundingCreatedDecodeErrorZ.swift */; }; - 07344E252642882B001CD90E /* Result_TxCreationKeysErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D052642882A001CD90E /* Result_TxCreationKeysErrorZ.swift */; }; - 07344E262642882B001CD90E /* Result_TxCreationKeysErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D052642882A001CD90E /* Result_TxCreationKeysErrorZ.swift */; }; - 07344E272642882B001CD90E /* Result_PingDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D062642882A001CD90E /* Result_PingDecodeErrorZ.swift */; }; - 07344E282642882B001CD90E /* Result_PingDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D062642882A001CD90E /* Result_PingDecodeErrorZ.swift */; }; - 07344E292642882B001CD90E /* Result_UpdateFulfillHTLCDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D072642882A001CD90E /* Result_UpdateFulfillHTLCDecodeErrorZ.swift */; }; - 07344E2A2642882B001CD90E /* Result_UpdateFulfillHTLCDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D072642882A001CD90E /* Result_UpdateFulfillHTLCDecodeErrorZ.swift */; }; - 07344E2B2642882B001CD90E /* Result_NonePaymentSendFailureZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D082642882A001CD90E /* Result_NonePaymentSendFailureZ.swift */; }; - 07344E2C2642882B001CD90E /* Result_NonePaymentSendFailureZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D082642882A001CD90E /* Result_NonePaymentSendFailureZ.swift */; }; - 07344E2D2642882B001CD90E /* Result_CVec_u8ZPeerHandleErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D092642882A001CD90E /* Result_CVec_u8ZPeerHandleErrorZ.swift */; }; - 07344E2E2642882B001CD90E /* Result_CVec_u8ZPeerHandleErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D092642882A001CD90E /* Result_CVec_u8ZPeerHandleErrorZ.swift */; }; - 07344E2F2642882B001CD90E /* Result_DirectionalChannelInfoDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D0A2642882A001CD90E /* Result_DirectionalChannelInfoDecodeErrorZ.swift */; }; - 07344E302642882B001CD90E /* Result_DirectionalChannelInfoDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D0A2642882A001CD90E /* Result_DirectionalChannelInfoDecodeErrorZ.swift */; }; - 07344E312642882B001CD90E /* Result_RouteDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D0B2642882A001CD90E /* Result_RouteDecodeErrorZ.swift */; }; - 07344E322642882B001CD90E /* Result_RouteDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D0B2642882A001CD90E /* Result_RouteDecodeErrorZ.swift */; }; - 07344E332642882B001CD90E /* Result_RevokeAndACKDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D0C2642882A001CD90E /* Result_RevokeAndACKDecodeErrorZ.swift */; }; - 07344E342642882B001CD90E /* Result_RevokeAndACKDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D0C2642882A001CD90E /* Result_RevokeAndACKDecodeErrorZ.swift */; }; - 07344E352642882B001CD90E /* Result_OpenChannelDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D0D2642882A001CD90E /* Result_OpenChannelDecodeErrorZ.swift */; }; - 07344E362642882B001CD90E /* Result_OpenChannelDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D0D2642882A001CD90E /* Result_OpenChannelDecodeErrorZ.swift */; }; - 07344E372642882B001CD90E /* Result_ChannelInfoDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D0E2642882A001CD90E /* Result_ChannelInfoDecodeErrorZ.swift */; }; - 07344E382642882B001CD90E /* Result_ChannelInfoDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D0E2642882A001CD90E /* Result_ChannelInfoDecodeErrorZ.swift */; }; - 07344E392642882B001CD90E /* Result_RouteHintCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D0F2642882A001CD90E /* Result_RouteHintCreationErrorZ.swift */; }; - 07344E3A2642882B001CD90E /* Result_RouteHintCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D0F2642882A001CD90E /* Result_RouteHintCreationErrorZ.swift */; }; - 07344E3B2642882B001CD90E /* Result_PongDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D102642882A001CD90E /* Result_PongDecodeErrorZ.swift */; }; - 07344E3C2642882B001CD90E /* Result_PongDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D102642882A001CD90E /* Result_PongDecodeErrorZ.swift */; }; - 07344E3D2642882B001CD90E /* Result_ChannelPublicKeysDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D112642882A001CD90E /* Result_ChannelPublicKeysDecodeErrorZ.swift */; }; - 07344E3E2642882B001CD90E /* Result_ChannelPublicKeysDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D112642882A001CD90E /* Result_ChannelPublicKeysDecodeErrorZ.swift */; }; - 07344E3F2642882B001CD90E /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D122642882A001CD90E /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift */; }; - 07344E402642882B001CD90E /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D122642882A001CD90E /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift */; }; - 07344E412642882B001CD90E /* Result_PaymentSecretAPIErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D132642882A001CD90E /* Result_PaymentSecretAPIErrorZ.swift */; }; - 07344E422642882B001CD90E /* Result_PaymentSecretAPIErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D132642882A001CD90E /* Result_PaymentSecretAPIErrorZ.swift */; }; - 07344E432642882B001CD90E /* Result_SpendableOutputDescriptorDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D142642882A001CD90E /* Result_SpendableOutputDescriptorDecodeErrorZ.swift */; }; - 07344E442642882B001CD90E /* Result_SpendableOutputDescriptorDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D142642882A001CD90E /* Result_SpendableOutputDescriptorDecodeErrorZ.swift */; }; - 07344E452642882B001CD90E /* Result_UnsignedChannelUpdateDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D152642882A001CD90E /* Result_UnsignedChannelUpdateDecodeErrorZ.swift */; }; - 07344E462642882B001CD90E /* Result_UnsignedChannelUpdateDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D152642882A001CD90E /* Result_UnsignedChannelUpdateDecodeErrorZ.swift */; }; - 07344E472642882B001CD90E /* Result_ErrorMessageDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D162642882A001CD90E /* Result_ErrorMessageDecodeErrorZ.swift */; }; - 07344E482642882B001CD90E /* Result_ErrorMessageDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D162642882A001CD90E /* Result_ErrorMessageDecodeErrorZ.swift */; }; - 07344E492642882B001CD90E /* Result_AcceptChannelDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D172642882A001CD90E /* Result_AcceptChannelDecodeErrorZ.swift */; }; - 07344E4A2642882B001CD90E /* Result_AcceptChannelDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D172642882A001CD90E /* Result_AcceptChannelDecodeErrorZ.swift */; }; - 07344E4B2642882B001CD90E /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D182642882A001CD90E /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift */; }; - 07344E4C2642882B001CD90E /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D182642882A001CD90E /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift */; }; - 07344E4D2642882B001CD90E /* Result_NodeFeaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D192642882A001CD90E /* Result_NodeFeaturesDecodeErrorZ.swift */; }; - 07344E4E2642882B001CD90E /* Result_NodeFeaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D192642882A001CD90E /* Result_NodeFeaturesDecodeErrorZ.swift */; }; - 07344E4F2642882B001CD90E /* Result_TrustedCommitmentTransactionNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D1A2642882A001CD90E /* Result_TrustedCommitmentTransactionNoneZ.swift */; }; - 07344E502642882B001CD90E /* Result_TrustedCommitmentTransactionNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D1A2642882A001CD90E /* Result_TrustedCommitmentTransactionNoneZ.swift */; }; - 07344E512642882B001CD90E /* Result_AnnouncementSignaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D1B2642882A001CD90E /* Result_AnnouncementSignaturesDecodeErrorZ.swift */; }; - 07344E522642882B001CD90E /* Result_AnnouncementSignaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D1B2642882A001CD90E /* Result_AnnouncementSignaturesDecodeErrorZ.swift */; }; - 07344E532642882B001CD90E /* Result_StringErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D1C2642882A001CD90E /* Result_StringErrorZ.swift */; }; - 07344E542642882B001CD90E /* Result_StringErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D1C2642882A001CD90E /* Result_StringErrorZ.swift */; }; - 07344E552642882B001CD90E /* Result_HolderCommitmentTransactionDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D1D2642882A001CD90E /* Result_HolderCommitmentTransactionDecodeErrorZ.swift */; }; - 07344E562642882B001CD90E /* Result_HolderCommitmentTransactionDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D1D2642882A001CD90E /* Result_HolderCommitmentTransactionDecodeErrorZ.swift */; }; - 07344E572642882B001CD90E /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D1E2642882A001CD90E /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift */; }; - 07344E582642882B001CD90E /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D1E2642882A001CD90E /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift */; }; - 07344E592642882B001CD90E /* Result_CommitmentSignedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D1F2642882A001CD90E /* Result_CommitmentSignedDecodeErrorZ.swift */; }; - 07344E5A2642882B001CD90E /* Result_CommitmentSignedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D1F2642882A001CD90E /* Result_CommitmentSignedDecodeErrorZ.swift */; }; - 07344E5B2642882B001CD90E /* Result_NonePeerHandleErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D202642882A001CD90E /* Result_NonePeerHandleErrorZ.swift */; }; - 07344E5C2642882B001CD90E /* Result_NonePeerHandleErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D202642882A001CD90E /* Result_NonePeerHandleErrorZ.swift */; }; - 07344E5D2642882B001CD90E /* Result_NoneMonitorUpdateErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D212642882A001CD90E /* Result_NoneMonitorUpdateErrorZ.swift */; }; - 07344E5E2642882B001CD90E /* Result_NoneMonitorUpdateErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D212642882A001CD90E /* Result_NoneMonitorUpdateErrorZ.swift */; }; - 07344E5F2642882B001CD90E /* Result_TxOutAccessErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D222642882A001CD90E /* Result_TxOutAccessErrorZ.swift */; }; - 07344E602642882B001CD90E /* Result_TxOutAccessErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D222642882A001CD90E /* Result_TxOutAccessErrorZ.swift */; }; - 07344E612642882B001CD90E /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D232642882A001CD90E /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift */; }; - 07344E622642882B001CD90E /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D232642882A001CD90E /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift */; }; - 07344E632642882B001CD90E /* Result_NoneLightningErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D242642882A001CD90E /* Result_NoneLightningErrorZ.swift */; }; - 07344E642642882B001CD90E /* Result_NoneLightningErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D242642882A001CD90E /* Result_NoneLightningErrorZ.swift */; }; - 07344E652642882B001CD90E /* Result_NoneAPIErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D252642882A001CD90E /* Result_NoneAPIErrorZ.swift */; }; - 07344E662642882B001CD90E /* Result_NoneAPIErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D252642882A001CD90E /* Result_NoneAPIErrorZ.swift */; }; - 07344E672642882B001CD90E /* Result_PublicKeyErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D262642882A001CD90E /* Result_PublicKeyErrorZ.swift */; }; - 07344E682642882B001CD90E /* Result_PublicKeyErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D262642882A001CD90E /* Result_PublicKeyErrorZ.swift */; }; - 07344E692642882B001CD90E /* Result_boolLightningErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D272642882A001CD90E /* Result_boolLightningErrorZ.swift */; }; - 07344E6A2642882B001CD90E /* Result_boolLightningErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D272642882A001CD90E /* Result_boolLightningErrorZ.swift */; }; - 07344E6B2642882B001CD90E /* Result_ChannelUpdateDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D282642882A001CD90E /* Result_ChannelUpdateDecodeErrorZ.swift */; }; - 07344E6C2642882B001CD90E /* Result_ChannelUpdateDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D282642882A001CD90E /* Result_ChannelUpdateDecodeErrorZ.swift */; }; - 07344E6D2642882B001CD90E /* Result_UpdateFeeDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D292642882A001CD90E /* Result_UpdateFeeDecodeErrorZ.swift */; }; - 07344E6E2642882B001CD90E /* Result_UpdateFeeDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D292642882A001CD90E /* Result_UpdateFeeDecodeErrorZ.swift */; }; - 07344E6F2642882B001CD90E /* Result_DescriptionCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D2A2642882A001CD90E /* Result_DescriptionCreationErrorZ.swift */; }; - 07344E702642882B001CD90E /* Result_DescriptionCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D2A2642882A001CD90E /* Result_DescriptionCreationErrorZ.swift */; }; - 07344E712642882B001CD90E /* Result_CommitmentTransactionDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D2B2642882A001CD90E /* Result_CommitmentTransactionDecodeErrorZ.swift */; }; - 07344E722642882B001CD90E /* Result_CommitmentTransactionDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D2B2642882A001CD90E /* Result_CommitmentTransactionDecodeErrorZ.swift */; }; - 07344E732642882B001CD90E /* Result_SiPrefixNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D2C2642882A001CD90E /* Result_SiPrefixNoneZ.swift */; }; - 07344E742642882B001CD90E /* Result_SiPrefixNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D2C2642882A001CD90E /* Result_SiPrefixNoneZ.swift */; }; - 07344E752642882B001CD90E /* Result_FundingSignedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D2D2642882A001CD90E /* Result_FundingSignedDecodeErrorZ.swift */; }; - 07344E762642882B001CD90E /* Result_FundingSignedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D2D2642882A001CD90E /* Result_FundingSignedDecodeErrorZ.swift */; }; - 07344E772642882B001CD90E /* Result_InvoiceFeaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D2E2642882A001CD90E /* Result_InvoiceFeaturesDecodeErrorZ.swift */; }; - 07344E782642882B001CD90E /* Result_InvoiceFeaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D2E2642882A001CD90E /* Result_InvoiceFeaturesDecodeErrorZ.swift */; }; - 07344E792642882B001CD90E /* Result_TransactionNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D2F2642882A001CD90E /* Result_TransactionNoneZ.swift */; }; - 07344E7A2642882B001CD90E /* Result_TransactionNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D2F2642882A001CD90E /* Result_TransactionNoneZ.swift */; }; - 07344E7B2642882B001CD90E /* Result_NetworkGraphDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D302642882A001CD90E /* Result_NetworkGraphDecodeErrorZ.swift */; }; - 07344E7C2642882B001CD90E /* Result_NetworkGraphDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D302642882A001CD90E /* Result_NetworkGraphDecodeErrorZ.swift */; }; - 07344E7D2642882B001CD90E /* Result_ChannelAnnouncementDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D312642882A001CD90E /* Result_ChannelAnnouncementDecodeErrorZ.swift */; }; - 07344E7E2642882B001CD90E /* Result_ChannelAnnouncementDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D312642882A001CD90E /* Result_ChannelAnnouncementDecodeErrorZ.swift */; }; - 07344E7F2642882B001CD90E /* Result_NoneSemanticErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D322642882A001CD90E /* Result_NoneSemanticErrorZ.swift */; }; - 07344E802642882B001CD90E /* Result_NoneSemanticErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D322642882A001CD90E /* Result_NoneSemanticErrorZ.swift */; }; - 07344E812642882B001CD90E /* Result_InvoiceSignOrCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D332642882A001CD90E /* Result_InvoiceSignOrCreationErrorZ.swift */; }; - 07344E822642882B001CD90E /* Result_InvoiceSignOrCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D332642882A001CD90E /* Result_InvoiceSignOrCreationErrorZ.swift */; }; - 07344E832642882B001CD90E /* Result_InvoiceNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D342642882A001CD90E /* Result_InvoiceNoneZ.swift */; }; - 07344E842642882B001CD90E /* Result_InvoiceNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D342642882A001CD90E /* Result_InvoiceNoneZ.swift */; }; - 07344E852642882B001CD90E /* Result_RoutingFeesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D352642882A001CD90E /* Result_RoutingFeesDecodeErrorZ.swift */; }; - 07344E862642882B001CD90E /* Result_RoutingFeesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D352642882A001CD90E /* Result_RoutingFeesDecodeErrorZ.swift */; }; - 07344E872642882B001CD90E /* Result_ChannelReestablishDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D362642882A001CD90E /* Result_ChannelReestablishDecodeErrorZ.swift */; }; - 07344E882642882B001CD90E /* Result_ChannelReestablishDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D362642882A001CD90E /* Result_ChannelReestablishDecodeErrorZ.swift */; }; - 07344E892642882B001CD90E /* Result_GossipTimestampFilterDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D372642882A001CD90E /* Result_GossipTimestampFilterDecodeErrorZ.swift */; }; - 07344E8A2642882B001CD90E /* Result_GossipTimestampFilterDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D372642882A001CD90E /* Result_GossipTimestampFilterDecodeErrorZ.swift */; }; - 07344E8B2642882B001CD90E /* Result_CVec_CVec_u8ZZNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D382642882A001CD90E /* Result_CVec_CVec_u8ZZNoneZ.swift */; }; - 07344E8C2642882B001CD90E /* Result_CVec_CVec_u8ZZNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D382642882A001CD90E /* Result_CVec_CVec_u8ZZNoneZ.swift */; }; - 07344E8D2642882B001CD90E /* Result_SecretKeyErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D392642882A001CD90E /* Result_SecretKeyErrorZ.swift */; }; - 07344E8E2642882B001CD90E /* Result_SecretKeyErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D392642882A001CD90E /* Result_SecretKeyErrorZ.swift */; }; - 07344E8F2642882B001CD90E /* Result_HTLCUpdateDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D3A2642882A001CD90E /* Result_HTLCUpdateDecodeErrorZ.swift */; }; - 07344E902642882B001CD90E /* Result_HTLCUpdateDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D3A2642882A001CD90E /* Result_HTLCUpdateDecodeErrorZ.swift */; }; - 07344E912642882B001CD90E /* Result_RouteLightningErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D3B2642882A001CD90E /* Result_RouteLightningErrorZ.swift */; }; - 07344E922642882B001CD90E /* Result_RouteLightningErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D3B2642882A001CD90E /* Result_RouteLightningErrorZ.swift */; }; - 07344E932642882B001CD90E /* Result_InvoiceSemanticErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D3C2642882A001CD90E /* Result_InvoiceSemanticErrorZ.swift */; }; - 07344E942642882B001CD90E /* Result_InvoiceSemanticErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D3C2642882A001CD90E /* Result_InvoiceSemanticErrorZ.swift */; }; - 07344E952642882B001CD90E /* Result_SignedRawInvoiceNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D3D2642882A001CD90E /* Result_SignedRawInvoiceNoneZ.swift */; }; - 07344E962642882B001CD90E /* Result_SignedRawInvoiceNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D3D2642882A001CD90E /* Result_SignedRawInvoiceNoneZ.swift */; }; - 07344E972642882B001CD90E /* Result_InitFeaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D3E2642882A001CD90E /* Result_InitFeaturesDecodeErrorZ.swift */; }; - 07344E982642882B001CD90E /* Result_InitFeaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D3E2642882A001CD90E /* Result_InitFeaturesDecodeErrorZ.swift */; }; - 07344E992642882B001CD90E /* Result_RecoverableSignatureNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D3F2642882A001CD90E /* Result_RecoverableSignatureNoneZ.swift */; }; - 07344E9A2642882B001CD90E /* Result_RecoverableSignatureNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D3F2642882A001CD90E /* Result_RecoverableSignatureNoneZ.swift */; }; - 07344E9B2642882B001CD90E /* Result_CVec_SignatureZNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D402642882A001CD90E /* Result_CVec_SignatureZNoneZ.swift */; }; - 07344E9C2642882B001CD90E /* Result_CVec_SignatureZNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D402642882A001CD90E /* Result_CVec_SignatureZNoneZ.swift */; }; - 07344E9D2642882B001CD90E /* Result_ChannelMonitorUpdateDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D412642882A001CD90E /* Result_ChannelMonitorUpdateDecodeErrorZ.swift */; }; - 07344E9E2642882B001CD90E /* Result_ChannelMonitorUpdateDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D412642882A001CD90E /* Result_ChannelMonitorUpdateDecodeErrorZ.swift */; }; - 07344E9F2642882B001CD90E /* Result_SignatureNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D422642882A001CD90E /* Result_SignatureNoneZ.swift */; }; - 07344EA02642882B001CD90E /* Result_SignatureNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D422642882A001CD90E /* Result_SignatureNoneZ.swift */; }; - 07344EA12642882B001CD90E /* Result_NoneErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D432642882A001CD90E /* Result_NoneErrorZ.swift */; }; - 07344EA22642882B001CD90E /* Result_NoneErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D432642882A001CD90E /* Result_NoneErrorZ.swift */; }; - 07344EA32642882B001CD90E /* Result_UpdateAddHTLCDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D442642882A001CD90E /* Result_UpdateAddHTLCDecodeErrorZ.swift */; }; - 07344EA42642882B001CD90E /* Result_UpdateAddHTLCDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D442642882A001CD90E /* Result_UpdateAddHTLCDecodeErrorZ.swift */; }; - 07344EA52642882B001CD90E /* Result_NetAddressu8Z.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D452642882A001CD90E /* Result_NetAddressu8Z.swift */; }; - 07344EA62642882B001CD90E /* Result_NetAddressu8Z.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D452642882A001CD90E /* Result_NetAddressu8Z.swift */; }; - 07344EA72642882B001CD90E /* Result_FundingLockedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D462642882A001CD90E /* Result_FundingLockedDecodeErrorZ.swift */; }; - 07344EA82642882B001CD90E /* Result_FundingLockedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D462642882A001CD90E /* Result_FundingLockedDecodeErrorZ.swift */; }; - 07344EA92642882B001CD90E /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D472642882A001CD90E /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift */; }; - 07344EAA2642882B001CD90E /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D472642882A001CD90E /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift */; }; - 07344EAB2642882B001CD90E /* Result_QueryShortChannelIdsDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D482642882A001CD90E /* Result_QueryShortChannelIdsDecodeErrorZ.swift */; }; - 07344EAC2642882B001CD90E /* Result_QueryShortChannelIdsDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D482642882A001CD90E /* Result_QueryShortChannelIdsDecodeErrorZ.swift */; }; - 07344EAD2642882B001CD90E /* Result_SignDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D492642882A001CD90E /* Result_SignDecodeErrorZ.swift */; }; - 07344EAE2642882B001CD90E /* Result_SignDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D492642882A001CD90E /* Result_SignDecodeErrorZ.swift */; }; - 07344EAF2642882B001CD90E /* Result_boolPeerHandleErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D4A2642882A001CD90E /* Result_boolPeerHandleErrorZ.swift */; }; - 07344EB02642882B001CD90E /* Result_boolPeerHandleErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D4A2642882A001CD90E /* Result_boolPeerHandleErrorZ.swift */; }; - 07344EB12642882B001CD90E /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D4B2642882A001CD90E /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift */; }; - 07344EB22642882B001CD90E /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D4B2642882A001CD90E /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift */; }; - 07344EB32642882B001CD90E /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D4C2642882A001CD90E /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift */; }; - 07344EB42642882B001CD90E /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D4C2642882A001CD90E /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift */; }; - 07344EB52642882B001CD90E /* Result_ReplyChannelRangeDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D4D2642882A001CD90E /* Result_ReplyChannelRangeDecodeErrorZ.swift */; }; - 07344EB62642882B001CD90E /* Result_ReplyChannelRangeDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D4D2642882A001CD90E /* Result_ReplyChannelRangeDecodeErrorZ.swift */; }; - 07344EB72642882B001CD90E /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D4E2642882A001CD90E /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift */; }; - 07344EB82642882B001CD90E /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D4E2642882A001CD90E /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift */; }; - 07344EB92642882B001CD90E /* Result_UpdateFailHTLCDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D4F2642882A001CD90E /* Result_UpdateFailHTLCDecodeErrorZ.swift */; }; - 07344EBA2642882B001CD90E /* Result_UpdateFailHTLCDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D4F2642882A001CD90E /* Result_UpdateFailHTLCDecodeErrorZ.swift */; }; - 07344EBB2642882B001CD90E /* Result_TxCreationKeysDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D502642882A001CD90E /* Result_TxCreationKeysDecodeErrorZ.swift */; }; - 07344EBC2642882B001CD90E /* Result_TxCreationKeysDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D502642882A001CD90E /* Result_TxCreationKeysDecodeErrorZ.swift */; }; - 07344EBD2642882B001CD90E /* Result_PositiveTimestampCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D512642882A001CD90E /* Result_PositiveTimestampCreationErrorZ.swift */; }; - 07344EBE2642882B001CD90E /* Result_PositiveTimestampCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D512642882A001CD90E /* Result_PositiveTimestampCreationErrorZ.swift */; }; - 07344EBF2642882B001CD90E /* Result_OutPointDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D522642882A001CD90E /* Result_OutPointDecodeErrorZ.swift */; }; - 07344EC02642882B001CD90E /* Result_OutPointDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D522642882A001CD90E /* Result_OutPointDecodeErrorZ.swift */; }; - 07344EC12642882B001CD90E /* Result_NodeAnnouncementDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D532642882A001CD90E /* Result_NodeAnnouncementDecodeErrorZ.swift */; }; - 07344EC22642882B001CD90E /* Result_NodeAnnouncementDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D532642882A001CD90E /* Result_NodeAnnouncementDecodeErrorZ.swift */; }; - 07344EC32642882B001CD90E /* Result_PayeePubKeyErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D542642882A001CD90E /* Result_PayeePubKeyErrorZ.swift */; }; - 07344EC42642882B001CD90E /* Result_PayeePubKeyErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D542642882A001CD90E /* Result_PayeePubKeyErrorZ.swift */; }; - 07344EC52642882B001CD90E /* Result_ShutdownDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D552642882A001CD90E /* Result_ShutdownDecodeErrorZ.swift */; }; - 07344EC62642882B001CD90E /* Result_ShutdownDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D552642882A001CD90E /* Result_ShutdownDecodeErrorZ.swift */; }; - 07344EC72642882B001CD90E /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D562642882A001CD90E /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift */; }; - 07344EC82642882B001CD90E /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D562642882A001CD90E /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift */; }; - 07344EC92642882B001CD90E /* Result_NodeAnnouncementInfoDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D572642882A001CD90E /* Result_NodeAnnouncementInfoDecodeErrorZ.swift */; }; - 07344ECA2642882B001CD90E /* Result_NodeAnnouncementInfoDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D572642882A001CD90E /* Result_NodeAnnouncementInfoDecodeErrorZ.swift */; }; - 07344ECB2642882B001CD90E /* Result_NodeInfoDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D582642882A001CD90E /* Result_NodeInfoDecodeErrorZ.swift */; }; - 07344ECC2642882B001CD90E /* Result_NodeInfoDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D582642882A001CD90E /* Result_NodeInfoDecodeErrorZ.swift */; }; - 07344ECD2642882B001CD90E /* Result_ExpiryTimeCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D592642882A001CD90E /* Result_ExpiryTimeCreationErrorZ.swift */; }; - 07344ECE2642882B001CD90E /* Result_ExpiryTimeCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D592642882A001CD90E /* Result_ExpiryTimeCreationErrorZ.swift */; }; - 07344ECF2642882B001CD90E /* Result_ChannelFeaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D5A2642882A001CD90E /* Result_ChannelFeaturesDecodeErrorZ.swift */; }; - 07344ED02642882B001CD90E /* Result_ChannelFeaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D5A2642882A001CD90E /* Result_ChannelFeaturesDecodeErrorZ.swift */; }; - 07344ED12642882B001CD90E /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D5B2642882A001CD90E /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift */; }; - 07344ED22642882B001CD90E /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D5B2642882A001CD90E /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift */; }; - 07344ED32642882B001CD90E /* Result_InitDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D5C2642882A001CD90E /* Result_InitDecodeErrorZ.swift */; }; - 07344ED42642882B001CD90E /* Result_InitDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D5C2642882A001CD90E /* Result_InitDecodeErrorZ.swift */; }; - 07344ED52642882B001CD90E /* Result_NoneChannelMonitorUpdateErrZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D5D2642882A001CD90E /* Result_NoneChannelMonitorUpdateErrZ.swift */; }; - 07344ED62642882B001CD90E /* Result_NoneChannelMonitorUpdateErrZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D5D2642882A001CD90E /* Result_NoneChannelMonitorUpdateErrZ.swift */; }; - 07344ED72642882B001CD90E /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D5E2642882A001CD90E /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift */; }; - 07344ED82642882B001CD90E /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D5E2642882A001CD90E /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift */; }; - 07344ED92642882B001CD90E /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D5F2642882A001CD90E /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift */; }; - 07344EDA2642882B001CD90E /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D5F2642882A001CD90E /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift */; }; - 07344EDB2642882B001CD90E /* Result_ClosingSignedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D602642882A001CD90E /* Result_ClosingSignedDecodeErrorZ.swift */; }; - 07344EDC2642882B001CD90E /* Result_ClosingSignedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D602642882A001CD90E /* Result_ClosingSignedDecodeErrorZ.swift */; }; - 07344EDD2642882B001CD90E /* Result_InMemorySignerDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D612642882A001CD90E /* Result_InMemorySignerDecodeErrorZ.swift */; }; - 07344EDE2642882B001CD90E /* Result_InMemorySignerDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D612642882A001CD90E /* Result_InMemorySignerDecodeErrorZ.swift */; }; - 07344EDF2642882B001CD90E /* MessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D632642882A001CD90E /* MessageHandler.swift */; }; - 07344EE02642882B001CD90E /* MessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D632642882A001CD90E /* MessageHandler.swift */; }; - 07344EE12642882B001CD90E /* ChainMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D642642882A001CD90E /* ChainMonitor.swift */; }; - 07344EE22642882B001CD90E /* ChainMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D642642882A001CD90E /* ChainMonitor.swift */; }; - 07344EE32642882B001CD90E /* PayeePubKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D652642882A001CD90E /* PayeePubKey.swift */; }; - 07344EE42642882B001CD90E /* PayeePubKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D652642882A001CD90E /* PayeePubKey.swift */; }; - 07344EE52642882B001CD90E /* MonitorUpdateError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D662642882A001CD90E /* MonitorUpdateError.swift */; }; - 07344EE62642882B001CD90E /* MonitorUpdateError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D662642882A001CD90E /* MonitorUpdateError.swift */; }; - 07344EE72642882B001CD90E /* Description.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D672642882A001CD90E /* Description.swift */; }; - 07344EE82642882B001CD90E /* Description.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D672642882A001CD90E /* Description.swift */; }; - 07344EE92642882B001CD90E /* LockedNetworkGraph.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D682642882A001CD90E /* LockedNetworkGraph.swift */; }; - 07344EEA2642882B001CD90E /* LockedNetworkGraph.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D682642882A001CD90E /* LockedNetworkGraph.swift */; }; - 07344EEB2642882B001CD90E /* RevokeAndACK.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D692642882A001CD90E /* RevokeAndACK.swift */; }; - 07344EEC2642882B001CD90E /* RevokeAndACK.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D692642882A001CD90E /* RevokeAndACK.swift */; }; - 07344EED2642882B001CD90E /* Ping.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D6A2642882A001CD90E /* Ping.swift */; }; - 07344EEE2642882C001CD90E /* Ping.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D6A2642882A001CD90E /* Ping.swift */; }; - 07344EEF2642882C001CD90E /* PositiveTimestamp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D6B2642882A001CD90E /* PositiveTimestamp.swift */; }; - 07344EF02642882C001CD90E /* PositiveTimestamp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D6B2642882A001CD90E /* PositiveTimestamp.swift */; }; - 07344EF12642882C001CD90E /* UpdateAddHTLC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D6C2642882A001CD90E /* UpdateAddHTLC.swift */; }; - 07344EF22642882C001CD90E /* UpdateAddHTLC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D6C2642882A001CD90E /* UpdateAddHTLC.swift */; }; - 07344EF32642882C001CD90E /* UpdateFailMalformedHTLC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D6D2642882A001CD90E /* UpdateFailMalformedHTLC.swift */; }; - 07344EF42642882C001CD90E /* UpdateFailMalformedHTLC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D6D2642882A001CD90E /* UpdateFailMalformedHTLC.swift */; }; - 07344EF52642882C001CD90E /* ChannelMonitorUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D6E2642882A001CD90E /* ChannelMonitorUpdate.swift */; }; - 07344EF62642882C001CD90E /* ChannelMonitorUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D6E2642882A001CD90E /* ChannelMonitorUpdate.swift */; }; - 07344EF72642882C001CD90E /* RouteHint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D6F2642882A001CD90E /* RouteHint.swift */; }; - 07344EF82642882C001CD90E /* RouteHint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D6F2642882A001CD90E /* RouteHint.swift */; }; - 07344EF92642882C001CD90E /* Sha256.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D702642882A001CD90E /* Sha256.swift */; }; - 07344EFA2642882C001CD90E /* Sha256.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D702642882A001CD90E /* Sha256.swift */; }; - 07344EFB2642882C001CD90E /* HTLCOutputInCommitment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D712642882A001CD90E /* HTLCOutputInCommitment.swift */; }; - 07344EFC2642882C001CD90E /* HTLCOutputInCommitment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D712642882A001CD90E /* HTLCOutputInCommitment.swift */; }; - 07344EFD2642882C001CD90E /* ChannelReestablish.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D722642882A001CD90E /* ChannelReestablish.swift */; }; - 07344EFE2642882C001CD90E /* ChannelReestablish.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D722642882A001CD90E /* ChannelReestablish.swift */; }; - 07344EFF2642882C001CD90E /* RouteHintHop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D732642882A001CD90E /* RouteHintHop.swift */; }; - 07344F002642882C001CD90E /* RouteHintHop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D732642882A001CD90E /* RouteHintHop.swift */; }; - 07344F012642882C001CD90E /* ChannelManagerReadArgs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D742642882A001CD90E /* ChannelManagerReadArgs.swift */; }; - 07344F022642882C001CD90E /* ChannelManagerReadArgs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D742642882A001CD90E /* ChannelManagerReadArgs.swift */; }; - 07344F032642882C001CD90E /* UpdateFulfillHTLC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D752642882A001CD90E /* UpdateFulfillHTLC.swift */; }; - 07344F042642882C001CD90E /* UpdateFulfillHTLC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D752642882A001CD90E /* UpdateFulfillHTLC.swift */; }; - 07344F052642882C001CD90E /* NodeFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D762642882A001CD90E /* NodeFeatures.swift */; }; - 07344F062642882C001CD90E /* NodeFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D762642882A001CD90E /* NodeFeatures.swift */; }; - 07344F072642882C001CD90E /* NetGraphMsgHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D772642882A001CD90E /* NetGraphMsgHandler.swift */; }; - 07344F082642882C001CD90E /* NetGraphMsgHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D772642882A001CD90E /* NetGraphMsgHandler.swift */; }; - 07344F092642882C001CD90E /* InvoiceFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D782642882A001CD90E /* InvoiceFeatures.swift */; }; - 07344F0A2642882C001CD90E /* InvoiceFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D782642882A001CD90E /* InvoiceFeatures.swift */; }; - 07344F0B2642882C001CD90E /* Invoice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D792642882A001CD90E /* Invoice.swift */; }; - 07344F0C2642882C001CD90E /* Invoice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D792642882A001CD90E /* Invoice.swift */; }; - 07344F0D2642882C001CD90E /* RoutingFees.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D7A2642882A001CD90E /* RoutingFees.swift */; }; - 07344F0E2642882C001CD90E /* RoutingFees.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D7A2642882A001CD90E /* RoutingFees.swift */; }; - 07344F0F2642882C001CD90E /* ChannelMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D7B2642882A001CD90E /* ChannelMonitor.swift */; }; - 07344F102642882C001CD90E /* ChannelMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D7B2642882A001CD90E /* ChannelMonitor.swift */; }; - 07344F112642882C001CD90E /* BestBlock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D7C2642882A001CD90E /* BestBlock.swift */; }; - 07344F122642882C001CD90E /* BestBlock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D7C2642882A001CD90E /* BestBlock.swift */; }; - 07344F132642882C001CD90E /* UpdateFee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D7D2642882A001CD90E /* UpdateFee.swift */; }; - 07344F142642882C001CD90E /* UpdateFee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D7D2642882A001CD90E /* UpdateFee.swift */; }; - 07344F152642882C001CD90E /* UnsignedChannelUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D7E2642882A001CD90E /* UnsignedChannelUpdate.swift */; }; - 07344F162642882C001CD90E /* UnsignedChannelUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D7E2642882A001CD90E /* UnsignedChannelUpdate.swift */; }; - 07344F172642882C001CD90E /* QueryShortChannelIds.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D7F2642882A001CD90E /* QueryShortChannelIds.swift */; }; - 07344F182642882C001CD90E /* QueryShortChannelIds.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D7F2642882A001CD90E /* QueryShortChannelIds.swift */; }; - 07344F192642882C001CD90E /* NetworkGraph.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D802642882A001CD90E /* NetworkGraph.swift */; }; - 07344F1A2642882C001CD90E /* NetworkGraph.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D802642882A001CD90E /* NetworkGraph.swift */; }; - 07344F1B2642882C001CD90E /* CommitmentTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D812642882A001CD90E /* CommitmentTransaction.swift */; }; - 07344F1C2642882C001CD90E /* CommitmentTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D812642882A001CD90E /* CommitmentTransaction.swift */; }; - 07344F1D2642882C001CD90E /* KeysManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D822642882A001CD90E /* KeysManager.swift */; }; - 07344F1E2642882C001CD90E /* KeysManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D822642882A001CD90E /* KeysManager.swift */; }; - 07344F1F2642882C001CD90E /* FundingCreated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D832642882A001CD90E /* FundingCreated.swift */; }; - 07344F202642882C001CD90E /* FundingCreated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D832642882A001CD90E /* FundingCreated.swift */; }; - 07344F212642882C001CD90E /* CounterpartyChannelTransactionParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D842642882A001CD90E /* CounterpartyChannelTransactionParameters.swift */; }; - 07344F222642882C001CD90E /* CounterpartyChannelTransactionParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D842642882A001CD90E /* CounterpartyChannelTransactionParameters.swift */; }; - 07344F232642882C001CD90E /* ChannelAnnouncement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D852642882A001CD90E /* ChannelAnnouncement.swift */; }; - 07344F242642882C001CD90E /* ChannelAnnouncement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D852642882A001CD90E /* ChannelAnnouncement.swift */; }; - 07344F252642882C001CD90E /* ReplyShortChannelIdsEnd.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D862642882A001CD90E /* ReplyShortChannelIdsEnd.swift */; }; - 07344F262642882C001CD90E /* ReplyShortChannelIdsEnd.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D862642882A001CD90E /* ReplyShortChannelIdsEnd.swift */; }; - 07344F272642882C001CD90E /* IgnoringMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D872642882A001CD90E /* IgnoringMessageHandler.swift */; }; - 07344F282642882C001CD90E /* IgnoringMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D872642882A001CD90E /* IgnoringMessageHandler.swift */; }; - 07344F292642882C001CD90E /* PeerManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D882642882A001CD90E /* PeerManager.swift */; }; - 07344F2A2642882C001CD90E /* PeerManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D882642882A001CD90E /* PeerManager.swift */; }; - 07344F2B2642882C001CD90E /* UpdateFailHTLC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D892642882A001CD90E /* UpdateFailHTLC.swift */; }; - 07344F2C2642882C001CD90E /* UpdateFailHTLC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D892642882A001CD90E /* UpdateFailHTLC.swift */; }; - 07344F2D2642882C001CD90E /* FundingLocked.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D8A2642882A001CD90E /* FundingLocked.swift */; }; - 07344F2E2642882C001CD90E /* FundingLocked.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D8A2642882A001CD90E /* FundingLocked.swift */; }; - 07344F2F2642882C001CD90E /* StaticPaymentOutputDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D8B2642882A001CD90E /* StaticPaymentOutputDescriptor.swift */; }; - 07344F302642882C001CD90E /* StaticPaymentOutputDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D8B2642882A001CD90E /* StaticPaymentOutputDescriptor.swift */; }; - 07344F312642882C001CD90E /* HTLCUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D8C2642882A001CD90E /* HTLCUpdate.swift */; }; - 07344F322642882C001CD90E /* HTLCUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D8C2642882A001CD90E /* HTLCUpdate.swift */; }; - 07344F332642882C001CD90E /* InMemorySigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D8D2642882A001CD90E /* InMemorySigner.swift */; }; - 07344F342642882C001CD90E /* InMemorySigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D8D2642882A001CD90E /* InMemorySigner.swift */; }; - 07344F352642882C001CD90E /* GossipTimestampFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D8E2642882A001CD90E /* GossipTimestampFilter.swift */; }; - 07344F362642882C001CD90E /* GossipTimestampFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D8E2642882A001CD90E /* GossipTimestampFilter.swift */; }; - 07344F372642882C001CD90E /* PeerHandleError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D8F2642882A001CD90E /* PeerHandleError.swift */; }; - 07344F382642882C001CD90E /* PeerHandleError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D8F2642882A001CD90E /* PeerHandleError.swift */; }; - 07344F392642882C001CD90E /* ErroringMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D902642882A001CD90E /* ErroringMessageHandler.swift */; }; - 07344F3A2642882C001CD90E /* ErroringMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D902642882A001CD90E /* ErroringMessageHandler.swift */; }; - 07344F3B2642882C001CD90E /* CommitmentSigned.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D912642882A001CD90E /* CommitmentSigned.swift */; }; - 07344F3C2642882C001CD90E /* CommitmentSigned.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D912642882A001CD90E /* CommitmentSigned.swift */; }; - 07344F3D2642882C001CD90E /* TxCreationKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D922642882A001CD90E /* TxCreationKeys.swift */; }; - 07344F3E2642882C001CD90E /* TxCreationKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D922642882A001CD90E /* TxCreationKeys.swift */; }; - 07344F3F2642882C001CD90E /* RawInvoice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D932642882A001CD90E /* RawInvoice.swift */; }; - 07344F402642882C001CD90E /* RawInvoice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D932642882A001CD90E /* RawInvoice.swift */; }; - 07344F412642882C001CD90E /* Pong.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D942642882A001CD90E /* Pong.swift */; }; - 07344F422642882C001CD90E /* Pong.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D942642882A001CD90E /* Pong.swift */; }; - 07344F432642882C001CD90E /* ExpiryTime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D952642882A001CD90E /* ExpiryTime.swift */; }; - 07344F442642882C001CD90E /* ExpiryTime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D952642882A001CD90E /* ExpiryTime.swift */; }; - 07344F452642882C001CD90E /* ChannelConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D962642882A001CD90E /* ChannelConfig.swift */; }; - 07344F462642882C001CD90E /* ChannelConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D962642882A001CD90E /* ChannelConfig.swift */; }; - 07344F472642882C001CD90E /* DecodeError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D972642882A001CD90E /* DecodeError.swift */; }; - 07344F482642882C001CD90E /* DecodeError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D972642882A001CD90E /* DecodeError.swift */; }; - 07344F492642882C001CD90E /* QueryChannelRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D982642882A001CD90E /* QueryChannelRange.swift */; }; - 07344F4A2642882C001CD90E /* QueryChannelRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D982642882A001CD90E /* QueryChannelRange.swift */; }; - 07344F4B2642882C001CD90E /* HolderCommitmentTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D992642882A001CD90E /* HolderCommitmentTransaction.swift */; }; - 07344F4C2642882C001CD90E /* HolderCommitmentTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D992642882A001CD90E /* HolderCommitmentTransaction.swift */; }; - 07344F4D2642882C001CD90E /* ChannelTransactionParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D9A2642882A001CD90E /* ChannelTransactionParameters.swift */; }; - 07344F4E2642882C001CD90E /* ChannelTransactionParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D9A2642882A001CD90E /* ChannelTransactionParameters.swift */; }; - 07344F4F2642882C001CD90E /* NodeInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D9B2642882A001CD90E /* NodeInfo.swift */; }; - 07344F502642882C001CD90E /* NodeInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D9B2642882A001CD90E /* NodeInfo.swift */; }; - 07344F512642882C001CD90E /* DirectedChannelTransactionParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D9C2642882A001CD90E /* DirectedChannelTransactionParameters.swift */; }; - 07344F522642882C001CD90E /* DirectedChannelTransactionParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D9C2642882A001CD90E /* DirectedChannelTransactionParameters.swift */; }; - 07344F532642882C001CD90E /* ChannelHandshakeConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D9D2642882A001CD90E /* ChannelHandshakeConfig.swift */; }; - 07344F542642882C001CD90E /* ChannelHandshakeConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D9D2642882A001CD90E /* ChannelHandshakeConfig.swift */; }; - 07344F552642882C001CD90E /* ChannelManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D9E2642882A001CD90E /* ChannelManager.swift */; }; - 07344F562642882C001CD90E /* ChannelManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D9E2642882A001CD90E /* ChannelManager.swift */; }; - 07344F572642882C001CD90E /* Shutdown.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D9F2642882A001CD90E /* Shutdown.swift */; }; - 07344F582642882C001CD90E /* Shutdown.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344D9F2642882A001CD90E /* Shutdown.swift */; }; - 07344F592642882C001CD90E /* ChainParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA02642882A001CD90E /* ChainParameters.swift */; }; - 07344F5A2642882C001CD90E /* ChainParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA02642882A001CD90E /* ChainParameters.swift */; }; - 07344F5B2642882C001CD90E /* AcceptChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA12642882A001CD90E /* AcceptChannel.swift */; }; - 07344F5C2642882C001CD90E /* AcceptChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA12642882A001CD90E /* AcceptChannel.swift */; }; - 07344F5D2642882C001CD90E /* FilesystemPersister.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA22642882A001CD90E /* FilesystemPersister.swift */; }; - 07344F5E2642882C001CD90E /* FilesystemPersister.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA22642882A001CD90E /* FilesystemPersister.swift */; }; - 07344F5F2642882C001CD90E /* ChannelHandshakeLimits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA32642882A001CD90E /* ChannelHandshakeLimits.swift */; }; - 07344F602642882C001CD90E /* ChannelHandshakeLimits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA32642882A001CD90E /* ChannelHandshakeLimits.swift */; }; - 07344F612642882C001CD90E /* AnnouncementSignatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA42642882A001CD90E /* AnnouncementSignatures.swift */; }; - 07344F622642882C001CD90E /* AnnouncementSignatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA42642882A001CD90E /* AnnouncementSignatures.swift */; }; - 07344F632642882C001CD90E /* CommitmentUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA52642882A001CD90E /* CommitmentUpdate.swift */; }; - 07344F642642882C001CD90E /* CommitmentUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA52642882A001CD90E /* CommitmentUpdate.swift */; }; - 07344F652642882C001CD90E /* ClosingSigned.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA62642882A001CD90E /* ClosingSigned.swift */; }; - 07344F662642882C001CD90E /* ClosingSigned.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA62642882A001CD90E /* ClosingSigned.swift */; }; - 07344F672642882C001CD90E /* DirectionalChannelInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA72642882A001CD90E /* DirectionalChannelInfo.swift */; }; - 07344F682642882C001CD90E /* DirectionalChannelInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA72642882A001CD90E /* DirectionalChannelInfo.swift */; }; - 07344F692642882C001CD90E /* ChannelDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA82642882A001CD90E /* ChannelDetails.swift */; }; - 07344F6A2642882C001CD90E /* ChannelDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA82642882A001CD90E /* ChannelDetails.swift */; }; - 07344F6B2642882C001CD90E /* NodeAnnouncementInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA92642882A001CD90E /* NodeAnnouncementInfo.swift */; }; - 07344F6C2642882C001CD90E /* NodeAnnouncementInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DA92642882A001CD90E /* NodeAnnouncementInfo.swift */; }; - 07344F6D2642882C001CD90E /* UnsignedChannelAnnouncement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DAA2642882A001CD90E /* UnsignedChannelAnnouncement.swift */; }; - 07344F6E2642882C001CD90E /* UnsignedChannelAnnouncement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DAA2642882A001CD90E /* UnsignedChannelAnnouncement.swift */; }; - 07344F6F2642882C001CD90E /* LightningError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DAB2642882A001CD90E /* LightningError.swift */; }; - 07344F702642882C001CD90E /* LightningError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DAB2642882A001CD90E /* LightningError.swift */; }; - 07344F712642882C001CD90E /* MinFinalCltvExpiry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DAC2642882A001CD90E /* MinFinalCltvExpiry.swift */; }; - 07344F722642882C001CD90E /* MinFinalCltvExpiry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DAC2642882A001CD90E /* MinFinalCltvExpiry.swift */; }; - 07344F732642882C001CD90E /* DataLossProtect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DAD2642882B001CD90E /* DataLossProtect.swift */; }; - 07344F742642882C001CD90E /* DataLossProtect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DAD2642882B001CD90E /* DataLossProtect.swift */; }; - 07344F752642882C001CD90E /* ErrorMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DAE2642882B001CD90E /* ErrorMessage.swift */; }; - 07344F762642882C001CD90E /* ErrorMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DAE2642882B001CD90E /* ErrorMessage.swift */; }; - 07344F772642882C001CD90E /* RouteHop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DAF2642882B001CD90E /* RouteHop.swift */; }; - 07344F782642882C001CD90E /* RouteHop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DAF2642882B001CD90E /* RouteHop.swift */; }; - 07344F792642882C001CD90E /* WatchedOutput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB02642882B001CD90E /* WatchedOutput.swift */; }; - 07344F7A2642882C001CD90E /* WatchedOutput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB02642882B001CD90E /* WatchedOutput.swift */; }; - 07344F7B2642882C001CD90E /* ChannelUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB12642882B001CD90E /* ChannelUpdate.swift */; }; - 07344F7C2642882C001CD90E /* ChannelUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB12642882B001CD90E /* ChannelUpdate.swift */; }; - 07344F7D2642882C001CD90E /* ReplyChannelRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB22642882B001CD90E /* ReplyChannelRange.swift */; }; - 07344F7E2642882C001CD90E /* ReplyChannelRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB22642882B001CD90E /* ReplyChannelRange.swift */; }; - 07344F7F2642882C001CD90E /* InitFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB32642882B001CD90E /* InitFeatures.swift */; }; - 07344F802642882C001CD90E /* InitFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB32642882B001CD90E /* InitFeatures.swift */; }; - 07344F812642882C001CD90E /* NodeAnnouncement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB42642882B001CD90E /* NodeAnnouncement.swift */; }; - 07344F822642882C001CD90E /* NodeAnnouncement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB42642882B001CD90E /* NodeAnnouncement.swift */; }; - 07344F832642882C001CD90E /* RawDataPart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB52642882B001CD90E /* RawDataPart.swift */; }; - 07344F842642882C001CD90E /* RawDataPart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB52642882B001CD90E /* RawDataPart.swift */; }; - 07344F852642882C001CD90E /* ChannelPublicKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB62642882B001CD90E /* ChannelPublicKeys.swift */; }; - 07344F862642882C001CD90E /* ChannelPublicKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB62642882B001CD90E /* ChannelPublicKeys.swift */; }; - 07344F872642882C001CD90E /* ChannelInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB72642882B001CD90E /* ChannelInfo.swift */; }; - 07344F882642882C001CD90E /* ChannelInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB72642882B001CD90E /* ChannelInfo.swift */; }; - 07344F892642882C001CD90E /* InvoiceSignature.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB82642882B001CD90E /* InvoiceSignature.swift */; }; - 07344F8A2642882C001CD90E /* InvoiceSignature.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB82642882B001CD90E /* InvoiceSignature.swift */; }; - 07344F8B2642882C001CD90E /* OpenChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB92642882B001CD90E /* OpenChannel.swift */; }; - 07344F8C2642882C001CD90E /* OpenChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DB92642882B001CD90E /* OpenChannel.swift */; }; - 07344F8D2642882C001CD90E /* FundingSigned.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DBA2642882B001CD90E /* FundingSigned.swift */; }; - 07344F8E2642882C001CD90E /* FundingSigned.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DBA2642882B001CD90E /* FundingSigned.swift */; }; - 07344F8F2642882C001CD90E /* SignedRawInvoice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DBB2642882B001CD90E /* SignedRawInvoice.swift */; }; - 07344F902642882C001CD90E /* SignedRawInvoice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DBB2642882B001CD90E /* SignedRawInvoice.swift */; }; - 07344F912642882C001CD90E /* Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DBC2642882B001CD90E /* Init.swift */; }; - 07344F922642882C001CD90E /* Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DBC2642882B001CD90E /* Init.swift */; }; - 07344F932642882C001CD90E /* UnsignedNodeAnnouncement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DBD2642882B001CD90E /* UnsignedNodeAnnouncement.swift */; }; - 07344F942642882C001CD90E /* UnsignedNodeAnnouncement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DBD2642882B001CD90E /* UnsignedNodeAnnouncement.swift */; }; - 07344F952642882C001CD90E /* TrustedCommitmentTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DBE2642882B001CD90E /* TrustedCommitmentTransaction.swift */; }; - 07344F962642882C001CD90E /* TrustedCommitmentTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DBE2642882B001CD90E /* TrustedCommitmentTransaction.swift */; }; - 07344F972642882C001CD90E /* ChannelFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DBF2642882B001CD90E /* ChannelFeatures.swift */; }; - 07344F982642882C001CD90E /* ChannelFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DBF2642882B001CD90E /* ChannelFeatures.swift */; }; - 07344F992642882C001CD90E /* BuiltCommitmentTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DC02642882B001CD90E /* BuiltCommitmentTransaction.swift */; }; - 07344F9A2642882C001CD90E /* BuiltCommitmentTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DC02642882B001CD90E /* BuiltCommitmentTransaction.swift */; }; - 07344F9B2642882C001CD90E /* UserConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DC12642882B001CD90E /* UserConfig.swift */; }; - 07344F9C2642882C001CD90E /* UserConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DC12642882B001CD90E /* UserConfig.swift */; }; - 07344F9D2642882C001CD90E /* Route.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DC22642882B001CD90E /* Route.swift */; }; - 07344F9E2642882C001CD90E /* Route.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DC22642882B001CD90E /* Route.swift */; }; - 07344F9F2642882C001CD90E /* OutPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DC32642882B001CD90E /* OutPoint.swift */; }; - 07344FA02642882C001CD90E /* OutPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DC32642882B001CD90E /* OutPoint.swift */; }; - 07344FA12642882C001CD90E /* DelayedPaymentOutputDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DC42642882B001CD90E /* DelayedPaymentOutputDescriptor.swift */; }; - 07344FA22642882C001CD90E /* DelayedPaymentOutputDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07344DC42642882B001CD90E /* DelayedPaymentOutputDescriptor.swift */; }; 07344FE626429524001CD90E /* libldk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 07344FE526429524001CD90E /* libldk.a */; }; 07344FE926429536001CD90E /* libldk.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 07344FE526429524001CD90E /* libldk.a */; }; 0734506026445915001CD90E /* lightning.h in Headers */ = {isa = PBXBuildFile; fileRef = 0734505D26445915001CD90E /* lightning.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -499,6 +21,252 @@ 0749F9C7265615CC00876C52 /* ChannelManagerConstructor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0749F9C4265615CB00876C52 /* ChannelManagerConstructor.swift */; }; 0749F9C8265615CC00876C52 /* UtilMethods.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0749F9C5265615CB00876C52 /* UtilMethods.swift */; }; 0749F9C9265615CC00876C52 /* UtilMethods.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0749F9C5265615CB00876C52 /* UtilMethods.swift */; }; + 07A442C0266ED3EB00B5F16F /* PaymentSendFailure.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441C6266ED3EA00B5F16F /* PaymentSendFailure.swift */; }; + 07A442C1266ED3EB00B5F16F /* Option_u64Z.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441C7266ED3EA00B5F16F /* Option_u64Z.swift */; }; + 07A442C2266ED3EB00B5F16F /* Fallback.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441C8266ED3EA00B5F16F /* Fallback.swift */; }; + 07A442C3266ED3EB00B5F16F /* Option_C2Tuple_usizeTransactionZZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441C9266ED3EA00B5F16F /* Option_C2Tuple_usizeTransactionZZ.swift */; }; + 07A442C4266ED3EB00B5F16F /* APIError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441CA266ED3EA00B5F16F /* APIError.swift */; }; + 07A442C5266ED3EB00B5F16F /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441CB266ED3EA00B5F16F /* Event.swift */; }; + 07A442C6266ED3EB00B5F16F /* HTLCFailChannelUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441CC266ED3EA00B5F16F /* HTLCFailChannelUpdate.swift */; }; + 07A442C7266ED3EB00B5F16F /* ErrorAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441CD266ED3EA00B5F16F /* ErrorAction.swift */; }; + 07A442C8266ED3EB00B5F16F /* Option_u32Z.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441CE266ED3EA00B5F16F /* Option_u32Z.swift */; }; + 07A442C9266ED3EB00B5F16F /* NetAddress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441CF266ED3EA00B5F16F /* NetAddress.swift */; }; + 07A442CA266ED3EB00B5F16F /* SignOrCreationError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441D0266ED3EA00B5F16F /* SignOrCreationError.swift */; }; + 07A442CB266ED3EB00B5F16F /* MessageSendEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441D1266ED3EA00B5F16F /* MessageSendEvent.swift */; }; + 07A442CC266ED3EB00B5F16F /* MonitorEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441D2266ED3EA00B5F16F /* MonitorEvent.swift */; }; + 07A442CD266ED3EB00B5F16F /* SpendableOutputDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441D3266ED3EA00B5F16F /* SpendableOutputDescriptor.swift */; }; + 07A442CE266ED3EB00B5F16F /* BaseSign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441D5266ED3EA00B5F16F /* BaseSign.swift */; }; + 07A442CF266ED3EB00B5F16F /* Persist.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441D6266ED3EA00B5F16F /* Persist.swift */; }; + 07A442D0266ED3EB00B5F16F /* KeysInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441D7266ED3EA00B5F16F /* KeysInterface.swift */; }; + 07A442D1266ED3EB00B5F16F /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441D8266ED3EA00B5F16F /* Logger.swift */; }; + 07A442D2266ED3EB00B5F16F /* SocketDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441D9266ED3EA00B5F16F /* SocketDescriptor.swift */; }; + 07A442D3266ED3EB00B5F16F /* FeeEstimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441DA266ED3EA00B5F16F /* FeeEstimator.swift */; }; + 07A442D4266ED3EB00B5F16F /* MessageSendEventsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441DB266ED3EA00B5F16F /* MessageSendEventsProvider.swift */; }; + 07A442D5266ED3EB00B5F16F /* BroadcasterInterface.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441DC266ED3EA00B5F16F /* BroadcasterInterface.swift */; }; + 07A442D6266ED3EB00B5F16F /* Confirm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441DD266ED3EA00B5F16F /* Confirm.swift */; }; + 07A442D7266ED3EB00B5F16F /* EventHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441DE266ED3EA00B5F16F /* EventHandler.swift */; }; + 07A442D8266ED3EB00B5F16F /* RoutingMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441DF266ED3EA00B5F16F /* RoutingMessageHandler.swift */; }; + 07A442D9266ED3EB00B5F16F /* ChannelManagerPersister.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441E0266ED3EA00B5F16F /* ChannelManagerPersister.swift */; }; + 07A442DA266ED3EB00B5F16F /* Listen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441E1266ED3EA00B5F16F /* Listen.swift */; }; + 07A442DB266ED3EB00B5F16F /* ChannelMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441E2266ED3EA00B5F16F /* ChannelMessageHandler.swift */; }; + 07A442DC266ED3EB00B5F16F /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441E3266ED3EA00B5F16F /* Filter.swift */; }; + 07A442DD266ED3EB00B5F16F /* Access.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441E4266ED3EA00B5F16F /* Access.swift */; }; + 07A442DE266ED3EB00B5F16F /* EventsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441E5266ED3EA00B5F16F /* EventsProvider.swift */; }; + 07A442DF266ED3EB00B5F16F /* Watch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441E6266ED3EA00B5F16F /* Watch.swift */; }; + 07A442E0266ED3EB00B5F16F /* Sign.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441E7266ED3EA00B5F16F /* Sign.swift */; }; + 07A442E1266ED3EB00B5F16F /* C2Tuple_BlockHashChannelMonitorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441E9266ED3EA00B5F16F /* C2Tuple_BlockHashChannelMonitorZ.swift */; }; + 07A442E2266ED3EB00B5F16F /* C2Tuple_SignatureCVec_SignatureZZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441EA266ED3EA00B5F16F /* C2Tuple_SignatureCVec_SignatureZZ.swift */; }; + 07A442E3266ED3EB00B5F16F /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441EB266ED3EA00B5F16F /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift */; }; + 07A442E4266ED3EB00B5F16F /* C2Tuple_BlockHashChannelManagerZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441EC266ED3EA00B5F16F /* C2Tuple_BlockHashChannelManagerZ.swift */; }; + 07A442E5266ED3EB00B5F16F /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441ED266ED3EA00B5F16F /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift */; }; + 07A442E6266ED3EB00B5F16F /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441EE266ED3EA00B5F16F /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift */; }; + 07A442E7266ED3EB00B5F16F /* C2Tuple_PaymentHashPaymentSecretZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441EF266ED3EA00B5F16F /* C2Tuple_PaymentHashPaymentSecretZ.swift */; }; + 07A442E8266ED3EB00B5F16F /* C2Tuple_u32TxOutZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441F0266ED3EA00B5F16F /* C2Tuple_u32TxOutZ.swift */; }; + 07A442E9266ED3EB00B5F16F /* C2Tuple_OutPointScriptZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441F1266ED3EA00B5F16F /* C2Tuple_OutPointScriptZ.swift */; }; + 07A442EA266ED3EB00B5F16F /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441F2266ED3EA00B5F16F /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift */; }; + 07A442EB266ED3EB00B5F16F /* C2Tuple_u32ScriptZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441F3266ED3EA00B5F16F /* C2Tuple_u32ScriptZ.swift */; }; + 07A442EC266ED3EB00B5F16F /* C2Tuple_usizeTransactionZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441F4266ED3EA00B5F16F /* C2Tuple_usizeTransactionZ.swift */; }; + 07A442ED266ED3EB00B5F16F /* Bindings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441F5266ED3EA00B5F16F /* Bindings.swift */; }; + 07A442EE266ED3EB00B5F16F /* Result_ChannelConfigDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441F7266ED3EA00B5F16F /* Result_ChannelConfigDecodeErrorZ.swift */; }; + 07A442EF266ED3EB00B5F16F /* Result_ChannelTransactionParametersDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441F8266ED3EA00B5F16F /* Result_ChannelTransactionParametersDecodeErrorZ.swift */; }; + 07A442F0266ED3EB00B5F16F /* Result_QueryChannelRangeDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441F9266ED3EA00B5F16F /* Result_QueryChannelRangeDecodeErrorZ.swift */; }; + 07A442F1266ED3EB00B5F16F /* Result_FundingCreatedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441FA266ED3EA00B5F16F /* Result_FundingCreatedDecodeErrorZ.swift */; }; + 07A442F2266ED3EB00B5F16F /* Result_TxCreationKeysErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441FB266ED3EA00B5F16F /* Result_TxCreationKeysErrorZ.swift */; }; + 07A442F3266ED3EB00B5F16F /* Result_PingDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441FC266ED3EA00B5F16F /* Result_PingDecodeErrorZ.swift */; }; + 07A442F4266ED3EB00B5F16F /* Result_UpdateFulfillHTLCDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441FD266ED3EA00B5F16F /* Result_UpdateFulfillHTLCDecodeErrorZ.swift */; }; + 07A442F5266ED3EB00B5F16F /* Result_NonePaymentSendFailureZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441FE266ED3EA00B5F16F /* Result_NonePaymentSendFailureZ.swift */; }; + 07A442F6266ED3EB00B5F16F /* Result_CVec_u8ZPeerHandleErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A441FF266ED3EA00B5F16F /* Result_CVec_u8ZPeerHandleErrorZ.swift */; }; + 07A442F7266ED3EB00B5F16F /* Result_StaticPaymentOutputDescriptorDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44200266ED3EA00B5F16F /* Result_StaticPaymentOutputDescriptorDecodeErrorZ.swift */; }; + 07A442F8266ED3EB00B5F16F /* Result_DirectionalChannelInfoDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44201266ED3EA00B5F16F /* Result_DirectionalChannelInfoDecodeErrorZ.swift */; }; + 07A442F9266ED3EB00B5F16F /* Result_RouteDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44202266ED3EA00B5F16F /* Result_RouteDecodeErrorZ.swift */; }; + 07A442FA266ED3EB00B5F16F /* Result_RevokeAndACKDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44203266ED3EA00B5F16F /* Result_RevokeAndACKDecodeErrorZ.swift */; }; + 07A442FB266ED3EB00B5F16F /* Result_OpenChannelDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44204266ED3EA00B5F16F /* Result_OpenChannelDecodeErrorZ.swift */; }; + 07A442FC266ED3EB00B5F16F /* Result_ChannelInfoDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44205266ED3EA00B5F16F /* Result_ChannelInfoDecodeErrorZ.swift */; }; + 07A442FD266ED3EB00B5F16F /* Result_RouteHintCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44206266ED3EA00B5F16F /* Result_RouteHintCreationErrorZ.swift */; }; + 07A442FE266ED3EB00B5F16F /* Result_PongDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44207266ED3EA00B5F16F /* Result_PongDecodeErrorZ.swift */; }; + 07A442FF266ED3EB00B5F16F /* Result_ChannelPublicKeysDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44208266ED3EA00B5F16F /* Result_ChannelPublicKeysDecodeErrorZ.swift */; }; + 07A44300266ED3EB00B5F16F /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44209266ED3EA00B5F16F /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift */; }; + 07A44301266ED3EB00B5F16F /* Result_PaymentSecretAPIErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4420A266ED3EA00B5F16F /* Result_PaymentSecretAPIErrorZ.swift */; }; + 07A44302266ED3EB00B5F16F /* Result_SpendableOutputDescriptorDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4420B266ED3EA00B5F16F /* Result_SpendableOutputDescriptorDecodeErrorZ.swift */; }; + 07A44303266ED3EB00B5F16F /* Result_UnsignedChannelUpdateDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4420C266ED3EA00B5F16F /* Result_UnsignedChannelUpdateDecodeErrorZ.swift */; }; + 07A44304266ED3EB00B5F16F /* Result_ErrorMessageDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4420D266ED3EA00B5F16F /* Result_ErrorMessageDecodeErrorZ.swift */; }; + 07A44305266ED3EB00B5F16F /* Result_AcceptChannelDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4420E266ED3EA00B5F16F /* Result_AcceptChannelDecodeErrorZ.swift */; }; + 07A44306266ED3EB00B5F16F /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4420F266ED3EA00B5F16F /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift */; }; + 07A44307266ED3EB00B5F16F /* Result_NodeFeaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44210266ED3EA00B5F16F /* Result_NodeFeaturesDecodeErrorZ.swift */; }; + 07A44308266ED3EB00B5F16F /* Result_TrustedCommitmentTransactionNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44211266ED3EA00B5F16F /* Result_TrustedCommitmentTransactionNoneZ.swift */; }; + 07A44309266ED3EB00B5F16F /* Result_AnnouncementSignaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44212266ED3EA00B5F16F /* Result_AnnouncementSignaturesDecodeErrorZ.swift */; }; + 07A4430A266ED3EB00B5F16F /* Result_StringErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44213266ED3EA00B5F16F /* Result_StringErrorZ.swift */; }; + 07A4430B266ED3EB00B5F16F /* Result_HolderCommitmentTransactionDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44214266ED3EA00B5F16F /* Result_HolderCommitmentTransactionDecodeErrorZ.swift */; }; + 07A4430C266ED3EB00B5F16F /* Result_RouteHopDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44215266ED3EA00B5F16F /* Result_RouteHopDecodeErrorZ.swift */; }; + 07A4430D266ED3EB00B5F16F /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44216266ED3EA00B5F16F /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift */; }; + 07A4430E266ED3EB00B5F16F /* Result_CommitmentSignedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44217266ED3EA00B5F16F /* Result_CommitmentSignedDecodeErrorZ.swift */; }; + 07A4430F266ED3EB00B5F16F /* Result_NonePeerHandleErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44218266ED3EA00B5F16F /* Result_NonePeerHandleErrorZ.swift */; }; + 07A44310266ED3EB00B5F16F /* Result_NoneMonitorUpdateErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44219266ED3EA00B5F16F /* Result_NoneMonitorUpdateErrorZ.swift */; }; + 07A44311266ED3EB00B5F16F /* Result_TxOutAccessErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4421A266ED3EA00B5F16F /* Result_TxOutAccessErrorZ.swift */; }; + 07A44312266ED3EB00B5F16F /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4421B266ED3EA00B5F16F /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift */; }; + 07A44313266ED3EB00B5F16F /* Result_NoneLightningErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4421C266ED3EA00B5F16F /* Result_NoneLightningErrorZ.swift */; }; + 07A44314266ED3EB00B5F16F /* Result_NoneAPIErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4421D266ED3EA00B5F16F /* Result_NoneAPIErrorZ.swift */; }; + 07A44315266ED3EB00B5F16F /* Result_PublicKeyErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4421E266ED3EA00B5F16F /* Result_PublicKeyErrorZ.swift */; }; + 07A44316266ED3EB00B5F16F /* Result_boolLightningErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4421F266ED3EA00B5F16F /* Result_boolLightningErrorZ.swift */; }; + 07A44317266ED3EB00B5F16F /* Result_ChannelUpdateDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44220266ED3EA00B5F16F /* Result_ChannelUpdateDecodeErrorZ.swift */; }; + 07A44318266ED3EB00B5F16F /* Result_UpdateFeeDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44221266ED3EA00B5F16F /* Result_UpdateFeeDecodeErrorZ.swift */; }; + 07A44319266ED3EB00B5F16F /* Result_DescriptionCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44222266ED3EA00B5F16F /* Result_DescriptionCreationErrorZ.swift */; }; + 07A4431A266ED3EB00B5F16F /* Result_CommitmentTransactionDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44223266ED3EA00B5F16F /* Result_CommitmentTransactionDecodeErrorZ.swift */; }; + 07A4431B266ED3EB00B5F16F /* Result_SiPrefixNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44224266ED3EA00B5F16F /* Result_SiPrefixNoneZ.swift */; }; + 07A4431C266ED3EB00B5F16F /* Result_FundingSignedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44225266ED3EA00B5F16F /* Result_FundingSignedDecodeErrorZ.swift */; }; + 07A4431D266ED3EB00B5F16F /* Result_InvoiceFeaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44226266ED3EA00B5F16F /* Result_InvoiceFeaturesDecodeErrorZ.swift */; }; + 07A4431E266ED3EB00B5F16F /* Result_TransactionNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44227266ED3EA00B5F16F /* Result_TransactionNoneZ.swift */; }; + 07A4431F266ED3EB00B5F16F /* Result_NetworkGraphDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44228266ED3EA00B5F16F /* Result_NetworkGraphDecodeErrorZ.swift */; }; + 07A44320266ED3EB00B5F16F /* Result_ChannelAnnouncementDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44229266ED3EA00B5F16F /* Result_ChannelAnnouncementDecodeErrorZ.swift */; }; + 07A44321266ED3EB00B5F16F /* Result_NoneSemanticErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4422A266ED3EA00B5F16F /* Result_NoneSemanticErrorZ.swift */; }; + 07A44322266ED3EB00B5F16F /* Result_InvoiceSignOrCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4422B266ED3EA00B5F16F /* Result_InvoiceSignOrCreationErrorZ.swift */; }; + 07A44323266ED3EB00B5F16F /* Result_InvoiceNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4422C266ED3EA00B5F16F /* Result_InvoiceNoneZ.swift */; }; + 07A44324266ED3EB00B5F16F /* Result_RoutingFeesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4422D266ED3EA00B5F16F /* Result_RoutingFeesDecodeErrorZ.swift */; }; + 07A44325266ED3EB00B5F16F /* Result_ChannelReestablishDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4422E266ED3EA00B5F16F /* Result_ChannelReestablishDecodeErrorZ.swift */; }; + 07A44326266ED3EB00B5F16F /* Result_GossipTimestampFilterDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4422F266ED3EA00B5F16F /* Result_GossipTimestampFilterDecodeErrorZ.swift */; }; + 07A44327266ED3EB00B5F16F /* Result_CVec_CVec_u8ZZNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44230266ED3EA00B5F16F /* Result_CVec_CVec_u8ZZNoneZ.swift */; }; + 07A44328266ED3EB00B5F16F /* Result_SecretKeyErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44231266ED3EA00B5F16F /* Result_SecretKeyErrorZ.swift */; }; + 07A44329266ED3EB00B5F16F /* Result_HTLCUpdateDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44232266ED3EA00B5F16F /* Result_HTLCUpdateDecodeErrorZ.swift */; }; + 07A4432A266ED3EB00B5F16F /* Result_RouteLightningErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44233266ED3EA00B5F16F /* Result_RouteLightningErrorZ.swift */; }; + 07A4432B266ED3EB00B5F16F /* Result_InvoiceSemanticErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44234266ED3EA00B5F16F /* Result_InvoiceSemanticErrorZ.swift */; }; + 07A4432C266ED3EB00B5F16F /* Result_SignedRawInvoiceNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44235266ED3EA00B5F16F /* Result_SignedRawInvoiceNoneZ.swift */; }; + 07A4432D266ED3EB00B5F16F /* Result_InitFeaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44236266ED3EA00B5F16F /* Result_InitFeaturesDecodeErrorZ.swift */; }; + 07A4432E266ED3EB00B5F16F /* Result_NetAddressDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44237266ED3EA00B5F16F /* Result_NetAddressDecodeErrorZ.swift */; }; + 07A4432F266ED3EB00B5F16F /* Result_RecoverableSignatureNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44238266ED3EA00B5F16F /* Result_RecoverableSignatureNoneZ.swift */; }; + 07A44330266ED3EB00B5F16F /* Result_CVec_SignatureZNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44239266ED3EA00B5F16F /* Result_CVec_SignatureZNoneZ.swift */; }; + 07A44331266ED3EB00B5F16F /* Result_ChannelMonitorUpdateDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4423A266ED3EA00B5F16F /* Result_ChannelMonitorUpdateDecodeErrorZ.swift */; }; + 07A44332266ED3EB00B5F16F /* Result_SignatureNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4423B266ED3EA00B5F16F /* Result_SignatureNoneZ.swift */; }; + 07A44333266ED3EB00B5F16F /* Result_NoneErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4423C266ED3EA00B5F16F /* Result_NoneErrorZ.swift */; }; + 07A44334266ED3EB00B5F16F /* Result_UpdateAddHTLCDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4423D266ED3EA00B5F16F /* Result_UpdateAddHTLCDecodeErrorZ.swift */; }; + 07A44335266ED3EB00B5F16F /* Result_NetAddressu8Z.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4423E266ED3EA00B5F16F /* Result_NetAddressu8Z.swift */; }; + 07A44336266ED3EB00B5F16F /* Result_FundingLockedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4423F266ED3EA00B5F16F /* Result_FundingLockedDecodeErrorZ.swift */; }; + 07A44337266ED3EB00B5F16F /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44240266ED3EA00B5F16F /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift */; }; + 07A44338266ED3EB00B5F16F /* Result_QueryShortChannelIdsDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44241266ED3EA00B5F16F /* Result_QueryShortChannelIdsDecodeErrorZ.swift */; }; + 07A44339266ED3EB00B5F16F /* Result_SignDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44242266ED3EA00B5F16F /* Result_SignDecodeErrorZ.swift */; }; + 07A4433A266ED3EB00B5F16F /* Result_boolPeerHandleErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44243266ED3EA00B5F16F /* Result_boolPeerHandleErrorZ.swift */; }; + 07A4433B266ED3EB00B5F16F /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44244266ED3EA00B5F16F /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift */; }; + 07A4433C266ED3EB00B5F16F /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44245266ED3EA00B5F16F /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift */; }; + 07A4433D266ED3EB00B5F16F /* Result_ReplyChannelRangeDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44246266ED3EA00B5F16F /* Result_ReplyChannelRangeDecodeErrorZ.swift */; }; + 07A4433E266ED3EB00B5F16F /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44247266ED3EA00B5F16F /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift */; }; + 07A4433F266ED3EB00B5F16F /* Result_UpdateFailHTLCDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44248266ED3EA00B5F16F /* Result_UpdateFailHTLCDecodeErrorZ.swift */; }; + 07A44340266ED3EB00B5F16F /* Result_TxCreationKeysDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44249266ED3EA00B5F16F /* Result_TxCreationKeysDecodeErrorZ.swift */; }; + 07A44341266ED3EB00B5F16F /* Result_PositiveTimestampCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4424A266ED3EA00B5F16F /* Result_PositiveTimestampCreationErrorZ.swift */; }; + 07A44342266ED3EB00B5F16F /* Result_OutPointDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4424B266ED3EA00B5F16F /* Result_OutPointDecodeErrorZ.swift */; }; + 07A44343266ED3EB00B5F16F /* Result_NodeAnnouncementDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4424C266ED3EA00B5F16F /* Result_NodeAnnouncementDecodeErrorZ.swift */; }; + 07A44344266ED3EB00B5F16F /* Result_PayeePubKeyErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4424D266ED3EA00B5F16F /* Result_PayeePubKeyErrorZ.swift */; }; + 07A44345266ED3EB00B5F16F /* Result_ShutdownDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4424E266ED3EA00B5F16F /* Result_ShutdownDecodeErrorZ.swift */; }; + 07A44346266ED3EB00B5F16F /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4424F266ED3EA00B5F16F /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift */; }; + 07A44347266ED3EB00B5F16F /* Result_NodeAnnouncementInfoDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44250266ED3EA00B5F16F /* Result_NodeAnnouncementInfoDecodeErrorZ.swift */; }; + 07A44348266ED3EB00B5F16F /* Result_NodeInfoDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44251266ED3EA00B5F16F /* Result_NodeInfoDecodeErrorZ.swift */; }; + 07A44349266ED3EB00B5F16F /* Result_ExpiryTimeCreationErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44252266ED3EA00B5F16F /* Result_ExpiryTimeCreationErrorZ.swift */; }; + 07A4434A266ED3EB00B5F16F /* Result_ChannelFeaturesDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44253266ED3EA00B5F16F /* Result_ChannelFeaturesDecodeErrorZ.swift */; }; + 07A4434B266ED3EB00B5F16F /* Result_DelayedPaymentOutputDescriptorDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44254266ED3EA00B5F16F /* Result_DelayedPaymentOutputDescriptorDecodeErrorZ.swift */; }; + 07A4434C266ED3EB00B5F16F /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44255266ED3EA00B5F16F /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift */; }; + 07A4434D266ED3EB00B5F16F /* Result_InitDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44256266ED3EA00B5F16F /* Result_InitDecodeErrorZ.swift */; }; + 07A4434E266ED3EB00B5F16F /* Result_NoneChannelMonitorUpdateErrZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44257266ED3EA00B5F16F /* Result_NoneChannelMonitorUpdateErrZ.swift */; }; + 07A4434F266ED3EB00B5F16F /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44258266ED3EA00B5F16F /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift */; }; + 07A44350266ED3EB00B5F16F /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44259266ED3EA00B5F16F /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift */; }; + 07A44351266ED3EB00B5F16F /* Result_ClosingSignedDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4425A266ED3EA00B5F16F /* Result_ClosingSignedDecodeErrorZ.swift */; }; + 07A44352266ED3EB00B5F16F /* Result_InMemorySignerDecodeErrorZ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4425B266ED3EA00B5F16F /* Result_InMemorySignerDecodeErrorZ.swift */; }; + 07A44353266ED3EB00B5F16F /* MessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4425D266ED3EA00B5F16F /* MessageHandler.swift */; }; + 07A44354266ED3EB00B5F16F /* ChainMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4425E266ED3EA00B5F16F /* ChainMonitor.swift */; }; + 07A44355266ED3EB00B5F16F /* PayeePubKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4425F266ED3EA00B5F16F /* PayeePubKey.swift */; }; + 07A44356266ED3EB00B5F16F /* MonitorUpdateError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44260266ED3EA00B5F16F /* MonitorUpdateError.swift */; }; + 07A44357266ED3EB00B5F16F /* Description.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44261266ED3EA00B5F16F /* Description.swift */; }; + 07A44358266ED3EB00B5F16F /* LockedNetworkGraph.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44262266ED3EA00B5F16F /* LockedNetworkGraph.swift */; }; + 07A44359266ED3EB00B5F16F /* RevokeAndACK.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44263266ED3EA00B5F16F /* RevokeAndACK.swift */; }; + 07A4435A266ED3EB00B5F16F /* Ping.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44264266ED3EA00B5F16F /* Ping.swift */; }; + 07A4435B266ED3EB00B5F16F /* PositiveTimestamp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44265266ED3EA00B5F16F /* PositiveTimestamp.swift */; }; + 07A4435C266ED3EB00B5F16F /* UpdateAddHTLC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44266266ED3EA00B5F16F /* UpdateAddHTLC.swift */; }; + 07A4435D266ED3EB00B5F16F /* UpdateFailMalformedHTLC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44267266ED3EA00B5F16F /* UpdateFailMalformedHTLC.swift */; }; + 07A4435E266ED3EB00B5F16F /* ChannelMonitorUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44268266ED3EA00B5F16F /* ChannelMonitorUpdate.swift */; }; + 07A4435F266ED3EB00B5F16F /* RouteHint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44269266ED3EA00B5F16F /* RouteHint.swift */; }; + 07A44360266ED3EB00B5F16F /* Sha256.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4426A266ED3EA00B5F16F /* Sha256.swift */; }; + 07A44361266ED3EB00B5F16F /* HTLCOutputInCommitment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4426B266ED3EA00B5F16F /* HTLCOutputInCommitment.swift */; }; + 07A44362266ED3EB00B5F16F /* ChannelReestablish.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4426C266ED3EA00B5F16F /* ChannelReestablish.swift */; }; + 07A44363266ED3EB00B5F16F /* RouteHintHop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4426D266ED3EA00B5F16F /* RouteHintHop.swift */; }; + 07A44364266ED3EB00B5F16F /* ChannelManagerReadArgs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4426E266ED3EA00B5F16F /* ChannelManagerReadArgs.swift */; }; + 07A44365266ED3EB00B5F16F /* UpdateFulfillHTLC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4426F266ED3EA00B5F16F /* UpdateFulfillHTLC.swift */; }; + 07A44366266ED3EB00B5F16F /* NodeFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44270266ED3EA00B5F16F /* NodeFeatures.swift */; }; + 07A44367266ED3EB00B5F16F /* NetGraphMsgHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44271266ED3EA00B5F16F /* NetGraphMsgHandler.swift */; }; + 07A44368266ED3EB00B5F16F /* InvoiceFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44272266ED3EA00B5F16F /* InvoiceFeatures.swift */; }; + 07A44369266ED3EB00B5F16F /* Invoice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44273266ED3EA00B5F16F /* Invoice.swift */; }; + 07A4436A266ED3EB00B5F16F /* RoutingFees.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44274266ED3EA00B5F16F /* RoutingFees.swift */; }; + 07A4436B266ED3EB00B5F16F /* ChannelMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44275266ED3EA00B5F16F /* ChannelMonitor.swift */; }; + 07A4436C266ED3EB00B5F16F /* BestBlock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44276266ED3EB00B5F16F /* BestBlock.swift */; }; + 07A4436D266ED3EB00B5F16F /* UpdateFee.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44277266ED3EB00B5F16F /* UpdateFee.swift */; }; + 07A4436E266ED3EB00B5F16F /* UnsignedChannelUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44278266ED3EB00B5F16F /* UnsignedChannelUpdate.swift */; }; + 07A4436F266ED3EB00B5F16F /* QueryShortChannelIds.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44279266ED3EB00B5F16F /* QueryShortChannelIds.swift */; }; + 07A44370266ED3EB00B5F16F /* NetworkGraph.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4427A266ED3EB00B5F16F /* NetworkGraph.swift */; }; + 07A44371266ED3EB00B5F16F /* CommitmentTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4427B266ED3EB00B5F16F /* CommitmentTransaction.swift */; }; + 07A44372266ED3EB00B5F16F /* KeysManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4427C266ED3EB00B5F16F /* KeysManager.swift */; }; + 07A44373266ED3EB00B5F16F /* FundingCreated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4427D266ED3EB00B5F16F /* FundingCreated.swift */; }; + 07A44374266ED3EB00B5F16F /* CounterpartyChannelTransactionParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4427E266ED3EB00B5F16F /* CounterpartyChannelTransactionParameters.swift */; }; + 07A44375266ED3EB00B5F16F /* ChannelAnnouncement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4427F266ED3EB00B5F16F /* ChannelAnnouncement.swift */; }; + 07A44376266ED3EB00B5F16F /* ReplyShortChannelIdsEnd.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44280266ED3EB00B5F16F /* ReplyShortChannelIdsEnd.swift */; }; + 07A44377266ED3EB00B5F16F /* IgnoringMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44281266ED3EB00B5F16F /* IgnoringMessageHandler.swift */; }; + 07A44378266ED3EB00B5F16F /* PeerManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44282266ED3EB00B5F16F /* PeerManager.swift */; }; + 07A44379266ED3EB00B5F16F /* UpdateFailHTLC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44283266ED3EB00B5F16F /* UpdateFailHTLC.swift */; }; + 07A4437A266ED3EB00B5F16F /* FundingLocked.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44284266ED3EB00B5F16F /* FundingLocked.swift */; }; + 07A4437B266ED3EB00B5F16F /* StaticPaymentOutputDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44285266ED3EB00B5F16F /* StaticPaymentOutputDescriptor.swift */; }; + 07A4437C266ED3EB00B5F16F /* HTLCUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44286266ED3EB00B5F16F /* HTLCUpdate.swift */; }; + 07A4437D266ED3EB00B5F16F /* InMemorySigner.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44287266ED3EB00B5F16F /* InMemorySigner.swift */; }; + 07A4437E266ED3EB00B5F16F /* GossipTimestampFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44288266ED3EB00B5F16F /* GossipTimestampFilter.swift */; }; + 07A4437F266ED3EB00B5F16F /* PeerHandleError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44289266ED3EB00B5F16F /* PeerHandleError.swift */; }; + 07A44380266ED3EB00B5F16F /* ErroringMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4428A266ED3EB00B5F16F /* ErroringMessageHandler.swift */; }; + 07A44381266ED3EB00B5F16F /* CommitmentSigned.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4428B266ED3EB00B5F16F /* CommitmentSigned.swift */; }; + 07A44382266ED3EB00B5F16F /* TxCreationKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4428C266ED3EB00B5F16F /* TxCreationKeys.swift */; }; + 07A44383266ED3EB00B5F16F /* RawInvoice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4428D266ED3EB00B5F16F /* RawInvoice.swift */; }; + 07A44384266ED3EB00B5F16F /* Pong.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4428E266ED3EB00B5F16F /* Pong.swift */; }; + 07A44385266ED3EB00B5F16F /* ExpiryTime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4428F266ED3EB00B5F16F /* ExpiryTime.swift */; }; + 07A44386266ED3EB00B5F16F /* ChannelConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44290266ED3EB00B5F16F /* ChannelConfig.swift */; }; + 07A44387266ED3EB00B5F16F /* DecodeError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44291266ED3EB00B5F16F /* DecodeError.swift */; }; + 07A44388266ED3EB00B5F16F /* QueryChannelRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44292266ED3EB00B5F16F /* QueryChannelRange.swift */; }; + 07A44389266ED3EB00B5F16F /* HolderCommitmentTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44293266ED3EB00B5F16F /* HolderCommitmentTransaction.swift */; }; + 07A4438A266ED3EB00B5F16F /* ChannelTransactionParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44294266ED3EB00B5F16F /* ChannelTransactionParameters.swift */; }; + 07A4438B266ED3EB00B5F16F /* NodeInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44295266ED3EB00B5F16F /* NodeInfo.swift */; }; + 07A4438C266ED3EB00B5F16F /* BackgroundProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44296266ED3EB00B5F16F /* BackgroundProcessor.swift */; }; + 07A4438D266ED3EB00B5F16F /* DirectedChannelTransactionParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44297266ED3EB00B5F16F /* DirectedChannelTransactionParameters.swift */; }; + 07A4438E266ED3EB00B5F16F /* ChannelHandshakeConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44298266ED3EB00B5F16F /* ChannelHandshakeConfig.swift */; }; + 07A4438F266ED3EB00B5F16F /* ChannelManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A44299266ED3EB00B5F16F /* ChannelManager.swift */; }; + 07A44390266ED3EB00B5F16F /* Shutdown.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4429A266ED3EB00B5F16F /* Shutdown.swift */; }; + 07A44391266ED3EB00B5F16F /* ChainParameters.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4429B266ED3EB00B5F16F /* ChainParameters.swift */; }; + 07A44392266ED3EB00B5F16F /* AcceptChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4429C266ED3EB00B5F16F /* AcceptChannel.swift */; }; + 07A44393266ED3EB00B5F16F /* FilesystemPersister.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4429D266ED3EB00B5F16F /* FilesystemPersister.swift */; }; + 07A44394266ED3EB00B5F16F /* ChannelHandshakeLimits.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4429E266ED3EB00B5F16F /* ChannelHandshakeLimits.swift */; }; + 07A44395266ED3EB00B5F16F /* AnnouncementSignatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A4429F266ED3EB00B5F16F /* AnnouncementSignatures.swift */; }; + 07A44396266ED3EB00B5F16F /* CommitmentUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442A0266ED3EB00B5F16F /* CommitmentUpdate.swift */; }; + 07A44397266ED3EB00B5F16F /* ClosingSigned.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442A1266ED3EB00B5F16F /* ClosingSigned.swift */; }; + 07A44398266ED3EB00B5F16F /* DirectionalChannelInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442A2266ED3EB00B5F16F /* DirectionalChannelInfo.swift */; }; + 07A44399266ED3EB00B5F16F /* ChannelDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442A3266ED3EB00B5F16F /* ChannelDetails.swift */; }; + 07A4439A266ED3EB00B5F16F /* NodeAnnouncementInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442A4266ED3EB00B5F16F /* NodeAnnouncementInfo.swift */; }; + 07A4439B266ED3EB00B5F16F /* UnsignedChannelAnnouncement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442A5266ED3EB00B5F16F /* UnsignedChannelAnnouncement.swift */; }; + 07A4439C266ED3EB00B5F16F /* LightningError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442A6266ED3EB00B5F16F /* LightningError.swift */; }; + 07A4439D266ED3EB00B5F16F /* MinFinalCltvExpiry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442A7266ED3EB00B5F16F /* MinFinalCltvExpiry.swift */; }; + 07A4439E266ED3EB00B5F16F /* DataLossProtect.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442A8266ED3EB00B5F16F /* DataLossProtect.swift */; }; + 07A4439F266ED3EB00B5F16F /* ErrorMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442A9266ED3EB00B5F16F /* ErrorMessage.swift */; }; + 07A443A0266ED3EB00B5F16F /* RouteHop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442AA266ED3EB00B5F16F /* RouteHop.swift */; }; + 07A443A1266ED3EB00B5F16F /* WatchedOutput.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442AB266ED3EB00B5F16F /* WatchedOutput.swift */; }; + 07A443A2266ED3EB00B5F16F /* ChannelUpdate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442AC266ED3EB00B5F16F /* ChannelUpdate.swift */; }; + 07A443A3266ED3EB00B5F16F /* ReplyChannelRange.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442AD266ED3EB00B5F16F /* ReplyChannelRange.swift */; }; + 07A443A4266ED3EB00B5F16F /* InitFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442AE266ED3EB00B5F16F /* InitFeatures.swift */; }; + 07A443A5266ED3EB00B5F16F /* NodeAnnouncement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442AF266ED3EB00B5F16F /* NodeAnnouncement.swift */; }; + 07A443A6266ED3EB00B5F16F /* RawDataPart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442B0266ED3EB00B5F16F /* RawDataPart.swift */; }; + 07A443A7266ED3EB00B5F16F /* ChannelPublicKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442B1266ED3EB00B5F16F /* ChannelPublicKeys.swift */; }; + 07A443A8266ED3EB00B5F16F /* ChannelInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442B2266ED3EB00B5F16F /* ChannelInfo.swift */; }; + 07A443A9266ED3EB00B5F16F /* InvoiceSignature.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442B3266ED3EB00B5F16F /* InvoiceSignature.swift */; }; + 07A443AA266ED3EB00B5F16F /* OpenChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442B4266ED3EB00B5F16F /* OpenChannel.swift */; }; + 07A443AB266ED3EB00B5F16F /* FundingSigned.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442B5266ED3EB00B5F16F /* FundingSigned.swift */; }; + 07A443AC266ED3EB00B5F16F /* SignedRawInvoice.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442B6266ED3EB00B5F16F /* SignedRawInvoice.swift */; }; + 07A443AD266ED3EB00B5F16F /* Init.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442B7266ED3EB00B5F16F /* Init.swift */; }; + 07A443AE266ED3EB00B5F16F /* UnsignedNodeAnnouncement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442B8266ED3EB00B5F16F /* UnsignedNodeAnnouncement.swift */; }; + 07A443AF266ED3EB00B5F16F /* TrustedCommitmentTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442B9266ED3EB00B5F16F /* TrustedCommitmentTransaction.swift */; }; + 07A443B0266ED3EB00B5F16F /* ChannelFeatures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442BA266ED3EB00B5F16F /* ChannelFeatures.swift */; }; + 07A443B1266ED3EB00B5F16F /* BuiltCommitmentTransaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442BB266ED3EB00B5F16F /* BuiltCommitmentTransaction.swift */; }; + 07A443B2266ED3EB00B5F16F /* UserConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442BC266ED3EB00B5F16F /* UserConfig.swift */; }; + 07A443B3266ED3EB00B5F16F /* Route.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442BD266ED3EB00B5F16F /* Route.swift */; }; + 07A443B4266ED3EB00B5F16F /* OutPoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442BE266ED3EB00B5F16F /* OutPoint.swift */; }; + 07A443B5266ED3EB00B5F16F /* DelayedPaymentOutputDescriptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07A442BF266ED3EB00B5F16F /* DelayedPaymentOutputDescriptor.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -519,245 +287,6 @@ 07344C62264277ED001CD90E /* LDKFrameworkTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LDKFrameworkTests.swift; sourceTree = ""; }; 07344C64264277ED001CD90E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 07344C8626427F95001CD90E /* LDKExampleClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LDKExampleClass.swift; sourceTree = ""; }; - 07344CD22642882A001CD90E /* PaymentSendFailure.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PaymentSendFailure.swift; sourceTree = ""; }; - 07344CD32642882A001CD90E /* Option_u64Z.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Option_u64Z.swift; sourceTree = ""; }; - 07344CD42642882A001CD90E /* Fallback.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Fallback.swift; sourceTree = ""; }; - 07344CD52642882A001CD90E /* Option_C2Tuple_usizeTransactionZZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Option_C2Tuple_usizeTransactionZZ.swift; sourceTree = ""; }; - 07344CD62642882A001CD90E /* APIError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIError.swift; sourceTree = ""; }; - 07344CD72642882A001CD90E /* Event.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Event.swift; sourceTree = ""; }; - 07344CD82642882A001CD90E /* HTLCFailChannelUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTLCFailChannelUpdate.swift; sourceTree = ""; }; - 07344CD92642882A001CD90E /* ErrorAction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorAction.swift; sourceTree = ""; }; - 07344CDA2642882A001CD90E /* Option_u32Z.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Option_u32Z.swift; sourceTree = ""; }; - 07344CDB2642882A001CD90E /* NetAddress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetAddress.swift; sourceTree = ""; }; - 07344CDC2642882A001CD90E /* SignOrCreationError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignOrCreationError.swift; sourceTree = ""; }; - 07344CDD2642882A001CD90E /* MessageSendEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageSendEvent.swift; sourceTree = ""; }; - 07344CDE2642882A001CD90E /* MonitorEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MonitorEvent.swift; sourceTree = ""; }; - 07344CDF2642882A001CD90E /* SpendableOutputDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpendableOutputDescriptor.swift; sourceTree = ""; }; - 07344CE12642882A001CD90E /* BaseSign.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseSign.swift; sourceTree = ""; }; - 07344CE22642882A001CD90E /* Persist.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Persist.swift; sourceTree = ""; }; - 07344CE32642882A001CD90E /* KeysInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeysInterface.swift; sourceTree = ""; }; - 07344CE42642882A001CD90E /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; - 07344CE52642882A001CD90E /* SocketDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketDescriptor.swift; sourceTree = ""; }; - 07344CE62642882A001CD90E /* FeeEstimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeeEstimator.swift; sourceTree = ""; }; - 07344CE72642882A001CD90E /* MessageSendEventsProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageSendEventsProvider.swift; sourceTree = ""; }; - 07344CE82642882A001CD90E /* BroadcasterInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BroadcasterInterface.swift; sourceTree = ""; }; - 07344CE92642882A001CD90E /* Confirm.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Confirm.swift; sourceTree = ""; }; - 07344CEA2642882A001CD90E /* RoutingMessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoutingMessageHandler.swift; sourceTree = ""; }; - 07344CEB2642882A001CD90E /* Listen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Listen.swift; sourceTree = ""; }; - 07344CEC2642882A001CD90E /* ChannelMessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelMessageHandler.swift; sourceTree = ""; }; - 07344CED2642882A001CD90E /* Filter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Filter.swift; sourceTree = ""; }; - 07344CEE2642882A001CD90E /* Access.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Access.swift; sourceTree = ""; }; - 07344CEF2642882A001CD90E /* EventsProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventsProvider.swift; sourceTree = ""; }; - 07344CF02642882A001CD90E /* Watch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Watch.swift; sourceTree = ""; }; - 07344CF12642882A001CD90E /* Sign.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sign.swift; sourceTree = ""; }; - 07344CF32642882A001CD90E /* C2Tuple_BlockHashChannelMonitorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_BlockHashChannelMonitorZ.swift; sourceTree = ""; }; - 07344CF42642882A001CD90E /* C2Tuple_SignatureCVec_SignatureZZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_SignatureCVec_SignatureZZ.swift; sourceTree = ""; }; - 07344CF52642882A001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift; sourceTree = ""; }; - 07344CF62642882A001CD90E /* C2Tuple_BlockHashChannelManagerZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_BlockHashChannelManagerZ.swift; sourceTree = ""; }; - 07344CF72642882A001CD90E /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift; sourceTree = ""; }; - 07344CF82642882A001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift; sourceTree = ""; }; - 07344CF92642882A001CD90E /* C2Tuple_PaymentHashPaymentSecretZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_PaymentHashPaymentSecretZ.swift; sourceTree = ""; }; - 07344CFA2642882A001CD90E /* C2Tuple_u32TxOutZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_u32TxOutZ.swift; sourceTree = ""; }; - 07344CFB2642882A001CD90E /* C2Tuple_OutPointScriptZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_OutPointScriptZ.swift; sourceTree = ""; }; - 07344CFC2642882A001CD90E /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift; sourceTree = ""; }; - 07344CFD2642882A001CD90E /* C2Tuple_u32ScriptZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_u32ScriptZ.swift; sourceTree = ""; }; - 07344CFE2642882A001CD90E /* C2Tuple_usizeTransactionZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_usizeTransactionZ.swift; sourceTree = ""; }; - 07344CFF2642882A001CD90E /* Bindings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Bindings.swift; sourceTree = ""; }; - 07344D012642882A001CD90E /* Result_ChannelConfigDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelConfigDecodeErrorZ.swift; sourceTree = ""; }; - 07344D022642882A001CD90E /* Result_ChannelTransactionParametersDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelTransactionParametersDecodeErrorZ.swift; sourceTree = ""; }; - 07344D032642882A001CD90E /* Result_QueryChannelRangeDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_QueryChannelRangeDecodeErrorZ.swift; sourceTree = ""; }; - 07344D042642882A001CD90E /* Result_FundingCreatedDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_FundingCreatedDecodeErrorZ.swift; sourceTree = ""; }; - 07344D052642882A001CD90E /* Result_TxCreationKeysErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_TxCreationKeysErrorZ.swift; sourceTree = ""; }; - 07344D062642882A001CD90E /* Result_PingDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_PingDecodeErrorZ.swift; sourceTree = ""; }; - 07344D072642882A001CD90E /* Result_UpdateFulfillHTLCDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UpdateFulfillHTLCDecodeErrorZ.swift; sourceTree = ""; }; - 07344D082642882A001CD90E /* Result_NonePaymentSendFailureZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NonePaymentSendFailureZ.swift; sourceTree = ""; }; - 07344D092642882A001CD90E /* Result_CVec_u8ZPeerHandleErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CVec_u8ZPeerHandleErrorZ.swift; sourceTree = ""; }; - 07344D0A2642882A001CD90E /* Result_DirectionalChannelInfoDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_DirectionalChannelInfoDecodeErrorZ.swift; sourceTree = ""; }; - 07344D0B2642882A001CD90E /* Result_RouteDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RouteDecodeErrorZ.swift; sourceTree = ""; }; - 07344D0C2642882A001CD90E /* Result_RevokeAndACKDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RevokeAndACKDecodeErrorZ.swift; sourceTree = ""; }; - 07344D0D2642882A001CD90E /* Result_OpenChannelDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_OpenChannelDecodeErrorZ.swift; sourceTree = ""; }; - 07344D0E2642882A001CD90E /* Result_ChannelInfoDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelInfoDecodeErrorZ.swift; sourceTree = ""; }; - 07344D0F2642882A001CD90E /* Result_RouteHintCreationErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RouteHintCreationErrorZ.swift; sourceTree = ""; }; - 07344D102642882A001CD90E /* Result_PongDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_PongDecodeErrorZ.swift; sourceTree = ""; }; - 07344D112642882A001CD90E /* Result_ChannelPublicKeysDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelPublicKeysDecodeErrorZ.swift; sourceTree = ""; }; - 07344D122642882A001CD90E /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_BuiltCommitmentTransactionDecodeErrorZ.swift; sourceTree = ""; }; - 07344D132642882A001CD90E /* Result_PaymentSecretAPIErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_PaymentSecretAPIErrorZ.swift; sourceTree = ""; }; - 07344D142642882A001CD90E /* Result_SpendableOutputDescriptorDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_SpendableOutputDescriptorDecodeErrorZ.swift; sourceTree = ""; }; - 07344D152642882A001CD90E /* Result_UnsignedChannelUpdateDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UnsignedChannelUpdateDecodeErrorZ.swift; sourceTree = ""; }; - 07344D162642882A001CD90E /* Result_ErrorMessageDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ErrorMessageDecodeErrorZ.swift; sourceTree = ""; }; - 07344D172642882A001CD90E /* Result_AcceptChannelDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_AcceptChannelDecodeErrorZ.swift; sourceTree = ""; }; - 07344D182642882A001CD90E /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UnsignedNodeAnnouncementDecodeErrorZ.swift; sourceTree = ""; }; - 07344D192642882A001CD90E /* Result_NodeFeaturesDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NodeFeaturesDecodeErrorZ.swift; sourceTree = ""; }; - 07344D1A2642882A001CD90E /* Result_TrustedCommitmentTransactionNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_TrustedCommitmentTransactionNoneZ.swift; sourceTree = ""; }; - 07344D1B2642882A001CD90E /* Result_AnnouncementSignaturesDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_AnnouncementSignaturesDecodeErrorZ.swift; sourceTree = ""; }; - 07344D1C2642882A001CD90E /* Result_StringErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_StringErrorZ.swift; sourceTree = ""; }; - 07344D1D2642882A001CD90E /* Result_HolderCommitmentTransactionDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_HolderCommitmentTransactionDecodeErrorZ.swift; sourceTree = ""; }; - 07344D1E2642882A001CD90E /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UnsignedChannelAnnouncementDecodeErrorZ.swift; sourceTree = ""; }; - 07344D1F2642882A001CD90E /* Result_CommitmentSignedDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CommitmentSignedDecodeErrorZ.swift; sourceTree = ""; }; - 07344D202642882A001CD90E /* Result_NonePeerHandleErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NonePeerHandleErrorZ.swift; sourceTree = ""; }; - 07344D212642882A001CD90E /* Result_NoneMonitorUpdateErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NoneMonitorUpdateErrorZ.swift; sourceTree = ""; }; - 07344D222642882A001CD90E /* Result_TxOutAccessErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_TxOutAccessErrorZ.swift; sourceTree = ""; }; - 07344D232642882A001CD90E /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CResult_NetAddressu8ZDecodeErrorZ.swift; sourceTree = ""; }; - 07344D242642882A001CD90E /* Result_NoneLightningErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NoneLightningErrorZ.swift; sourceTree = ""; }; - 07344D252642882A001CD90E /* Result_NoneAPIErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NoneAPIErrorZ.swift; sourceTree = ""; }; - 07344D262642882A001CD90E /* Result_PublicKeyErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_PublicKeyErrorZ.swift; sourceTree = ""; }; - 07344D272642882A001CD90E /* Result_boolLightningErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_boolLightningErrorZ.swift; sourceTree = ""; }; - 07344D282642882A001CD90E /* Result_ChannelUpdateDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelUpdateDecodeErrorZ.swift; sourceTree = ""; }; - 07344D292642882A001CD90E /* Result_UpdateFeeDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UpdateFeeDecodeErrorZ.swift; sourceTree = ""; }; - 07344D2A2642882A001CD90E /* Result_DescriptionCreationErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_DescriptionCreationErrorZ.swift; sourceTree = ""; }; - 07344D2B2642882A001CD90E /* Result_CommitmentTransactionDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CommitmentTransactionDecodeErrorZ.swift; sourceTree = ""; }; - 07344D2C2642882A001CD90E /* Result_SiPrefixNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_SiPrefixNoneZ.swift; sourceTree = ""; }; - 07344D2D2642882A001CD90E /* Result_FundingSignedDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_FundingSignedDecodeErrorZ.swift; sourceTree = ""; }; - 07344D2E2642882A001CD90E /* Result_InvoiceFeaturesDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InvoiceFeaturesDecodeErrorZ.swift; sourceTree = ""; }; - 07344D2F2642882A001CD90E /* Result_TransactionNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_TransactionNoneZ.swift; sourceTree = ""; }; - 07344D302642882A001CD90E /* Result_NetworkGraphDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NetworkGraphDecodeErrorZ.swift; sourceTree = ""; }; - 07344D312642882A001CD90E /* Result_ChannelAnnouncementDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelAnnouncementDecodeErrorZ.swift; sourceTree = ""; }; - 07344D322642882A001CD90E /* Result_NoneSemanticErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NoneSemanticErrorZ.swift; sourceTree = ""; }; - 07344D332642882A001CD90E /* Result_InvoiceSignOrCreationErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InvoiceSignOrCreationErrorZ.swift; sourceTree = ""; }; - 07344D342642882A001CD90E /* Result_InvoiceNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InvoiceNoneZ.swift; sourceTree = ""; }; - 07344D352642882A001CD90E /* Result_RoutingFeesDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RoutingFeesDecodeErrorZ.swift; sourceTree = ""; }; - 07344D362642882A001CD90E /* Result_ChannelReestablishDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelReestablishDecodeErrorZ.swift; sourceTree = ""; }; - 07344D372642882A001CD90E /* Result_GossipTimestampFilterDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_GossipTimestampFilterDecodeErrorZ.swift; sourceTree = ""; }; - 07344D382642882A001CD90E /* Result_CVec_CVec_u8ZZNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CVec_CVec_u8ZZNoneZ.swift; sourceTree = ""; }; - 07344D392642882A001CD90E /* Result_SecretKeyErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_SecretKeyErrorZ.swift; sourceTree = ""; }; - 07344D3A2642882A001CD90E /* Result_HTLCUpdateDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_HTLCUpdateDecodeErrorZ.swift; sourceTree = ""; }; - 07344D3B2642882A001CD90E /* Result_RouteLightningErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RouteLightningErrorZ.swift; sourceTree = ""; }; - 07344D3C2642882A001CD90E /* Result_InvoiceSemanticErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InvoiceSemanticErrorZ.swift; sourceTree = ""; }; - 07344D3D2642882A001CD90E /* Result_SignedRawInvoiceNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_SignedRawInvoiceNoneZ.swift; sourceTree = ""; }; - 07344D3E2642882A001CD90E /* Result_InitFeaturesDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InitFeaturesDecodeErrorZ.swift; sourceTree = ""; }; - 07344D3F2642882A001CD90E /* Result_RecoverableSignatureNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RecoverableSignatureNoneZ.swift; sourceTree = ""; }; - 07344D402642882A001CD90E /* Result_CVec_SignatureZNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CVec_SignatureZNoneZ.swift; sourceTree = ""; }; - 07344D412642882A001CD90E /* Result_ChannelMonitorUpdateDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelMonitorUpdateDecodeErrorZ.swift; sourceTree = ""; }; - 07344D422642882A001CD90E /* Result_SignatureNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_SignatureNoneZ.swift; sourceTree = ""; }; - 07344D432642882A001CD90E /* Result_NoneErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NoneErrorZ.swift; sourceTree = ""; }; - 07344D442642882A001CD90E /* Result_UpdateAddHTLCDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UpdateAddHTLCDecodeErrorZ.swift; sourceTree = ""; }; - 07344D452642882A001CD90E /* Result_NetAddressu8Z.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NetAddressu8Z.swift; sourceTree = ""; }; - 07344D462642882A001CD90E /* Result_FundingLockedDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_FundingLockedDecodeErrorZ.swift; sourceTree = ""; }; - 07344D472642882A001CD90E /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift; sourceTree = ""; }; - 07344D482642882A001CD90E /* Result_QueryShortChannelIdsDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_QueryShortChannelIdsDecodeErrorZ.swift; sourceTree = ""; }; - 07344D492642882A001CD90E /* Result_SignDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_SignDecodeErrorZ.swift; sourceTree = ""; }; - 07344D4A2642882A001CD90E /* Result_boolPeerHandleErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_boolPeerHandleErrorZ.swift; sourceTree = ""; }; - 07344D4B2642882A001CD90E /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift; sourceTree = ""; }; - 07344D4C2642882A001CD90E /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift; sourceTree = ""; }; - 07344D4D2642882A001CD90E /* Result_ReplyChannelRangeDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ReplyChannelRangeDecodeErrorZ.swift; sourceTree = ""; }; - 07344D4E2642882A001CD90E /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UpdateFailMalformedHTLCDecodeErrorZ.swift; sourceTree = ""; }; - 07344D4F2642882A001CD90E /* Result_UpdateFailHTLCDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UpdateFailHTLCDecodeErrorZ.swift; sourceTree = ""; }; - 07344D502642882A001CD90E /* Result_TxCreationKeysDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_TxCreationKeysDecodeErrorZ.swift; sourceTree = ""; }; - 07344D512642882A001CD90E /* Result_PositiveTimestampCreationErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_PositiveTimestampCreationErrorZ.swift; sourceTree = ""; }; - 07344D522642882A001CD90E /* Result_OutPointDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_OutPointDecodeErrorZ.swift; sourceTree = ""; }; - 07344D532642882A001CD90E /* Result_NodeAnnouncementDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NodeAnnouncementDecodeErrorZ.swift; sourceTree = ""; }; - 07344D542642882A001CD90E /* Result_PayeePubKeyErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_PayeePubKeyErrorZ.swift; sourceTree = ""; }; - 07344D552642882A001CD90E /* Result_ShutdownDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ShutdownDecodeErrorZ.swift; sourceTree = ""; }; - 07344D562642882A001CD90E /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift; sourceTree = ""; }; - 07344D572642882A001CD90E /* Result_NodeAnnouncementInfoDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NodeAnnouncementInfoDecodeErrorZ.swift; sourceTree = ""; }; - 07344D582642882A001CD90E /* Result_NodeInfoDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NodeInfoDecodeErrorZ.swift; sourceTree = ""; }; - 07344D592642882A001CD90E /* Result_ExpiryTimeCreationErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ExpiryTimeCreationErrorZ.swift; sourceTree = ""; }; - 07344D5A2642882A001CD90E /* Result_ChannelFeaturesDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelFeaturesDecodeErrorZ.swift; sourceTree = ""; }; - 07344D5B2642882A001CD90E /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_HTLCOutputInCommitmentDecodeErrorZ.swift; sourceTree = ""; }; - 07344D5C2642882A001CD90E /* Result_InitDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InitDecodeErrorZ.swift; sourceTree = ""; }; - 07344D5D2642882A001CD90E /* Result_NoneChannelMonitorUpdateErrZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NoneChannelMonitorUpdateErrZ.swift; sourceTree = ""; }; - 07344D5E2642882A001CD90E /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift; sourceTree = ""; }; - 07344D5F2642882A001CD90E /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ReplyShortChannelIdsEndDecodeErrorZ.swift; sourceTree = ""; }; - 07344D602642882A001CD90E /* Result_ClosingSignedDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ClosingSignedDecodeErrorZ.swift; sourceTree = ""; }; - 07344D612642882A001CD90E /* Result_InMemorySignerDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InMemorySignerDecodeErrorZ.swift; sourceTree = ""; }; - 07344D632642882A001CD90E /* MessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageHandler.swift; sourceTree = ""; }; - 07344D642642882A001CD90E /* ChainMonitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChainMonitor.swift; sourceTree = ""; }; - 07344D652642882A001CD90E /* PayeePubKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PayeePubKey.swift; sourceTree = ""; }; - 07344D662642882A001CD90E /* MonitorUpdateError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MonitorUpdateError.swift; sourceTree = ""; }; - 07344D672642882A001CD90E /* Description.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Description.swift; sourceTree = ""; }; - 07344D682642882A001CD90E /* LockedNetworkGraph.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LockedNetworkGraph.swift; sourceTree = ""; }; - 07344D692642882A001CD90E /* RevokeAndACK.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RevokeAndACK.swift; sourceTree = ""; }; - 07344D6A2642882A001CD90E /* Ping.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Ping.swift; sourceTree = ""; }; - 07344D6B2642882A001CD90E /* PositiveTimestamp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PositiveTimestamp.swift; sourceTree = ""; }; - 07344D6C2642882A001CD90E /* UpdateAddHTLC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateAddHTLC.swift; sourceTree = ""; }; - 07344D6D2642882A001CD90E /* UpdateFailMalformedHTLC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateFailMalformedHTLC.swift; sourceTree = ""; }; - 07344D6E2642882A001CD90E /* ChannelMonitorUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelMonitorUpdate.swift; sourceTree = ""; }; - 07344D6F2642882A001CD90E /* RouteHint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteHint.swift; sourceTree = ""; }; - 07344D702642882A001CD90E /* Sha256.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sha256.swift; sourceTree = ""; }; - 07344D712642882A001CD90E /* HTLCOutputInCommitment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTLCOutputInCommitment.swift; sourceTree = ""; }; - 07344D722642882A001CD90E /* ChannelReestablish.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelReestablish.swift; sourceTree = ""; }; - 07344D732642882A001CD90E /* RouteHintHop.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteHintHop.swift; sourceTree = ""; }; - 07344D742642882A001CD90E /* ChannelManagerReadArgs.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelManagerReadArgs.swift; sourceTree = ""; }; - 07344D752642882A001CD90E /* UpdateFulfillHTLC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateFulfillHTLC.swift; sourceTree = ""; }; - 07344D762642882A001CD90E /* NodeFeatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NodeFeatures.swift; sourceTree = ""; }; - 07344D772642882A001CD90E /* NetGraphMsgHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetGraphMsgHandler.swift; sourceTree = ""; }; - 07344D782642882A001CD90E /* InvoiceFeatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InvoiceFeatures.swift; sourceTree = ""; }; - 07344D792642882A001CD90E /* Invoice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Invoice.swift; sourceTree = ""; }; - 07344D7A2642882A001CD90E /* RoutingFees.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoutingFees.swift; sourceTree = ""; }; - 07344D7B2642882A001CD90E /* ChannelMonitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelMonitor.swift; sourceTree = ""; }; - 07344D7C2642882A001CD90E /* BestBlock.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BestBlock.swift; sourceTree = ""; }; - 07344D7D2642882A001CD90E /* UpdateFee.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateFee.swift; sourceTree = ""; }; - 07344D7E2642882A001CD90E /* UnsignedChannelUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnsignedChannelUpdate.swift; sourceTree = ""; }; - 07344D7F2642882A001CD90E /* QueryShortChannelIds.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QueryShortChannelIds.swift; sourceTree = ""; }; - 07344D802642882A001CD90E /* NetworkGraph.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkGraph.swift; sourceTree = ""; }; - 07344D812642882A001CD90E /* CommitmentTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommitmentTransaction.swift; sourceTree = ""; }; - 07344D822642882A001CD90E /* KeysManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeysManager.swift; sourceTree = ""; }; - 07344D832642882A001CD90E /* FundingCreated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FundingCreated.swift; sourceTree = ""; }; - 07344D842642882A001CD90E /* CounterpartyChannelTransactionParameters.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CounterpartyChannelTransactionParameters.swift; sourceTree = ""; }; - 07344D852642882A001CD90E /* ChannelAnnouncement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelAnnouncement.swift; sourceTree = ""; }; - 07344D862642882A001CD90E /* ReplyShortChannelIdsEnd.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReplyShortChannelIdsEnd.swift; sourceTree = ""; }; - 07344D872642882A001CD90E /* IgnoringMessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IgnoringMessageHandler.swift; sourceTree = ""; }; - 07344D882642882A001CD90E /* PeerManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerManager.swift; sourceTree = ""; }; - 07344D892642882A001CD90E /* UpdateFailHTLC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateFailHTLC.swift; sourceTree = ""; }; - 07344D8A2642882A001CD90E /* FundingLocked.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FundingLocked.swift; sourceTree = ""; }; - 07344D8B2642882A001CD90E /* StaticPaymentOutputDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StaticPaymentOutputDescriptor.swift; sourceTree = ""; }; - 07344D8C2642882A001CD90E /* HTLCUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTLCUpdate.swift; sourceTree = ""; }; - 07344D8D2642882A001CD90E /* InMemorySigner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InMemorySigner.swift; sourceTree = ""; }; - 07344D8E2642882A001CD90E /* GossipTimestampFilter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GossipTimestampFilter.swift; sourceTree = ""; }; - 07344D8F2642882A001CD90E /* PeerHandleError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerHandleError.swift; sourceTree = ""; }; - 07344D902642882A001CD90E /* ErroringMessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErroringMessageHandler.swift; sourceTree = ""; }; - 07344D912642882A001CD90E /* CommitmentSigned.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommitmentSigned.swift; sourceTree = ""; }; - 07344D922642882A001CD90E /* TxCreationKeys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TxCreationKeys.swift; sourceTree = ""; }; - 07344D932642882A001CD90E /* RawInvoice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RawInvoice.swift; sourceTree = ""; }; - 07344D942642882A001CD90E /* Pong.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Pong.swift; sourceTree = ""; }; - 07344D952642882A001CD90E /* ExpiryTime.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExpiryTime.swift; sourceTree = ""; }; - 07344D962642882A001CD90E /* ChannelConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelConfig.swift; sourceTree = ""; }; - 07344D972642882A001CD90E /* DecodeError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecodeError.swift; sourceTree = ""; }; - 07344D982642882A001CD90E /* QueryChannelRange.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QueryChannelRange.swift; sourceTree = ""; }; - 07344D992642882A001CD90E /* HolderCommitmentTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HolderCommitmentTransaction.swift; sourceTree = ""; }; - 07344D9A2642882A001CD90E /* ChannelTransactionParameters.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelTransactionParameters.swift; sourceTree = ""; }; - 07344D9B2642882A001CD90E /* NodeInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NodeInfo.swift; sourceTree = ""; }; - 07344D9C2642882A001CD90E /* DirectedChannelTransactionParameters.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DirectedChannelTransactionParameters.swift; sourceTree = ""; }; - 07344D9D2642882A001CD90E /* ChannelHandshakeConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelHandshakeConfig.swift; sourceTree = ""; }; - 07344D9E2642882A001CD90E /* ChannelManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelManager.swift; sourceTree = ""; }; - 07344D9F2642882A001CD90E /* Shutdown.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Shutdown.swift; sourceTree = ""; }; - 07344DA02642882A001CD90E /* ChainParameters.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChainParameters.swift; sourceTree = ""; }; - 07344DA12642882A001CD90E /* AcceptChannel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AcceptChannel.swift; sourceTree = ""; }; - 07344DA22642882A001CD90E /* FilesystemPersister.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilesystemPersister.swift; sourceTree = ""; }; - 07344DA32642882A001CD90E /* ChannelHandshakeLimits.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelHandshakeLimits.swift; sourceTree = ""; }; - 07344DA42642882A001CD90E /* AnnouncementSignatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnnouncementSignatures.swift; sourceTree = ""; }; - 07344DA52642882A001CD90E /* CommitmentUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommitmentUpdate.swift; sourceTree = ""; }; - 07344DA62642882A001CD90E /* ClosingSigned.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClosingSigned.swift; sourceTree = ""; }; - 07344DA72642882A001CD90E /* DirectionalChannelInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DirectionalChannelInfo.swift; sourceTree = ""; }; - 07344DA82642882A001CD90E /* ChannelDetails.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelDetails.swift; sourceTree = ""; }; - 07344DA92642882A001CD90E /* NodeAnnouncementInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NodeAnnouncementInfo.swift; sourceTree = ""; }; - 07344DAA2642882A001CD90E /* UnsignedChannelAnnouncement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnsignedChannelAnnouncement.swift; sourceTree = ""; }; - 07344DAB2642882A001CD90E /* LightningError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LightningError.swift; sourceTree = ""; }; - 07344DAC2642882A001CD90E /* MinFinalCltvExpiry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MinFinalCltvExpiry.swift; sourceTree = ""; }; - 07344DAD2642882B001CD90E /* DataLossProtect.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataLossProtect.swift; sourceTree = ""; }; - 07344DAE2642882B001CD90E /* ErrorMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorMessage.swift; sourceTree = ""; }; - 07344DAF2642882B001CD90E /* RouteHop.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteHop.swift; sourceTree = ""; }; - 07344DB02642882B001CD90E /* WatchedOutput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WatchedOutput.swift; sourceTree = ""; }; - 07344DB12642882B001CD90E /* ChannelUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelUpdate.swift; sourceTree = ""; }; - 07344DB22642882B001CD90E /* ReplyChannelRange.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReplyChannelRange.swift; sourceTree = ""; }; - 07344DB32642882B001CD90E /* InitFeatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InitFeatures.swift; sourceTree = ""; }; - 07344DB42642882B001CD90E /* NodeAnnouncement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NodeAnnouncement.swift; sourceTree = ""; }; - 07344DB52642882B001CD90E /* RawDataPart.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RawDataPart.swift; sourceTree = ""; }; - 07344DB62642882B001CD90E /* ChannelPublicKeys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelPublicKeys.swift; sourceTree = ""; }; - 07344DB72642882B001CD90E /* ChannelInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelInfo.swift; sourceTree = ""; }; - 07344DB82642882B001CD90E /* InvoiceSignature.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InvoiceSignature.swift; sourceTree = ""; }; - 07344DB92642882B001CD90E /* OpenChannel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenChannel.swift; sourceTree = ""; }; - 07344DBA2642882B001CD90E /* FundingSigned.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FundingSigned.swift; sourceTree = ""; }; - 07344DBB2642882B001CD90E /* SignedRawInvoice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignedRawInvoice.swift; sourceTree = ""; }; - 07344DBC2642882B001CD90E /* Init.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Init.swift; sourceTree = ""; }; - 07344DBD2642882B001CD90E /* UnsignedNodeAnnouncement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnsignedNodeAnnouncement.swift; sourceTree = ""; }; - 07344DBE2642882B001CD90E /* TrustedCommitmentTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrustedCommitmentTransaction.swift; sourceTree = ""; }; - 07344DBF2642882B001CD90E /* ChannelFeatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelFeatures.swift; sourceTree = ""; }; - 07344DC02642882B001CD90E /* BuiltCommitmentTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BuiltCommitmentTransaction.swift; sourceTree = ""; }; - 07344DC12642882B001CD90E /* UserConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserConfig.swift; sourceTree = ""; }; - 07344DC22642882B001CD90E /* Route.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Route.swift; sourceTree = ""; }; - 07344DC32642882B001CD90E /* OutPoint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OutPoint.swift; sourceTree = ""; }; - 07344DC42642882B001CD90E /* DelayedPaymentOutputDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DelayedPaymentOutputDescriptor.swift; sourceTree = ""; }; 07344FCD26428DD2001CD90E /* LDKFramework.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = LDKFramework.modulemap; sourceTree = ""; }; 07344FE526429524001CD90E /* libldk.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libldk.a; sourceTree = ""; }; 0734505D26445915001CD90E /* lightning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lightning.h; sourceTree = SOURCE_ROOT; }; @@ -765,6 +294,252 @@ 0734505F26445915001CD90E /* ldk_rust_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ldk_rust_types.h; sourceTree = SOURCE_ROOT; }; 0749F9C4265615CB00876C52 /* ChannelManagerConstructor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelManagerConstructor.swift; sourceTree = ""; }; 0749F9C5265615CB00876C52 /* UtilMethods.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UtilMethods.swift; sourceTree = ""; }; + 07A441C6266ED3EA00B5F16F /* PaymentSendFailure.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PaymentSendFailure.swift; sourceTree = ""; }; + 07A441C7266ED3EA00B5F16F /* Option_u64Z.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Option_u64Z.swift; sourceTree = ""; }; + 07A441C8266ED3EA00B5F16F /* Fallback.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Fallback.swift; sourceTree = ""; }; + 07A441C9266ED3EA00B5F16F /* Option_C2Tuple_usizeTransactionZZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Option_C2Tuple_usizeTransactionZZ.swift; sourceTree = ""; }; + 07A441CA266ED3EA00B5F16F /* APIError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIError.swift; sourceTree = ""; }; + 07A441CB266ED3EA00B5F16F /* Event.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Event.swift; sourceTree = ""; }; + 07A441CC266ED3EA00B5F16F /* HTLCFailChannelUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTLCFailChannelUpdate.swift; sourceTree = ""; }; + 07A441CD266ED3EA00B5F16F /* ErrorAction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorAction.swift; sourceTree = ""; }; + 07A441CE266ED3EA00B5F16F /* Option_u32Z.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Option_u32Z.swift; sourceTree = ""; }; + 07A441CF266ED3EA00B5F16F /* NetAddress.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetAddress.swift; sourceTree = ""; }; + 07A441D0266ED3EA00B5F16F /* SignOrCreationError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignOrCreationError.swift; sourceTree = ""; }; + 07A441D1266ED3EA00B5F16F /* MessageSendEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageSendEvent.swift; sourceTree = ""; }; + 07A441D2266ED3EA00B5F16F /* MonitorEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MonitorEvent.swift; sourceTree = ""; }; + 07A441D3266ED3EA00B5F16F /* SpendableOutputDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpendableOutputDescriptor.swift; sourceTree = ""; }; + 07A441D5266ED3EA00B5F16F /* BaseSign.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseSign.swift; sourceTree = ""; }; + 07A441D6266ED3EA00B5F16F /* Persist.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Persist.swift; sourceTree = ""; }; + 07A441D7266ED3EA00B5F16F /* KeysInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeysInterface.swift; sourceTree = ""; }; + 07A441D8266ED3EA00B5F16F /* Logger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; + 07A441D9266ED3EA00B5F16F /* SocketDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SocketDescriptor.swift; sourceTree = ""; }; + 07A441DA266ED3EA00B5F16F /* FeeEstimator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeeEstimator.swift; sourceTree = ""; }; + 07A441DB266ED3EA00B5F16F /* MessageSendEventsProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageSendEventsProvider.swift; sourceTree = ""; }; + 07A441DC266ED3EA00B5F16F /* BroadcasterInterface.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BroadcasterInterface.swift; sourceTree = ""; }; + 07A441DD266ED3EA00B5F16F /* Confirm.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Confirm.swift; sourceTree = ""; }; + 07A441DE266ED3EA00B5F16F /* EventHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventHandler.swift; sourceTree = ""; }; + 07A441DF266ED3EA00B5F16F /* RoutingMessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoutingMessageHandler.swift; sourceTree = ""; }; + 07A441E0266ED3EA00B5F16F /* ChannelManagerPersister.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelManagerPersister.swift; sourceTree = ""; }; + 07A441E1266ED3EA00B5F16F /* Listen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Listen.swift; sourceTree = ""; }; + 07A441E2266ED3EA00B5F16F /* ChannelMessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelMessageHandler.swift; sourceTree = ""; }; + 07A441E3266ED3EA00B5F16F /* Filter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Filter.swift; sourceTree = ""; }; + 07A441E4266ED3EA00B5F16F /* Access.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Access.swift; sourceTree = ""; }; + 07A441E5266ED3EA00B5F16F /* EventsProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventsProvider.swift; sourceTree = ""; }; + 07A441E6266ED3EA00B5F16F /* Watch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Watch.swift; sourceTree = ""; }; + 07A441E7266ED3EA00B5F16F /* Sign.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sign.swift; sourceTree = ""; }; + 07A441E9266ED3EA00B5F16F /* C2Tuple_BlockHashChannelMonitorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_BlockHashChannelMonitorZ.swift; sourceTree = ""; }; + 07A441EA266ED3EA00B5F16F /* C2Tuple_SignatureCVec_SignatureZZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_SignatureCVec_SignatureZZ.swift; sourceTree = ""; }; + 07A441EB266ED3EA00B5F16F /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift; sourceTree = ""; }; + 07A441EC266ED3EA00B5F16F /* C2Tuple_BlockHashChannelManagerZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_BlockHashChannelManagerZ.swift; sourceTree = ""; }; + 07A441ED266ED3EA00B5F16F /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift; sourceTree = ""; }; + 07A441EE266ED3EA00B5F16F /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift; sourceTree = ""; }; + 07A441EF266ED3EA00B5F16F /* C2Tuple_PaymentHashPaymentSecretZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_PaymentHashPaymentSecretZ.swift; sourceTree = ""; }; + 07A441F0266ED3EA00B5F16F /* C2Tuple_u32TxOutZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_u32TxOutZ.swift; sourceTree = ""; }; + 07A441F1266ED3EA00B5F16F /* C2Tuple_OutPointScriptZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_OutPointScriptZ.swift; sourceTree = ""; }; + 07A441F2266ED3EA00B5F16F /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift; sourceTree = ""; }; + 07A441F3266ED3EA00B5F16F /* C2Tuple_u32ScriptZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_u32ScriptZ.swift; sourceTree = ""; }; + 07A441F4266ED3EA00B5F16F /* C2Tuple_usizeTransactionZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = C2Tuple_usizeTransactionZ.swift; sourceTree = ""; }; + 07A441F5266ED3EA00B5F16F /* Bindings.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Bindings.swift; sourceTree = ""; }; + 07A441F7266ED3EA00B5F16F /* Result_ChannelConfigDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelConfigDecodeErrorZ.swift; sourceTree = ""; }; + 07A441F8266ED3EA00B5F16F /* Result_ChannelTransactionParametersDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelTransactionParametersDecodeErrorZ.swift; sourceTree = ""; }; + 07A441F9266ED3EA00B5F16F /* Result_QueryChannelRangeDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_QueryChannelRangeDecodeErrorZ.swift; sourceTree = ""; }; + 07A441FA266ED3EA00B5F16F /* Result_FundingCreatedDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_FundingCreatedDecodeErrorZ.swift; sourceTree = ""; }; + 07A441FB266ED3EA00B5F16F /* Result_TxCreationKeysErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_TxCreationKeysErrorZ.swift; sourceTree = ""; }; + 07A441FC266ED3EA00B5F16F /* Result_PingDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_PingDecodeErrorZ.swift; sourceTree = ""; }; + 07A441FD266ED3EA00B5F16F /* Result_UpdateFulfillHTLCDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UpdateFulfillHTLCDecodeErrorZ.swift; sourceTree = ""; }; + 07A441FE266ED3EA00B5F16F /* Result_NonePaymentSendFailureZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NonePaymentSendFailureZ.swift; sourceTree = ""; }; + 07A441FF266ED3EA00B5F16F /* Result_CVec_u8ZPeerHandleErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CVec_u8ZPeerHandleErrorZ.swift; sourceTree = ""; }; + 07A44200266ED3EA00B5F16F /* Result_StaticPaymentOutputDescriptorDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_StaticPaymentOutputDescriptorDecodeErrorZ.swift; sourceTree = ""; }; + 07A44201266ED3EA00B5F16F /* Result_DirectionalChannelInfoDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_DirectionalChannelInfoDecodeErrorZ.swift; sourceTree = ""; }; + 07A44202266ED3EA00B5F16F /* Result_RouteDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RouteDecodeErrorZ.swift; sourceTree = ""; }; + 07A44203266ED3EA00B5F16F /* Result_RevokeAndACKDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RevokeAndACKDecodeErrorZ.swift; sourceTree = ""; }; + 07A44204266ED3EA00B5F16F /* Result_OpenChannelDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_OpenChannelDecodeErrorZ.swift; sourceTree = ""; }; + 07A44205266ED3EA00B5F16F /* Result_ChannelInfoDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelInfoDecodeErrorZ.swift; sourceTree = ""; }; + 07A44206266ED3EA00B5F16F /* Result_RouteHintCreationErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RouteHintCreationErrorZ.swift; sourceTree = ""; }; + 07A44207266ED3EA00B5F16F /* Result_PongDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_PongDecodeErrorZ.swift; sourceTree = ""; }; + 07A44208266ED3EA00B5F16F /* Result_ChannelPublicKeysDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelPublicKeysDecodeErrorZ.swift; sourceTree = ""; }; + 07A44209266ED3EA00B5F16F /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_BuiltCommitmentTransactionDecodeErrorZ.swift; sourceTree = ""; }; + 07A4420A266ED3EA00B5F16F /* Result_PaymentSecretAPIErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_PaymentSecretAPIErrorZ.swift; sourceTree = ""; }; + 07A4420B266ED3EA00B5F16F /* Result_SpendableOutputDescriptorDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_SpendableOutputDescriptorDecodeErrorZ.swift; sourceTree = ""; }; + 07A4420C266ED3EA00B5F16F /* Result_UnsignedChannelUpdateDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UnsignedChannelUpdateDecodeErrorZ.swift; sourceTree = ""; }; + 07A4420D266ED3EA00B5F16F /* Result_ErrorMessageDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ErrorMessageDecodeErrorZ.swift; sourceTree = ""; }; + 07A4420E266ED3EA00B5F16F /* Result_AcceptChannelDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_AcceptChannelDecodeErrorZ.swift; sourceTree = ""; }; + 07A4420F266ED3EA00B5F16F /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UnsignedNodeAnnouncementDecodeErrorZ.swift; sourceTree = ""; }; + 07A44210266ED3EA00B5F16F /* Result_NodeFeaturesDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NodeFeaturesDecodeErrorZ.swift; sourceTree = ""; }; + 07A44211266ED3EA00B5F16F /* Result_TrustedCommitmentTransactionNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_TrustedCommitmentTransactionNoneZ.swift; sourceTree = ""; }; + 07A44212266ED3EA00B5F16F /* Result_AnnouncementSignaturesDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_AnnouncementSignaturesDecodeErrorZ.swift; sourceTree = ""; }; + 07A44213266ED3EA00B5F16F /* Result_StringErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_StringErrorZ.swift; sourceTree = ""; }; + 07A44214266ED3EA00B5F16F /* Result_HolderCommitmentTransactionDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_HolderCommitmentTransactionDecodeErrorZ.swift; sourceTree = ""; }; + 07A44215266ED3EA00B5F16F /* Result_RouteHopDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RouteHopDecodeErrorZ.swift; sourceTree = ""; }; + 07A44216266ED3EA00B5F16F /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UnsignedChannelAnnouncementDecodeErrorZ.swift; sourceTree = ""; }; + 07A44217266ED3EA00B5F16F /* Result_CommitmentSignedDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CommitmentSignedDecodeErrorZ.swift; sourceTree = ""; }; + 07A44218266ED3EA00B5F16F /* Result_NonePeerHandleErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NonePeerHandleErrorZ.swift; sourceTree = ""; }; + 07A44219266ED3EA00B5F16F /* Result_NoneMonitorUpdateErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NoneMonitorUpdateErrorZ.swift; sourceTree = ""; }; + 07A4421A266ED3EA00B5F16F /* Result_TxOutAccessErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_TxOutAccessErrorZ.swift; sourceTree = ""; }; + 07A4421B266ED3EA00B5F16F /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CResult_NetAddressu8ZDecodeErrorZ.swift; sourceTree = ""; }; + 07A4421C266ED3EA00B5F16F /* Result_NoneLightningErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NoneLightningErrorZ.swift; sourceTree = ""; }; + 07A4421D266ED3EA00B5F16F /* Result_NoneAPIErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NoneAPIErrorZ.swift; sourceTree = ""; }; + 07A4421E266ED3EA00B5F16F /* Result_PublicKeyErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_PublicKeyErrorZ.swift; sourceTree = ""; }; + 07A4421F266ED3EA00B5F16F /* Result_boolLightningErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_boolLightningErrorZ.swift; sourceTree = ""; }; + 07A44220266ED3EA00B5F16F /* Result_ChannelUpdateDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelUpdateDecodeErrorZ.swift; sourceTree = ""; }; + 07A44221266ED3EA00B5F16F /* Result_UpdateFeeDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UpdateFeeDecodeErrorZ.swift; sourceTree = ""; }; + 07A44222266ED3EA00B5F16F /* Result_DescriptionCreationErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_DescriptionCreationErrorZ.swift; sourceTree = ""; }; + 07A44223266ED3EA00B5F16F /* Result_CommitmentTransactionDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CommitmentTransactionDecodeErrorZ.swift; sourceTree = ""; }; + 07A44224266ED3EA00B5F16F /* Result_SiPrefixNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_SiPrefixNoneZ.swift; sourceTree = ""; }; + 07A44225266ED3EA00B5F16F /* Result_FundingSignedDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_FundingSignedDecodeErrorZ.swift; sourceTree = ""; }; + 07A44226266ED3EA00B5F16F /* Result_InvoiceFeaturesDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InvoiceFeaturesDecodeErrorZ.swift; sourceTree = ""; }; + 07A44227266ED3EA00B5F16F /* Result_TransactionNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_TransactionNoneZ.swift; sourceTree = ""; }; + 07A44228266ED3EA00B5F16F /* Result_NetworkGraphDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NetworkGraphDecodeErrorZ.swift; sourceTree = ""; }; + 07A44229266ED3EA00B5F16F /* Result_ChannelAnnouncementDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelAnnouncementDecodeErrorZ.swift; sourceTree = ""; }; + 07A4422A266ED3EA00B5F16F /* Result_NoneSemanticErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NoneSemanticErrorZ.swift; sourceTree = ""; }; + 07A4422B266ED3EA00B5F16F /* Result_InvoiceSignOrCreationErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InvoiceSignOrCreationErrorZ.swift; sourceTree = ""; }; + 07A4422C266ED3EA00B5F16F /* Result_InvoiceNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InvoiceNoneZ.swift; sourceTree = ""; }; + 07A4422D266ED3EA00B5F16F /* Result_RoutingFeesDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RoutingFeesDecodeErrorZ.swift; sourceTree = ""; }; + 07A4422E266ED3EA00B5F16F /* Result_ChannelReestablishDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelReestablishDecodeErrorZ.swift; sourceTree = ""; }; + 07A4422F266ED3EA00B5F16F /* Result_GossipTimestampFilterDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_GossipTimestampFilterDecodeErrorZ.swift; sourceTree = ""; }; + 07A44230266ED3EA00B5F16F /* Result_CVec_CVec_u8ZZNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CVec_CVec_u8ZZNoneZ.swift; sourceTree = ""; }; + 07A44231266ED3EA00B5F16F /* Result_SecretKeyErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_SecretKeyErrorZ.swift; sourceTree = ""; }; + 07A44232266ED3EA00B5F16F /* Result_HTLCUpdateDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_HTLCUpdateDecodeErrorZ.swift; sourceTree = ""; }; + 07A44233266ED3EA00B5F16F /* Result_RouteLightningErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RouteLightningErrorZ.swift; sourceTree = ""; }; + 07A44234266ED3EA00B5F16F /* Result_InvoiceSemanticErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InvoiceSemanticErrorZ.swift; sourceTree = ""; }; + 07A44235266ED3EA00B5F16F /* Result_SignedRawInvoiceNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_SignedRawInvoiceNoneZ.swift; sourceTree = ""; }; + 07A44236266ED3EA00B5F16F /* Result_InitFeaturesDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InitFeaturesDecodeErrorZ.swift; sourceTree = ""; }; + 07A44237266ED3EA00B5F16F /* Result_NetAddressDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NetAddressDecodeErrorZ.swift; sourceTree = ""; }; + 07A44238266ED3EA00B5F16F /* Result_RecoverableSignatureNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_RecoverableSignatureNoneZ.swift; sourceTree = ""; }; + 07A44239266ED3EA00B5F16F /* Result_CVec_SignatureZNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CVec_SignatureZNoneZ.swift; sourceTree = ""; }; + 07A4423A266ED3EA00B5F16F /* Result_ChannelMonitorUpdateDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelMonitorUpdateDecodeErrorZ.swift; sourceTree = ""; }; + 07A4423B266ED3EA00B5F16F /* Result_SignatureNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_SignatureNoneZ.swift; sourceTree = ""; }; + 07A4423C266ED3EA00B5F16F /* Result_NoneErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NoneErrorZ.swift; sourceTree = ""; }; + 07A4423D266ED3EA00B5F16F /* Result_UpdateAddHTLCDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UpdateAddHTLCDecodeErrorZ.swift; sourceTree = ""; }; + 07A4423E266ED3EA00B5F16F /* Result_NetAddressu8Z.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NetAddressu8Z.swift; sourceTree = ""; }; + 07A4423F266ED3EA00B5F16F /* Result_FundingLockedDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_FundingLockedDecodeErrorZ.swift; sourceTree = ""; }; + 07A44240266ED3EA00B5F16F /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift; sourceTree = ""; }; + 07A44241266ED3EA00B5F16F /* Result_QueryShortChannelIdsDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_QueryShortChannelIdsDecodeErrorZ.swift; sourceTree = ""; }; + 07A44242266ED3EA00B5F16F /* Result_SignDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_SignDecodeErrorZ.swift; sourceTree = ""; }; + 07A44243266ED3EA00B5F16F /* Result_boolPeerHandleErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_boolPeerHandleErrorZ.swift; sourceTree = ""; }; + 07A44244266ED3EA00B5F16F /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift; sourceTree = ""; }; + 07A44245266ED3EA00B5F16F /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift; sourceTree = ""; }; + 07A44246266ED3EA00B5F16F /* Result_ReplyChannelRangeDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ReplyChannelRangeDecodeErrorZ.swift; sourceTree = ""; }; + 07A44247266ED3EA00B5F16F /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UpdateFailMalformedHTLCDecodeErrorZ.swift; sourceTree = ""; }; + 07A44248266ED3EA00B5F16F /* Result_UpdateFailHTLCDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_UpdateFailHTLCDecodeErrorZ.swift; sourceTree = ""; }; + 07A44249266ED3EA00B5F16F /* Result_TxCreationKeysDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_TxCreationKeysDecodeErrorZ.swift; sourceTree = ""; }; + 07A4424A266ED3EA00B5F16F /* Result_PositiveTimestampCreationErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_PositiveTimestampCreationErrorZ.swift; sourceTree = ""; }; + 07A4424B266ED3EA00B5F16F /* Result_OutPointDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_OutPointDecodeErrorZ.swift; sourceTree = ""; }; + 07A4424C266ED3EA00B5F16F /* Result_NodeAnnouncementDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NodeAnnouncementDecodeErrorZ.swift; sourceTree = ""; }; + 07A4424D266ED3EA00B5F16F /* Result_PayeePubKeyErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_PayeePubKeyErrorZ.swift; sourceTree = ""; }; + 07A4424E266ED3EA00B5F16F /* Result_ShutdownDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ShutdownDecodeErrorZ.swift; sourceTree = ""; }; + 07A4424F266ED3EA00B5F16F /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift; sourceTree = ""; }; + 07A44250266ED3EA00B5F16F /* Result_NodeAnnouncementInfoDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NodeAnnouncementInfoDecodeErrorZ.swift; sourceTree = ""; }; + 07A44251266ED3EA00B5F16F /* Result_NodeInfoDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NodeInfoDecodeErrorZ.swift; sourceTree = ""; }; + 07A44252266ED3EA00B5F16F /* Result_ExpiryTimeCreationErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ExpiryTimeCreationErrorZ.swift; sourceTree = ""; }; + 07A44253266ED3EA00B5F16F /* Result_ChannelFeaturesDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ChannelFeaturesDecodeErrorZ.swift; sourceTree = ""; }; + 07A44254266ED3EA00B5F16F /* Result_DelayedPaymentOutputDescriptorDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_DelayedPaymentOutputDescriptorDecodeErrorZ.swift; sourceTree = ""; }; + 07A44255266ED3EA00B5F16F /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_HTLCOutputInCommitmentDecodeErrorZ.swift; sourceTree = ""; }; + 07A44256266ED3EA00B5F16F /* Result_InitDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InitDecodeErrorZ.swift; sourceTree = ""; }; + 07A44257266ED3EA00B5F16F /* Result_NoneChannelMonitorUpdateErrZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_NoneChannelMonitorUpdateErrZ.swift; sourceTree = ""; }; + 07A44258266ED3EA00B5F16F /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift; sourceTree = ""; }; + 07A44259266ED3EA00B5F16F /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ReplyShortChannelIdsEndDecodeErrorZ.swift; sourceTree = ""; }; + 07A4425A266ED3EA00B5F16F /* Result_ClosingSignedDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_ClosingSignedDecodeErrorZ.swift; sourceTree = ""; }; + 07A4425B266ED3EA00B5F16F /* Result_InMemorySignerDecodeErrorZ.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Result_InMemorySignerDecodeErrorZ.swift; sourceTree = ""; }; + 07A4425D266ED3EA00B5F16F /* MessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MessageHandler.swift; sourceTree = ""; }; + 07A4425E266ED3EA00B5F16F /* ChainMonitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChainMonitor.swift; sourceTree = ""; }; + 07A4425F266ED3EA00B5F16F /* PayeePubKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PayeePubKey.swift; sourceTree = ""; }; + 07A44260266ED3EA00B5F16F /* MonitorUpdateError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MonitorUpdateError.swift; sourceTree = ""; }; + 07A44261266ED3EA00B5F16F /* Description.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Description.swift; sourceTree = ""; }; + 07A44262266ED3EA00B5F16F /* LockedNetworkGraph.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LockedNetworkGraph.swift; sourceTree = ""; }; + 07A44263266ED3EA00B5F16F /* RevokeAndACK.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RevokeAndACK.swift; sourceTree = ""; }; + 07A44264266ED3EA00B5F16F /* Ping.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Ping.swift; sourceTree = ""; }; + 07A44265266ED3EA00B5F16F /* PositiveTimestamp.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PositiveTimestamp.swift; sourceTree = ""; }; + 07A44266266ED3EA00B5F16F /* UpdateAddHTLC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateAddHTLC.swift; sourceTree = ""; }; + 07A44267266ED3EA00B5F16F /* UpdateFailMalformedHTLC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateFailMalformedHTLC.swift; sourceTree = ""; }; + 07A44268266ED3EA00B5F16F /* ChannelMonitorUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelMonitorUpdate.swift; sourceTree = ""; }; + 07A44269266ED3EA00B5F16F /* RouteHint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteHint.swift; sourceTree = ""; }; + 07A4426A266ED3EA00B5F16F /* Sha256.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Sha256.swift; sourceTree = ""; }; + 07A4426B266ED3EA00B5F16F /* HTLCOutputInCommitment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTLCOutputInCommitment.swift; sourceTree = ""; }; + 07A4426C266ED3EA00B5F16F /* ChannelReestablish.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelReestablish.swift; sourceTree = ""; }; + 07A4426D266ED3EA00B5F16F /* RouteHintHop.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteHintHop.swift; sourceTree = ""; }; + 07A4426E266ED3EA00B5F16F /* ChannelManagerReadArgs.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelManagerReadArgs.swift; sourceTree = ""; }; + 07A4426F266ED3EA00B5F16F /* UpdateFulfillHTLC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateFulfillHTLC.swift; sourceTree = ""; }; + 07A44270266ED3EA00B5F16F /* NodeFeatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NodeFeatures.swift; sourceTree = ""; }; + 07A44271266ED3EA00B5F16F /* NetGraphMsgHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetGraphMsgHandler.swift; sourceTree = ""; }; + 07A44272266ED3EA00B5F16F /* InvoiceFeatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InvoiceFeatures.swift; sourceTree = ""; }; + 07A44273266ED3EA00B5F16F /* Invoice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Invoice.swift; sourceTree = ""; }; + 07A44274266ED3EA00B5F16F /* RoutingFees.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoutingFees.swift; sourceTree = ""; }; + 07A44275266ED3EA00B5F16F /* ChannelMonitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelMonitor.swift; sourceTree = ""; }; + 07A44276266ED3EB00B5F16F /* BestBlock.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BestBlock.swift; sourceTree = ""; }; + 07A44277266ED3EB00B5F16F /* UpdateFee.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateFee.swift; sourceTree = ""; }; + 07A44278266ED3EB00B5F16F /* UnsignedChannelUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnsignedChannelUpdate.swift; sourceTree = ""; }; + 07A44279266ED3EB00B5F16F /* QueryShortChannelIds.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QueryShortChannelIds.swift; sourceTree = ""; }; + 07A4427A266ED3EB00B5F16F /* NetworkGraph.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkGraph.swift; sourceTree = ""; }; + 07A4427B266ED3EB00B5F16F /* CommitmentTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommitmentTransaction.swift; sourceTree = ""; }; + 07A4427C266ED3EB00B5F16F /* KeysManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeysManager.swift; sourceTree = ""; }; + 07A4427D266ED3EB00B5F16F /* FundingCreated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FundingCreated.swift; sourceTree = ""; }; + 07A4427E266ED3EB00B5F16F /* CounterpartyChannelTransactionParameters.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CounterpartyChannelTransactionParameters.swift; sourceTree = ""; }; + 07A4427F266ED3EB00B5F16F /* ChannelAnnouncement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelAnnouncement.swift; sourceTree = ""; }; + 07A44280266ED3EB00B5F16F /* ReplyShortChannelIdsEnd.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReplyShortChannelIdsEnd.swift; sourceTree = ""; }; + 07A44281266ED3EB00B5F16F /* IgnoringMessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IgnoringMessageHandler.swift; sourceTree = ""; }; + 07A44282266ED3EB00B5F16F /* PeerManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerManager.swift; sourceTree = ""; }; + 07A44283266ED3EB00B5F16F /* UpdateFailHTLC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UpdateFailHTLC.swift; sourceTree = ""; }; + 07A44284266ED3EB00B5F16F /* FundingLocked.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FundingLocked.swift; sourceTree = ""; }; + 07A44285266ED3EB00B5F16F /* StaticPaymentOutputDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StaticPaymentOutputDescriptor.swift; sourceTree = ""; }; + 07A44286266ED3EB00B5F16F /* HTLCUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTLCUpdate.swift; sourceTree = ""; }; + 07A44287266ED3EB00B5F16F /* InMemorySigner.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InMemorySigner.swift; sourceTree = ""; }; + 07A44288266ED3EB00B5F16F /* GossipTimestampFilter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GossipTimestampFilter.swift; sourceTree = ""; }; + 07A44289266ED3EB00B5F16F /* PeerHandleError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PeerHandleError.swift; sourceTree = ""; }; + 07A4428A266ED3EB00B5F16F /* ErroringMessageHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErroringMessageHandler.swift; sourceTree = ""; }; + 07A4428B266ED3EB00B5F16F /* CommitmentSigned.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommitmentSigned.swift; sourceTree = ""; }; + 07A4428C266ED3EB00B5F16F /* TxCreationKeys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TxCreationKeys.swift; sourceTree = ""; }; + 07A4428D266ED3EB00B5F16F /* RawInvoice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RawInvoice.swift; sourceTree = ""; }; + 07A4428E266ED3EB00B5F16F /* Pong.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Pong.swift; sourceTree = ""; }; + 07A4428F266ED3EB00B5F16F /* ExpiryTime.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExpiryTime.swift; sourceTree = ""; }; + 07A44290266ED3EB00B5F16F /* ChannelConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelConfig.swift; sourceTree = ""; }; + 07A44291266ED3EB00B5F16F /* DecodeError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DecodeError.swift; sourceTree = ""; }; + 07A44292266ED3EB00B5F16F /* QueryChannelRange.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QueryChannelRange.swift; sourceTree = ""; }; + 07A44293266ED3EB00B5F16F /* HolderCommitmentTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HolderCommitmentTransaction.swift; sourceTree = ""; }; + 07A44294266ED3EB00B5F16F /* ChannelTransactionParameters.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelTransactionParameters.swift; sourceTree = ""; }; + 07A44295266ED3EB00B5F16F /* NodeInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NodeInfo.swift; sourceTree = ""; }; + 07A44296266ED3EB00B5F16F /* BackgroundProcessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BackgroundProcessor.swift; sourceTree = ""; }; + 07A44297266ED3EB00B5F16F /* DirectedChannelTransactionParameters.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DirectedChannelTransactionParameters.swift; sourceTree = ""; }; + 07A44298266ED3EB00B5F16F /* ChannelHandshakeConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelHandshakeConfig.swift; sourceTree = ""; }; + 07A44299266ED3EB00B5F16F /* ChannelManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelManager.swift; sourceTree = ""; }; + 07A4429A266ED3EB00B5F16F /* Shutdown.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Shutdown.swift; sourceTree = ""; }; + 07A4429B266ED3EB00B5F16F /* ChainParameters.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChainParameters.swift; sourceTree = ""; }; + 07A4429C266ED3EB00B5F16F /* AcceptChannel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AcceptChannel.swift; sourceTree = ""; }; + 07A4429D266ED3EB00B5F16F /* FilesystemPersister.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FilesystemPersister.swift; sourceTree = ""; }; + 07A4429E266ED3EB00B5F16F /* ChannelHandshakeLimits.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelHandshakeLimits.swift; sourceTree = ""; }; + 07A4429F266ED3EB00B5F16F /* AnnouncementSignatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnnouncementSignatures.swift; sourceTree = ""; }; + 07A442A0266ED3EB00B5F16F /* CommitmentUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommitmentUpdate.swift; sourceTree = ""; }; + 07A442A1266ED3EB00B5F16F /* ClosingSigned.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ClosingSigned.swift; sourceTree = ""; }; + 07A442A2266ED3EB00B5F16F /* DirectionalChannelInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DirectionalChannelInfo.swift; sourceTree = ""; }; + 07A442A3266ED3EB00B5F16F /* ChannelDetails.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelDetails.swift; sourceTree = ""; }; + 07A442A4266ED3EB00B5F16F /* NodeAnnouncementInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NodeAnnouncementInfo.swift; sourceTree = ""; }; + 07A442A5266ED3EB00B5F16F /* UnsignedChannelAnnouncement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnsignedChannelAnnouncement.swift; sourceTree = ""; }; + 07A442A6266ED3EB00B5F16F /* LightningError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LightningError.swift; sourceTree = ""; }; + 07A442A7266ED3EB00B5F16F /* MinFinalCltvExpiry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MinFinalCltvExpiry.swift; sourceTree = ""; }; + 07A442A8266ED3EB00B5F16F /* DataLossProtect.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataLossProtect.swift; sourceTree = ""; }; + 07A442A9266ED3EB00B5F16F /* ErrorMessage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ErrorMessage.swift; sourceTree = ""; }; + 07A442AA266ED3EB00B5F16F /* RouteHop.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RouteHop.swift; sourceTree = ""; }; + 07A442AB266ED3EB00B5F16F /* WatchedOutput.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WatchedOutput.swift; sourceTree = ""; }; + 07A442AC266ED3EB00B5F16F /* ChannelUpdate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelUpdate.swift; sourceTree = ""; }; + 07A442AD266ED3EB00B5F16F /* ReplyChannelRange.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReplyChannelRange.swift; sourceTree = ""; }; + 07A442AE266ED3EB00B5F16F /* InitFeatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InitFeatures.swift; sourceTree = ""; }; + 07A442AF266ED3EB00B5F16F /* NodeAnnouncement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NodeAnnouncement.swift; sourceTree = ""; }; + 07A442B0266ED3EB00B5F16F /* RawDataPart.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RawDataPart.swift; sourceTree = ""; }; + 07A442B1266ED3EB00B5F16F /* ChannelPublicKeys.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelPublicKeys.swift; sourceTree = ""; }; + 07A442B2266ED3EB00B5F16F /* ChannelInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelInfo.swift; sourceTree = ""; }; + 07A442B3266ED3EB00B5F16F /* InvoiceSignature.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InvoiceSignature.swift; sourceTree = ""; }; + 07A442B4266ED3EB00B5F16F /* OpenChannel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenChannel.swift; sourceTree = ""; }; + 07A442B5266ED3EB00B5F16F /* FundingSigned.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FundingSigned.swift; sourceTree = ""; }; + 07A442B6266ED3EB00B5F16F /* SignedRawInvoice.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SignedRawInvoice.swift; sourceTree = ""; }; + 07A442B7266ED3EB00B5F16F /* Init.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Init.swift; sourceTree = ""; }; + 07A442B8266ED3EB00B5F16F /* UnsignedNodeAnnouncement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnsignedNodeAnnouncement.swift; sourceTree = ""; }; + 07A442B9266ED3EB00B5F16F /* TrustedCommitmentTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrustedCommitmentTransaction.swift; sourceTree = ""; }; + 07A442BA266ED3EB00B5F16F /* ChannelFeatures.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChannelFeatures.swift; sourceTree = ""; }; + 07A442BB266ED3EB00B5F16F /* BuiltCommitmentTransaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BuiltCommitmentTransaction.swift; sourceTree = ""; }; + 07A442BC266ED3EB00B5F16F /* UserConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserConfig.swift; sourceTree = ""; }; + 07A442BD266ED3EB00B5F16F /* Route.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Route.swift; sourceTree = ""; }; + 07A442BE266ED3EB00B5F16F /* OutPoint.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OutPoint.swift; sourceTree = ""; }; + 07A442BF266ED3EB00B5F16F /* DelayedPaymentOutputDescriptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DelayedPaymentOutputDescriptor.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -813,7 +588,7 @@ children = ( 07344FAC26428B09001CD90E /* headers */, 0749F9C3265615CB00876C52 /* batteries */, - 07344CD02642882A001CD90E /* LDK */, + 07A441C4266ED3EA00B5F16F /* LDK */, 07344C57264277ED001CD90E /* LDKFramework.h */, 07344C58264277ED001CD90E /* Info.plist */, 07344C8626427F95001CD90E /* LDKExampleClass.swift */, @@ -830,320 +605,327 @@ path = LDKFrameworkTests; sourceTree = ""; }; - 07344CD02642882A001CD90E /* LDK */ = { + 07344FA826428AD0001CD90E /* Frameworks */ = { isa = PBXGroup; children = ( - 07344CD12642882A001CD90E /* options */, - 07344CE02642882A001CD90E /* traits */, - 07344CF22642882A001CD90E /* tuples */, - 07344CFF2642882A001CD90E /* Bindings.swift */, - 07344D002642882A001CD90E /* results */, - 07344D622642882A001CD90E /* structs */, + 07344FE526429524001CD90E /* libldk.a */, ); - name = LDK; - path = ../../../bindings/LDK; + name = Frameworks; sourceTree = ""; }; - 07344CD12642882A001CD90E /* options */ = { + 07344FAC26428B09001CD90E /* headers */ = { isa = PBXGroup; children = ( - 07344CD22642882A001CD90E /* PaymentSendFailure.swift */, - 07344CD32642882A001CD90E /* Option_u64Z.swift */, - 07344CD42642882A001CD90E /* Fallback.swift */, - 07344CD52642882A001CD90E /* Option_C2Tuple_usizeTransactionZZ.swift */, - 07344CD62642882A001CD90E /* APIError.swift */, - 07344CD72642882A001CD90E /* Event.swift */, - 07344CD82642882A001CD90E /* HTLCFailChannelUpdate.swift */, - 07344CD92642882A001CD90E /* ErrorAction.swift */, - 07344CDA2642882A001CD90E /* Option_u32Z.swift */, - 07344CDB2642882A001CD90E /* NetAddress.swift */, - 07344CDC2642882A001CD90E /* SignOrCreationError.swift */, - 07344CDD2642882A001CD90E /* MessageSendEvent.swift */, - 07344CDE2642882A001CD90E /* MonitorEvent.swift */, - 07344CDF2642882A001CD90E /* SpendableOutputDescriptor.swift */, + 0734505F26445915001CD90E /* ldk_rust_types.h */, + 0734505E26445915001CD90E /* ldk_ver.h */, + 0734505D26445915001CD90E /* lightning.h */, ); - path = options; + name = headers; + path = ../../../bindings/headers; sourceTree = ""; }; - 07344CE02642882A001CD90E /* traits */ = { + 0749F9C3265615CB00876C52 /* batteries */ = { isa = PBXGroup; children = ( - 07344CE12642882A001CD90E /* BaseSign.swift */, - 07344CE22642882A001CD90E /* Persist.swift */, - 07344CE32642882A001CD90E /* KeysInterface.swift */, - 07344CE42642882A001CD90E /* Logger.swift */, - 07344CE52642882A001CD90E /* SocketDescriptor.swift */, - 07344CE62642882A001CD90E /* FeeEstimator.swift */, - 07344CE72642882A001CD90E /* MessageSendEventsProvider.swift */, - 07344CE82642882A001CD90E /* BroadcasterInterface.swift */, - 07344CE92642882A001CD90E /* Confirm.swift */, - 07344CEA2642882A001CD90E /* RoutingMessageHandler.swift */, - 07344CEB2642882A001CD90E /* Listen.swift */, - 07344CEC2642882A001CD90E /* ChannelMessageHandler.swift */, - 07344CED2642882A001CD90E /* Filter.swift */, - 07344CEE2642882A001CD90E /* Access.swift */, - 07344CEF2642882A001CD90E /* EventsProvider.swift */, - 07344CF02642882A001CD90E /* Watch.swift */, - 07344CF12642882A001CD90E /* Sign.swift */, + 0749F9C4265615CB00876C52 /* ChannelManagerConstructor.swift */, + 0749F9C5265615CB00876C52 /* UtilMethods.swift */, ); - path = traits; + name = batteries; + path = ../../../bindings/batteries; sourceTree = ""; }; - 07344CF22642882A001CD90E /* tuples */ = { + 07A441C4266ED3EA00B5F16F /* LDK */ = { isa = PBXGroup; children = ( - 07344CF32642882A001CD90E /* C2Tuple_BlockHashChannelMonitorZ.swift */, - 07344CF42642882A001CD90E /* C2Tuple_SignatureCVec_SignatureZZ.swift */, - 07344CF52642882A001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift */, - 07344CF62642882A001CD90E /* C2Tuple_BlockHashChannelManagerZ.swift */, - 07344CF72642882A001CD90E /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift */, - 07344CF82642882A001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift */, - 07344CF92642882A001CD90E /* C2Tuple_PaymentHashPaymentSecretZ.swift */, - 07344CFA2642882A001CD90E /* C2Tuple_u32TxOutZ.swift */, - 07344CFB2642882A001CD90E /* C2Tuple_OutPointScriptZ.swift */, - 07344CFC2642882A001CD90E /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift */, - 07344CFD2642882A001CD90E /* C2Tuple_u32ScriptZ.swift */, - 07344CFE2642882A001CD90E /* C2Tuple_usizeTransactionZ.swift */, + 07A441C5266ED3EA00B5F16F /* options */, + 07A441D4266ED3EA00B5F16F /* traits */, + 07A441E8266ED3EA00B5F16F /* tuples */, + 07A441F5266ED3EA00B5F16F /* Bindings.swift */, + 07A441F6266ED3EA00B5F16F /* results */, + 07A4425C266ED3EA00B5F16F /* structs */, ); - path = tuples; + name = LDK; + path = ../../../bindings/LDK; sourceTree = ""; }; - 07344D002642882A001CD90E /* results */ = { + 07A441C5266ED3EA00B5F16F /* options */ = { isa = PBXGroup; children = ( - 07344D012642882A001CD90E /* Result_ChannelConfigDecodeErrorZ.swift */, - 07344D022642882A001CD90E /* Result_ChannelTransactionParametersDecodeErrorZ.swift */, - 07344D032642882A001CD90E /* Result_QueryChannelRangeDecodeErrorZ.swift */, - 07344D042642882A001CD90E /* Result_FundingCreatedDecodeErrorZ.swift */, - 07344D052642882A001CD90E /* Result_TxCreationKeysErrorZ.swift */, - 07344D062642882A001CD90E /* Result_PingDecodeErrorZ.swift */, - 07344D072642882A001CD90E /* Result_UpdateFulfillHTLCDecodeErrorZ.swift */, - 07344D082642882A001CD90E /* Result_NonePaymentSendFailureZ.swift */, - 07344D092642882A001CD90E /* Result_CVec_u8ZPeerHandleErrorZ.swift */, - 07344D0A2642882A001CD90E /* Result_DirectionalChannelInfoDecodeErrorZ.swift */, - 07344D0B2642882A001CD90E /* Result_RouteDecodeErrorZ.swift */, - 07344D0C2642882A001CD90E /* Result_RevokeAndACKDecodeErrorZ.swift */, - 07344D0D2642882A001CD90E /* Result_OpenChannelDecodeErrorZ.swift */, - 07344D0E2642882A001CD90E /* Result_ChannelInfoDecodeErrorZ.swift */, - 07344D0F2642882A001CD90E /* Result_RouteHintCreationErrorZ.swift */, - 07344D102642882A001CD90E /* Result_PongDecodeErrorZ.swift */, - 07344D112642882A001CD90E /* Result_ChannelPublicKeysDecodeErrorZ.swift */, - 07344D122642882A001CD90E /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift */, - 07344D132642882A001CD90E /* Result_PaymentSecretAPIErrorZ.swift */, - 07344D142642882A001CD90E /* Result_SpendableOutputDescriptorDecodeErrorZ.swift */, - 07344D152642882A001CD90E /* Result_UnsignedChannelUpdateDecodeErrorZ.swift */, - 07344D162642882A001CD90E /* Result_ErrorMessageDecodeErrorZ.swift */, - 07344D172642882A001CD90E /* Result_AcceptChannelDecodeErrorZ.swift */, - 07344D182642882A001CD90E /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift */, - 07344D192642882A001CD90E /* Result_NodeFeaturesDecodeErrorZ.swift */, - 07344D1A2642882A001CD90E /* Result_TrustedCommitmentTransactionNoneZ.swift */, - 07344D1B2642882A001CD90E /* Result_AnnouncementSignaturesDecodeErrorZ.swift */, - 07344D1C2642882A001CD90E /* Result_StringErrorZ.swift */, - 07344D1D2642882A001CD90E /* Result_HolderCommitmentTransactionDecodeErrorZ.swift */, - 07344D1E2642882A001CD90E /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift */, - 07344D1F2642882A001CD90E /* Result_CommitmentSignedDecodeErrorZ.swift */, - 07344D202642882A001CD90E /* Result_NonePeerHandleErrorZ.swift */, - 07344D212642882A001CD90E /* Result_NoneMonitorUpdateErrorZ.swift */, - 07344D222642882A001CD90E /* Result_TxOutAccessErrorZ.swift */, - 07344D232642882A001CD90E /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift */, - 07344D242642882A001CD90E /* Result_NoneLightningErrorZ.swift */, - 07344D252642882A001CD90E /* Result_NoneAPIErrorZ.swift */, - 07344D262642882A001CD90E /* Result_PublicKeyErrorZ.swift */, - 07344D272642882A001CD90E /* Result_boolLightningErrorZ.swift */, - 07344D282642882A001CD90E /* Result_ChannelUpdateDecodeErrorZ.swift */, - 07344D292642882A001CD90E /* Result_UpdateFeeDecodeErrorZ.swift */, - 07344D2A2642882A001CD90E /* Result_DescriptionCreationErrorZ.swift */, - 07344D2B2642882A001CD90E /* Result_CommitmentTransactionDecodeErrorZ.swift */, - 07344D2C2642882A001CD90E /* Result_SiPrefixNoneZ.swift */, - 07344D2D2642882A001CD90E /* Result_FundingSignedDecodeErrorZ.swift */, - 07344D2E2642882A001CD90E /* Result_InvoiceFeaturesDecodeErrorZ.swift */, - 07344D2F2642882A001CD90E /* Result_TransactionNoneZ.swift */, - 07344D302642882A001CD90E /* Result_NetworkGraphDecodeErrorZ.swift */, - 07344D312642882A001CD90E /* Result_ChannelAnnouncementDecodeErrorZ.swift */, - 07344D322642882A001CD90E /* Result_NoneSemanticErrorZ.swift */, - 07344D332642882A001CD90E /* Result_InvoiceSignOrCreationErrorZ.swift */, - 07344D342642882A001CD90E /* Result_InvoiceNoneZ.swift */, - 07344D352642882A001CD90E /* Result_RoutingFeesDecodeErrorZ.swift */, - 07344D362642882A001CD90E /* Result_ChannelReestablishDecodeErrorZ.swift */, - 07344D372642882A001CD90E /* Result_GossipTimestampFilterDecodeErrorZ.swift */, - 07344D382642882A001CD90E /* Result_CVec_CVec_u8ZZNoneZ.swift */, - 07344D392642882A001CD90E /* Result_SecretKeyErrorZ.swift */, - 07344D3A2642882A001CD90E /* Result_HTLCUpdateDecodeErrorZ.swift */, - 07344D3B2642882A001CD90E /* Result_RouteLightningErrorZ.swift */, - 07344D3C2642882A001CD90E /* Result_InvoiceSemanticErrorZ.swift */, - 07344D3D2642882A001CD90E /* Result_SignedRawInvoiceNoneZ.swift */, - 07344D3E2642882A001CD90E /* Result_InitFeaturesDecodeErrorZ.swift */, - 07344D3F2642882A001CD90E /* Result_RecoverableSignatureNoneZ.swift */, - 07344D402642882A001CD90E /* Result_CVec_SignatureZNoneZ.swift */, - 07344D412642882A001CD90E /* Result_ChannelMonitorUpdateDecodeErrorZ.swift */, - 07344D422642882A001CD90E /* Result_SignatureNoneZ.swift */, - 07344D432642882A001CD90E /* Result_NoneErrorZ.swift */, - 07344D442642882A001CD90E /* Result_UpdateAddHTLCDecodeErrorZ.swift */, - 07344D452642882A001CD90E /* Result_NetAddressu8Z.swift */, - 07344D462642882A001CD90E /* Result_FundingLockedDecodeErrorZ.swift */, - 07344D472642882A001CD90E /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift */, - 07344D482642882A001CD90E /* Result_QueryShortChannelIdsDecodeErrorZ.swift */, - 07344D492642882A001CD90E /* Result_SignDecodeErrorZ.swift */, - 07344D4A2642882A001CD90E /* Result_boolPeerHandleErrorZ.swift */, - 07344D4B2642882A001CD90E /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift */, - 07344D4C2642882A001CD90E /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift */, - 07344D4D2642882A001CD90E /* Result_ReplyChannelRangeDecodeErrorZ.swift */, - 07344D4E2642882A001CD90E /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift */, - 07344D4F2642882A001CD90E /* Result_UpdateFailHTLCDecodeErrorZ.swift */, - 07344D502642882A001CD90E /* Result_TxCreationKeysDecodeErrorZ.swift */, - 07344D512642882A001CD90E /* Result_PositiveTimestampCreationErrorZ.swift */, - 07344D522642882A001CD90E /* Result_OutPointDecodeErrorZ.swift */, - 07344D532642882A001CD90E /* Result_NodeAnnouncementDecodeErrorZ.swift */, - 07344D542642882A001CD90E /* Result_PayeePubKeyErrorZ.swift */, - 07344D552642882A001CD90E /* Result_ShutdownDecodeErrorZ.swift */, - 07344D562642882A001CD90E /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift */, - 07344D572642882A001CD90E /* Result_NodeAnnouncementInfoDecodeErrorZ.swift */, - 07344D582642882A001CD90E /* Result_NodeInfoDecodeErrorZ.swift */, - 07344D592642882A001CD90E /* Result_ExpiryTimeCreationErrorZ.swift */, - 07344D5A2642882A001CD90E /* Result_ChannelFeaturesDecodeErrorZ.swift */, - 07344D5B2642882A001CD90E /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift */, - 07344D5C2642882A001CD90E /* Result_InitDecodeErrorZ.swift */, - 07344D5D2642882A001CD90E /* Result_NoneChannelMonitorUpdateErrZ.swift */, - 07344D5E2642882A001CD90E /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift */, - 07344D5F2642882A001CD90E /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift */, - 07344D602642882A001CD90E /* Result_ClosingSignedDecodeErrorZ.swift */, - 07344D612642882A001CD90E /* Result_InMemorySignerDecodeErrorZ.swift */, + 07A441C6266ED3EA00B5F16F /* PaymentSendFailure.swift */, + 07A441C7266ED3EA00B5F16F /* Option_u64Z.swift */, + 07A441C8266ED3EA00B5F16F /* Fallback.swift */, + 07A441C9266ED3EA00B5F16F /* Option_C2Tuple_usizeTransactionZZ.swift */, + 07A441CA266ED3EA00B5F16F /* APIError.swift */, + 07A441CB266ED3EA00B5F16F /* Event.swift */, + 07A441CC266ED3EA00B5F16F /* HTLCFailChannelUpdate.swift */, + 07A441CD266ED3EA00B5F16F /* ErrorAction.swift */, + 07A441CE266ED3EA00B5F16F /* Option_u32Z.swift */, + 07A441CF266ED3EA00B5F16F /* NetAddress.swift */, + 07A441D0266ED3EA00B5F16F /* SignOrCreationError.swift */, + 07A441D1266ED3EA00B5F16F /* MessageSendEvent.swift */, + 07A441D2266ED3EA00B5F16F /* MonitorEvent.swift */, + 07A441D3266ED3EA00B5F16F /* SpendableOutputDescriptor.swift */, ); - path = results; + path = options; sourceTree = ""; }; - 07344D622642882A001CD90E /* structs */ = { + 07A441D4266ED3EA00B5F16F /* traits */ = { isa = PBXGroup; children = ( - 07344D632642882A001CD90E /* MessageHandler.swift */, - 07344D642642882A001CD90E /* ChainMonitor.swift */, - 07344D652642882A001CD90E /* PayeePubKey.swift */, - 07344D662642882A001CD90E /* MonitorUpdateError.swift */, - 07344D672642882A001CD90E /* Description.swift */, - 07344D682642882A001CD90E /* LockedNetworkGraph.swift */, - 07344D692642882A001CD90E /* RevokeAndACK.swift */, - 07344D6A2642882A001CD90E /* Ping.swift */, - 07344D6B2642882A001CD90E /* PositiveTimestamp.swift */, - 07344D6C2642882A001CD90E /* UpdateAddHTLC.swift */, - 07344D6D2642882A001CD90E /* UpdateFailMalformedHTLC.swift */, - 07344D6E2642882A001CD90E /* ChannelMonitorUpdate.swift */, - 07344D6F2642882A001CD90E /* RouteHint.swift */, - 07344D702642882A001CD90E /* Sha256.swift */, - 07344D712642882A001CD90E /* HTLCOutputInCommitment.swift */, - 07344D722642882A001CD90E /* ChannelReestablish.swift */, - 07344D732642882A001CD90E /* RouteHintHop.swift */, - 07344D742642882A001CD90E /* ChannelManagerReadArgs.swift */, - 07344D752642882A001CD90E /* UpdateFulfillHTLC.swift */, - 07344D762642882A001CD90E /* NodeFeatures.swift */, - 07344D772642882A001CD90E /* NetGraphMsgHandler.swift */, - 07344D782642882A001CD90E /* InvoiceFeatures.swift */, - 07344D792642882A001CD90E /* Invoice.swift */, - 07344D7A2642882A001CD90E /* RoutingFees.swift */, - 07344D7B2642882A001CD90E /* ChannelMonitor.swift */, - 07344D7C2642882A001CD90E /* BestBlock.swift */, - 07344D7D2642882A001CD90E /* UpdateFee.swift */, - 07344D7E2642882A001CD90E /* UnsignedChannelUpdate.swift */, - 07344D7F2642882A001CD90E /* QueryShortChannelIds.swift */, - 07344D802642882A001CD90E /* NetworkGraph.swift */, - 07344D812642882A001CD90E /* CommitmentTransaction.swift */, - 07344D822642882A001CD90E /* KeysManager.swift */, - 07344D832642882A001CD90E /* FundingCreated.swift */, - 07344D842642882A001CD90E /* CounterpartyChannelTransactionParameters.swift */, - 07344D852642882A001CD90E /* ChannelAnnouncement.swift */, - 07344D862642882A001CD90E /* ReplyShortChannelIdsEnd.swift */, - 07344D872642882A001CD90E /* IgnoringMessageHandler.swift */, - 07344D882642882A001CD90E /* PeerManager.swift */, - 07344D892642882A001CD90E /* UpdateFailHTLC.swift */, - 07344D8A2642882A001CD90E /* FundingLocked.swift */, - 07344D8B2642882A001CD90E /* StaticPaymentOutputDescriptor.swift */, - 07344D8C2642882A001CD90E /* HTLCUpdate.swift */, - 07344D8D2642882A001CD90E /* InMemorySigner.swift */, - 07344D8E2642882A001CD90E /* GossipTimestampFilter.swift */, - 07344D8F2642882A001CD90E /* PeerHandleError.swift */, - 07344D902642882A001CD90E /* ErroringMessageHandler.swift */, - 07344D912642882A001CD90E /* CommitmentSigned.swift */, - 07344D922642882A001CD90E /* TxCreationKeys.swift */, - 07344D932642882A001CD90E /* RawInvoice.swift */, - 07344D942642882A001CD90E /* Pong.swift */, - 07344D952642882A001CD90E /* ExpiryTime.swift */, - 07344D962642882A001CD90E /* ChannelConfig.swift */, - 07344D972642882A001CD90E /* DecodeError.swift */, - 07344D982642882A001CD90E /* QueryChannelRange.swift */, - 07344D992642882A001CD90E /* HolderCommitmentTransaction.swift */, - 07344D9A2642882A001CD90E /* ChannelTransactionParameters.swift */, - 07344D9B2642882A001CD90E /* NodeInfo.swift */, - 07344D9C2642882A001CD90E /* DirectedChannelTransactionParameters.swift */, - 07344D9D2642882A001CD90E /* ChannelHandshakeConfig.swift */, - 07344D9E2642882A001CD90E /* ChannelManager.swift */, - 07344D9F2642882A001CD90E /* Shutdown.swift */, - 07344DA02642882A001CD90E /* ChainParameters.swift */, - 07344DA12642882A001CD90E /* AcceptChannel.swift */, - 07344DA22642882A001CD90E /* FilesystemPersister.swift */, - 07344DA32642882A001CD90E /* ChannelHandshakeLimits.swift */, - 07344DA42642882A001CD90E /* AnnouncementSignatures.swift */, - 07344DA52642882A001CD90E /* CommitmentUpdate.swift */, - 07344DA62642882A001CD90E /* ClosingSigned.swift */, - 07344DA72642882A001CD90E /* DirectionalChannelInfo.swift */, - 07344DA82642882A001CD90E /* ChannelDetails.swift */, - 07344DA92642882A001CD90E /* NodeAnnouncementInfo.swift */, - 07344DAA2642882A001CD90E /* UnsignedChannelAnnouncement.swift */, - 07344DAB2642882A001CD90E /* LightningError.swift */, - 07344DAC2642882A001CD90E /* MinFinalCltvExpiry.swift */, - 07344DAD2642882B001CD90E /* DataLossProtect.swift */, - 07344DAE2642882B001CD90E /* ErrorMessage.swift */, - 07344DAF2642882B001CD90E /* RouteHop.swift */, - 07344DB02642882B001CD90E /* WatchedOutput.swift */, - 07344DB12642882B001CD90E /* ChannelUpdate.swift */, - 07344DB22642882B001CD90E /* ReplyChannelRange.swift */, - 07344DB32642882B001CD90E /* InitFeatures.swift */, - 07344DB42642882B001CD90E /* NodeAnnouncement.swift */, - 07344DB52642882B001CD90E /* RawDataPart.swift */, - 07344DB62642882B001CD90E /* ChannelPublicKeys.swift */, - 07344DB72642882B001CD90E /* ChannelInfo.swift */, - 07344DB82642882B001CD90E /* InvoiceSignature.swift */, - 07344DB92642882B001CD90E /* OpenChannel.swift */, - 07344DBA2642882B001CD90E /* FundingSigned.swift */, - 07344DBB2642882B001CD90E /* SignedRawInvoice.swift */, - 07344DBC2642882B001CD90E /* Init.swift */, - 07344DBD2642882B001CD90E /* UnsignedNodeAnnouncement.swift */, - 07344DBE2642882B001CD90E /* TrustedCommitmentTransaction.swift */, - 07344DBF2642882B001CD90E /* ChannelFeatures.swift */, - 07344DC02642882B001CD90E /* BuiltCommitmentTransaction.swift */, - 07344DC12642882B001CD90E /* UserConfig.swift */, - 07344DC22642882B001CD90E /* Route.swift */, - 07344DC32642882B001CD90E /* OutPoint.swift */, - 07344DC42642882B001CD90E /* DelayedPaymentOutputDescriptor.swift */, + 07A441D5266ED3EA00B5F16F /* BaseSign.swift */, + 07A441D6266ED3EA00B5F16F /* Persist.swift */, + 07A441D7266ED3EA00B5F16F /* KeysInterface.swift */, + 07A441D8266ED3EA00B5F16F /* Logger.swift */, + 07A441D9266ED3EA00B5F16F /* SocketDescriptor.swift */, + 07A441DA266ED3EA00B5F16F /* FeeEstimator.swift */, + 07A441DB266ED3EA00B5F16F /* MessageSendEventsProvider.swift */, + 07A441DC266ED3EA00B5F16F /* BroadcasterInterface.swift */, + 07A441DD266ED3EA00B5F16F /* Confirm.swift */, + 07A441DE266ED3EA00B5F16F /* EventHandler.swift */, + 07A441DF266ED3EA00B5F16F /* RoutingMessageHandler.swift */, + 07A441E0266ED3EA00B5F16F /* ChannelManagerPersister.swift */, + 07A441E1266ED3EA00B5F16F /* Listen.swift */, + 07A441E2266ED3EA00B5F16F /* ChannelMessageHandler.swift */, + 07A441E3266ED3EA00B5F16F /* Filter.swift */, + 07A441E4266ED3EA00B5F16F /* Access.swift */, + 07A441E5266ED3EA00B5F16F /* EventsProvider.swift */, + 07A441E6266ED3EA00B5F16F /* Watch.swift */, + 07A441E7266ED3EA00B5F16F /* Sign.swift */, ); - path = structs; + path = traits; sourceTree = ""; }; - 07344FA826428AD0001CD90E /* Frameworks */ = { + 07A441E8266ED3EA00B5F16F /* tuples */ = { isa = PBXGroup; children = ( - 07344FE526429524001CD90E /* libldk.a */, + 07A441E9266ED3EA00B5F16F /* C2Tuple_BlockHashChannelMonitorZ.swift */, + 07A441EA266ED3EA00B5F16F /* C2Tuple_SignatureCVec_SignatureZZ.swift */, + 07A441EB266ED3EA00B5F16F /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift */, + 07A441EC266ED3EA00B5F16F /* C2Tuple_BlockHashChannelManagerZ.swift */, + 07A441ED266ED3EA00B5F16F /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift */, + 07A441EE266ED3EA00B5F16F /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift */, + 07A441EF266ED3EA00B5F16F /* C2Tuple_PaymentHashPaymentSecretZ.swift */, + 07A441F0266ED3EA00B5F16F /* C2Tuple_u32TxOutZ.swift */, + 07A441F1266ED3EA00B5F16F /* C2Tuple_OutPointScriptZ.swift */, + 07A441F2266ED3EA00B5F16F /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift */, + 07A441F3266ED3EA00B5F16F /* C2Tuple_u32ScriptZ.swift */, + 07A441F4266ED3EA00B5F16F /* C2Tuple_usizeTransactionZ.swift */, ); - name = Frameworks; + path = tuples; sourceTree = ""; }; - 07344FAC26428B09001CD90E /* headers */ = { + 07A441F6266ED3EA00B5F16F /* results */ = { isa = PBXGroup; children = ( - 0734505F26445915001CD90E /* ldk_rust_types.h */, - 0734505E26445915001CD90E /* ldk_ver.h */, - 0734505D26445915001CD90E /* lightning.h */, + 07A441F7266ED3EA00B5F16F /* Result_ChannelConfigDecodeErrorZ.swift */, + 07A441F8266ED3EA00B5F16F /* Result_ChannelTransactionParametersDecodeErrorZ.swift */, + 07A441F9266ED3EA00B5F16F /* Result_QueryChannelRangeDecodeErrorZ.swift */, + 07A441FA266ED3EA00B5F16F /* Result_FundingCreatedDecodeErrorZ.swift */, + 07A441FB266ED3EA00B5F16F /* Result_TxCreationKeysErrorZ.swift */, + 07A441FC266ED3EA00B5F16F /* Result_PingDecodeErrorZ.swift */, + 07A441FD266ED3EA00B5F16F /* Result_UpdateFulfillHTLCDecodeErrorZ.swift */, + 07A441FE266ED3EA00B5F16F /* Result_NonePaymentSendFailureZ.swift */, + 07A441FF266ED3EA00B5F16F /* Result_CVec_u8ZPeerHandleErrorZ.swift */, + 07A44200266ED3EA00B5F16F /* Result_StaticPaymentOutputDescriptorDecodeErrorZ.swift */, + 07A44201266ED3EA00B5F16F /* Result_DirectionalChannelInfoDecodeErrorZ.swift */, + 07A44202266ED3EA00B5F16F /* Result_RouteDecodeErrorZ.swift */, + 07A44203266ED3EA00B5F16F /* Result_RevokeAndACKDecodeErrorZ.swift */, + 07A44204266ED3EA00B5F16F /* Result_OpenChannelDecodeErrorZ.swift */, + 07A44205266ED3EA00B5F16F /* Result_ChannelInfoDecodeErrorZ.swift */, + 07A44206266ED3EA00B5F16F /* Result_RouteHintCreationErrorZ.swift */, + 07A44207266ED3EA00B5F16F /* Result_PongDecodeErrorZ.swift */, + 07A44208266ED3EA00B5F16F /* Result_ChannelPublicKeysDecodeErrorZ.swift */, + 07A44209266ED3EA00B5F16F /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift */, + 07A4420A266ED3EA00B5F16F /* Result_PaymentSecretAPIErrorZ.swift */, + 07A4420B266ED3EA00B5F16F /* Result_SpendableOutputDescriptorDecodeErrorZ.swift */, + 07A4420C266ED3EA00B5F16F /* Result_UnsignedChannelUpdateDecodeErrorZ.swift */, + 07A4420D266ED3EA00B5F16F /* Result_ErrorMessageDecodeErrorZ.swift */, + 07A4420E266ED3EA00B5F16F /* Result_AcceptChannelDecodeErrorZ.swift */, + 07A4420F266ED3EA00B5F16F /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift */, + 07A44210266ED3EA00B5F16F /* Result_NodeFeaturesDecodeErrorZ.swift */, + 07A44211266ED3EA00B5F16F /* Result_TrustedCommitmentTransactionNoneZ.swift */, + 07A44212266ED3EA00B5F16F /* Result_AnnouncementSignaturesDecodeErrorZ.swift */, + 07A44213266ED3EA00B5F16F /* Result_StringErrorZ.swift */, + 07A44214266ED3EA00B5F16F /* Result_HolderCommitmentTransactionDecodeErrorZ.swift */, + 07A44215266ED3EA00B5F16F /* Result_RouteHopDecodeErrorZ.swift */, + 07A44216266ED3EA00B5F16F /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift */, + 07A44217266ED3EA00B5F16F /* Result_CommitmentSignedDecodeErrorZ.swift */, + 07A44218266ED3EA00B5F16F /* Result_NonePeerHandleErrorZ.swift */, + 07A44219266ED3EA00B5F16F /* Result_NoneMonitorUpdateErrorZ.swift */, + 07A4421A266ED3EA00B5F16F /* Result_TxOutAccessErrorZ.swift */, + 07A4421B266ED3EA00B5F16F /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift */, + 07A4421C266ED3EA00B5F16F /* Result_NoneLightningErrorZ.swift */, + 07A4421D266ED3EA00B5F16F /* Result_NoneAPIErrorZ.swift */, + 07A4421E266ED3EA00B5F16F /* Result_PublicKeyErrorZ.swift */, + 07A4421F266ED3EA00B5F16F /* Result_boolLightningErrorZ.swift */, + 07A44220266ED3EA00B5F16F /* Result_ChannelUpdateDecodeErrorZ.swift */, + 07A44221266ED3EA00B5F16F /* Result_UpdateFeeDecodeErrorZ.swift */, + 07A44222266ED3EA00B5F16F /* Result_DescriptionCreationErrorZ.swift */, + 07A44223266ED3EA00B5F16F /* Result_CommitmentTransactionDecodeErrorZ.swift */, + 07A44224266ED3EA00B5F16F /* Result_SiPrefixNoneZ.swift */, + 07A44225266ED3EA00B5F16F /* Result_FundingSignedDecodeErrorZ.swift */, + 07A44226266ED3EA00B5F16F /* Result_InvoiceFeaturesDecodeErrorZ.swift */, + 07A44227266ED3EA00B5F16F /* Result_TransactionNoneZ.swift */, + 07A44228266ED3EA00B5F16F /* Result_NetworkGraphDecodeErrorZ.swift */, + 07A44229266ED3EA00B5F16F /* Result_ChannelAnnouncementDecodeErrorZ.swift */, + 07A4422A266ED3EA00B5F16F /* Result_NoneSemanticErrorZ.swift */, + 07A4422B266ED3EA00B5F16F /* Result_InvoiceSignOrCreationErrorZ.swift */, + 07A4422C266ED3EA00B5F16F /* Result_InvoiceNoneZ.swift */, + 07A4422D266ED3EA00B5F16F /* Result_RoutingFeesDecodeErrorZ.swift */, + 07A4422E266ED3EA00B5F16F /* Result_ChannelReestablishDecodeErrorZ.swift */, + 07A4422F266ED3EA00B5F16F /* Result_GossipTimestampFilterDecodeErrorZ.swift */, + 07A44230266ED3EA00B5F16F /* Result_CVec_CVec_u8ZZNoneZ.swift */, + 07A44231266ED3EA00B5F16F /* Result_SecretKeyErrorZ.swift */, + 07A44232266ED3EA00B5F16F /* Result_HTLCUpdateDecodeErrorZ.swift */, + 07A44233266ED3EA00B5F16F /* Result_RouteLightningErrorZ.swift */, + 07A44234266ED3EA00B5F16F /* Result_InvoiceSemanticErrorZ.swift */, + 07A44235266ED3EA00B5F16F /* Result_SignedRawInvoiceNoneZ.swift */, + 07A44236266ED3EA00B5F16F /* Result_InitFeaturesDecodeErrorZ.swift */, + 07A44237266ED3EA00B5F16F /* Result_NetAddressDecodeErrorZ.swift */, + 07A44238266ED3EA00B5F16F /* Result_RecoverableSignatureNoneZ.swift */, + 07A44239266ED3EA00B5F16F /* Result_CVec_SignatureZNoneZ.swift */, + 07A4423A266ED3EA00B5F16F /* Result_ChannelMonitorUpdateDecodeErrorZ.swift */, + 07A4423B266ED3EA00B5F16F /* Result_SignatureNoneZ.swift */, + 07A4423C266ED3EA00B5F16F /* Result_NoneErrorZ.swift */, + 07A4423D266ED3EA00B5F16F /* Result_UpdateAddHTLCDecodeErrorZ.swift */, + 07A4423E266ED3EA00B5F16F /* Result_NetAddressu8Z.swift */, + 07A4423F266ED3EA00B5F16F /* Result_FundingLockedDecodeErrorZ.swift */, + 07A44240266ED3EA00B5F16F /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift */, + 07A44241266ED3EA00B5F16F /* Result_QueryShortChannelIdsDecodeErrorZ.swift */, + 07A44242266ED3EA00B5F16F /* Result_SignDecodeErrorZ.swift */, + 07A44243266ED3EA00B5F16F /* Result_boolPeerHandleErrorZ.swift */, + 07A44244266ED3EA00B5F16F /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift */, + 07A44245266ED3EA00B5F16F /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift */, + 07A44246266ED3EA00B5F16F /* Result_ReplyChannelRangeDecodeErrorZ.swift */, + 07A44247266ED3EA00B5F16F /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift */, + 07A44248266ED3EA00B5F16F /* Result_UpdateFailHTLCDecodeErrorZ.swift */, + 07A44249266ED3EA00B5F16F /* Result_TxCreationKeysDecodeErrorZ.swift */, + 07A4424A266ED3EA00B5F16F /* Result_PositiveTimestampCreationErrorZ.swift */, + 07A4424B266ED3EA00B5F16F /* Result_OutPointDecodeErrorZ.swift */, + 07A4424C266ED3EA00B5F16F /* Result_NodeAnnouncementDecodeErrorZ.swift */, + 07A4424D266ED3EA00B5F16F /* Result_PayeePubKeyErrorZ.swift */, + 07A4424E266ED3EA00B5F16F /* Result_ShutdownDecodeErrorZ.swift */, + 07A4424F266ED3EA00B5F16F /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift */, + 07A44250266ED3EA00B5F16F /* Result_NodeAnnouncementInfoDecodeErrorZ.swift */, + 07A44251266ED3EA00B5F16F /* Result_NodeInfoDecodeErrorZ.swift */, + 07A44252266ED3EA00B5F16F /* Result_ExpiryTimeCreationErrorZ.swift */, + 07A44253266ED3EA00B5F16F /* Result_ChannelFeaturesDecodeErrorZ.swift */, + 07A44254266ED3EA00B5F16F /* Result_DelayedPaymentOutputDescriptorDecodeErrorZ.swift */, + 07A44255266ED3EA00B5F16F /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift */, + 07A44256266ED3EA00B5F16F /* Result_InitDecodeErrorZ.swift */, + 07A44257266ED3EA00B5F16F /* Result_NoneChannelMonitorUpdateErrZ.swift */, + 07A44258266ED3EA00B5F16F /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift */, + 07A44259266ED3EA00B5F16F /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift */, + 07A4425A266ED3EA00B5F16F /* Result_ClosingSignedDecodeErrorZ.swift */, + 07A4425B266ED3EA00B5F16F /* Result_InMemorySignerDecodeErrorZ.swift */, ); - name = headers; - path = ../../../bindings/headers; + path = results; sourceTree = ""; }; - 0749F9C3265615CB00876C52 /* batteries */ = { + 07A4425C266ED3EA00B5F16F /* structs */ = { isa = PBXGroup; children = ( - 0749F9C4265615CB00876C52 /* ChannelManagerConstructor.swift */, - 0749F9C5265615CB00876C52 /* UtilMethods.swift */, + 07A4425D266ED3EA00B5F16F /* MessageHandler.swift */, + 07A4425E266ED3EA00B5F16F /* ChainMonitor.swift */, + 07A4425F266ED3EA00B5F16F /* PayeePubKey.swift */, + 07A44260266ED3EA00B5F16F /* MonitorUpdateError.swift */, + 07A44261266ED3EA00B5F16F /* Description.swift */, + 07A44262266ED3EA00B5F16F /* LockedNetworkGraph.swift */, + 07A44263266ED3EA00B5F16F /* RevokeAndACK.swift */, + 07A44264266ED3EA00B5F16F /* Ping.swift */, + 07A44265266ED3EA00B5F16F /* PositiveTimestamp.swift */, + 07A44266266ED3EA00B5F16F /* UpdateAddHTLC.swift */, + 07A44267266ED3EA00B5F16F /* UpdateFailMalformedHTLC.swift */, + 07A44268266ED3EA00B5F16F /* ChannelMonitorUpdate.swift */, + 07A44269266ED3EA00B5F16F /* RouteHint.swift */, + 07A4426A266ED3EA00B5F16F /* Sha256.swift */, + 07A4426B266ED3EA00B5F16F /* HTLCOutputInCommitment.swift */, + 07A4426C266ED3EA00B5F16F /* ChannelReestablish.swift */, + 07A4426D266ED3EA00B5F16F /* RouteHintHop.swift */, + 07A4426E266ED3EA00B5F16F /* ChannelManagerReadArgs.swift */, + 07A4426F266ED3EA00B5F16F /* UpdateFulfillHTLC.swift */, + 07A44270266ED3EA00B5F16F /* NodeFeatures.swift */, + 07A44271266ED3EA00B5F16F /* NetGraphMsgHandler.swift */, + 07A44272266ED3EA00B5F16F /* InvoiceFeatures.swift */, + 07A44273266ED3EA00B5F16F /* Invoice.swift */, + 07A44274266ED3EA00B5F16F /* RoutingFees.swift */, + 07A44275266ED3EA00B5F16F /* ChannelMonitor.swift */, + 07A44276266ED3EB00B5F16F /* BestBlock.swift */, + 07A44277266ED3EB00B5F16F /* UpdateFee.swift */, + 07A44278266ED3EB00B5F16F /* UnsignedChannelUpdate.swift */, + 07A44279266ED3EB00B5F16F /* QueryShortChannelIds.swift */, + 07A4427A266ED3EB00B5F16F /* NetworkGraph.swift */, + 07A4427B266ED3EB00B5F16F /* CommitmentTransaction.swift */, + 07A4427C266ED3EB00B5F16F /* KeysManager.swift */, + 07A4427D266ED3EB00B5F16F /* FundingCreated.swift */, + 07A4427E266ED3EB00B5F16F /* CounterpartyChannelTransactionParameters.swift */, + 07A4427F266ED3EB00B5F16F /* ChannelAnnouncement.swift */, + 07A44280266ED3EB00B5F16F /* ReplyShortChannelIdsEnd.swift */, + 07A44281266ED3EB00B5F16F /* IgnoringMessageHandler.swift */, + 07A44282266ED3EB00B5F16F /* PeerManager.swift */, + 07A44283266ED3EB00B5F16F /* UpdateFailHTLC.swift */, + 07A44284266ED3EB00B5F16F /* FundingLocked.swift */, + 07A44285266ED3EB00B5F16F /* StaticPaymentOutputDescriptor.swift */, + 07A44286266ED3EB00B5F16F /* HTLCUpdate.swift */, + 07A44287266ED3EB00B5F16F /* InMemorySigner.swift */, + 07A44288266ED3EB00B5F16F /* GossipTimestampFilter.swift */, + 07A44289266ED3EB00B5F16F /* PeerHandleError.swift */, + 07A4428A266ED3EB00B5F16F /* ErroringMessageHandler.swift */, + 07A4428B266ED3EB00B5F16F /* CommitmentSigned.swift */, + 07A4428C266ED3EB00B5F16F /* TxCreationKeys.swift */, + 07A4428D266ED3EB00B5F16F /* RawInvoice.swift */, + 07A4428E266ED3EB00B5F16F /* Pong.swift */, + 07A4428F266ED3EB00B5F16F /* ExpiryTime.swift */, + 07A44290266ED3EB00B5F16F /* ChannelConfig.swift */, + 07A44291266ED3EB00B5F16F /* DecodeError.swift */, + 07A44292266ED3EB00B5F16F /* QueryChannelRange.swift */, + 07A44293266ED3EB00B5F16F /* HolderCommitmentTransaction.swift */, + 07A44294266ED3EB00B5F16F /* ChannelTransactionParameters.swift */, + 07A44295266ED3EB00B5F16F /* NodeInfo.swift */, + 07A44296266ED3EB00B5F16F /* BackgroundProcessor.swift */, + 07A44297266ED3EB00B5F16F /* DirectedChannelTransactionParameters.swift */, + 07A44298266ED3EB00B5F16F /* ChannelHandshakeConfig.swift */, + 07A44299266ED3EB00B5F16F /* ChannelManager.swift */, + 07A4429A266ED3EB00B5F16F /* Shutdown.swift */, + 07A4429B266ED3EB00B5F16F /* ChainParameters.swift */, + 07A4429C266ED3EB00B5F16F /* AcceptChannel.swift */, + 07A4429D266ED3EB00B5F16F /* FilesystemPersister.swift */, + 07A4429E266ED3EB00B5F16F /* ChannelHandshakeLimits.swift */, + 07A4429F266ED3EB00B5F16F /* AnnouncementSignatures.swift */, + 07A442A0266ED3EB00B5F16F /* CommitmentUpdate.swift */, + 07A442A1266ED3EB00B5F16F /* ClosingSigned.swift */, + 07A442A2266ED3EB00B5F16F /* DirectionalChannelInfo.swift */, + 07A442A3266ED3EB00B5F16F /* ChannelDetails.swift */, + 07A442A4266ED3EB00B5F16F /* NodeAnnouncementInfo.swift */, + 07A442A5266ED3EB00B5F16F /* UnsignedChannelAnnouncement.swift */, + 07A442A6266ED3EB00B5F16F /* LightningError.swift */, + 07A442A7266ED3EB00B5F16F /* MinFinalCltvExpiry.swift */, + 07A442A8266ED3EB00B5F16F /* DataLossProtect.swift */, + 07A442A9266ED3EB00B5F16F /* ErrorMessage.swift */, + 07A442AA266ED3EB00B5F16F /* RouteHop.swift */, + 07A442AB266ED3EB00B5F16F /* WatchedOutput.swift */, + 07A442AC266ED3EB00B5F16F /* ChannelUpdate.swift */, + 07A442AD266ED3EB00B5F16F /* ReplyChannelRange.swift */, + 07A442AE266ED3EB00B5F16F /* InitFeatures.swift */, + 07A442AF266ED3EB00B5F16F /* NodeAnnouncement.swift */, + 07A442B0266ED3EB00B5F16F /* RawDataPart.swift */, + 07A442B1266ED3EB00B5F16F /* ChannelPublicKeys.swift */, + 07A442B2266ED3EB00B5F16F /* ChannelInfo.swift */, + 07A442B3266ED3EB00B5F16F /* InvoiceSignature.swift */, + 07A442B4266ED3EB00B5F16F /* OpenChannel.swift */, + 07A442B5266ED3EB00B5F16F /* FundingSigned.swift */, + 07A442B6266ED3EB00B5F16F /* SignedRawInvoice.swift */, + 07A442B7266ED3EB00B5F16F /* Init.swift */, + 07A442B8266ED3EB00B5F16F /* UnsignedNodeAnnouncement.swift */, + 07A442B9266ED3EB00B5F16F /* TrustedCommitmentTransaction.swift */, + 07A442BA266ED3EB00B5F16F /* ChannelFeatures.swift */, + 07A442BB266ED3EB00B5F16F /* BuiltCommitmentTransaction.swift */, + 07A442BC266ED3EB00B5F16F /* UserConfig.swift */, + 07A442BD266ED3EB00B5F16F /* Route.swift */, + 07A442BE266ED3EB00B5F16F /* OutPoint.swift */, + 07A442BF266ED3EB00B5F16F /* DelayedPaymentOutputDescriptor.swift */, ); - name = batteries; - path = ../../../bindings/batteries; + path = structs; sourceTree = ""; }; /* End PBXGroup section */ @@ -1258,248 +1040,255 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 07344E052642882B001CD90E /* C2Tuple_SignatureCVec_SignatureZZ.swift in Sources */, - 07344DFF2642882B001CD90E /* Watch.swift in Sources */, - 07344E1D2642882B001CD90E /* Result_ChannelConfigDecodeErrorZ.swift in Sources */, - 07344E372642882B001CD90E /* Result_ChannelInfoDecodeErrorZ.swift in Sources */, - 07344E6D2642882B001CD90E /* Result_UpdateFeeDecodeErrorZ.swift in Sources */, - 07344F8D2642882C001CD90E /* FundingSigned.swift in Sources */, - 07344DF52642882B001CD90E /* Listen.swift in Sources */, - 07344F392642882C001CD90E /* ErroringMessageHandler.swift in Sources */, - 07344EFD2642882C001CD90E /* ChannelReestablish.swift in Sources */, - 07344F9F2642882C001CD90E /* OutPoint.swift in Sources */, - 07344EC52642882B001CD90E /* Result_ShutdownDecodeErrorZ.swift in Sources */, - 07344E792642882B001CD90E /* Result_TransactionNoneZ.swift in Sources */, - 07344E472642882B001CD90E /* Result_ErrorMessageDecodeErrorZ.swift in Sources */, - 07344E732642882B001CD90E /* Result_SiPrefixNoneZ.swift in Sources */, - 07344DFB2642882B001CD90E /* Access.swift in Sources */, - 07344F212642882C001CD90E /* CounterpartyChannelTransactionParameters.swift in Sources */, - 07344E672642882B001CD90E /* Result_PublicKeyErrorZ.swift in Sources */, - 07344F432642882C001CD90E /* ExpiryTime.swift in Sources */, - 07344F912642882C001CD90E /* Init.swift in Sources */, - 07344EE52642882B001CD90E /* MonitorUpdateError.swift in Sources */, - 07344E4F2642882B001CD90E /* Result_TrustedCommitmentTransactionNoneZ.swift in Sources */, - 07344F1F2642882C001CD90E /* FundingCreated.swift in Sources */, - 07344F0F2642882C001CD90E /* ChannelMonitor.swift in Sources */, - 07344E132642882B001CD90E /* C2Tuple_OutPointScriptZ.swift in Sources */, - 07344E092642882B001CD90E /* C2Tuple_BlockHashChannelManagerZ.swift in Sources */, - 07344E0F2642882B001CD90E /* C2Tuple_PaymentHashPaymentSecretZ.swift in Sources */, - 07344F612642882C001CD90E /* AnnouncementSignatures.swift in Sources */, + 07A44325266ED3EB00B5F16F /* Result_ChannelReestablishDecodeErrorZ.swift in Sources */, + 07A442F5266ED3EB00B5F16F /* Result_NonePaymentSendFailureZ.swift in Sources */, + 07A44319266ED3EB00B5F16F /* Result_DescriptionCreationErrorZ.swift in Sources */, + 07A442E6266ED3EB00B5F16F /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift in Sources */, + 07A44387266ED3EB00B5F16F /* DecodeError.swift in Sources */, + 07A44360266ED3EB00B5F16F /* Sha256.swift in Sources */, + 07A442C1266ED3EB00B5F16F /* Option_u64Z.swift in Sources */, + 07A44333266ED3EB00B5F16F /* Result_NoneErrorZ.swift in Sources */, + 07A442D4266ED3EB00B5F16F /* MessageSendEventsProvider.swift in Sources */, + 07A44306266ED3EB00B5F16F /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift in Sources */, + 07A44384266ED3EB00B5F16F /* Pong.swift in Sources */, + 07A4430E266ED3EB00B5F16F /* Result_CommitmentSignedDecodeErrorZ.swift in Sources */, + 07A442EF266ED3EB00B5F16F /* Result_ChannelTransactionParametersDecodeErrorZ.swift in Sources */, + 07A44363266ED3EB00B5F16F /* RouteHintHop.swift in Sources */, + 07A442E0266ED3EB00B5F16F /* Sign.swift in Sources */, + 07A44359266ED3EB00B5F16F /* RevokeAndACK.swift in Sources */, + 07A442F1266ED3EB00B5F16F /* Result_FundingCreatedDecodeErrorZ.swift in Sources */, + 07A4433C266ED3EB00B5F16F /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift in Sources */, + 07A4432A266ED3EB00B5F16F /* Result_RouteLightningErrorZ.swift in Sources */, + 07A4435F266ED3EB00B5F16F /* RouteHint.swift in Sources */, + 07A4430C266ED3EB00B5F16F /* Result_RouteHopDecodeErrorZ.swift in Sources */, + 07A44336266ED3EB00B5F16F /* Result_FundingLockedDecodeErrorZ.swift in Sources */, + 07A44398266ED3EB00B5F16F /* DirectionalChannelInfo.swift in Sources */, + 07A442C5266ED3EB00B5F16F /* Event.swift in Sources */, + 07A44350266ED3EB00B5F16F /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift in Sources */, + 07A4431C266ED3EB00B5F16F /* Result_FundingSignedDecodeErrorZ.swift in Sources */, + 07A44322266ED3EB00B5F16F /* Result_InvoiceSignOrCreationErrorZ.swift in Sources */, + 07A442F9266ED3EB00B5F16F /* Result_RouteDecodeErrorZ.swift in Sources */, + 07A4436A266ED3EB00B5F16F /* RoutingFees.swift in Sources */, + 07A443AE266ED3EB00B5F16F /* UnsignedNodeAnnouncement.swift in Sources */, + 07A442E4266ED3EB00B5F16F /* C2Tuple_BlockHashChannelManagerZ.swift in Sources */, + 07A442C7266ED3EB00B5F16F /* ErrorAction.swift in Sources */, + 07A44347266ED3EB00B5F16F /* Result_NodeAnnouncementInfoDecodeErrorZ.swift in Sources */, + 07A44342266ED3EB00B5F16F /* Result_OutPointDecodeErrorZ.swift in Sources */, + 07A442CD266ED3EB00B5F16F /* SpendableOutputDescriptor.swift in Sources */, + 07A4432F266ED3EB00B5F16F /* Result_RecoverableSignatureNoneZ.swift in Sources */, + 07A4430A266ED3EB00B5F16F /* Result_StringErrorZ.swift in Sources */, + 07A4435D266ED3EB00B5F16F /* UpdateFailMalformedHTLC.swift in Sources */, + 07A44382266ED3EB00B5F16F /* TxCreationKeys.swift in Sources */, + 07A44305266ED3EB00B5F16F /* Result_AcceptChannelDecodeErrorZ.swift in Sources */, + 07A44361266ED3EB00B5F16F /* HTLCOutputInCommitment.swift in Sources */, + 07A442E8266ED3EB00B5F16F /* C2Tuple_u32TxOutZ.swift in Sources */, + 07A4439B266ED3EB00B5F16F /* UnsignedChannelAnnouncement.swift in Sources */, + 07A4438F266ED3EB00B5F16F /* ChannelManager.swift in Sources */, + 07A4435B266ED3EB00B5F16F /* PositiveTimestamp.swift in Sources */, + 07A44330266ED3EB00B5F16F /* Result_CVec_SignatureZNoneZ.swift in Sources */, + 07A4430F266ED3EB00B5F16F /* Result_NonePeerHandleErrorZ.swift in Sources */, + 07A44343266ED3EB00B5F16F /* Result_NodeAnnouncementDecodeErrorZ.swift in Sources */, + 07A44307266ED3EB00B5F16F /* Result_NodeFeaturesDecodeErrorZ.swift in Sources */, + 07A4435A266ED3EB00B5F16F /* Ping.swift in Sources */, + 07A4435C266ED3EB00B5F16F /* UpdateAddHTLC.swift in Sources */, + 07A443AC266ED3EB00B5F16F /* SignedRawInvoice.swift in Sources */, + 07A44389266ED3EB00B5F16F /* HolderCommitmentTransaction.swift in Sources */, + 07A443A3266ED3EB00B5F16F /* ReplyChannelRange.swift in Sources */, + 07A443A0266ED3EB00B5F16F /* RouteHop.swift in Sources */, + 07A4434F266ED3EB00B5F16F /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift in Sources */, + 07A443B3266ED3EB00B5F16F /* Route.swift in Sources */, + 07A443B0266ED3EB00B5F16F /* ChannelFeatures.swift in Sources */, + 07A44364266ED3EB00B5F16F /* ChannelManagerReadArgs.swift in Sources */, + 07A443A7266ED3EB00B5F16F /* ChannelPublicKeys.swift in Sources */, + 07A44316266ED3EB00B5F16F /* Result_boolLightningErrorZ.swift in Sources */, + 07A44331266ED3EB00B5F16F /* Result_ChannelMonitorUpdateDecodeErrorZ.swift in Sources */, + 07A443A6266ED3EB00B5F16F /* RawDataPart.swift in Sources */, + 07A443A2266ED3EB00B5F16F /* ChannelUpdate.swift in Sources */, + 07A4434A266ED3EB00B5F16F /* Result_ChannelFeaturesDecodeErrorZ.swift in Sources */, + 07A4432D266ED3EB00B5F16F /* Result_InitFeaturesDecodeErrorZ.swift in Sources */, + 07A44324266ED3EB00B5F16F /* Result_RoutingFeesDecodeErrorZ.swift in Sources */, + 07A44372266ED3EB00B5F16F /* KeysManager.swift in Sources */, + 07A4430B266ED3EB00B5F16F /* Result_HolderCommitmentTransactionDecodeErrorZ.swift in Sources */, + 07A442D5266ED3EB00B5F16F /* BroadcasterInterface.swift in Sources */, + 07A4438D266ED3EB00B5F16F /* DirectedChannelTransactionParameters.swift in Sources */, + 07A442D3266ED3EB00B5F16F /* FeeEstimator.swift in Sources */, + 07A442E7266ED3EB00B5F16F /* C2Tuple_PaymentHashPaymentSecretZ.swift in Sources */, + 07A442F3266ED3EB00B5F16F /* Result_PingDecodeErrorZ.swift in Sources */, + 07A442D1266ED3EB00B5F16F /* Logger.swift in Sources */, + 07A44353266ED3EB00B5F16F /* MessageHandler.swift in Sources */, + 07A44328266ED3EB00B5F16F /* Result_SecretKeyErrorZ.swift in Sources */, + 07A44329266ED3EB00B5F16F /* Result_HTLCUpdateDecodeErrorZ.swift in Sources */, + 07A442F6266ED3EB00B5F16F /* Result_CVec_u8ZPeerHandleErrorZ.swift in Sources */, + 07A442FD266ED3EB00B5F16F /* Result_RouteHintCreationErrorZ.swift in Sources */, + 07A442DF266ED3EB00B5F16F /* Watch.swift in Sources */, + 07A442F0266ED3EB00B5F16F /* Result_QueryChannelRangeDecodeErrorZ.swift in Sources */, 0749F9C6265615CC00876C52 /* ChannelManagerConstructor.swift in Sources */, - 07344DE72642882B001CD90E /* Logger.swift in Sources */, - 07344F8F2642882C001CD90E /* SignedRawInvoice.swift in Sources */, - 07344ED52642882B001CD90E /* Result_NoneChannelMonitorUpdateErrZ.swift in Sources */, - 07344F012642882C001CD90E /* ChannelManagerReadArgs.swift in Sources */, - 07344E832642882B001CD90E /* Result_InvoiceNoneZ.swift in Sources */, - 07344F852642882C001CD90E /* ChannelPublicKeys.swift in Sources */, - 07344EA92642882B001CD90E /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift in Sources */, - 07344F572642882C001CD90E /* Shutdown.swift in Sources */, - 07344EFB2642882C001CD90E /* HTLCOutputInCommitment.swift in Sources */, - 07344E3F2642882B001CD90E /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift in Sources */, - 07344ECB2642882B001CD90E /* Result_NodeInfoDecodeErrorZ.swift in Sources */, - 07344ED72642882B001CD90E /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift in Sources */, - 07344E692642882B001CD90E /* Result_boolLightningErrorZ.swift in Sources */, - 07344E192642882B001CD90E /* C2Tuple_usizeTransactionZ.swift in Sources */, - 07344E0D2642882B001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift in Sources */, - 07344E572642882B001CD90E /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift in Sources */, - 07344F972642882C001CD90E /* ChannelFeatures.swift in Sources */, - 07344E112642882B001CD90E /* C2Tuple_u32TxOutZ.swift in Sources */, - 07344E592642882B001CD90E /* Result_CommitmentSignedDecodeErrorZ.swift in Sources */, - 07344E552642882B001CD90E /* Result_HolderCommitmentTransactionDecodeErrorZ.swift in Sources */, - 07344E412642882B001CD90E /* Result_PaymentSecretAPIErrorZ.swift in Sources */, - 07344E812642882B001CD90E /* Result_InvoiceSignOrCreationErrorZ.swift in Sources */, - 07344F292642882C001CD90E /* PeerManager.swift in Sources */, - 07344EE92642882B001CD90E /* LockedNetworkGraph.swift in Sources */, - 07344F452642882C001CD90E /* ChannelConfig.swift in Sources */, - 07344EAF2642882B001CD90E /* Result_boolPeerHandleErrorZ.swift in Sources */, - 07344E612642882B001CD90E /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift in Sources */, - 07344F2F2642882C001CD90E /* StaticPaymentOutputDescriptor.swift in Sources */, - 07344DE92642882B001CD90E /* SocketDescriptor.swift in Sources */, - 07344F8B2642882C001CD90E /* OpenChannel.swift in Sources */, - 07344E2D2642882B001CD90E /* Result_CVec_u8ZPeerHandleErrorZ.swift in Sources */, - 07344EC32642882B001CD90E /* Result_PayeePubKeyErrorZ.swift in Sources */, - 07344F752642882C001CD90E /* ErrorMessage.swift in Sources */, - 07344ECD2642882B001CD90E /* Result_ExpiryTimeCreationErrorZ.swift in Sources */, - 07344E872642882B001CD90E /* Result_ChannelReestablishDecodeErrorZ.swift in Sources */, - 07344F312642882C001CD90E /* HTLCUpdate.swift in Sources */, - 07344F152642882C001CD90E /* UnsignedChannelUpdate.swift in Sources */, - 07344EC92642882B001CD90E /* Result_NodeAnnouncementInfoDecodeErrorZ.swift in Sources */, - 07344DD72642882B001CD90E /* NetAddress.swift in Sources */, - 07344F632642882C001CD90E /* CommitmentUpdate.swift in Sources */, - 07344DE32642882B001CD90E /* Persist.swift in Sources */, - 07344E652642882B001CD90E /* Result_NoneAPIErrorZ.swift in Sources */, - 07344E8B2642882B001CD90E /* Result_CVec_CVec_u8ZZNoneZ.swift in Sources */, - 07344F412642882C001CD90E /* Pong.swift in Sources */, - 07344DD92642882B001CD90E /* SignOrCreationError.swift in Sources */, - 07344EA72642882B001CD90E /* Result_FundingLockedDecodeErrorZ.swift in Sources */, - 07344EB12642882B001CD90E /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift in Sources */, - 07344E072642882B001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift in Sources */, - 07344E6B2642882B001CD90E /* Result_ChannelUpdateDecodeErrorZ.swift in Sources */, + 07A44315266ED3EB00B5F16F /* Result_PublicKeyErrorZ.swift in Sources */, + 07A4431B266ED3EB00B5F16F /* Result_SiPrefixNoneZ.swift in Sources */, + 07A442F7266ED3EB00B5F16F /* Result_StaticPaymentOutputDescriptorDecodeErrorZ.swift in Sources */, + 07A44381266ED3EB00B5F16F /* CommitmentSigned.swift in Sources */, + 07A443AF266ED3EB00B5F16F /* TrustedCommitmentTransaction.swift in Sources */, + 07A442C8266ED3EB00B5F16F /* Option_u32Z.swift in Sources */, + 07A4438B266ED3EB00B5F16F /* NodeInfo.swift in Sources */, + 07A44314266ED3EB00B5F16F /* Result_NoneAPIErrorZ.swift in Sources */, + 07A4433D266ED3EB00B5F16F /* Result_ReplyChannelRangeDecodeErrorZ.swift in Sources */, + 07A442F8266ED3EB00B5F16F /* Result_DirectionalChannelInfoDecodeErrorZ.swift in Sources */, + 07A44399266ED3EB00B5F16F /* ChannelDetails.swift in Sources */, + 07A442ED266ED3EB00B5F16F /* Bindings.swift in Sources */, + 07A442DB266ED3EB00B5F16F /* ChannelMessageHandler.swift in Sources */, + 07A442F2266ED3EB00B5F16F /* Result_TxCreationKeysErrorZ.swift in Sources */, + 07A443A5266ED3EB00B5F16F /* NodeAnnouncement.swift in Sources */, + 07A442CF266ED3EB00B5F16F /* Persist.swift in Sources */, + 07A44355266ED3EB00B5F16F /* PayeePubKey.swift in Sources */, + 07A44352266ED3EB00B5F16F /* Result_InMemorySignerDecodeErrorZ.swift in Sources */, + 07A443A1266ED3EB00B5F16F /* WatchedOutput.swift in Sources */, + 07A4433A266ED3EB00B5F16F /* Result_boolPeerHandleErrorZ.swift in Sources */, + 07A4431E266ED3EB00B5F16F /* Result_TransactionNoneZ.swift in Sources */, + 07A4437E266ED3EB00B5F16F /* GossipTimestampFilter.swift in Sources */, + 07A4434C266ED3EB00B5F16F /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift in Sources */, + 07A442CA266ED3EB00B5F16F /* SignOrCreationError.swift in Sources */, + 07A44332266ED3EB00B5F16F /* Result_SignatureNoneZ.swift in Sources */, + 07A44346266ED3EB00B5F16F /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift in Sources */, + 07A442EA266ED3EB00B5F16F /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift in Sources */, + 07A44383266ED3EB00B5F16F /* RawInvoice.swift in Sources */, + 07A44310266ED3EB00B5F16F /* Result_NoneMonitorUpdateErrorZ.swift in Sources */, + 07A44338266ED3EB00B5F16F /* Result_QueryShortChannelIdsDecodeErrorZ.swift in Sources */, + 07A442FB266ED3EB00B5F16F /* Result_OpenChannelDecodeErrorZ.swift in Sources */, + 07A4437B266ED3EB00B5F16F /* StaticPaymentOutputDescriptor.swift in Sources */, + 07A44393266ED3EB00B5F16F /* FilesystemPersister.swift in Sources */, + 07A442DC266ED3EB00B5F16F /* Filter.swift in Sources */, + 07A44376266ED3EB00B5F16F /* ReplyShortChannelIdsEnd.swift in Sources */, + 07A4439F266ED3EB00B5F16F /* ErrorMessage.swift in Sources */, + 07A44365266ED3EB00B5F16F /* UpdateFulfillHTLC.swift in Sources */, + 07A443A4266ED3EB00B5F16F /* InitFeatures.swift in Sources */, + 07A4436D266ED3EB00B5F16F /* UpdateFee.swift in Sources */, + 07A4436F266ED3EB00B5F16F /* QueryShortChannelIds.swift in Sources */, + 07A4437D266ED3EB00B5F16F /* InMemorySigner.swift in Sources */, 07344C8726427F95001CD90E /* LDKExampleClass.swift in Sources */, - 07344EDD2642882B001CD90E /* Result_InMemorySignerDecodeErrorZ.swift in Sources */, - 07344DF32642882B001CD90E /* RoutingMessageHandler.swift in Sources */, - 07344E292642882B001CD90E /* Result_UpdateFulfillHTLCDecodeErrorZ.swift in Sources */, - 07344E272642882B001CD90E /* Result_PingDecodeErrorZ.swift in Sources */, - 07344F992642882C001CD90E /* BuiltCommitmentTransaction.swift in Sources */, - 07344E8F2642882B001CD90E /* Result_HTLCUpdateDecodeErrorZ.swift in Sources */, - 07344F1B2642882C001CD90E /* CommitmentTransaction.swift in Sources */, - 07344F092642882C001CD90E /* InvoiceFeatures.swift in Sources */, - 07344F7B2642882C001CD90E /* ChannelUpdate.swift in Sources */, - 07344EA52642882B001CD90E /* Result_NetAddressu8Z.swift in Sources */, - 07344E252642882B001CD90E /* Result_TxCreationKeysErrorZ.swift in Sources */, - 07344E9F2642882B001CD90E /* Result_SignatureNoneZ.swift in Sources */, - 07344EF72642882C001CD90E /* RouteHint.swift in Sources */, - 07344E392642882B001CD90E /* Result_RouteHintCreationErrorZ.swift in Sources */, - 07344EF52642882C001CD90E /* ChannelMonitorUpdate.swift in Sources */, - 07344EB32642882B001CD90E /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift in Sources */, - 07344DD12642882B001CD90E /* HTLCFailChannelUpdate.swift in Sources */, - 07344F352642882C001CD90E /* GossipTimestampFilter.swift in Sources */, - 07344EDB2642882B001CD90E /* Result_ClosingSignedDecodeErrorZ.swift in Sources */, - 07344DC92642882B001CD90E /* Fallback.swift in Sources */, - 07344F652642882C001CD90E /* ClosingSigned.swift in Sources */, - 07344EA32642882B001CD90E /* Result_UpdateAddHTLCDecodeErrorZ.swift in Sources */, - 07344E1B2642882B001CD90E /* Bindings.swift in Sources */, - 07344E752642882B001CD90E /* Result_FundingSignedDecodeErrorZ.swift in Sources */, - 07344F3B2642882C001CD90E /* CommitmentSigned.swift in Sources */, - 07344F112642882C001CD90E /* BestBlock.swift in Sources */, - 07344EB72642882B001CD90E /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift in Sources */, - 07344EBF2642882B001CD90E /* Result_OutPointDecodeErrorZ.swift in Sources */, - 07344F172642882C001CD90E /* QueryShortChannelIds.swift in Sources */, - 07344ED12642882B001CD90E /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift in Sources */, - 07344E512642882B001CD90E /* Result_AnnouncementSignaturesDecodeErrorZ.swift in Sources */, - 07344E5F2642882B001CD90E /* Result_TxOutAccessErrorZ.swift in Sources */, - 07344F232642882C001CD90E /* ChannelAnnouncement.swift in Sources */, - 07344F7D2642882C001CD90E /* ReplyChannelRange.swift in Sources */, - 07344DE12642882B001CD90E /* BaseSign.swift in Sources */, - 07344E532642882B001CD90E /* Result_StringErrorZ.swift in Sources */, - 07344E3B2642882B001CD90E /* Result_PongDecodeErrorZ.swift in Sources */, - 07344E7D2642882B001CD90E /* Result_ChannelAnnouncementDecodeErrorZ.swift in Sources */, - 07344EB52642882B001CD90E /* Result_ReplyChannelRangeDecodeErrorZ.swift in Sources */, - 07344F532642882C001CD90E /* ChannelHandshakeConfig.swift in Sources */, - 07344EF92642882C001CD90E /* Sha256.swift in Sources */, - 07344F5B2642882C001CD90E /* AcceptChannel.swift in Sources */, - 07344E452642882B001CD90E /* Result_UnsignedChannelUpdateDecodeErrorZ.swift in Sources */, - 07344DDF2642882B001CD90E /* SpendableOutputDescriptor.swift in Sources */, - 07344E4D2642882B001CD90E /* Result_NodeFeaturesDecodeErrorZ.swift in Sources */, - 07344E6F2642882B001CD90E /* Result_DescriptionCreationErrorZ.swift in Sources */, - 07344DC72642882B001CD90E /* Option_u64Z.swift in Sources */, - 07344DE52642882B001CD90E /* KeysInterface.swift in Sources */, - 07344E172642882B001CD90E /* C2Tuple_u32ScriptZ.swift in Sources */, - 07344E232642882B001CD90E /* Result_FundingCreatedDecodeErrorZ.swift in Sources */, - 07344E972642882B001CD90E /* Result_InitFeaturesDecodeErrorZ.swift in Sources */, - 07344DD52642882B001CD90E /* Option_u32Z.swift in Sources */, - 07344DDD2642882B001CD90E /* MonitorEvent.swift in Sources */, - 07344F672642882C001CD90E /* DirectionalChannelInfo.swift in Sources */, - 07344F032642882C001CD90E /* UpdateFulfillHTLC.swift in Sources */, - 07344F6D2642882C001CD90E /* UnsignedChannelAnnouncement.swift in Sources */, - 07344DF12642882B001CD90E /* Confirm.swift in Sources */, - 07344EE12642882B001CD90E /* ChainMonitor.swift in Sources */, - 07344EBB2642882B001CD90E /* Result_TxCreationKeysDecodeErrorZ.swift in Sources */, - 07344EA12642882B001CD90E /* Result_NoneErrorZ.swift in Sources */, - 07344EEF2642882C001CD90E /* PositiveTimestamp.swift in Sources */, - 07344F812642882C001CD90E /* NodeAnnouncement.swift in Sources */, - 07344EED2642882B001CD90E /* Ping.swift in Sources */, - 07344F4D2642882C001CD90E /* ChannelTransactionParameters.swift in Sources */, - 07344F5F2642882C001CD90E /* ChannelHandshakeLimits.swift in Sources */, - 07344E0B2642882B001CD90E /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift in Sources */, - 07344F072642882C001CD90E /* NetGraphMsgHandler.swift in Sources */, - 07344E912642882B001CD90E /* Result_RouteLightningErrorZ.swift in Sources */, - 07344ED32642882B001CD90E /* Result_InitDecodeErrorZ.swift in Sources */, - 07344F9D2642882C001CD90E /* Route.swift in Sources */, - 07344F0D2642882C001CD90E /* RoutingFees.swift in Sources */, - 07344EE32642882B001CD90E /* PayeePubKey.swift in Sources */, - 07344F192642882C001CD90E /* NetworkGraph.swift in Sources */, - 07344F932642882C001CD90E /* UnsignedNodeAnnouncement.swift in Sources */, - 07344F3F2642882C001CD90E /* RawInvoice.swift in Sources */, - 07344EF32642882C001CD90E /* UpdateFailMalformedHTLC.swift in Sources */, - 07344E3D2642882B001CD90E /* Result_ChannelPublicKeysDecodeErrorZ.swift in Sources */, - 07344F1D2642882C001CD90E /* KeysManager.swift in Sources */, - 07344E152642882B001CD90E /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift in Sources */, - 07344EAD2642882B001CD90E /* Result_SignDecodeErrorZ.swift in Sources */, - 07344F832642882C001CD90E /* RawDataPart.swift in Sources */, - 07344F052642882C001CD90E /* NodeFeatures.swift in Sources */, - 07344E2B2642882B001CD90E /* Result_NonePaymentSendFailureZ.swift in Sources */, - 07344F552642882C001CD90E /* ChannelManager.swift in Sources */, - 07344E7F2642882B001CD90E /* Result_NoneSemanticErrorZ.swift in Sources */, - 07344F692642882C001CD90E /* ChannelDetails.swift in Sources */, - 07344F7F2642882C001CD90E /* InitFeatures.swift in Sources */, - 07344E332642882B001CD90E /* Result_RevokeAndACKDecodeErrorZ.swift in Sources */, - 07344EB92642882B001CD90E /* Result_UpdateFailHTLCDecodeErrorZ.swift in Sources */, - 07344E312642882B001CD90E /* Result_RouteDecodeErrorZ.swift in Sources */, - 07344E932642882B001CD90E /* Result_InvoiceSemanticErrorZ.swift in Sources */, - 07344EC72642882B001CD90E /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift in Sources */, - 07344E772642882B001CD90E /* Result_InvoiceFeaturesDecodeErrorZ.swift in Sources */, - 07344DD32642882B001CD90E /* ErrorAction.swift in Sources */, - 07344F732642882C001CD90E /* DataLossProtect.swift in Sources */, - 07344F2B2642882C001CD90E /* UpdateFailHTLC.swift in Sources */, - 07344DCB2642882B001CD90E /* Option_C2Tuple_usizeTransactionZZ.swift in Sources */, - 07344F792642882C001CD90E /* WatchedOutput.swift in Sources */, - 07344DEF2642882B001CD90E /* BroadcasterInterface.swift in Sources */, - 07344F6F2642882C001CD90E /* LightningError.swift in Sources */, - 07344F892642882C001CD90E /* InvoiceSignature.swift in Sources */, - 07344E712642882B001CD90E /* Result_CommitmentTransactionDecodeErrorZ.swift in Sources */, - 07344E012642882B001CD90E /* Sign.swift in Sources */, - 07344E5B2642882B001CD90E /* Result_NonePeerHandleErrorZ.swift in Sources */, - 07344EAB2642882B001CD90E /* Result_QueryShortChannelIdsDecodeErrorZ.swift in Sources */, - 07344F492642882C001CD90E /* QueryChannelRange.swift in Sources */, - 07344DEB2642882B001CD90E /* FeeEstimator.swift in Sources */, - 07344F252642882C001CD90E /* ReplyShortChannelIdsEnd.swift in Sources */, - 07344EDF2642882B001CD90E /* MessageHandler.swift in Sources */, - 07344EBD2642882B001CD90E /* Result_PositiveTimestampCreationErrorZ.swift in Sources */, - 07344E9B2642882B001CD90E /* Result_CVec_SignatureZNoneZ.swift in Sources */, - 07344DF92642882B001CD90E /* Filter.swift in Sources */, - 07344ED92642882B001CD90E /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift in Sources */, - 07344E032642882B001CD90E /* C2Tuple_BlockHashChannelMonitorZ.swift in Sources */, - 07344E852642882B001CD90E /* Result_RoutingFeesDecodeErrorZ.swift in Sources */, - 07344E212642882B001CD90E /* Result_QueryChannelRangeDecodeErrorZ.swift in Sources */, - 07344F4F2642882C001CD90E /* NodeInfo.swift in Sources */, - 07344E492642882B001CD90E /* Result_AcceptChannelDecodeErrorZ.swift in Sources */, - 07344DFD2642882B001CD90E /* EventsProvider.swift in Sources */, - 07344F2D2642882C001CD90E /* FundingLocked.swift in Sources */, - 07344F952642882C001CD90E /* TrustedCommitmentTransaction.swift in Sources */, - 07344E8D2642882B001CD90E /* Result_SecretKeyErrorZ.swift in Sources */, - 07344F872642882C001CD90E /* ChannelInfo.swift in Sources */, - 07344F4B2642882C001CD90E /* HolderCommitmentTransaction.swift in Sources */, - 07344F592642882C001CD90E /* ChainParameters.swift in Sources */, - 07344DC52642882B001CD90E /* PaymentSendFailure.swift in Sources */, - 07344DCF2642882B001CD90E /* Event.swift in Sources */, - 07344F9B2642882C001CD90E /* UserConfig.swift in Sources */, - 07344F0B2642882C001CD90E /* Invoice.swift in Sources */, - 07344E952642882B001CD90E /* Result_SignedRawInvoiceNoneZ.swift in Sources */, - 07344EE72642882B001CD90E /* Description.swift in Sources */, - 07344DCD2642882B001CD90E /* APIError.swift in Sources */, - 07344E9D2642882B001CD90E /* Result_ChannelMonitorUpdateDecodeErrorZ.swift in Sources */, - 07344E352642882B001CD90E /* Result_OpenChannelDecodeErrorZ.swift in Sources */, - 07344E5D2642882B001CD90E /* Result_NoneMonitorUpdateErrorZ.swift in Sources */, - 07344F332642882C001CD90E /* InMemorySigner.swift in Sources */, - 07344F272642882C001CD90E /* IgnoringMessageHandler.swift in Sources */, - 07344F132642882C001CD90E /* UpdateFee.swift in Sources */, - 07344F512642882C001CD90E /* DirectedChannelTransactionParameters.swift in Sources */, - 07344E7B2642882B001CD90E /* Result_NetworkGraphDecodeErrorZ.swift in Sources */, - 07344F712642882C001CD90E /* MinFinalCltvExpiry.swift in Sources */, - 07344E4B2642882B001CD90E /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift in Sources */, + 07A442CC266ED3EB00B5F16F /* MonitorEvent.swift in Sources */, + 07A4438E266ED3EB00B5F16F /* ChannelHandshakeConfig.swift in Sources */, + 07A4435E266ED3EB00B5F16F /* ChannelMonitorUpdate.swift in Sources */, + 07A443AD266ED3EB00B5F16F /* Init.swift in Sources */, + 07A44356266ED3EB00B5F16F /* MonitorUpdateError.swift in Sources */, + 07A44339266ED3EB00B5F16F /* Result_SignDecodeErrorZ.swift in Sources */, + 07A44370266ED3EB00B5F16F /* NetworkGraph.swift in Sources */, + 07A442EE266ED3EB00B5F16F /* Result_ChannelConfigDecodeErrorZ.swift in Sources */, + 07A442E2266ED3EB00B5F16F /* C2Tuple_SignatureCVec_SignatureZZ.swift in Sources */, + 07A442CE266ED3EB00B5F16F /* BaseSign.swift in Sources */, + 07A44300266ED3EB00B5F16F /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift in Sources */, + 07A4436C266ED3EB00B5F16F /* BestBlock.swift in Sources */, + 07A44303266ED3EB00B5F16F /* Result_UnsignedChannelUpdateDecodeErrorZ.swift in Sources */, + 07A4438C266ED3EB00B5F16F /* BackgroundProcessor.swift in Sources */, + 07A44301266ED3EB00B5F16F /* Result_PaymentSecretAPIErrorZ.swift in Sources */, + 07A442D9266ED3EB00B5F16F /* ChannelManagerPersister.swift in Sources */, + 07A442E3266ED3EB00B5F16F /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift in Sources */, + 07A442C2266ED3EB00B5F16F /* Fallback.swift in Sources */, + 07A442C3266ED3EB00B5F16F /* Option_C2Tuple_usizeTransactionZZ.swift in Sources */, + 07A4437A266ED3EB00B5F16F /* FundingLocked.swift in Sources */, + 07A44396266ED3EB00B5F16F /* CommitmentUpdate.swift in Sources */, + 07A443B1266ED3EB00B5F16F /* BuiltCommitmentTransaction.swift in Sources */, + 07A4433B266ED3EB00B5F16F /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift in Sources */, + 07A442FC266ED3EB00B5F16F /* Result_ChannelInfoDecodeErrorZ.swift in Sources */, + 07A44312266ED3EB00B5F16F /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift in Sources */, + 07A442DA266ED3EB00B5F16F /* Listen.swift in Sources */, + 07A442D8266ED3EB00B5F16F /* RoutingMessageHandler.swift in Sources */, + 07A44334266ED3EB00B5F16F /* Result_UpdateAddHTLCDecodeErrorZ.swift in Sources */, + 07A442DD266ED3EB00B5F16F /* Access.swift in Sources */, + 07A442F4266ED3EB00B5F16F /* Result_UpdateFulfillHTLCDecodeErrorZ.swift in Sources */, + 07A443B4266ED3EB00B5F16F /* OutPoint.swift in Sources */, + 07A4437C266ED3EB00B5F16F /* HTLCUpdate.swift in Sources */, + 07A442FE266ED3EB00B5F16F /* Result_PongDecodeErrorZ.swift in Sources */, + 07A44313266ED3EB00B5F16F /* Result_NoneLightningErrorZ.swift in Sources */, + 07A44345266ED3EB00B5F16F /* Result_ShutdownDecodeErrorZ.swift in Sources */, + 07A44373266ED3EB00B5F16F /* FundingCreated.swift in Sources */, + 07A44397266ED3EB00B5F16F /* ClosingSigned.swift in Sources */, + 07A4438A266ED3EB00B5F16F /* ChannelTransactionParameters.swift in Sources */, + 07A44318266ED3EB00B5F16F /* Result_UpdateFeeDecodeErrorZ.swift in Sources */, + 07A4436E266ED3EB00B5F16F /* UnsignedChannelUpdate.swift in Sources */, + 07A44302266ED3EB00B5F16F /* Result_SpendableOutputDescriptorDecodeErrorZ.swift in Sources */, + 07A44341266ED3EB00B5F16F /* Result_PositiveTimestampCreationErrorZ.swift in Sources */, + 07A4439D266ED3EB00B5F16F /* MinFinalCltvExpiry.swift in Sources */, + 07A44367266ED3EB00B5F16F /* NetGraphMsgHandler.swift in Sources */, + 07A4432C266ED3EB00B5F16F /* Result_SignedRawInvoiceNoneZ.swift in Sources */, + 07A4437F266ED3EB00B5F16F /* PeerHandleError.swift in Sources */, + 07A4439E266ED3EB00B5F16F /* DataLossProtect.swift in Sources */, + 07A442C4266ED3EB00B5F16F /* APIError.swift in Sources */, + 07A4432E266ED3EB00B5F16F /* Result_NetAddressDecodeErrorZ.swift in Sources */, + 07A44386266ED3EB00B5F16F /* ChannelConfig.swift in Sources */, + 07A442D2266ED3EB00B5F16F /* SocketDescriptor.swift in Sources */, + 07A4439C266ED3EB00B5F16F /* LightningError.swift in Sources */, + 07A44379266ED3EB00B5F16F /* UpdateFailHTLC.swift in Sources */, + 07A442CB266ED3EB00B5F16F /* MessageSendEvent.swift in Sources */, + 07A4436B266ED3EB00B5F16F /* ChannelMonitor.swift in Sources */, + 07A443B2266ED3EB00B5F16F /* UserConfig.swift in Sources */, + 07A4431F266ED3EB00B5F16F /* Result_NetworkGraphDecodeErrorZ.swift in Sources */, + 07A44377266ED3EB00B5F16F /* IgnoringMessageHandler.swift in Sources */, + 07A44348266ED3EB00B5F16F /* Result_NodeInfoDecodeErrorZ.swift in Sources */, + 07A44369266ED3EB00B5F16F /* Invoice.swift in Sources */, + 07A44362266ED3EB00B5F16F /* ChannelReestablish.swift in Sources */, + 07A4431A266ED3EB00B5F16F /* Result_CommitmentTransactionDecodeErrorZ.swift in Sources */, + 07A442FA266ED3EB00B5F16F /* Result_RevokeAndACKDecodeErrorZ.swift in Sources */, + 07A442E5266ED3EB00B5F16F /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift in Sources */, + 07A443A9266ED3EB00B5F16F /* InvoiceSignature.swift in Sources */, + 07A442E1266ED3EB00B5F16F /* C2Tuple_BlockHashChannelMonitorZ.swift in Sources */, + 07A442D0266ED3EB00B5F16F /* KeysInterface.swift in Sources */, + 07A4434B266ED3EB00B5F16F /* Result_DelayedPaymentOutputDescriptorDecodeErrorZ.swift in Sources */, + 07A44390266ED3EB00B5F16F /* Shutdown.swift in Sources */, + 07A44317266ED3EB00B5F16F /* Result_ChannelUpdateDecodeErrorZ.swift in Sources */, + 07A44321266ED3EB00B5F16F /* Result_NoneSemanticErrorZ.swift in Sources */, + 07A44394266ED3EB00B5F16F /* ChannelHandshakeLimits.swift in Sources */, + 07A44349266ED3EB00B5F16F /* Result_ExpiryTimeCreationErrorZ.swift in Sources */, + 07A44311266ED3EB00B5F16F /* Result_TxOutAccessErrorZ.swift in Sources */, + 07A4439A266ED3EB00B5F16F /* NodeAnnouncementInfo.swift in Sources */, + 07A443AB266ED3EB00B5F16F /* FundingSigned.swift in Sources */, + 07A442DE266ED3EB00B5F16F /* EventsProvider.swift in Sources */, 0749F9C8265615CC00876C52 /* UtilMethods.swift in Sources */, - 07344F372642882C001CD90E /* PeerHandleError.swift in Sources */, - 07344DF72642882B001CD90E /* ChannelMessageHandler.swift in Sources */, - 07344F772642882C001CD90E /* RouteHop.swift in Sources */, - 07344E1F2642882B001CD90E /* Result_ChannelTransactionParametersDecodeErrorZ.swift in Sources */, - 07344EF12642882C001CD90E /* UpdateAddHTLC.swift in Sources */, - 07344E432642882B001CD90E /* Result_SpendableOutputDescriptorDecodeErrorZ.swift in Sources */, - 07344F472642882C001CD90E /* DecodeError.swift in Sources */, - 07344ECF2642882B001CD90E /* Result_ChannelFeaturesDecodeErrorZ.swift in Sources */, - 07344EEB2642882B001CD90E /* RevokeAndACK.swift in Sources */, - 07344E632642882B001CD90E /* Result_NoneLightningErrorZ.swift in Sources */, - 07344FA12642882C001CD90E /* DelayedPaymentOutputDescriptor.swift in Sources */, - 07344DDB2642882B001CD90E /* MessageSendEvent.swift in Sources */, - 07344EC12642882B001CD90E /* Result_NodeAnnouncementDecodeErrorZ.swift in Sources */, - 07344F3D2642882C001CD90E /* TxCreationKeys.swift in Sources */, - 07344F5D2642882C001CD90E /* FilesystemPersister.swift in Sources */, - 07344E2F2642882B001CD90E /* Result_DirectionalChannelInfoDecodeErrorZ.swift in Sources */, - 07344E992642882B001CD90E /* Result_RecoverableSignatureNoneZ.swift in Sources */, - 07344E892642882B001CD90E /* Result_GossipTimestampFilterDecodeErrorZ.swift in Sources */, - 07344EFF2642882C001CD90E /* RouteHintHop.swift in Sources */, - 07344DED2642882B001CD90E /* MessageSendEventsProvider.swift in Sources */, - 07344F6B2642882C001CD90E /* NodeAnnouncementInfo.swift in Sources */, + 07A442EC266ED3EB00B5F16F /* C2Tuple_usizeTransactionZ.swift in Sources */, + 07A44327266ED3EB00B5F16F /* Result_CVec_CVec_u8ZZNoneZ.swift in Sources */, + 07A44357266ED3EB00B5F16F /* Description.swift in Sources */, + 07A44385266ED3EB00B5F16F /* ExpiryTime.swift in Sources */, + 07A442D7266ED3EB00B5F16F /* EventHandler.swift in Sources */, + 07A442E9266ED3EB00B5F16F /* C2Tuple_OutPointScriptZ.swift in Sources */, + 07A442D6266ED3EB00B5F16F /* Confirm.swift in Sources */, + 07A44395266ED3EB00B5F16F /* AnnouncementSignatures.swift in Sources */, + 07A44320266ED3EB00B5F16F /* Result_ChannelAnnouncementDecodeErrorZ.swift in Sources */, + 07A44337266ED3EB00B5F16F /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift in Sources */, + 07A44335266ED3EB00B5F16F /* Result_NetAddressu8Z.swift in Sources */, + 07A4430D266ED3EB00B5F16F /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift in Sources */, + 07A4433F266ED3EB00B5F16F /* Result_UpdateFailHTLCDecodeErrorZ.swift in Sources */, + 07A4431D266ED3EB00B5F16F /* Result_InvoiceFeaturesDecodeErrorZ.swift in Sources */, + 07A44380266ED3EB00B5F16F /* ErroringMessageHandler.swift in Sources */, + 07A44378266ED3EB00B5F16F /* PeerManager.swift in Sources */, + 07A442C0266ED3EB00B5F16F /* PaymentSendFailure.swift in Sources */, + 07A443A8266ED3EB00B5F16F /* ChannelInfo.swift in Sources */, + 07A4434D266ED3EB00B5F16F /* Result_InitDecodeErrorZ.swift in Sources */, + 07A44354266ED3EB00B5F16F /* ChainMonitor.swift in Sources */, + 07A442FF266ED3EB00B5F16F /* Result_ChannelPublicKeysDecodeErrorZ.swift in Sources */, + 07A44326266ED3EB00B5F16F /* Result_GossipTimestampFilterDecodeErrorZ.swift in Sources */, + 07A442C6266ED3EB00B5F16F /* HTLCFailChannelUpdate.swift in Sources */, + 07A4433E266ED3EB00B5F16F /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift in Sources */, + 07A4432B266ED3EB00B5F16F /* Result_InvoiceSemanticErrorZ.swift in Sources */, + 07A44340266ED3EB00B5F16F /* Result_TxCreationKeysDecodeErrorZ.swift in Sources */, + 07A44368266ED3EB00B5F16F /* InvoiceFeatures.swift in Sources */, + 07A44304266ED3EB00B5F16F /* Result_ErrorMessageDecodeErrorZ.swift in Sources */, + 07A442EB266ED3EB00B5F16F /* C2Tuple_u32ScriptZ.swift in Sources */, + 07A44309266ED3EB00B5F16F /* Result_AnnouncementSignaturesDecodeErrorZ.swift in Sources */, + 07A442C9266ED3EB00B5F16F /* NetAddress.swift in Sources */, + 07A44308266ED3EB00B5F16F /* Result_TrustedCommitmentTransactionNoneZ.swift in Sources */, + 07A443AA266ED3EB00B5F16F /* OpenChannel.swift in Sources */, + 07A4434E266ED3EB00B5F16F /* Result_NoneChannelMonitorUpdateErrZ.swift in Sources */, + 07A44351266ED3EB00B5F16F /* Result_ClosingSignedDecodeErrorZ.swift in Sources */, + 07A44391266ED3EB00B5F16F /* ChainParameters.swift in Sources */, + 07A44358266ED3EB00B5F16F /* LockedNetworkGraph.swift in Sources */, + 07A44323266ED3EB00B5F16F /* Result_InvoiceNoneZ.swift in Sources */, + 07A443B5266ED3EB00B5F16F /* DelayedPaymentOutputDescriptor.swift in Sources */, + 07A44374266ED3EB00B5F16F /* CounterpartyChannelTransactionParameters.swift in Sources */, + 07A44366266ED3EB00B5F16F /* NodeFeatures.swift in Sources */, + 07A44371266ED3EB00B5F16F /* CommitmentTransaction.swift in Sources */, + 07A44344266ED3EB00B5F16F /* Result_PayeePubKeyErrorZ.swift in Sources */, + 07A44388266ED3EB00B5F16F /* QueryChannelRange.swift in Sources */, + 07A44375266ED3EB00B5F16F /* ChannelAnnouncement.swift in Sources */, + 07A44392266ED3EB00B5F16F /* AcceptChannel.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1507,249 +1296,10 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 07344F822642882C001CD90E /* NodeAnnouncement.swift in Sources */, - 07344F882642882C001CD90E /* ChannelInfo.swift in Sources */, - 07344F0E2642882C001CD90E /* RoutingFees.swift in Sources */, - 07344EF22642882C001CD90E /* UpdateAddHTLC.swift in Sources */, - 07344F3A2642882C001CD90E /* ErroringMessageHandler.swift in Sources */, - 07344F5A2642882C001CD90E /* ChainParameters.swift in Sources */, - 07344F6C2642882C001CD90E /* NodeAnnouncementInfo.swift in Sources */, - 07344F0C2642882C001CD90E /* Invoice.swift in Sources */, - 07344E802642882B001CD90E /* Result_NoneSemanticErrorZ.swift in Sources */, - 07344F022642882C001CD90E /* ChannelManagerReadArgs.swift in Sources */, - 07344E3C2642882B001CD90E /* Result_PongDecodeErrorZ.swift in Sources */, - 07344E902642882B001CD90E /* Result_HTLCUpdateDecodeErrorZ.swift in Sources */, - 07344F222642882C001CD90E /* CounterpartyChannelTransactionParameters.swift in Sources */, - 07344EEC2642882B001CD90E /* RevokeAndACK.swift in Sources */, - 07344F182642882C001CD90E /* QueryShortChannelIds.swift in Sources */, - 07344F502642882C001CD90E /* NodeInfo.swift in Sources */, - 07344EC22642882B001CD90E /* Result_NodeAnnouncementDecodeErrorZ.swift in Sources */, - 07344E162642882B001CD90E /* C3Tuple_RawInvoice_u832InvoiceSignatureZ.swift in Sources */, - 07344F902642882C001CD90E /* SignedRawInvoice.swift in Sources */, - 07344E4C2642882B001CD90E /* Result_UnsignedNodeAnnouncementDecodeErrorZ.swift in Sources */, - 07344F162642882C001CD90E /* UnsignedChannelUpdate.swift in Sources */, - 07344F3E2642882C001CD90E /* TxCreationKeys.swift in Sources */, - 07344EA22642882B001CD90E /* Result_NoneErrorZ.swift in Sources */, - 07344EA42642882B001CD90E /* Result_UpdateAddHTLCDecodeErrorZ.swift in Sources */, - 07344ED22642882B001CD90E /* Result_HTLCOutputInCommitmentDecodeErrorZ.swift in Sources */, - 07344F1E2642882C001CD90E /* KeysManager.swift in Sources */, - 07344EAC2642882B001CD90E /* Result_QueryShortChannelIdsDecodeErrorZ.swift in Sources */, - 07344FA02642882C001CD90E /* OutPoint.swift in Sources */, - 07344F8A2642882C001CD90E /* InvoiceSignature.swift in Sources */, - 07344F282642882C001CD90E /* IgnoringMessageHandler.swift in Sources */, - 07344E7A2642882B001CD90E /* Result_TransactionNoneZ.swift in Sources */, - 07344EEA2642882B001CD90E /* LockedNetworkGraph.swift in Sources */, - 07344EFA2642882C001CD90E /* Sha256.swift in Sources */, - 07344F762642882C001CD90E /* ErrorMessage.swift in Sources */, - 07344E7C2642882B001CD90E /* Result_NetworkGraphDecodeErrorZ.swift in Sources */, - 07344DF62642882B001CD90E /* Listen.swift in Sources */, - 07344F782642882C001CD90E /* RouteHop.swift in Sources */, - 07344F742642882C001CD90E /* DataLossProtect.swift in Sources */, - 07344F922642882C001CD90E /* Init.swift in Sources */, - 07344DF02642882B001CD90E /* BroadcasterInterface.swift in Sources */, - 07344E982642882B001CD90E /* Result_InitFeaturesDecodeErrorZ.swift in Sources */, - 07344F2C2642882C001CD90E /* UpdateFailHTLC.swift in Sources */, - 07344F942642882C001CD90E /* UnsignedNodeAnnouncement.swift in Sources */, - 07344F862642882C001CD90E /* ChannelPublicKeys.swift in Sources */, - 07344DFA2642882B001CD90E /* Filter.swift in Sources */, - 07344F8C2642882C001CD90E /* OpenChannel.swift in Sources */, - 07344E622642882B001CD90E /* Result_CResult_NetAddressu8ZDecodeErrorZ.swift in Sources */, - 07344F5E2642882C001CD90E /* FilesystemPersister.swift in Sources */, - 07344DD02642882B001CD90E /* Event.swift in Sources */, - 07344E9E2642882B001CD90E /* Result_ChannelMonitorUpdateDecodeErrorZ.swift in Sources */, - 07344F402642882C001CD90E /* RawInvoice.swift in Sources */, - 07344EAE2642882B001CD90E /* Result_SignDecodeErrorZ.swift in Sources */, - 07344F522642882C001CD90E /* DirectedChannelTransactionParameters.swift in Sources */, - 07344DEE2642882B001CD90E /* MessageSendEventsProvider.swift in Sources */, - 07344F602642882C001CD90E /* ChannelHandshakeLimits.swift in Sources */, - 07344F6E2642882C001CD90E /* UnsignedChannelAnnouncement.swift in Sources */, 07344C63264277ED001CD90E /* LDKFrameworkTests.swift in Sources */, - 07344DFE2642882B001CD90E /* EventsProvider.swift in Sources */, - 07344EC82642882B001CD90E /* Result_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ.swift in Sources */, - 07344EE82642882B001CD90E /* Description.swift in Sources */, - 07344E6C2642882B001CD90E /* Result_ChannelUpdateDecodeErrorZ.swift in Sources */, - 07344EB42642882B001CD90E /* Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.swift in Sources */, - 07344EA82642882B001CD90E /* Result_FundingLockedDecodeErrorZ.swift in Sources */, - 07344F9C2642882C001CD90E /* UserConfig.swift in Sources */, - 07344E122642882B001CD90E /* C2Tuple_u32TxOutZ.swift in Sources */, - 07344EF82642882C001CD90E /* RouteHint.swift in Sources */, - 07344F482642882C001CD90E /* DecodeError.swift in Sources */, - 07344EB22642882B001CD90E /* Result_CounterpartyChannelTransactionParametersDecodeErrorZ.swift in Sources */, - 07344EDE2642882B001CD90E /* Result_InMemorySignerDecodeErrorZ.swift in Sources */, - 07344E202642882B001CD90E /* Result_ChannelTransactionParametersDecodeErrorZ.swift in Sources */, - 07344F442642882C001CD90E /* ExpiryTime.swift in Sources */, - 07344F262642882C001CD90E /* ReplyShortChannelIdsEnd.swift in Sources */, - 07344E442642882B001CD90E /* Result_SpendableOutputDescriptorDecodeErrorZ.swift in Sources */, - 07344F7A2642882C001CD90E /* WatchedOutput.swift in Sources */, - 07344DC82642882B001CD90E /* Option_u64Z.swift in Sources */, - 07344E302642882B001CD90E /* Result_DirectionalChannelInfoDecodeErrorZ.swift in Sources */, - 07344ECC2642882B001CD90E /* Result_NodeInfoDecodeErrorZ.swift in Sources */, - 07344E3A2642882B001CD90E /* Result_RouteHintCreationErrorZ.swift in Sources */, - 07344E102642882B001CD90E /* C2Tuple_PaymentHashPaymentSecretZ.swift in Sources */, - 07344F242642882C001CD90E /* ChannelAnnouncement.swift in Sources */, - 07344E322642882B001CD90E /* Result_RouteDecodeErrorZ.swift in Sources */, - 07344E382642882B001CD90E /* Result_ChannelInfoDecodeErrorZ.swift in Sources */, - 07344E4E2642882B001CD90E /* Result_NodeFeaturesDecodeErrorZ.swift in Sources */, - 07344E9A2642882B001CD90E /* Result_RecoverableSignatureNoneZ.swift in Sources */, - 07344F382642882C001CD90E /* PeerHandleError.swift in Sources */, 07344C8826427F95001CD90E /* LDKExampleClass.swift in Sources */, - 07344E062642882B001CD90E /* C2Tuple_SignatureCVec_SignatureZZ.swift in Sources */, - 07344F302642882C001CD90E /* StaticPaymentOutputDescriptor.swift in Sources */, - 07344E1A2642882B001CD90E /* C2Tuple_usizeTransactionZ.swift in Sources */, - 07344EA02642882B001CD90E /* Result_SignatureNoneZ.swift in Sources */, - 07344F542642882C001CD90E /* ChannelHandshakeConfig.swift in Sources */, - 07344DD82642882B001CD90E /* NetAddress.swift in Sources */, - 07344DD42642882B001CD90E /* ErrorAction.swift in Sources */, - 07344E4A2642882B001CD90E /* Result_AcceptChannelDecodeErrorZ.swift in Sources */, - 07344F4E2642882C001CD90E /* ChannelTransactionParameters.swift in Sources */, - 07344F002642882C001CD90E /* RouteHintHop.swift in Sources */, - 07344F662642882C001CD90E /* ClosingSigned.swift in Sources */, - 07344E702642882B001CD90E /* Result_DescriptionCreationErrorZ.swift in Sources */, - 07344E742642882B001CD90E /* Result_SiPrefixNoneZ.swift in Sources */, - 07344F702642882C001CD90E /* LightningError.swift in Sources */, - 07344E042642882B001CD90E /* C2Tuple_BlockHashChannelMonitorZ.swift in Sources */, - 07344ED62642882B001CD90E /* Result_NoneChannelMonitorUpdateErrZ.swift in Sources */, - 07344DC62642882B001CD90E /* PaymentSendFailure.swift in Sources */, - 07344F1C2642882C001CD90E /* CommitmentTransaction.swift in Sources */, - 07344EEE2642882C001CD90E /* Ping.swift in Sources */, - 07344F642642882C001CD90E /* CommitmentUpdate.swift in Sources */, - 07344DF22642882B001CD90E /* Confirm.swift in Sources */, - 07344E0A2642882B001CD90E /* C2Tuple_BlockHashChannelManagerZ.swift in Sources */, - 07344E582642882B001CD90E /* Result_UnsignedChannelAnnouncementDecodeErrorZ.swift in Sources */, - 07344EB82642882B001CD90E /* Result_UpdateFailMalformedHTLCDecodeErrorZ.swift in Sources */, - 07344F842642882C001CD90E /* RawDataPart.swift in Sources */, - 07344F062642882C001CD90E /* NodeFeatures.swift in Sources */, - 07344EBA2642882B001CD90E /* Result_UpdateFailHTLCDecodeErrorZ.swift in Sources */, - 07344F122642882C001CD90E /* BestBlock.swift in Sources */, - 07344E6E2642882B001CD90E /* Result_UpdateFeeDecodeErrorZ.swift in Sources */, - 07344EBC2642882B001CD90E /* Result_TxCreationKeysDecodeErrorZ.swift in Sources */, - 07344E842642882B001CD90E /* Result_InvoiceNoneZ.swift in Sources */, - 07344EF02642882C001CD90E /* PositiveTimestamp.swift in Sources */, - 07344DD22642882B001CD90E /* HTLCFailChannelUpdate.swift in Sources */, - 07344F722642882C001CD90E /* MinFinalCltvExpiry.swift in Sources */, - 07344F562642882C001CD90E /* ChannelManager.swift in Sources */, - 07344E822642882B001CD90E /* Result_InvoiceSignOrCreationErrorZ.swift in Sources */, - 07344F9E2642882C001CD90E /* Route.swift in Sources */, - 07344F5C2642882C001CD90E /* AcceptChannel.swift in Sources */, - 07344E462642882B001CD90E /* Result_UnsignedChannelUpdateDecodeErrorZ.swift in Sources */, - 07344E142642882B001CD90E /* C2Tuple_OutPointScriptZ.swift in Sources */, - 07344EF42642882C001CD90E /* UpdateFailMalformedHTLC.swift in Sources */, - 07344E6A2642882B001CD90E /* Result_boolLightningErrorZ.swift in Sources */, - 07344E422642882B001CD90E /* Result_PaymentSecretAPIErrorZ.swift in Sources */, - 07344F422642882C001CD90E /* Pong.swift in Sources */, - 07344EDC2642882B001CD90E /* Result_ClosingSignedDecodeErrorZ.swift in Sources */, - 07344E762642882B001CD90E /* Result_FundingSignedDecodeErrorZ.swift in Sources */, - 07344ECA2642882B001CD90E /* Result_NodeAnnouncementInfoDecodeErrorZ.swift in Sources */, - 07344ED82642882B001CD90E /* Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.swift in Sources */, - 07344DFC2642882B001CD90E /* Access.swift in Sources */, - 07344E0C2642882B001CD90E /* C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ.swift in Sources */, - 07344E8A2642882B001CD90E /* Result_GossipTimestampFilterDecodeErrorZ.swift in Sources */, - 07344DE02642882B001CD90E /* SpendableOutputDescriptor.swift in Sources */, - 07344E9C2642882B001CD90E /* Result_CVec_SignatureZNoneZ.swift in Sources */, - 07344F342642882C001CD90E /* InMemorySigner.swift in Sources */, - 07344F802642882C001CD90E /* InitFeatures.swift in Sources */, - 07344EB62642882B001CD90E /* Result_ReplyChannelRangeDecodeErrorZ.swift in Sources */, 0749F9C7265615CC00876C52 /* ChannelManagerConstructor.swift in Sources */, - 07344F082642882C001CD90E /* NetGraphMsgHandler.swift in Sources */, 0749F9C9265615CC00876C52 /* UtilMethods.swift in Sources */, - 07344EC42642882B001CD90E /* Result_PayeePubKeyErrorZ.swift in Sources */, - 07344F322642882C001CD90E /* HTLCUpdate.swift in Sources */, - 07344F3C2642882C001CD90E /* CommitmentSigned.swift in Sources */, - 07344ECE2642882B001CD90E /* Result_ExpiryTimeCreationErrorZ.swift in Sources */, - 07344EC62642882B001CD90E /* Result_ShutdownDecodeErrorZ.swift in Sources */, - 07344EB02642882B001CD90E /* Result_boolPeerHandleErrorZ.swift in Sources */, - 07344E082642882B001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ.swift in Sources */, - 07344EE02642882B001CD90E /* MessageHandler.swift in Sources */, - 07344E262642882B001CD90E /* Result_TxCreationKeysErrorZ.swift in Sources */, - 07344E7E2642882B001CD90E /* Result_ChannelAnnouncementDecodeErrorZ.swift in Sources */, - 07344E5A2642882B001CD90E /* Result_CommitmentSignedDecodeErrorZ.swift in Sources */, - 07344E642642882B001CD90E /* Result_NoneLightningErrorZ.swift in Sources */, - 07344F462642882C001CD90E /* ChannelConfig.swift in Sources */, - 07344DCC2642882B001CD90E /* Option_C2Tuple_usizeTransactionZZ.swift in Sources */, - 07344EDA2642882B001CD90E /* Result_ReplyShortChannelIdsEndDecodeErrorZ.swift in Sources */, - 07344F102642882C001CD90E /* ChannelMonitor.swift in Sources */, - 07344F0A2642882C001CD90E /* InvoiceFeatures.swift in Sources */, - 07344E1C2642882B001CD90E /* Bindings.swift in Sources */, - 07344EC02642882B001CD90E /* Result_OutPointDecodeErrorZ.swift in Sources */, - 07344DF82642882B001CD90E /* ChannelMessageHandler.swift in Sources */, - 07344E3E2642882B001CD90E /* Result_ChannelPublicKeysDecodeErrorZ.swift in Sources */, - 07344E1E2642882B001CD90E /* Result_ChannelConfigDecodeErrorZ.swift in Sources */, - 07344F9A2642882C001CD90E /* BuiltCommitmentTransaction.swift in Sources */, - 07344E282642882B001CD90E /* Result_PingDecodeErrorZ.swift in Sources */, - 07344DDA2642882B001CD90E /* SignOrCreationError.swift in Sources */, - 07344ED02642882B001CD90E /* Result_ChannelFeaturesDecodeErrorZ.swift in Sources */, - 07344E0E2642882B001CD90E /* C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ.swift in Sources */, - 07344EE42642882B001CD90E /* PayeePubKey.swift in Sources */, - 07344F6A2642882C001CD90E /* ChannelDetails.swift in Sources */, - 07344F982642882C001CD90E /* ChannelFeatures.swift in Sources */, - 07344E602642882B001CD90E /* Result_TxOutAccessErrorZ.swift in Sources */, - 07344DDE2642882B001CD90E /* MonitorEvent.swift in Sources */, - 07344E2E2642882B001CD90E /* Result_CVec_u8ZPeerHandleErrorZ.swift in Sources */, - 07344E662642882B001CD90E /* Result_NoneAPIErrorZ.swift in Sources */, - 07344E722642882B001CD90E /* Result_CommitmentTransactionDecodeErrorZ.swift in Sources */, - 07344EE22642882B001CD90E /* ChainMonitor.swift in Sources */, - 07344E522642882B001CD90E /* Result_AnnouncementSignaturesDecodeErrorZ.swift in Sources */, - 07344E8E2642882B001CD90E /* Result_SecretKeyErrorZ.swift in Sources */, - 07344E942642882B001CD90E /* Result_InvoiceSemanticErrorZ.swift in Sources */, - 07344EE62642882B001CD90E /* MonitorUpdateError.swift in Sources */, - 07344F582642882C001CD90E /* Shutdown.swift in Sources */, - 07344DCA2642882B001CD90E /* Fallback.swift in Sources */, - 07344F962642882C001CD90E /* TrustedCommitmentTransaction.swift in Sources */, - 07344E5E2642882B001CD90E /* Result_NoneMonitorUpdateErrorZ.swift in Sources */, - 07344E542642882B001CD90E /* Result_StringErrorZ.swift in Sources */, - 07344DCE2642882B001CD90E /* APIError.swift in Sources */, - 07344E922642882B001CD90E /* Result_RouteLightningErrorZ.swift in Sources */, - 07344DE42642882B001CD90E /* Persist.swift in Sources */, - 07344E362642882B001CD90E /* Result_OpenChannelDecodeErrorZ.swift in Sources */, - 07344E882642882B001CD90E /* Result_ChannelReestablishDecodeErrorZ.swift in Sources */, - 07344E342642882B001CD90E /* Result_RevokeAndACKDecodeErrorZ.swift in Sources */, - 07344E242642882B001CD90E /* Result_FundingCreatedDecodeErrorZ.swift in Sources */, - 07344F042642882C001CD90E /* UpdateFulfillHTLC.swift in Sources */, - 07344DE82642882B001CD90E /* Logger.swift in Sources */, - 07344DDC2642882B001CD90E /* MessageSendEvent.swift in Sources */, - 07344EAA2642882B001CD90E /* Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.swift in Sources */, - 07344F4A2642882C001CD90E /* QueryChannelRange.swift in Sources */, - 07344DEA2642882B001CD90E /* SocketDescriptor.swift in Sources */, - 07344F202642882C001CD90E /* FundingCreated.swift in Sources */, - 07344EBE2642882B001CD90E /* Result_PositiveTimestampCreationErrorZ.swift in Sources */, - 07344E022642882B001CD90E /* Sign.swift in Sources */, - 07344E862642882B001CD90E /* Result_RoutingFeesDecodeErrorZ.swift in Sources */, - 07344E222642882B001CD90E /* Result_QueryChannelRangeDecodeErrorZ.swift in Sources */, - 07344E5C2642882B001CD90E /* Result_NonePeerHandleErrorZ.swift in Sources */, - 07344E2A2642882B001CD90E /* Result_UpdateFulfillHTLCDecodeErrorZ.swift in Sources */, - 07344F7C2642882C001CD90E /* ChannelUpdate.swift in Sources */, - 07344F4C2642882C001CD90E /* HolderCommitmentTransaction.swift in Sources */, - 07344E402642882B001CD90E /* Result_BuiltCommitmentTransactionDecodeErrorZ.swift in Sources */, - 07344DD62642882B001CD90E /* Option_u32Z.swift in Sources */, - 07344EFE2642882C001CD90E /* ChannelReestablish.swift in Sources */, - 07344E682642882B001CD90E /* Result_PublicKeyErrorZ.swift in Sources */, - 07344E562642882B001CD90E /* Result_HolderCommitmentTransactionDecodeErrorZ.swift in Sources */, - 07344F2A2642882C001CD90E /* PeerManager.swift in Sources */, - 07344F142642882C001CD90E /* UpdateFee.swift in Sources */, - 07344F1A2642882C001CD90E /* NetworkGraph.swift in Sources */, - 07344E502642882B001CD90E /* Result_TrustedCommitmentTransactionNoneZ.swift in Sources */, - 07344EFC2642882C001CD90E /* HTLCOutputInCommitment.swift in Sources */, - 07344E8C2642882B001CD90E /* Result_CVec_CVec_u8ZZNoneZ.swift in Sources */, - 07344FA22642882C001CD90E /* DelayedPaymentOutputDescriptor.swift in Sources */, - 07344F362642882C001CD90E /* GossipTimestampFilter.swift in Sources */, - 07344DE62642882B001CD90E /* KeysInterface.swift in Sources */, - 07344F7E2642882C001CD90E /* ReplyChannelRange.swift in Sources */, - 07344F622642882C001CD90E /* AnnouncementSignatures.swift in Sources */, - 07344E482642882B001CD90E /* Result_ErrorMessageDecodeErrorZ.swift in Sources */, - 07344DE22642882B001CD90E /* BaseSign.swift in Sources */, - 07344EF62642882C001CD90E /* ChannelMonitorUpdate.swift in Sources */, - 07344E962642882B001CD90E /* Result_SignedRawInvoiceNoneZ.swift in Sources */, - 07344E002642882B001CD90E /* Watch.swift in Sources */, - 07344DEC2642882B001CD90E /* FeeEstimator.swift in Sources */, - 07344E2C2642882B001CD90E /* Result_NonePaymentSendFailureZ.swift in Sources */, - 07344F2E2642882C001CD90E /* FundingLocked.swift in Sources */, - 07344F682642882C001CD90E /* DirectionalChannelInfo.swift in Sources */, - 07344F8E2642882C001CD90E /* FundingSigned.swift in Sources */, - 07344E782642882B001CD90E /* Result_InvoiceFeaturesDecodeErrorZ.swift in Sources */, - 07344ED42642882B001CD90E /* Result_InitDecodeErrorZ.swift in Sources */, - 07344E182642882B001CD90E /* C2Tuple_u32ScriptZ.swift in Sources */, - 07344DF42642882B001CD90E /* RoutingMessageHandler.swift in Sources */, - 07344EA62642882B001CD90E /* Result_NetAddressu8Z.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/xcode/LDKFramework/ldk_rust_types.h b/xcode/LDKFramework/ldk_rust_types.h index 7dc569b4..3138c9e6 100644 --- a/xcode/LDKFramework/ldk_rust_types.h +++ b/xcode/LDKFramework/ldk_rust_types.h @@ -10,16 +10,6 @@ #else #define NONNULL_PTR #endif -struct nativeChannelHandshakeConfigOpaque; -typedef struct nativeChannelHandshakeConfigOpaque LDKnativeChannelHandshakeConfig; -struct nativeChannelHandshakeLimitsOpaque; -typedef struct nativeChannelHandshakeLimitsOpaque LDKnativeChannelHandshakeLimits; -struct nativeChannelConfigOpaque; -typedef struct nativeChannelConfigOpaque LDKnativeChannelConfig; -struct nativeUserConfigOpaque; -typedef struct nativeUserConfigOpaque LDKnativeUserConfig; -struct nativeOutPointOpaque; -typedef struct nativeOutPointOpaque LDKnativeOutPoint; struct nativeTxCreationKeysOpaque; typedef struct nativeTxCreationKeysOpaque LDKnativeTxCreationKeys; struct nativeChannelPublicKeysOpaque; @@ -40,6 +30,56 @@ struct nativeCommitmentTransactionOpaque; typedef struct nativeCommitmentTransactionOpaque LDKnativeCommitmentTransaction; struct nativeTrustedCommitmentTransactionOpaque; typedef struct nativeTrustedCommitmentTransactionOpaque LDKnativeTrustedCommitmentTransaction; +struct nativeBackgroundProcessorOpaque; +typedef struct nativeBackgroundProcessorOpaque LDKnativeBackgroundProcessor; +struct nativeRouteHopOpaque; +typedef struct nativeRouteHopOpaque LDKnativeRouteHop; +struct nativeRouteOpaque; +typedef struct nativeRouteOpaque LDKnativeRoute; +struct nativeRouteHintHopOpaque; +typedef struct nativeRouteHintHopOpaque LDKnativeRouteHintHop; +struct nativeWatchedOutputOpaque; +typedef struct nativeWatchedOutputOpaque LDKnativeWatchedOutput; +struct nativeInitFeaturesOpaque; +typedef struct nativeInitFeaturesOpaque LDKnativeInitFeatures; +struct nativeNodeFeaturesOpaque; +typedef struct nativeNodeFeaturesOpaque LDKnativeNodeFeatures; +struct nativeChannelFeaturesOpaque; +typedef struct nativeChannelFeaturesOpaque LDKnativeChannelFeatures; +struct nativeInvoiceFeaturesOpaque; +typedef struct nativeInvoiceFeaturesOpaque LDKnativeInvoiceFeatures; +struct nativeDelayedPaymentOutputDescriptorOpaque; +typedef struct nativeDelayedPaymentOutputDescriptorOpaque LDKnativeDelayedPaymentOutputDescriptor; +struct nativeStaticPaymentOutputDescriptorOpaque; +typedef struct nativeStaticPaymentOutputDescriptorOpaque LDKnativeStaticPaymentOutputDescriptor; +struct LDKBaseSign; +typedef struct LDKBaseSign LDKBaseSign; +struct nativeInMemorySignerOpaque; +typedef struct nativeInMemorySignerOpaque LDKnativeInMemorySigner; +struct nativeKeysManagerOpaque; +typedef struct nativeKeysManagerOpaque LDKnativeKeysManager; +struct nativeFilesystemPersisterOpaque; +typedef struct nativeFilesystemPersisterOpaque LDKnativeFilesystemPersister; +struct nativeChannelManagerOpaque; +typedef struct nativeChannelManagerOpaque LDKnativeChannelManager; +struct nativeChainParametersOpaque; +typedef struct nativeChainParametersOpaque LDKnativeChainParameters; +struct nativeBestBlockOpaque; +typedef struct nativeBestBlockOpaque LDKnativeBestBlock; +struct nativeChannelDetailsOpaque; +typedef struct nativeChannelDetailsOpaque LDKnativeChannelDetails; +struct nativeChannelManagerReadArgsOpaque; +typedef struct nativeChannelManagerReadArgsOpaque LDKnativeChannelManagerReadArgs; +struct nativeChannelHandshakeConfigOpaque; +typedef struct nativeChannelHandshakeConfigOpaque LDKnativeChannelHandshakeConfig; +struct nativeChannelHandshakeLimitsOpaque; +typedef struct nativeChannelHandshakeLimitsOpaque LDKnativeChannelHandshakeLimits; +struct nativeChannelConfigOpaque; +typedef struct nativeChannelConfigOpaque LDKnativeChannelConfig; +struct nativeUserConfigOpaque; +typedef struct nativeUserConfigOpaque LDKnativeUserConfig; +struct nativeOutPointOpaque; +typedef struct nativeOutPointOpaque LDKnativeOutPoint; struct nativeInvoiceOpaque; typedef struct nativeInvoiceOpaque LDKnativeInvoice; struct nativeSignedRawInvoiceOpaque; @@ -72,12 +112,6 @@ struct nativeHTLCUpdateOpaque; typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate; struct nativeChannelMonitorOpaque; typedef struct nativeChannelMonitorOpaque LDKnativeChannelMonitor; -struct nativeRouteHopOpaque; -typedef struct nativeRouteHopOpaque LDKnativeRouteHop; -struct nativeRouteOpaque; -typedef struct nativeRouteOpaque LDKnativeRoute; -struct nativeRouteHintHopOpaque; -typedef struct nativeRouteHintHopOpaque LDKnativeRouteHintHop; struct nativeIgnoringMessageHandlerOpaque; typedef struct nativeIgnoringMessageHandlerOpaque LDKnativeIgnoringMessageHandler; struct nativeErroringMessageHandlerOpaque; @@ -89,8 +123,6 @@ struct nativePeerHandleErrorOpaque; typedef struct nativePeerHandleErrorOpaque LDKnativePeerHandleError; struct nativePeerManagerOpaque; typedef struct nativePeerManagerOpaque LDKnativePeerManager; -struct nativeWatchedOutputOpaque; -typedef struct nativeWatchedOutputOpaque LDKnativeWatchedOutput; struct nativeNetworkGraphOpaque; typedef struct nativeNetworkGraphOpaque LDKnativeNetworkGraph; struct nativeLockedNetworkGraphOpaque; @@ -107,14 +139,6 @@ struct nativeNodeAnnouncementInfoOpaque; typedef struct nativeNodeAnnouncementInfoOpaque LDKnativeNodeAnnouncementInfo; struct nativeNodeInfoOpaque; typedef struct nativeNodeInfoOpaque LDKnativeNodeInfo; -struct nativeInitFeaturesOpaque; -typedef struct nativeInitFeaturesOpaque LDKnativeInitFeatures; -struct nativeNodeFeaturesOpaque; -typedef struct nativeNodeFeaturesOpaque LDKnativeNodeFeatures; -struct nativeChannelFeaturesOpaque; -typedef struct nativeChannelFeaturesOpaque LDKnativeChannelFeatures; -struct nativeInvoiceFeaturesOpaque; -typedef struct nativeInvoiceFeaturesOpaque LDKnativeInvoiceFeatures; struct nativeDecodeErrorOpaque; typedef struct nativeDecodeErrorOpaque LDKnativeDecodeError; struct nativeInitOpaque; @@ -185,27 +209,5 @@ struct nativeLightningErrorOpaque; typedef struct nativeLightningErrorOpaque LDKnativeLightningError; struct nativeCommitmentUpdateOpaque; typedef struct nativeCommitmentUpdateOpaque LDKnativeCommitmentUpdate; -struct nativeDelayedPaymentOutputDescriptorOpaque; -typedef struct nativeDelayedPaymentOutputDescriptorOpaque LDKnativeDelayedPaymentOutputDescriptor; -struct nativeStaticPaymentOutputDescriptorOpaque; -typedef struct nativeStaticPaymentOutputDescriptorOpaque LDKnativeStaticPaymentOutputDescriptor; -struct LDKBaseSign; -typedef struct LDKBaseSign LDKBaseSign; -struct nativeInMemorySignerOpaque; -typedef struct nativeInMemorySignerOpaque LDKnativeInMemorySigner; -struct nativeKeysManagerOpaque; -typedef struct nativeKeysManagerOpaque LDKnativeKeysManager; struct nativeChainMonitorOpaque; typedef struct nativeChainMonitorOpaque LDKnativeChainMonitor; -struct nativeFilesystemPersisterOpaque; -typedef struct nativeFilesystemPersisterOpaque LDKnativeFilesystemPersister; -struct nativeChannelManagerOpaque; -typedef struct nativeChannelManagerOpaque LDKnativeChannelManager; -struct nativeChainParametersOpaque; -typedef struct nativeChainParametersOpaque LDKnativeChainParameters; -struct nativeBestBlockOpaque; -typedef struct nativeBestBlockOpaque LDKnativeBestBlock; -struct nativeChannelDetailsOpaque; -typedef struct nativeChannelDetailsOpaque LDKnativeChannelDetails; -struct nativeChannelManagerReadArgsOpaque; -typedef struct nativeChannelManagerReadArgsOpaque LDKnativeChannelManagerReadArgs; diff --git a/xcode/LDKFramework/lightning.h b/xcode/LDKFramework/lightning.h index 57acfd00..e0601d09 100644 --- a/xcode/LDKFramework/lightning.h +++ b/xcode/LDKFramework/lightning.h @@ -1,7 +1,7 @@ #ifndef LDK_C_BINDINGS_H #define LDK_C_BINDINGS_H -/* Generated with cbindgen:0.17.0 */ +/* Generated with cbindgen:0.19.0 */ /* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */ @@ -328,6 +328,14 @@ typedef enum LDKSemanticError { * The invoice contains multiple descriptions and/or description hashes which isn't allowed */ LDKSemanticError_MultipleDescriptions, + /** + * The invoice contains multiple payment secrets + */ + LDKSemanticError_MultiplePaymentSecrets, + /** + * The invoice's features are invalid + */ + LDKSemanticError_InvalidFeatures, /** * The recovery id doesn't fit the signature/pub key */ @@ -450,136 +458,6 @@ typedef struct LDKTxOut { uint64_t value; } LDKTxOut; - - -/** - * Options which apply on a per-channel basis and may change at runtime or based on negotiation - * with our counterparty. - */ -typedef struct MUST_USE_STRUCT LDKChannelConfig { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativeChannelConfig *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKChannelConfig; - - - -/** - * An error in decoding a message or struct. - */ -typedef struct MUST_USE_STRUCT LDKDecodeError { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativeDecodeError *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKDecodeError; - -/** - * The contents of CResult_ChannelConfigDecodeErrorZ - */ -typedef union LDKCResult_ChannelConfigDecodeErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKChannelConfig *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKDecodeError *err; -} LDKCResult_ChannelConfigDecodeErrorZPtr; - -/** - * A CResult_ChannelConfigDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::util::config::ChannelConfig on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_ChannelConfigDecodeErrorZ { - /** - * The contents of this CResult_ChannelConfigDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_ChannelConfigDecodeErrorZPtr contents; - /** - * Whether this CResult_ChannelConfigDecodeErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_ChannelConfigDecodeErrorZ; - - - -/** - * A reference to a transaction output. - * - * Differs from bitcoin::blockdata::transaction::OutPoint as the index is a u16 instead of u32 - * due to LN's restrictions on index values. Should reduce (possibly) unsafe conversions this way. - */ -typedef struct MUST_USE_STRUCT LDKOutPoint { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativeOutPoint *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKOutPoint; - -/** - * The contents of CResult_OutPointDecodeErrorZ - */ -typedef union LDKCResult_OutPointDecodeErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKOutPoint *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKDecodeError *err; -} LDKCResult_OutPointDecodeErrorZPtr; - -/** - * A CResult_OutPointDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::chain::transaction::OutPoint on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_OutPointDecodeErrorZ { - /** - * The contents of this CResult_OutPointDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_OutPointDecodeErrorZPtr contents; - /** - * Whether this CResult_OutPointDecodeErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_OutPointDecodeErrorZ; - /** * Represents a valid secp256k1 secret key serialized as a 32 byte array. */ @@ -696,6 +574,26 @@ typedef struct MUST_USE_STRUCT LDKTxCreationKeys { bool is_owned; } LDKTxCreationKeys; + + +/** + * An error in decoding a message or struct. + */ +typedef struct MUST_USE_STRUCT LDKDecodeError { + /** + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. + */ + LDKnativeDecodeError *inner; + /** + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. + */ + bool is_owned; +} LDKDecodeError; + /** * The contents of CResult_TxCreationKeysDecodeErrorZ */ @@ -1287,405 +1185,422 @@ typedef struct LDKCResult_CVec_SignatureZNoneZ { } LDKCResult_CVec_SignatureZNoneZ; /** - * The contents of CResult_SiPrefixNoneZ + * The contents of CResult_NoneErrorZ */ -typedef union LDKCResult_SiPrefixNoneZPtr { +typedef union LDKCResult_NoneErrorZPtr { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * Note that this value is always NULL, as there are no contents in the OK variant */ - enum LDKSiPrefix *result; + void *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_SiPrefixNoneZPtr; + enum LDKIOError *err; +} LDKCResult_NoneErrorZPtr; /** - * A CResult_SiPrefixNoneZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::SiPrefix on success and a () on failure. + * A CResult_NoneErrorZ represents the result of a fallible operation, + * containing a () on success and a crate::c_types::IOError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_SiPrefixNoneZ { +typedef struct LDKCResult_NoneErrorZ { /** - * The contents of this CResult_SiPrefixNoneZ, accessible via either + * The contents of this CResult_NoneErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_SiPrefixNoneZPtr contents; + union LDKCResult_NoneErrorZPtr contents; /** - * Whether this CResult_SiPrefixNoneZ represents a success state. + * Whether this CResult_NoneErrorZ represents a success state. */ bool result_ok; -} LDKCResult_SiPrefixNoneZ; +} LDKCResult_NoneErrorZ; /** - * Represents a syntactically and semantically correct lightning BOLT11 invoice. - * - * There are three ways to construct an `Invoice`: - * 1. using `InvoiceBuilder` - * 2. using `Invoice::from_signed(SignedRawInvoice)` - * 3. using `str::parse::(&str)` + * A hop in a route */ -typedef struct MUST_USE_STRUCT LDKInvoice { +typedef struct MUST_USE_STRUCT LDKRouteHop { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeInvoice *inner; + LDKnativeRouteHop *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKInvoice; +} LDKRouteHop; /** - * The contents of CResult_InvoiceNoneZ + * The contents of CResult_RouteHopDecodeErrorZ */ -typedef union LDKCResult_InvoiceNoneZPtr { +typedef union LDKCResult_RouteHopDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKInvoice *result; + struct LDKRouteHop *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_InvoiceNoneZPtr; + struct LDKDecodeError *err; +} LDKCResult_RouteHopDecodeErrorZPtr; /** - * A CResult_InvoiceNoneZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::Invoice on success and a () on failure. + * A CResult_RouteHopDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::router::RouteHop on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_InvoiceNoneZ { +typedef struct LDKCResult_RouteHopDecodeErrorZ { /** - * The contents of this CResult_InvoiceNoneZ, accessible via either + * The contents of this CResult_RouteHopDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_InvoiceNoneZPtr contents; + union LDKCResult_RouteHopDecodeErrorZPtr contents; /** - * Whether this CResult_InvoiceNoneZ represents a success state. + * Whether this CResult_RouteHopDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_InvoiceNoneZ; +} LDKCResult_RouteHopDecodeErrorZ; + +/** + * A dynamically-allocated array of crate::lightning::routing::router::RouteHops of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_RouteHopZ { + /** + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + */ + struct LDKRouteHop *data; + /** + * The number of elements pointed to by `data`. + */ + uintptr_t datalen; +} LDKCVec_RouteHopZ; + +/** + * A dynamically-allocated array of crate::c_types::derived::CVec_RouteHopZs of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_CVec_RouteHopZZ { + /** + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + */ + struct LDKCVec_RouteHopZ *data; + /** + * The number of elements pointed to by `data`. + */ + uintptr_t datalen; +} LDKCVec_CVec_RouteHopZZ; /** - * Represents a signed `RawInvoice` with cached hash. The signature is not checked and may be - * invalid. - * - * # Invariants - * The hash has to be either from the deserialized invoice or from the serialized `raw_invoice`. + * A route directs a payment from the sender (us) to the recipient. If the recipient supports MPP, + * it can take multiple paths. Each path is composed of one or more hops through the network. */ -typedef struct MUST_USE_STRUCT LDKSignedRawInvoice { +typedef struct MUST_USE_STRUCT LDKRoute { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeSignedRawInvoice *inner; + LDKnativeRoute *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKSignedRawInvoice; +} LDKRoute; /** - * The contents of CResult_SignedRawInvoiceNoneZ + * The contents of CResult_RouteDecodeErrorZ */ -typedef union LDKCResult_SignedRawInvoiceNoneZPtr { +typedef union LDKCResult_RouteDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKSignedRawInvoice *result; + struct LDKRoute *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_SignedRawInvoiceNoneZPtr; + struct LDKDecodeError *err; +} LDKCResult_RouteDecodeErrorZPtr; /** - * A CResult_SignedRawInvoiceNoneZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::SignedRawInvoice on success and a () on failure. + * A CResult_RouteDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::router::Route on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_SignedRawInvoiceNoneZ { +typedef struct LDKCResult_RouteDecodeErrorZ { /** - * The contents of this CResult_SignedRawInvoiceNoneZ, accessible via either + * The contents of this CResult_RouteDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_SignedRawInvoiceNoneZPtr contents; + union LDKCResult_RouteDecodeErrorZPtr contents; /** - * Whether this CResult_SignedRawInvoiceNoneZ represents a success state. + * Whether this CResult_RouteDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_SignedRawInvoiceNoneZ; +} LDKCResult_RouteDecodeErrorZ; + +/** + * An enum which can either contain a u64 or not + */ +typedef enum LDKCOption_u64Z_Tag { + /** + * When we're in this state, this COption_u64Z contains a u64 + */ + LDKCOption_u64Z_Some, + /** + * When we're in this state, this COption_u64Z contains nothing + */ + LDKCOption_u64Z_None, + /** + * Must be last for serialization purposes + */ + LDKCOption_u64Z_Sentinel, +} LDKCOption_u64Z_Tag; + +typedef struct LDKCOption_u64Z { + LDKCOption_u64Z_Tag tag; + union { + struct { + uint64_t some; + }; + }; +} LDKCOption_u64Z; /** - * Represents an syntactically correct Invoice for a payment on the lightning network, - * but without the signature information. - * De- and encoding should not lead to information loss but may lead to different hashes. - * - * For methods without docs see the corresponding methods in `Invoice`. + * Details of a channel, as returned by ChannelManager::list_channels and ChannelManager::list_usable_channels */ -typedef struct MUST_USE_STRUCT LDKRawInvoice { +typedef struct MUST_USE_STRUCT LDKChannelDetails { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeRawInvoice *inner; + LDKnativeChannelDetails *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKRawInvoice; +} LDKChannelDetails; /** - * Arbitrary 32 bytes, which could represent one of a few different things. You probably want to - * look up the corresponding function in rust-lightning's docs. + * A dynamically-allocated array of crate::lightning::ln::channelmanager::ChannelDetailss of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKThirtyTwoBytes { +typedef struct LDKCVec_ChannelDetailsZ { /** - * The thirty-two bytes + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - uint8_t data[32]; -} LDKThirtyTwoBytes; + struct LDKChannelDetails *data; + /** + * The number of elements pointed to by `data`. + */ + uintptr_t datalen; +} LDKCVec_ChannelDetailsZ; /** - * Recoverable signature + * A channel descriptor which provides a last-hop route to get_route */ -typedef struct MUST_USE_STRUCT LDKInvoiceSignature { +typedef struct MUST_USE_STRUCT LDKRouteHintHop { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeInvoiceSignature *inner; + LDKnativeRouteHintHop *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKInvoiceSignature; +} LDKRouteHintHop; /** - * A tuple of 3 elements. See the individual fields for the types contained. + * A dynamically-allocated array of crate::lightning::routing::router::RouteHintHops of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ { - /** - * The element at position 0 - */ - struct LDKRawInvoice a; +typedef struct LDKCVec_RouteHintHopZ { /** - * The element at position 1 + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKThirtyTwoBytes b; + struct LDKRouteHintHop *data; /** - * The element at position 2 + * The number of elements pointed to by `data`. */ - struct LDKInvoiceSignature c; -} LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ; + uintptr_t datalen; +} LDKCVec_RouteHintHopZ; /** - * Payee public key + * An Err type for failure to process messages. */ -typedef struct MUST_USE_STRUCT LDKPayeePubKey { +typedef struct MUST_USE_STRUCT LDKLightningError { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativePayeePubKey *inner; + LDKnativeLightningError *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKPayeePubKey; +} LDKLightningError; /** - * The contents of CResult_PayeePubKeyErrorZ + * The contents of CResult_RouteLightningErrorZ */ -typedef union LDKCResult_PayeePubKeyErrorZPtr { +typedef union LDKCResult_RouteLightningErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKPayeePubKey *result; + struct LDKRoute *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - enum LDKSecp256k1Error *err; -} LDKCResult_PayeePubKeyErrorZPtr; + struct LDKLightningError *err; +} LDKCResult_RouteLightningErrorZPtr; /** - * A CResult_PayeePubKeyErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::PayeePubKey on success and a crate::c_types::Secp256k1Error on failure. + * A CResult_RouteLightningErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::router::Route on success and a crate::lightning::ln::msgs::LightningError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_PayeePubKeyErrorZ { +typedef struct LDKCResult_RouteLightningErrorZ { /** - * The contents of this CResult_PayeePubKeyErrorZ, accessible via either + * The contents of this CResult_RouteLightningErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_PayeePubKeyErrorZPtr contents; + union LDKCResult_RouteLightningErrorZPtr contents; /** - * Whether this CResult_PayeePubKeyErrorZ represents a success state. + * Whether this CResult_RouteLightningErrorZ represents a success state. */ bool result_ok; -} LDKCResult_PayeePubKeyErrorZ; +} LDKCResult_RouteLightningErrorZ; +/** + * The contents of CResult_TxOutAccessErrorZ + */ +typedef union LDKCResult_TxOutAccessErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKTxOut *result; + /** + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. + */ + enum LDKAccessError *err; +} LDKCResult_TxOutAccessErrorZPtr; +/** + * A CResult_TxOutAccessErrorZ represents the result of a fallible operation, + * containing a crate::c_types::TxOut on success and a crate::lightning::chain::AccessError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_TxOutAccessErrorZ { + /** + * The contents of this CResult_TxOutAccessErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_TxOutAccessErrorZPtr contents; + /** + * Whether this CResult_TxOutAccessErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_TxOutAccessErrorZ; /** - * Private routing information - * - * # Invariants - * The encoded route has to be <1024 5bit characters long (<=639 bytes or <=12 hops) - * + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef struct MUST_USE_STRUCT LDKRouteHint { +typedef struct LDKC2Tuple_usizeTransactionZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The element at position 0 */ - LDKnativeRouteHint *inner; + uintptr_t a; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The element at position 1 */ - bool is_owned; -} LDKRouteHint; + struct LDKTransaction b; +} LDKC2Tuple_usizeTransactionZ; /** - * A dynamically-allocated array of crate::lightning_invoice::RouteHints of arbitrary size. + * A dynamically-allocated array of crate::c_types::derived::C2Tuple_usizeTransactionZs of arbitrary size. * This corresponds to std::vector in C++ */ -typedef struct LDKCVec_RouteHintZ { +typedef struct LDKCVec_C2Tuple_usizeTransactionZZ { /** * The elements in the array. * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKRouteHint *data; + struct LDKC2Tuple_usizeTransactionZ *data; /** * The number of elements pointed to by `data`. */ uintptr_t datalen; -} LDKCVec_RouteHintZ; +} LDKCVec_C2Tuple_usizeTransactionZZ; /** - * An enum which can either contain a u64 or not + * Arbitrary 32 bytes, which could represent one of a few different things. You probably want to + * look up the corresponding function in rust-lightning's docs. */ -typedef enum LDKCOption_u64Z_Tag { +typedef struct LDKThirtyTwoBytes { /** - * When we're in this state, this COption_u64Z contains a u64 + * The thirty-two bytes */ - LDKCOption_u64Z_Some, + uint8_t data[32]; +} LDKThirtyTwoBytes; + +/** + * A dynamically-allocated array of crate::c_types::ThirtyTwoBytess of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_TxidZ { /** - * When we're in this state, this COption_u64Z contains nothing + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKCOption_u64Z_None, + struct LDKThirtyTwoBytes *data; /** - * Must be last for serialization purposes + * The number of elements pointed to by `data`. */ - LDKCOption_u64Z_Sentinel, -} LDKCOption_u64Z_Tag; - -typedef struct LDKCOption_u64Z { - LDKCOption_u64Z_Tag tag; - union { - struct { - uint64_t some; - }; - }; -} LDKCOption_u64Z; - - + uintptr_t datalen; +} LDKCVec_TxidZ; /** - * A timestamp that refers to a date after 1 January 1970 which means its representation as UNIX - * timestamp is positive. - * - * # Invariants - * The UNIX timestamp representing the stored time has to be positive and small enough so that - * a `EpiryTime` can be added to it without an overflow. + * The contents of CResult_NoneChannelMonitorUpdateErrZ */ -typedef struct MUST_USE_STRUCT LDKPositiveTimestamp { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativePositiveTimestamp *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKPositiveTimestamp; - -/** - * The contents of CResult_PositiveTimestampCreationErrorZ - */ -typedef union LDKCResult_PositiveTimestampCreationErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKPositiveTimestamp *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - enum LDKCreationError *err; -} LDKCResult_PositiveTimestampCreationErrorZPtr; - -/** - * A CResult_PositiveTimestampCreationErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::PositiveTimestamp on success and a crate::lightning_invoice::CreationError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_PositiveTimestampCreationErrorZ { - /** - * The contents of this CResult_PositiveTimestampCreationErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_PositiveTimestampCreationErrorZPtr contents; - /** - * Whether this CResult_PositiveTimestampCreationErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_PositiveTimestampCreationErrorZ; - -/** - * The contents of CResult_NoneSemanticErrorZ - */ -typedef union LDKCResult_NoneSemanticErrorZPtr { +typedef union LDKCResult_NoneChannelMonitorUpdateErrZPtr { /** * Note that this value is always NULL, as there are no contents in the OK variant */ @@ -1694,5889 +1609,6126 @@ typedef union LDKCResult_NoneSemanticErrorZPtr { * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - enum LDKSemanticError *err; -} LDKCResult_NoneSemanticErrorZPtr; + enum LDKChannelMonitorUpdateErr *err; +} LDKCResult_NoneChannelMonitorUpdateErrZPtr; /** - * A CResult_NoneSemanticErrorZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning_invoice::SemanticError on failure. + * A CResult_NoneChannelMonitorUpdateErrZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning::chain::channelmonitor::ChannelMonitorUpdateErr on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NoneSemanticErrorZ { +typedef struct LDKCResult_NoneChannelMonitorUpdateErrZ { /** - * The contents of this CResult_NoneSemanticErrorZ, accessible via either + * The contents of this CResult_NoneChannelMonitorUpdateErrZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NoneSemanticErrorZPtr contents; + union LDKCResult_NoneChannelMonitorUpdateErrZPtr contents; /** - * Whether this CResult_NoneSemanticErrorZ represents a success state. + * Whether this CResult_NoneChannelMonitorUpdateErrZ represents a success state. */ bool result_ok; -} LDKCResult_NoneSemanticErrorZ; +} LDKCResult_NoneChannelMonitorUpdateErrZ; + -/** - * The contents of CResult_InvoiceSemanticErrorZ - */ -typedef union LDKCResult_InvoiceSemanticErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKInvoice *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - enum LDKSemanticError *err; -} LDKCResult_InvoiceSemanticErrorZPtr; /** - * A CResult_InvoiceSemanticErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::Invoice on success and a crate::lightning_invoice::SemanticError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * Simple structure sent back by `chain::Watch` when an HTLC from a forward channel is detected on + * chain. Used to update the corresponding HTLC in the backward channel. Failing to pass the + * preimage claim backward will lead to loss of funds. */ -typedef struct LDKCResult_InvoiceSemanticErrorZ { +typedef struct MUST_USE_STRUCT LDKHTLCUpdate { /** - * The contents of this CResult_InvoiceSemanticErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_InvoiceSemanticErrorZPtr contents; + LDKnativeHTLCUpdate *inner; /** - * Whether this CResult_InvoiceSemanticErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_InvoiceSemanticErrorZ; + bool is_owned; +} LDKHTLCUpdate; /** - * Description string + * A reference to a transaction output. * - * # Invariants - * The description can be at most 639 __bytes__ long + * Differs from bitcoin::blockdata::transaction::OutPoint as the index is a u16 instead of u32 + * due to LN's restrictions on index values. Should reduce (possibly) unsafe conversions this way. */ -typedef struct MUST_USE_STRUCT LDKDescription { +typedef struct MUST_USE_STRUCT LDKOutPoint { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeDescription *inner; + LDKnativeOutPoint *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKDescription; +} LDKOutPoint; /** - * The contents of CResult_DescriptionCreationErrorZ + * An event to be processed by the ChannelManager. */ -typedef union LDKCResult_DescriptionCreationErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKDescription *result; +typedef enum LDKMonitorEvent_Tag { /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * A monitor event containing an HTLCUpdate. */ - enum LDKCreationError *err; -} LDKCResult_DescriptionCreationErrorZPtr; - -/** - * A CResult_DescriptionCreationErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::Description on success and a crate::lightning_invoice::CreationError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_DescriptionCreationErrorZ { + LDKMonitorEvent_HTLCEvent, /** - * The contents of this CResult_DescriptionCreationErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A monitor event that the Channel's commitment transaction was broadcasted. */ - union LDKCResult_DescriptionCreationErrorZPtr contents; + LDKMonitorEvent_CommitmentTxBroadcasted, /** - * Whether this CResult_DescriptionCreationErrorZ represents a success state. + * Must be last for serialization purposes */ - bool result_ok; -} LDKCResult_DescriptionCreationErrorZ; - + LDKMonitorEvent_Sentinel, +} LDKMonitorEvent_Tag; +typedef struct MUST_USE_STRUCT LDKMonitorEvent { + LDKMonitorEvent_Tag tag; + union { + struct { + struct LDKHTLCUpdate htlc_event; + }; + struct { + struct LDKOutPoint commitment_tx_broadcasted; + }; + }; +} LDKMonitorEvent; /** - * Positive duration that defines when (relatively to the timestamp) in the future the invoice - * expires - * - * # Invariants - * The number of seconds this expiry time represents has to be in the range - * `0...(SYSTEM_TIME_MAX_UNIX_TIMESTAMP - MAX_EXPIRY_TIME)` to avoid overflows when adding it to a - * timestamp + * A dynamically-allocated array of crate::lightning::chain::channelmonitor::MonitorEvents of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct MUST_USE_STRUCT LDKExpiryTime { +typedef struct LDKCVec_MonitorEventZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKnativeExpiryTime *inner; + struct LDKMonitorEvent *data; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The number of elements pointed to by `data`. */ - bool is_owned; -} LDKExpiryTime; + uintptr_t datalen; +} LDKCVec_MonitorEventZ; /** - * The contents of CResult_ExpiryTimeCreationErrorZ + * An enum which can either contain a crate::c_types::derived::C2Tuple_usizeTransactionZ or not */ -typedef union LDKCResult_ExpiryTimeCreationErrorZPtr { +typedef enum LDKCOption_C2Tuple_usizeTransactionZZ_Tag { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * When we're in this state, this COption_C2Tuple_usizeTransactionZZ contains a crate::c_types::derived::C2Tuple_usizeTransactionZ */ - struct LDKExpiryTime *result; + LDKCOption_C2Tuple_usizeTransactionZZ_Some, /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * When we're in this state, this COption_C2Tuple_usizeTransactionZZ contains nothing */ - enum LDKCreationError *err; -} LDKCResult_ExpiryTimeCreationErrorZPtr; + LDKCOption_C2Tuple_usizeTransactionZZ_None, + /** + * Must be last for serialization purposes + */ + LDKCOption_C2Tuple_usizeTransactionZZ_Sentinel, +} LDKCOption_C2Tuple_usizeTransactionZZ_Tag; + +typedef struct LDKCOption_C2Tuple_usizeTransactionZZ { + LDKCOption_C2Tuple_usizeTransactionZZ_Tag tag; + union { + struct { + struct LDKC2Tuple_usizeTransactionZ some; + }; + }; +} LDKCOption_C2Tuple_usizeTransactionZZ; + + /** - * A CResult_ExpiryTimeCreationErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::ExpiryTime on success and a crate::lightning_invoice::CreationError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * Information about a spendable output to a P2WSH script. See + * SpendableOutputDescriptor::DelayedPaymentOutput for more details on how to spend this. */ -typedef struct LDKCResult_ExpiryTimeCreationErrorZ { +typedef struct MUST_USE_STRUCT LDKDelayedPaymentOutputDescriptor { /** - * The contents of this CResult_ExpiryTimeCreationErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_ExpiryTimeCreationErrorZPtr contents; + LDKnativeDelayedPaymentOutputDescriptor *inner; /** - * Whether this CResult_ExpiryTimeCreationErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_ExpiryTimeCreationErrorZ; + bool is_owned; +} LDKDelayedPaymentOutputDescriptor; /** - * A channel descriptor which provides a last-hop route to get_route + * Information about a spendable output to our \"payment key\". See + * SpendableOutputDescriptor::StaticPaymentOutput for more details on how to spend this. */ -typedef struct MUST_USE_STRUCT LDKRouteHintHop { +typedef struct MUST_USE_STRUCT LDKStaticPaymentOutputDescriptor { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeRouteHintHop *inner; + LDKnativeStaticPaymentOutputDescriptor *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKRouteHintHop; +} LDKStaticPaymentOutputDescriptor; /** - * A dynamically-allocated array of crate::lightning::routing::router::RouteHintHops of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_RouteHintHopZ { - /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). - */ - struct LDKRouteHintHop *data; - /** - * The number of elements pointed to by `data`. - */ - uintptr_t datalen; -} LDKCVec_RouteHintHopZ; - -/** - * The contents of CResult_RouteHintCreationErrorZ + * When on-chain outputs are created by rust-lightning (which our counterparty is not able to + * claim at any point in the future) an event is generated which you must track and be able to + * spend on-chain. The information needed to do this is provided in this enum, including the + * outpoint describing which txid and output index is available, the full output which exists at + * that txid/index, and any keys or other information required to sign. */ -typedef union LDKCResult_RouteHintCreationErrorZPtr { +typedef enum LDKSpendableOutputDescriptor_Tag { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * An output to a script which was provided via KeysInterface directly, either from + * `get_destination_script()` or `get_shutdown_pubkey()`, thus you should already know how to + * spend it. No secret keys are provided as rust-lightning was never given any key. + * These may include outputs from a transaction punishing our counterparty or claiming an HTLC + * on-chain using the payment preimage or after it has timed out. */ - struct LDKRouteHint *result; + LDKSpendableOutputDescriptor_StaticOutput, /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * An output to a P2WSH script which can be spent with a single signature after a CSV delay. + * + * The witness in the spending input should be: + * (MINIMALIF standard rule) + * + * Note that the nSequence field in the spending input must be set to to_self_delay + * (which means the transaction is not broadcastable until at least to_self_delay + * blocks after the outpoint confirms). + * + * These are generally the result of a \"revocable\" output to us, spendable only by us unless + * it is an output from an old state which we broadcast (which should never happen). + * + * To derive the delayed_payment key which is used to sign for this input, you must pass the + * holder delayed_payment_base_key (ie the private key which corresponds to the pubkey in + * Sign::pubkeys().delayed_payment_basepoint) and the provided per_commitment_point to + * chan_utils::derive_private_key. The public key can be generated without the secret key + * using chan_utils::derive_public_key and only the delayed_payment_basepoint which appears in + * Sign::pubkeys(). + * + * To derive the revocation_pubkey provided here (which is used in the witness + * script generation), you must pass the counterparty revocation_basepoint (which appears in the + * call to Sign::ready_channel) and the provided per_commitment point + * to chan_utils::derive_public_revocation_key. + * + * The witness script which is hashed and included in the output script_pubkey may be + * regenerated by passing the revocation_pubkey (derived as above), our delayed_payment pubkey + * (derived as above), and the to_self_delay contained here to + * chan_utils::get_revokeable_redeemscript. */ - enum LDKCreationError *err; -} LDKCResult_RouteHintCreationErrorZPtr; - -/** - * A CResult_RouteHintCreationErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::RouteHint on success and a crate::lightning_invoice::CreationError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_RouteHintCreationErrorZ { + LDKSpendableOutputDescriptor_DelayedPaymentOutput, /** - * The contents of this CResult_RouteHintCreationErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * An output to a P2WPKH, spendable exclusively by our payment key (ie the private key which + * corresponds to the public key in Sign::pubkeys().payment_point). + * The witness in the spending input, is, thus, simply: + * + * + * These are generally the result of our counterparty having broadcast the current state, + * allowing us to claim the non-HTLC-encumbered outputs immediately. */ - union LDKCResult_RouteHintCreationErrorZPtr contents; + LDKSpendableOutputDescriptor_StaticPaymentOutput, /** - * Whether this CResult_RouteHintCreationErrorZ represents a success state. + * Must be last for serialization purposes */ - bool result_ok; -} LDKCResult_RouteHintCreationErrorZ; + LDKSpendableOutputDescriptor_Sentinel, +} LDKSpendableOutputDescriptor_Tag; -/** - * The contents of CResult_StringErrorZ - */ -typedef union LDKCResult_StringErrorZPtr { +typedef struct LDKSpendableOutputDescriptor_LDKStaticOutput_Body { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The outpoint which is spendable */ - struct LDKStr *result; + struct LDKOutPoint outpoint; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The output which is referenced by the given outpoint. */ - enum LDKSecp256k1Error *err; -} LDKCResult_StringErrorZPtr; + struct LDKTxOut output; +} LDKSpendableOutputDescriptor_LDKStaticOutput_Body; + +typedef struct MUST_USE_STRUCT LDKSpendableOutputDescriptor { + LDKSpendableOutputDescriptor_Tag tag; + union { + LDKSpendableOutputDescriptor_LDKStaticOutput_Body static_output; + struct { + struct LDKDelayedPaymentOutputDescriptor delayed_payment_output; + }; + struct { + struct LDKStaticPaymentOutputDescriptor static_payment_output; + }; + }; +} LDKSpendableOutputDescriptor; /** - * A CResult_StringErrorZ represents the result of a fallible operation, - * containing a crate::c_types::Str on success and a crate::c_types::Secp256k1Error on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A dynamically-allocated array of crate::lightning::chain::keysinterface::SpendableOutputDescriptors of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKCResult_StringErrorZ { +typedef struct LDKCVec_SpendableOutputDescriptorZ { /** - * The contents of this CResult_StringErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - union LDKCResult_StringErrorZPtr contents; + struct LDKSpendableOutputDescriptor *data; /** - * Whether this CResult_StringErrorZ represents a success state. + * The number of elements pointed to by `data`. */ - bool result_ok; -} LDKCResult_StringErrorZ; + uintptr_t datalen; +} LDKCVec_SpendableOutputDescriptorZ; /** - * An update generated by the underlying Channel itself which contains some new information the - * ChannelMonitor should be made aware of. + * An accept_channel message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKChannelMonitorUpdate { +typedef struct MUST_USE_STRUCT LDKAcceptChannel { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeChannelMonitorUpdate *inner; + LDKnativeAcceptChannel *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKChannelMonitorUpdate; +} LDKAcceptChannel; + + /** - * The contents of CResult_ChannelMonitorUpdateDecodeErrorZ + * An open_channel message to be sent or received from a peer */ -typedef union LDKCResult_ChannelMonitorUpdateDecodeErrorZPtr { +typedef struct MUST_USE_STRUCT LDKOpenChannel { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKChannelMonitorUpdate *result; + LDKnativeOpenChannel *inner; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKDecodeError *err; -} LDKCResult_ChannelMonitorUpdateDecodeErrorZPtr; + bool is_owned; +} LDKOpenChannel; + + /** - * A CResult_ChannelMonitorUpdateDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::chain::channelmonitor::ChannelMonitorUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A funding_created message to be sent or received from a peer */ -typedef struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ { +typedef struct MUST_USE_STRUCT LDKFundingCreated { /** - * The contents of this CResult_ChannelMonitorUpdateDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_ChannelMonitorUpdateDecodeErrorZPtr contents; + LDKnativeFundingCreated *inner; /** - * Whether this CResult_ChannelMonitorUpdateDecodeErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_ChannelMonitorUpdateDecodeErrorZ; + bool is_owned; +} LDKFundingCreated; /** - * Simple structure sent back by `chain::Watch` when an HTLC from a forward channel is detected on - * chain. Used to update the corresponding HTLC in the backward channel. Failing to pass the - * preimage claim backward will lead to loss of funds. + * A funding_signed message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKHTLCUpdate { +typedef struct MUST_USE_STRUCT LDKFundingSigned { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeHTLCUpdate *inner; + LDKnativeFundingSigned *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKHTLCUpdate; +} LDKFundingSigned; + + /** - * The contents of CResult_HTLCUpdateDecodeErrorZ + * A funding_locked message to be sent or received from a peer */ -typedef union LDKCResult_HTLCUpdateDecodeErrorZPtr { +typedef struct MUST_USE_STRUCT LDKFundingLocked { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKHTLCUpdate *result; + LDKnativeFundingLocked *inner; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKDecodeError *err; -} LDKCResult_HTLCUpdateDecodeErrorZPtr; + bool is_owned; +} LDKFundingLocked; + + /** - * A CResult_HTLCUpdateDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::chain::channelmonitor::HTLCUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * An announcement_signatures message to be sent or received from a peer */ -typedef struct LDKCResult_HTLCUpdateDecodeErrorZ { +typedef struct MUST_USE_STRUCT LDKAnnouncementSignatures { /** - * The contents of this CResult_HTLCUpdateDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_HTLCUpdateDecodeErrorZPtr contents; + LDKnativeAnnouncementSignatures *inner; /** - * Whether this CResult_HTLCUpdateDecodeErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_HTLCUpdateDecodeErrorZ; + bool is_owned; +} LDKAnnouncementSignatures; /** - * General Err type for ChannelMonitor actions. Generally, this implies that the data provided is - * inconsistent with the ChannelMonitor being called. eg for ChannelMonitor::update_monitor this - * means you tried to update a monitor for a different channel or the ChannelMonitorUpdate was - * corrupted. - * Contains a developer-readable error message. + * Struct used to return values from revoke_and_ack messages, containing a bunch of commitment + * transaction updates if they were pending. */ -typedef struct MUST_USE_STRUCT LDKMonitorUpdateError { +typedef struct MUST_USE_STRUCT LDKCommitmentUpdate { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeMonitorUpdateError *inner; + LDKnativeCommitmentUpdate *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKMonitorUpdateError; +} LDKCommitmentUpdate; -/** - * The contents of CResult_NoneMonitorUpdateErrorZ - */ -typedef union LDKCResult_NoneMonitorUpdateErrorZPtr { - /** - * Note that this value is always NULL, as there are no contents in the OK variant - */ - void *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKMonitorUpdateError *err; -} LDKCResult_NoneMonitorUpdateErrorZPtr; -/** - * A CResult_NoneMonitorUpdateErrorZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning::chain::channelmonitor::MonitorUpdateError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_NoneMonitorUpdateErrorZ { - /** - * The contents of this CResult_NoneMonitorUpdateErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_NoneMonitorUpdateErrorZPtr contents; - /** - * Whether this CResult_NoneMonitorUpdateErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_NoneMonitorUpdateErrorZ; /** - * A tuple of 2 elements. See the individual fields for the types contained. + * A revoke_and_ack message to be sent or received from a peer */ -typedef struct LDKC2Tuple_OutPointScriptZ { +typedef struct MUST_USE_STRUCT LDKRevokeAndACK { /** - * The element at position 0 + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKOutPoint a; + LDKnativeRevokeAndACK *inner; /** - * The element at position 1 + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKCVec_u8Z b; -} LDKC2Tuple_OutPointScriptZ; + bool is_owned; +} LDKRevokeAndACK; + -/** - * A tuple of 2 elements. See the individual fields for the types contained. - */ -typedef struct LDKC2Tuple_u32ScriptZ { - /** - * The element at position 0 - */ - uint32_t a; - /** - * The element at position 1 - */ - struct LDKCVec_u8Z b; -} LDKC2Tuple_u32ScriptZ; /** - * A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32ScriptZs of arbitrary size. - * This corresponds to std::vector in C++ + * A closing_signed message to be sent or received from a peer */ -typedef struct LDKCVec_C2Tuple_u32ScriptZZ { +typedef struct MUST_USE_STRUCT LDKClosingSigned { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKC2Tuple_u32ScriptZ *data; + LDKnativeClosingSigned *inner; /** - * The number of elements pointed to by `data`. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uintptr_t datalen; -} LDKCVec_C2Tuple_u32ScriptZZ; + bool is_owned; +} LDKClosingSigned; + + /** - * A tuple of 2 elements. See the individual fields for the types contained. + * A shutdown message to be sent or received from a peer */ -typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ { +typedef struct MUST_USE_STRUCT LDKShutdown { /** - * The element at position 0 + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKThirtyTwoBytes a; + LDKnativeShutdown *inner; /** - * The element at position 1 + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKCVec_C2Tuple_u32ScriptZZ b; -} LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ; + bool is_owned; +} LDKShutdown; + + /** - * A dynamically-allocated array of crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZs of arbitrary size. - * This corresponds to std::vector in C++ + * A channel_reestablish message to be sent or received from a peer */ -typedef struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ { +typedef struct MUST_USE_STRUCT LDKChannelReestablish { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *data; + LDKnativeChannelReestablish *inner; /** - * The number of elements pointed to by `data`. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uintptr_t datalen; -} LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ; + bool is_owned; +} LDKChannelReestablish; + + /** - * An event to be processed by the ChannelManager. + * A channel_announcement message to be sent or received from a peer */ -typedef enum LDKMonitorEvent_Tag { - /** - * A monitor event containing an HTLCUpdate. - */ - LDKMonitorEvent_HTLCEvent, +typedef struct MUST_USE_STRUCT LDKChannelAnnouncement { /** - * A monitor event that the Channel's commitment transaction was broadcasted. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKMonitorEvent_CommitmentTxBroadcasted, + LDKnativeChannelAnnouncement *inner; /** - * Must be last for serialization purposes + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - LDKMonitorEvent_Sentinel, -} LDKMonitorEvent_Tag; + bool is_owned; +} LDKChannelAnnouncement; + -typedef struct MUST_USE_STRUCT LDKMonitorEvent { - LDKMonitorEvent_Tag tag; - union { - struct { - struct LDKHTLCUpdate htlc_event; - }; - struct { - struct LDKOutPoint commitment_tx_broadcasted; - }; - }; -} LDKMonitorEvent; /** - * A dynamically-allocated array of crate::lightning::chain::channelmonitor::MonitorEvents of arbitrary size. - * This corresponds to std::vector in C++ + * A channel_update message to be sent or received from a peer */ -typedef struct LDKCVec_MonitorEventZ { +typedef struct MUST_USE_STRUCT LDKChannelUpdate { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKMonitorEvent *data; + LDKnativeChannelUpdate *inner; /** - * The number of elements pointed to by `data`. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uintptr_t datalen; -} LDKCVec_MonitorEventZ; + bool is_owned; +} LDKChannelUpdate; /** - * Information about a spendable output to a P2WSH script. See - * SpendableOutputDescriptor::DelayedPaymentOutput for more details on how to spend this. + * A node_announcement message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKDelayedPaymentOutputDescriptor { +typedef struct MUST_USE_STRUCT LDKNodeAnnouncement { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeDelayedPaymentOutputDescriptor *inner; + LDKnativeNodeAnnouncement *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKDelayedPaymentOutputDescriptor; +} LDKNodeAnnouncement; /** - * Information about a spendable output to our \"payment key\". See - * SpendableOutputDescriptor::StaticPaymentOutput for more details on how to spend this. + * An error message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKStaticPaymentOutputDescriptor { +typedef struct MUST_USE_STRUCT LDKErrorMessage { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeStaticPaymentOutputDescriptor *inner; + LDKnativeErrorMessage *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKStaticPaymentOutputDescriptor; +} LDKErrorMessage; /** - * When on-chain outputs are created by rust-lightning (which our counterparty is not able to - * claim at any point in the future) an event is generated which you must track and be able to - * spend on-chain. The information needed to do this is provided in this enum, including the - * outpoint describing which txid and output index is available, the full output which exists at - * that txid/index, and any keys or other information required to sign. + * Used to put an error message in a LightningError */ -typedef enum LDKSpendableOutputDescriptor_Tag { +typedef enum LDKErrorAction_Tag { /** - * An output to a script which was provided via KeysInterface directly, either from - * `get_destination_script()` or `get_shutdown_pubkey()`, thus you should already know how to - * spend it. No secret keys are provided as rust-lightning was never given any key. - * These may include outputs from a transaction punishing our counterparty or claiming an HTLC - * on-chain using the payment preimage or after it has timed out. + * The peer took some action which made us think they were useless. Disconnect them. */ - LDKSpendableOutputDescriptor_StaticOutput, + LDKErrorAction_DisconnectPeer, /** - * An output to a P2WSH script which can be spent with a single signature after a CSV delay. - * - * The witness in the spending input should be: - * (MINIMALIF standard rule) - * - * Note that the nSequence field in the spending input must be set to to_self_delay - * (which means the transaction is not broadcastable until at least to_self_delay - * blocks after the outpoint confirms). - * - * These are generally the result of a \"revocable\" output to us, spendable only by us unless - * it is an output from an old state which we broadcast (which should never happen). - * - * To derive the delayed_payment key which is used to sign for this input, you must pass the - * holder delayed_payment_base_key (ie the private key which corresponds to the pubkey in - * Sign::pubkeys().delayed_payment_basepoint) and the provided per_commitment_point to - * chan_utils::derive_private_key. The public key can be generated without the secret key - * using chan_utils::derive_public_key and only the delayed_payment_basepoint which appears in - * Sign::pubkeys(). - * - * To derive the revocation_pubkey provided here (which is used in the witness - * script generation), you must pass the counterparty revocation_basepoint (which appears in the - * call to Sign::ready_channel) and the provided per_commitment point - * to chan_utils::derive_public_revocation_key. - * - * The witness script which is hashed and included in the output script_pubkey may be - * regenerated by passing the revocation_pubkey (derived as above), our delayed_payment pubkey - * (derived as above), and the to_self_delay contained here to - * chan_utils::get_revokeable_redeemscript. + * The peer did something harmless that we weren't able to process, just log and ignore */ - LDKSpendableOutputDescriptor_DelayedPaymentOutput, + LDKErrorAction_IgnoreError, /** - * An output to a P2WPKH, spendable exclusively by our payment key (ie the private key which - * corresponds to the public key in Sign::pubkeys().payment_point). - * The witness in the spending input, is, thus, simply: - * - * - * These are generally the result of our counterparty having broadcast the current state, - * allowing us to claim the non-HTLC-encumbered outputs immediately. + * The peer did something incorrect. Tell them. */ - LDKSpendableOutputDescriptor_StaticPaymentOutput, + LDKErrorAction_SendErrorMessage, /** * Must be last for serialization purposes */ - LDKSpendableOutputDescriptor_Sentinel, -} LDKSpendableOutputDescriptor_Tag; + LDKErrorAction_Sentinel, +} LDKErrorAction_Tag; -typedef struct LDKSpendableOutputDescriptor_LDKStaticOutput_Body { +typedef struct LDKErrorAction_LDKDisconnectPeer_Body { /** - * The outpoint which is spendable + * An error message which we should make an effort to send before we disconnect. */ - struct LDKOutPoint outpoint; + struct LDKErrorMessage msg; +} LDKErrorAction_LDKDisconnectPeer_Body; + +typedef struct LDKErrorAction_LDKSendErrorMessage_Body { /** - * The output which is referenced by the given outpoint. + * The message to send. */ - struct LDKTxOut output; -} LDKSpendableOutputDescriptor_LDKStaticOutput_Body; + struct LDKErrorMessage msg; +} LDKErrorAction_LDKSendErrorMessage_Body; -typedef struct MUST_USE_STRUCT LDKSpendableOutputDescriptor { - LDKSpendableOutputDescriptor_Tag tag; +typedef struct MUST_USE_STRUCT LDKErrorAction { + LDKErrorAction_Tag tag; union { - LDKSpendableOutputDescriptor_LDKStaticOutput_Body static_output; - struct { - struct LDKDelayedPaymentOutputDescriptor delayed_payment_output; - }; - struct { - struct LDKStaticPaymentOutputDescriptor static_payment_output; - }; + LDKErrorAction_LDKDisconnectPeer_Body disconnect_peer; + LDKErrorAction_LDKSendErrorMessage_Body send_error_message; }; -} LDKSpendableOutputDescriptor; +} LDKErrorAction; /** - * A dynamically-allocated array of crate::lightning::chain::keysinterface::SpendableOutputDescriptors of arbitrary size. - * This corresponds to std::vector in C++ + * The information we received from a peer along the route of a payment we originated. This is + * returned by ChannelMessageHandler::handle_update_fail_htlc to be passed into + * RoutingMessageHandler::handle_htlc_fail_channel_update to update our network map. */ -typedef struct LDKCVec_SpendableOutputDescriptorZ { +typedef enum LDKHTLCFailChannelUpdate_Tag { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * We received an error which included a full ChannelUpdate message. */ - struct LDKSpendableOutputDescriptor *data; + LDKHTLCFailChannelUpdate_ChannelUpdateMessage, /** - * The number of elements pointed to by `data`. + * We received an error which indicated only that a channel has been closed */ - uintptr_t datalen; -} LDKCVec_SpendableOutputDescriptorZ; + LDKHTLCFailChannelUpdate_ChannelClosed, + /** + * We received an error which indicated only that a node has failed + */ + LDKHTLCFailChannelUpdate_NodeFailure, + /** + * Must be last for serialization purposes + */ + LDKHTLCFailChannelUpdate_Sentinel, +} LDKHTLCFailChannelUpdate_Tag; -/** - * An Event which you should probably take some action in response to. - * - * Note that while Writeable and Readable are implemented for Event, you probably shouldn't use - * them directly as they don't round-trip exactly (for example FundingGenerationReady is never - * written as it makes no sense to respond to it after reconnecting to peers). - */ -typedef enum LDKEvent_Tag { +typedef struct LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body { /** - * Used to indicate that the client should generate a funding transaction with the given - * parameters and then call ChannelManager::funding_transaction_generated. - * Generated in ChannelManager message handling. - * Note that *all inputs* in the funding transaction must spend SegWit outputs or your - * counterparty can steal your funds! + * The unwrapped message we received */ - LDKEvent_FundingGenerationReady, + struct LDKChannelUpdate msg; +} LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body; + +typedef struct LDKHTLCFailChannelUpdate_LDKChannelClosed_Body { /** - * Indicates we've received money! Just gotta dig out that payment preimage and feed it to - * ChannelManager::claim_funds to get it.... - * Note that if the preimage is not known or the amount paid is incorrect, you should call - * ChannelManager::fail_htlc_backwards to free up resources for this HTLC and avoid - * network congestion. - * The amount paid should be considered 'incorrect' when it is less than or more than twice - * the amount expected. - * If you fail to call either ChannelManager::claim_funds or - * ChannelManager::fail_htlc_backwards within the HTLC's timeout, the HTLC will be - * automatically failed. + * The short_channel_id which has now closed. */ - LDKEvent_PaymentReceived, + uint64_t short_channel_id; /** - * Indicates an outbound payment we made succeeded (ie it made it all the way to its target - * and we got back the payment preimage for it). - * Note that duplicative PaymentSent Events may be generated - it is your responsibility to - * deduplicate them by payment_preimage (which MUST be unique)! + * when this true, this channel should be permanently removed from the + * consideration. Otherwise, this channel can be restored as new channel_update is received */ - LDKEvent_PaymentSent, + bool is_permanent; +} LDKHTLCFailChannelUpdate_LDKChannelClosed_Body; + +typedef struct LDKHTLCFailChannelUpdate_LDKNodeFailure_Body { /** - * Indicates an outbound payment we made failed. Probably some intermediary node dropped - * something. You may wish to retry with a different route. - * Note that duplicative PaymentFailed Events may be generated - it is your responsibility to - * deduplicate them by payment_hash (which MUST be unique)! + * The node_id that has failed. */ - LDKEvent_PaymentFailed, + struct LDKPublicKey node_id; /** - * Used to indicate that ChannelManager::process_pending_htlc_forwards should be called at a - * time in the future. + * when this true, node should be permanently removed from the + * consideration. Otherwise, the channels connected to this node can be + * restored as new channel_update is received */ - LDKEvent_PendingHTLCsForwardable, + bool is_permanent; +} LDKHTLCFailChannelUpdate_LDKNodeFailure_Body; + +typedef struct MUST_USE_STRUCT LDKHTLCFailChannelUpdate { + LDKHTLCFailChannelUpdate_Tag tag; + union { + LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body channel_update_message; + LDKHTLCFailChannelUpdate_LDKChannelClosed_Body channel_closed; + LDKHTLCFailChannelUpdate_LDKNodeFailure_Body node_failure; + }; +} LDKHTLCFailChannelUpdate; + + + +/** + * A query_channel_range message is used to query a peer for channel + * UTXOs in a range of blocks. The recipient of a query makes a best + * effort to reply to the query using one or more reply_channel_range + * messages. + */ +typedef struct MUST_USE_STRUCT LDKQueryChannelRange { /** - * Used to indicate that an output was generated on-chain which you should know how to spend. - * Such an output will *not* ever be spent by rust-lightning, and are not at risk of your - * counterparty spending them due to some kind of timeout. Thus, you need to store them - * somewhere and spend them when you create on-chain transactions. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKEvent_SpendableOutputs, + LDKnativeQueryChannelRange *inner; /** - * Must be last for serialization purposes + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - LDKEvent_Sentinel, -} LDKEvent_Tag; + bool is_owned; +} LDKQueryChannelRange; -typedef struct LDKEvent_LDKFundingGenerationReady_Body { + + +/** + * A query_short_channel_ids message is used to query a peer for + * routing gossip messages related to one or more short_channel_ids. + * The query recipient will reply with the latest, if available, + * channel_announcement, channel_update and node_announcement messages + * it maintains for the requested short_channel_ids followed by a + * reply_short_channel_ids_end message. The short_channel_ids sent in + * this query are encoded. We only support encoding_type=0 uncompressed + * serialization and do not support encoding_type=1 zlib serialization. + */ +typedef struct MUST_USE_STRUCT LDKQueryShortChannelIds { /** - * The random channel_id we picked which you'll need to pass into - * ChannelManager::funding_transaction_generated. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKThirtyTwoBytes temporary_channel_id; + LDKnativeQueryShortChannelIds *inner; /** - * The value, in satoshis, that the output should have. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uint64_t channel_value_satoshis; + bool is_owned; +} LDKQueryShortChannelIds; + + + +/** + * A reply_channel_range message is a reply to a query_channel_range + * message. Multiple reply_channel_range messages can be sent in reply + * to a single query_channel_range message. The query recipient makes a + * best effort to respond based on their local network view which may + * not be a perfect view of the network. The short_channel_ids in the + * reply are encoded. We only support encoding_type=0 uncompressed + * serialization and do not support encoding_type=1 zlib serialization. + */ +typedef struct MUST_USE_STRUCT LDKReplyChannelRange { /** - * The script which should be used in the transaction output. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKCVec_u8Z output_script; + LDKnativeReplyChannelRange *inner; /** - * The value passed in to ChannelManager::create_channel + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uint64_t user_channel_id; -} LDKEvent_LDKFundingGenerationReady_Body; + bool is_owned; +} LDKReplyChannelRange; -typedef struct LDKEvent_LDKPaymentReceived_Body { +/** + * An event generated by ChannelManager which indicates a message should be sent to a peer (or + * broadcast to most peers). + * These events are handled by PeerManager::process_events if you are using a PeerManager. + */ +typedef enum LDKMessageSendEvent_Tag { /** - * The hash for which the preimage should be handed to the ChannelManager. + * Used to indicate that we've accepted a channel open and should send the accept_channel + * message provided to the given peer. */ - struct LDKThirtyTwoBytes payment_hash; + LDKMessageSendEvent_SendAcceptChannel, /** - * The preimage to the payment_hash, if the payment hash (and secret) were fetched via - * [`ChannelManager::create_inbound_payment`]. If provided, this can be handed directly to - * [`ChannelManager::claim_funds`]. - * - * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment - * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds + * Used to indicate that we've initiated a channel open and should send the open_channel + * message provided to the given peer. */ - struct LDKThirtyTwoBytes payment_preimage; + LDKMessageSendEvent_SendOpenChannel, /** - * The \"payment secret\". This authenticates the sender to the recipient, preventing a - * number of deanonymization attacks during the routing process. - * It is provided here for your reference, however its accuracy is enforced directly by - * [`ChannelManager`] using the values you previously provided to - * [`ChannelManager::create_inbound_payment`] or - * [`ChannelManager::create_inbound_payment_for_hash`]. - * - * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager - * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment - * [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash + * Used to indicate that a funding_created message should be sent to the peer with the given node_id. */ - struct LDKThirtyTwoBytes payment_secret; + LDKMessageSendEvent_SendFundingCreated, /** - * The value, in thousandths of a satoshi, that this payment is for. Note that you must - * compare this to the expected value before accepting the payment (as otherwise you are - * providing proof-of-payment for less than the value you expected!). + * Used to indicate that a funding_signed message should be sent to the peer with the given node_id. */ - uint64_t amt; + LDKMessageSendEvent_SendFundingSigned, /** - * This is the `user_payment_id` which was provided to - * [`ChannelManager::create_inbound_payment_for_hash`] or - * [`ChannelManager::create_inbound_payment`]. It has no meaning inside of LDK and is - * simply copied here. It may be used to correlate PaymentReceived events with invoice - * metadata stored elsewhere. + * Used to indicate that a funding_locked message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_SendFundingLocked, + /** + * Used to indicate that an announcement_signatures message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_SendAnnouncementSignatures, + /** + * Used to indicate that a series of HTLC update messages, as well as a commitment_signed + * message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_UpdateHTLCs, + /** + * Used to indicate that a revoke_and_ack message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_SendRevokeAndACK, + /** + * Used to indicate that a closing_signed message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_SendClosingSigned, + /** + * Used to indicate that a shutdown message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_SendShutdown, + /** + * Used to indicate that a channel_reestablish message should be sent to the peer with the given node_id. + */ + LDKMessageSendEvent_SendChannelReestablish, + /** + * Used to indicate that a channel_announcement and channel_update should be broadcast to all + * peers (except the peer with node_id either msg.contents.node_id_1 or msg.contents.node_id_2). * - * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment - * [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash + * Note that after doing so, you very likely (unless you did so very recently) want to call + * ChannelManager::broadcast_node_announcement to trigger a BroadcastNodeAnnouncement event. + * This ensures that any nodes which see our channel_announcement also have a relevant + * node_announcement, including relevant feature flags which may be important for routing + * through or to us. + */ + LDKMessageSendEvent_BroadcastChannelAnnouncement, + /** + * Used to indicate that a node_announcement should be broadcast to all peers. + */ + LDKMessageSendEvent_BroadcastNodeAnnouncement, + /** + * Used to indicate that a channel_update should be broadcast to all peers. + */ + LDKMessageSendEvent_BroadcastChannelUpdate, + /** + * Broadcast an error downstream to be handled + */ + LDKMessageSendEvent_HandleError, + /** + * When a payment fails we may receive updates back from the hop where it failed. In such + * cases this event is generated so that we can inform the network graph of this information. + */ + LDKMessageSendEvent_PaymentFailureNetworkUpdate, + /** + * Query a peer for channels with funding transaction UTXOs in a block range. + */ + LDKMessageSendEvent_SendChannelRangeQuery, + /** + * Request routing gossip messages from a peer for a list of channels identified by + * their short_channel_ids. + */ + LDKMessageSendEvent_SendShortIdsQuery, + /** + * Sends a reply to a channel range query. This may be one of several SendReplyChannelRange events + * emitted during processing of the query. + */ + LDKMessageSendEvent_SendReplyChannelRange, + /** + * Must be last for serialization purposes + */ + LDKMessageSendEvent_Sentinel, +} LDKMessageSendEvent_Tag; + +typedef struct LDKMessageSendEvent_LDKSendAcceptChannel_Body { + /** + * The node_id of the node which should receive this message + */ + struct LDKPublicKey node_id; + /** + * The message which should be sent. + */ + struct LDKAcceptChannel msg; +} LDKMessageSendEvent_LDKSendAcceptChannel_Body; + +typedef struct LDKMessageSendEvent_LDKSendOpenChannel_Body { + /** + * The node_id of the node which should receive this message + */ + struct LDKPublicKey node_id; + /** + * The message which should be sent. + */ + struct LDKOpenChannel msg; +} LDKMessageSendEvent_LDKSendOpenChannel_Body; + +typedef struct LDKMessageSendEvent_LDKSendFundingCreated_Body { + /** + * The node_id of the node which should receive this message */ - uint64_t user_payment_id; -} LDKEvent_LDKPaymentReceived_Body; - -typedef struct LDKEvent_LDKPaymentSent_Body { + struct LDKPublicKey node_id; /** - * The preimage to the hash given to ChannelManager::send_payment. - * Note that this serves as a payment receipt, if you wish to have such a thing, you must - * store it somehow! + * The message which should be sent. */ - struct LDKThirtyTwoBytes payment_preimage; -} LDKEvent_LDKPaymentSent_Body; + struct LDKFundingCreated msg; +} LDKMessageSendEvent_LDKSendFundingCreated_Body; -typedef struct LDKEvent_LDKPaymentFailed_Body { +typedef struct LDKMessageSendEvent_LDKSendFundingSigned_Body { /** - * The hash which was given to ChannelManager::send_payment. + * The node_id of the node which should receive this message */ - struct LDKThirtyTwoBytes payment_hash; + struct LDKPublicKey node_id; /** - * Indicates the payment was rejected for some reason by the recipient. This implies that - * the payment has failed, not just the route in question. If this is not set, you may - * retry the payment via a different route. + * The message which should be sent. */ - bool rejected_by_dest; -} LDKEvent_LDKPaymentFailed_Body; + struct LDKFundingSigned msg; +} LDKMessageSendEvent_LDKSendFundingSigned_Body; -typedef struct LDKEvent_LDKPendingHTLCsForwardable_Body { +typedef struct LDKMessageSendEvent_LDKSendFundingLocked_Body { /** - * The minimum amount of time that should be waited prior to calling - * process_pending_htlc_forwards. To increase the effort required to correlate payments, - * you should wait a random amount of time in roughly the range (now + time_forwardable, - * now + 5*time_forwardable). + * The node_id of the node which should receive these message(s) */ - uint64_t time_forwardable; -} LDKEvent_LDKPendingHTLCsForwardable_Body; - -typedef struct LDKEvent_LDKSpendableOutputs_Body { + struct LDKPublicKey node_id; /** - * The outputs which you should store as spendable by you. + * The funding_locked message which should be sent. */ - struct LDKCVec_SpendableOutputDescriptorZ outputs; -} LDKEvent_LDKSpendableOutputs_Body; - -typedef struct MUST_USE_STRUCT LDKEvent { - LDKEvent_Tag tag; - union { - LDKEvent_LDKFundingGenerationReady_Body funding_generation_ready; - LDKEvent_LDKPaymentReceived_Body payment_received; - LDKEvent_LDKPaymentSent_Body payment_sent; - LDKEvent_LDKPaymentFailed_Body payment_failed; - LDKEvent_LDKPendingHTLCsForwardable_Body pending_htl_cs_forwardable; - LDKEvent_LDKSpendableOutputs_Body spendable_outputs; - }; -} LDKEvent; + struct LDKFundingLocked msg; +} LDKMessageSendEvent_LDKSendFundingLocked_Body; -/** - * A dynamically-allocated array of crate::lightning::util::events::Events of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_EventZ { +typedef struct LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The node_id of the node which should receive these message(s) */ - struct LDKEvent *data; + struct LDKPublicKey node_id; /** - * The number of elements pointed to by `data`. + * The announcement_signatures message which should be sent. */ - uintptr_t datalen; -} LDKCVec_EventZ; + struct LDKAnnouncementSignatures msg; +} LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body; -/** - * A dynamically-allocated array of crate::c_types::Transactions of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_TransactionZ { +typedef struct LDKMessageSendEvent_LDKUpdateHTLCs_Body { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The node_id of the node which should receive these message(s) */ - struct LDKTransaction *data; + struct LDKPublicKey node_id; /** - * The number of elements pointed to by `data`. + * The update messages which should be sent. ALL messages in the struct should be sent! */ - uintptr_t datalen; -} LDKCVec_TransactionZ; + struct LDKCommitmentUpdate updates; +} LDKMessageSendEvent_LDKUpdateHTLCs_Body; -/** - * A tuple of 2 elements. See the individual fields for the types contained. - */ -typedef struct LDKC2Tuple_usizeTransactionZ { +typedef struct LDKMessageSendEvent_LDKSendRevokeAndACK_Body { /** - * The element at position 0 + * The node_id of the node which should receive this message */ - uintptr_t a; + struct LDKPublicKey node_id; /** - * The element at position 1 + * The message which should be sent. */ - struct LDKTransaction b; -} LDKC2Tuple_usizeTransactionZ; + struct LDKRevokeAndACK msg; +} LDKMessageSendEvent_LDKSendRevokeAndACK_Body; -/** - * A dynamically-allocated array of crate::c_types::derived::C2Tuple_usizeTransactionZs of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_C2Tuple_usizeTransactionZZ { +typedef struct LDKMessageSendEvent_LDKSendClosingSigned_Body { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The node_id of the node which should receive this message */ - struct LDKC2Tuple_usizeTransactionZ *data; + struct LDKPublicKey node_id; /** - * The number of elements pointed to by `data`. + * The message which should be sent. */ - uintptr_t datalen; -} LDKCVec_C2Tuple_usizeTransactionZZ; + struct LDKClosingSigned msg; +} LDKMessageSendEvent_LDKSendClosingSigned_Body; -/** - * A tuple of 2 elements. See the individual fields for the types contained. - */ -typedef struct LDKC2Tuple_u32TxOutZ { +typedef struct LDKMessageSendEvent_LDKSendShutdown_Body { /** - * The element at position 0 + * The node_id of the node which should receive this message */ - uint32_t a; + struct LDKPublicKey node_id; /** - * The element at position 1 + * The message which should be sent. */ - struct LDKTxOut b; -} LDKC2Tuple_u32TxOutZ; + struct LDKShutdown msg; +} LDKMessageSendEvent_LDKSendShutdown_Body; -/** - * A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32TxOutZs of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_C2Tuple_u32TxOutZZ { +typedef struct LDKMessageSendEvent_LDKSendChannelReestablish_Body { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The node_id of the node which should receive this message */ - struct LDKC2Tuple_u32TxOutZ *data; + struct LDKPublicKey node_id; /** - * The number of elements pointed to by `data`. + * The message which should be sent. */ - uintptr_t datalen; -} LDKCVec_C2Tuple_u32TxOutZZ; + struct LDKChannelReestablish msg; +} LDKMessageSendEvent_LDKSendChannelReestablish_Body; -/** - * A tuple of 2 elements. See the individual fields for the types contained. - */ -typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ { +typedef struct LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body { /** - * The element at position 0 + * The channel_announcement which should be sent. */ - struct LDKThirtyTwoBytes a; + struct LDKChannelAnnouncement msg; /** - * The element at position 1 + * The followup channel_update which should be sent. */ - struct LDKCVec_C2Tuple_u32TxOutZZ b; -} LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ; + struct LDKChannelUpdate update_msg; +} LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body; -/** - * A dynamically-allocated array of crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZs of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_TransactionOutputsZ { +typedef struct LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The node_announcement which should be sent. */ - struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *data; + struct LDKNodeAnnouncement msg; +} LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body; + +typedef struct LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body { /** - * The number of elements pointed to by `data`. + * The channel_update which should be sent. */ - uintptr_t datalen; -} LDKCVec_TransactionOutputsZ; + struct LDKChannelUpdate msg; +} LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body; -/** - * A dynamically-allocated array of crate::c_types::ThirtyTwoBytess of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_TxidZ { +typedef struct LDKMessageSendEvent_LDKHandleError_Body { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The node_id of the node which should receive this message */ - struct LDKThirtyTwoBytes *data; + struct LDKPublicKey node_id; /** - * The number of elements pointed to by `data`. + * The action which should be taken. */ - uintptr_t datalen; -} LDKCVec_TxidZ; + struct LDKErrorAction action; +} LDKMessageSendEvent_LDKHandleError_Body; -/** - * The contents of CResult_NoneChannelMonitorUpdateErrZ - */ -typedef union LDKCResult_NoneChannelMonitorUpdateErrZPtr { +typedef struct LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body { /** - * Note that this value is always NULL, as there are no contents in the OK variant + * The channel/node update which should be sent to NetGraphMsgHandler */ - void *result; + struct LDKHTLCFailChannelUpdate update; +} LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body; + +typedef struct LDKMessageSendEvent_LDKSendChannelRangeQuery_Body { /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The node_id of this message recipient */ - enum LDKChannelMonitorUpdateErr *err; -} LDKCResult_NoneChannelMonitorUpdateErrZPtr; + struct LDKPublicKey node_id; + /** + * The query_channel_range which should be sent. + */ + struct LDKQueryChannelRange msg; +} LDKMessageSendEvent_LDKSendChannelRangeQuery_Body; -/** - * A CResult_NoneChannelMonitorUpdateErrZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning::chain::channelmonitor::ChannelMonitorUpdateErr on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_NoneChannelMonitorUpdateErrZ { +typedef struct LDKMessageSendEvent_LDKSendShortIdsQuery_Body { /** - * The contents of this CResult_NoneChannelMonitorUpdateErrZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The node_id of this message recipient */ - union LDKCResult_NoneChannelMonitorUpdateErrZPtr contents; + struct LDKPublicKey node_id; /** - * Whether this CResult_NoneChannelMonitorUpdateErrZ represents a success state. + * The query_short_channel_ids which should be sent. */ - bool result_ok; -} LDKCResult_NoneChannelMonitorUpdateErrZ; + struct LDKQueryShortChannelIds msg; +} LDKMessageSendEvent_LDKSendShortIdsQuery_Body; -/** - * A tuple of 2 elements. See the individual fields for the types contained. - */ -typedef struct LDKC2Tuple_SignatureCVec_SignatureZZ { +typedef struct LDKMessageSendEvent_LDKSendReplyChannelRange_Body { /** - * The element at position 0 + * The node_id of this message recipient */ - struct LDKSignature a; + struct LDKPublicKey node_id; /** - * The element at position 1 + * The reply_channel_range which should be sent. */ - struct LDKCVec_SignatureZ b; -} LDKC2Tuple_SignatureCVec_SignatureZZ; + struct LDKReplyChannelRange msg; +} LDKMessageSendEvent_LDKSendReplyChannelRange_Body; + +typedef struct MUST_USE_STRUCT LDKMessageSendEvent { + LDKMessageSendEvent_Tag tag; + union { + LDKMessageSendEvent_LDKSendAcceptChannel_Body send_accept_channel; + LDKMessageSendEvent_LDKSendOpenChannel_Body send_open_channel; + LDKMessageSendEvent_LDKSendFundingCreated_Body send_funding_created; + LDKMessageSendEvent_LDKSendFundingSigned_Body send_funding_signed; + LDKMessageSendEvent_LDKSendFundingLocked_Body send_funding_locked; + LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body send_announcement_signatures; + LDKMessageSendEvent_LDKUpdateHTLCs_Body update_htl_cs; + LDKMessageSendEvent_LDKSendRevokeAndACK_Body send_revoke_and_ack; + LDKMessageSendEvent_LDKSendClosingSigned_Body send_closing_signed; + LDKMessageSendEvent_LDKSendShutdown_Body send_shutdown; + LDKMessageSendEvent_LDKSendChannelReestablish_Body send_channel_reestablish; + LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body broadcast_channel_announcement; + LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body broadcast_node_announcement; + LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body broadcast_channel_update; + LDKMessageSendEvent_LDKHandleError_Body handle_error; + LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body payment_failure_network_update; + LDKMessageSendEvent_LDKSendChannelRangeQuery_Body send_channel_range_query; + LDKMessageSendEvent_LDKSendShortIdsQuery_Body send_short_ids_query; + LDKMessageSendEvent_LDKSendReplyChannelRange_Body send_reply_channel_range; + }; +} LDKMessageSendEvent; /** - * The contents of CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ + * A dynamically-allocated array of crate::lightning::util::events::MessageSendEvents of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef union LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr { +typedef struct LDKCVec_MessageSendEventZ { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKC2Tuple_SignatureCVec_SignatureZZ *result; + struct LDKMessageSendEvent *data; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * The number of elements pointed to by `data`. */ - void *err; -} LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr; + uintptr_t datalen; +} LDKCVec_MessageSendEventZ; + + /** - * A CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ represents the result of a fallible operation, - * containing a crate::c_types::derived::C2Tuple_SignatureCVec_SignatureZZ on success and a () on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * Features used within an `init` message. */ -typedef struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ { +typedef struct MUST_USE_STRUCT LDKInitFeatures { /** - * The contents of this CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr contents; + LDKnativeInitFeatures *inner; /** - * Whether this CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ; + bool is_owned; +} LDKInitFeatures; /** - * The contents of CResult_SignatureNoneZ + * The contents of CResult_InitFeaturesDecodeErrorZ */ -typedef union LDKCResult_SignatureNoneZPtr { +typedef union LDKCResult_InitFeaturesDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKSignature *result; + struct LDKInitFeatures *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_SignatureNoneZPtr; + struct LDKDecodeError *err; +} LDKCResult_InitFeaturesDecodeErrorZPtr; /** - * A CResult_SignatureNoneZ represents the result of a fallible operation, - * containing a crate::c_types::Signature on success and a () on failure. + * A CResult_InitFeaturesDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::features::InitFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_SignatureNoneZ { +typedef struct LDKCResult_InitFeaturesDecodeErrorZ { /** - * The contents of this CResult_SignatureNoneZ, accessible via either + * The contents of this CResult_InitFeaturesDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_SignatureNoneZPtr contents; + union LDKCResult_InitFeaturesDecodeErrorZPtr contents; /** - * Whether this CResult_SignatureNoneZ represents a success state. + * Whether this CResult_InitFeaturesDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_SignatureNoneZ; +} LDKCResult_InitFeaturesDecodeErrorZ; /** - * The unsigned part of a channel_announcement + * Features used within a `node_announcement` message. */ -typedef struct MUST_USE_STRUCT LDKUnsignedChannelAnnouncement { +typedef struct MUST_USE_STRUCT LDKNodeFeatures { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeUnsignedChannelAnnouncement *inner; + LDKnativeNodeFeatures *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKUnsignedChannelAnnouncement; +} LDKNodeFeatures; /** - * A trait to sign lightning channel transactions as described in BOLT 3. - * - * Signing services could be implemented on a hardware wallet. In this case, - * the current Sign would be a front-end on top of a communication - * channel connected to your secure device and lightning key material wouldn't - * reside on a hot server. Nevertheless, a this deployment would still need - * to trust the ChannelManager to avoid loss of funds as this latest component - * could ask to sign commitment transaction with HTLCs paying to attacker pubkeys. - * - * A more secure iteration would be to use hashlock (or payment points) to pair - * invoice/incoming HTLCs with outgoing HTLCs to implement a no-trust-ChannelManager - * at the price of more state and computation on the hardware wallet side. In the future, - * we are looking forward to design such interface. - * - * In any case, ChannelMonitor or fallback watchtowers are always going to be trusted - * to act, as liveness and breach reply correctness are always going to be hard requirements - * of LN security model, orthogonal of key management issues. + * The contents of CResult_NodeFeaturesDecodeErrorZ */ -typedef struct LDKBaseSign { - /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. - */ - void *this_arg; - /** - * Gets the per-commitment point for a specific commitment number - * - * Note that the commitment number starts at (1 << 48) - 1 and counts backwards. - */ - struct LDKPublicKey (*get_per_commitment_point)(const void *this_arg, uint64_t idx); - /** - * Gets the commitment secret for a specific commitment number as part of the revocation process - * - * An external signer implementation should error here if the commitment was already signed - * and should refuse to sign it in the future. - * - * May be called more than once for the same index. - * - * Note that the commitment number starts at (1 << 48) - 1 and counts backwards. - */ - struct LDKThirtyTwoBytes (*release_commitment_secret)(const void *this_arg, uint64_t idx); - /** - * Gets the holder's channel public keys and basepoints - */ - struct LDKChannelPublicKeys pubkeys; - /** - * Fill in the pubkeys field as a reference to it will be given to Rust after this returns - * Note that this takes a pointer to this object, not the this_ptr like other methods do - * This function pointer may be NULL if pubkeys is filled in when this object is created and never needs updating. - */ - void (*set_pubkeys)(const struct LDKBaseSign*NONNULL_PTR ); - /** - * Gets an arbitrary identifier describing the set of keys which are provided back to you in - * some SpendableOutputDescriptor types. This should be sufficient to identify this - * Sign object uniquely and lookup or re-derive its keys. - */ - struct LDKThirtyTwoBytes (*channel_keys_id)(const void *this_arg); - /** - * Create a signature for a counterparty's commitment transaction and associated HTLC transactions. - * - * Note that if signing fails or is rejected, the channel will be force-closed. - */ - struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ (*sign_counterparty_commitment)(const void *this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx); - /** - * Create a signatures for a holder's commitment transaction and its claiming HTLC transactions. - * This will only ever be called with a non-revoked commitment_tx. This will be called with the - * latest commitment_tx when we initiate a force-close. - * This will be called with the previous latest, just to get claiming HTLC signatures, if we are - * reacting to a ChannelMonitor replica that decided to broadcast before it had been updated to - * the latest. - * This may be called multiple times for the same transaction. - * - * An external signer implementation should check that the commitment has not been revoked. - * - * May return Err if key derivation fails. Callers, such as ChannelMonitor, will panic in such a case. - */ - struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ (*sign_holder_commitment_and_htlcs)(const void *this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx); - /** - * Create a signature for the given input in a transaction spending an HTLC or commitment - * transaction output when our counterparty broadcasts an old state. - * - * A justice transaction may claim multiples outputs at the same time if timelocks are - * similar, but only a signature for the input at index `input` should be signed for here. - * It may be called multiples time for same output(s) if a fee-bump is needed with regards - * to an upcoming timelock expiration. - * - * Amount is value of the output spent by this input, committed to in the BIP 143 signature. - * - * per_commitment_key is revocation secret which was provided by our counterparty when they - * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does - * not allow the spending of any funds by itself (you need our holder revocation_secret to do - * so). - * - * htlc holds HTLC elements (hash, timelock) if the output being spent is a HTLC output, thus - * changing the format of the witness script (which is committed to in the BIP 143 - * signatures). - */ - struct LDKCResult_SignatureNoneZ (*sign_justice_transaction)(const void *this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc); - /** - * Create a signature for a claiming transaction for a HTLC output on a counterparty's commitment - * transaction, either offered or received. - * - * Such a transaction may claim multiples offered outputs at same time if we know the - * preimage for each when we create it, but only the input at index `input` should be - * signed for here. It may be called multiple times for same output(s) if a fee-bump is - * needed with regards to an upcoming timelock expiration. - * - * Witness_script is either a offered or received script as defined in BOLT3 for HTLC - * outputs. - * - * Amount is value of the output spent by this input, committed to in the BIP 143 signature. - * - * Per_commitment_point is the dynamic point corresponding to the channel state - * detected onchain. It has been generated by our counterparty and is used to derive - * channel state keys, which are then included in the witness script and committed to in the - * BIP 143 signature. - */ - struct LDKCResult_SignatureNoneZ (*sign_counterparty_htlc_transaction)(const void *this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc); +typedef union LDKCResult_NodeFeaturesDecodeErrorZPtr { /** - * Create a signature for a (proposed) closing transaction. - * - * Note that, due to rounding, there may be one \"missing\" satoshi, and either party may have - * chosen to forgo their output as dust. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKCResult_SignatureNoneZ (*sign_closing_transaction)(const void *this_arg, struct LDKTransaction closing_tx); + struct LDKNodeFeatures *result; /** - * Signs a channel announcement message with our funding key, proving it comes from one - * of the channel participants. - * - * Note that if this fails or is rejected, the channel will not be publicly announced and - * our counterparty may (though likely will not) close the channel on us for violating the - * protocol. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKCResult_SignatureNoneZ (*sign_channel_announcement)(const void *this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg); + struct LDKDecodeError *err; +} LDKCResult_NodeFeaturesDecodeErrorZPtr; + +/** + * A CResult_NodeFeaturesDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::features::NodeFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_NodeFeaturesDecodeErrorZ { /** - * Set the counterparty static channel data, including basepoints, - * counterparty_selected/holder_selected_contest_delay and funding outpoint. - * This is done as soon as the funding outpoint is known. Since these are static channel data, - * they MUST NOT be allowed to change to different values once set. - * - * channel_parameters.is_populated() MUST be true. - * - * We bind holder_selected_contest_delay late here for API convenience. - * - * Will be called before any signatures are applied. + * The contents of this CResult_NodeFeaturesDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - void (*ready_channel)(void *this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters); + union LDKCResult_NodeFeaturesDecodeErrorZPtr contents; /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * Whether this CResult_NodeFeaturesDecodeErrorZ represents a success state. */ - void (*free)(void *this_arg); -} LDKBaseSign; + bool result_ok; +} LDKCResult_NodeFeaturesDecodeErrorZ; + + /** - * A cloneable signer. - * - * Although we require signers to be cloneable, it may be useful for developers to be able to use - * signers in an un-sized way, for example as `dyn BaseSign`. Therefore we separate the Clone trait, - * which implies Sized, into this derived trait. + * Features used within a `channel_announcement` message. */ -typedef struct LDKSign { +typedef struct MUST_USE_STRUCT LDKChannelFeatures { /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - void *this_arg; + LDKnativeChannelFeatures *inner; /** - * Implementation of BaseSign for this object. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKBaseSign BaseSign; + bool is_owned; +} LDKChannelFeatures; + +/** + * The contents of CResult_ChannelFeaturesDecodeErrorZ + */ +typedef union LDKCResult_ChannelFeaturesDecodeErrorZPtr { /** - * Creates a copy of the BaseSign, for a copy of this Sign. - * Because BaseSign doesn't natively support copying itself, you have to provide a full copy implementation here. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKBaseSign (*BaseSign_clone)(const struct LDKBaseSign *NONNULL_PTR orig_BaseSign); + struct LDKChannelFeatures *result; /** - * Serialize the object into a byte array + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKCVec_u8Z (*write)(const void *this_arg); + struct LDKDecodeError *err; +} LDKCResult_ChannelFeaturesDecodeErrorZPtr; + +/** + * A CResult_ChannelFeaturesDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::features::ChannelFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_ChannelFeaturesDecodeErrorZ { /** - * Creates a copy of the object pointed to by this_arg, for a copy of this Sign. - * Note that the ultimate copy of the Sign will have all function pointers the same as the original. - * May be NULL if no action needs to be taken, the this_arg pointer will be copied into the new Sign. + * The contents of this CResult_ChannelFeaturesDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - void *(*clone)(const void *this_arg); + union LDKCResult_ChannelFeaturesDecodeErrorZPtr contents; /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * Whether this CResult_ChannelFeaturesDecodeErrorZ represents a success state. */ - void (*free)(void *this_arg); -} LDKSign; + bool result_ok; +} LDKCResult_ChannelFeaturesDecodeErrorZ; /** - * A ChannelMonitor handles chain events (blocks connected and disconnected) and generates - * on-chain transactions to ensure no loss of funds occurs. - * - * You MUST ensure that no ChannelMonitors for a given channel anywhere contain out-of-date - * information and are actively monitoring the chain. - * - * Pending Events or updated HTLCs which have not yet been read out by - * get_and_clear_pending_monitor_events or get_and_clear_pending_events are serialized to disk and - * reloaded at deserialize-time. Thus, you must ensure that, when handling events, all events - * gotten are fully handled before re-serializing the new state. - * - * Note that the deserializer is only implemented for (BlockHash, ChannelMonitor), which - * tells you the last block hash which was block_connect()ed. You MUST rescan any blocks along - * the \"reorg path\" (ie disconnecting blocks until you find a common ancestor from both the - * returned block hash and the the current chain and then reconnecting blocks to get to the - * best chain) upon deserializing the object! + * Features used within an invoice. */ -typedef struct MUST_USE_STRUCT LDKChannelMonitor { +typedef struct MUST_USE_STRUCT LDKInvoiceFeatures { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeChannelMonitor *inner; + LDKnativeInvoiceFeatures *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKChannelMonitor; +} LDKInvoiceFeatures; /** - * A tuple of 2 elements. See the individual fields for the types contained. + * The contents of CResult_InvoiceFeaturesDecodeErrorZ */ -typedef struct LDKC2Tuple_BlockHashChannelMonitorZ { +typedef union LDKCResult_InvoiceFeaturesDecodeErrorZPtr { /** - * The element at position 0 + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKThirtyTwoBytes a; + struct LDKInvoiceFeatures *result; /** - * The element at position 1 + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKChannelMonitor b; -} LDKC2Tuple_BlockHashChannelMonitorZ; + struct LDKDecodeError *err; +} LDKCResult_InvoiceFeaturesDecodeErrorZPtr; /** - * The contents of CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ + * A CResult_InvoiceFeaturesDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::features::InvoiceFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef union LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr { +typedef struct LDKCResult_InvoiceFeaturesDecodeErrorZ { + /** + * The contents of this CResult_InvoiceFeaturesDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_InvoiceFeaturesDecodeErrorZPtr contents; + /** + * Whether this CResult_InvoiceFeaturesDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_InvoiceFeaturesDecodeErrorZ; + +/** + * The contents of CResult_DelayedPaymentOutputDescriptorDecodeErrorZ + */ +typedef union LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKC2Tuple_BlockHashChannelMonitorZ *result; + struct LDKDelayedPaymentOutputDescriptor *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr; +} LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZPtr; /** - * A CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ represents the result of a fallible operation, - * containing a crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZ on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_DelayedPaymentOutputDescriptorDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::keysinterface::DelayedPaymentOutputDescriptor on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ { +typedef struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ { /** - * The contents of this CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ, accessible via either + * The contents of this CResult_DelayedPaymentOutputDescriptorDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr contents; + union LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZPtr contents; /** - * Whether this CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ represents a success state. + * Whether this CResult_DelayedPaymentOutputDescriptorDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ; - +} LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ; +/** + * The contents of CResult_StaticPaymentOutputDescriptorDecodeErrorZ + */ +typedef union LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKStaticPaymentOutputDescriptor *result; + /** + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. + */ + struct LDKDecodeError *err; +} LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZPtr; /** - * A hop in a route + * A CResult_StaticPaymentOutputDescriptorDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::keysinterface::StaticPaymentOutputDescriptor on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKRouteHop { +typedef struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_StaticPaymentOutputDescriptorDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeRouteHop *inner; + union LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_StaticPaymentOutputDescriptorDecodeErrorZ represents a success state. */ - bool is_owned; -} LDKRouteHop; + bool result_ok; +} LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ; /** - * A dynamically-allocated array of crate::lightning::routing::router::RouteHops of arbitrary size. - * This corresponds to std::vector in C++ + * The contents of CResult_SpendableOutputDescriptorDecodeErrorZ */ -typedef struct LDKCVec_RouteHopZ { +typedef union LDKCResult_SpendableOutputDescriptorDecodeErrorZPtr { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKRouteHop *data; + struct LDKSpendableOutputDescriptor *result; /** - * The number of elements pointed to by `data`. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uintptr_t datalen; -} LDKCVec_RouteHopZ; + struct LDKDecodeError *err; +} LDKCResult_SpendableOutputDescriptorDecodeErrorZPtr; /** - * A dynamically-allocated array of crate::c_types::derived::CVec_RouteHopZs of arbitrary size. - * This corresponds to std::vector in C++ + * A CResult_SpendableOutputDescriptorDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::keysinterface::SpendableOutputDescriptor on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCVec_CVec_RouteHopZZ { +typedef struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The contents of this CResult_SpendableOutputDescriptorDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - struct LDKCVec_RouteHopZ *data; + union LDKCResult_SpendableOutputDescriptorDecodeErrorZPtr contents; /** - * The number of elements pointed to by `data`. + * Whether this CResult_SpendableOutputDescriptorDecodeErrorZ represents a success state. */ - uintptr_t datalen; -} LDKCVec_CVec_RouteHopZZ; + bool result_ok; +} LDKCResult_SpendableOutputDescriptorDecodeErrorZ; +/** + * A tuple of 2 elements. See the individual fields for the types contained. + */ +typedef struct LDKC2Tuple_SignatureCVec_SignatureZZ { + /** + * The element at position 0 + */ + struct LDKSignature a; + /** + * The element at position 1 + */ + struct LDKCVec_SignatureZ b; +} LDKC2Tuple_SignatureCVec_SignatureZZ; +/** + * The contents of CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ + */ +typedef union LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKC2Tuple_SignatureCVec_SignatureZZ *result; + /** + * Note that this value is always NULL, as there are no contents in the Err variant + */ + void *err; +} LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr; /** - * A route directs a payment from the sender (us) to the recipient. If the recipient supports MPP, - * it can take multiple paths. Each path is composed of one or more hops through the network. + * A CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ represents the result of a fallible operation, + * containing a crate::c_types::derived::C2Tuple_SignatureCVec_SignatureZZ on success and a () on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKRoute { +typedef struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeRoute *inner; + union LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ represents a success state. */ - bool is_owned; -} LDKRoute; + bool result_ok; +} LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ; /** - * The contents of CResult_RouteDecodeErrorZ + * The contents of CResult_SignatureNoneZ */ -typedef union LDKCResult_RouteDecodeErrorZPtr { +typedef union LDKCResult_SignatureNoneZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKRoute *result; + struct LDKSignature *result; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Note that this value is always NULL, as there are no contents in the Err variant */ - struct LDKDecodeError *err; -} LDKCResult_RouteDecodeErrorZPtr; + void *err; +} LDKCResult_SignatureNoneZPtr; /** - * A CResult_RouteDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::router::Route on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_SignatureNoneZ represents the result of a fallible operation, + * containing a crate::c_types::Signature on success and a () on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_RouteDecodeErrorZ { +typedef struct LDKCResult_SignatureNoneZ { /** - * The contents of this CResult_RouteDecodeErrorZ, accessible via either + * The contents of this CResult_SignatureNoneZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_RouteDecodeErrorZPtr contents; + union LDKCResult_SignatureNoneZPtr contents; /** - * Whether this CResult_RouteDecodeErrorZ represents a success state. + * Whether this CResult_SignatureNoneZ represents a success state. */ bool result_ok; -} LDKCResult_RouteDecodeErrorZ; +} LDKCResult_SignatureNoneZ; /** - * Details of a channel, as returned by ChannelManager::list_channels and ChannelManager::list_usable_channels + * The unsigned part of a channel_announcement */ -typedef struct MUST_USE_STRUCT LDKChannelDetails { +typedef struct MUST_USE_STRUCT LDKUnsignedChannelAnnouncement { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeChannelDetails *inner; + LDKnativeUnsignedChannelAnnouncement *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKChannelDetails; +} LDKUnsignedChannelAnnouncement; /** - * A dynamically-allocated array of crate::lightning::ln::channelmanager::ChannelDetailss of arbitrary size. - * This corresponds to std::vector in C++ + * A trait to sign lightning channel transactions as described in BOLT 3. + * + * Signing services could be implemented on a hardware wallet. In this case, + * the current Sign would be a front-end on top of a communication + * channel connected to your secure device and lightning key material wouldn't + * reside on a hot server. Nevertheless, a this deployment would still need + * to trust the ChannelManager to avoid loss of funds as this latest component + * could ask to sign commitment transaction with HTLCs paying to attacker pubkeys. + * + * A more secure iteration would be to use hashlock (or payment points) to pair + * invoice/incoming HTLCs with outgoing HTLCs to implement a no-trust-ChannelManager + * at the price of more state and computation on the hardware wallet side. In the future, + * we are looking forward to design such interface. + * + * In any case, ChannelMonitor or fallback watchtowers are always going to be trusted + * to act, as liveness and breach reply correctness are always going to be hard requirements + * of LN security model, orthogonal of key management issues. */ -typedef struct LDKCVec_ChannelDetailsZ { +typedef struct LDKBaseSign { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - struct LDKChannelDetails *data; + void *this_arg; /** - * The number of elements pointed to by `data`. + * Gets the per-commitment point for a specific commitment number + * + * Note that the commitment number starts at (1 << 48) - 1 and counts backwards. */ - uintptr_t datalen; -} LDKCVec_ChannelDetailsZ; - - - -/** - * An Err type for failure to process messages. - */ -typedef struct MUST_USE_STRUCT LDKLightningError { + struct LDKPublicKey (*get_per_commitment_point)(const void *this_arg, uint64_t idx); /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * Gets the commitment secret for a specific commitment number as part of the revocation process + * + * An external signer implementation should error here if the commitment was already signed + * and should refuse to sign it in the future. + * + * May be called more than once for the same index. + * + * Note that the commitment number starts at (1 << 48) - 1 and counts backwards. */ - LDKnativeLightningError *inner; + struct LDKThirtyTwoBytes (*release_commitment_secret)(const void *this_arg, uint64_t idx); /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Gets the holder's channel public keys and basepoints */ - bool is_owned; -} LDKLightningError; - -/** - * The contents of CResult_RouteLightningErrorZ - */ -typedef union LDKCResult_RouteLightningErrorZPtr { + struct LDKChannelPublicKeys pubkeys; /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * Fill in the pubkeys field as a reference to it will be given to Rust after this returns + * Note that this takes a pointer to this object, not the this_ptr like other methods do + * This function pointer may be NULL if pubkeys is filled in when this object is created and never needs updating. */ - struct LDKRoute *result; + void (*set_pubkeys)(const struct LDKBaseSign*NONNULL_PTR ); /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Gets an arbitrary identifier describing the set of keys which are provided back to you in + * some SpendableOutputDescriptor types. This should be sufficient to identify this + * Sign object uniquely and lookup or re-derive its keys. */ - struct LDKLightningError *err; -} LDKCResult_RouteLightningErrorZPtr; + struct LDKThirtyTwoBytes (*channel_keys_id)(const void *this_arg); + /** + * Create a signature for a counterparty's commitment transaction and associated HTLC transactions. + * + * Note that if signing fails or is rejected, the channel will be force-closed. + */ + struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ (*sign_counterparty_commitment)(const void *this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx); + /** + * Create a signatures for a holder's commitment transaction and its claiming HTLC transactions. + * This will only ever be called with a non-revoked commitment_tx. This will be called with the + * latest commitment_tx when we initiate a force-close. + * This will be called with the previous latest, just to get claiming HTLC signatures, if we are + * reacting to a ChannelMonitor replica that decided to broadcast before it had been updated to + * the latest. + * This may be called multiple times for the same transaction. + * + * An external signer implementation should check that the commitment has not been revoked. + * + * May return Err if key derivation fails. Callers, such as ChannelMonitor, will panic in such a case. + */ + struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ (*sign_holder_commitment_and_htlcs)(const void *this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx); + /** + * Create a signature for the given input in a transaction spending an HTLC transaction output + * or a commitment transaction `to_local` output when our counterparty broadcasts an old state. + * + * A justice transaction may claim multiple outputs at the same time if timelocks are + * similar, but only a signature for the input at index `input` should be signed for here. + * It may be called multiple times for same output(s) if a fee-bump is needed with regards + * to an upcoming timelock expiration. + * + * Amount is value of the output spent by this input, committed to in the BIP 143 signature. + * + * per_commitment_key is revocation secret which was provided by our counterparty when they + * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does + * not allow the spending of any funds by itself (you need our holder revocation_secret to do + * so). + */ + struct LDKCResult_SignatureNoneZ (*sign_justice_revoked_output)(const void *this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32]); + /** + * Create a signature for the given input in a transaction spending a commitment transaction + * HTLC output when our counterparty broadcasts an old state. + * + * A justice transaction may claim multiple outputs at the same time if timelocks are + * similar, but only a signature for the input at index `input` should be signed for here. + * It may be called multiple times for same output(s) if a fee-bump is needed with regards + * to an upcoming timelock expiration. + * + * Amount is value of the output spent by this input, committed to in the BIP 143 signature. + * + * per_commitment_key is revocation secret which was provided by our counterparty when they + * revoked the state which they eventually broadcast. It's not a _holder_ secret key and does + * not allow the spending of any funds by itself (you need our holder revocation_secret to do + * so). + * + * htlc holds HTLC elements (hash, timelock), thus changing the format of the witness script + * (which is committed to in the BIP 143 signatures). + */ + struct LDKCResult_SignatureNoneZ (*sign_justice_revoked_htlc)(const void *this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc); + /** + * Create a signature for a claiming transaction for a HTLC output on a counterparty's commitment + * transaction, either offered or received. + * + * Such a transaction may claim multiples offered outputs at same time if we know the + * preimage for each when we create it, but only the input at index `input` should be + * signed for here. It may be called multiple times for same output(s) if a fee-bump is + * needed with regards to an upcoming timelock expiration. + * + * Witness_script is either a offered or received script as defined in BOLT3 for HTLC + * outputs. + * + * Amount is value of the output spent by this input, committed to in the BIP 143 signature. + * + * Per_commitment_point is the dynamic point corresponding to the channel state + * detected onchain. It has been generated by our counterparty and is used to derive + * channel state keys, which are then included in the witness script and committed to in the + * BIP 143 signature. + */ + struct LDKCResult_SignatureNoneZ (*sign_counterparty_htlc_transaction)(const void *this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc); + /** + * Create a signature for a (proposed) closing transaction. + * + * Note that, due to rounding, there may be one \"missing\" satoshi, and either party may have + * chosen to forgo their output as dust. + */ + struct LDKCResult_SignatureNoneZ (*sign_closing_transaction)(const void *this_arg, struct LDKTransaction closing_tx); + /** + * Signs a channel announcement message with our funding key, proving it comes from one + * of the channel participants. + * + * Note that if this fails or is rejected, the channel will not be publicly announced and + * our counterparty may (though likely will not) close the channel on us for violating the + * protocol. + */ + struct LDKCResult_SignatureNoneZ (*sign_channel_announcement)(const void *this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg); + /** + * Set the counterparty static channel data, including basepoints, + * counterparty_selected/holder_selected_contest_delay and funding outpoint. + * This is done as soon as the funding outpoint is known. Since these are static channel data, + * they MUST NOT be allowed to change to different values once set. + * + * channel_parameters.is_populated() MUST be true. + * + * We bind holder_selected_contest_delay late here for API convenience. + * + * Will be called before any signatures are applied. + */ + void (*ready_channel)(void *this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters); + /** + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + */ + void (*free)(void *this_arg); +} LDKBaseSign; /** - * A CResult_RouteLightningErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::router::Route on success and a crate::lightning::ln::msgs::LightningError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A cloneable signer. + * + * Although we require signers to be cloneable, it may be useful for developers to be able to use + * signers in an un-sized way, for example as `dyn BaseSign`. Therefore we separate the Clone trait, + * which implies Sized, into this derived trait. */ -typedef struct LDKCResult_RouteLightningErrorZ { +typedef struct LDKSign { /** - * The contents of this CResult_RouteLightningErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - union LDKCResult_RouteLightningErrorZPtr contents; + void *this_arg; /** - * Whether this CResult_RouteLightningErrorZ represents a success state. + * Implementation of BaseSign for this object. */ - bool result_ok; -} LDKCResult_RouteLightningErrorZ; - - + struct LDKBaseSign BaseSign; + /** + * Creates a copy of the BaseSign, for a copy of this Sign. + * Because BaseSign doesn't natively support copying itself, you have to provide a full copy implementation here. + */ + struct LDKBaseSign (*BaseSign_clone)(const struct LDKBaseSign *NONNULL_PTR orig_BaseSign); + /** + * Serialize the object into a byte array + */ + struct LDKCVec_u8Z (*write)(const void *this_arg); + /** + * Creates a copy of the object pointed to by this_arg, for a copy of this Sign. + * Note that the ultimate copy of the Sign will have all function pointers the same as the original. + * May be NULL if no action needs to be taken, the this_arg pointer will be copied into the new Sign. + */ + void *(*clone)(const void *this_arg); + /** + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + */ + void (*free)(void *this_arg); +} LDKSign; /** - * An accept_channel message to be sent or received from a peer + * The contents of CResult_SignDecodeErrorZ */ -typedef struct MUST_USE_STRUCT LDKAcceptChannel { +typedef union LDKCResult_SignDecodeErrorZPtr { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKnativeAcceptChannel *inner; + struct LDKSign *result; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - bool is_owned; -} LDKAcceptChannel; - - + struct LDKDecodeError *err; +} LDKCResult_SignDecodeErrorZPtr; /** - * An open_channel message to be sent or received from a peer + * A CResult_SignDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::keysinterface::Sign on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKOpenChannel { +typedef struct LDKCResult_SignDecodeErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_SignDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeOpenChannel *inner; + union LDKCResult_SignDecodeErrorZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_SignDecodeErrorZ represents a success state. */ - bool is_owned; -} LDKOpenChannel; - + bool result_ok; +} LDKCResult_SignDecodeErrorZ; +/** + * Represents a secp256k1 signature serialized as two 32-byte numbers as well as a tag which + * allows recovering the exact public key which created the signature given the message. + */ +typedef struct LDKRecoverableSignature { + /** + * The bytes of the signature in "compact" form plus a "Recovery ID" which allows for + * recovery. + */ + uint8_t serialized_form[68]; +} LDKRecoverableSignature; /** - * A funding_created message to be sent or received from a peer + * The contents of CResult_RecoverableSignatureNoneZ */ -typedef struct MUST_USE_STRUCT LDKFundingCreated { +typedef union LDKCResult_RecoverableSignatureNoneZPtr { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKnativeFundingCreated *inner; + struct LDKRecoverableSignature *result; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Note that this value is always NULL, as there are no contents in the Err variant */ - bool is_owned; -} LDKFundingCreated; - - + void *err; +} LDKCResult_RecoverableSignatureNoneZPtr; /** - * A funding_signed message to be sent or received from a peer + * A CResult_RecoverableSignatureNoneZ represents the result of a fallible operation, + * containing a crate::c_types::RecoverableSignature on success and a () on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKFundingSigned { +typedef struct LDKCResult_RecoverableSignatureNoneZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_RecoverableSignatureNoneZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeFundingSigned *inner; + union LDKCResult_RecoverableSignatureNoneZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_RecoverableSignatureNoneZ represents a success state. */ - bool is_owned; -} LDKFundingSigned; - - + bool result_ok; +} LDKCResult_RecoverableSignatureNoneZ; /** - * A funding_locked message to be sent or received from a peer + * A dynamically-allocated array of crate::c_types::derived::CVec_u8Zs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct MUST_USE_STRUCT LDKFundingLocked { +typedef struct LDKCVec_CVec_u8ZZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKnativeFundingLocked *inner; + struct LDKCVec_u8Z *data; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The number of elements pointed to by `data`. */ - bool is_owned; -} LDKFundingLocked; - - + uintptr_t datalen; +} LDKCVec_CVec_u8ZZ; /** - * An announcement_signatures message to be sent or received from a peer + * The contents of CResult_CVec_CVec_u8ZZNoneZ */ -typedef struct MUST_USE_STRUCT LDKAnnouncementSignatures { +typedef union LDKCResult_CVec_CVec_u8ZZNoneZPtr { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKnativeAnnouncementSignatures *inner; + struct LDKCVec_CVec_u8ZZ *result; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Note that this value is always NULL, as there are no contents in the Err variant */ - bool is_owned; -} LDKAnnouncementSignatures; - - + void *err; +} LDKCResult_CVec_CVec_u8ZZNoneZPtr; /** - * Struct used to return values from revoke_and_ack messages, containing a bunch of commitment - * transaction updates if they were pending. + * A CResult_CVec_CVec_u8ZZNoneZ represents the result of a fallible operation, + * containing a crate::c_types::derived::CVec_CVec_u8ZZ on success and a () on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKCommitmentUpdate { +typedef struct LDKCResult_CVec_CVec_u8ZZNoneZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_CVec_CVec_u8ZZNoneZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeCommitmentUpdate *inner; + union LDKCResult_CVec_CVec_u8ZZNoneZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_CVec_CVec_u8ZZNoneZ represents a success state. */ - bool is_owned; -} LDKCommitmentUpdate; + bool result_ok; +} LDKCResult_CVec_CVec_u8ZZNoneZ; /** - * A revoke_and_ack message to be sent or received from a peer + * A simple implementation of Sign that just keeps the private keys in memory. + * + * This implementation performs no policy checks and is insufficient by itself as + * a secure external signer. */ -typedef struct MUST_USE_STRUCT LDKRevokeAndACK { +typedef struct MUST_USE_STRUCT LDKInMemorySigner { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeRevokeAndACK *inner; + LDKnativeInMemorySigner *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKRevokeAndACK; - - +} LDKInMemorySigner; /** - * A closing_signed message to be sent or received from a peer + * The contents of CResult_InMemorySignerDecodeErrorZ */ -typedef struct MUST_USE_STRUCT LDKClosingSigned { +typedef union LDKCResult_InMemorySignerDecodeErrorZPtr { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKnativeClosingSigned *inner; + struct LDKInMemorySigner *result; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - bool is_owned; -} LDKClosingSigned; - - + struct LDKDecodeError *err; +} LDKCResult_InMemorySignerDecodeErrorZPtr; /** - * A shutdown message to be sent or received from a peer + * A CResult_InMemorySignerDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::keysinterface::InMemorySigner on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKShutdown { +typedef struct LDKCResult_InMemorySignerDecodeErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_InMemorySignerDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeShutdown *inner; + union LDKCResult_InMemorySignerDecodeErrorZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_InMemorySignerDecodeErrorZ represents a success state. */ - bool is_owned; -} LDKShutdown; - - + bool result_ok; +} LDKCResult_InMemorySignerDecodeErrorZ; /** - * A channel_reestablish message to be sent or received from a peer + * A dynamically-allocated array of crate::c_types::TxOuts of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct MUST_USE_STRUCT LDKChannelReestablish { +typedef struct LDKCVec_TxOutZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKnativeChannelReestablish *inner; + struct LDKTxOut *data; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The number of elements pointed to by `data`. */ - bool is_owned; -} LDKChannelReestablish; - - + uintptr_t datalen; +} LDKCVec_TxOutZ; /** - * A channel_announcement message to be sent or received from a peer + * The contents of CResult_TransactionNoneZ */ -typedef struct MUST_USE_STRUCT LDKChannelAnnouncement { +typedef union LDKCResult_TransactionNoneZPtr { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKnativeChannelAnnouncement *inner; + struct LDKTransaction *result; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Note that this value is always NULL, as there are no contents in the Err variant */ - bool is_owned; -} LDKChannelAnnouncement; - - + void *err; +} LDKCResult_TransactionNoneZPtr; /** - * A channel_update message to be sent or received from a peer + * A CResult_TransactionNoneZ represents the result of a fallible operation, + * containing a crate::c_types::Transaction on success and a () on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKChannelUpdate { +typedef struct LDKCResult_TransactionNoneZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_TransactionNoneZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeChannelUpdate *inner; + union LDKCResult_TransactionNoneZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_TransactionNoneZ represents a success state. */ - bool is_owned; -} LDKChannelUpdate; + bool result_ok; +} LDKCResult_TransactionNoneZ; /** - * A node_announcement message to be sent or received from a peer + * A ChannelMonitor handles chain events (blocks connected and disconnected) and generates + * on-chain transactions to ensure no loss of funds occurs. + * + * You MUST ensure that no ChannelMonitors for a given channel anywhere contain out-of-date + * information and are actively monitoring the chain. + * + * Pending Events or updated HTLCs which have not yet been read out by + * get_and_clear_pending_monitor_events or get_and_clear_pending_events are serialized to disk and + * reloaded at deserialize-time. Thus, you must ensure that, when handling events, all events + * gotten are fully handled before re-serializing the new state. + * + * Note that the deserializer is only implemented for (BlockHash, ChannelMonitor), which + * tells you the last block hash which was block_connect()ed. You MUST rescan any blocks along + * the \"reorg path\" (ie disconnecting blocks until you find a common ancestor from both the + * returned block hash and the the current chain and then reconnecting blocks to get to the + * best chain) upon deserializing the object! */ -typedef struct MUST_USE_STRUCT LDKNodeAnnouncement { +typedef struct MUST_USE_STRUCT LDKChannelMonitor { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeNodeAnnouncement *inner; + LDKnativeChannelMonitor *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKNodeAnnouncement; - - +} LDKChannelMonitor; /** - * An error message to be sent or received from a peer + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef struct MUST_USE_STRUCT LDKErrorMessage { +typedef struct LDKC2Tuple_BlockHashChannelMonitorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The element at position 0 */ - LDKnativeErrorMessage *inner; + struct LDKThirtyTwoBytes a; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The element at position 1 */ - bool is_owned; -} LDKErrorMessage; + struct LDKChannelMonitor b; +} LDKC2Tuple_BlockHashChannelMonitorZ; /** - * Used to put an error message in a LightningError + * A dynamically-allocated array of crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef enum LDKErrorAction_Tag { +typedef struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ { /** - * The peer took some action which made us think they were useless. Disconnect them. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKErrorAction_DisconnectPeer, + struct LDKC2Tuple_BlockHashChannelMonitorZ *data; /** - * The peer did something harmless that we weren't able to process, just log and ignore + * The number of elements pointed to by `data`. */ - LDKErrorAction_IgnoreError, + uintptr_t datalen; +} LDKCVec_C2Tuple_BlockHashChannelMonitorZZ; + +/** + * The contents of CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ + */ +typedef union LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr { /** - * The peer did something incorrect. Tell them. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKErrorAction_SendErrorMessage, + struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *result; /** - * Must be last for serialization purposes + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - LDKErrorAction_Sentinel, -} LDKErrorAction_Tag; + enum LDKIOError *err; +} LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr; -typedef struct LDKErrorAction_LDKDisconnectPeer_Body { +/** + * A CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ represents the result of a fallible operation, + * containing a crate::c_types::derived::CVec_C2Tuple_BlockHashChannelMonitorZZ on success and a crate::c_types::IOError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ { /** - * An error message which we should make an effort to send before we disconnect. + * The contents of this CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - struct LDKErrorMessage msg; -} LDKErrorAction_LDKDisconnectPeer_Body; - -typedef struct LDKErrorAction_LDKSendErrorMessage_Body { + union LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr contents; /** - * The message to send. + * Whether this CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ represents a success state. */ - struct LDKErrorMessage msg; -} LDKErrorAction_LDKSendErrorMessage_Body; - -typedef struct MUST_USE_STRUCT LDKErrorAction { - LDKErrorAction_Tag tag; - union { - LDKErrorAction_LDKDisconnectPeer_Body disconnect_peer; - LDKErrorAction_LDKSendErrorMessage_Body send_error_message; - }; -} LDKErrorAction; + bool result_ok; +} LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ; /** - * The information we received from a peer along the route of a payment we originated. This is - * returned by ChannelMessageHandler::handle_update_fail_htlc to be passed into - * RoutingMessageHandler::handle_htlc_fail_channel_update to update our network map. + * Indicates an error on the client's part (usually some variant of attempting to use too-low or + * too-high values) */ -typedef enum LDKHTLCFailChannelUpdate_Tag { +typedef enum LDKAPIError_Tag { /** - * We received an error which included a full ChannelUpdate message. + * Indicates the API was wholly misused (see err for more). Cases where these can be returned + * are documented, but generally indicates some precondition of a function was violated. */ - LDKHTLCFailChannelUpdate_ChannelUpdateMessage, + LDKAPIError_APIMisuseError, /** - * We received an error which indicated only that a channel has been closed + * Due to a high feerate, we were unable to complete the request. + * For example, this may be returned if the feerate implies we cannot open a channel at the + * requested value, but opening a larger channel would succeed. */ - LDKHTLCFailChannelUpdate_ChannelClosed, + LDKAPIError_FeeRateTooHigh, /** - * We received an error which indicated only that a node has failed + * A malformed Route was provided (eg overflowed value, node id mismatch, overly-looped route, + * too-many-hops, etc). */ - LDKHTLCFailChannelUpdate_NodeFailure, + LDKAPIError_RouteError, + /** + * We were unable to complete the request as the Channel required to do so is unable to + * complete the request (or was not found). This can take many forms, including disconnected + * peer, channel at capacity, channel shutting down, etc. + */ + LDKAPIError_ChannelUnavailable, + /** + * An attempt to call watch/update_channel returned an Err (ie you did this!), causing the + * attempted action to fail. + */ + LDKAPIError_MonitorUpdateFailed, /** * Must be last for serialization purposes */ - LDKHTLCFailChannelUpdate_Sentinel, -} LDKHTLCFailChannelUpdate_Tag; + LDKAPIError_Sentinel, +} LDKAPIError_Tag; -typedef struct LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body { +typedef struct LDKAPIError_LDKAPIMisuseError_Body { /** - * The unwrapped message we received + * A human-readable error message */ - struct LDKChannelUpdate msg; -} LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body; + struct LDKStr err; +} LDKAPIError_LDKAPIMisuseError_Body; -typedef struct LDKHTLCFailChannelUpdate_LDKChannelClosed_Body { +typedef struct LDKAPIError_LDKFeeRateTooHigh_Body { /** - * The short_channel_id which has now closed. + * A human-readable error message */ - uint64_t short_channel_id; + struct LDKStr err; /** - * when this true, this channel should be permanently removed from the - * consideration. Otherwise, this channel can be restored as new channel_update is received + * The feerate which was too high. */ - bool is_permanent; -} LDKHTLCFailChannelUpdate_LDKChannelClosed_Body; + uint32_t feerate; +} LDKAPIError_LDKFeeRateTooHigh_Body; -typedef struct LDKHTLCFailChannelUpdate_LDKNodeFailure_Body { +typedef struct LDKAPIError_LDKRouteError_Body { /** - * The node_id that has failed. + * A human-readable error message */ - struct LDKPublicKey node_id; + struct LDKStr err; +} LDKAPIError_LDKRouteError_Body; + +typedef struct LDKAPIError_LDKChannelUnavailable_Body { /** - * when this true, node should be permanently removed from the - * consideration. Otherwise, the channels connected to this node can be - * restored as new channel_update is received + * A human-readable error message */ - bool is_permanent; -} LDKHTLCFailChannelUpdate_LDKNodeFailure_Body; + struct LDKStr err; +} LDKAPIError_LDKChannelUnavailable_Body; -typedef struct MUST_USE_STRUCT LDKHTLCFailChannelUpdate { - LDKHTLCFailChannelUpdate_Tag tag; +typedef struct MUST_USE_STRUCT LDKAPIError { + LDKAPIError_Tag tag; union { - LDKHTLCFailChannelUpdate_LDKChannelUpdateMessage_Body channel_update_message; - LDKHTLCFailChannelUpdate_LDKChannelClosed_Body channel_closed; - LDKHTLCFailChannelUpdate_LDKNodeFailure_Body node_failure; + LDKAPIError_LDKAPIMisuseError_Body api_misuse_error; + LDKAPIError_LDKFeeRateTooHigh_Body fee_rate_too_high; + LDKAPIError_LDKRouteError_Body route_error; + LDKAPIError_LDKChannelUnavailable_Body channel_unavailable; }; -} LDKHTLCFailChannelUpdate; - - +} LDKAPIError; /** - * A query_channel_range message is used to query a peer for channel - * UTXOs in a range of blocks. The recipient of a query makes a best - * effort to reply to the query using one or more reply_channel_range - * messages. + * The contents of CResult_NoneAPIErrorZ */ -typedef struct MUST_USE_STRUCT LDKQueryChannelRange { +typedef union LDKCResult_NoneAPIErrorZPtr { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * Note that this value is always NULL, as there are no contents in the OK variant */ - LDKnativeQueryChannelRange *inner; + void *result; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. + */ + struct LDKAPIError *err; +} LDKCResult_NoneAPIErrorZPtr; + +/** + * A CResult_NoneAPIErrorZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning::util::errors::APIError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_NoneAPIErrorZ { + /** + * The contents of this CResult_NoneAPIErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_NoneAPIErrorZPtr contents; + /** + * Whether this CResult_NoneAPIErrorZ represents a success state. */ - bool is_owned; -} LDKQueryChannelRange; - - + bool result_ok; +} LDKCResult_NoneAPIErrorZ; /** - * A query_short_channel_ids message is used to query a peer for - * routing gossip messages related to one or more short_channel_ids. - * The query recipient will reply with the latest, if available, - * channel_announcement, channel_update and node_announcement messages - * it maintains for the requested short_channel_ids followed by a - * reply_short_channel_ids_end message. The short_channel_ids sent in - * this query are encoded. We only support encoding_type=0 uncompressed - * serialization and do not support encoding_type=1 zlib serialization. + * A dynamically-allocated array of crate::c_types::derived::CResult_NoneAPIErrorZs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct MUST_USE_STRUCT LDKQueryShortChannelIds { +typedef struct LDKCVec_CResult_NoneAPIErrorZZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKnativeQueryShortChannelIds *inner; + struct LDKCResult_NoneAPIErrorZ *data; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The number of elements pointed to by `data`. */ - bool is_owned; -} LDKQueryShortChannelIds; - - + uintptr_t datalen; +} LDKCVec_CResult_NoneAPIErrorZZ; /** - * A reply_channel_range message is a reply to a query_channel_range - * message. Multiple reply_channel_range messages can be sent in reply - * to a single query_channel_range message. The query recipient makes a - * best effort to respond based on their local network view which may - * not be a perfect view of the network. The short_channel_ids in the - * reply are encoded. We only support encoding_type=0 uncompressed - * serialization and do not support encoding_type=1 zlib serialization. + * A dynamically-allocated array of crate::lightning::util::errors::APIErrors of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct MUST_USE_STRUCT LDKReplyChannelRange { +typedef struct LDKCVec_APIErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKnativeReplyChannelRange *inner; + struct LDKAPIError *data; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The number of elements pointed to by `data`. */ - bool is_owned; -} LDKReplyChannelRange; + uintptr_t datalen; +} LDKCVec_APIErrorZ; /** - * An event generated by ChannelManager which indicates a message should be sent to a peer (or - * broadcast to most peers). - * These events are handled by PeerManager::process_events if you are using a PeerManager. + * If a payment fails to send, it can be in one of several states. This enum is returned as the + * Err() type describing which state the payment is in, see the description of individual enum + * states for more. */ -typedef enum LDKMessageSendEvent_Tag { +typedef enum LDKPaymentSendFailure_Tag { /** - * Used to indicate that we've accepted a channel open and should send the accept_channel - * message provided to the given peer. + * A parameter which was passed to send_payment was invalid, preventing us from attempting to + * send the payment at all. No channel state has been changed or messages sent to peers, and + * once you've changed the parameter at error, you can freely retry the payment in full. */ - LDKMessageSendEvent_SendAcceptChannel, + LDKPaymentSendFailure_ParameterError, /** - * Used to indicate that we've initiated a channel open and should send the open_channel - * message provided to the given peer. + * A parameter in a single path which was passed to send_payment was invalid, preventing us + * from attempting to send the payment at all. No channel state has been changed or messages + * sent to peers, and once you've changed the parameter at error, you can freely retry the + * payment in full. + * + * The results here are ordered the same as the paths in the route object which was passed to + * send_payment. */ - LDKMessageSendEvent_SendOpenChannel, + LDKPaymentSendFailure_PathParameterError, /** - * Used to indicate that a funding_created message should be sent to the peer with the given node_id. + * All paths which were attempted failed to send, with no channel state change taking place. + * You can freely retry the payment in full (though you probably want to do so over different + * paths than the ones selected). */ - LDKMessageSendEvent_SendFundingCreated, + LDKPaymentSendFailure_AllFailedRetrySafe, /** - * Used to indicate that a funding_signed message should be sent to the peer with the given node_id. + * Some paths which were attempted failed to send, though possibly not all. At least some + * paths have irrevocably committed to the HTLC and retrying the payment in full would result + * in over-/re-payment. + * + * The results here are ordered the same as the paths in the route object which was passed to + * send_payment, and any Errs which are not APIError::MonitorUpdateFailed can be safely + * retried (though there is currently no API with which to do so). + * + * Any entries which contain Err(APIError::MonitorUpdateFailed) or Ok(()) MUST NOT be retried + * as they will result in over-/re-payment. These HTLCs all either successfully sent (in the + * case of Ok(())) or will send once channel_monitor_updated is called on the next-hop channel + * with the latest update_id. */ - LDKMessageSendEvent_SendFundingSigned, + LDKPaymentSendFailure_PartialFailure, /** - * Used to indicate that a funding_locked message should be sent to the peer with the given node_id. + * Must be last for serialization purposes */ - LDKMessageSendEvent_SendFundingLocked, + LDKPaymentSendFailure_Sentinel, +} LDKPaymentSendFailure_Tag; + +typedef struct MUST_USE_STRUCT LDKPaymentSendFailure { + LDKPaymentSendFailure_Tag tag; + union { + struct { + struct LDKAPIError parameter_error; + }; + struct { + struct LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error; + }; + struct { + struct LDKCVec_APIErrorZ all_failed_retry_safe; + }; + struct { + struct LDKCVec_CResult_NoneAPIErrorZZ partial_failure; + }; + }; +} LDKPaymentSendFailure; + +/** + * The contents of CResult_NonePaymentSendFailureZ + */ +typedef union LDKCResult_NonePaymentSendFailureZPtr { /** - * Used to indicate that an announcement_signatures message should be sent to the peer with the given node_id. + * Note that this value is always NULL, as there are no contents in the OK variant */ - LDKMessageSendEvent_SendAnnouncementSignatures, + void *result; /** - * Used to indicate that a series of HTLC update messages, as well as a commitment_signed - * message should be sent to the peer with the given node_id. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - LDKMessageSendEvent_UpdateHTLCs, + struct LDKPaymentSendFailure *err; +} LDKCResult_NonePaymentSendFailureZPtr; + +/** + * A CResult_NonePaymentSendFailureZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning::ln::channelmanager::PaymentSendFailure on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_NonePaymentSendFailureZ { /** - * Used to indicate that a revoke_and_ack message should be sent to the peer with the given node_id. + * The contents of this CResult_NonePaymentSendFailureZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKMessageSendEvent_SendRevokeAndACK, + union LDKCResult_NonePaymentSendFailureZPtr contents; /** - * Used to indicate that a closing_signed message should be sent to the peer with the given node_id. + * Whether this CResult_NonePaymentSendFailureZ represents a success state. */ - LDKMessageSendEvent_SendClosingSigned, + bool result_ok; +} LDKCResult_NonePaymentSendFailureZ; + +/** + * A 4-byte byte array. + */ +typedef struct LDKFourBytes { /** - * Used to indicate that a shutdown message should be sent to the peer with the given node_id. + * The four bytes */ - LDKMessageSendEvent_SendShutdown, + uint8_t data[4]; +} LDKFourBytes; + +/** + * A 16-byte byte array. + */ +typedef struct LDKSixteenBytes { /** - * Used to indicate that a channel_reestablish message should be sent to the peer with the given node_id. + * The sixteen bytes */ - LDKMessageSendEvent_SendChannelReestablish, + uint8_t data[16]; +} LDKSixteenBytes; + +/** + * A 10-byte byte array. + */ +typedef struct LDKTenBytes { /** - * Used to indicate that a channel_announcement and channel_update should be broadcast to all - * peers (except the peer with node_id either msg.contents.node_id_1 or msg.contents.node_id_2). - * - * Note that after doing so, you very likely (unless you did so very recently) want to call - * ChannelManager::broadcast_node_announcement to trigger a BroadcastNodeAnnouncement event. - * This ensures that any nodes which see our channel_announcement also have a relevant - * node_announcement, including relevant feature flags which may be important for routing - * through or to us. + * The ten bytes */ - LDKMessageSendEvent_BroadcastChannelAnnouncement, + uint8_t data[10]; +} LDKTenBytes; + +/** + * An address which can be used to connect to a remote peer + */ +typedef enum LDKNetAddress_Tag { /** - * Used to indicate that a node_announcement should be broadcast to all peers. + * An IPv4 address/port on which the peer is listening. */ - LDKMessageSendEvent_BroadcastNodeAnnouncement, + LDKNetAddress_IPv4, /** - * Used to indicate that a channel_update should be broadcast to all peers. + * An IPv6 address/port on which the peer is listening. */ - LDKMessageSendEvent_BroadcastChannelUpdate, + LDKNetAddress_IPv6, /** - * Broadcast an error downstream to be handled + * An old-style Tor onion address/port on which the peer is listening. */ - LDKMessageSendEvent_HandleError, + LDKNetAddress_OnionV2, /** - * When a payment fails we may receive updates back from the hop where it failed. In such - * cases this event is generated so that we can inform the network graph of this information. + * A new-style Tor onion address/port on which the peer is listening. + * To create the human-readable \"hostname\", concatenate ed25519_pubkey, checksum, and version, + * wrap as base32 and append \".onion\". */ - LDKMessageSendEvent_PaymentFailureNetworkUpdate, + LDKNetAddress_OnionV3, /** - * Query a peer for channels with funding transaction UTXOs in a block range. + * Must be last for serialization purposes */ - LDKMessageSendEvent_SendChannelRangeQuery, + LDKNetAddress_Sentinel, +} LDKNetAddress_Tag; + +typedef struct LDKNetAddress_LDKIPv4_Body { /** - * Request routing gossip messages from a peer for a list of channels identified by - * their short_channel_ids. + * The 4-byte IPv4 address */ - LDKMessageSendEvent_SendShortIdsQuery, + struct LDKFourBytes addr; /** - * Sends a reply to a channel range query. This may be one of several SendReplyChannelRange events - * emitted during processing of the query. + * The port on which the node is listening */ - LDKMessageSendEvent_SendReplyChannelRange, + uint16_t port; +} LDKNetAddress_LDKIPv4_Body; + +typedef struct LDKNetAddress_LDKIPv6_Body { /** - * Must be last for serialization purposes + * The 16-byte IPv6 address */ - LDKMessageSendEvent_Sentinel, -} LDKMessageSendEvent_Tag; + struct LDKSixteenBytes addr; + /** + * The port on which the node is listening + */ + uint16_t port; +} LDKNetAddress_LDKIPv6_Body; -typedef struct LDKMessageSendEvent_LDKSendAcceptChannel_Body { +typedef struct LDKNetAddress_LDKOnionV2_Body { /** - * The node_id of the node which should receive this message + * The bytes (usually encoded in base32 with \".onion\" appended) */ - struct LDKPublicKey node_id; + struct LDKTenBytes addr; /** - * The message which should be sent. + * The port on which the node is listening */ - struct LDKAcceptChannel msg; -} LDKMessageSendEvent_LDKSendAcceptChannel_Body; + uint16_t port; +} LDKNetAddress_LDKOnionV2_Body; -typedef struct LDKMessageSendEvent_LDKSendOpenChannel_Body { +typedef struct LDKNetAddress_LDKOnionV3_Body { /** - * The node_id of the node which should receive this message + * The ed25519 long-term public key of the peer */ - struct LDKPublicKey node_id; + struct LDKThirtyTwoBytes ed25519_pubkey; /** - * The message which should be sent. + * The checksum of the pubkey and version, as included in the onion address */ - struct LDKOpenChannel msg; -} LDKMessageSendEvent_LDKSendOpenChannel_Body; - -typedef struct LDKMessageSendEvent_LDKSendFundingCreated_Body { + uint16_t checksum; /** - * The node_id of the node which should receive this message + * The version byte, as defined by the Tor Onion v3 spec. */ - struct LDKPublicKey node_id; + uint8_t version; /** - * The message which should be sent. + * The port on which the node is listening */ - struct LDKFundingCreated msg; -} LDKMessageSendEvent_LDKSendFundingCreated_Body; + uint16_t port; +} LDKNetAddress_LDKOnionV3_Body; -typedef struct LDKMessageSendEvent_LDKSendFundingSigned_Body { +typedef struct MUST_USE_STRUCT LDKNetAddress { + LDKNetAddress_Tag tag; + union { + LDKNetAddress_LDKIPv4_Body i_pv4; + LDKNetAddress_LDKIPv6_Body i_pv6; + LDKNetAddress_LDKOnionV2_Body onion_v2; + LDKNetAddress_LDKOnionV3_Body onion_v3; + }; +} LDKNetAddress; + +/** + * A dynamically-allocated array of crate::lightning::ln::msgs::NetAddresss of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_NetAddressZ { /** - * The node_id of the node which should receive this message + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKPublicKey node_id; + struct LDKNetAddress *data; /** - * The message which should be sent. + * The number of elements pointed to by `data`. */ - struct LDKFundingSigned msg; -} LDKMessageSendEvent_LDKSendFundingSigned_Body; + uintptr_t datalen; +} LDKCVec_NetAddressZ; -typedef struct LDKMessageSendEvent_LDKSendFundingLocked_Body { +/** + * A tuple of 2 elements. See the individual fields for the types contained. + */ +typedef struct LDKC2Tuple_PaymentHashPaymentSecretZ { /** - * The node_id of the node which should receive these message(s) + * The element at position 0 */ - struct LDKPublicKey node_id; + struct LDKThirtyTwoBytes a; /** - * The funding_locked message which should be sent. + * The element at position 1 */ - struct LDKFundingLocked msg; -} LDKMessageSendEvent_LDKSendFundingLocked_Body; + struct LDKThirtyTwoBytes b; +} LDKC2Tuple_PaymentHashPaymentSecretZ; -typedef struct LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body { +/** + * The contents of CResult_PaymentSecretAPIErrorZ + */ +typedef union LDKCResult_PaymentSecretAPIErrorZPtr { /** - * The node_id of the node which should receive these message(s) + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKPublicKey node_id; + struct LDKThirtyTwoBytes *result; /** - * The announcement_signatures message which should be sent. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKAnnouncementSignatures msg; -} LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body; + struct LDKAPIError *err; +} LDKCResult_PaymentSecretAPIErrorZPtr; -typedef struct LDKMessageSendEvent_LDKUpdateHTLCs_Body { +/** + * A CResult_PaymentSecretAPIErrorZ represents the result of a fallible operation, + * containing a crate::c_types::ThirtyTwoBytes on success and a crate::lightning::util::errors::APIError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_PaymentSecretAPIErrorZ { /** - * The node_id of the node which should receive these message(s) + * The contents of this CResult_PaymentSecretAPIErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - struct LDKPublicKey node_id; + union LDKCResult_PaymentSecretAPIErrorZPtr contents; /** - * The update messages which should be sent. ALL messages in the struct should be sent! + * Whether this CResult_PaymentSecretAPIErrorZ represents a success state. */ - struct LDKCommitmentUpdate updates; -} LDKMessageSendEvent_LDKUpdateHTLCs_Body; + bool result_ok; +} LDKCResult_PaymentSecretAPIErrorZ; -typedef struct LDKMessageSendEvent_LDKSendRevokeAndACK_Body { +/** + * A dynamically-allocated array of crate::lightning::chain::channelmonitor::ChannelMonitors of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_ChannelMonitorZ { /** - * The node_id of the node which should receive this message + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKPublicKey node_id; + struct LDKChannelMonitor *data; /** - * The message which should be sent. + * The number of elements pointed to by `data`. */ - struct LDKRevokeAndACK msg; -} LDKMessageSendEvent_LDKSendRevokeAndACK_Body; + uintptr_t datalen; +} LDKCVec_ChannelMonitorZ; -typedef struct LDKMessageSendEvent_LDKSendClosingSigned_Body { + + +/** + * An update generated by the underlying Channel itself which contains some new information the + * ChannelMonitor should be made aware of. + */ +typedef struct MUST_USE_STRUCT LDKChannelMonitorUpdate { /** - * The node_id of the node which should receive this message + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKPublicKey node_id; + LDKnativeChannelMonitorUpdate *inner; /** - * The message which should be sent. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKClosingSigned msg; -} LDKMessageSendEvent_LDKSendClosingSigned_Body; + bool is_owned; +} LDKChannelMonitorUpdate; -typedef struct LDKMessageSendEvent_LDKSendShutdown_Body { +/** + * The `Watch` trait defines behavior for watching on-chain activity pertaining to channels as + * blocks are connected and disconnected. + * + * Each channel is associated with a [`ChannelMonitor`]. Implementations of this trait are + * responsible for maintaining a set of monitors such that they can be updated accordingly as + * channel state changes and HTLCs are resolved. See method documentation for specific + * requirements. + * + * Implementations **must** ensure that updates are successfully applied and persisted upon method + * completion. If an update fails with a [`PermanentFailure`], then it must immediately shut down + * without taking any further action such as persisting the current state. + * + * If an implementation maintains multiple instances of a channel's monitor (e.g., by storing + * backup copies), then it must ensure that updates are applied across all instances. Otherwise, it + * could result in a revoked transaction being broadcast, allowing the counterparty to claim all + * funds in the channel. See [`ChannelMonitorUpdateErr`] for more details about how to handle + * multiple instances. + * + * [`ChannelMonitor`]: channelmonitor::ChannelMonitor + * [`ChannelMonitorUpdateErr`]: channelmonitor::ChannelMonitorUpdateErr + * [`PermanentFailure`]: channelmonitor::ChannelMonitorUpdateErr::PermanentFailure + */ +typedef struct LDKWatch { /** - * The node_id of the node which should receive this message + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - struct LDKPublicKey node_id; + void *this_arg; /** - * The message which should be sent. + * Watches a channel identified by `funding_txo` using `monitor`. + * + * Implementations are responsible for watching the chain for the funding transaction along + * with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means + * calling [`block_connected`] and [`block_disconnected`] on the monitor. + * + * [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch + * [`block_connected`]: channelmonitor::ChannelMonitor::block_connected + * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected */ - struct LDKShutdown msg; -} LDKMessageSendEvent_LDKSendShutdown_Body; - -typedef struct LDKMessageSendEvent_LDKSendChannelReestablish_Body { + struct LDKCResult_NoneChannelMonitorUpdateErrZ (*watch_channel)(const void *this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor); /** - * The node_id of the node which should receive this message + * Updates a channel identified by `funding_txo` by applying `update` to its monitor. + * + * Implementations must call [`update_monitor`] with the given update. See + * [`ChannelMonitorUpdateErr`] for invariants around returning an error. + * + * [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor + * [`ChannelMonitorUpdateErr`]: channelmonitor::ChannelMonitorUpdateErr */ - struct LDKPublicKey node_id; + struct LDKCResult_NoneChannelMonitorUpdateErrZ (*update_channel)(const void *this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update); /** - * The message which should be sent. + * Returns any monitor events since the last call. Subsequent calls must only return new + * events. */ - struct LDKChannelReestablish msg; -} LDKMessageSendEvent_LDKSendChannelReestablish_Body; - -typedef struct LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body { + struct LDKCVec_MonitorEventZ (*release_pending_monitor_events)(const void *this_arg); /** - * The channel_announcement which should be sent. + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. */ - struct LDKChannelAnnouncement msg; + void (*free)(void *this_arg); +} LDKWatch; + +/** + * An interface to send a transaction to the Bitcoin network. + */ +typedef struct LDKBroadcasterInterface { /** - * The followup channel_update which should be sent. + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - struct LDKChannelUpdate update_msg; -} LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body; - -typedef struct LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body { + void *this_arg; /** - * The node_announcement which should be sent. + * Sends a transaction out to (hopefully) be mined. */ - struct LDKNodeAnnouncement msg; -} LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body; - -typedef struct LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body { + void (*broadcast_transaction)(const void *this_arg, struct LDKTransaction tx); /** - * The channel_update which should be sent. + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. */ - struct LDKChannelUpdate msg; -} LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body; + void (*free)(void *this_arg); +} LDKBroadcasterInterface; -typedef struct LDKMessageSendEvent_LDKHandleError_Body { +/** + * A "slice" referencing some byte array. This is simply a length-tagged pointer which does not + * own the memory pointed to by data. + */ +typedef struct LDKu8slice { /** - * The node_id of the node which should receive this message + * A pointer to the byte buffer */ - struct LDKPublicKey node_id; + const uint8_t *data; /** - * The action which should be taken. + * The number of bytes pointed to by `data`. */ - struct LDKErrorAction action; -} LDKMessageSendEvent_LDKHandleError_Body; + uintptr_t datalen; +} LDKu8slice; -typedef struct LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body { +/** + * A trait to describe an object which can get user secrets and key material. + */ +typedef struct LDKKeysInterface { /** - * The channel/node update which should be sent to NetGraphMsgHandler + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - struct LDKHTLCFailChannelUpdate update; -} LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body; - -typedef struct LDKMessageSendEvent_LDKSendChannelRangeQuery_Body { + void *this_arg; /** - * The node_id of this message recipient + * Get node secret key (aka node_id or network_key). + * + * This method must return the same value each time it is called. */ - struct LDKPublicKey node_id; + struct LDKSecretKey (*get_node_secret)(const void *this_arg); /** - * The query_channel_range which should be sent. + * Get a script pubkey which we send funds to when claiming on-chain contestable outputs. + * + * This method should return a different value each time it is called, to avoid linking + * on-chain funds across channels as controlled to the same user. */ - struct LDKQueryChannelRange msg; -} LDKMessageSendEvent_LDKSendChannelRangeQuery_Body; - -typedef struct LDKMessageSendEvent_LDKSendShortIdsQuery_Body { + struct LDKCVec_u8Z (*get_destination_script)(const void *this_arg); /** - * The node_id of this message recipient + * Get a public key which we will send funds to (in the form of a P2WPKH output) when closing + * a channel. + * + * This method should return a different value each time it is called, to avoid linking + * on-chain funds across channels as controlled to the same user. */ - struct LDKPublicKey node_id; + struct LDKPublicKey (*get_shutdown_pubkey)(const void *this_arg); /** - * The query_short_channel_ids which should be sent. + * Get a new set of Sign for per-channel secrets. These MUST be unique even if you + * restarted with some stale data! + * + * This method must return a different value each time it is called. */ - struct LDKQueryShortChannelIds msg; -} LDKMessageSendEvent_LDKSendShortIdsQuery_Body; - -typedef struct LDKMessageSendEvent_LDKSendReplyChannelRange_Body { + struct LDKSign (*get_channel_signer)(const void *this_arg, bool inbound, uint64_t channel_value_satoshis); /** - * The node_id of this message recipient + * Gets a unique, cryptographically-secure, random 32 byte value. This is used for encrypting + * onion packets and for temporary channel IDs. There is no requirement that these be + * persisted anywhere, though they must be unique across restarts. + * + * This method must return a different value each time it is called. */ - struct LDKPublicKey node_id; + struct LDKThirtyTwoBytes (*get_secure_random_bytes)(const void *this_arg); /** - * The reply_channel_range which should be sent. + * Reads a `Signer` for this `KeysInterface` from the given input stream. + * This is only called during deserialization of other objects which contain + * `Sign`-implementing objects (ie `ChannelMonitor`s and `ChannelManager`s). + * The bytes are exactly those which `::write()` writes, and + * contain no versioning scheme. You may wish to include your own version prefix and ensure + * you've read all of the provided bytes to ensure no corruption occurred. */ - struct LDKReplyChannelRange msg; -} LDKMessageSendEvent_LDKSendReplyChannelRange_Body; - -typedef struct MUST_USE_STRUCT LDKMessageSendEvent { - LDKMessageSendEvent_Tag tag; - union { - LDKMessageSendEvent_LDKSendAcceptChannel_Body send_accept_channel; - LDKMessageSendEvent_LDKSendOpenChannel_Body send_open_channel; - LDKMessageSendEvent_LDKSendFundingCreated_Body send_funding_created; - LDKMessageSendEvent_LDKSendFundingSigned_Body send_funding_signed; - LDKMessageSendEvent_LDKSendFundingLocked_Body send_funding_locked; - LDKMessageSendEvent_LDKSendAnnouncementSignatures_Body send_announcement_signatures; - LDKMessageSendEvent_LDKUpdateHTLCs_Body update_htl_cs; - LDKMessageSendEvent_LDKSendRevokeAndACK_Body send_revoke_and_ack; - LDKMessageSendEvent_LDKSendClosingSigned_Body send_closing_signed; - LDKMessageSendEvent_LDKSendShutdown_Body send_shutdown; - LDKMessageSendEvent_LDKSendChannelReestablish_Body send_channel_reestablish; - LDKMessageSendEvent_LDKBroadcastChannelAnnouncement_Body broadcast_channel_announcement; - LDKMessageSendEvent_LDKBroadcastNodeAnnouncement_Body broadcast_node_announcement; - LDKMessageSendEvent_LDKBroadcastChannelUpdate_Body broadcast_channel_update; - LDKMessageSendEvent_LDKHandleError_Body handle_error; - LDKMessageSendEvent_LDKPaymentFailureNetworkUpdate_Body payment_failure_network_update; - LDKMessageSendEvent_LDKSendChannelRangeQuery_Body send_channel_range_query; - LDKMessageSendEvent_LDKSendShortIdsQuery_Body send_short_ids_query; - LDKMessageSendEvent_LDKSendReplyChannelRange_Body send_reply_channel_range; - }; -} LDKMessageSendEvent; - -/** - * A dynamically-allocated array of crate::lightning::util::events::MessageSendEvents of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_MessageSendEventZ { + struct LDKCResult_SignDecodeErrorZ (*read_chan_signer)(const void *this_arg, struct LDKu8slice reader); /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * Sign an invoice's preimage (note that this is the preimage of the invoice, not the HTLC's + * preimage). By parameterizing by the preimage instead of the hash, we allow implementors of + * this trait to parse the invoice and make sure they're signing what they expect, rather than + * blindly signing the hash. */ - struct LDKMessageSendEvent *data; + struct LDKCResult_RecoverableSignatureNoneZ (*sign_invoice)(const void *this_arg, struct LDKCVec_u8Z invoice_preimage); /** - * The number of elements pointed to by `data`. + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. */ - uintptr_t datalen; -} LDKCVec_MessageSendEventZ; + void (*free)(void *this_arg); +} LDKKeysInterface; /** - * The contents of CResult_boolLightningErrorZ + * A trait which should be implemented to provide feerate information on a number of time + * horizons. + * + * Note that all of the functions implemented here *must* be reentrant-safe (obviously - they're + * called from inside the library in response to chain events, P2P events, or timer events). */ -typedef union LDKCResult_boolLightningErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - bool *result; +typedef struct LDKFeeEstimator { /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - struct LDKLightningError *err; -} LDKCResult_boolLightningErrorZPtr; - -/** - * A CResult_boolLightningErrorZ represents the result of a fallible operation, - * containing a bool on success and a crate::lightning::ln::msgs::LightningError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_boolLightningErrorZ { + void *this_arg; /** - * The contents of this CResult_boolLightningErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * Gets estimated satoshis of fee required per 1000 Weight-Units. + * + * Must be no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later round-downs + * don't put us below 1 satoshi-per-byte). + * + * This translates to: + * * satoshis-per-byte * 250 + * * ceil(satoshis-per-kbyte / 4) */ - union LDKCResult_boolLightningErrorZPtr contents; + uint32_t (*get_est_sat_per_1000_weight)(const void *this_arg, enum LDKConfirmationTarget confirmation_target); /** - * Whether this CResult_boolLightningErrorZ represents a success state. + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. */ - bool result_ok; -} LDKCResult_boolLightningErrorZ; + void (*free)(void *this_arg); +} LDKFeeEstimator; /** - * A tuple of 3 elements. See the individual fields for the types contained. + * A trait encapsulating the operations required of a logger */ -typedef struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ { +typedef struct LDKLogger { /** - * The element at position 0 + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. */ - struct LDKChannelAnnouncement a; + void *this_arg; /** - * The element at position 1 + * Logs the `Record` */ - struct LDKChannelUpdate b; + void (*log)(const void *this_arg, const char *record); /** - * The element at position 2 + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. */ - struct LDKChannelUpdate c; -} LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ; + void (*free)(void *this_arg); +} LDKLogger; + + /** - * A dynamically-allocated array of crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZs of arbitrary size. - * This corresponds to std::vector in C++ + * Manager which keeps track of a number of channels and sends messages to the appropriate + * channel, also tracking HTLC preimages and forwarding onion packets appropriately. + * + * Implements ChannelMessageHandler, handling the multi-channel parts and passing things through + * to individual Channels. + * + * Implements Writeable to write out all channel state to disk. Implies peer_disconnected() for + * all peers during write/read (though does not modify this instance, only the instance being + * serialized). This will result in any channels which have not yet exchanged funding_created (ie + * called funding_transaction_generated for outbound channels). + * + * Note that you can be a bit lazier about writing out ChannelManager than you can be with + * ChannelMonitors. With ChannelMonitors you MUST write each monitor update out to disk before + * returning from chain::Watch::watch_/update_channel, with ChannelManagers, writing updates + * happens out-of-band (and will prevent any other ChannelManager operations from occurring during + * the serialization process). If the deserialized version is out-of-date compared to the + * ChannelMonitors passed by reference to read(), those channels will be force-closed based on the + * ChannelMonitor state and no funds will be lost (mod on-chain transaction fees). + * + * Note that the deserializer is only implemented for (BlockHash, ChannelManager), which + * tells you the last block hash which was block_connect()ed. You MUST rescan any blocks along + * the \"reorg path\" (ie call block_disconnected() until you get to a common block and then call + * block_connected() to step towards your best block) upon deserialization before using the + * object! + * + * Note that ChannelManager is responsible for tracking liveness of its channels and generating + * ChannelUpdate messages informing peers that the channel is temporarily disabled. To avoid + * spam due to quick disconnection/reconnection, updates are not sent until the channel has been + * offline for a full minute. In order to track this, you must call + * timer_tick_occurred roughly once per minute, though it doesn't have to be perfect. + * + * Rather than using a plain ChannelManager, it is preferable to use either a SimpleArcChannelManager + * a SimpleRefChannelManager, for conciseness. See their documentation for more details, but + * essentially you should default to using a SimpleRefChannelManager, and use a + * SimpleArcChannelManager when you require a ChannelManager with a static lifetime, such as when + * you're using lightning-net-tokio. */ -typedef struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ { +typedef struct MUST_USE_STRUCT LDKChannelManager { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *data; + LDKnativeChannelManager *inner; /** - * The number of elements pointed to by `data`. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uintptr_t datalen; -} LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ; + bool is_owned; +} LDKChannelManager; /** - * A dynamically-allocated array of crate::lightning::ln::msgs::NodeAnnouncements of arbitrary size. - * This corresponds to std::vector in C++ + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef struct LDKCVec_NodeAnnouncementZ { +typedef struct LDKC2Tuple_BlockHashChannelManagerZ { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * The element at position 0 */ - struct LDKNodeAnnouncement *data; + struct LDKThirtyTwoBytes a; /** - * The number of elements pointed to by `data`. + * The element at position 1 */ - uintptr_t datalen; -} LDKCVec_NodeAnnouncementZ; + struct LDKChannelManager b; +} LDKC2Tuple_BlockHashChannelManagerZ; /** - * The contents of CResult_NoneLightningErrorZ + * The contents of CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ */ -typedef union LDKCResult_NoneLightningErrorZPtr { +typedef union LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr { /** - * Note that this value is always NULL, as there are no contents in the OK variant + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - void *result; + struct LDKC2Tuple_BlockHashChannelManagerZ *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKLightningError *err; -} LDKCResult_NoneLightningErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr; /** - * A CResult_NoneLightningErrorZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning::ln::msgs::LightningError on failure. + * A CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ represents the result of a fallible operation, + * containing a crate::c_types::derived::C2Tuple_BlockHashChannelManagerZ on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NoneLightningErrorZ { +typedef struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ { /** - * The contents of this CResult_NoneLightningErrorZ, accessible via either + * The contents of this CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NoneLightningErrorZPtr contents; + union LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr contents; /** - * Whether this CResult_NoneLightningErrorZ represents a success state. + * Whether this CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NoneLightningErrorZ; - -/** - * A dynamically-allocated array of crate::c_types::PublicKeys of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_PublicKeyZ { - /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). - */ - struct LDKPublicKey *data; - /** - * The number of elements pointed to by `data`. - */ - uintptr_t datalen; -} LDKCVec_PublicKeyZ; +} LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ; /** - * Error for PeerManager errors. If you get one of these, you must disconnect the socket and - * generate no further read_event/write_buffer_space_avail/socket_disconnected calls for the - * descriptor. + * Options which apply on a per-channel basis and may change at runtime or based on negotiation + * with our counterparty. */ -typedef struct MUST_USE_STRUCT LDKPeerHandleError { +typedef struct MUST_USE_STRUCT LDKChannelConfig { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativePeerHandleError *inner; + LDKnativeChannelConfig *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKPeerHandleError; +} LDKChannelConfig; /** - * The contents of CResult_CVec_u8ZPeerHandleErrorZ + * The contents of CResult_ChannelConfigDecodeErrorZ */ -typedef union LDKCResult_CVec_u8ZPeerHandleErrorZPtr { +typedef union LDKCResult_ChannelConfigDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKCVec_u8Z *result; + struct LDKChannelConfig *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKPeerHandleError *err; -} LDKCResult_CVec_u8ZPeerHandleErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_ChannelConfigDecodeErrorZPtr; /** - * A CResult_CVec_u8ZPeerHandleErrorZ represents the result of a fallible operation, - * containing a crate::c_types::derived::CVec_u8Z on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure. + * A CResult_ChannelConfigDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::util::config::ChannelConfig on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_CVec_u8ZPeerHandleErrorZ { +typedef struct LDKCResult_ChannelConfigDecodeErrorZ { /** - * The contents of this CResult_CVec_u8ZPeerHandleErrorZ, accessible via either + * The contents of this CResult_ChannelConfigDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_CVec_u8ZPeerHandleErrorZPtr contents; + union LDKCResult_ChannelConfigDecodeErrorZPtr contents; /** - * Whether this CResult_CVec_u8ZPeerHandleErrorZ represents a success state. + * Whether this CResult_ChannelConfigDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_CVec_u8ZPeerHandleErrorZ; +} LDKCResult_ChannelConfigDecodeErrorZ; /** - * The contents of CResult_NonePeerHandleErrorZ + * The contents of CResult_OutPointDecodeErrorZ */ -typedef union LDKCResult_NonePeerHandleErrorZPtr { +typedef union LDKCResult_OutPointDecodeErrorZPtr { /** - * Note that this value is always NULL, as there are no contents in the OK variant + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - void *result; + struct LDKOutPoint *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKPeerHandleError *err; -} LDKCResult_NonePeerHandleErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_OutPointDecodeErrorZPtr; /** - * A CResult_NonePeerHandleErrorZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure. + * A CResult_OutPointDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::transaction::OutPoint on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NonePeerHandleErrorZ { +typedef struct LDKCResult_OutPointDecodeErrorZ { /** - * The contents of this CResult_NonePeerHandleErrorZ, accessible via either + * The contents of this CResult_OutPointDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NonePeerHandleErrorZPtr contents; + union LDKCResult_OutPointDecodeErrorZPtr contents; /** - * Whether this CResult_NonePeerHandleErrorZ represents a success state. + * Whether this CResult_OutPointDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NonePeerHandleErrorZ; +} LDKCResult_OutPointDecodeErrorZ; /** - * The contents of CResult_boolPeerHandleErrorZ + * The contents of CResult_SiPrefixNoneZ */ -typedef union LDKCResult_boolPeerHandleErrorZPtr { +typedef union LDKCResult_SiPrefixNoneZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - bool *result; + enum LDKSiPrefix *result; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Note that this value is always NULL, as there are no contents in the Err variant */ - struct LDKPeerHandleError *err; -} LDKCResult_boolPeerHandleErrorZPtr; + void *err; +} LDKCResult_SiPrefixNoneZPtr; /** - * A CResult_boolPeerHandleErrorZ represents the result of a fallible operation, - * containing a bool on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure. + * A CResult_SiPrefixNoneZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::SiPrefix on success and a () on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_boolPeerHandleErrorZ { +typedef struct LDKCResult_SiPrefixNoneZ { /** - * The contents of this CResult_boolPeerHandleErrorZ, accessible via either + * The contents of this CResult_SiPrefixNoneZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_boolPeerHandleErrorZPtr contents; + union LDKCResult_SiPrefixNoneZPtr contents; /** - * Whether this CResult_boolPeerHandleErrorZ represents a success state. + * Whether this CResult_SiPrefixNoneZ represents a success state. */ bool result_ok; -} LDKCResult_boolPeerHandleErrorZ; +} LDKCResult_SiPrefixNoneZ; + + /** - * The contents of CResult_TxOutAccessErrorZ + * Represents a syntactically and semantically correct lightning BOLT11 invoice. + * + * There are three ways to construct an `Invoice`: + * 1. using `InvoiceBuilder` + * 2. using `Invoice::from_signed(SignedRawInvoice)` + * 3. using `str::parse::(&str)` */ -typedef union LDKCResult_TxOutAccessErrorZPtr { +typedef struct MUST_USE_STRUCT LDKInvoice { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKTxOut *result; + LDKnativeInvoice *inner; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - enum LDKAccessError *err; -} LDKCResult_TxOutAccessErrorZPtr; + bool is_owned; +} LDKInvoice; /** - * A CResult_TxOutAccessErrorZ represents the result of a fallible operation, - * containing a crate::c_types::TxOut on success and a crate::lightning::chain::AccessError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * The contents of CResult_InvoiceNoneZ */ -typedef struct LDKCResult_TxOutAccessErrorZ { +typedef union LDKCResult_InvoiceNoneZPtr { /** - * The contents of this CResult_TxOutAccessErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - union LDKCResult_TxOutAccessErrorZPtr contents; + struct LDKInvoice *result; /** - * Whether this CResult_TxOutAccessErrorZ represents a success state. + * Note that this value is always NULL, as there are no contents in the Err variant */ - bool result_ok; -} LDKCResult_TxOutAccessErrorZ; + void *err; +} LDKCResult_InvoiceNoneZPtr; /** - * An enum which can either contain a crate::c_types::derived::C2Tuple_usizeTransactionZ or not + * A CResult_InvoiceNoneZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::Invoice on success and a () on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef enum LDKCOption_C2Tuple_usizeTransactionZZ_Tag { - /** - * When we're in this state, this COption_C2Tuple_usizeTransactionZZ contains a crate::c_types::derived::C2Tuple_usizeTransactionZ - */ - LDKCOption_C2Tuple_usizeTransactionZZ_Some, +typedef struct LDKCResult_InvoiceNoneZ { /** - * When we're in this state, this COption_C2Tuple_usizeTransactionZZ contains nothing + * The contents of this CResult_InvoiceNoneZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKCOption_C2Tuple_usizeTransactionZZ_None, + union LDKCResult_InvoiceNoneZPtr contents; /** - * Must be last for serialization purposes + * Whether this CResult_InvoiceNoneZ represents a success state. */ - LDKCOption_C2Tuple_usizeTransactionZZ_Sentinel, -} LDKCOption_C2Tuple_usizeTransactionZZ_Tag; - -typedef struct LDKCOption_C2Tuple_usizeTransactionZZ { - LDKCOption_C2Tuple_usizeTransactionZZ_Tag tag; - union { - struct { - struct LDKC2Tuple_usizeTransactionZ some; - }; - }; -} LDKCOption_C2Tuple_usizeTransactionZZ; + bool result_ok; +} LDKCResult_InvoiceNoneZ; /** - * Details about one direction of a channel. Received - * within a channel update. + * Represents a signed `RawInvoice` with cached hash. The signature is not checked and may be + * invalid. + * + * # Invariants + * The hash has to be either from the deserialized invoice or from the serialized `raw_invoice`. */ -typedef struct MUST_USE_STRUCT LDKDirectionalChannelInfo { +typedef struct MUST_USE_STRUCT LDKSignedRawInvoice { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeDirectionalChannelInfo *inner; + LDKnativeSignedRawInvoice *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKDirectionalChannelInfo; +} LDKSignedRawInvoice; /** - * The contents of CResult_DirectionalChannelInfoDecodeErrorZ + * The contents of CResult_SignedRawInvoiceNoneZ */ -typedef union LDKCResult_DirectionalChannelInfoDecodeErrorZPtr { +typedef union LDKCResult_SignedRawInvoiceNoneZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKDirectionalChannelInfo *result; + struct LDKSignedRawInvoice *result; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Note that this value is always NULL, as there are no contents in the Err variant */ - struct LDKDecodeError *err; -} LDKCResult_DirectionalChannelInfoDecodeErrorZPtr; + void *err; +} LDKCResult_SignedRawInvoiceNoneZPtr; /** - * A CResult_DirectionalChannelInfoDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::network_graph::DirectionalChannelInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_SignedRawInvoiceNoneZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::SignedRawInvoice on success and a () on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_DirectionalChannelInfoDecodeErrorZ { +typedef struct LDKCResult_SignedRawInvoiceNoneZ { /** - * The contents of this CResult_DirectionalChannelInfoDecodeErrorZ, accessible via either + * The contents of this CResult_SignedRawInvoiceNoneZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_DirectionalChannelInfoDecodeErrorZPtr contents; + union LDKCResult_SignedRawInvoiceNoneZPtr contents; /** - * Whether this CResult_DirectionalChannelInfoDecodeErrorZ represents a success state. + * Whether this CResult_SignedRawInvoiceNoneZ represents a success state. */ bool result_ok; -} LDKCResult_DirectionalChannelInfoDecodeErrorZ; +} LDKCResult_SignedRawInvoiceNoneZ; /** - * Details about a channel (both directions). - * Received within a channel announcement. + * Represents an syntactically correct Invoice for a payment on the lightning network, + * but without the signature information. + * De- and encoding should not lead to information loss but may lead to different hashes. + * + * For methods without docs see the corresponding methods in `Invoice`. */ -typedef struct MUST_USE_STRUCT LDKChannelInfo { +typedef struct MUST_USE_STRUCT LDKRawInvoice { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeChannelInfo *inner; + LDKnativeRawInvoice *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKChannelInfo; +} LDKRawInvoice; + + /** - * The contents of CResult_ChannelInfoDecodeErrorZ + * Recoverable signature */ -typedef union LDKCResult_ChannelInfoDecodeErrorZPtr { +typedef struct MUST_USE_STRUCT LDKInvoiceSignature { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKChannelInfo *result; + LDKnativeInvoiceSignature *inner; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKDecodeError *err; -} LDKCResult_ChannelInfoDecodeErrorZPtr; + bool is_owned; +} LDKInvoiceSignature; /** - * A CResult_ChannelInfoDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::network_graph::ChannelInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A tuple of 3 elements. See the individual fields for the types contained. */ -typedef struct LDKCResult_ChannelInfoDecodeErrorZ { +typedef struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ { /** - * The contents of this CResult_ChannelInfoDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The element at position 0 */ - union LDKCResult_ChannelInfoDecodeErrorZPtr contents; + struct LDKRawInvoice a; /** - * Whether this CResult_ChannelInfoDecodeErrorZ represents a success state. + * The element at position 1 */ - bool result_ok; -} LDKCResult_ChannelInfoDecodeErrorZ; + struct LDKThirtyTwoBytes b; + /** + * The element at position 2 + */ + struct LDKInvoiceSignature c; +} LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ; /** - * Fees for routing via a given channel or a node + * Payee public key */ -typedef struct MUST_USE_STRUCT LDKRoutingFees { +typedef struct MUST_USE_STRUCT LDKPayeePubKey { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeRoutingFees *inner; + LDKnativePayeePubKey *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKRoutingFees; +} LDKPayeePubKey; /** - * The contents of CResult_RoutingFeesDecodeErrorZ + * The contents of CResult_PayeePubKeyErrorZ */ -typedef union LDKCResult_RoutingFeesDecodeErrorZPtr { +typedef union LDKCResult_PayeePubKeyErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKRoutingFees *result; + struct LDKPayeePubKey *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_RoutingFeesDecodeErrorZPtr; + enum LDKSecp256k1Error *err; +} LDKCResult_PayeePubKeyErrorZPtr; /** - * A CResult_RoutingFeesDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::network_graph::RoutingFees on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_PayeePubKeyErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::PayeePubKey on success and a crate::c_types::Secp256k1Error on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_RoutingFeesDecodeErrorZ { +typedef struct LDKCResult_PayeePubKeyErrorZ { /** - * The contents of this CResult_RoutingFeesDecodeErrorZ, accessible via either + * The contents of this CResult_PayeePubKeyErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_RoutingFeesDecodeErrorZPtr contents; + union LDKCResult_PayeePubKeyErrorZPtr contents; /** - * Whether this CResult_RoutingFeesDecodeErrorZ represents a success state. + * Whether this CResult_PayeePubKeyErrorZ represents a success state. */ bool result_ok; -} LDKCResult_RoutingFeesDecodeErrorZ; +} LDKCResult_PayeePubKeyErrorZ; + -/** - * A 4-byte byte array. - */ -typedef struct LDKFourBytes { - /** - * The four bytes - */ - uint8_t data[4]; -} LDKFourBytes; /** - * A 16-byte byte array. + * Private routing information + * + * # Invariants + * The encoded route has to be <1024 5bit characters long (<=639 bytes or <=12 hops) + * */ -typedef struct LDKSixteenBytes { +typedef struct MUST_USE_STRUCT LDKRouteHint { /** - * The sixteen bytes + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - uint8_t data[16]; -} LDKSixteenBytes; - -/** - * A 10-byte byte array. - */ -typedef struct LDKTenBytes { + LDKnativeRouteHint *inner; /** - * The ten bytes + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uint8_t data[10]; -} LDKTenBytes; + bool is_owned; +} LDKRouteHint; /** - * An address which can be used to connect to a remote peer + * A dynamically-allocated array of crate::lightning_invoice::RouteHints of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef enum LDKNetAddress_Tag { - /** - * An IPv4 address/port on which the peer is listening. - */ - LDKNetAddress_IPv4, - /** - * An IPv6 address/port on which the peer is listening. - */ - LDKNetAddress_IPv6, - /** - * An old-style Tor onion address/port on which the peer is listening. - */ - LDKNetAddress_OnionV2, +typedef struct LDKCVec_RouteHintZ { /** - * A new-style Tor onion address/port on which the peer is listening. - * To create the human-readable \"hostname\", concatenate ed25519_pubkey, checksum, and version, - * wrap as base32 and append \".onion\". + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - LDKNetAddress_OnionV3, + struct LDKRouteHint *data; /** - * Must be last for serialization purposes + * The number of elements pointed to by `data`. */ - LDKNetAddress_Sentinel, -} LDKNetAddress_Tag; + uintptr_t datalen; +} LDKCVec_RouteHintZ; -typedef struct LDKNetAddress_LDKIPv4_Body { - /** - * The 4-byte IPv4 address - */ - struct LDKFourBytes addr; - /** - * The port on which the node is listening - */ - uint16_t port; -} LDKNetAddress_LDKIPv4_Body; -typedef struct LDKNetAddress_LDKIPv6_Body { - /** - * The 16-byte IPv6 address - */ - struct LDKSixteenBytes addr; - /** - * The port on which the node is listening - */ - uint16_t port; -} LDKNetAddress_LDKIPv6_Body; -typedef struct LDKNetAddress_LDKOnionV2_Body { +/** + * A timestamp that refers to a date after 1 January 1970 which means its representation as UNIX + * timestamp is positive. + * + * # Invariants + * The UNIX timestamp representing the stored time has to be positive and small enough so that + * a `EpiryTime` can be added to it without an overflow. + */ +typedef struct MUST_USE_STRUCT LDKPositiveTimestamp { /** - * The bytes (usually encoded in base32 with \".onion\" appended) + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKTenBytes addr; + LDKnativePositiveTimestamp *inner; /** - * The port on which the node is listening + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uint16_t port; -} LDKNetAddress_LDKOnionV2_Body; + bool is_owned; +} LDKPositiveTimestamp; -typedef struct LDKNetAddress_LDKOnionV3_Body { +/** + * The contents of CResult_PositiveTimestampCreationErrorZ + */ +typedef union LDKCResult_PositiveTimestampCreationErrorZPtr { /** - * The ed25519 long-term public key of the peer + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKThirtyTwoBytes ed25519_pubkey; + struct LDKPositiveTimestamp *result; /** - * The checksum of the pubkey and version, as included in the onion address + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uint16_t checksum; + enum LDKCreationError *err; +} LDKCResult_PositiveTimestampCreationErrorZPtr; + +/** + * A CResult_PositiveTimestampCreationErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::PositiveTimestamp on success and a crate::lightning_invoice::CreationError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_PositiveTimestampCreationErrorZ { /** - * The version byte, as defined by the Tor Onion v3 spec. + * The contents of this CResult_PositiveTimestampCreationErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - uint8_t version; + union LDKCResult_PositiveTimestampCreationErrorZPtr contents; /** - * The port on which the node is listening + * Whether this CResult_PositiveTimestampCreationErrorZ represents a success state. */ - uint16_t port; -} LDKNetAddress_LDKOnionV3_Body; - -typedef struct MUST_USE_STRUCT LDKNetAddress { - LDKNetAddress_Tag tag; - union { - LDKNetAddress_LDKIPv4_Body i_pv4; - LDKNetAddress_LDKIPv6_Body i_pv6; - LDKNetAddress_LDKOnionV2_Body onion_v2; - LDKNetAddress_LDKOnionV3_Body onion_v3; - }; -} LDKNetAddress; + bool result_ok; +} LDKCResult_PositiveTimestampCreationErrorZ; /** - * A dynamically-allocated array of crate::lightning::ln::msgs::NetAddresss of arbitrary size. - * This corresponds to std::vector in C++ + * The contents of CResult_NoneSemanticErrorZ */ -typedef struct LDKCVec_NetAddressZ { +typedef union LDKCResult_NoneSemanticErrorZPtr { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * Note that this value is always NULL, as there are no contents in the OK variant */ - struct LDKNetAddress *data; + void *result; /** - * The number of elements pointed to by `data`. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uintptr_t datalen; -} LDKCVec_NetAddressZ; - - + enum LDKSemanticError *err; +} LDKCResult_NoneSemanticErrorZPtr; /** - * Information received in the latest node_announcement from this node. + * A CResult_NoneSemanticErrorZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning_invoice::SemanticError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKNodeAnnouncementInfo { +typedef struct LDKCResult_NoneSemanticErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_NoneSemanticErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeNodeAnnouncementInfo *inner; + union LDKCResult_NoneSemanticErrorZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_NoneSemanticErrorZ represents a success state. */ - bool is_owned; -} LDKNodeAnnouncementInfo; + bool result_ok; +} LDKCResult_NoneSemanticErrorZ; /** - * The contents of CResult_NodeAnnouncementInfoDecodeErrorZ + * The contents of CResult_InvoiceSemanticErrorZ */ -typedef union LDKCResult_NodeAnnouncementInfoDecodeErrorZPtr { +typedef union LDKCResult_InvoiceSemanticErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKNodeAnnouncementInfo *result; + struct LDKInvoice *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_NodeAnnouncementInfoDecodeErrorZPtr; + enum LDKSemanticError *err; +} LDKCResult_InvoiceSemanticErrorZPtr; /** - * A CResult_NodeAnnouncementInfoDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::network_graph::NodeAnnouncementInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_InvoiceSemanticErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::Invoice on success and a crate::lightning_invoice::SemanticError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ { +typedef struct LDKCResult_InvoiceSemanticErrorZ { /** - * The contents of this CResult_NodeAnnouncementInfoDecodeErrorZ, accessible via either + * The contents of this CResult_InvoiceSemanticErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NodeAnnouncementInfoDecodeErrorZPtr contents; + union LDKCResult_InvoiceSemanticErrorZPtr contents; /** - * Whether this CResult_NodeAnnouncementInfoDecodeErrorZ represents a success state. + * Whether this CResult_InvoiceSemanticErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NodeAnnouncementInfoDecodeErrorZ; - -/** - * A dynamically-allocated array of u64s of arbitrary size. - * This corresponds to std::vector in C++ - */ -typedef struct LDKCVec_u64Z { - /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). - */ - uint64_t *data; - /** - * The number of elements pointed to by `data`. - */ - uintptr_t datalen; -} LDKCVec_u64Z; +} LDKCResult_InvoiceSemanticErrorZ; /** - * Details about a node in the network, known from the network announcement. + * Description string + * + * # Invariants + * The description can be at most 639 __bytes__ long */ -typedef struct MUST_USE_STRUCT LDKNodeInfo { +typedef struct MUST_USE_STRUCT LDKDescription { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeNodeInfo *inner; + LDKnativeDescription *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKNodeInfo; +} LDKDescription; /** - * The contents of CResult_NodeInfoDecodeErrorZ + * The contents of CResult_DescriptionCreationErrorZ */ -typedef union LDKCResult_NodeInfoDecodeErrorZPtr { +typedef union LDKCResult_DescriptionCreationErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKNodeInfo *result; + struct LDKDescription *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_NodeInfoDecodeErrorZPtr; + enum LDKCreationError *err; +} LDKCResult_DescriptionCreationErrorZPtr; /** - * A CResult_NodeInfoDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::network_graph::NodeInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_DescriptionCreationErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::Description on success and a crate::lightning_invoice::CreationError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NodeInfoDecodeErrorZ { +typedef struct LDKCResult_DescriptionCreationErrorZ { /** - * The contents of this CResult_NodeInfoDecodeErrorZ, accessible via either + * The contents of this CResult_DescriptionCreationErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NodeInfoDecodeErrorZPtr contents; + union LDKCResult_DescriptionCreationErrorZPtr contents; /** - * Whether this CResult_NodeInfoDecodeErrorZ represents a success state. + * Whether this CResult_DescriptionCreationErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NodeInfoDecodeErrorZ; +} LDKCResult_DescriptionCreationErrorZ; /** - * Represents the network as nodes and channels between them + * Positive duration that defines when (relatively to the timestamp) in the future the invoice + * expires + * + * # Invariants + * The number of seconds this expiry time represents has to be in the range + * `0...(SYSTEM_TIME_MAX_UNIX_TIMESTAMP - MAX_EXPIRY_TIME)` to avoid overflows when adding it to a + * timestamp */ -typedef struct MUST_USE_STRUCT LDKNetworkGraph { +typedef struct MUST_USE_STRUCT LDKExpiryTime { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeNetworkGraph *inner; + LDKnativeExpiryTime *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKNetworkGraph; +} LDKExpiryTime; /** - * The contents of CResult_NetworkGraphDecodeErrorZ + * The contents of CResult_ExpiryTimeCreationErrorZ */ -typedef union LDKCResult_NetworkGraphDecodeErrorZPtr { +typedef union LDKCResult_ExpiryTimeCreationErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKNetworkGraph *result; + struct LDKExpiryTime *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_NetworkGraphDecodeErrorZPtr; + enum LDKCreationError *err; +} LDKCResult_ExpiryTimeCreationErrorZPtr; /** - * A CResult_NetworkGraphDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::routing::network_graph::NetworkGraph on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_ExpiryTimeCreationErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::ExpiryTime on success and a crate::lightning_invoice::CreationError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NetworkGraphDecodeErrorZ { +typedef struct LDKCResult_ExpiryTimeCreationErrorZ { /** - * The contents of this CResult_NetworkGraphDecodeErrorZ, accessible via either + * The contents of this CResult_ExpiryTimeCreationErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NetworkGraphDecodeErrorZPtr contents; + union LDKCResult_ExpiryTimeCreationErrorZPtr contents; /** - * Whether this CResult_NetworkGraphDecodeErrorZ represents a success state. + * Whether this CResult_ExpiryTimeCreationErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NetworkGraphDecodeErrorZ; - +} LDKCResult_ExpiryTimeCreationErrorZ; +/** + * The contents of CResult_RouteHintCreationErrorZ + */ +typedef union LDKCResult_RouteHintCreationErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKRouteHint *result; + /** + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. + */ + enum LDKCreationError *err; +} LDKCResult_RouteHintCreationErrorZPtr; /** - * Features used within an `init` message. + * A CResult_RouteHintCreationErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::RouteHint on success and a crate::lightning_invoice::CreationError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKInitFeatures { +typedef struct LDKCResult_RouteHintCreationErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_RouteHintCreationErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeInitFeatures *inner; + union LDKCResult_RouteHintCreationErrorZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_RouteHintCreationErrorZ represents a success state. */ - bool is_owned; -} LDKInitFeatures; + bool result_ok; +} LDKCResult_RouteHintCreationErrorZ; /** - * The contents of CResult_InitFeaturesDecodeErrorZ + * The contents of CResult_StringErrorZ */ -typedef union LDKCResult_InitFeaturesDecodeErrorZPtr { +typedef union LDKCResult_StringErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKInitFeatures *result; + struct LDKStr *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_InitFeaturesDecodeErrorZPtr; + enum LDKSecp256k1Error *err; +} LDKCResult_StringErrorZPtr; /** - * A CResult_InitFeaturesDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::features::InitFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_StringErrorZ represents the result of a fallible operation, + * containing a crate::c_types::Str on success and a crate::c_types::Secp256k1Error on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_InitFeaturesDecodeErrorZ { +typedef struct LDKCResult_StringErrorZ { /** - * The contents of this CResult_InitFeaturesDecodeErrorZ, accessible via either + * The contents of this CResult_StringErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_InitFeaturesDecodeErrorZPtr contents; + union LDKCResult_StringErrorZPtr contents; /** - * Whether this CResult_InitFeaturesDecodeErrorZ represents a success state. + * Whether this CResult_StringErrorZ represents a success state. */ bool result_ok; -} LDKCResult_InitFeaturesDecodeErrorZ; - +} LDKCResult_StringErrorZ; +/** + * The contents of CResult_ChannelMonitorUpdateDecodeErrorZ + */ +typedef union LDKCResult_ChannelMonitorUpdateDecodeErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKChannelMonitorUpdate *result; + /** + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. + */ + struct LDKDecodeError *err; +} LDKCResult_ChannelMonitorUpdateDecodeErrorZPtr; /** - * Features used within a `node_announcement` message. + * A CResult_ChannelMonitorUpdateDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::channelmonitor::ChannelMonitorUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct MUST_USE_STRUCT LDKNodeFeatures { +typedef struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The contents of this CResult_ChannelMonitorUpdateDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKnativeNodeFeatures *inner; + union LDKCResult_ChannelMonitorUpdateDecodeErrorZPtr contents; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * Whether this CResult_ChannelMonitorUpdateDecodeErrorZ represents a success state. */ - bool is_owned; -} LDKNodeFeatures; + bool result_ok; +} LDKCResult_ChannelMonitorUpdateDecodeErrorZ; /** - * The contents of CResult_NodeFeaturesDecodeErrorZ + * The contents of CResult_HTLCUpdateDecodeErrorZ */ -typedef union LDKCResult_NodeFeaturesDecodeErrorZPtr { +typedef union LDKCResult_HTLCUpdateDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKNodeFeatures *result; + struct LDKHTLCUpdate *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_NodeFeaturesDecodeErrorZPtr; +} LDKCResult_HTLCUpdateDecodeErrorZPtr; /** - * A CResult_NodeFeaturesDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::features::NodeFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_HTLCUpdateDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::chain::channelmonitor::HTLCUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NodeFeaturesDecodeErrorZ { +typedef struct LDKCResult_HTLCUpdateDecodeErrorZ { /** - * The contents of this CResult_NodeFeaturesDecodeErrorZ, accessible via either + * The contents of this CResult_HTLCUpdateDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NodeFeaturesDecodeErrorZPtr contents; + union LDKCResult_HTLCUpdateDecodeErrorZPtr contents; /** - * Whether this CResult_NodeFeaturesDecodeErrorZ represents a success state. + * Whether this CResult_HTLCUpdateDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NodeFeaturesDecodeErrorZ; +} LDKCResult_HTLCUpdateDecodeErrorZ; /** - * Features used within a `channel_announcement` message. + * General Err type for ChannelMonitor actions. Generally, this implies that the data provided is + * inconsistent with the ChannelMonitor being called. eg for ChannelMonitor::update_monitor this + * means you tried to update a monitor for a different channel or the ChannelMonitorUpdate was + * corrupted. + * Contains a developer-readable error message. */ -typedef struct MUST_USE_STRUCT LDKChannelFeatures { +typedef struct MUST_USE_STRUCT LDKMonitorUpdateError { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeChannelFeatures *inner; + LDKnativeMonitorUpdateError *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKChannelFeatures; +} LDKMonitorUpdateError; /** - * The contents of CResult_ChannelFeaturesDecodeErrorZ + * The contents of CResult_NoneMonitorUpdateErrorZ */ -typedef union LDKCResult_ChannelFeaturesDecodeErrorZPtr { +typedef union LDKCResult_NoneMonitorUpdateErrorZPtr { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * Note that this value is always NULL, as there are no contents in the OK variant */ - struct LDKChannelFeatures *result; + void *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_ChannelFeaturesDecodeErrorZPtr; + struct LDKMonitorUpdateError *err; +} LDKCResult_NoneMonitorUpdateErrorZPtr; /** - * A CResult_ChannelFeaturesDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::features::ChannelFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NoneMonitorUpdateErrorZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning::chain::channelmonitor::MonitorUpdateError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_ChannelFeaturesDecodeErrorZ { +typedef struct LDKCResult_NoneMonitorUpdateErrorZ { /** - * The contents of this CResult_ChannelFeaturesDecodeErrorZ, accessible via either + * The contents of this CResult_NoneMonitorUpdateErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_ChannelFeaturesDecodeErrorZPtr contents; + union LDKCResult_NoneMonitorUpdateErrorZPtr contents; /** - * Whether this CResult_ChannelFeaturesDecodeErrorZ represents a success state. + * Whether this CResult_NoneMonitorUpdateErrorZ represents a success state. */ bool result_ok; -} LDKCResult_ChannelFeaturesDecodeErrorZ; - - +} LDKCResult_NoneMonitorUpdateErrorZ; /** - * Features used within an invoice. + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef struct MUST_USE_STRUCT LDKInvoiceFeatures { +typedef struct LDKC2Tuple_OutPointScriptZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The element at position 0 */ - LDKnativeInvoiceFeatures *inner; + struct LDKOutPoint a; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The element at position 1 */ - bool is_owned; -} LDKInvoiceFeatures; + struct LDKCVec_u8Z b; +} LDKC2Tuple_OutPointScriptZ; /** - * The contents of CResult_InvoiceFeaturesDecodeErrorZ + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef union LDKCResult_InvoiceFeaturesDecodeErrorZPtr { +typedef struct LDKC2Tuple_u32ScriptZ { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The element at position 0 */ - struct LDKInvoiceFeatures *result; + uint32_t a; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The element at position 1 */ - struct LDKDecodeError *err; -} LDKCResult_InvoiceFeaturesDecodeErrorZPtr; + struct LDKCVec_u8Z b; +} LDKC2Tuple_u32ScriptZ; /** - * A CResult_InvoiceFeaturesDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::features::InvoiceFeatures on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32ScriptZs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKCResult_InvoiceFeaturesDecodeErrorZ { +typedef struct LDKCVec_C2Tuple_u32ScriptZZ { /** - * The contents of this CResult_InvoiceFeaturesDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - union LDKCResult_InvoiceFeaturesDecodeErrorZPtr contents; + struct LDKC2Tuple_u32ScriptZ *data; /** - * Whether this CResult_InvoiceFeaturesDecodeErrorZ represents a success state. + * The number of elements pointed to by `data`. */ - bool result_ok; -} LDKCResult_InvoiceFeaturesDecodeErrorZ; + uintptr_t datalen; +} LDKCVec_C2Tuple_u32ScriptZZ; /** - * The contents of CResult_NetAddressu8Z + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef union LDKCResult_NetAddressu8ZPtr { +typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The element at position 0 */ - struct LDKNetAddress *result; + struct LDKThirtyTwoBytes a; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The element at position 1 */ - uint8_t *err; -} LDKCResult_NetAddressu8ZPtr; + struct LDKCVec_C2Tuple_u32ScriptZZ b; +} LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ; /** - * A CResult_NetAddressu8Z represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::NetAddress on success and a u8 on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A dynamically-allocated array of crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKCResult_NetAddressu8Z { +typedef struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ { /** - * The contents of this CResult_NetAddressu8Z, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - union LDKCResult_NetAddressu8ZPtr contents; + struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *data; /** - * Whether this CResult_NetAddressu8Z represents a success state. + * The number of elements pointed to by `data`. */ - bool result_ok; -} LDKCResult_NetAddressu8Z; + uintptr_t datalen; +} LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ; /** - * The contents of CResult_CResult_NetAddressu8ZDecodeErrorZ + * An Event which you should probably take some action in response to. + * + * Note that while Writeable and Readable are implemented for Event, you probably shouldn't use + * them directly as they don't round-trip exactly (for example FundingGenerationReady is never + * written as it makes no sense to respond to it after reconnecting to peers). */ -typedef union LDKCResult_CResult_NetAddressu8ZDecodeErrorZPtr { +typedef enum LDKEvent_Tag { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * Used to indicate that the client should generate a funding transaction with the given + * parameters and then call ChannelManager::funding_transaction_generated. + * Generated in ChannelManager message handling. + * Note that *all inputs* in the funding transaction must spend SegWit outputs or your + * counterparty can steal your funds! */ - struct LDKCResult_NetAddressu8Z *result; + LDKEvent_FundingGenerationReady, /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates we've received money! Just gotta dig out that payment preimage and feed it to + * ChannelManager::claim_funds to get it.... + * Note that if the preimage is not known or the amount paid is incorrect, you should call + * ChannelManager::fail_htlc_backwards to free up resources for this HTLC and avoid + * network congestion. + * The amount paid should be considered 'incorrect' when it is less than or more than twice + * the amount expected. + * If you fail to call either ChannelManager::claim_funds or + * ChannelManager::fail_htlc_backwards within the HTLC's timeout, the HTLC will be + * automatically failed. + */ + LDKEvent_PaymentReceived, + /** + * Indicates an outbound payment we made succeeded (ie it made it all the way to its target + * and we got back the payment preimage for it). + */ + LDKEvent_PaymentSent, + /** + * Indicates an outbound payment we made failed. Probably some intermediary node dropped + * something. You may wish to retry with a different route. + */ + LDKEvent_PaymentFailed, + /** + * Used to indicate that ChannelManager::process_pending_htlc_forwards should be called at a + * time in the future. + */ + LDKEvent_PendingHTLCsForwardable, + /** + * Used to indicate that an output was generated on-chain which you should know how to spend. + * Such an output will *not* ever be spent by rust-lightning, and are not at risk of your + * counterparty spending them due to some kind of timeout. Thus, you need to store them + * somewhere and spend them when you create on-chain transactions. + */ + LDKEvent_SpendableOutputs, + /** + * Must be last for serialization purposes + */ + LDKEvent_Sentinel, +} LDKEvent_Tag; + +typedef struct LDKEvent_LDKFundingGenerationReady_Body { + /** + * The random channel_id we picked which you'll need to pass into + * ChannelManager::funding_transaction_generated. + */ + struct LDKThirtyTwoBytes temporary_channel_id; + /** + * The value, in satoshis, that the output should have. + */ + uint64_t channel_value_satoshis; + /** + * The script which should be used in the transaction output. + */ + struct LDKCVec_u8Z output_script; + /** + * The value passed in to ChannelManager::create_channel + */ + uint64_t user_channel_id; +} LDKEvent_LDKFundingGenerationReady_Body; + +typedef struct LDKEvent_LDKPaymentReceived_Body { + /** + * The hash for which the preimage should be handed to the ChannelManager. + */ + struct LDKThirtyTwoBytes payment_hash; + /** + * The preimage to the payment_hash, if the payment hash (and secret) were fetched via + * [`ChannelManager::create_inbound_payment`]. If provided, this can be handed directly to + * [`ChannelManager::claim_funds`]. + * + * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment + * [`ChannelManager::claim_funds`]: crate::ln::channelmanager::ChannelManager::claim_funds + */ + struct LDKThirtyTwoBytes payment_preimage; + /** + * The \"payment secret\". This authenticates the sender to the recipient, preventing a + * number of deanonymization attacks during the routing process. + * It is provided here for your reference, however its accuracy is enforced directly by + * [`ChannelManager`] using the values you previously provided to + * [`ChannelManager::create_inbound_payment`] or + * [`ChannelManager::create_inbound_payment_for_hash`]. + * + * [`ChannelManager`]: crate::ln::channelmanager::ChannelManager + * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment + * [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash + */ + struct LDKThirtyTwoBytes payment_secret; + /** + * The value, in thousandths of a satoshi, that this payment is for. Note that you must + * compare this to the expected value before accepting the payment (as otherwise you are + * providing proof-of-payment for less than the value you expected!). + */ + uint64_t amt; + /** + * This is the `user_payment_id` which was provided to + * [`ChannelManager::create_inbound_payment_for_hash`] or + * [`ChannelManager::create_inbound_payment`]. It has no meaning inside of LDK and is + * simply copied here. It may be used to correlate PaymentReceived events with invoice + * metadata stored elsewhere. + * + * [`ChannelManager::create_inbound_payment`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment + * [`ChannelManager::create_inbound_payment_for_hash`]: crate::ln::channelmanager::ChannelManager::create_inbound_payment_for_hash + */ + uint64_t user_payment_id; +} LDKEvent_LDKPaymentReceived_Body; + +typedef struct LDKEvent_LDKPaymentSent_Body { + /** + * The preimage to the hash given to ChannelManager::send_payment. + * Note that this serves as a payment receipt, if you wish to have such a thing, you must + * store it somehow! */ - struct LDKDecodeError *err; -} LDKCResult_CResult_NetAddressu8ZDecodeErrorZPtr; + struct LDKThirtyTwoBytes payment_preimage; +} LDKEvent_LDKPaymentSent_Body; -/** - * A CResult_CResult_NetAddressu8ZDecodeErrorZ represents the result of a fallible operation, - * containing a crate::c_types::derived::CResult_NetAddressu8Z on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ { +typedef struct LDKEvent_LDKPaymentFailed_Body { /** - * The contents of this CResult_CResult_NetAddressu8ZDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The hash which was given to ChannelManager::send_payment. */ - union LDKCResult_CResult_NetAddressu8ZDecodeErrorZPtr contents; + struct LDKThirtyTwoBytes payment_hash; /** - * Whether this CResult_CResult_NetAddressu8ZDecodeErrorZ represents a success state. + * Indicates the payment was rejected for some reason by the recipient. This implies that + * the payment has failed, not just the route in question. If this is not set, you may + * retry the payment via a different route. */ - bool result_ok; -} LDKCResult_CResult_NetAddressu8ZDecodeErrorZ; - - + bool rejected_by_dest; +} LDKEvent_LDKPaymentFailed_Body; -/** - * An update_add_htlc message to be sent or received from a peer - */ -typedef struct MUST_USE_STRUCT LDKUpdateAddHTLC { +typedef struct LDKEvent_LDKPendingHTLCsForwardable_Body { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The minimum amount of time that should be waited prior to calling + * process_pending_htlc_forwards. To increase the effort required to correlate payments, + * you should wait a random amount of time in roughly the range (now + time_forwardable, + * now + 5*time_forwardable). */ - LDKnativeUpdateAddHTLC *inner; + uint64_t time_forwardable; +} LDKEvent_LDKPendingHTLCsForwardable_Body; + +typedef struct LDKEvent_LDKSpendableOutputs_Body { /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The outputs which you should store as spendable by you. */ - bool is_owned; -} LDKUpdateAddHTLC; + struct LDKCVec_SpendableOutputDescriptorZ outputs; +} LDKEvent_LDKSpendableOutputs_Body; + +typedef struct MUST_USE_STRUCT LDKEvent { + LDKEvent_Tag tag; + union { + LDKEvent_LDKFundingGenerationReady_Body funding_generation_ready; + LDKEvent_LDKPaymentReceived_Body payment_received; + LDKEvent_LDKPaymentSent_Body payment_sent; + LDKEvent_LDKPaymentFailed_Body payment_failed; + LDKEvent_LDKPendingHTLCsForwardable_Body pending_htl_cs_forwardable; + LDKEvent_LDKSpendableOutputs_Body spendable_outputs; + }; +} LDKEvent; /** - * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateAddHTLCs of arbitrary size. + * A dynamically-allocated array of crate::lightning::util::events::Events of arbitrary size. * This corresponds to std::vector in C++ */ -typedef struct LDKCVec_UpdateAddHTLCZ { +typedef struct LDKCVec_EventZ { /** * The elements in the array. * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKUpdateAddHTLC *data; + struct LDKEvent *data; /** * The number of elements pointed to by `data`. */ uintptr_t datalen; -} LDKCVec_UpdateAddHTLCZ; - - - -/** - * An update_fulfill_htlc message to be sent or received from a peer - */ -typedef struct MUST_USE_STRUCT LDKUpdateFulfillHTLC { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativeUpdateFulfillHTLC *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKUpdateFulfillHTLC; +} LDKCVec_EventZ; /** - * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFulfillHTLCs of arbitrary size. + * A dynamically-allocated array of crate::c_types::Transactions of arbitrary size. * This corresponds to std::vector in C++ */ -typedef struct LDKCVec_UpdateFulfillHTLCZ { +typedef struct LDKCVec_TransactionZ { /** * The elements in the array. * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKUpdateFulfillHTLC *data; + struct LDKTransaction *data; /** * The number of elements pointed to by `data`. */ uintptr_t datalen; -} LDKCVec_UpdateFulfillHTLCZ; - - +} LDKCVec_TransactionZ; /** - * An update_fail_htlc message to be sent or received from a peer + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef struct MUST_USE_STRUCT LDKUpdateFailHTLC { +typedef struct LDKC2Tuple_u32TxOutZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The element at position 0 */ - LDKnativeUpdateFailHTLC *inner; + uint32_t a; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The element at position 1 */ - bool is_owned; -} LDKUpdateFailHTLC; + struct LDKTxOut b; +} LDKC2Tuple_u32TxOutZ; /** - * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFailHTLCs of arbitrary size. + * A dynamically-allocated array of crate::c_types::derived::C2Tuple_u32TxOutZs of arbitrary size. * This corresponds to std::vector in C++ */ -typedef struct LDKCVec_UpdateFailHTLCZ { +typedef struct LDKCVec_C2Tuple_u32TxOutZZ { /** * The elements in the array. * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKUpdateFailHTLC *data; + struct LDKC2Tuple_u32TxOutZ *data; /** * The number of elements pointed to by `data`. */ uintptr_t datalen; -} LDKCVec_UpdateFailHTLCZ; - - +} LDKCVec_C2Tuple_u32TxOutZZ; /** - * An update_fail_malformed_htlc message to be sent or received from a peer + * A tuple of 2 elements. See the individual fields for the types contained. */ -typedef struct MUST_USE_STRUCT LDKUpdateFailMalformedHTLC { +typedef struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ { /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. + * The element at position 0 */ - LDKnativeUpdateFailMalformedHTLC *inner; + struct LDKThirtyTwoBytes a; /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. + * The element at position 1 */ - bool is_owned; -} LDKUpdateFailMalformedHTLC; + struct LDKCVec_C2Tuple_u32TxOutZZ b; +} LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ; /** - * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFailMalformedHTLCs of arbitrary size. + * A dynamically-allocated array of crate::c_types::derived::C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZs of arbitrary size. * This corresponds to std::vector in C++ */ -typedef struct LDKCVec_UpdateFailMalformedHTLCZ { +typedef struct LDKCVec_TransactionOutputsZ { /** * The elements in the array. * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKUpdateFailMalformedHTLC *data; + struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *data; /** * The number of elements pointed to by `data`. */ uintptr_t datalen; -} LDKCVec_UpdateFailMalformedHTLCZ; +} LDKCVec_TransactionOutputsZ; /** - * The contents of CResult_AcceptChannelDecodeErrorZ + * The contents of CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ */ -typedef union LDKCResult_AcceptChannelDecodeErrorZPtr { +typedef union LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKAcceptChannel *result; + struct LDKC2Tuple_BlockHashChannelMonitorZ *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_AcceptChannelDecodeErrorZPtr; +} LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr; /** - * A CResult_AcceptChannelDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::AcceptChannel on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ represents the result of a fallible operation, + * containing a crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZ on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_AcceptChannelDecodeErrorZ { +typedef struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ { /** - * The contents of this CResult_AcceptChannelDecodeErrorZ, accessible via either + * The contents of this CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_AcceptChannelDecodeErrorZPtr contents; + union LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZPtr contents; /** - * Whether this CResult_AcceptChannelDecodeErrorZ represents a success state. + * Whether this CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_AcceptChannelDecodeErrorZ; +} LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ; /** - * The contents of CResult_AnnouncementSignaturesDecodeErrorZ + * The contents of CResult_boolLightningErrorZ */ -typedef union LDKCResult_AnnouncementSignaturesDecodeErrorZPtr { +typedef union LDKCResult_boolLightningErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKAnnouncementSignatures *result; + bool *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_AnnouncementSignaturesDecodeErrorZPtr; + struct LDKLightningError *err; +} LDKCResult_boolLightningErrorZPtr; /** - * A CResult_AnnouncementSignaturesDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::AnnouncementSignatures on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_boolLightningErrorZ represents the result of a fallible operation, + * containing a bool on success and a crate::lightning::ln::msgs::LightningError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_AnnouncementSignaturesDecodeErrorZ { +typedef struct LDKCResult_boolLightningErrorZ { /** - * The contents of this CResult_AnnouncementSignaturesDecodeErrorZ, accessible via either + * The contents of this CResult_boolLightningErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_AnnouncementSignaturesDecodeErrorZPtr contents; + union LDKCResult_boolLightningErrorZPtr contents; /** - * Whether this CResult_AnnouncementSignaturesDecodeErrorZ represents a success state. + * Whether this CResult_boolLightningErrorZ represents a success state. */ bool result_ok; -} LDKCResult_AnnouncementSignaturesDecodeErrorZ; +} LDKCResult_boolLightningErrorZ; /** - * The contents of CResult_ChannelReestablishDecodeErrorZ + * A tuple of 3 elements. See the individual fields for the types contained. */ -typedef union LDKCResult_ChannelReestablishDecodeErrorZPtr { +typedef struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The element at position 0 */ - struct LDKChannelReestablish *result; + struct LDKChannelAnnouncement a; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The element at position 1 */ - struct LDKDecodeError *err; -} LDKCResult_ChannelReestablishDecodeErrorZPtr; + struct LDKChannelUpdate b; + /** + * The element at position 2 + */ + struct LDKChannelUpdate c; +} LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ; /** - * A CResult_ChannelReestablishDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ChannelReestablish on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A dynamically-allocated array of crate::c_types::derived::C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKCResult_ChannelReestablishDecodeErrorZ { +typedef struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ { /** - * The contents of this CResult_ChannelReestablishDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - union LDKCResult_ChannelReestablishDecodeErrorZPtr contents; + struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *data; /** - * Whether this CResult_ChannelReestablishDecodeErrorZ represents a success state. + * The number of elements pointed to by `data`. */ - bool result_ok; -} LDKCResult_ChannelReestablishDecodeErrorZ; + uintptr_t datalen; +} LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ; + +/** + * A dynamically-allocated array of crate::lightning::ln::msgs::NodeAnnouncements of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_NodeAnnouncementZ { + /** + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + */ + struct LDKNodeAnnouncement *data; + /** + * The number of elements pointed to by `data`. + */ + uintptr_t datalen; +} LDKCVec_NodeAnnouncementZ; /** - * The contents of CResult_ClosingSignedDecodeErrorZ + * The contents of CResult_NoneLightningErrorZ */ -typedef union LDKCResult_ClosingSignedDecodeErrorZPtr { +typedef union LDKCResult_NoneLightningErrorZPtr { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * Note that this value is always NULL, as there are no contents in the OK variant */ - struct LDKClosingSigned *result; + void *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_ClosingSignedDecodeErrorZPtr; + struct LDKLightningError *err; +} LDKCResult_NoneLightningErrorZPtr; /** - * A CResult_ClosingSignedDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ClosingSigned on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NoneLightningErrorZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning::ln::msgs::LightningError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_ClosingSignedDecodeErrorZ { +typedef struct LDKCResult_NoneLightningErrorZ { /** - * The contents of this CResult_ClosingSignedDecodeErrorZ, accessible via either + * The contents of this CResult_NoneLightningErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_ClosingSignedDecodeErrorZPtr contents; + union LDKCResult_NoneLightningErrorZPtr contents; /** - * Whether this CResult_ClosingSignedDecodeErrorZ represents a success state. + * Whether this CResult_NoneLightningErrorZ represents a success state. */ bool result_ok; -} LDKCResult_ClosingSignedDecodeErrorZ; +} LDKCResult_NoneLightningErrorZ; + +/** + * A dynamically-allocated array of crate::c_types::PublicKeys of arbitrary size. + * This corresponds to std::vector in C++ + */ +typedef struct LDKCVec_PublicKeyZ { + /** + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + */ + struct LDKPublicKey *data; + /** + * The number of elements pointed to by `data`. + */ + uintptr_t datalen; +} LDKCVec_PublicKeyZ; /** - * A commitment_signed message to be sent or received from a peer + * Error for PeerManager errors. If you get one of these, you must disconnect the socket and + * generate no further read_event/write_buffer_space_avail/socket_disconnected calls for the + * descriptor. */ -typedef struct MUST_USE_STRUCT LDKCommitmentSigned { +typedef struct MUST_USE_STRUCT LDKPeerHandleError { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeCommitmentSigned *inner; + LDKnativePeerHandleError *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKCommitmentSigned; - -/** - * The contents of CResult_CommitmentSignedDecodeErrorZ - */ -typedef union LDKCResult_CommitmentSignedDecodeErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKCommitmentSigned *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKDecodeError *err; -} LDKCResult_CommitmentSignedDecodeErrorZPtr; - -/** - * A CResult_CommitmentSignedDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::CommitmentSigned on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_CommitmentSignedDecodeErrorZ { - /** - * The contents of this CResult_CommitmentSignedDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_CommitmentSignedDecodeErrorZPtr contents; - /** - * Whether this CResult_CommitmentSignedDecodeErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_CommitmentSignedDecodeErrorZ; +} LDKPeerHandleError; /** - * The contents of CResult_FundingCreatedDecodeErrorZ + * The contents of CResult_CVec_u8ZPeerHandleErrorZ */ -typedef union LDKCResult_FundingCreatedDecodeErrorZPtr { +typedef union LDKCResult_CVec_u8ZPeerHandleErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKFundingCreated *result; + struct LDKCVec_u8Z *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_FundingCreatedDecodeErrorZPtr; + struct LDKPeerHandleError *err; +} LDKCResult_CVec_u8ZPeerHandleErrorZPtr; /** - * A CResult_FundingCreatedDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::FundingCreated on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_CVec_u8ZPeerHandleErrorZ represents the result of a fallible operation, + * containing a crate::c_types::derived::CVec_u8Z on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_FundingCreatedDecodeErrorZ { +typedef struct LDKCResult_CVec_u8ZPeerHandleErrorZ { /** - * The contents of this CResult_FundingCreatedDecodeErrorZ, accessible via either + * The contents of this CResult_CVec_u8ZPeerHandleErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_FundingCreatedDecodeErrorZPtr contents; + union LDKCResult_CVec_u8ZPeerHandleErrorZPtr contents; /** - * Whether this CResult_FundingCreatedDecodeErrorZ represents a success state. + * Whether this CResult_CVec_u8ZPeerHandleErrorZ represents a success state. */ bool result_ok; -} LDKCResult_FundingCreatedDecodeErrorZ; +} LDKCResult_CVec_u8ZPeerHandleErrorZ; /** - * The contents of CResult_FundingSignedDecodeErrorZ + * The contents of CResult_NonePeerHandleErrorZ */ -typedef union LDKCResult_FundingSignedDecodeErrorZPtr { +typedef union LDKCResult_NonePeerHandleErrorZPtr { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * Note that this value is always NULL, as there are no contents in the OK variant */ - struct LDKFundingSigned *result; + void *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_FundingSignedDecodeErrorZPtr; + struct LDKPeerHandleError *err; +} LDKCResult_NonePeerHandleErrorZPtr; /** - * A CResult_FundingSignedDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::FundingSigned on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NonePeerHandleErrorZ represents the result of a fallible operation, + * containing a () on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_FundingSignedDecodeErrorZ { +typedef struct LDKCResult_NonePeerHandleErrorZ { /** - * The contents of this CResult_FundingSignedDecodeErrorZ, accessible via either + * The contents of this CResult_NonePeerHandleErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_FundingSignedDecodeErrorZPtr contents; + union LDKCResult_NonePeerHandleErrorZPtr contents; /** - * Whether this CResult_FundingSignedDecodeErrorZ represents a success state. + * Whether this CResult_NonePeerHandleErrorZ represents a success state. */ bool result_ok; -} LDKCResult_FundingSignedDecodeErrorZ; +} LDKCResult_NonePeerHandleErrorZ; /** - * The contents of CResult_FundingLockedDecodeErrorZ + * The contents of CResult_boolPeerHandleErrorZ */ -typedef union LDKCResult_FundingLockedDecodeErrorZPtr { +typedef union LDKCResult_boolPeerHandleErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKFundingLocked *result; + bool *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_FundingLockedDecodeErrorZPtr; + struct LDKPeerHandleError *err; +} LDKCResult_boolPeerHandleErrorZPtr; /** - * A CResult_FundingLockedDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::FundingLocked on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_boolPeerHandleErrorZ represents the result of a fallible operation, + * containing a bool on success and a crate::lightning::ln::peer_handler::PeerHandleError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_FundingLockedDecodeErrorZ { +typedef struct LDKCResult_boolPeerHandleErrorZ { /** - * The contents of this CResult_FundingLockedDecodeErrorZ, accessible via either + * The contents of this CResult_boolPeerHandleErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_FundingLockedDecodeErrorZPtr contents; + union LDKCResult_boolPeerHandleErrorZPtr contents; /** - * Whether this CResult_FundingLockedDecodeErrorZ represents a success state. + * Whether this CResult_boolPeerHandleErrorZ represents a success state. */ bool result_ok; -} LDKCResult_FundingLockedDecodeErrorZ; +} LDKCResult_boolPeerHandleErrorZ; /** - * An init message to be sent or received from a peer + * Details about one direction of a channel. Received + * within a channel update. */ -typedef struct MUST_USE_STRUCT LDKInit { +typedef struct MUST_USE_STRUCT LDKDirectionalChannelInfo { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeInit *inner; + LDKnativeDirectionalChannelInfo *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKInit; +} LDKDirectionalChannelInfo; /** - * The contents of CResult_InitDecodeErrorZ + * The contents of CResult_DirectionalChannelInfoDecodeErrorZ */ -typedef union LDKCResult_InitDecodeErrorZPtr { +typedef union LDKCResult_DirectionalChannelInfoDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKInit *result; + struct LDKDirectionalChannelInfo *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_InitDecodeErrorZPtr; +} LDKCResult_DirectionalChannelInfoDecodeErrorZPtr; /** - * A CResult_InitDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::Init on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_DirectionalChannelInfoDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::network_graph::DirectionalChannelInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_InitDecodeErrorZ { +typedef struct LDKCResult_DirectionalChannelInfoDecodeErrorZ { /** - * The contents of this CResult_InitDecodeErrorZ, accessible via either + * The contents of this CResult_DirectionalChannelInfoDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_InitDecodeErrorZPtr contents; + union LDKCResult_DirectionalChannelInfoDecodeErrorZPtr contents; /** - * Whether this CResult_InitDecodeErrorZ represents a success state. + * Whether this CResult_DirectionalChannelInfoDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_InitDecodeErrorZ; - -/** - * The contents of CResult_OpenChannelDecodeErrorZ - */ -typedef union LDKCResult_OpenChannelDecodeErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKOpenChannel *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKDecodeError *err; -} LDKCResult_OpenChannelDecodeErrorZPtr; +} LDKCResult_DirectionalChannelInfoDecodeErrorZ; -/** - * A CResult_OpenChannelDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::OpenChannel on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_OpenChannelDecodeErrorZ { - /** - * The contents of this CResult_OpenChannelDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_OpenChannelDecodeErrorZPtr contents; - /** - * Whether this CResult_OpenChannelDecodeErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_OpenChannelDecodeErrorZ; -/** - * The contents of CResult_RevokeAndACKDecodeErrorZ - */ -typedef union LDKCResult_RevokeAndACKDecodeErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKRevokeAndACK *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKDecodeError *err; -} LDKCResult_RevokeAndACKDecodeErrorZPtr; /** - * A CResult_RevokeAndACKDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::RevokeAndACK on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * Details about a channel (both directions). + * Received within a channel announcement. */ -typedef struct LDKCResult_RevokeAndACKDecodeErrorZ { +typedef struct MUST_USE_STRUCT LDKChannelInfo { /** - * The contents of this CResult_RevokeAndACKDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_RevokeAndACKDecodeErrorZPtr contents; + LDKnativeChannelInfo *inner; /** - * Whether this CResult_RevokeAndACKDecodeErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_RevokeAndACKDecodeErrorZ; + bool is_owned; +} LDKChannelInfo; /** - * The contents of CResult_ShutdownDecodeErrorZ + * The contents of CResult_ChannelInfoDecodeErrorZ */ -typedef union LDKCResult_ShutdownDecodeErrorZPtr { +typedef union LDKCResult_ChannelInfoDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKShutdown *result; + struct LDKChannelInfo *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_ShutdownDecodeErrorZPtr; +} LDKCResult_ChannelInfoDecodeErrorZPtr; /** - * A CResult_ShutdownDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::Shutdown on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_ChannelInfoDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::network_graph::ChannelInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_ShutdownDecodeErrorZ { +typedef struct LDKCResult_ChannelInfoDecodeErrorZ { /** - * The contents of this CResult_ShutdownDecodeErrorZ, accessible via either + * The contents of this CResult_ChannelInfoDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_ShutdownDecodeErrorZPtr contents; + union LDKCResult_ChannelInfoDecodeErrorZPtr contents; /** - * Whether this CResult_ShutdownDecodeErrorZ represents a success state. + * Whether this CResult_ChannelInfoDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_ShutdownDecodeErrorZ; +} LDKCResult_ChannelInfoDecodeErrorZ; + -/** - * The contents of CResult_UpdateFailHTLCDecodeErrorZ - */ -typedef union LDKCResult_UpdateFailHTLCDecodeErrorZPtr { - /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. - */ - struct LDKUpdateFailHTLC *result; - /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. - */ - struct LDKDecodeError *err; -} LDKCResult_UpdateFailHTLCDecodeErrorZPtr; /** - * A CResult_UpdateFailHTLCDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UpdateFailHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * Fees for routing via a given channel or a node */ -typedef struct LDKCResult_UpdateFailHTLCDecodeErrorZ { +typedef struct MUST_USE_STRUCT LDKRoutingFees { /** - * The contents of this CResult_UpdateFailHTLCDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_UpdateFailHTLCDecodeErrorZPtr contents; + LDKnativeRoutingFees *inner; /** - * Whether this CResult_UpdateFailHTLCDecodeErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_UpdateFailHTLCDecodeErrorZ; + bool is_owned; +} LDKRoutingFees; /** - * The contents of CResult_UpdateFailMalformedHTLCDecodeErrorZ + * The contents of CResult_RoutingFeesDecodeErrorZ */ -typedef union LDKCResult_UpdateFailMalformedHTLCDecodeErrorZPtr { +typedef union LDKCResult_RoutingFeesDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKUpdateFailMalformedHTLC *result; + struct LDKRoutingFees *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_UpdateFailMalformedHTLCDecodeErrorZPtr; +} LDKCResult_RoutingFeesDecodeErrorZPtr; /** - * A CResult_UpdateFailMalformedHTLCDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UpdateFailMalformedHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_RoutingFeesDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::network_graph::RoutingFees on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ { +typedef struct LDKCResult_RoutingFeesDecodeErrorZ { /** - * The contents of this CResult_UpdateFailMalformedHTLCDecodeErrorZ, accessible via either + * The contents of this CResult_RoutingFeesDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_UpdateFailMalformedHTLCDecodeErrorZPtr contents; + union LDKCResult_RoutingFeesDecodeErrorZPtr contents; /** - * Whether this CResult_UpdateFailMalformedHTLCDecodeErrorZ represents a success state. + * Whether this CResult_RoutingFeesDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ; +} LDKCResult_RoutingFeesDecodeErrorZ; /** - * An update_fee message to be sent or received from a peer + * Information received in the latest node_announcement from this node. */ -typedef struct MUST_USE_STRUCT LDKUpdateFee { +typedef struct MUST_USE_STRUCT LDKNodeAnnouncementInfo { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeUpdateFee *inner; + LDKnativeNodeAnnouncementInfo *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKUpdateFee; +} LDKNodeAnnouncementInfo; /** - * The contents of CResult_UpdateFeeDecodeErrorZ + * The contents of CResult_NodeAnnouncementInfoDecodeErrorZ */ -typedef union LDKCResult_UpdateFeeDecodeErrorZPtr { +typedef union LDKCResult_NodeAnnouncementInfoDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKUpdateFee *result; + struct LDKNodeAnnouncementInfo *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_UpdateFeeDecodeErrorZPtr; +} LDKCResult_NodeAnnouncementInfoDecodeErrorZPtr; /** - * A CResult_UpdateFeeDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UpdateFee on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NodeAnnouncementInfoDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::network_graph::NodeAnnouncementInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_UpdateFeeDecodeErrorZ { +typedef struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ { /** - * The contents of this CResult_UpdateFeeDecodeErrorZ, accessible via either + * The contents of this CResult_NodeAnnouncementInfoDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_UpdateFeeDecodeErrorZPtr contents; + union LDKCResult_NodeAnnouncementInfoDecodeErrorZPtr contents; /** - * Whether this CResult_UpdateFeeDecodeErrorZ represents a success state. + * Whether this CResult_NodeAnnouncementInfoDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_UpdateFeeDecodeErrorZ; +} LDKCResult_NodeAnnouncementInfoDecodeErrorZ; /** - * The contents of CResult_UpdateFulfillHTLCDecodeErrorZ + * A dynamically-allocated array of u64s of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef union LDKCResult_UpdateFulfillHTLCDecodeErrorZPtr { +typedef struct LDKCVec_u64Z { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKUpdateFulfillHTLC *result; + uint64_t *data; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The number of elements pointed to by `data`. */ - struct LDKDecodeError *err; -} LDKCResult_UpdateFulfillHTLCDecodeErrorZPtr; + uintptr_t datalen; +} LDKCVec_u64Z; + + /** - * A CResult_UpdateFulfillHTLCDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UpdateFulfillHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * Details about a node in the network, known from the network announcement. */ -typedef struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ { +typedef struct MUST_USE_STRUCT LDKNodeInfo { /** - * The contents of this CResult_UpdateFulfillHTLCDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - union LDKCResult_UpdateFulfillHTLCDecodeErrorZPtr contents; + LDKnativeNodeInfo *inner; /** - * Whether this CResult_UpdateFulfillHTLCDecodeErrorZ represents a success state. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - bool result_ok; -} LDKCResult_UpdateFulfillHTLCDecodeErrorZ; + bool is_owned; +} LDKNodeInfo; /** - * The contents of CResult_UpdateAddHTLCDecodeErrorZ + * The contents of CResult_NodeInfoDecodeErrorZ */ -typedef union LDKCResult_UpdateAddHTLCDecodeErrorZPtr { +typedef union LDKCResult_NodeInfoDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKUpdateAddHTLC *result; + struct LDKNodeInfo *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_UpdateAddHTLCDecodeErrorZPtr; +} LDKCResult_NodeInfoDecodeErrorZPtr; /** - * A CResult_UpdateAddHTLCDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UpdateAddHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NodeInfoDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::network_graph::NodeInfo on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_UpdateAddHTLCDecodeErrorZ { +typedef struct LDKCResult_NodeInfoDecodeErrorZ { /** - * The contents of this CResult_UpdateAddHTLCDecodeErrorZ, accessible via either + * The contents of this CResult_NodeInfoDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_UpdateAddHTLCDecodeErrorZPtr contents; + union LDKCResult_NodeInfoDecodeErrorZPtr contents; /** - * Whether this CResult_UpdateAddHTLCDecodeErrorZ represents a success state. + * Whether this CResult_NodeInfoDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_UpdateAddHTLCDecodeErrorZ; +} LDKCResult_NodeInfoDecodeErrorZ; /** - * A ping message to be sent or received from a peer + * Represents the network as nodes and channels between them */ -typedef struct MUST_USE_STRUCT LDKPing { +typedef struct MUST_USE_STRUCT LDKNetworkGraph { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativePing *inner; + LDKnativeNetworkGraph *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKPing; +} LDKNetworkGraph; /** - * The contents of CResult_PingDecodeErrorZ + * The contents of CResult_NetworkGraphDecodeErrorZ */ -typedef union LDKCResult_PingDecodeErrorZPtr { +typedef union LDKCResult_NetworkGraphDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKPing *result; + struct LDKNetworkGraph *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_PingDecodeErrorZPtr; +} LDKCResult_NetworkGraphDecodeErrorZPtr; /** - * A CResult_PingDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::Ping on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NetworkGraphDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::routing::network_graph::NetworkGraph on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_PingDecodeErrorZ { +typedef struct LDKCResult_NetworkGraphDecodeErrorZ { /** - * The contents of this CResult_PingDecodeErrorZ, accessible via either + * The contents of this CResult_NetworkGraphDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_PingDecodeErrorZPtr contents; + union LDKCResult_NetworkGraphDecodeErrorZPtr contents; /** - * Whether this CResult_PingDecodeErrorZ represents a success state. + * Whether this CResult_NetworkGraphDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_PingDecodeErrorZ; - - - -/** - * A pong message to be sent or received from a peer - */ -typedef struct MUST_USE_STRUCT LDKPong { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativePong *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKPong; +} LDKCResult_NetworkGraphDecodeErrorZ; /** - * The contents of CResult_PongDecodeErrorZ + * The contents of CResult_NetAddressu8Z */ -typedef union LDKCResult_PongDecodeErrorZPtr { +typedef union LDKCResult_NetAddressu8ZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKPong *result; + struct LDKNetAddress *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_PongDecodeErrorZPtr; + uint8_t *err; +} LDKCResult_NetAddressu8ZPtr; /** - * A CResult_PongDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::Pong on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NetAddressu8Z represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::NetAddress on success and a u8 on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_PongDecodeErrorZ { +typedef struct LDKCResult_NetAddressu8Z { /** - * The contents of this CResult_PongDecodeErrorZ, accessible via either + * The contents of this CResult_NetAddressu8Z, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_PongDecodeErrorZPtr contents; + union LDKCResult_NetAddressu8ZPtr contents; /** - * Whether this CResult_PongDecodeErrorZ represents a success state. + * Whether this CResult_NetAddressu8Z represents a success state. */ bool result_ok; -} LDKCResult_PongDecodeErrorZ; +} LDKCResult_NetAddressu8Z; /** - * The contents of CResult_UnsignedChannelAnnouncementDecodeErrorZ + * The contents of CResult_CResult_NetAddressu8ZDecodeErrorZ */ -typedef union LDKCResult_UnsignedChannelAnnouncementDecodeErrorZPtr { +typedef union LDKCResult_CResult_NetAddressu8ZDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKUnsignedChannelAnnouncement *result; + struct LDKCResult_NetAddressu8Z *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_UnsignedChannelAnnouncementDecodeErrorZPtr; +} LDKCResult_CResult_NetAddressu8ZDecodeErrorZPtr; /** - * A CResult_UnsignedChannelAnnouncementDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UnsignedChannelAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_CResult_NetAddressu8ZDecodeErrorZ represents the result of a fallible operation, + * containing a crate::c_types::derived::CResult_NetAddressu8Z on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ { +typedef struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ { /** - * The contents of this CResult_UnsignedChannelAnnouncementDecodeErrorZ, accessible via either + * The contents of this CResult_CResult_NetAddressu8ZDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_UnsignedChannelAnnouncementDecodeErrorZPtr contents; + union LDKCResult_CResult_NetAddressu8ZDecodeErrorZPtr contents; /** - * Whether this CResult_UnsignedChannelAnnouncementDecodeErrorZ represents a success state. + * Whether this CResult_CResult_NetAddressu8ZDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ; +} LDKCResult_CResult_NetAddressu8ZDecodeErrorZ; /** - * The contents of CResult_ChannelAnnouncementDecodeErrorZ + * The contents of CResult_NetAddressDecodeErrorZ */ -typedef union LDKCResult_ChannelAnnouncementDecodeErrorZPtr { +typedef union LDKCResult_NetAddressDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKChannelAnnouncement *result; + struct LDKNetAddress *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_ChannelAnnouncementDecodeErrorZPtr; +} LDKCResult_NetAddressDecodeErrorZPtr; /** - * A CResult_ChannelAnnouncementDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ChannelAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_NetAddressDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::NetAddress on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_ChannelAnnouncementDecodeErrorZ { +typedef struct LDKCResult_NetAddressDecodeErrorZ { /** - * The contents of this CResult_ChannelAnnouncementDecodeErrorZ, accessible via either + * The contents of this CResult_NetAddressDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_ChannelAnnouncementDecodeErrorZPtr contents; + union LDKCResult_NetAddressDecodeErrorZPtr contents; /** - * Whether this CResult_ChannelAnnouncementDecodeErrorZ represents a success state. + * Whether this CResult_NetAddressDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_ChannelAnnouncementDecodeErrorZ; +} LDKCResult_NetAddressDecodeErrorZ; /** - * The unsigned part of a channel_update + * An update_add_htlc message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKUnsignedChannelUpdate { +typedef struct MUST_USE_STRUCT LDKUpdateAddHTLC { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeUnsignedChannelUpdate *inner; + LDKnativeUpdateAddHTLC *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKUnsignedChannelUpdate; +} LDKUpdateAddHTLC; /** - * The contents of CResult_UnsignedChannelUpdateDecodeErrorZ + * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateAddHTLCs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef union LDKCResult_UnsignedChannelUpdateDecodeErrorZPtr { +typedef struct LDKCVec_UpdateAddHTLCZ { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - struct LDKUnsignedChannelUpdate *result; + struct LDKUpdateAddHTLC *data; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * The number of elements pointed to by `data`. */ - struct LDKDecodeError *err; -} LDKCResult_UnsignedChannelUpdateDecodeErrorZPtr; + uintptr_t datalen; +} LDKCVec_UpdateAddHTLCZ; + -/** - * A CResult_UnsignedChannelUpdateDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UnsignedChannelUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. - */ -typedef struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ { - /** - * The contents of this CResult_UnsignedChannelUpdateDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. - */ - union LDKCResult_UnsignedChannelUpdateDecodeErrorZPtr contents; - /** - * Whether this CResult_UnsignedChannelUpdateDecodeErrorZ represents a success state. - */ - bool result_ok; -} LDKCResult_UnsignedChannelUpdateDecodeErrorZ; /** - * The contents of CResult_ChannelUpdateDecodeErrorZ + * An update_fulfill_htlc message to be sent or received from a peer */ -typedef union LDKCResult_ChannelUpdateDecodeErrorZPtr { +typedef struct MUST_USE_STRUCT LDKUpdateFulfillHTLC { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKChannelUpdate *result; + LDKnativeUpdateFulfillHTLC *inner; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKDecodeError *err; -} LDKCResult_ChannelUpdateDecodeErrorZPtr; + bool is_owned; +} LDKUpdateFulfillHTLC; /** - * A CResult_ChannelUpdateDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ChannelUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFulfillHTLCs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKCResult_ChannelUpdateDecodeErrorZ { +typedef struct LDKCVec_UpdateFulfillHTLCZ { /** - * The contents of this CResult_ChannelUpdateDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - union LDKCResult_ChannelUpdateDecodeErrorZPtr contents; + struct LDKUpdateFulfillHTLC *data; /** - * Whether this CResult_ChannelUpdateDecodeErrorZ represents a success state. + * The number of elements pointed to by `data`. */ - bool result_ok; -} LDKCResult_ChannelUpdateDecodeErrorZ; + uintptr_t datalen; +} LDKCVec_UpdateFulfillHTLCZ; + + /** - * The contents of CResult_ErrorMessageDecodeErrorZ + * An update_fail_htlc message to be sent or received from a peer */ -typedef union LDKCResult_ErrorMessageDecodeErrorZPtr { +typedef struct MUST_USE_STRUCT LDKUpdateFailHTLC { /** - * A pointer to the contents in the success state. - * Reading from this pointer when `result_ok` is not set is undefined. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKErrorMessage *result; + LDKnativeUpdateFailHTLC *inner; /** - * A pointer to the contents in the error state. - * Reading from this pointer when `result_ok` is set is undefined. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKDecodeError *err; -} LDKCResult_ErrorMessageDecodeErrorZPtr; + bool is_owned; +} LDKUpdateFailHTLC; /** - * A CResult_ErrorMessageDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ErrorMessage on success and a crate::lightning::ln::msgs::DecodeError on failure. - * `result_ok` indicates the overall state, and the contents are provided via `contents`. + * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFailHTLCs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef struct LDKCResult_ErrorMessageDecodeErrorZ { +typedef struct LDKCVec_UpdateFailHTLCZ { /** - * The contents of this CResult_ErrorMessageDecodeErrorZ, accessible via either - * `err` or `result` depending on the state of `result_ok`. + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). */ - union LDKCResult_ErrorMessageDecodeErrorZPtr contents; + struct LDKUpdateFailHTLC *data; /** - * Whether this CResult_ErrorMessageDecodeErrorZ represents a success state. + * The number of elements pointed to by `data`. */ - bool result_ok; -} LDKCResult_ErrorMessageDecodeErrorZ; + uintptr_t datalen; +} LDKCVec_UpdateFailHTLCZ; /** - * The unsigned part of a node_announcement + * An update_fail_malformed_htlc message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKUnsignedNodeAnnouncement { +typedef struct MUST_USE_STRUCT LDKUpdateFailMalformedHTLC { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeUnsignedNodeAnnouncement *inner; + LDKnativeUpdateFailMalformedHTLC *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKUnsignedNodeAnnouncement; +} LDKUpdateFailMalformedHTLC; /** - * The contents of CResult_UnsignedNodeAnnouncementDecodeErrorZ + * A dynamically-allocated array of crate::lightning::ln::msgs::UpdateFailMalformedHTLCs of arbitrary size. + * This corresponds to std::vector in C++ */ -typedef union LDKCResult_UnsignedNodeAnnouncementDecodeErrorZPtr { +typedef struct LDKCVec_UpdateFailMalformedHTLCZ { + /** + * The elements in the array. + * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + */ + struct LDKUpdateFailMalformedHTLC *data; + /** + * The number of elements pointed to by `data`. + */ + uintptr_t datalen; +} LDKCVec_UpdateFailMalformedHTLCZ; + +/** + * The contents of CResult_AcceptChannelDecodeErrorZ + */ +typedef union LDKCResult_AcceptChannelDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKUnsignedNodeAnnouncement *result; + struct LDKAcceptChannel *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_UnsignedNodeAnnouncementDecodeErrorZPtr; +} LDKCResult_AcceptChannelDecodeErrorZPtr; /** - * A CResult_UnsignedNodeAnnouncementDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::UnsignedNodeAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_AcceptChannelDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::AcceptChannel on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ { +typedef struct LDKCResult_AcceptChannelDecodeErrorZ { /** - * The contents of this CResult_UnsignedNodeAnnouncementDecodeErrorZ, accessible via either + * The contents of this CResult_AcceptChannelDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_UnsignedNodeAnnouncementDecodeErrorZPtr contents; + union LDKCResult_AcceptChannelDecodeErrorZPtr contents; /** - * Whether this CResult_UnsignedNodeAnnouncementDecodeErrorZ represents a success state. + * Whether this CResult_AcceptChannelDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ; +} LDKCResult_AcceptChannelDecodeErrorZ; /** - * The contents of CResult_NodeAnnouncementDecodeErrorZ + * The contents of CResult_AnnouncementSignaturesDecodeErrorZ */ -typedef union LDKCResult_NodeAnnouncementDecodeErrorZPtr { +typedef union LDKCResult_AnnouncementSignaturesDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKNodeAnnouncement *result; + struct LDKAnnouncementSignatures *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_NodeAnnouncementDecodeErrorZPtr; +} LDKCResult_AnnouncementSignaturesDecodeErrorZPtr; /** - * A CResult_NodeAnnouncementDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::NodeAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_AnnouncementSignaturesDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::AnnouncementSignatures on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NodeAnnouncementDecodeErrorZ { +typedef struct LDKCResult_AnnouncementSignaturesDecodeErrorZ { /** - * The contents of this CResult_NodeAnnouncementDecodeErrorZ, accessible via either + * The contents of this CResult_AnnouncementSignaturesDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NodeAnnouncementDecodeErrorZPtr contents; + union LDKCResult_AnnouncementSignaturesDecodeErrorZPtr contents; /** - * Whether this CResult_NodeAnnouncementDecodeErrorZ represents a success state. + * Whether this CResult_AnnouncementSignaturesDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NodeAnnouncementDecodeErrorZ; +} LDKCResult_AnnouncementSignaturesDecodeErrorZ; + +/** + * The contents of CResult_ChannelReestablishDecodeErrorZ + */ +typedef union LDKCResult_ChannelReestablishDecodeErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKChannelReestablish *result; + /** + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. + */ + struct LDKDecodeError *err; +} LDKCResult_ChannelReestablishDecodeErrorZPtr; + +/** + * A CResult_ChannelReestablishDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ChannelReestablish on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_ChannelReestablishDecodeErrorZ { + /** + * The contents of this CResult_ChannelReestablishDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_ChannelReestablishDecodeErrorZPtr contents; + /** + * Whether this CResult_ChannelReestablishDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_ChannelReestablishDecodeErrorZ; /** - * The contents of CResult_QueryShortChannelIdsDecodeErrorZ + * The contents of CResult_ClosingSignedDecodeErrorZ */ -typedef union LDKCResult_QueryShortChannelIdsDecodeErrorZPtr { +typedef union LDKCResult_ClosingSignedDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKQueryShortChannelIds *result; + struct LDKClosingSigned *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_QueryShortChannelIdsDecodeErrorZPtr; +} LDKCResult_ClosingSignedDecodeErrorZPtr; /** - * A CResult_QueryShortChannelIdsDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::QueryShortChannelIds on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_ClosingSignedDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ClosingSigned on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_QueryShortChannelIdsDecodeErrorZ { +typedef struct LDKCResult_ClosingSignedDecodeErrorZ { /** - * The contents of this CResult_QueryShortChannelIdsDecodeErrorZ, accessible via either + * The contents of this CResult_ClosingSignedDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_QueryShortChannelIdsDecodeErrorZPtr contents; + union LDKCResult_ClosingSignedDecodeErrorZPtr contents; /** - * Whether this CResult_QueryShortChannelIdsDecodeErrorZ represents a success state. + * Whether this CResult_ClosingSignedDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_QueryShortChannelIdsDecodeErrorZ; +} LDKCResult_ClosingSignedDecodeErrorZ; /** - * A reply_short_channel_ids_end message is sent as a reply to a - * query_short_channel_ids message. The query recipient makes a best - * effort to respond based on their local network view which may not be - * a perfect view of the network. + * A commitment_signed message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKReplyShortChannelIdsEnd { +typedef struct MUST_USE_STRUCT LDKCommitmentSigned { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeReplyShortChannelIdsEnd *inner; + LDKnativeCommitmentSigned *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKReplyShortChannelIdsEnd; +} LDKCommitmentSigned; /** - * The contents of CResult_ReplyShortChannelIdsEndDecodeErrorZ + * The contents of CResult_CommitmentSignedDecodeErrorZ */ -typedef union LDKCResult_ReplyShortChannelIdsEndDecodeErrorZPtr { +typedef union LDKCResult_CommitmentSignedDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKReplyShortChannelIdsEnd *result; + struct LDKCommitmentSigned *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_ReplyShortChannelIdsEndDecodeErrorZPtr; +} LDKCResult_CommitmentSignedDecodeErrorZPtr; /** - * A CResult_ReplyShortChannelIdsEndDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ReplyShortChannelIdsEnd on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_CommitmentSignedDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::CommitmentSigned on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ { +typedef struct LDKCResult_CommitmentSignedDecodeErrorZ { /** - * The contents of this CResult_ReplyShortChannelIdsEndDecodeErrorZ, accessible via either + * The contents of this CResult_CommitmentSignedDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_ReplyShortChannelIdsEndDecodeErrorZPtr contents; + union LDKCResult_CommitmentSignedDecodeErrorZPtr contents; /** - * Whether this CResult_ReplyShortChannelIdsEndDecodeErrorZ represents a success state. + * Whether this CResult_CommitmentSignedDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ; +} LDKCResult_CommitmentSignedDecodeErrorZ; /** - * The contents of CResult_QueryChannelRangeDecodeErrorZ + * The contents of CResult_FundingCreatedDecodeErrorZ */ -typedef union LDKCResult_QueryChannelRangeDecodeErrorZPtr { +typedef union LDKCResult_FundingCreatedDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKQueryChannelRange *result; + struct LDKFundingCreated *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_QueryChannelRangeDecodeErrorZPtr; +} LDKCResult_FundingCreatedDecodeErrorZPtr; /** - * A CResult_QueryChannelRangeDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::QueryChannelRange on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_FundingCreatedDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::FundingCreated on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_QueryChannelRangeDecodeErrorZ { +typedef struct LDKCResult_FundingCreatedDecodeErrorZ { /** - * The contents of this CResult_QueryChannelRangeDecodeErrorZ, accessible via either + * The contents of this CResult_FundingCreatedDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_QueryChannelRangeDecodeErrorZPtr contents; + union LDKCResult_FundingCreatedDecodeErrorZPtr contents; /** - * Whether this CResult_QueryChannelRangeDecodeErrorZ represents a success state. + * Whether this CResult_FundingCreatedDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_QueryChannelRangeDecodeErrorZ; +} LDKCResult_FundingCreatedDecodeErrorZ; /** - * The contents of CResult_ReplyChannelRangeDecodeErrorZ + * The contents of CResult_FundingSignedDecodeErrorZ */ -typedef union LDKCResult_ReplyChannelRangeDecodeErrorZPtr { +typedef union LDKCResult_FundingSignedDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKReplyChannelRange *result; + struct LDKFundingSigned *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_ReplyChannelRangeDecodeErrorZPtr; +} LDKCResult_FundingSignedDecodeErrorZPtr; /** - * A CResult_ReplyChannelRangeDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::ReplyChannelRange on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_FundingSignedDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::FundingSigned on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_ReplyChannelRangeDecodeErrorZ { +typedef struct LDKCResult_FundingSignedDecodeErrorZ { /** - * The contents of this CResult_ReplyChannelRangeDecodeErrorZ, accessible via either + * The contents of this CResult_FundingSignedDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_ReplyChannelRangeDecodeErrorZPtr contents; + union LDKCResult_FundingSignedDecodeErrorZPtr contents; /** - * Whether this CResult_ReplyChannelRangeDecodeErrorZ represents a success state. + * Whether this CResult_FundingSignedDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_ReplyChannelRangeDecodeErrorZ; - - - -/** - * A gossip_timestamp_filter message is used by a node to request - * gossip relay for messages in the requested time range when the - * gossip_queries feature has been negotiated. - */ -typedef struct MUST_USE_STRUCT LDKGossipTimestampFilter { - /** - * A pointer to the opaque Rust object. - * Nearly everywhere, inner must be non-null, however in places where - * the Rust equivalent takes an Option, it may be set to null to indicate None. - */ - LDKnativeGossipTimestampFilter *inner; - /** - * Indicates that this is the only struct which contains the same pointer. - * Rust functions which take ownership of an object provided via an argument require - * this to be true and invalidate the object pointed to by inner. - */ - bool is_owned; -} LDKGossipTimestampFilter; +} LDKCResult_FundingSignedDecodeErrorZ; /** - * The contents of CResult_GossipTimestampFilterDecodeErrorZ + * The contents of CResult_FundingLockedDecodeErrorZ */ -typedef union LDKCResult_GossipTimestampFilterDecodeErrorZPtr { +typedef union LDKCResult_FundingLockedDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKGossipTimestampFilter *result; + struct LDKFundingLocked *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_GossipTimestampFilterDecodeErrorZPtr; +} LDKCResult_FundingLockedDecodeErrorZPtr; /** - * A CResult_GossipTimestampFilterDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::ln::msgs::GossipTimestampFilter on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_FundingLockedDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::FundingLocked on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_GossipTimestampFilterDecodeErrorZ { +typedef struct LDKCResult_FundingLockedDecodeErrorZ { /** - * The contents of this CResult_GossipTimestampFilterDecodeErrorZ, accessible via either + * The contents of this CResult_FundingLockedDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_GossipTimestampFilterDecodeErrorZPtr contents; + union LDKCResult_FundingLockedDecodeErrorZPtr contents; /** - * Whether this CResult_GossipTimestampFilterDecodeErrorZ represents a success state. + * Whether this CResult_FundingLockedDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_GossipTimestampFilterDecodeErrorZ; +} LDKCResult_FundingLockedDecodeErrorZ; + + /** - * When signing using a fallible method either an user-supplied `SignError` or a `CreationError` - * may occur. + * An init message to be sent or received from a peer */ -typedef enum LDKSignOrCreationError_Tag { - /** - * An error occurred during signing - */ - LDKSignOrCreationError_SignError, +typedef struct MUST_USE_STRUCT LDKInit { /** - * An error occurred while building the transaction + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKSignOrCreationError_CreationError, + LDKnativeInit *inner; /** - * Must be last for serialization purposes + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - LDKSignOrCreationError_Sentinel, -} LDKSignOrCreationError_Tag; - -typedef struct MUST_USE_STRUCT LDKSignOrCreationError { - LDKSignOrCreationError_Tag tag; - union { - struct { - enum LDKCreationError creation_error; - }; - }; -} LDKSignOrCreationError; + bool is_owned; +} LDKInit; /** - * The contents of CResult_InvoiceSignOrCreationErrorZ + * The contents of CResult_InitDecodeErrorZ */ -typedef union LDKCResult_InvoiceSignOrCreationErrorZPtr { +typedef union LDKCResult_InitDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKInvoice *result; + struct LDKInit *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKSignOrCreationError *err; -} LDKCResult_InvoiceSignOrCreationErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_InitDecodeErrorZPtr; /** - * A CResult_InvoiceSignOrCreationErrorZ represents the result of a fallible operation, - * containing a crate::lightning_invoice::Invoice on success and a crate::lightning_invoice::SignOrCreationError on failure. + * A CResult_InitDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::Init on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_InvoiceSignOrCreationErrorZ { +typedef struct LDKCResult_InitDecodeErrorZ { /** - * The contents of this CResult_InvoiceSignOrCreationErrorZ, accessible via either + * The contents of this CResult_InitDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_InvoiceSignOrCreationErrorZPtr contents; + union LDKCResult_InitDecodeErrorZPtr contents; /** - * Whether this CResult_InvoiceSignOrCreationErrorZ represents a success state. + * Whether this CResult_InitDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_InvoiceSignOrCreationErrorZ; +} LDKCResult_InitDecodeErrorZ; /** - * The contents of CResult_SpendableOutputDescriptorDecodeErrorZ + * The contents of CResult_OpenChannelDecodeErrorZ */ -typedef union LDKCResult_SpendableOutputDescriptorDecodeErrorZPtr { +typedef union LDKCResult_OpenChannelDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKSpendableOutputDescriptor *result; + struct LDKOpenChannel *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_SpendableOutputDescriptorDecodeErrorZPtr; +} LDKCResult_OpenChannelDecodeErrorZPtr; /** - * A CResult_SpendableOutputDescriptorDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::chain::keysinterface::SpendableOutputDescriptor on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_OpenChannelDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::OpenChannel on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ { +typedef struct LDKCResult_OpenChannelDecodeErrorZ { /** - * The contents of this CResult_SpendableOutputDescriptorDecodeErrorZ, accessible via either + * The contents of this CResult_OpenChannelDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_SpendableOutputDescriptorDecodeErrorZPtr contents; + union LDKCResult_OpenChannelDecodeErrorZPtr contents; /** - * Whether this CResult_SpendableOutputDescriptorDecodeErrorZ represents a success state. + * Whether this CResult_OpenChannelDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_SpendableOutputDescriptorDecodeErrorZ; +} LDKCResult_OpenChannelDecodeErrorZ; /** - * The contents of CResult_SignDecodeErrorZ + * The contents of CResult_RevokeAndACKDecodeErrorZ */ -typedef union LDKCResult_SignDecodeErrorZPtr { +typedef union LDKCResult_RevokeAndACKDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKSign *result; + struct LDKRevokeAndACK *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_SignDecodeErrorZPtr; +} LDKCResult_RevokeAndACKDecodeErrorZPtr; /** - * A CResult_SignDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::chain::keysinterface::Sign on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_RevokeAndACKDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::RevokeAndACK on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_SignDecodeErrorZ { +typedef struct LDKCResult_RevokeAndACKDecodeErrorZ { /** - * The contents of this CResult_SignDecodeErrorZ, accessible via either + * The contents of this CResult_RevokeAndACKDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_SignDecodeErrorZPtr contents; + union LDKCResult_RevokeAndACKDecodeErrorZPtr contents; /** - * Whether this CResult_SignDecodeErrorZ represents a success state. + * Whether this CResult_RevokeAndACKDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_SignDecodeErrorZ; - -/** - * Represents a secp256k1 signature serialized as two 32-byte numbers as well as a tag which - * allows recovering the exact public key which created the signature given the message. - */ -typedef struct LDKRecoverableSignature { - /** - * The bytes of the signature in "compact" form plus a "Recovery ID" which allows for - * recovery. - */ - uint8_t serialized_form[68]; -} LDKRecoverableSignature; +} LDKCResult_RevokeAndACKDecodeErrorZ; /** - * The contents of CResult_RecoverableSignatureNoneZ + * The contents of CResult_ShutdownDecodeErrorZ */ -typedef union LDKCResult_RecoverableSignatureNoneZPtr { +typedef union LDKCResult_ShutdownDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKRecoverableSignature *result; + struct LDKShutdown *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_RecoverableSignatureNoneZPtr; + struct LDKDecodeError *err; +} LDKCResult_ShutdownDecodeErrorZPtr; /** - * A CResult_RecoverableSignatureNoneZ represents the result of a fallible operation, - * containing a crate::c_types::RecoverableSignature on success and a () on failure. + * A CResult_ShutdownDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::Shutdown on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_RecoverableSignatureNoneZ { +typedef struct LDKCResult_ShutdownDecodeErrorZ { /** - * The contents of this CResult_RecoverableSignatureNoneZ, accessible via either + * The contents of this CResult_ShutdownDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_RecoverableSignatureNoneZPtr contents; + union LDKCResult_ShutdownDecodeErrorZPtr contents; /** - * Whether this CResult_RecoverableSignatureNoneZ represents a success state. + * Whether this CResult_ShutdownDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_RecoverableSignatureNoneZ; +} LDKCResult_ShutdownDecodeErrorZ; /** - * A dynamically-allocated array of crate::c_types::derived::CVec_u8Zs of arbitrary size. - * This corresponds to std::vector in C++ + * The contents of CResult_UpdateFailHTLCDecodeErrorZ */ -typedef struct LDKCVec_CVec_u8ZZ { +typedef union LDKCResult_UpdateFailHTLCDecodeErrorZPtr { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKCVec_u8Z *data; + struct LDKUpdateFailHTLC *result; /** - * The number of elements pointed to by `data`. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uintptr_t datalen; -} LDKCVec_CVec_u8ZZ; + struct LDKDecodeError *err; +} LDKCResult_UpdateFailHTLCDecodeErrorZPtr; /** - * The contents of CResult_CVec_CVec_u8ZZNoneZ + * A CResult_UpdateFailHTLCDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UpdateFailHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef union LDKCResult_CVec_CVec_u8ZZNoneZPtr { +typedef struct LDKCResult_UpdateFailHTLCDecodeErrorZ { + /** + * The contents of this CResult_UpdateFailHTLCDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_UpdateFailHTLCDecodeErrorZPtr contents; + /** + * Whether this CResult_UpdateFailHTLCDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_UpdateFailHTLCDecodeErrorZ; + +/** + * The contents of CResult_UpdateFailMalformedHTLCDecodeErrorZ + */ +typedef union LDKCResult_UpdateFailMalformedHTLCDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKCVec_CVec_u8ZZ *result; + struct LDKUpdateFailMalformedHTLC *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_CVec_CVec_u8ZZNoneZPtr; + struct LDKDecodeError *err; +} LDKCResult_UpdateFailMalformedHTLCDecodeErrorZPtr; /** - * A CResult_CVec_CVec_u8ZZNoneZ represents the result of a fallible operation, - * containing a crate::c_types::derived::CVec_CVec_u8ZZ on success and a () on failure. + * A CResult_UpdateFailMalformedHTLCDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UpdateFailMalformedHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_CVec_CVec_u8ZZNoneZ { +typedef struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ { /** - * The contents of this CResult_CVec_CVec_u8ZZNoneZ, accessible via either + * The contents of this CResult_UpdateFailMalformedHTLCDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_CVec_CVec_u8ZZNoneZPtr contents; + union LDKCResult_UpdateFailMalformedHTLCDecodeErrorZPtr contents; /** - * Whether this CResult_CVec_CVec_u8ZZNoneZ represents a success state. + * Whether this CResult_UpdateFailMalformedHTLCDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_CVec_CVec_u8ZZNoneZ; +} LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ; /** - * A simple implementation of Sign that just keeps the private keys in memory. - * - * This implementation performs no policy checks and is insufficient by itself as - * a secure external signer. + * An update_fee message to be sent or received from a peer */ -typedef struct MUST_USE_STRUCT LDKInMemorySigner { +typedef struct MUST_USE_STRUCT LDKUpdateFee { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeInMemorySigner *inner; + LDKnativeUpdateFee *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKInMemorySigner; +} LDKUpdateFee; /** - * The contents of CResult_InMemorySignerDecodeErrorZ + * The contents of CResult_UpdateFeeDecodeErrorZ */ -typedef union LDKCResult_InMemorySignerDecodeErrorZPtr { +typedef union LDKCResult_UpdateFeeDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKInMemorySigner *result; + struct LDKUpdateFee *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ struct LDKDecodeError *err; -} LDKCResult_InMemorySignerDecodeErrorZPtr; +} LDKCResult_UpdateFeeDecodeErrorZPtr; /** - * A CResult_InMemorySignerDecodeErrorZ represents the result of a fallible operation, - * containing a crate::lightning::chain::keysinterface::InMemorySigner on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_UpdateFeeDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UpdateFee on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_InMemorySignerDecodeErrorZ { +typedef struct LDKCResult_UpdateFeeDecodeErrorZ { /** - * The contents of this CResult_InMemorySignerDecodeErrorZ, accessible via either + * The contents of this CResult_UpdateFeeDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_InMemorySignerDecodeErrorZPtr contents; + union LDKCResult_UpdateFeeDecodeErrorZPtr contents; /** - * Whether this CResult_InMemorySignerDecodeErrorZ represents a success state. + * Whether this CResult_UpdateFeeDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_InMemorySignerDecodeErrorZ; +} LDKCResult_UpdateFeeDecodeErrorZ; /** - * A dynamically-allocated array of crate::c_types::TxOuts of arbitrary size. - * This corresponds to std::vector in C++ + * The contents of CResult_UpdateFulfillHTLCDecodeErrorZ */ -typedef struct LDKCVec_TxOutZ { +typedef union LDKCResult_UpdateFulfillHTLCDecodeErrorZPtr { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKTxOut *data; + struct LDKUpdateFulfillHTLC *result; /** - * The number of elements pointed to by `data`. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uintptr_t datalen; -} LDKCVec_TxOutZ; + struct LDKDecodeError *err; +} LDKCResult_UpdateFulfillHTLCDecodeErrorZPtr; /** - * The contents of CResult_TransactionNoneZ + * A CResult_UpdateFulfillHTLCDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UpdateFulfillHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef union LDKCResult_TransactionNoneZPtr { +typedef struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ { + /** + * The contents of this CResult_UpdateFulfillHTLCDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_UpdateFulfillHTLCDecodeErrorZPtr contents; + /** + * Whether this CResult_UpdateFulfillHTLCDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_UpdateFulfillHTLCDecodeErrorZ; + +/** + * The contents of CResult_UpdateAddHTLCDecodeErrorZ + */ +typedef union LDKCResult_UpdateAddHTLCDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKTransaction *result; + struct LDKUpdateAddHTLC *result; /** - * Note that this value is always NULL, as there are no contents in the Err variant + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void *err; -} LDKCResult_TransactionNoneZPtr; + struct LDKDecodeError *err; +} LDKCResult_UpdateAddHTLCDecodeErrorZPtr; /** - * A CResult_TransactionNoneZ represents the result of a fallible operation, - * containing a crate::c_types::Transaction on success and a () on failure. + * A CResult_UpdateAddHTLCDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UpdateAddHTLC on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_TransactionNoneZ { +typedef struct LDKCResult_UpdateAddHTLCDecodeErrorZ { /** - * The contents of this CResult_TransactionNoneZ, accessible via either + * The contents of this CResult_UpdateAddHTLCDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_TransactionNoneZPtr contents; + union LDKCResult_UpdateAddHTLCDecodeErrorZPtr contents; /** - * Whether this CResult_TransactionNoneZ represents a success state. + * Whether this CResult_UpdateAddHTLCDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_TransactionNoneZ; +} LDKCResult_UpdateAddHTLCDecodeErrorZ; + + /** - * The contents of CResult_NoneErrorZ + * A ping message to be sent or received from a peer */ -typedef union LDKCResult_NoneErrorZPtr { +typedef struct MUST_USE_STRUCT LDKPing { /** - * Note that this value is always NULL, as there are no contents in the OK variant + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - void *result; + LDKnativePing *inner; + /** + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. + */ + bool is_owned; +} LDKPing; + +/** + * The contents of CResult_PingDecodeErrorZ + */ +typedef union LDKCResult_PingDecodeErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKPing *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - enum LDKIOError *err; -} LDKCResult_NoneErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_PingDecodeErrorZPtr; /** - * A CResult_NoneErrorZ represents the result of a fallible operation, - * containing a () on success and a crate::c_types::IOError on failure. + * A CResult_PingDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::Ping on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NoneErrorZ { +typedef struct LDKCResult_PingDecodeErrorZ { /** - * The contents of this CResult_NoneErrorZ, accessible via either + * The contents of this CResult_PingDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NoneErrorZPtr contents; + union LDKCResult_PingDecodeErrorZPtr contents; /** - * Whether this CResult_NoneErrorZ represents a success state. + * Whether this CResult_PingDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NoneErrorZ; +} LDKCResult_PingDecodeErrorZ; + + /** - * A dynamically-allocated array of crate::c_types::derived::C2Tuple_BlockHashChannelMonitorZs of arbitrary size. - * This corresponds to std::vector in C++ + * A pong message to be sent or received from a peer */ -typedef struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ { +typedef struct MUST_USE_STRUCT LDKPong { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKC2Tuple_BlockHashChannelMonitorZ *data; + LDKnativePong *inner; /** - * The number of elements pointed to by `data`. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uintptr_t datalen; -} LDKCVec_C2Tuple_BlockHashChannelMonitorZZ; + bool is_owned; +} LDKPong; /** - * The contents of CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ + * The contents of CResult_PongDecodeErrorZ */ -typedef union LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr { +typedef union LDKCResult_PongDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ *result; + struct LDKPong *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - enum LDKIOError *err; -} LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_PongDecodeErrorZPtr; /** - * A CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ represents the result of a fallible operation, - * containing a crate::c_types::derived::CVec_C2Tuple_BlockHashChannelMonitorZZ on success and a crate::c_types::IOError on failure. + * A CResult_PongDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::Pong on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ { +typedef struct LDKCResult_PongDecodeErrorZ { /** - * The contents of this CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ, accessible via either + * The contents of this CResult_PongDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZPtr contents; + union LDKCResult_PongDecodeErrorZPtr contents; /** - * Whether this CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ represents a success state. + * Whether this CResult_PongDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ; +} LDKCResult_PongDecodeErrorZ; /** - * Indicates an error on the client's part (usually some variant of attempting to use too-low or - * too-high values) + * The contents of CResult_UnsignedChannelAnnouncementDecodeErrorZ */ -typedef enum LDKAPIError_Tag { - /** - * Indicates the API was wholly misused (see err for more). Cases where these can be returned - * are documented, but generally indicates some precondition of a function was violated. - */ - LDKAPIError_APIMisuseError, - /** - * Due to a high feerate, we were unable to complete the request. - * For example, this may be returned if the feerate implies we cannot open a channel at the - * requested value, but opening a larger channel would succeed. - */ - LDKAPIError_FeeRateTooHigh, - /** - * A malformed Route was provided (eg overflowed value, node id mismatch, overly-looped route, - * too-many-hops, etc). - */ - LDKAPIError_RouteError, - /** - * We were unable to complete the request as the Channel required to do so is unable to - * complete the request (or was not found). This can take many forms, including disconnected - * peer, channel at capacity, channel shutting down, etc. - */ - LDKAPIError_ChannelUnavailable, - /** - * An attempt to call watch/update_channel returned an Err (ie you did this!), causing the - * attempted action to fail. - */ - LDKAPIError_MonitorUpdateFailed, - /** - * Must be last for serialization purposes - */ - LDKAPIError_Sentinel, -} LDKAPIError_Tag; - -typedef struct LDKAPIError_LDKAPIMisuseError_Body { - /** - * A human-readable error message - */ - struct LDKStr err; -} LDKAPIError_LDKAPIMisuseError_Body; - -typedef struct LDKAPIError_LDKFeeRateTooHigh_Body { +typedef union LDKCResult_UnsignedChannelAnnouncementDecodeErrorZPtr { /** - * A human-readable error message + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKStr err; + struct LDKUnsignedChannelAnnouncement *result; /** - * The feerate which was too high. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uint32_t feerate; -} LDKAPIError_LDKFeeRateTooHigh_Body; + struct LDKDecodeError *err; +} LDKCResult_UnsignedChannelAnnouncementDecodeErrorZPtr; -typedef struct LDKAPIError_LDKRouteError_Body { +/** + * A CResult_UnsignedChannelAnnouncementDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UnsignedChannelAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ { /** - * A human-readable error message + * The contents of this CResult_UnsignedChannelAnnouncementDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - struct LDKStr err; -} LDKAPIError_LDKRouteError_Body; - -typedef struct LDKAPIError_LDKChannelUnavailable_Body { + union LDKCResult_UnsignedChannelAnnouncementDecodeErrorZPtr contents; /** - * A human-readable error message + * Whether this CResult_UnsignedChannelAnnouncementDecodeErrorZ represents a success state. */ - struct LDKStr err; -} LDKAPIError_LDKChannelUnavailable_Body; - -typedef struct MUST_USE_STRUCT LDKAPIError { - LDKAPIError_Tag tag; - union { - LDKAPIError_LDKAPIMisuseError_Body api_misuse_error; - LDKAPIError_LDKFeeRateTooHigh_Body fee_rate_too_high; - LDKAPIError_LDKRouteError_Body route_error; - LDKAPIError_LDKChannelUnavailable_Body channel_unavailable; - }; -} LDKAPIError; + bool result_ok; +} LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ; /** - * The contents of CResult_NoneAPIErrorZ + * The contents of CResult_ChannelAnnouncementDecodeErrorZ */ -typedef union LDKCResult_NoneAPIErrorZPtr { +typedef union LDKCResult_ChannelAnnouncementDecodeErrorZPtr { /** - * Note that this value is always NULL, as there are no contents in the OK variant + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - void *result; + struct LDKChannelAnnouncement *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKAPIError *err; -} LDKCResult_NoneAPIErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_ChannelAnnouncementDecodeErrorZPtr; /** - * A CResult_NoneAPIErrorZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning::util::errors::APIError on failure. + * A CResult_ChannelAnnouncementDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ChannelAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NoneAPIErrorZ { +typedef struct LDKCResult_ChannelAnnouncementDecodeErrorZ { /** - * The contents of this CResult_NoneAPIErrorZ, accessible via either + * The contents of this CResult_ChannelAnnouncementDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NoneAPIErrorZPtr contents; + union LDKCResult_ChannelAnnouncementDecodeErrorZPtr contents; /** - * Whether this CResult_NoneAPIErrorZ represents a success state. + * Whether this CResult_ChannelAnnouncementDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NoneAPIErrorZ; +} LDKCResult_ChannelAnnouncementDecodeErrorZ; + + /** - * A dynamically-allocated array of crate::c_types::derived::CResult_NoneAPIErrorZs of arbitrary size. - * This corresponds to std::vector in C++ + * The unsigned part of a channel_update */ -typedef struct LDKCVec_CResult_NoneAPIErrorZZ { +typedef struct MUST_USE_STRUCT LDKUnsignedChannelUpdate { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKCResult_NoneAPIErrorZ *data; + LDKnativeUnsignedChannelUpdate *inner; /** - * The number of elements pointed to by `data`. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - uintptr_t datalen; -} LDKCVec_CResult_NoneAPIErrorZZ; + bool is_owned; +} LDKUnsignedChannelUpdate; /** - * A dynamically-allocated array of crate::lightning::util::errors::APIErrors of arbitrary size. - * This corresponds to std::vector in C++ + * The contents of CResult_UnsignedChannelUpdateDecodeErrorZ */ -typedef struct LDKCVec_APIErrorZ { +typedef union LDKCResult_UnsignedChannelUpdateDecodeErrorZPtr { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKAPIError *data; + struct LDKUnsignedChannelUpdate *result; /** - * The number of elements pointed to by `data`. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uintptr_t datalen; -} LDKCVec_APIErrorZ; + struct LDKDecodeError *err; +} LDKCResult_UnsignedChannelUpdateDecodeErrorZPtr; /** - * If a payment fails to send, it can be in one of several states. This enum is returned as the - * Err() type describing which state the payment is in, see the description of individual enum - * states for more. + * A CResult_UnsignedChannelUpdateDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UnsignedChannelUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef enum LDKPaymentSendFailure_Tag { - /** - * A parameter which was passed to send_payment was invalid, preventing us from attempting to - * send the payment at all. No channel state has been changed or messages sent to peers, and - * once you've changed the parameter at error, you can freely retry the payment in full. - */ - LDKPaymentSendFailure_ParameterError, +typedef struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ { /** - * A parameter in a single path which was passed to send_payment was invalid, preventing us - * from attempting to send the payment at all. No channel state has been changed or messages - * sent to peers, and once you've changed the parameter at error, you can freely retry the - * payment in full. - * - * The results here are ordered the same as the paths in the route object which was passed to - * send_payment. + * The contents of this CResult_UnsignedChannelUpdateDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - LDKPaymentSendFailure_PathParameterError, + union LDKCResult_UnsignedChannelUpdateDecodeErrorZPtr contents; /** - * All paths which were attempted failed to send, with no channel state change taking place. - * You can freely retry the payment in full (though you probably want to do so over different - * paths than the ones selected). + * Whether this CResult_UnsignedChannelUpdateDecodeErrorZ represents a success state. */ - LDKPaymentSendFailure_AllFailedRetrySafe, + bool result_ok; +} LDKCResult_UnsignedChannelUpdateDecodeErrorZ; + +/** + * The contents of CResult_ChannelUpdateDecodeErrorZ + */ +typedef union LDKCResult_ChannelUpdateDecodeErrorZPtr { /** - * Some paths which were attempted failed to send, though possibly not all. At least some - * paths have irrevocably committed to the HTLC and retrying the payment in full would result - * in over-/re-payment. - * - * The results here are ordered the same as the paths in the route object which was passed to - * send_payment, and any Errs which are not APIError::MonitorUpdateFailed can be safely - * retried (though there is currently no API with which to do so). - * - * Any entries which contain Err(APIError::MonitorUpdateFailed) or Ok(()) MUST NOT be retried - * as they will result in over-/re-payment. These HTLCs all either successfully sent (in the - * case of Ok(())) or will send once channel_monitor_updated is called on the next-hop channel - * with the latest update_id. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - LDKPaymentSendFailure_PartialFailure, + struct LDKChannelUpdate *result; /** - * Must be last for serialization purposes + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - LDKPaymentSendFailure_Sentinel, -} LDKPaymentSendFailure_Tag; - -typedef struct MUST_USE_STRUCT LDKPaymentSendFailure { - LDKPaymentSendFailure_Tag tag; - union { - struct { - struct LDKAPIError parameter_error; - }; - struct { - struct LDKCVec_CResult_NoneAPIErrorZZ path_parameter_error; - }; - struct { - struct LDKCVec_APIErrorZ all_failed_retry_safe; - }; - struct { - struct LDKCVec_CResult_NoneAPIErrorZZ partial_failure; - }; - }; -} LDKPaymentSendFailure; + struct LDKDecodeError *err; +} LDKCResult_ChannelUpdateDecodeErrorZPtr; /** - * The contents of CResult_NonePaymentSendFailureZ + * A CResult_ChannelUpdateDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ChannelUpdate on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef union LDKCResult_NonePaymentSendFailureZPtr { +typedef struct LDKCResult_ChannelUpdateDecodeErrorZ { /** - * Note that this value is always NULL, as there are no contents in the OK variant + * The contents of this CResult_ChannelUpdateDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - void *result; + union LDKCResult_ChannelUpdateDecodeErrorZPtr contents; + /** + * Whether this CResult_ChannelUpdateDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_ChannelUpdateDecodeErrorZ; + +/** + * The contents of CResult_ErrorMessageDecodeErrorZ + */ +typedef union LDKCResult_ErrorMessageDecodeErrorZPtr { + /** + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. + */ + struct LDKErrorMessage *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKPaymentSendFailure *err; -} LDKCResult_NonePaymentSendFailureZPtr; + struct LDKDecodeError *err; +} LDKCResult_ErrorMessageDecodeErrorZPtr; /** - * A CResult_NonePaymentSendFailureZ represents the result of a fallible operation, - * containing a () on success and a crate::lightning::ln::channelmanager::PaymentSendFailure on failure. + * A CResult_ErrorMessageDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ErrorMessage on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_NonePaymentSendFailureZ { +typedef struct LDKCResult_ErrorMessageDecodeErrorZ { /** - * The contents of this CResult_NonePaymentSendFailureZ, accessible via either + * The contents of this CResult_ErrorMessageDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_NonePaymentSendFailureZPtr contents; + union LDKCResult_ErrorMessageDecodeErrorZPtr contents; /** - * Whether this CResult_NonePaymentSendFailureZ represents a success state. + * Whether this CResult_ErrorMessageDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_NonePaymentSendFailureZ; +} LDKCResult_ErrorMessageDecodeErrorZ; + + /** - * A tuple of 2 elements. See the individual fields for the types contained. + * The unsigned part of a node_announcement */ -typedef struct LDKC2Tuple_PaymentHashPaymentSecretZ { +typedef struct MUST_USE_STRUCT LDKUnsignedNodeAnnouncement { /** - * The element at position 0 + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKThirtyTwoBytes a; + LDKnativeUnsignedNodeAnnouncement *inner; /** - * The element at position 1 + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKThirtyTwoBytes b; -} LDKC2Tuple_PaymentHashPaymentSecretZ; + bool is_owned; +} LDKUnsignedNodeAnnouncement; /** - * The contents of CResult_PaymentSecretAPIErrorZ + * The contents of CResult_UnsignedNodeAnnouncementDecodeErrorZ */ -typedef union LDKCResult_PaymentSecretAPIErrorZPtr { +typedef union LDKCResult_UnsignedNodeAnnouncementDecodeErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKThirtyTwoBytes *result; + struct LDKUnsignedNodeAnnouncement *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKAPIError *err; -} LDKCResult_PaymentSecretAPIErrorZPtr; + struct LDKDecodeError *err; +} LDKCResult_UnsignedNodeAnnouncementDecodeErrorZPtr; /** - * A CResult_PaymentSecretAPIErrorZ represents the result of a fallible operation, - * containing a crate::c_types::ThirtyTwoBytes on success and a crate::lightning::util::errors::APIError on failure. + * A CResult_UnsignedNodeAnnouncementDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::UnsignedNodeAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_PaymentSecretAPIErrorZ { +typedef struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ { /** - * The contents of this CResult_PaymentSecretAPIErrorZ, accessible via either + * The contents of this CResult_UnsignedNodeAnnouncementDecodeErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_PaymentSecretAPIErrorZPtr contents; + union LDKCResult_UnsignedNodeAnnouncementDecodeErrorZPtr contents; /** - * Whether this CResult_PaymentSecretAPIErrorZ represents a success state. + * Whether this CResult_UnsignedNodeAnnouncementDecodeErrorZ represents a success state. */ bool result_ok; -} LDKCResult_PaymentSecretAPIErrorZ; +} LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ; /** - * A dynamically-allocated array of crate::lightning::chain::channelmonitor::ChannelMonitors of arbitrary size. - * This corresponds to std::vector in C++ + * The contents of CResult_NodeAnnouncementDecodeErrorZ */ -typedef struct LDKCVec_ChannelMonitorZ { +typedef union LDKCResult_NodeAnnouncementDecodeErrorZPtr { /** - * The elements in the array. - * If datalen is non-0 this must be a valid, non-NULL pointer allocated by malloc(). + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKChannelMonitor *data; + struct LDKNodeAnnouncement *result; /** - * The number of elements pointed to by `data`. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uintptr_t datalen; -} LDKCVec_ChannelMonitorZ; + struct LDKDecodeError *err; +} LDKCResult_NodeAnnouncementDecodeErrorZPtr; /** - * The `Watch` trait defines behavior for watching on-chain activity pertaining to channels as - * blocks are connected and disconnected. - * - * Each channel is associated with a [`ChannelMonitor`]. Implementations of this trait are - * responsible for maintaining a set of monitors such that they can be updated accordingly as - * channel state changes and HTLCs are resolved. See method documentation for specific - * requirements. - * - * Implementations **must** ensure that updates are successfully applied and persisted upon method - * completion. If an update fails with a [`PermanentFailure`], then it must immediately shut down - * without taking any further action such as persisting the current state. - * - * If an implementation maintains multiple instances of a channel's monitor (e.g., by storing - * backup copies), then it must ensure that updates are applied across all instances. Otherwise, it - * could result in a revoked transaction being broadcast, allowing the counterparty to claim all - * funds in the channel. See [`ChannelMonitorUpdateErr`] for more details about how to handle - * multiple instances. - * - * [`ChannelMonitor`]: channelmonitor::ChannelMonitor - * [`ChannelMonitorUpdateErr`]: channelmonitor::ChannelMonitorUpdateErr - * [`PermanentFailure`]: channelmonitor::ChannelMonitorUpdateErr::PermanentFailure + * A CResult_NodeAnnouncementDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::NodeAnnouncement on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKWatch { - /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. - */ - void *this_arg; - /** - * Watches a channel identified by `funding_txo` using `monitor`. - * - * Implementations are responsible for watching the chain for the funding transaction along - * with any spends of outputs returned by [`get_outputs_to_watch`]. In practice, this means - * calling [`block_connected`] and [`block_disconnected`] on the monitor. - * - * [`get_outputs_to_watch`]: channelmonitor::ChannelMonitor::get_outputs_to_watch - * [`block_connected`]: channelmonitor::ChannelMonitor::block_connected - * [`block_disconnected`]: channelmonitor::ChannelMonitor::block_disconnected - */ - struct LDKCResult_NoneChannelMonitorUpdateErrZ (*watch_channel)(const void *this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitor monitor); - /** - * Updates a channel identified by `funding_txo` by applying `update` to its monitor. - * - * Implementations must call [`update_monitor`] with the given update. See - * [`ChannelMonitorUpdateErr`] for invariants around returning an error. - * - * [`update_monitor`]: channelmonitor::ChannelMonitor::update_monitor - * [`ChannelMonitorUpdateErr`]: channelmonitor::ChannelMonitorUpdateErr - */ - struct LDKCResult_NoneChannelMonitorUpdateErrZ (*update_channel)(const void *this_arg, struct LDKOutPoint funding_txo, struct LDKChannelMonitorUpdate update); +typedef struct LDKCResult_NodeAnnouncementDecodeErrorZ { /** - * Returns any monitor events since the last call. Subsequent calls must only return new - * events. + * The contents of this CResult_NodeAnnouncementDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - struct LDKCVec_MonitorEventZ (*release_pending_monitor_events)(const void *this_arg); + union LDKCResult_NodeAnnouncementDecodeErrorZPtr contents; /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * Whether this CResult_NodeAnnouncementDecodeErrorZ represents a success state. */ - void (*free)(void *this_arg); -} LDKWatch; + bool result_ok; +} LDKCResult_NodeAnnouncementDecodeErrorZ; /** - * An interface to send a transaction to the Bitcoin network. + * The contents of CResult_QueryShortChannelIdsDecodeErrorZ */ -typedef struct LDKBroadcasterInterface { - /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. - */ - void *this_arg; +typedef union LDKCResult_QueryShortChannelIdsDecodeErrorZPtr { /** - * Sends a transaction out to (hopefully) be mined. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - void (*broadcast_transaction)(const void *this_arg, struct LDKTransaction tx); + struct LDKQueryShortChannelIds *result; /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void (*free)(void *this_arg); -} LDKBroadcasterInterface; + struct LDKDecodeError *err; +} LDKCResult_QueryShortChannelIdsDecodeErrorZPtr; /** - * A "slice" referencing some byte array. This is simply a length-tagged pointer which does not - * own the memory pointed to by data. + * A CResult_QueryShortChannelIdsDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::QueryShortChannelIds on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKu8slice { +typedef struct LDKCResult_QueryShortChannelIdsDecodeErrorZ { /** - * A pointer to the byte buffer + * The contents of this CResult_QueryShortChannelIdsDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - const uint8_t *data; + union LDKCResult_QueryShortChannelIdsDecodeErrorZPtr contents; /** - * The number of bytes pointed to by `data`. + * Whether this CResult_QueryShortChannelIdsDecodeErrorZ represents a success state. */ - uintptr_t datalen; -} LDKu8slice; + bool result_ok; +} LDKCResult_QueryShortChannelIdsDecodeErrorZ; + + /** - * A trait to describe an object which can get user secrets and key material. + * A reply_short_channel_ids_end message is sent as a reply to a + * query_short_channel_ids message. The query recipient makes a best + * effort to respond based on their local network view which may not be + * a perfect view of the network. */ -typedef struct LDKKeysInterface { - /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. - */ - void *this_arg; - /** - * Get node secret key (aka node_id or network_key). - * - * This method must return the same value each time it is called. - */ - struct LDKSecretKey (*get_node_secret)(const void *this_arg); - /** - * Get a script pubkey which we send funds to when claiming on-chain contestable outputs. - * - * This method should return a different value each time it is called, to avoid linking - * on-chain funds across channels as controlled to the same user. - */ - struct LDKCVec_u8Z (*get_destination_script)(const void *this_arg); +typedef struct MUST_USE_STRUCT LDKReplyShortChannelIdsEnd { /** - * Get a public key which we will send funds to (in the form of a P2WPKH output) when closing - * a channel. - * - * This method should return a different value each time it is called, to avoid linking - * on-chain funds across channels as controlled to the same user. + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - struct LDKPublicKey (*get_shutdown_pubkey)(const void *this_arg); + LDKnativeReplyShortChannelIdsEnd *inner; /** - * Get a new set of Sign for per-channel secrets. These MUST be unique even if you - * restarted with some stale data! - * - * This method must return a different value each time it is called. + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. */ - struct LDKSign (*get_channel_signer)(const void *this_arg, bool inbound, uint64_t channel_value_satoshis); + bool is_owned; +} LDKReplyShortChannelIdsEnd; + +/** + * The contents of CResult_ReplyShortChannelIdsEndDecodeErrorZ + */ +typedef union LDKCResult_ReplyShortChannelIdsEndDecodeErrorZPtr { /** - * Gets a unique, cryptographically-secure, random 32 byte value. This is used for encrypting - * onion packets and for temporary channel IDs. There is no requirement that these be - * persisted anywhere, though they must be unique across restarts. - * - * This method must return a different value each time it is called. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKThirtyTwoBytes (*get_secure_random_bytes)(const void *this_arg); + struct LDKReplyShortChannelIdsEnd *result; /** - * Reads a `Signer` for this `KeysInterface` from the given input stream. - * This is only called during deserialization of other objects which contain - * `Sign`-implementing objects (ie `ChannelMonitor`s and `ChannelManager`s). - * The bytes are exactly those which `::write()` writes, and - * contain no versioning scheme. You may wish to include your own version prefix and ensure - * you've read all of the provided bytes to ensure no corruption occurred. + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKCResult_SignDecodeErrorZ (*read_chan_signer)(const void *this_arg, struct LDKu8slice reader); + struct LDKDecodeError *err; +} LDKCResult_ReplyShortChannelIdsEndDecodeErrorZPtr; + +/** + * A CResult_ReplyShortChannelIdsEndDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ReplyShortChannelIdsEnd on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ { /** - * Sign an invoice's preimage (note that this is the preimage of the invoice, not the HTLC's - * preimage). By parameterizing by the preimage instead of the hash, we allow implementors of - * this trait to parse the invoice and make sure they're signing what they expect, rather than - * blindly signing the hash. + * The contents of this CResult_ReplyShortChannelIdsEndDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - struct LDKCResult_RecoverableSignatureNoneZ (*sign_invoice)(const void *this_arg, struct LDKCVec_u8Z invoice_preimage); + union LDKCResult_ReplyShortChannelIdsEndDecodeErrorZPtr contents; /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * Whether this CResult_ReplyShortChannelIdsEndDecodeErrorZ represents a success state. */ - void (*free)(void *this_arg); -} LDKKeysInterface; + bool result_ok; +} LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ; /** - * A trait which should be implemented to provide feerate information on a number of time - * horizons. - * - * Note that all of the functions implemented here *must* be reentrant-safe (obviously - they're - * called from inside the library in response to chain events, P2P events, or timer events). + * The contents of CResult_QueryChannelRangeDecodeErrorZ */ -typedef struct LDKFeeEstimator { +typedef union LDKCResult_QueryChannelRangeDecodeErrorZPtr { /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - void *this_arg; + struct LDKQueryChannelRange *result; /** - * Gets estimated satoshis of fee required per 1000 Weight-Units. - * - * Must be no smaller than 253 (ie 1 satoshi-per-byte rounded up to ensure later round-downs - * don't put us below 1 satoshi-per-byte). - * - * This translates to: - * * satoshis-per-byte * 250 - * * ceil(satoshis-per-kbyte / 4) + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - uint32_t (*get_est_sat_per_1000_weight)(const void *this_arg, enum LDKConfirmationTarget confirmation_target); + struct LDKDecodeError *err; +} LDKCResult_QueryChannelRangeDecodeErrorZPtr; + +/** + * A CResult_QueryChannelRangeDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::QueryChannelRange on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_QueryChannelRangeDecodeErrorZ { /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * The contents of this CResult_QueryChannelRangeDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - void (*free)(void *this_arg); -} LDKFeeEstimator; + union LDKCResult_QueryChannelRangeDecodeErrorZPtr contents; + /** + * Whether this CResult_QueryChannelRangeDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_QueryChannelRangeDecodeErrorZ; /** - * A trait encapsulating the operations required of a logger + * The contents of CResult_ReplyChannelRangeDecodeErrorZ */ -typedef struct LDKLogger { +typedef union LDKCResult_ReplyChannelRangeDecodeErrorZPtr { /** - * An opaque pointer which is passed to your function implementations as an argument. - * This has no meaning in the LDK, and can be NULL or any other value. + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - void *this_arg; + struct LDKReplyChannelRange *result; /** - * Logs the `Record` + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - void (*log)(const void *this_arg, const char *record); + struct LDKDecodeError *err; +} LDKCResult_ReplyChannelRangeDecodeErrorZPtr; + +/** + * A CResult_ReplyChannelRangeDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::ReplyChannelRange on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. + */ +typedef struct LDKCResult_ReplyChannelRangeDecodeErrorZ { /** - * Frees any resources associated with this object given its this_arg pointer. - * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + * The contents of this CResult_ReplyChannelRangeDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. */ - void (*free)(void *this_arg); -} LDKLogger; + union LDKCResult_ReplyChannelRangeDecodeErrorZPtr contents; + /** + * Whether this CResult_ReplyChannelRangeDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_ReplyChannelRangeDecodeErrorZ; /** - * Manager which keeps track of a number of channels and sends messages to the appropriate - * channel, also tracking HTLC preimages and forwarding onion packets appropriately. - * - * Implements ChannelMessageHandler, handling the multi-channel parts and passing things through - * to individual Channels. - * - * Implements Writeable to write out all channel state to disk. Implies peer_disconnected() for - * all peers during write/read (though does not modify this instance, only the instance being - * serialized). This will result in any channels which have not yet exchanged funding_created (ie - * called funding_transaction_generated for outbound channels). - * - * Note that you can be a bit lazier about writing out ChannelManager than you can be with - * ChannelMonitors. With ChannelMonitors you MUST write each monitor update out to disk before - * returning from chain::Watch::watch_/update_channel, with ChannelManagers, writing updates - * happens out-of-band (and will prevent any other ChannelManager operations from occurring during - * the serialization process). If the deserialized version is out-of-date compared to the - * ChannelMonitors passed by reference to read(), those channels will be force-closed based on the - * ChannelMonitor state and no funds will be lost (mod on-chain transaction fees). - * - * Note that the deserializer is only implemented for (BlockHash, ChannelManager), which - * tells you the last block hash which was block_connect()ed. You MUST rescan any blocks along - * the \"reorg path\" (ie call block_disconnected() until you get to a common block and then call - * block_connected() to step towards your best block) upon deserialization before using the - * object! - * - * Note that ChannelManager is responsible for tracking liveness of its channels and generating - * ChannelUpdate messages informing peers that the channel is temporarily disabled. To avoid - * spam due to quick disconnection/reconnection, updates are not sent until the channel has been - * offline for a full minute. In order to track this, you must call - * timer_tick_occurred roughly once per minute, though it doesn't have to be perfect. - * - * Rather than using a plain ChannelManager, it is preferable to use either a SimpleArcChannelManager - * a SimpleRefChannelManager, for conciseness. See their documentation for more details, but - * essentially you should default to using a SimpleRefChannelManager, and use a - * SimpleArcChannelManager when you require a ChannelManager with a static lifetime, such as when - * you're using lightning-net-tokio. + * A gossip_timestamp_filter message is used by a node to request + * gossip relay for messages in the requested time range when the + * gossip_queries feature has been negotiated. */ -typedef struct MUST_USE_STRUCT LDKChannelManager { +typedef struct MUST_USE_STRUCT LDKGossipTimestampFilter { /** * A pointer to the opaque Rust object. * Nearly everywhere, inner must be non-null, however in places where * the Rust equivalent takes an Option, it may be set to null to indicate None. */ - LDKnativeChannelManager *inner; + LDKnativeGossipTimestampFilter *inner; /** * Indicates that this is the only struct which contains the same pointer. * Rust functions which take ownership of an object provided via an argument require * this to be true and invalidate the object pointed to by inner. */ bool is_owned; -} LDKChannelManager; +} LDKGossipTimestampFilter; /** - * A tuple of 2 elements. See the individual fields for the types contained. + * The contents of CResult_GossipTimestampFilterDecodeErrorZ */ -typedef struct LDKC2Tuple_BlockHashChannelManagerZ { +typedef union LDKCResult_GossipTimestampFilterDecodeErrorZPtr { /** - * The element at position 0 + * A pointer to the contents in the success state. + * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKThirtyTwoBytes a; + struct LDKGossipTimestampFilter *result; /** - * The element at position 1 + * A pointer to the contents in the error state. + * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKChannelManager b; -} LDKC2Tuple_BlockHashChannelManagerZ; + struct LDKDecodeError *err; +} LDKCResult_GossipTimestampFilterDecodeErrorZPtr; /** - * The contents of CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ + * A CResult_GossipTimestampFilterDecodeErrorZ represents the result of a fallible operation, + * containing a crate::lightning::ln::msgs::GossipTimestampFilter on success and a crate::lightning::ln::msgs::DecodeError on failure. + * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef union LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr { +typedef struct LDKCResult_GossipTimestampFilterDecodeErrorZ { + /** + * The contents of this CResult_GossipTimestampFilterDecodeErrorZ, accessible via either + * `err` or `result` depending on the state of `result_ok`. + */ + union LDKCResult_GossipTimestampFilterDecodeErrorZPtr contents; + /** + * Whether this CResult_GossipTimestampFilterDecodeErrorZ represents a success state. + */ + bool result_ok; +} LDKCResult_GossipTimestampFilterDecodeErrorZ; + +/** + * When signing using a fallible method either an user-supplied `SignError` or a `CreationError` + * may occur. + */ +typedef enum LDKSignOrCreationError_Tag { + /** + * An error occurred during signing + */ + LDKSignOrCreationError_SignError, + /** + * An error occurred while building the transaction + */ + LDKSignOrCreationError_CreationError, + /** + * Must be last for serialization purposes + */ + LDKSignOrCreationError_Sentinel, +} LDKSignOrCreationError_Tag; + +typedef struct MUST_USE_STRUCT LDKSignOrCreationError { + LDKSignOrCreationError_Tag tag; + union { + struct { + enum LDKCreationError creation_error; + }; + }; +} LDKSignOrCreationError; + +/** + * The contents of CResult_InvoiceSignOrCreationErrorZ + */ +typedef union LDKCResult_InvoiceSignOrCreationErrorZPtr { /** * A pointer to the contents in the success state. * Reading from this pointer when `result_ok` is not set is undefined. */ - struct LDKC2Tuple_BlockHashChannelManagerZ *result; + struct LDKInvoice *result; /** * A pointer to the contents in the error state. * Reading from this pointer when `result_ok` is set is undefined. */ - struct LDKDecodeError *err; -} LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr; + struct LDKSignOrCreationError *err; +} LDKCResult_InvoiceSignOrCreationErrorZPtr; /** - * A CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ represents the result of a fallible operation, - * containing a crate::c_types::derived::C2Tuple_BlockHashChannelManagerZ on success and a crate::lightning::ln::msgs::DecodeError on failure. + * A CResult_InvoiceSignOrCreationErrorZ represents the result of a fallible operation, + * containing a crate::lightning_invoice::Invoice on success and a crate::lightning_invoice::SignOrCreationError on failure. * `result_ok` indicates the overall state, and the contents are provided via `contents`. */ -typedef struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ { +typedef struct LDKCResult_InvoiceSignOrCreationErrorZ { /** - * The contents of this CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ, accessible via either + * The contents of this CResult_InvoiceSignOrCreationErrorZ, accessible via either * `err` or `result` depending on the state of `result_ok`. */ - union LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZPtr contents; + union LDKCResult_InvoiceSignOrCreationErrorZPtr contents; /** - * Whether this CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ represents a success state. + * Whether this CResult_InvoiceSignOrCreationErrorZ represents a success state. */ bool result_ok; -} LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ; +} LDKCResult_InvoiceSignOrCreationErrorZ; /** * A trait indicating an object may generate message send events @@ -7600,7 +7752,52 @@ typedef struct LDKMessageSendEventsProvider { } LDKMessageSendEventsProvider; /** - * A trait indicating an object may generate events + * A trait implemented for objects handling events from [`EventsProvider`]. + */ +typedef struct LDKEventHandler { + /** + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. + */ + void *this_arg; + /** + * Handles the given [`Event`]. + * + * See [`EventsProvider`] for details that must be considered when implementing this method. + */ + void (*handle_event)(const void *this_arg, struct LDKEvent event); + /** + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + */ + void (*free)(void *this_arg); +} LDKEventHandler; + +/** + * A trait indicating an object may generate events. + * + * Events are processed by passing an [`EventHandler`] to [`process_pending_events`]. + * + * # Requirements + * + * See [`process_pending_events`] for requirements around event processing. + * + * When using this trait, [`process_pending_events`] will call [`handle_event`] for each pending + * event since the last invocation. The handler must either act upon the event immediately + * or preserve it for later handling. + * + * Note, handlers may call back into the provider and thus deadlocking must be avoided. Be sure to + * consult the provider's documentation on the implication of processing events and how a handler + * may safely use the provider (e.g., see [`ChannelManager::process_pending_events`] and + * [`ChainMonitor::process_pending_events`]). + * + * (C-not implementable) As there is likely no reason for a user to implement this trait on their + * own type(s). + * + * [`process_pending_events`]: Self::process_pending_events + * [`handle_event`]: EventHandler::handle_event + * [`ChannelManager::process_pending_events`]: crate::ln::channelmanager::ChannelManager#method.process_pending_events + * [`ChainMonitor::process_pending_events`]: crate::chain::chainmonitor::ChainMonitor#method.process_pending_events */ typedef struct LDKEventsProvider { /** @@ -7609,10 +7806,13 @@ typedef struct LDKEventsProvider { */ void *this_arg; /** - * Gets the list of pending events which were generated by previous actions, clearing the list - * in the process. + * Processes any events generated since the last call using the given event handler. + * + * Subsequent calls must only process new events. However, handlers must be capable of handling + * duplicate events across process restarts. This may occur if the provider was recovered from + * an old state (i.e., it hadn't been successfully persisted after processing pending events). */ - struct LDKCVec_EventZ (*get_and_clear_pending_events)(const void *this_arg); + void (*process_pending_events)(const void *this_arg, struct LDKEventHandler handler); /** * Frees any resources associated with this object given its this_arg pointer. * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. @@ -8617,6 +8817,64 @@ typedef struct MUST_USE_STRUCT LDKFilesystemPersister { +/** + * BackgroundProcessor takes care of tasks that (1) need to happen periodically to keep + * Rust-Lightning running properly, and (2) either can or should be run in the background. Its + * responsibilities are: + * * Monitoring whether the ChannelManager needs to be re-persisted to disk, and if so, + * writing it to disk/backups by invoking the callback given to it at startup. + * ChannelManager persistence should be done in the background. + * * Calling `ChannelManager::timer_tick_occurred()` and + * `PeerManager::timer_tick_occurred()` every minute (can be done in the + * background). + * + * Note that if ChannelManager persistence fails and the persisted manager becomes out-of-date, + * then there is a risk of channels force-closing on startup when the manager realizes it's + * outdated. However, as long as `ChannelMonitor` backups are sound, no funds besides those used + * for unilateral chain closure fees are at risk. + */ +typedef struct MUST_USE_STRUCT LDKBackgroundProcessor { + /** + * A pointer to the opaque Rust object. + * Nearly everywhere, inner must be non-null, however in places where + * the Rust equivalent takes an Option, it may be set to null to indicate None. + */ + LDKnativeBackgroundProcessor *inner; + /** + * Indicates that this is the only struct which contains the same pointer. + * Rust functions which take ownership of an object provided via an argument require + * this to be true and invalidate the object pointed to by inner. + */ + bool is_owned; +} LDKBackgroundProcessor; + +/** + * Trait which handles persisting a [`ChannelManager`] to disk. + * + * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager + */ +typedef struct LDKChannelManagerPersister { + /** + * An opaque pointer which is passed to your function implementations as an argument. + * This has no meaning in the LDK, and can be NULL or any other value. + */ + void *this_arg; + /** + * Persist the given [`ChannelManager`] to disk, returning an error if persistence failed + * (which will cause the [`BackgroundProcessor`] which called this method to exit. + * + * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager + */ + struct LDKCResult_NoneErrorZ (*persist_manager)(const void *this_arg, const struct LDKChannelManager *NONNULL_PTR channel_manager); + /** + * Frees any resources associated with this object given its this_arg pointer. + * Does not need to free the outer struct containing function pointers and may be NULL is no resources need to be freed. + */ + void (*free)(void *this_arg); +} LDKChannelManagerPersister; + + + /** * Data of the `RawInvoice` that is encoded in the data part */ @@ -8729,6 +8987,8 @@ extern const uint64_t MIN_RELAY_FEE_SAT_PER_1000_WEIGHT; extern const uint64_t CLOSED_CHANNEL_UPDATE_ID; +extern const uint32_t ANTI_REORG_DELAY; + extern const uint16_t BREAKDOWN_TIMEOUT; extern const uint16_t MIN_CLTV_EXPIRY_DELTA; @@ -8781,48 +9041,6 @@ struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig); */ void Str_free(struct LDKStr _res); -/** - * Creates a new CResult_ChannelConfigDecodeErrorZ in the success state. - */ -struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o); - -/** - * Creates a new CResult_ChannelConfigDecodeErrorZ in the error state. - */ -struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e); - -/** - * Frees any resources used by the CResult_ChannelConfigDecodeErrorZ. - */ -void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res); - -/** - * Creates a new CResult_ChannelConfigDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. - */ -struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig); - -/** - * Creates a new CResult_OutPointDecodeErrorZ in the success state. - */ -struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o); - -/** - * Creates a new CResult_OutPointDecodeErrorZ in the error state. - */ -struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e); - -/** - * Frees any resources used by the CResult_OutPointDecodeErrorZ. - */ -void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res); - -/** - * Creates a new CResult_OutPointDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. - */ -struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig); - /** * Creates a new CResult_SecretKeyErrorZ in the success state. */ @@ -8853,6 +9071,12 @@ struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1E */ void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res); +/** + * Creates a new CResult_PublicKeyErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_clone(const struct LDKCResult_PublicKeyErrorZ *NONNULL_PTR orig); + /** * Creates a new CResult_TxCreationKeysDecodeErrorZ in the success state. */ @@ -8910,6 +9134,12 @@ struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDK */ void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res); +/** + * Creates a new CResult_TxCreationKeysErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_clone(const struct LDKCResult_TxCreationKeysErrorZ *NONNULL_PTR orig); + /** * Constructs a new COption_u32Z containing a u32 */ @@ -9088,2011 +9318,2197 @@ struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LD struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void); /** - * Frees any resources used by the CResult_CVec_SignatureZNoneZ. + * Frees any resources used by the CResult_CVec_SignatureZNoneZ. + */ +void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res); + +/** + * Creates a new CResult_CVec_SignatureZNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig); + +/** + * Creates a new CResult_NoneErrorZ in the success state. + */ +struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void); + +/** + * Creates a new CResult_NoneErrorZ in the error state. + */ +struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e); + +/** + * Frees any resources used by the CResult_NoneErrorZ. + */ +void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res); + +/** + * Creates a new CResult_NoneErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_clone(const struct LDKCResult_NoneErrorZ *NONNULL_PTR orig); + +/** + * Creates a new CResult_RouteHopDecodeErrorZ in the success state. + */ +struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_ok(struct LDKRouteHop o); + +/** + * Creates a new CResult_RouteHopDecodeErrorZ in the error state. + */ +struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_err(struct LDKDecodeError e); + +/** + * Frees any resources used by the CResult_RouteHopDecodeErrorZ. + */ +void CResult_RouteHopDecodeErrorZ_free(struct LDKCResult_RouteHopDecodeErrorZ _res); + +/** + * Creates a new CResult_RouteHopDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_RouteHopDecodeErrorZ CResult_RouteHopDecodeErrorZ_clone(const struct LDKCResult_RouteHopDecodeErrorZ *NONNULL_PTR orig); + +/** + * Frees the buffer pointed to by `data` if `datalen` is non-0. + */ +void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res); + +/** + * Frees the buffer pointed to by `data` if `datalen` is non-0. + */ +void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res); + +/** + * Creates a new CResult_RouteDecodeErrorZ in the success state. + */ +struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o); + +/** + * Creates a new CResult_RouteDecodeErrorZ in the error state. + */ +struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e); + +/** + * Frees any resources used by the CResult_RouteDecodeErrorZ. + */ +void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res); + +/** + * Creates a new CResult_RouteDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig); + +/** + * Constructs a new COption_u64Z containing a u64 + */ +struct LDKCOption_u64Z COption_u64Z_some(uint64_t o); + +/** + * Constructs a new COption_u64Z containing nothing + */ +struct LDKCOption_u64Z COption_u64Z_none(void); + +/** + * Frees any resources associated with the u64, if we are in the Some state + */ +void COption_u64Z_free(struct LDKCOption_u64Z _res); + +/** + * Creates a new COption_u64Z which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig); + +/** + * Frees the buffer pointed to by `data` if `datalen` is non-0. + */ +void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res); + +/** + * Frees the buffer pointed to by `data` if `datalen` is non-0. + */ +void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res); + +/** + * Creates a new CResult_RouteLightningErrorZ in the success state. + */ +struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o); + +/** + * Creates a new CResult_RouteLightningErrorZ in the error state. + */ +struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e); + +/** + * Frees any resources used by the CResult_RouteLightningErrorZ. + */ +void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res); + +/** + * Creates a new CResult_RouteLightningErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ +struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig); + +/** + * Creates a new CResult_TxOutAccessErrorZ in the success state. + */ +struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o); + +/** + * Creates a new CResult_TxOutAccessErrorZ in the error state. + */ +struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e); + +/** + * Frees any resources used by the CResult_TxOutAccessErrorZ. + */ +void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res); + +/** + * Creates a new CResult_TxOutAccessErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res); +struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_CVec_SignatureZNoneZ which has the same data as `orig` + * Creates a new tuple which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig); +struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_clone(const struct LDKC2Tuple_usizeTransactionZ *NONNULL_PTR orig); /** - * Creates a new CResult_SiPrefixNoneZ in the success state. + * Creates a new C2Tuple_usizeTransactionZ from the contained elements. */ -struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o); +struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b); /** - * Creates a new CResult_SiPrefixNoneZ in the error state. + * Frees any resources used by the C2Tuple_usizeTransactionZ. */ -struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void); +void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res); /** - * Frees any resources used by the CResult_SiPrefixNoneZ. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res); +void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res); /** - * Creates a new CResult_SiPrefixNoneZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig); +void CVec_TxidZ_free(struct LDKCVec_TxidZ _res); /** - * Creates a new CResult_InvoiceNoneZ in the success state. + * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the success state. */ -struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o); +struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void); /** - * Creates a new CResult_InvoiceNoneZ in the error state. + * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the error state. */ -struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void); +struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e); /** - * Frees any resources used by the CResult_InvoiceNoneZ. + * Frees any resources used by the CResult_NoneChannelMonitorUpdateErrZ. */ -void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res); +void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res); /** - * Creates a new CResult_InvoiceNoneZ which has the same data as `orig` + * Creates a new CResult_NoneChannelMonitorUpdateErrZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig); +struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig); /** - * Creates a new CResult_SignedRawInvoiceNoneZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o); +void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res); /** - * Creates a new CResult_SignedRawInvoiceNoneZ in the error state. + * Constructs a new COption_C2Tuple_usizeTransactionZZ containing a crate::c_types::derived::C2Tuple_usizeTransactionZ */ -struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void); +struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o); /** - * Frees any resources used by the CResult_SignedRawInvoiceNoneZ. + * Constructs a new COption_C2Tuple_usizeTransactionZZ containing nothing */ -void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res); +struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void); /** - * Creates a new CResult_SignedRawInvoiceNoneZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees any resources associated with the crate::c_types::derived::C2Tuple_usizeTransactionZ, if we are in the Some state */ -struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig); +void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new COption_C2Tuple_usizeTransactionZZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CVec_u8Z_free(struct LDKCVec_u8Z _res); +struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_clone(const struct LDKCOption_C2Tuple_usizeTransactionZZ *NONNULL_PTR orig); /** - * Creates a new C3Tuple_RawInvoice_u832InvoiceSignatureZ from the contained elements. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c); +void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res); /** - * Frees any resources used by the C3Tuple_RawInvoice_u832InvoiceSignatureZ. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res); +void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res); /** - * Creates a new CResult_PayeePubKeyErrorZ in the success state. + * Creates a new CResult_InitFeaturesDecodeErrorZ in the success state. */ -struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o); +struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o); /** - * Creates a new CResult_PayeePubKeyErrorZ in the error state. + * Creates a new CResult_InitFeaturesDecodeErrorZ in the error state. */ -struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e); +struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_PayeePubKeyErrorZ. + * Frees any resources used by the CResult_InitFeaturesDecodeErrorZ. */ -void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res); +void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_NodeFeaturesDecodeErrorZ in the success state. */ -void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res); +struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o); /** - * Constructs a new COption_u64Z containing a u64 + * Creates a new CResult_NodeFeaturesDecodeErrorZ in the error state. */ -struct LDKCOption_u64Z COption_u64Z_some(uint64_t o); +struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e); /** - * Constructs a new COption_u64Z containing nothing + * Frees any resources used by the CResult_NodeFeaturesDecodeErrorZ. */ -struct LDKCOption_u64Z COption_u64Z_none(void); +void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res); /** - * Frees any resources associated with the u64, if we are in the Some state + * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the success state. */ -void COption_u64Z_free(struct LDKCOption_u64Z _res); +struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o); /** - * Creates a new COption_u64Z which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the error state. */ -struct LDKCOption_u64Z COption_u64Z_clone(const struct LDKCOption_u64Z *NONNULL_PTR orig); +struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_PositiveTimestampCreationErrorZ in the success state. + * Frees any resources used by the CResult_ChannelFeaturesDecodeErrorZ. */ -struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o); +void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res); /** - * Creates a new CResult_PositiveTimestampCreationErrorZ in the error state. + * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the success state. */ -struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e); +struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o); /** - * Frees any resources used by the CResult_PositiveTimestampCreationErrorZ. + * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the error state. */ -void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res); +struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_PositiveTimestampCreationErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees any resources used by the CResult_InvoiceFeaturesDecodeErrorZ. */ -struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig); +void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res); /** - * Creates a new CResult_NoneSemanticErrorZ in the success state. + * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the success state. */ -struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void); +struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKDelayedPaymentOutputDescriptor o); /** - * Creates a new CResult_NoneSemanticErrorZ in the error state. + * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ in the error state. */ -struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e); +struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_NoneSemanticErrorZ. + * Frees any resources used by the CResult_DelayedPaymentOutputDescriptorDecodeErrorZ. */ -void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res); +void CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ _res); /** - * Creates a new CResult_NoneSemanticErrorZ which has the same data as `orig` + * Creates a new CResult_DelayedPaymentOutputDescriptorDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig); +struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ CResult_DelayedPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_InvoiceSemanticErrorZ in the success state. + * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the success state. */ -struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o); +struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_ok(struct LDKStaticPaymentOutputDescriptor o); /** - * Creates a new CResult_InvoiceSemanticErrorZ in the error state. + * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ in the error state. */ -struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e); +struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_InvoiceSemanticErrorZ. + * Frees any resources used by the CResult_StaticPaymentOutputDescriptorDecodeErrorZ. */ -void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res); +void CResult_StaticPaymentOutputDescriptorDecodeErrorZ_free(struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ _res); /** - * Creates a new CResult_InvoiceSemanticErrorZ which has the same data as `orig` + * Creates a new CResult_StaticPaymentOutputDescriptorDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig); +struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ CResult_StaticPaymentOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_DescriptionCreationErrorZ in the success state. + * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the success state. */ -struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o); +struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o); /** - * Creates a new CResult_DescriptionCreationErrorZ in the error state. + * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the error state. */ -struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e); +struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_DescriptionCreationErrorZ. + * Frees any resources used by the CResult_SpendableOutputDescriptorDecodeErrorZ. */ -void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res); +void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res); /** - * Creates a new CResult_DescriptionCreationErrorZ which has the same data as `orig` + * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig); +struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ExpiryTimeCreationErrorZ in the success state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o); +struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig); /** - * Creates a new CResult_ExpiryTimeCreationErrorZ in the error state. + * Creates a new C2Tuple_SignatureCVec_SignatureZZ from the contained elements. */ -struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e); +struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b); /** - * Frees any resources used by the CResult_ExpiryTimeCreationErrorZ. + * Frees any resources used by the C2Tuple_SignatureCVec_SignatureZZ. */ -void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res); +void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res); /** - * Creates a new CResult_ExpiryTimeCreationErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the success state. */ -struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig); +struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the error state. */ -void CVec_RouteHintHopZ_free(struct LDKCVec_RouteHintHopZ _res); +struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void); /** - * Creates a new CResult_RouteHintCreationErrorZ in the success state. + * Frees any resources used by the CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ. */ -struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_ok(struct LDKRouteHint o); +void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res); /** - * Creates a new CResult_RouteHintCreationErrorZ in the error state. + * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_err(enum LDKCreationError e); +struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_RouteHintCreationErrorZ. + * Creates a new CResult_SignatureNoneZ in the success state. */ -void CResult_RouteHintCreationErrorZ_free(struct LDKCResult_RouteHintCreationErrorZ _res); +struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o); /** - * Creates a new CResult_RouteHintCreationErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_SignatureNoneZ in the error state. */ -struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_clone(const struct LDKCResult_RouteHintCreationErrorZ *NONNULL_PTR orig); +struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void); /** - * Creates a new CResult_StringErrorZ in the success state. + * Frees any resources used by the CResult_SignatureNoneZ. */ -struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o); +void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res); /** - * Creates a new CResult_StringErrorZ in the error state. + * Creates a new CResult_SignatureNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e); +struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_StringErrorZ. + * Creates a new CResult_SignDecodeErrorZ in the success state. */ -void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res); +struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o); /** - * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state. + * Creates a new CResult_SignDecodeErrorZ in the error state. */ -struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o); +struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the error state. + * Frees any resources used by the CResult_SignDecodeErrorZ. */ -struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e); +void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res); /** - * Frees any resources used by the CResult_ChannelMonitorUpdateDecodeErrorZ. + * Creates a new CResult_SignDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res); +struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig); +void CVec_u8Z_free(struct LDKCVec_u8Z _res); /** - * Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state. + * Creates a new CResult_RecoverableSignatureNoneZ in the success state. */ -struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o); +struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o); /** - * Creates a new CResult_HTLCUpdateDecodeErrorZ in the error state. + * Creates a new CResult_RecoverableSignatureNoneZ in the error state. */ -struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void); /** - * Frees any resources used by the CResult_HTLCUpdateDecodeErrorZ. + * Frees any resources used by the CResult_RecoverableSignatureNoneZ. */ -void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res); +void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res); /** - * Creates a new CResult_HTLCUpdateDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_RecoverableSignatureNoneZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig); /** - * Creates a new CResult_NoneMonitorUpdateErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void); +void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res); /** - * Creates a new CResult_NoneMonitorUpdateErrorZ in the error state. + * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the success state. */ -struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e); +struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o); /** - * Frees any resources used by the CResult_NoneMonitorUpdateErrorZ. + * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the error state. */ -void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res); +struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void); + +/** + * Frees any resources used by the CResult_CVec_CVec_u8ZZNoneZ. + */ +void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res); /** - * Creates a new CResult_NoneMonitorUpdateErrorZ which has the same data as `orig` + * Creates a new CResult_CVec_CVec_u8ZZNoneZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig); +struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig); /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_InMemorySignerDecodeErrorZ in the success state. */ -struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig); +struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o); /** - * Creates a new C2Tuple_OutPointScriptZ from the contained elements. + * Creates a new CResult_InMemorySignerDecodeErrorZ in the error state. */ -struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b); +struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the C2Tuple_OutPointScriptZ. + * Frees any resources used by the CResult_InMemorySignerDecodeErrorZ. */ -void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res); +void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res); /** - * Creates a new tuple which has the same data as `orig` + * Creates a new CResult_InMemorySignerDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig); +struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new C2Tuple_u32ScriptZ from the contained elements. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b); +void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res); /** - * Frees any resources used by the C2Tuple_u32ScriptZ. + * Creates a new CResult_TransactionNoneZ in the success state. */ -void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res); +struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_TransactionNoneZ in the error state. */ -void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res); +struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void); /** - * Creates a new C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ from the contained elements. + * Frees any resources used by the CResult_TransactionNoneZ. */ -struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b); +void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res); /** - * Frees any resources used by the C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ. + * Creates a new CResult_TransactionNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res); +struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_clone(const struct LDKCResult_TransactionNoneZ *NONNULL_PTR orig); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new C2Tuple_BlockHashChannelMonitorZ from the contained elements. */ -void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res); +struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Frees any resources used by the C2Tuple_BlockHashChannelMonitorZ. */ -void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res); +void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res); /** * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CVec_EventZ_free(struct LDKCVec_EventZ _res); +void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ in the success state. */ -void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res); +struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o); /** - * Creates a new C2Tuple_usizeTransactionZ from the contained elements. + * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ in the error state. */ -struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b); +struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e); /** - * Frees any resources used by the C2Tuple_usizeTransactionZ. + * Frees any resources used by the CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ. */ -void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res); +void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_NoneAPIErrorZ in the success state. */ -void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res); +struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void); /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_NoneAPIErrorZ in the error state. */ -struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig); +struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e); /** - * Creates a new C2Tuple_u32TxOutZ from the contained elements. + * Frees any resources used by the CResult_NoneAPIErrorZ. */ -struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b); +void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res); /** - * Frees any resources used by the C2Tuple_u32TxOutZ. + * Creates a new CResult_NoneAPIErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res); +struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig); /** * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res); - -/** - * Creates a new C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ from the contained elements. - */ -struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b); +void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res); /** - * Frees any resources used by the C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res); +void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_NonePaymentSendFailureZ in the success state. */ -void CVec_TransactionOutputsZ_free(struct LDKCVec_TransactionOutputsZ _res); +struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_NonePaymentSendFailureZ in the error state. */ -void CVec_TxidZ_free(struct LDKCVec_TxidZ _res); +struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e); /** - * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the success state. + * Frees any resources used by the CResult_NonePaymentSendFailureZ. */ -struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void); +void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res); /** - * Creates a new CResult_NoneChannelMonitorUpdateErrZ in the error state. + * Creates a new CResult_NonePaymentSendFailureZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e); +struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_NoneChannelMonitorUpdateErrZ. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res); +void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res); /** - * Creates a new CResult_NoneChannelMonitorUpdateErrZ which has the same data as `orig` + * Creates a new tuple which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig); +struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_clone(const struct LDKC2Tuple_PaymentHashPaymentSecretZ *NONNULL_PTR orig); /** - * Creates a new C2Tuple_BlockHashChannelMonitorZ from the contained elements. + * Creates a new C2Tuple_PaymentHashPaymentSecretZ from the contained elements. */ -struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b); +struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b); /** - * Frees any resources used by the C2Tuple_BlockHashChannelMonitorZ. + * Frees any resources used by the C2Tuple_PaymentHashPaymentSecretZ. */ -void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res); +void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res); /** - * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the success state. + * Creates a new CResult_PaymentSecretAPIErrorZ in the success state. */ -struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o); +struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o); /** - * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the error state. + * Creates a new CResult_PaymentSecretAPIErrorZ in the error state. */ -struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e); /** - * Frees any resources used by the CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ. + * Frees any resources used by the CResult_PaymentSecretAPIErrorZ. */ -void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res); +void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_PaymentSecretAPIErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res); +struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_clone(const struct LDKCResult_PaymentSecretAPIErrorZ *NONNULL_PTR orig); /** * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res); +void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res); /** - * Creates a new CResult_RouteDecodeErrorZ in the success state. + * Creates a new C2Tuple_BlockHashChannelManagerZ from the contained elements. */ -struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o); +struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b); /** - * Creates a new CResult_RouteDecodeErrorZ in the error state. + * Frees any resources used by the C2Tuple_BlockHashChannelManagerZ. */ -struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e); +void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res); /** - * Frees any resources used by the CResult_RouteDecodeErrorZ. + * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the success state. */ -void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res); +struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o); /** - * Creates a new CResult_RouteDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the error state. */ -struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Frees any resources used by the CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ. */ -void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res); +void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res); /** - * Creates a new CResult_RouteLightningErrorZ in the success state. + * Creates a new CResult_ChannelConfigDecodeErrorZ in the success state. */ -struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o); +struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o); /** - * Creates a new CResult_RouteLightningErrorZ in the error state. + * Creates a new CResult_ChannelConfigDecodeErrorZ in the error state. */ -struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e); +struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_RouteLightningErrorZ. + * Frees any resources used by the CResult_ChannelConfigDecodeErrorZ. */ -void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res); +void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res); /** - * Creates a new CResult_RouteLightningErrorZ which has the same data as `orig` + * Creates a new CResult_ChannelConfigDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig); +struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_OutPointDecodeErrorZ in the success state. */ -void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res); +struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o); /** - * Creates a new CResult_boolLightningErrorZ in the success state. + * Creates a new CResult_OutPointDecodeErrorZ in the error state. */ -struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o); +struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_boolLightningErrorZ in the error state. + * Frees any resources used by the CResult_OutPointDecodeErrorZ. */ -struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e); +void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res); /** - * Frees any resources used by the CResult_boolLightningErrorZ. + * Creates a new CResult_OutPointDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res); +struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_boolLightningErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_SiPrefixNoneZ in the success state. */ -struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig); +struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_ok(enum LDKSiPrefix o); /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_SiPrefixNoneZ in the error state. */ -struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig); +struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_err(void); /** - * Creates a new C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ from the contained elements. + * Frees any resources used by the CResult_SiPrefixNoneZ. */ -struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c); +void CResult_SiPrefixNoneZ_free(struct LDKCResult_SiPrefixNoneZ _res); /** - * Frees any resources used by the C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ. + * Creates a new CResult_SiPrefixNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res); +struct LDKCResult_SiPrefixNoneZ CResult_SiPrefixNoneZ_clone(const struct LDKCResult_SiPrefixNoneZ *NONNULL_PTR orig); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_InvoiceNoneZ in the success state. */ -void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res); +struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_ok(struct LDKInvoice o); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_InvoiceNoneZ in the error state. */ -void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res); +struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_err(void); /** - * Creates a new CResult_NoneLightningErrorZ in the success state. + * Frees any resources used by the CResult_InvoiceNoneZ. */ -struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void); +void CResult_InvoiceNoneZ_free(struct LDKCResult_InvoiceNoneZ _res); /** - * Creates a new CResult_NoneLightningErrorZ in the error state. + * Creates a new CResult_InvoiceNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e); +struct LDKCResult_InvoiceNoneZ CResult_InvoiceNoneZ_clone(const struct LDKCResult_InvoiceNoneZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_NoneLightningErrorZ. + * Creates a new CResult_SignedRawInvoiceNoneZ in the success state. */ -void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res); +struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_ok(struct LDKSignedRawInvoice o); /** - * Creates a new CResult_NoneLightningErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_SignedRawInvoiceNoneZ in the error state. */ -struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig); +struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_err(void); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Frees any resources used by the CResult_SignedRawInvoiceNoneZ. */ -void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res); +void CResult_SignedRawInvoiceNoneZ_free(struct LDKCResult_SignedRawInvoiceNoneZ _res); /** - * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the success state. + * Creates a new CResult_SignedRawInvoiceNoneZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o); +struct LDKCResult_SignedRawInvoiceNoneZ CResult_SignedRawInvoiceNoneZ_clone(const struct LDKCResult_SignedRawInvoiceNoneZ *NONNULL_PTR orig); /** - * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e); +struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_clone(const struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_CVec_u8ZPeerHandleErrorZ. + * Creates a new C3Tuple_RawInvoice_u832InvoiceSignatureZ from the contained elements. */ -void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res); +struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ C3Tuple_RawInvoice_u832InvoiceSignatureZ_new(struct LDKRawInvoice a, struct LDKThirtyTwoBytes b, struct LDKInvoiceSignature c); /** - * Creates a new CResult_CVec_u8ZPeerHandleErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees any resources used by the C3Tuple_RawInvoice_u832InvoiceSignatureZ. */ -struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig); +void C3Tuple_RawInvoice_u832InvoiceSignatureZ_free(struct LDKC3Tuple_RawInvoice_u832InvoiceSignatureZ _res); /** - * Creates a new CResult_NonePeerHandleErrorZ in the success state. + * Creates a new CResult_PayeePubKeyErrorZ in the success state. */ -struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void); +struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_ok(struct LDKPayeePubKey o); /** - * Creates a new CResult_NonePeerHandleErrorZ in the error state. + * Creates a new CResult_PayeePubKeyErrorZ in the error state. */ -struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e); +struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_err(enum LDKSecp256k1Error e); /** - * Frees any resources used by the CResult_NonePeerHandleErrorZ. + * Frees any resources used by the CResult_PayeePubKeyErrorZ. */ -void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res); +void CResult_PayeePubKeyErrorZ_free(struct LDKCResult_PayeePubKeyErrorZ _res); /** - * Creates a new CResult_NonePeerHandleErrorZ which has the same data as `orig` + * Creates a new CResult_PayeePubKeyErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig); +struct LDKCResult_PayeePubKeyErrorZ CResult_PayeePubKeyErrorZ_clone(const struct LDKCResult_PayeePubKeyErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_boolPeerHandleErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o); +void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res); /** - * Creates a new CResult_boolPeerHandleErrorZ in the error state. + * Creates a new CResult_PositiveTimestampCreationErrorZ in the success state. */ -struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e); +struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_ok(struct LDKPositiveTimestamp o); /** - * Frees any resources used by the CResult_boolPeerHandleErrorZ. + * Creates a new CResult_PositiveTimestampCreationErrorZ in the error state. */ -void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res); +struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_err(enum LDKCreationError e); /** - * Creates a new CResult_boolPeerHandleErrorZ which has the same data as `orig` + * Frees any resources used by the CResult_PositiveTimestampCreationErrorZ. + */ +void CResult_PositiveTimestampCreationErrorZ_free(struct LDKCResult_PositiveTimestampCreationErrorZ _res); + +/** + * Creates a new CResult_PositiveTimestampCreationErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig); +struct LDKCResult_PositiveTimestampCreationErrorZ CResult_PositiveTimestampCreationErrorZ_clone(const struct LDKCResult_PositiveTimestampCreationErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_TxOutAccessErrorZ in the success state. + * Creates a new CResult_NoneSemanticErrorZ in the success state. */ -struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o); +struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_ok(void); /** - * Creates a new CResult_TxOutAccessErrorZ in the error state. + * Creates a new CResult_NoneSemanticErrorZ in the error state. */ -struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e); +struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_err(enum LDKSemanticError e); /** - * Frees any resources used by the CResult_TxOutAccessErrorZ. + * Frees any resources used by the CResult_NoneSemanticErrorZ. */ -void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res); +void CResult_NoneSemanticErrorZ_free(struct LDKCResult_NoneSemanticErrorZ _res); /** - * Creates a new CResult_TxOutAccessErrorZ which has the same data as `orig` + * Creates a new CResult_NoneSemanticErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig); +struct LDKCResult_NoneSemanticErrorZ CResult_NoneSemanticErrorZ_clone(const struct LDKCResult_NoneSemanticErrorZ *NONNULL_PTR orig); /** - * Constructs a new COption_C2Tuple_usizeTransactionZZ containing a crate::c_types::derived::C2Tuple_usizeTransactionZ + * Creates a new CResult_InvoiceSemanticErrorZ in the success state. */ -struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_some(struct LDKC2Tuple_usizeTransactionZ o); +struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_ok(struct LDKInvoice o); /** - * Constructs a new COption_C2Tuple_usizeTransactionZZ containing nothing + * Creates a new CResult_InvoiceSemanticErrorZ in the error state. */ -struct LDKCOption_C2Tuple_usizeTransactionZZ COption_C2Tuple_usizeTransactionZZ_none(void); +struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_err(enum LDKSemanticError e); /** - * Frees any resources associated with the crate::c_types::derived::C2Tuple_usizeTransactionZ, if we are in the Some state + * Frees any resources used by the CResult_InvoiceSemanticErrorZ. */ -void COption_C2Tuple_usizeTransactionZZ_free(struct LDKCOption_C2Tuple_usizeTransactionZZ _res); +void CResult_InvoiceSemanticErrorZ_free(struct LDKCResult_InvoiceSemanticErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_InvoiceSemanticErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res); +struct LDKCResult_InvoiceSemanticErrorZ CResult_InvoiceSemanticErrorZ_clone(const struct LDKCResult_InvoiceSemanticErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ in the success state. + * Creates a new CResult_DescriptionCreationErrorZ in the success state. */ -struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o); +struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_ok(struct LDKDescription o); /** - * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ in the error state. + * Creates a new CResult_DescriptionCreationErrorZ in the error state. */ -struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_err(enum LDKCreationError e); /** - * Frees any resources used by the CResult_DirectionalChannelInfoDecodeErrorZ. + * Frees any resources used by the CResult_DescriptionCreationErrorZ. */ -void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res); +void CResult_DescriptionCreationErrorZ_free(struct LDKCResult_DescriptionCreationErrorZ _res); /** - * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_DescriptionCreationErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_DescriptionCreationErrorZ CResult_DescriptionCreationErrorZ_clone(const struct LDKCResult_DescriptionCreationErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ChannelInfoDecodeErrorZ in the success state. + * Creates a new CResult_ExpiryTimeCreationErrorZ in the success state. */ -struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o); +struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_ok(struct LDKExpiryTime o); /** - * Creates a new CResult_ChannelInfoDecodeErrorZ in the error state. + * Creates a new CResult_ExpiryTimeCreationErrorZ in the error state. */ -struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_err(enum LDKCreationError e); /** - * Frees any resources used by the CResult_ChannelInfoDecodeErrorZ. + * Frees any resources used by the CResult_ExpiryTimeCreationErrorZ. */ -void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res); +void CResult_ExpiryTimeCreationErrorZ_free(struct LDKCResult_ExpiryTimeCreationErrorZ _res); /** - * Creates a new CResult_ChannelInfoDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ExpiryTimeCreationErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ExpiryTimeCreationErrorZ CResult_ExpiryTimeCreationErrorZ_clone(const struct LDKCResult_ExpiryTimeCreationErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_RoutingFeesDecodeErrorZ in the success state. + * Creates a new CResult_RouteHintCreationErrorZ in the success state. */ -struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o); +struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_ok(struct LDKRouteHint o); /** - * Creates a new CResult_RoutingFeesDecodeErrorZ in the error state. + * Creates a new CResult_RouteHintCreationErrorZ in the error state. */ -struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_err(enum LDKCreationError e); /** - * Frees any resources used by the CResult_RoutingFeesDecodeErrorZ. + * Frees any resources used by the CResult_RouteHintCreationErrorZ. */ -void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res); +void CResult_RouteHintCreationErrorZ_free(struct LDKCResult_RouteHintCreationErrorZ _res); /** - * Creates a new CResult_RoutingFeesDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_RouteHintCreationErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_RouteHintCreationErrorZ CResult_RouteHintCreationErrorZ_clone(const struct LDKCResult_RouteHintCreationErrorZ *NONNULL_PTR orig); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_StringErrorZ in the success state. */ -void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res); +struct LDKCResult_StringErrorZ CResult_StringErrorZ_ok(struct LDKStr o); /** - * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the success state. + * Creates a new CResult_StringErrorZ in the error state. */ -struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o); +struct LDKCResult_StringErrorZ CResult_StringErrorZ_err(enum LDKSecp256k1Error e); /** - * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the error state. + * Frees any resources used by the CResult_StringErrorZ. */ -struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e); +void CResult_StringErrorZ_free(struct LDKCResult_StringErrorZ _res); /** - * Frees any resources used by the CResult_NodeAnnouncementInfoDecodeErrorZ. + * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the success state. */ -void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res); +struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o); /** - * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ in the error state. */ -struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Frees any resources used by the CResult_ChannelMonitorUpdateDecodeErrorZ. */ -void CVec_u64Z_free(struct LDKCVec_u64Z _res); +void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res); /** - * Creates a new CResult_NodeInfoDecodeErrorZ in the success state. + * Creates a new CResult_ChannelMonitorUpdateDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o); +struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_NodeInfoDecodeErrorZ in the error state. + * Creates a new CResult_HTLCUpdateDecodeErrorZ in the success state. */ -struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o); /** - * Frees any resources used by the CResult_NodeInfoDecodeErrorZ. + * Creates a new CResult_HTLCUpdateDecodeErrorZ in the error state. */ -void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res); +struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_NodeInfoDecodeErrorZ which has the same data as `orig` + * Frees any resources used by the CResult_HTLCUpdateDecodeErrorZ. + */ +void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res); + +/** + * Creates a new CResult_HTLCUpdateDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_NetworkGraphDecodeErrorZ in the success state. + * Creates a new CResult_NoneMonitorUpdateErrorZ in the success state. */ -struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o); +struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void); /** - * Creates a new CResult_NetworkGraphDecodeErrorZ in the error state. + * Creates a new CResult_NoneMonitorUpdateErrorZ in the error state. */ -struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e); /** - * Frees any resources used by the CResult_NetworkGraphDecodeErrorZ. + * Frees any resources used by the CResult_NoneMonitorUpdateErrorZ. */ -void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res); +void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res); /** - * Creates a new CResult_NetworkGraphDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_NoneMonitorUpdateErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_InitFeaturesDecodeErrorZ in the success state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o); +struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig); /** - * Creates a new CResult_InitFeaturesDecodeErrorZ in the error state. + * Creates a new C2Tuple_OutPointScriptZ from the contained elements. */ -struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b); /** - * Frees any resources used by the CResult_InitFeaturesDecodeErrorZ. + * Frees any resources used by the C2Tuple_OutPointScriptZ. */ -void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res); +void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res); /** - * Creates a new CResult_NodeFeaturesDecodeErrorZ in the success state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o); +struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_clone(const struct LDKC2Tuple_u32ScriptZ *NONNULL_PTR orig); /** - * Creates a new CResult_NodeFeaturesDecodeErrorZ in the error state. + * Creates a new C2Tuple_u32ScriptZ from the contained elements. */ -struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKC2Tuple_u32ScriptZ C2Tuple_u32ScriptZ_new(uint32_t a, struct LDKCVec_u8Z b); /** - * Frees any resources used by the CResult_NodeFeaturesDecodeErrorZ. + * Frees any resources used by the C2Tuple_u32ScriptZ. */ -void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res); +void C2Tuple_u32ScriptZ_free(struct LDKC2Tuple_u32ScriptZ _res); /** - * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o); +void CVec_C2Tuple_u32ScriptZZ_free(struct LDKCVec_C2Tuple_u32ScriptZZ _res); /** - * Creates a new CResult_ChannelFeaturesDecodeErrorZ in the error state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_ChannelFeaturesDecodeErrorZ. + * Creates a new C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ from the contained elements. */ -void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res); +struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32ScriptZZ b); /** - * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the success state. + * Frees any resources used by the C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ. */ -struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_ok(struct LDKInvoiceFeatures o); +void C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32ScriptZZZ _res); /** - * Creates a new CResult_InvoiceFeaturesDecodeErrorZ in the error state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_InvoiceFeaturesDecodeErrorZ CResult_InvoiceFeaturesDecodeErrorZ_err(struct LDKDecodeError e); +void CVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32ScriptZZZZ _res); /** - * Frees any resources used by the CResult_InvoiceFeaturesDecodeErrorZ. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CResult_InvoiceFeaturesDecodeErrorZ_free(struct LDKCResult_InvoiceFeaturesDecodeErrorZ _res); +void CVec_EventZ_free(struct LDKCVec_EventZ _res); /** - * Creates a new CResult_NetAddressu8Z in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o); +void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res); /** - * Creates a new CResult_NetAddressu8Z in the error state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e); +struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_NetAddressu8Z. + * Creates a new C2Tuple_u32TxOutZ from the contained elements. */ -void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res); +struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b); /** - * Creates a new CResult_NetAddressu8Z which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees any resources used by the C2Tuple_u32TxOutZ. */ -struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig); +void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res); /** - * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o); +void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res); /** - * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ in the error state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_clone(const struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *NONNULL_PTR orig); /** - * Frees any resources used by the CResult_CResult_NetAddressu8ZDecodeErrorZ. + * Creates a new C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ from the contained elements. */ -void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res); +struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b); /** - * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees any resources used by the C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ. */ -struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig); +void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res); /** * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res); +void CVec_TransactionOutputsZ_free(struct LDKCVec_TransactionOutputsZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the success state. */ -void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res); +struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ in the error state. */ -void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res); +struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Frees any resources used by the CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ. */ -void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res); +void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res); /** - * Creates a new CResult_AcceptChannelDecodeErrorZ in the success state. + * Creates a new CResult_boolLightningErrorZ in the success state. */ -struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o); +struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o); /** - * Creates a new CResult_AcceptChannelDecodeErrorZ in the error state. + * Creates a new CResult_boolLightningErrorZ in the error state. */ -struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e); /** - * Frees any resources used by the CResult_AcceptChannelDecodeErrorZ. + * Frees any resources used by the CResult_boolLightningErrorZ. */ -void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res); +void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res); /** - * Creates a new CResult_AcceptChannelDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_boolLightningErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state. + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o); +struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig); /** - * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the error state. + * Creates a new C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ from the contained elements. */ -struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c); /** - * Frees any resources used by the CResult_AnnouncementSignaturesDecodeErrorZ. + * Frees any resources used by the C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ. */ -void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res); +void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res); /** - * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig); +void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res); /** - * Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o); +void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res); /** - * Creates a new CResult_ChannelReestablishDecodeErrorZ in the error state. + * Creates a new CResult_NoneLightningErrorZ in the success state. */ -struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void); /** - * Frees any resources used by the CResult_ChannelReestablishDecodeErrorZ. + * Creates a new CResult_NoneLightningErrorZ in the error state. */ -void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res); +struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e); /** - * Creates a new CResult_ChannelReestablishDecodeErrorZ which has the same data as `orig` + * Frees any resources used by the CResult_NoneLightningErrorZ. + */ +void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res); + +/** + * Creates a new CResult_NoneLightningErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ClosingSignedDecodeErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o); +void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res); /** - * Creates a new CResult_ClosingSignedDecodeErrorZ in the error state. + * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the success state. */ -struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o); /** - * Frees any resources used by the CResult_ClosingSignedDecodeErrorZ. + * Creates a new CResult_CVec_u8ZPeerHandleErrorZ in the error state. */ -void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res); +struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e); /** - * Creates a new CResult_ClosingSignedDecodeErrorZ which has the same data as `orig` + * Frees any resources used by the CResult_CVec_u8ZPeerHandleErrorZ. + */ +void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res); + +/** + * Creates a new CResult_CVec_u8ZPeerHandleErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state. + * Creates a new CResult_NonePeerHandleErrorZ in the success state. */ -struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o); +struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void); /** - * Creates a new CResult_CommitmentSignedDecodeErrorZ in the error state. + * Creates a new CResult_NonePeerHandleErrorZ in the error state. */ -struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e); /** - * Frees any resources used by the CResult_CommitmentSignedDecodeErrorZ. + * Frees any resources used by the CResult_NonePeerHandleErrorZ. */ -void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res); +void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res); /** - * Creates a new CResult_CommitmentSignedDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_NonePeerHandleErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_FundingCreatedDecodeErrorZ in the success state. + * Creates a new CResult_boolPeerHandleErrorZ in the success state. */ -struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o); +struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o); /** - * Creates a new CResult_FundingCreatedDecodeErrorZ in the error state. + * Creates a new CResult_boolPeerHandleErrorZ in the error state. */ -struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e); /** - * Frees any resources used by the CResult_FundingCreatedDecodeErrorZ. + * Frees any resources used by the CResult_boolPeerHandleErrorZ. */ -void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res); +void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res); /** - * Creates a new CResult_FundingCreatedDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_boolPeerHandleErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_FundingSignedDecodeErrorZ in the success state. + * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ in the success state. */ -struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o); +struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o); /** - * Creates a new CResult_FundingSignedDecodeErrorZ in the error state. + * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ in the error state. */ -struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_FundingSignedDecodeErrorZ. + * Frees any resources used by the CResult_DirectionalChannelInfoDecodeErrorZ. */ -void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res); +void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res); /** - * Creates a new CResult_FundingSignedDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_DirectionalChannelInfoDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_FundingLockedDecodeErrorZ in the success state. + * Creates a new CResult_ChannelInfoDecodeErrorZ in the success state. */ -struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o); +struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o); /** - * Creates a new CResult_FundingLockedDecodeErrorZ in the error state. + * Creates a new CResult_ChannelInfoDecodeErrorZ in the error state. */ -struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_FundingLockedDecodeErrorZ. + * Frees any resources used by the CResult_ChannelInfoDecodeErrorZ. */ -void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res); +void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res); /** - * Creates a new CResult_FundingLockedDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ChannelInfoDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_InitDecodeErrorZ in the success state. + * Creates a new CResult_RoutingFeesDecodeErrorZ in the success state. */ -struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o); +struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o); /** - * Creates a new CResult_InitDecodeErrorZ in the error state. + * Creates a new CResult_RoutingFeesDecodeErrorZ in the error state. */ -struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_InitDecodeErrorZ. + * Frees any resources used by the CResult_RoutingFeesDecodeErrorZ. */ -void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res); +void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res); /** - * Creates a new CResult_InitDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_RoutingFeesDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_OpenChannelDecodeErrorZ in the success state. + * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the success state. */ -struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o); +struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o); /** - * Creates a new CResult_OpenChannelDecodeErrorZ in the error state. + * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ in the error state. */ -struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_OpenChannelDecodeErrorZ. + * Frees any resources used by the CResult_NodeAnnouncementInfoDecodeErrorZ. */ -void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res); +void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res); /** - * Creates a new CResult_OpenChannelDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_NodeAnnouncementInfoDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o); +void CVec_u64Z_free(struct LDKCVec_u64Z _res); /** - * Creates a new CResult_RevokeAndACKDecodeErrorZ in the error state. + * Creates a new CResult_NodeInfoDecodeErrorZ in the success state. */ -struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o); /** - * Frees any resources used by the CResult_RevokeAndACKDecodeErrorZ. + * Creates a new CResult_NodeInfoDecodeErrorZ in the error state. */ -void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res); +struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_RevokeAndACKDecodeErrorZ which has the same data as `orig` + * Frees any resources used by the CResult_NodeInfoDecodeErrorZ. + */ +void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res); + +/** + * Creates a new CResult_NodeInfoDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ShutdownDecodeErrorZ in the success state. + * Creates a new CResult_NetworkGraphDecodeErrorZ in the success state. */ -struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o); +struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o); /** - * Creates a new CResult_ShutdownDecodeErrorZ in the error state. + * Creates a new CResult_NetworkGraphDecodeErrorZ in the error state. */ -struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_ShutdownDecodeErrorZ. + * Frees any resources used by the CResult_NetworkGraphDecodeErrorZ. */ -void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res); +void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res); /** - * Creates a new CResult_ShutdownDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_NetworkGraphDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state. + * Creates a new CResult_NetAddressu8Z in the success state. */ -struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o); +struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o); /** - * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the error state. + * Creates a new CResult_NetAddressu8Z in the error state. */ -struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e); /** - * Frees any resources used by the CResult_UpdateFailHTLCDecodeErrorZ. + * Frees any resources used by the CResult_NetAddressu8Z. */ -void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res); +void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res); /** - * Creates a new CResult_UpdateFailHTLCDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_NetAddressu8Z which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig); /** - * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state. + * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ in the success state. */ -struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o); +struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o); /** - * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the error state. + * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ in the error state. */ -struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_UpdateFailMalformedHTLCDecodeErrorZ. + * Frees any resources used by the CResult_CResult_NetAddressu8ZDecodeErrorZ. */ -void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res); +void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res); /** - * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_CResult_NetAddressu8ZDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_UpdateFeeDecodeErrorZ in the success state. + * Creates a new CResult_NetAddressDecodeErrorZ in the success state. */ -struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o); +struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_ok(struct LDKNetAddress o); /** - * Creates a new CResult_UpdateFeeDecodeErrorZ in the error state. + * Creates a new CResult_NetAddressDecodeErrorZ in the error state. */ -struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_UpdateFeeDecodeErrorZ. + * Frees any resources used by the CResult_NetAddressDecodeErrorZ. */ -void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res); +void CResult_NetAddressDecodeErrorZ_free(struct LDKCResult_NetAddressDecodeErrorZ _res); /** - * Creates a new CResult_UpdateFeeDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_NetAddressDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_NetAddressDecodeErrorZ CResult_NetAddressDecodeErrorZ_clone(const struct LDKCResult_NetAddressDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o); +void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res); /** - * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the error state. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e); +void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res); /** - * Frees any resources used by the CResult_UpdateFulfillHTLCDecodeErrorZ. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res); +void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res); /** - * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees the buffer pointed to by `data` if `datalen` is non-0. */ -struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig); +void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res); /** - * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state. + * Creates a new CResult_AcceptChannelDecodeErrorZ in the success state. */ -struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o); +struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o); /** - * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the error state. + * Creates a new CResult_AcceptChannelDecodeErrorZ in the error state. */ -struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_UpdateAddHTLCDecodeErrorZ. + * Frees any resources used by the CResult_AcceptChannelDecodeErrorZ. */ -void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res); +void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res); /** - * Creates a new CResult_UpdateAddHTLCDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_AcceptChannelDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_PingDecodeErrorZ in the success state. + * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the success state. */ -struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o); +struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o); /** - * Creates a new CResult_PingDecodeErrorZ in the error state. + * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ in the error state. */ -struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_PingDecodeErrorZ. + * Frees any resources used by the CResult_AnnouncementSignaturesDecodeErrorZ. */ -void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res); +void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res); /** - * Creates a new CResult_PingDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_AnnouncementSignaturesDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_PongDecodeErrorZ in the success state. + * Creates a new CResult_ChannelReestablishDecodeErrorZ in the success state. */ -struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o); +struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o); /** - * Creates a new CResult_PongDecodeErrorZ in the error state. + * Creates a new CResult_ChannelReestablishDecodeErrorZ in the error state. */ -struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_PongDecodeErrorZ. + * Frees any resources used by the CResult_ChannelReestablishDecodeErrorZ. */ -void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res); +void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res); /** - * Creates a new CResult_PongDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ChannelReestablishDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state. + * Creates a new CResult_ClosingSignedDecodeErrorZ in the success state. */ -struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o); +struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o); /** - * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the error state. + * Creates a new CResult_ClosingSignedDecodeErrorZ in the error state. */ -struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_UnsignedChannelAnnouncementDecodeErrorZ. + * Frees any resources used by the CResult_ClosingSignedDecodeErrorZ. */ -void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res); +void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res); /** - * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ClosingSignedDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state. + * Creates a new CResult_CommitmentSignedDecodeErrorZ in the success state. */ -struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o); +struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o); /** - * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the error state. + * Creates a new CResult_CommitmentSignedDecodeErrorZ in the error state. */ -struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_ChannelAnnouncementDecodeErrorZ. + * Frees any resources used by the CResult_CommitmentSignedDecodeErrorZ. */ -void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res); +void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res); /** - * Creates a new CResult_ChannelAnnouncementDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_CommitmentSignedDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state. + * Creates a new CResult_FundingCreatedDecodeErrorZ in the success state. */ -struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o); +struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o); /** - * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the error state. + * Creates a new CResult_FundingCreatedDecodeErrorZ in the error state. */ -struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_UnsignedChannelUpdateDecodeErrorZ. + * Frees any resources used by the CResult_FundingCreatedDecodeErrorZ. */ -void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res); +void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res); /** - * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_FundingCreatedDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state. + * Creates a new CResult_FundingSignedDecodeErrorZ in the success state. */ -struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o); +struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o); /** - * Creates a new CResult_ChannelUpdateDecodeErrorZ in the error state. + * Creates a new CResult_FundingSignedDecodeErrorZ in the error state. */ -struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_ChannelUpdateDecodeErrorZ. + * Frees any resources used by the CResult_FundingSignedDecodeErrorZ. */ -void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res); +void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res); /** - * Creates a new CResult_ChannelUpdateDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_FundingSignedDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ErrorMessageDecodeErrorZ in the success state. + * Creates a new CResult_FundingLockedDecodeErrorZ in the success state. */ -struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o); +struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o); /** - * Creates a new CResult_ErrorMessageDecodeErrorZ in the error state. + * Creates a new CResult_FundingLockedDecodeErrorZ in the error state. */ -struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_ErrorMessageDecodeErrorZ. + * Frees any resources used by the CResult_FundingLockedDecodeErrorZ. */ -void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res); +void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res); /** - * Creates a new CResult_ErrorMessageDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_FundingLockedDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state. + * Creates a new CResult_InitDecodeErrorZ in the success state. */ -struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o); +struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o); /** - * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the error state. + * Creates a new CResult_InitDecodeErrorZ in the error state. */ -struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_UnsignedNodeAnnouncementDecodeErrorZ. + * Frees any resources used by the CResult_InitDecodeErrorZ. */ -void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res); +void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res); /** - * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_InitDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state. + * Creates a new CResult_OpenChannelDecodeErrorZ in the success state. */ -struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o); +struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o); /** - * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the error state. + * Creates a new CResult_OpenChannelDecodeErrorZ in the error state. */ -struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_NodeAnnouncementDecodeErrorZ. + * Frees any resources used by the CResult_OpenChannelDecodeErrorZ. */ -void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res); +void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res); /** - * Creates a new CResult_NodeAnnouncementDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_OpenChannelDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state. + * Creates a new CResult_RevokeAndACKDecodeErrorZ in the success state. */ -struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o); +struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o); /** - * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the error state. + * Creates a new CResult_RevokeAndACKDecodeErrorZ in the error state. */ -struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_QueryShortChannelIdsDecodeErrorZ. + * Frees any resources used by the CResult_RevokeAndACKDecodeErrorZ. */ -void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res); +void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res); /** - * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_RevokeAndACKDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state. + * Creates a new CResult_ShutdownDecodeErrorZ in the success state. */ -struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o); +struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o); /** - * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the error state. + * Creates a new CResult_ShutdownDecodeErrorZ in the error state. */ -struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_ReplyShortChannelIdsEndDecodeErrorZ. + * Frees any resources used by the CResult_ShutdownDecodeErrorZ. */ -void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res); +void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res); /** - * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ShutdownDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state. + * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the success state. */ -struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o); +struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o); /** - * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the error state. + * Creates a new CResult_UpdateFailHTLCDecodeErrorZ in the error state. */ -struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_QueryChannelRangeDecodeErrorZ. + * Frees any resources used by the CResult_UpdateFailHTLCDecodeErrorZ. */ -void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res); +void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res); /** - * Creates a new CResult_QueryChannelRangeDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_UpdateFailHTLCDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state. + * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the success state. */ -struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o); +struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o); /** - * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the error state. + * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ in the error state. */ -struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_ReplyChannelRangeDecodeErrorZ. + * Frees any resources used by the CResult_UpdateFailMalformedHTLCDecodeErrorZ. */ -void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res); +void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res); /** - * Creates a new CResult_ReplyChannelRangeDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_UpdateFailMalformedHTLCDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state. + * Creates a new CResult_UpdateFeeDecodeErrorZ in the success state. */ -struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o); +struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o); /** - * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the error state. + * Creates a new CResult_UpdateFeeDecodeErrorZ in the error state. */ -struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_GossipTimestampFilterDecodeErrorZ. + * Frees any resources used by the CResult_UpdateFeeDecodeErrorZ. */ -void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res); +void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res); /** - * Creates a new CResult_GossipTimestampFilterDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_UpdateFeeDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_InvoiceSignOrCreationErrorZ in the success state. + * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the success state. */ -struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o); +struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o); /** - * Creates a new CResult_InvoiceSignOrCreationErrorZ in the error state. + * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ in the error state. */ -struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e); +struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_InvoiceSignOrCreationErrorZ. + * Frees any resources used by the CResult_UpdateFulfillHTLCDecodeErrorZ. */ -void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res); +void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res); /** - * Creates a new CResult_InvoiceSignOrCreationErrorZ which has the same data as `orig` + * Creates a new CResult_UpdateFulfillHTLCDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig); +struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the success state. + * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the success state. */ -struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o); +struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o); /** - * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ in the error state. + * Creates a new CResult_UpdateAddHTLCDecodeErrorZ in the error state. */ -struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_SpendableOutputDescriptorDecodeErrorZ. + * Frees any resources used by the CResult_UpdateAddHTLCDecodeErrorZ. */ -void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res); +void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res); /** - * Creates a new CResult_SpendableOutputDescriptorDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_UpdateAddHTLCDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new tuple which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_PingDecodeErrorZ in the success state. */ -struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig); +struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o); /** - * Creates a new C2Tuple_SignatureCVec_SignatureZZ from the contained elements. + * Creates a new CResult_PingDecodeErrorZ in the error state. */ -struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b); +struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the C2Tuple_SignatureCVec_SignatureZZ. + * Frees any resources used by the CResult_PingDecodeErrorZ. */ -void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res); +void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res); /** - * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the success state. + * Creates a new CResult_PingDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o); +struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ in the error state. + * Creates a new CResult_PongDecodeErrorZ in the success state. */ -struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void); +struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o); /** - * Frees any resources used by the CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ. + * Creates a new CResult_PongDecodeErrorZ in the error state. */ -void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res); +struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ which has the same data as `orig` + * Frees any resources used by the CResult_PongDecodeErrorZ. + */ +void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res); + +/** + * Creates a new CResult_PongDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig); +struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_SignatureNoneZ in the success state. + * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the success state. */ -struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o); +struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o); /** - * Creates a new CResult_SignatureNoneZ in the error state. + * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ in the error state. */ -struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void); +struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_SignatureNoneZ. + * Frees any resources used by the CResult_UnsignedChannelAnnouncementDecodeErrorZ. */ -void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res); +void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res); /** - * Creates a new CResult_SignatureNoneZ which has the same data as `orig` + * Creates a new CResult_UnsignedChannelAnnouncementDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig); +struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_SignDecodeErrorZ in the success state. + * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the success state. */ -struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o); +struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o); /** - * Creates a new CResult_SignDecodeErrorZ in the error state. + * Creates a new CResult_ChannelAnnouncementDecodeErrorZ in the error state. */ -struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_SignDecodeErrorZ. + * Frees any resources used by the CResult_ChannelAnnouncementDecodeErrorZ. */ -void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res); +void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res); /** - * Creates a new CResult_SignDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ChannelAnnouncementDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_RecoverableSignatureNoneZ in the success state. + * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the success state. */ -struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_ok(struct LDKRecoverableSignature o); +struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o); /** - * Creates a new CResult_RecoverableSignatureNoneZ in the error state. + * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ in the error state. */ -struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_err(void); +struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_RecoverableSignatureNoneZ. + * Frees any resources used by the CResult_UnsignedChannelUpdateDecodeErrorZ. */ -void CResult_RecoverableSignatureNoneZ_free(struct LDKCResult_RecoverableSignatureNoneZ _res); +void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res); /** - * Creates a new CResult_RecoverableSignatureNoneZ which has the same data as `orig` + * Creates a new CResult_UnsignedChannelUpdateDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_RecoverableSignatureNoneZ CResult_RecoverableSignatureNoneZ_clone(const struct LDKCResult_RecoverableSignatureNoneZ *NONNULL_PTR orig); - -/** - * Frees the buffer pointed to by `data` if `datalen` is non-0. - */ -void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res); +struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the success state. + * Creates a new CResult_ChannelUpdateDecodeErrorZ in the success state. */ -struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o); +struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o); /** - * Creates a new CResult_CVec_CVec_u8ZZNoneZ in the error state. + * Creates a new CResult_ChannelUpdateDecodeErrorZ in the error state. */ -struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void); +struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_CVec_CVec_u8ZZNoneZ. + * Frees any resources used by the CResult_ChannelUpdateDecodeErrorZ. */ -void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res); +void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res); /** - * Creates a new CResult_CVec_CVec_u8ZZNoneZ which has the same data as `orig` + * Creates a new CResult_ChannelUpdateDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig); +struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_InMemorySignerDecodeErrorZ in the success state. + * Creates a new CResult_ErrorMessageDecodeErrorZ in the success state. */ -struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o); +struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o); /** - * Creates a new CResult_InMemorySignerDecodeErrorZ in the error state. + * Creates a new CResult_ErrorMessageDecodeErrorZ in the error state. */ -struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e); +struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_InMemorySignerDecodeErrorZ. + * Frees any resources used by the CResult_ErrorMessageDecodeErrorZ. */ -void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res); +void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res); /** - * Creates a new CResult_InMemorySignerDecodeErrorZ which has the same data as `orig` + * Creates a new CResult_ErrorMessageDecodeErrorZ which has the same data as `orig` * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig); +struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the success state. */ -void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res); +struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o); /** - * Creates a new CResult_TransactionNoneZ in the success state. + * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ in the error state. */ -struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o); +struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_TransactionNoneZ in the error state. + * Frees any resources used by the CResult_UnsignedNodeAnnouncementDecodeErrorZ. */ -struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void); +void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res); /** - * Frees any resources used by the CResult_TransactionNoneZ. + * Creates a new CResult_UnsignedNodeAnnouncementDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res); +struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_NoneErrorZ in the success state. + * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the success state. */ -struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_ok(void); +struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o); /** - * Creates a new CResult_NoneErrorZ in the error state. + * Creates a new CResult_NodeAnnouncementDecodeErrorZ in the error state. */ -struct LDKCResult_NoneErrorZ CResult_NoneErrorZ_err(enum LDKIOError e); +struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_NoneErrorZ. + * Frees any resources used by the CResult_NodeAnnouncementDecodeErrorZ. */ -void CResult_NoneErrorZ_free(struct LDKCResult_NoneErrorZ _res); +void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_NodeAnnouncementDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CVec_C2Tuple_BlockHashChannelMonitorZZ_free(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ _res); +struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ in the success state. + * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the success state. */ -struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_ok(struct LDKCVec_C2Tuple_BlockHashChannelMonitorZZ o); +struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o); /** - * Creates a new CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ in the error state. + * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ in the error state. */ -struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_err(enum LDKIOError e); +struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ. + * Frees any resources used by the CResult_QueryShortChannelIdsDecodeErrorZ. */ -void CResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ_free(struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ _res); +void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res); /** - * Creates a new CResult_NoneAPIErrorZ in the success state. + * Creates a new CResult_QueryShortChannelIdsDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void); +struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_NoneAPIErrorZ in the error state. + * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the success state. */ -struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e); +struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o); /** - * Frees any resources used by the CResult_NoneAPIErrorZ. + * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ in the error state. */ -void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res); +struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_NoneAPIErrorZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Frees any resources used by the CResult_ReplyShortChannelIdsEndDecodeErrorZ. */ -struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig); +void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_ReplyShortChannelIdsEndDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res); +struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the success state. */ -void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res); +struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o); /** - * Creates a new CResult_NonePaymentSendFailureZ in the success state. + * Creates a new CResult_QueryChannelRangeDecodeErrorZ in the error state. */ -struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void); +struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e); /** - * Creates a new CResult_NonePaymentSendFailureZ in the error state. + * Frees any resources used by the CResult_QueryChannelRangeDecodeErrorZ. */ -struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e); +void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res); /** - * Frees any resources used by the CResult_NonePaymentSendFailureZ. + * Creates a new CResult_QueryChannelRangeDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res); +struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_NonePaymentSendFailureZ which has the same data as `orig` - * but with all dynamically-allocated buffers duplicated in new buffers. + * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the success state. */ -struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig); +struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o); /** - * Creates a new C2Tuple_PaymentHashPaymentSecretZ from the contained elements. + * Creates a new CResult_ReplyChannelRangeDecodeErrorZ in the error state. */ -struct LDKC2Tuple_PaymentHashPaymentSecretZ C2Tuple_PaymentHashPaymentSecretZ_new(struct LDKThirtyTwoBytes a, struct LDKThirtyTwoBytes b); +struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees any resources used by the C2Tuple_PaymentHashPaymentSecretZ. + * Frees any resources used by the CResult_ReplyChannelRangeDecodeErrorZ. */ -void C2Tuple_PaymentHashPaymentSecretZ_free(struct LDKC2Tuple_PaymentHashPaymentSecretZ _res); +void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res); /** - * Creates a new CResult_PaymentSecretAPIErrorZ in the success state. + * Creates a new CResult_ReplyChannelRangeDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_ok(struct LDKThirtyTwoBytes o); +struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig); /** - * Creates a new CResult_PaymentSecretAPIErrorZ in the error state. + * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the success state. */ -struct LDKCResult_PaymentSecretAPIErrorZ CResult_PaymentSecretAPIErrorZ_err(struct LDKAPIError e); +struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o); /** - * Frees any resources used by the CResult_PaymentSecretAPIErrorZ. + * Creates a new CResult_GossipTimestampFilterDecodeErrorZ in the error state. */ -void CResult_PaymentSecretAPIErrorZ_free(struct LDKCResult_PaymentSecretAPIErrorZ _res); +struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e); /** - * Frees the buffer pointed to by `data` if `datalen` is non-0. + * Frees any resources used by the CResult_GossipTimestampFilterDecodeErrorZ. */ -void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res); +void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res); /** - * Creates a new C2Tuple_BlockHashChannelManagerZ from the contained elements. + * Creates a new CResult_GossipTimestampFilterDecodeErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b); +struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig); /** - * Frees any resources used by the C2Tuple_BlockHashChannelManagerZ. + * Creates a new CResult_InvoiceSignOrCreationErrorZ in the success state. */ -void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res); +struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_ok(struct LDKInvoice o); /** - * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the success state. + * Creates a new CResult_InvoiceSignOrCreationErrorZ in the error state. */ -struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o); +struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_err(struct LDKSignOrCreationError e); /** - * Creates a new CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ in the error state. + * Frees any resources used by the CResult_InvoiceSignOrCreationErrorZ. */ -struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e); +void CResult_InvoiceSignOrCreationErrorZ_free(struct LDKCResult_InvoiceSignOrCreationErrorZ _res); /** - * Frees any resources used by the CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ. + * Creates a new CResult_InvoiceSignOrCreationErrorZ which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. */ -void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res); +struct LDKCResult_InvoiceSignOrCreationErrorZ CResult_InvoiceSignOrCreationErrorZ_clone(const struct LDKCResult_InvoiceSignOrCreationErrorZ *NONNULL_PTR orig); /** * Frees any resources used by the Event @@ -11129,6 +11545,11 @@ void MessageSendEventsProvider_free(struct LDKMessageSendEventsProvider this_ptr */ void EventsProvider_free(struct LDKEventsProvider this_ptr); +/** + * Calls the free function if one is set + */ +void EventHandler_free(struct LDKEventHandler this_ptr); + /** * Frees any resources used by the APIError */ @@ -11162,6 +11583,17 @@ bool verify(struct LDKu8slice msg, struct LDKStr sig, struct LDKPublicKey pk); */ enum LDKLevel Level_clone(const enum LDKLevel *NONNULL_PTR orig); +/** + * Checks if two Levels contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool Level_eq(const enum LDKLevel *NONNULL_PTR a, const enum LDKLevel *NONNULL_PTR b); + +/** + * Checks if two Levels contain equal inner contents. + */ +uint64_t Level_hash(const enum LDKLevel *NONNULL_PTR o); + /** * Returns the most verbose logging level. */ @@ -11357,50 +11789,6 @@ uint16_t ChannelHandshakeLimits_get_min_max_accepted_htlcs(const struct LDKChann */ void ChannelHandshakeLimits_set_min_max_accepted_htlcs(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint16_t val); -/** - * Outputs below a certain value will not be added to on-chain transactions. The dust value is - * required to always be higher than this value so this only applies to HTLC outputs (and - * potentially to-self outputs before any payments have been made). - * Thus, HTLCs below this amount plus HTLC transaction fees are not enforceable on-chain. - * This setting allows you to set a minimum dust limit for their commitment transactions, - * reflecting the reality that tiny outputs are not considered standard transactions and will - * not propagate through the Bitcoin network. - * - * Default value: 546, the current dust limit on the Bitcoin network. - */ -uint64_t ChannelHandshakeLimits_get_min_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr); - -/** - * Outputs below a certain value will not be added to on-chain transactions. The dust value is - * required to always be higher than this value so this only applies to HTLC outputs (and - * potentially to-self outputs before any payments have been made). - * Thus, HTLCs below this amount plus HTLC transaction fees are not enforceable on-chain. - * This setting allows you to set a minimum dust limit for their commitment transactions, - * reflecting the reality that tiny outputs are not considered standard transactions and will - * not propagate through the Bitcoin network. - * - * Default value: 546, the current dust limit on the Bitcoin network. - */ -void ChannelHandshakeLimits_set_min_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val); - -/** - * Maximum allowed threshold above which outputs will not be generated in their commitment - * transactions. - * HTLCs below this amount plus HTLC transaction fees are not enforceable on-chain. - * - * Default value: u64::max_value. - */ -uint64_t ChannelHandshakeLimits_get_max_dust_limit_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr); - -/** - * Maximum allowed threshold above which outputs will not be generated in their commitment - * transactions. - * HTLCs below this amount plus HTLC transaction fees are not enforceable on-chain. - * - * Default value: u64::max_value. - */ -void ChannelHandshakeLimits_set_max_dust_limit_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val); - /** * Before a channel is usable the funding transaction will need to be confirmed by at least a * certain number of blocks, specified by the node which is not the funder (as the funder can @@ -11464,7 +11852,7 @@ void ChannelHandshakeLimits_set_their_to_self_delay(struct LDKChannelHandshakeLi /** * Constructs a new ChannelHandshakeLimits given each field */ -MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint64_t min_dust_limit_satoshis_arg, uint64_t max_dust_limit_satoshis_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg); +MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg); /** * Creates a copy of the ChannelHandshakeLimits @@ -11750,6 +12138,16 @@ void WatchedOutput_set_script_pubkey(struct LDKWatchedOutput *NONNULL_PTR this_p */ MUST_USE_RES struct LDKWatchedOutput WatchedOutput_new(struct LDKThirtyTwoBytes block_hash_arg, struct LDKOutPoint outpoint_arg, struct LDKCVec_u8Z script_pubkey_arg); +/** + * Creates a copy of the WatchedOutput + */ +struct LDKWatchedOutput WatchedOutput_clone(const struct LDKWatchedOutput *NONNULL_PTR orig); + +/** + * Checks if two WatchedOutputs contain equal inner contents. + */ +uint64_t WatchedOutput_hash(const struct LDKWatchedOutput *NONNULL_PTR o); + /** * Calls the free function if one is set */ @@ -12079,6 +12477,18 @@ MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, */ struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig); +/** + * Checks if two OutPoints contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool OutPoint_eq(const struct LDKOutPoint *NONNULL_PTR a, const struct LDKOutPoint *NONNULL_PTR b); + +/** + * Checks if two OutPoints contain equal inner contents. + */ +uint64_t OutPoint_hash(const struct LDKOutPoint *NONNULL_PTR o); + /** * Convert an `OutPoint` to a lightning channel id. */ @@ -12182,6 +12592,16 @@ MUST_USE_RES struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescri */ struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig); +/** + * Serialize the DelayedPaymentOutputDescriptor object into a byte array which can be read by DelayedPaymentOutputDescriptor_read + */ +struct LDKCVec_u8Z DelayedPaymentOutputDescriptor_write(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR obj); + +/** + * Read a DelayedPaymentOutputDescriptor from a byte array, created by DelayedPaymentOutputDescriptor_write + */ +struct LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ DelayedPaymentOutputDescriptor_read(struct LDKu8slice ser); + /** * Frees any resources used by the StaticPaymentOutputDescriptor, if is_owned is set and inner is non-NULL. */ @@ -12236,6 +12656,16 @@ MUST_USE_RES struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescript */ struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig); +/** + * Serialize the StaticPaymentOutputDescriptor object into a byte array which can be read by StaticPaymentOutputDescriptor_read + */ +struct LDKCVec_u8Z StaticPaymentOutputDescriptor_write(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR obj); + +/** + * Read a StaticPaymentOutputDescriptor from a byte array, created by StaticPaymentOutputDescriptor_write + */ +struct LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ StaticPaymentOutputDescriptor_read(struct LDKu8slice ser); + /** * Frees any resources used by the SpendableOutputDescriptor */ @@ -12531,6 +12961,11 @@ void ChainParameters_set_best_block(struct LDKChainParameters *NONNULL_PTR this_ */ MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKBestBlock best_block_arg); +/** + * Creates a copy of the ChainParameters + */ +struct LDKChainParameters ChainParameters_clone(const struct LDKChainParameters *NONNULL_PTR orig); + /** * Frees any resources used by the BestBlock, if is_owned is set and inner is non-NULL. */ @@ -12582,6 +13017,24 @@ const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NO */ void ChannelDetails_set_channel_id(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val); +/** + * The Channel's funding transaction output, if we've negotiated the funding transaction with + * our counterparty already. + * + * Note that, if this has been set, `channel_id` will be equivalent to + * `funding_txo.unwrap().to_channel_id()`. + */ +struct LDKOutPoint ChannelDetails_get_funding_txo(const struct LDKChannelDetails *NONNULL_PTR this_ptr); + +/** + * The Channel's funding transaction output, if we've negotiated the funding transaction with + * our counterparty already. + * + * Note that, if this has been set, `channel_id` will be equivalent to + * `funding_txo.unwrap().to_channel_id()`. + */ +void ChannelDetails_set_funding_txo(struct LDKChannelDetails *NONNULL_PTR this_ptr, struct LDKOutPoint val); + /** * The position of the funding transaction in the chain. None if the funding transaction has * not yet been confirmed and the channel fully opened. @@ -12672,17 +13125,59 @@ uint64_t ChannelDetails_get_inbound_capacity_msat(const struct LDKChannelDetails */ void ChannelDetails_set_inbound_capacity_msat(struct LDKChannelDetails *NONNULL_PTR this_ptr, uint64_t val); +/** + * True if the channel was initiated (and thus funded) by us. + */ +bool ChannelDetails_get_is_outbound(const struct LDKChannelDetails *NONNULL_PTR this_ptr); + +/** + * True if the channel was initiated (and thus funded) by us. + */ +void ChannelDetails_set_is_outbound(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val); + +/** + * True if the channel is confirmed, funding_locked messages have been exchanged, and the + * channel is not currently being shut down. `funding_locked` message exchange implies the + * required confirmation count has been reached (and we were connected to the peer at some + * point after the funding transaction received enough confirmations). + */ +bool ChannelDetails_get_is_funding_locked(const struct LDKChannelDetails *NONNULL_PTR this_ptr); + +/** + * True if the channel is confirmed, funding_locked messages have been exchanged, and the + * channel is not currently being shut down. `funding_locked` message exchange implies the + * required confirmation count has been reached (and we were connected to the peer at some + * point after the funding transaction received enough confirmations). + */ +void ChannelDetails_set_is_funding_locked(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val); + /** * True if the channel is (a) confirmed and funding_locked messages have been exchanged, (b) - * the peer is connected, and (c) no monitor update failure is pending resolution. + * the peer is connected, (c) no monitor update failure is pending resolution, and (d) the + * channel is not currently negotiating a shutdown. + * + * This is a strict superset of `is_funding_locked`. */ -bool ChannelDetails_get_is_live(const struct LDKChannelDetails *NONNULL_PTR this_ptr); +bool ChannelDetails_get_is_usable(const struct LDKChannelDetails *NONNULL_PTR this_ptr); /** * True if the channel is (a) confirmed and funding_locked messages have been exchanged, (b) - * the peer is connected, and (c) no monitor update failure is pending resolution. + * the peer is connected, (c) no monitor update failure is pending resolution, and (d) the + * channel is not currently negotiating a shutdown. + * + * This is a strict superset of `is_funding_locked`. + */ +void ChannelDetails_set_is_usable(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val); + +/** + * True if this channel is (or will be) publicly-announced. + */ +bool ChannelDetails_get_is_public(const struct LDKChannelDetails *NONNULL_PTR this_ptr); + +/** + * True if this channel is (or will be) publicly-announced. */ -void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val); +void ChannelDetails_set_is_public(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val); /** * Creates a copy of the ChannelDetails @@ -12747,8 +13242,9 @@ MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const s * Gets the list of usable channels, in random order. Useful as an argument to * get_route to ensure non-announced channels are used. * - * These are guaranteed to have their is_live value set to true, see the documentation for - * ChannelDetails::is_live for more info on exactly what the criteria are. + * These are guaranteed to have their [`ChannelDetails::is_usable`] value set to true, see the + * documentation for [`ChannelDetails::is_usable`] for more info on exactly what the criteria + * are. */ MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_usable_channels(const struct LDKChannelManager *NONNULL_PTR this_arg); @@ -12835,23 +13331,30 @@ MUST_USE_RES struct LDKCResult_NonePaymentSendFailureZ ChannelManager_send_payme * Note that this includes RBF or similar transaction replacement strategies - lightning does * not currently support replacing a funding transaction on an existing channel. Instead, * create a new channel with a conflicting funding transaction. + * + * [`Event::FundingGenerationReady`]: crate::util::events::Event::FundingGenerationReady */ MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_funding_transaction_generated(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*temporary_channel_id)[32], struct LDKTransaction funding_transaction); /** - * Generates a signed node_announcement from the given arguments and creates a - * BroadcastNodeAnnouncement event. Note that such messages will be ignored unless peers have - * seen a channel_announcement from us (ie unless we have public channels open). + * Regenerates channel_announcements and generates a signed node_announcement from the given + * arguments, providing them in corresponding events via + * [`get_and_clear_pending_msg_events`], if at least one public channel has been confirmed + * on-chain. This effectively re-broadcasts all channel announcements and sends our node + * announcement to ensure that the lightning P2P network is aware of the channels we have and + * our network addresses. + * + * `rgb` is a node \"color\" and `alias` is a printable human-readable string to describe this + * node to humans. They carry no in-protocol meaning. * - * RGB is a node \"color\" and alias is a printable human-readable string to describe this node - * to humans. They carry no in-protocol meaning. + * `addresses` represent the set (possibly empty) of socket addresses on which this node + * accepts incoming connections. These will be included in the node_announcement, publicly + * tying these addresses together and to this node. If you wish to preserve user privacy, + * addresses should likely contain only Tor Onion addresses. * - * addresses represent the set (possibly empty) of socket addresses on which this node accepts - * incoming connections. These will be broadcast to the network, publicly tying these - * addresses together. If you wish to preserve user privacy, addresses should likely contain - * only Tor Onion addresses. + * Panics if `addresses` is absurdly large (more than 500). * - * Panics if addresses is absurdly large (more than 500). + * [`get_and_clear_pending_msg_events`]: MessageSendEventsProvider::get_and_clear_pending_msg_events */ void ChannelManager_broadcast_node_announcement(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKThreeBytes rgb, struct LDKThirtyTwoBytes alias, struct LDKCVec_NetAddressZ addresses); @@ -12974,7 +13477,7 @@ MUST_USE_RES struct LDKC2Tuple_PaymentHashPaymentSecretZ ChannelManager_create_i * `invoice_expiry_delta_secs` describes the number of seconds that the invoice is valid for * in excess of the current time. This should roughly match the expiry time set in the invoice. * After this many seconds, we will remove the inbound payment, resulting in any attempts to - * pay the invoice failing. The BOLT spec suggests 7,200 secs as a default validity time for + * pay the invoice failing. The BOLT spec suggests 3,600 secs as a default validity time for * invoices when no timeout is set. * * Note that we use block header time to time-out pending inbound payments (with some margin @@ -14284,6 +14787,11 @@ struct LDKCVec_u8Z NetAddress_write(const struct LDKNetAddress *NONNULL_PTR obj) */ struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ Result_read(struct LDKu8slice ser); +/** + * Read a NetAddress from a byte array, created by NetAddress_write + */ +struct LDKCResult_NetAddressDecodeErrorZ NetAddress_read(struct LDKu8slice ser); + /** * Frees any resources used by the UnsignedNodeAnnouncement, if is_owned is set and inner is non-NULL. */ @@ -16276,6 +16784,34 @@ MUST_USE_RES struct LDKCResult_CVec_SignatureZNoneZ TrustedCommitmentTransaction */ uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster); +/** + * Checks if two InitFeaturess contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool InitFeatures_eq(const struct LDKInitFeatures *NONNULL_PTR a, const struct LDKInitFeatures *NONNULL_PTR b); + +/** + * Checks if two NodeFeaturess contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool NodeFeatures_eq(const struct LDKNodeFeatures *NONNULL_PTR a, const struct LDKNodeFeatures *NONNULL_PTR b); + +/** + * Checks if two ChannelFeaturess contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool ChannelFeatures_eq(const struct LDKChannelFeatures *NONNULL_PTR a, const struct LDKChannelFeatures *NONNULL_PTR b); + +/** + * Checks if two InvoiceFeaturess contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool InvoiceFeatures_eq(const struct LDKInvoiceFeatures *NONNULL_PTR a, const struct LDKInvoiceFeatures *NONNULL_PTR b); + /** * Creates a copy of the InitFeatures */ @@ -16356,6 +16892,21 @@ MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_empty(void); */ MUST_USE_RES struct LDKInvoiceFeatures InvoiceFeatures_known(void); +/** + * Returns whether the `payment_secret` feature is supported. + */ +MUST_USE_RES bool InitFeatures_supports_payment_secret(const struct LDKInitFeatures *NONNULL_PTR this_arg); + +/** + * Returns whether the `payment_secret` feature is supported. + */ +MUST_USE_RES bool NodeFeatures_supports_payment_secret(const struct LDKNodeFeatures *NONNULL_PTR this_arg); + +/** + * Returns whether the `payment_secret` feature is supported. + */ +MUST_USE_RES bool InvoiceFeatures_supports_payment_secret(const struct LDKInvoiceFeatures *NONNULL_PTR this_arg); + /** * Serialize the InitFeatures object into a byte array which can be read by InitFeatures_read */ @@ -16481,6 +17032,16 @@ MUST_USE_RES struct LDKRouteHop RouteHop_new(struct LDKPublicKey pubkey_arg, str */ struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig); +/** + * Serialize the RouteHop object into a byte array which can be read by RouteHop_read + */ +struct LDKCVec_u8Z RouteHop_write(const struct LDKRouteHop *NONNULL_PTR obj); + +/** + * Read a RouteHop from a byte array, created by RouteHop_write + */ +struct LDKCResult_RouteHopDecodeErrorZ RouteHop_read(struct LDKu8slice ser); + /** * Frees any resources used by the Route, if is_owned is set and inner is non-NULL. */ @@ -16586,6 +17147,13 @@ void RouteHintHop_set_htlc_maximum_msat(struct LDKRouteHintHop *NONNULL_PTR this */ MUST_USE_RES struct LDKRouteHintHop RouteHintHop_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, struct LDKCOption_u64Z htlc_minimum_msat_arg, struct LDKCOption_u64Z htlc_maximum_msat_arg); +/** + * Checks if two RouteHintHops contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool RouteHintHop_eq(const struct LDKRouteHintHop *NONNULL_PTR a, const struct LDKRouteHintHop *NONNULL_PTR b); + /** * Creates a copy of the RouteHintHop */ @@ -16918,20 +17486,27 @@ void RoutingFees_set_proportional_millionths(struct LDKRoutingFees *NONNULL_PTR MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg); /** - * Creates a copy of the RoutingFees + * Checks if two RoutingFeess contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. */ -struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig); +bool RoutingFees_eq(const struct LDKRoutingFees *NONNULL_PTR a, const struct LDKRoutingFees *NONNULL_PTR b); /** - * Read a RoutingFees from a byte array, created by RoutingFees_write + * Creates a copy of the RoutingFees */ -struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser); +struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig); /** * Serialize the RoutingFees object into a byte array which can be read by RoutingFees_read */ struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj); +/** + * Read a RoutingFees from a byte array, created by RoutingFees_write + */ +struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser); + /** * Frees any resources used by the NodeAnnouncementInfo, if is_owned is set and inner is non-NULL. */ @@ -17195,6 +17770,43 @@ MUST_USE_RES struct LDKCResult_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ File */ struct LDKPersist FilesystemPersister_as_Persist(const struct LDKFilesystemPersister *NONNULL_PTR this_arg); +/** + * Frees any resources used by the BackgroundProcessor, if is_owned is set and inner is non-NULL. + */ +void BackgroundProcessor_free(struct LDKBackgroundProcessor this_obj); + +/** + * Calls the free function if one is set + */ +void ChannelManagerPersister_free(struct LDKChannelManagerPersister this_ptr); + +/** + * Start a background thread that takes care of responsibilities enumerated in the top-level + * documentation. + * + * If `persist_manager` returns an error, then this thread will return said error (and + * `start()` will need to be called again to restart the `BackgroundProcessor`). Users should + * wait on [`thread_handle`]'s `join()` method to be able to tell if and when an error is + * returned, or implement `persist_manager` such that an error is never returned to the + * `BackgroundProcessor` + * + * `persist_manager` is responsible for writing out the [`ChannelManager`] to disk, and/or + * uploading to one or more backup services. See [`ChannelManager::write`] for writing out a + * [`ChannelManager`]. See [`FilesystemPersister::persist_manager`] for Rust-Lightning's + * provided implementation. + * + * [`thread_handle`]: BackgroundProcessor::thread_handle + * [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager + * [`ChannelManager::write`]: lightning::ln::channelmanager::ChannelManager#impl-Writeable + * [`FilesystemPersister::persist_manager`]: lightning_persister::FilesystemPersister::persist_manager + */ +MUST_USE_RES struct LDKBackgroundProcessor BackgroundProcessor_start(struct LDKChannelManagerPersister persister, struct LDKEventHandler event_handler, const struct LDKChainMonitor *NONNULL_PTR chain_monitor, const struct LDKChannelManager *NONNULL_PTR channel_manager, const struct LDKPeerManager *NONNULL_PTR peer_manager, struct LDKLogger logger); + +/** + * Stop `BackgroundProcessor`'s thread. + */ +MUST_USE_RES struct LDKCResult_NoneErrorZ BackgroundProcessor_stop(struct LDKBackgroundProcessor this_arg); + /** * **Call this function on startup to ensure that all assumptions about the platform are valid.** * @@ -17217,6 +17829,13 @@ void check_platform(void); */ void Invoice_free(struct LDKInvoice this_obj); +/** + * Checks if two Invoices contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool Invoice_eq(const struct LDKInvoice *NONNULL_PTR a, const struct LDKInvoice *NONNULL_PTR b); + /** * Creates a copy of the Invoice */ @@ -17227,6 +17846,13 @@ struct LDKInvoice Invoice_clone(const struct LDKInvoice *NONNULL_PTR orig); */ void SignedRawInvoice_free(struct LDKSignedRawInvoice this_obj); +/** + * Checks if two SignedRawInvoices contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool SignedRawInvoice_eq(const struct LDKSignedRawInvoice *NONNULL_PTR a, const struct LDKSignedRawInvoice *NONNULL_PTR b); + /** * Creates a copy of the SignedRawInvoice */ @@ -17247,6 +17873,13 @@ struct LDKRawDataPart RawInvoice_get_data(const struct LDKRawInvoice *NONNULL_PT */ void RawInvoice_set_data(struct LDKRawInvoice *NONNULL_PTR this_ptr, struct LDKRawDataPart val); +/** + * Checks if two RawInvoices contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool RawInvoice_eq(const struct LDKRawInvoice *NONNULL_PTR a, const struct LDKRawInvoice *NONNULL_PTR b); + /** * Creates a copy of the RawInvoice */ @@ -17267,6 +17900,13 @@ struct LDKPositiveTimestamp RawDataPart_get_timestamp(const struct LDKRawDataPar */ void RawDataPart_set_timestamp(struct LDKRawDataPart *NONNULL_PTR this_ptr, struct LDKPositiveTimestamp val); +/** + * Checks if two RawDataParts contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool RawDataPart_eq(const struct LDKRawDataPart *NONNULL_PTR a, const struct LDKRawDataPart *NONNULL_PTR b); + /** * Creates a copy of the RawDataPart */ @@ -17277,6 +17917,13 @@ struct LDKRawDataPart RawDataPart_clone(const struct LDKRawDataPart *NONNULL_PTR */ void PositiveTimestamp_free(struct LDKPositiveTimestamp this_obj); +/** + * Checks if two PositiveTimestamps contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool PositiveTimestamp_eq(const struct LDKPositiveTimestamp *NONNULL_PTR a, const struct LDKPositiveTimestamp *NONNULL_PTR b); + /** * Creates a copy of the PositiveTimestamp */ @@ -17287,6 +17934,12 @@ struct LDKPositiveTimestamp PositiveTimestamp_clone(const struct LDKPositiveTime */ enum LDKSiPrefix SiPrefix_clone(const enum LDKSiPrefix *NONNULL_PTR orig); +/** + * Checks if two SiPrefixs contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool SiPrefix_eq(const enum LDKSiPrefix *NONNULL_PTR a, const enum LDKSiPrefix *NONNULL_PTR b); + /** * Returns the multiplier to go from a BTC value to picoBTC implied by this SiPrefix. * This is effectively 10^12 * the prefix multiplier @@ -17298,11 +17951,24 @@ MUST_USE_RES uint64_t SiPrefix_multiplier(const enum LDKSiPrefix *NONNULL_PTR th */ enum LDKCurrency Currency_clone(const enum LDKCurrency *NONNULL_PTR orig); +/** + * Checks if two Currencys contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool Currency_eq(const enum LDKCurrency *NONNULL_PTR a, const enum LDKCurrency *NONNULL_PTR b); + /** * Frees any resources used by the Sha256, if is_owned is set and inner is non-NULL. */ void Sha256_free(struct LDKSha256 this_obj); +/** + * Checks if two Sha256s contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool Sha256_eq(const struct LDKSha256 *NONNULL_PTR a, const struct LDKSha256 *NONNULL_PTR b); + /** * Creates a copy of the Sha256 */ @@ -17313,6 +17979,13 @@ struct LDKSha256 Sha256_clone(const struct LDKSha256 *NONNULL_PTR orig); */ void Description_free(struct LDKDescription this_obj); +/** + * Checks if two Descriptions contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool Description_eq(const struct LDKDescription *NONNULL_PTR a, const struct LDKDescription *NONNULL_PTR b); + /** * Creates a copy of the Description */ @@ -17323,6 +17996,13 @@ struct LDKDescription Description_clone(const struct LDKDescription *NONNULL_PTR */ void PayeePubKey_free(struct LDKPayeePubKey this_obj); +/** + * Checks if two PayeePubKeys contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool PayeePubKey_eq(const struct LDKPayeePubKey *NONNULL_PTR a, const struct LDKPayeePubKey *NONNULL_PTR b); + /** * Creates a copy of the PayeePubKey */ @@ -17333,6 +18013,13 @@ struct LDKPayeePubKey PayeePubKey_clone(const struct LDKPayeePubKey *NONNULL_PTR */ void ExpiryTime_free(struct LDKExpiryTime this_obj); +/** + * Checks if two ExpiryTimes contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool ExpiryTime_eq(const struct LDKExpiryTime *NONNULL_PTR a, const struct LDKExpiryTime *NONNULL_PTR b); + /** * Creates a copy of the ExpiryTime */ @@ -17343,6 +18030,13 @@ struct LDKExpiryTime ExpiryTime_clone(const struct LDKExpiryTime *NONNULL_PTR or */ void MinFinalCltvExpiry_free(struct LDKMinFinalCltvExpiry this_obj); +/** + * Checks if two MinFinalCltvExpirys contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool MinFinalCltvExpiry_eq(const struct LDKMinFinalCltvExpiry *NONNULL_PTR a, const struct LDKMinFinalCltvExpiry *NONNULL_PTR b); + /** * Creates a copy of the MinFinalCltvExpiry */ @@ -17358,11 +18052,24 @@ void Fallback_free(struct LDKFallback this_ptr); */ struct LDKFallback Fallback_clone(const struct LDKFallback *NONNULL_PTR orig); +/** + * Checks if two Fallbacks contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool Fallback_eq(const struct LDKFallback *NONNULL_PTR a, const struct LDKFallback *NONNULL_PTR b); + /** * Frees any resources used by the InvoiceSignature, if is_owned is set and inner is non-NULL. */ void InvoiceSignature_free(struct LDKInvoiceSignature this_obj); +/** + * Checks if two InvoiceSignatures contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool InvoiceSignature_eq(const struct LDKInvoiceSignature *NONNULL_PTR a, const struct LDKInvoiceSignature *NONNULL_PTR b); + /** * Creates a copy of the InvoiceSignature */ @@ -17373,6 +18080,13 @@ struct LDKInvoiceSignature InvoiceSignature_clone(const struct LDKInvoiceSignatu */ void RouteHint_free(struct LDKRouteHint this_obj); +/** + * Checks if two RouteHints contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + * Two objects with NULL inner values will be considered "equal" here. + */ +bool RouteHint_eq(const struct LDKRouteHint *NONNULL_PTR a, const struct LDKRouteHint *NONNULL_PTR b); + /** * Creates a copy of the RouteHint */ @@ -17598,6 +18312,12 @@ MUST_USE_RES struct LDKCVec_RouteHintHopZ RouteHint_into_inner(struct LDKRouteHi */ enum LDKCreationError CreationError_clone(const enum LDKCreationError *NONNULL_PTR orig); +/** + * Checks if two CreationErrors contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool CreationError_eq(const enum LDKCreationError *NONNULL_PTR a, const enum LDKCreationError *NONNULL_PTR b); + /** * Get the string representation of a CreationError object */ @@ -17608,6 +18328,12 @@ struct LDKStr CreationError_to_str(const enum LDKCreationError *NONNULL_PTR o); */ enum LDKSemanticError SemanticError_clone(const enum LDKSemanticError *NONNULL_PTR orig); +/** + * Checks if two SemanticErrors contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool SemanticError_eq(const enum LDKSemanticError *NONNULL_PTR a, const enum LDKSemanticError *NONNULL_PTR b); + /** * Get the string representation of a SemanticError object */ @@ -17623,6 +18349,12 @@ void SignOrCreationError_free(struct LDKSignOrCreationError this_ptr); */ struct LDKSignOrCreationError SignOrCreationError_clone(const struct LDKSignOrCreationError *NONNULL_PTR orig); +/** + * Checks if two SignOrCreationErrors contain equal inner contents. + * This ignores pointers and is_owned flags and looks at the values in fields. + */ +bool SignOrCreationError_eq(const struct LDKSignOrCreationError *NONNULL_PTR a, const struct LDKSignOrCreationError *NONNULL_PTR b); + /** * Get the string representation of a SignOrCreationError object */