Skip to content

Feature: Add Insecure SSL support for electrum server#3

Merged
newtonick merged 2 commits intomainfrom
insecure-ssl-support
Mar 31, 2026
Merged

Feature: Add Insecure SSL support for electrum server#3
newtonick merged 2 commits intomainfrom
insecure-ssl-support

Conversation

@newtonick
Copy link
Copy Markdown
Owner

Dependency on bitcoindevkit/bdk-ffi#975 unless I want to fork bdk-ffi in the short term.

Testing Notes:

Switching bdk-swift between local and remote

Hellbender depends on bdk-swift (BitcoinDevKit) via SPM. During normal development it uses the remote release. When testing local bdk-ffi changes (e.g. the v2.3.0-ssl-patch branch), switch to the local copy.

Switch to local bdk-swift

export SOURCE=~"/Source"

  1. In $SOURCE/bdk-swift/Package.swift, change the binary target to use a local path:
    .binaryTarget(name: "bdkFFI", path: "./bdkFFI.xcframework"),
  2. Build the patched xcframework from bdk-ffi (must be on the correct branch):
    cd $SOURCE/bdk-ffi/bdk-swift && ./build-xcframework-dev.sh
  3. Move and rename the output:
    rm -rf $SOURCE/bdk-swift/bdkFFI.xcframework
    mv $SOURCE/bdk-ffi/bdk-swift/bdkffi.xcframework $SOURCE/bdk-swift/bdkFFI.xcframework
  4. Regenerate Swift bindings (the build script writes to bdk-ffi's sibling bdk-swift, so copy manually if needed):
    cd $SOURCE/bdk-ffi/bdk-ffi && cargo run --bin uniffi-bindgen generate \
      --library ./target/aarch64-apple-ios/debug/libbdkffi.dylib \
      --language swift --out-dir $SOURCE/bdk-swift/Sources/BitcoinDevKit --no-format
  5. In Xcode: remove the remote bdk-swift package dependency, then File → Add Package Dependencies → Add Local... and select $SOURCE/bdk-swift.
  6. Clear DerivedData if Xcode uses stale cached headers:
    rm -rf ~/Library/Developer/Xcode/DerivedData/hellbender-*

Switch back to remote bdk-swift

  1. In $SOURCE/bdk-swift/Package.swift, restore the remote binary target:
    .binaryTarget(
        name: "bdkFFI",
        url: "https://github.com/bitcoindevkit/bdk-swift/releases/download/2.3.0/bdkFFI.xcframework.zip",
        checksum: "f2224beafaf90415b650e17b4944cba74b553dcc97bb3c5b5359359887bd18f7"),
  2. In Xcode: remove the local bdk-swift package dependency.
  3. Add remote package: +https://github.com/bitcoindevkit/bdk-swiftExact Version 2.3.1 → Add BitcoinDevKit to the hellbender target.

…ent on BDK-FFI that exposes validate_domain parameter in the electrum client contstructor
@newtonick
Copy link
Copy Markdown
Owner Author

newtonick commented Mar 30, 2026

I expect the build and analyze GitHub action to fail unless BDK is updated or the Packaged is updated to point to a forked version.

@newtonick
Copy link
Copy Markdown
Owner Author

newtonick commented Mar 31, 2026

I decided to fork bdk-ffi and bdk-swift. I added one single commit (newtonick/bdk-ffi@94099a7) off of v2.3.1. My intention is to go back to proper BDK v3 once my PR is merged.

@newtonick newtonick merged commit 5165a36 into main Mar 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant