Skip to content

getAlby/ldkalby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.2.1+v0.25.0

Run examples

cd examples

GetInfo

MNEMONIC="YOUR TWELVE WORD MNEMONIC HERE" cargo run --bin get-info

Generate bindings

cargo build --release
uniffi-bindgen-go src/ldkalby.udl -o ffi/golang -c ./uniffi.toml
cp target/release/libldkalby_bindings.so ffi/golang/ldkalby

Run tests

cp -r ffi/golang/ldkalby tests/bindings/golang/
cargo test -- --nocapture

Build and copy to NWC

Make sure to set YOUR_NWC_NEXT_DIR

cargo build --release && uniffi-bindgen-go src/ldkalby.udl -o ffi/golang -c ./uniffi.toml && cp target/release/libldkalby_bindings.so ffi/golang/ldkalby && cp ffi/golang/ldkalby YOUR_NWC_NEXT_DIR -r

Consume from go app

Copy libldkalby_bindings.so into ldkalby folder and then copy ldkalby folder into NWC app.

Import with import ("github.com/getAlby/nostr-wallet-connect/ldkalby")

And then you can call functions e.g. ldkalby.GetInfo()

CGO_LDFLAGS="-lldkalby_bindings -L./ldkalby -Wl,-rpath,./ldkalby" go run .

About

LDK Rust Go bindings (WIP)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published