{"id":13574770,"url":"https://github.com/lightningdevkit/ldk-garbagecollected","last_synced_at":"2025-12-14T01:03:03.073Z","repository":{"id":40354498,"uuid":"335108264","full_name":"lightningdevkit/ldk-garbagecollected","owner":"lightningdevkit","description":"LDK Bindings for Garbage-Collected Languages","archived":false,"fork":false,"pushed_at":"2025-03-04T02:45:42.000Z","size":218624,"stargazers_count":55,"open_issues_count":19,"forks_count":27,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-29T06:01:34.021Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightningdevkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-01T23:03:24.000Z","updated_at":"2025-03-04T01:37:32.000Z","dependencies_parsed_at":"2024-06-18T22:42:46.939Z","dependency_job_id":"bd7d2232-106c-46b6-9d12-99afda0d5d9a","html_url":"https://github.com/lightningdevkit/ldk-garbagecollected","commit_stats":{"total_commits":713,"total_committers":8,"mean_commits":89.125,"dds":0.06451612903225812,"last_synced_commit":"a672396f21c0448656bb400cfe28b9df6e5a842b"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightningdevkit%2Fldk-garbagecollected","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightningdevkit%2Fldk-garbagecollected/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightningdevkit%2Fldk-garbagecollected/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightningdevkit%2Fldk-garbagecollected/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightningdevkit","download_url":"https://codeload.github.com/lightningdevkit/ldk-garbagecollected/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299828,"owners_count":20916190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:00:54.554Z","updated_at":"2025-12-14T01:03:03.048Z","avatar_url":"https://github.com/lightningdevkit.png","language":"TypeScript","funding_links":[],"categories":["Ecosystem"],"sub_categories":["Lightning Implementations"],"readme":"LDK Java, C#, and TypeScript Bindings\n=====================================\n\nThis repo contains an autogeneration system to generate LDK bindings for garbage-collected languages, currently including Java, C#, and TypeScript. See below for the current status of the bindings.\n\nThe auto-generated code contains copies of the Rust documentation, which can also be viewed at\n[docs.rs/lightning](https://docs.rs/lightning). High-level documentation of the API can be found at\n[lightningdevkit.org](https://lightningdevkit.org).\n\nAPI Mappings\n============\n\nAs the bindings are auto-generated, they often read fairly verbose with lots of additional type\ninformation compared to what might be expected with a native interface. A brief understanding of\nsome Rust nomenclature will help read bindings:\n\n## `Result`\n\nRust APIs make heavy use of the `Result` enum. They can either be in an `Ok` state, with an\noptional value or an `Err` state, with an optional error value. These often appear as\n`Result_OKValueTypeErrValueTypeZ` in bindings. Subclasses are build for the `Ok` and `Err` states,\nwith the appropriate values available in the subclasses which all instances will be of.\n\n## `Option`\n\nSimilar to `Result`, Rust APIs make heavy use of the `Option` enum. Like `Result`, they may contain\na value in the `Some` state, but may contain no value in the `None` state. They are mapped\nsimilarly to `Result`s, usually as `Option_SomeValueTypeZ`.\n\n## Tuples\n\nRust APIs occasionally use tuples, which are simply mapped as a tuple type like\n`TwoTuple_FirstValueTypeSecondValueTypeZ`. Individual elements can be fetched or set with `get_a()`,\n`get_b()`, `set_a(..)`, etc.\n\n## Tuple Types\n\nRust APIs occasionally build structs which are simply a named tuple type. These appear in rust as,\neg, `struct PrintableString(String)`, and in the bindings as simply the class name (eg\n`class PrintableString`). The value(s) in the tuple can be fetched or set with `get_a()`,\n`get_b()`, `set_a(..)`, etc.\n\nBuilding\n========\n\nThe releases for Java, C#, and TypeScript are all deterministic. You should be able to reproduce\nthe release binaries identically by running the scripts run in CI, see\n[.github/workflows/build.yml](.github/workflows/build.yml).\n\nReleases for all platforms are built on Linux as that is the easiest way to get things\ndeterministic, however building on macOS should also work. Building on Windows is not currently\nsupported.\n\nStatus\n======\n\n## Java\n\nThe Java bindings are relatively mature, and should be considered safe for production use. Still,\nas they have relatively few users, unexpected issues remain possible, and bug reports are welcome.\n\n## TypeScript\n\nThe TypeScript bindings are functionally complete, but should be considered beta quality. As there\nare relatively few users, unexpected issues remain likely, and bug reports are welcome.\n\nThe TypeScript bindings require modern web standards, including support for `FinalizationRegistry`\nand `WeakRef` (Chrome 84, Firefox 79, Safari 14.1/iOS 14.5 and Node 14.6) and WASM BigInt support\n(Chrome 85, Firefox 78, Safari 14.1/iOS 14.5, and Node 15.0).\n\nFor users of Node.JS environments you may wish to use the `lightningdevkit-node-net` package as\nwell to implement the required network handling to bridge the `lightningdevkit` package's\n`SocketDescriptor` interface to Node.JS TCP Sockets. For those wishing to run a lightning node in\nthe browser you will need to provide your own bridge from `SocketDescriptor` to a WebSocket proxy.\n\n# C#\n\nThe C# bindings are functionally complete, but should be considered beta quality. As they are\nrelatively new, unexpected issues remain possible, and bug reports are welcome.\n\n## General\n\nThe only known issue resulting in a use-after-free bug requires custom a custom ChannelKeys instance\ncreated as a part of a new channel. After the channel is created, the ChannelKeys object will not\nbe freed while the parent ChannelManager exists, however if the ChannelManager is garbage collected\nwhile a ChannelMonitor object which is associated with the same channel exists, a use-after-free bug\nmay occur. This issue should be relatively rare as uses where a ChannelManager is removed while\nassociated ChannelMonitors exist is not anticipated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightningdevkit%2Fldk-garbagecollected","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightningdevkit%2Fldk-garbagecollected","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightningdevkit%2Fldk-garbagecollected/lists"}