ts/version.c
c_sharp/src/org/ldk/impl/version.cs
c_sharp/version.c
+c_sharp/packaging_artifacts/runtimes/
+c_sharp/packaging_artifacts/lib/
`SocketDescriptor` interface to Node.JS TCP Sockets. For those wishing to run a lightning node in
the browser you will need to provide your own bridge from `SocketDescriptor` to a WebSocket proxy.
+# C#
+
+The C# bindings are functionally complete, but should be considered alpha quality. They are brand
+new and likely contain bugs or memory leaks.
+
## General
The only known issue resulting in a use-after-free bug requires custom a custom ChannelKeys instance
--- /dev/null
+#/bin/sh
+set -e
+set -x
+
+# zips are not generally deterministic without some tweaking, which we do here.
+
+echo "Checking that required release native libraries are present..."
+ls packaging_artifacts/runtimes/win-x64/native/ldkcsharp.dll
+ls packaging_artifacts/runtimes/linux-x64/native/libldkcsharp.so
+ls packaging_artifacts/lib/net3.0/csharpldk.dll
+
+cd packaging_artifacts
+find . | xargs -L1 touch -d "2021-01-01 00:00 UTC"
+zip -Xvu ../org.ldk.nupkg * */* */*/* */*/*/* */*/*/*/*
--- /dev/null
+../../LICENSE-APACHE
\ No newline at end of file
--- /dev/null
+../../LICENSE-MIT
\ No newline at end of file
--- /dev/null
+../../LICENSE.md
\ No newline at end of file
--- /dev/null
+../../README.md
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
+ <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" />
+ <Default Extension="psmdcp" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />
+ <Default Extension="dll" ContentType="application/octet" />
+ <Default Extension="dylib" ContentType="application/octet" />
+ <Default Extension="so" ContentType="application/octet" />
+ <Default Extension="md" ContentType="application/octet" />
+ <Default Extension="nuspec" ContentType="application/octet" />
+ <Override PartName="//LICENSE" ContentType="application/octet" />
+</Types>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
+ <Relationship Type="http://schemas.microsoft.com/packaging/2010/07/manifest" Target="/org.ldk.nuspec" Id="spec" />
+ <Relationship Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="/package/services/metadata/core-properties/ldk.psmdcp" Id="Properties" />
+</Relationships>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
+ <metadata>
+ <id>org.ldk</id>
+ <version>Set in genbindings.sh automagically</version>
+ <authors>LDK</authors>
+ <license type="file">LICENSE</license>
+ <licenseUrl>https://github.com/lightningdevkit/rust-lightning/blob/main/LICENSE.md</licenseUrl>
+ <readme>README.md</readme>
+ <projectUrl>https://lightningdevkit.org/</projectUrl>
+ <description>LDK C# Bindings</description>
+ <copyright>2023 LDK Contributors</copyright>
+ <tags>bitcoin lightning ldk sdk non-custodial</tags>
+ <repository type="git" url="https://github.com/lightningdevkit/ldk-garbagecollected" />
+ <dependencies>
+ <group targetFramework="net3.0" />
+ </dependencies>
+ </metadata>
+</package>
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<coreProperties xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">
+ <dc:creator>LDK</dc:creator>
+ <dc:description>LDK C# Bindings</dc:description>
+ <dc:identifier>org.ldk</dc:identifier>
+ <version>Set in genbindings.sh automagically</version>
+ <keywords>bitcoin lightning ldk sdk non-custodial</keywords>
+ <lastModifiedBy>hand</lastModifiedBy>
+</coreProperties>
IS_APPLE_CLANG=false
[ "$($CC --version | grep "Apple clang version")" != "" ] && IS_APPLE_CLANG=true
+ if is_gnu_sed; then
+ sed -i "s/<version>.*<\/version>/<version>${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}<\/version>/g" c_sharp/packaging_artifacts/org.ldk.nuspec
+ sed -i "s/<version>.*<\/version>/<version>${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}<\/version>/g" c_sharp/packaging_artifacts/package/services/metadata/core-properties/ldk.psmdcp
+ else
+ # OSX sed is for some reason not compatible with GNU sed
+ sed -i '' "s/<version>.*<\/version>/<version>${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}<\/version>/g" c_sharp/packaging_artifacts/org.ldk.nuspec
+ sed -i '' "s/<version>.*<\/version>/<version>${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}<\/version>/g" c_sharp/packaging_artifacts/package/services/metadata/core-properties/ldk.psmdcp
+ fi
+
# Compiling C# bindings with Mono
MONO_COMPILE="-out:csharpldk.dll -langversion:3 -t:library -unsafe c_sharp/src/org/ldk/enums/*.cs c_sharp/src/org/ldk/impl/*.cs c_sharp/src/org/ldk/util/*.cs c_sharp/src/org/ldk/structs/*.cs"
if [ "$3" = "true" ]; then