fix: update Bark FFI bindings (#2400)

fix: update bark ffi bindings

Co-authored-by: Hermes Agent <hermes-agent@users.noreply.github.com>
This commit is contained in:
hermes-alby 2026-06-05 13:01:04 +07:00 committed by GitHub
parent d2cd4a5ed2
commit a4dec48322
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 15 deletions

View file

@ -123,19 +123,9 @@ jobs:
run: wails build --platform linux/amd64 -webview2 embed -o "${{ env.EXEC_NAME }}" -tags "wails,webkit2_41" -ldflags "-X 'github.com/getAlby/hub/version.Tag=${{ env.TAG }}'"
shell: bash
# The bark FFI static library is built for the GNU/mingw target and embeds
# Rust's getrandom/ring code, which references Windows CNG symbols such as
# BCryptGenRandom. The upstream bark bindings only link -lbark_ffi_go, so
# we link the missing Windows system libraries via CGO_LDFLAGS (cgo reads
# this directly; -ldflags/-extldflags get dropped by wails). They are
# wrapped together with bark in a --start-group so the linker re-scans the
# group and resolves the symbols regardless of library order on the line.
- name: Build Windows App
if: runner.os == 'Windows'
run: |
BARK_LIB="$(go list -m -f '{{.Dir}}' gitlab.com/ark-bitcoin/bark-ffi-bindings/golang)/lib/windows_amd64"
export CGO_LDFLAGS="-Wl,--start-group -L${BARK_LIB} -lbark_ffi_go -lbcrypt -lntdll -luserenv -lws2_32 -lcrypt32 -lncrypt -lsecur32 -ladvapi32 -Wl,--end-group"
wails build --platform windows/amd64 -webview2 embed -o "${{ env.EXEC_NAME }}.exe" -tags "wails" -ldflags "-X 'github.com/getAlby/hub/version.Tag=${{ env.TAG }}'"
run: wails build --platform windows/amd64 -webview2 embed -o "${{ env.EXEC_NAME }}.exe" -tags "wails" -ldflags "-X 'github.com/getAlby/hub/version.Tag=${{ env.TAG }}'"
shell: bash
- name: Import Code-Signing Certificates for macOS

2
go.mod
View file

@ -19,7 +19,7 @@ require (
github.com/stretchr/testify v1.11.1
github.com/tyler-smith/go-bip39 v1.1.0
github.com/wailsapp/wails/v2 v2.12.0
gitlab.com/ark-bitcoin/bark-ffi-bindings/golang v0.6.2
gitlab.com/ark-bitcoin/bark-ffi-bindings/golang v0.7.0
golang.org/x/crypto v0.52.0
golang.org/x/oauth2 v0.36.0
google.golang.org/grpc v1.79.3

4
go.sum
View file

@ -662,8 +662,8 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
gitlab.com/ark-bitcoin/bark-ffi-bindings/golang v0.6.2 h1:UwqTPL4dmG4N+RDJaci6D2MhiWvBbBsCss4nDbYt8TM=
gitlab.com/ark-bitcoin/bark-ffi-bindings/golang v0.6.2/go.mod h1:1jAwB/XR4i3D72fz3qWAd41tQLYcOCGfWZHMagn5fNg=
gitlab.com/ark-bitcoin/bark-ffi-bindings/golang v0.7.0 h1:X8h/JbdfDoHGvw2UQZJmIkpwAgANzBK5KxrZG7zChmc=
gitlab.com/ark-bitcoin/bark-ffi-bindings/golang v0.7.0/go.mod h1:1jAwB/XR4i3D72fz3qWAd41tQLYcOCGfWZHMagn5fNg=
go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo=
go.etcd.io/bbolt v1.4.3/go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E=
go.etcd.io/etcd/api/v3 v3.5.16 h1:WvmyJVbjWqK4R1E+B12RRHz3bRGy9XVfh++MgbN+6n0=

View file

@ -474,7 +474,7 @@ func (bs *BarkService) SendPaymentSync(invoice string, amountMsat *uint64) (*lnc
}
defer bs.clearInflightSend(paymentHash)
if _, err := bs.wallet.PayLightningInvoice(invoice, nil); err != nil {
if _, err := bs.wallet.PayLightningInvoice(invoice, nil, false); err != nil {
return nil, fmt.Errorf("bark PayLightningInvoice failed: %w", err)
}