3

I'm working on a proof-of-concept for a blockchain project and at its core it will need a modified SPV node running on iOS. The reason I need to modify it is so I can build non-standard (e.g. OP_RETURN) scripts without seat-of-the-pants techniques like hacking into the transaction hex.

I'm aware of some basic starting points such as picocoin and libbitcoin which I should be able to compile for iOS. But is there anything else available that would specifically make an SPV node easier to develop on iOS?

Echelon
  • 153
  • 5

3 Answers3

3

BreadWallet for iOS is open source, has a permissive license, and uses SPV https://github.com/voisine/breadwallet/blob/78d67870cdb887bab69ffeab8d808a3cb24d3759/BreadWallet/BRPeer.m

2

There are Objective-C libraries for Bitcoin, like CoreBitcoin, but none of them implement an SPV client.

My thinking (I've never developed for iOS, only for android) is that you should use a mature solution, like BitcoinJ, and a tool like J2ObjC to convert it. I think that would give you a faster (in terms of development time) and better-tested solution.

Nick ODell
  • 29,184
  • 11
  • 69
  • 129
  • Thanks for the CoreBitcoin suggestion Nick. Not sure about converting a Java codebase though... I've had pain with that kind of thing in the past, because the resultant code is often quite hard to work with. – Echelon May 22 '15 at 19:17
  • I am using https://github.com/keeshux/BitcoinSPV but I still face 0 wallet balance. Check my question with my full code: https://bitcoin.stackexchange.com/questions/90142/bitcoin-spv-not-able-to-fetch-transactions – Paresh Thakor Sep 12 '19 at 01:47
2

I have found this iOS SPV client library: https://github.com/keeshux/BitcoinSPV

Echelon
  • 153
  • 5