Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Experimental, DO NOT USE for production websites until further notice. Currently Drupal 7 only.

For discussion, please join us in the #drupal-crypto chat room on Freenode IRC.

Installation

  1. Install a coin daemon.
  2. While building, look up the coin PUBKEY_ADDRESS in the coin source code src/base58.h. This is needed to validate addresses. The value for BitCoin is zero.
  3. Install cryptocoin modules: cryptocoin, cryptocoin_transaction, cryptocoin_account, cryptocoin_user.
  4. Install http://phpqrcode.sourceforge.net/ into sites/all/libraries. You should end up with sites/all/libraries/phpqrcode/phpqrcode.php
  5. Navigate to CryptoCoin -> Add New Coin fill out and submit the form.
  6. In your coin daemon, enable RPC and add the following configuration:
    rpcuser=bitcoinrpc
    rpcport=11111
    rpcpassword=MYRPCPASSWORD
    rpcallowip=127.0.0.1
    walletnotify=/usr/bin/php [PATH TO MODULES]/cryptocoin/walletnotify.php [PATH TO DRUPAL] [COIN TRADE NAME] %s
    blocknotify=/usr/bin/php [PATH TO MODULES]/cryptocoin/blocknotify.php [PATH TO DRUPAL] [COIN TRADE NAME] %s
    
  7. Turn off cron in the admin, set up your system to hit cron as often as possible.
  8. Navigate to your user account page to deposit and withdraw coin.

Development plan

Phase 1: coins / accounts / transactions

coins as entities
basic support for tracking coin ownership
user accounts
user to user transfers
tokens integration
UI for deposit and withdraw

[NOTE PHASE 1 IS DONE AND CURRENTLY IN TESTING]

Phase 2: site building tools

application API
Views integration
Rules integration
Comment integration (tipping)
Running wallets on a separate locked-down server

Phase 3: commerce

Commerce module checkout integration
direct user to user payments with a form
cold storage

Phase 4: trading

escrow feauture
order books

TODO list

  • Automated testing
  • Test a zero confirmation configuration
  • Coin summary on entity view page
  • API review / improvements
  • API documentation
  • JSON operations CSRF protection (above drupal's form tokens which are already utilized)
  • BIP32 seeded address generation. local client pk storage.
  • Behave more gracefully when wallet is offline
  • Enable / disable wallets
  • Code cleanup, fix notices
  • Customize withdraw response text
  • Tokens replacement missing in email click response page
  • Test and debug without JS enabled
  • Code cleanup
  • More documentation, hook api docs
  • Cached getinfo and getmininginfo data
  • Withdraw form: deduct amount in javascript so if another withdraw happens without changing the page it catches amounts too large before submitting
  • Revisit fee handling and the "general funds" account
  • Move the main CryptoCoin menu under Structure instead of top
  • Move the deposit display into a theme function, currently it's just a content array in hook_user_view().
  • Caching: many utility functions could use a static cache.
  • Move token hooks to .inc files.
  • User deposit and withdraw blocks.
  • More flexible/customizable coin list on account page. Maybe require Views and make it an embedded view?

Status

At the moment, all it can do is deposit and withdraw. User account balance is available as a block that auto updates using JSON. Phase 2 of the above plan is currently in development, many more features coming soon.

(Mostly) complete features listing

  • Coins are fieldable entities
  • Deposit and withdraw on user account page
  • Deposit, withdraw, balance blocks.

Donate

Please consider making a BitCoin donation to help keep this project moving:

1NCDqpBsXrpeESS3ssndPsCg9t6eu22Xg7

Supporting organizations: 
Sponsored development

Project information