Skip to content

Instantly share code, notes, and snippets.

@jcvernaleo
Last active January 29, 2018 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcvernaleo/2bc03352cf76cc4b69c8e1d86941d4c1 to your computer and use it in GitHub Desktop.
Save jcvernaleo/2bc03352cf76cc4b69c8e1d86941d4c1 to your computer and use it in GitHub Desktop.

PinkCoin Mobile

jcv

2018/01/29

This document describes the work that was done (and additional work needed on a mobile wallet for PinkCoin.

Summary

Work has only been done on an iOS wallet. No work on Android has been done as of yet.

Most of the work was done by @DaveKoz.

Breadwallet was used as a base. Breadwallet is an SPV wallet for Bitcoin.

All work has been done on the fork in @davekoz's repo (although I have it forked in my github repo as well).

There are two components:

UI: Breadwallet-ios

Core: Breadwallet-core

Unfortunately, this may only be compiled with a very recent XCode which is only installable on a recent OSX (High Sierra probably). Breadwallet-ui uses git submodules to call the correct version of breadwallet-core so for hacking on the code you might need to change it to call your own fork before checking out the submodules (before building with XCode).

Progress/Work Needed

The UI components have all been updated for Pink already.

The real work that needs to be done is in the breadwallet-core component. This needs to be match up with the values that are in the main pinkcoin C++ code base.

The following areas either need to be worked on or have been worked on to port breadwallet to a bitcoin-like chain such as pink:

  1. Network info: The ports for peer communication for main and testnet, genesis blocks, network magic numbers, and checkpoints need to be adjusted for the chain. These should all have been done for pink already.

  2. Blockheaders: The blockheaders must be changed to match those for pink. This needs the proper size of all the elements in the headers along with any fields that are changed compared to bitcoin. This has been partially done.

  3. BIP support: Breadwallet has checks for a few BIPs. These need to be turned on or off depending on if Pink actually supports them.

  4. Block format: Pretty much same idea as the headers.

  5. Addresses: Pink uses different addresses from Bitcoin. This should already have been changed so bread can make correct pink addresses.

  6. Hash function. Need to make sure any time bread calls a hash function it is the one pink uses and not what bitcoin does. This might have been done already but should be confirmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment