Dynamic umbrella framework to be consumed by an iOS app for implementing functionality with respect to Bitcion and connecting to the Bitcoin network. The framework is an umbrella framework, which includes various static libraries such as:
The Xcode project defines the necessary steps to build the framework as a build target.
- Clone the project
- Type
bundle install
in a Terminal window, at the project root - Type
bundle exec fastlane test
...or... - Open Xcode
- Ensure the
CNBitcoinKit
target is selected, and build (Cmd + B). The build process will build thelibbitcoin
dependent target, which callsmake
recipes to build libbitcoin and subsequent dependencies.
What things you need to install the software and how to install them
- Xcode >= 9.2
- macOS >= 10.13
Recommended consumption is via Carthage. Create a Cartfile
in the project root of your app project and add the following line:
github "coinninjadev/CNBitcoinKit.git" "master"
Then, from the command line (add the --platform iOS
parameter if compiling only for iOS):
carthage bootstrap [--platform iOS]
Then, follow the steps for adding a Carthage dependency to Xcode
Open Xcode and press Cmd-U to run all tests.
To create (and eventually broadcast) a transaction use - (void)broadcastWithTransactionData:(CNBTransactionData *)data wallet:(CNBHDWallet *)wallet success:(void (^)(NSString *))success failure:(void (^)(NSError *))failure
function exposed on the CNBTransactionBuilder
class.
In order to call that method, you'll need an instance of CNBHDWallet
initialized with recovery words with funds available to spend, and a populated CNBTransactionData
object, holding the data about the transaction which should be broadcasted.
NOTE: The above function is the only function that should be used. Do not use any functions exposed by the wallet. They are exposed to allow the builder to successfully build a transaction.
Please read CONTRIBUTING.md for our contribution policy.
Please read CODE_OF_CONDUCT.md for details on our code of conduct.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- BJ Miller - Initial work - Coin Ninja
This project is licensed under the MIT License - see the LICENSE.md file for details
- Make recipe structure inspired by AirBitz