Swift Package Manager (SPM) and Docker version of the original Bitcoin Core elliptic curve library.
I forked the original Bitcoin Core's library to add:
- A
Package.swift
package manifest for integration into Swift projects using SPM. - A
Dockerfile
with build procedures for various configurations. - A
macos-xcframework-build.sh
shell script to build targetting macOS and package as XCFramework. - This README file.
This way the library can be used in Swift projects using Swift Package Manager (SPM) on both Mac and Linux platforms.
PRs welcome. If you need to contact me just DM me at twitter.com/notcraigwright
.
Use as a normal Swift Package:
Package( …
// Add it to the package dependencies
dependencies: [
.package(url: "https://github.com/swift-bitcoin/secp256k1", from: "0.0.0") …
// Add it to individual targets
targets: {
.target(… dependencies: [
.product(name: "LibSECP256k1", package: "secp256k1") …
Add a binary target to your Package.swift
. Use the XCFramework
ZIP file attached to an specific release. Also attached is the corresponding checksum needed for the binary target.
// …
targets: [
.binaryTarget(name: "secp256k1",
url: "https://github.com/craigwrong/secp256k1/releases/download/22.0.1-craigwrong.1/secp256k1.xcframework.zip", checksum: "fff5415b72449331212cb75c71a47445cbe54fed061dc82153dcadbffae10f69"),
.target(
name: "ECHelper",
dependencies: ["secp256k1"]),
…
PRs are welcome and DMs are open at twitter.com/notcraigwright.