This repository contains a sequence of libraries that are useful to work with Core Lightning Daemon and develop with Core Lightning using Go.
These are the complete list of craters supported right now
Crate | Description |
---|---|
clng4go-client | Package that provides means to make RPC bindings from Go code to the core lightning daemon |
cln4go-plugin | Package that provides a plugin API to give the possibility to implement a plugin in Go |
cln4go-common | Package that provides common interface for the monorepo. Go |
path := os.Getenv("CLN_UNIX_SOCKET")
if path == "" {
err := fmt.Errorf("Unix path not exported with the CLN_UNIX_SOCKET env variable")
panic(err)
}
client, err := NewUnix(path)
if err != nil {
panic(err)
}
response, err := Call[UnixRPC, MapReq, GetInfo](client, "getinfo", make(map[string]any, 0))
Please look inside the client/unix_test.go for more usage examples.
Please look inside the plugin/example/simple_plugin.go for examples.
Read our Hacking guide
If you want support this library consider to donate with the following methods
- Lightning address: [email protected]
- Github donation