Giter VIP home page Giter VIP logo

btc-gateway's Introduction

OVERVIEW

PythonNexus a simple web interface that allows anyone to automatically exchange bitcoins for BTC-denominated Ripple IOUs, and vice-versa. By running this application and opening it to the public, you can thus serve as a "gateway" for Bitcoin users to transfer value in and out of the Ripple network.


REQUIREMENTS AND SETUP

This application is implemented in and requires Django (https://www.djangoproject.com). Additionally, in order for it to run, you must simultaneously be running on your machine an instance of the Bitcoin daemon "bitcoind", which among other ways can be obtained by downloading the Bitcoin-Qt client (http://bitcoin.org/) and locating the "bitcoind" executable in the "daemon" directory.

bitcoind must be configured to accept RPC requests from the local machine. Otherwise, PythonNexus will give you an error resembling:

[Errno socket error] [Errno 10061] No connection could be made because the target machine actively refused it

At the end of pythonnexus/settings.py, five variables are declared for interacting with Bitcoin and Ripple. Make sure to replace them with values appropriate to your own case, as well as the Django-specific paths and keys declared elsewhere in the same file.

In addition to Python, Django, and bitcoind, the following (Python packages) are also required:
* jsonrpc
* ws4py

Before opening your service to the public, you must instruct your Ripple account to reject transactions lacking destination tags. This can be done by submitting the following request to the Ripple server (on the command line, in Python, etc.):

{'command':'submit','tx_json':{'TransactionType':'AccountSet','Flags':65536,'Account':MY_RIPPLE_ADDRESS,},'secret':MY_SECRET_KEY,}

(replacing the address and key as appropriate).


FEATURES

If a user wishes to send you bitcoins in exchange for IOUs, they can enter their Ripple address into the form, and they will receive a Bitcoin address to send to. Once they have sent any number of bitcoins, as many IOUs will be sent to their Ripple address. The Bitcoin address is then considered closed - the user should not send more bitcoins to it.

In order for this to be done, the user has to assign enough trust to you to be able to accept your IOUs. If no or insufficient trust is assigned, PythonNexus will continue trying (and failing) to send the IOUs until trust is assigned.

In the other direction, the user can also enter their Bitcoin address, and will receive a Ripple address to send BTC-denominated IOUs to; PythonNexus will then send as many Bitcoins to that address. (IOUs of other currencies will be bounced back or ignored). If for some reason you don't have enough bitcoins to redeem the IOUs, it will continue trying (and failing) until enough bitcoins are available.


UPDATED

This file was last updated January 23, 2013.

btc-gateway's People

Contributors

jatchili avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.