GithubHelp home page GithubHelp logo

trodjr / bigchaindb-jukebox Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bigchaindb/bigchaindb-jukebox

0.0 1.0 0.0 14.47 MB

Storage and Stream Model

License: MIT License

JavaScript 60.03% HTML 12.12% CSS 0.61% Python 27.24%

bigchaindb-jukebox's Introduction

BigchainDB Jukebox

The Jukebox is a pay-as-you-stream demo for mediastreams using micropayments

Getting started

Only works with python3.4+, node v6.2.2

Install the requirements

$ npm install
$ pip install -r server/requirements.txt

Start all services

$ python -m server.serve

In a new console start node

$ npm start

Point the browser to http://localhost:8000/jukebox.html

Inside a python shell mint and send coins to the jukebox

$ cd server
from bigchaindb import crypto
from stream_coin import *

# create a user
user_sk, user_vk = crypto.generate_key_pair()

# mint coins for the user
mint_coin(user_vk)
mint_coin(user_vk)

# after the transactions go through retrieve the coins
get_owned_coins(user_vk).keys()
dict_keys(['59bf7fc3-777a-4c80-8d4a-dc742a940799','821112aa-8b2e-4978-83cf-b0a1c82aa6f4'])

# transfer a coin to the jukebox
transfer_coin(user_vk, user_sk, '59bf7fc3-777a-4c80-8d4a-dc742a940799')

Test sending between ledgers

In a new console run the following script

$ ./node_modules/.bin/babel-node scripts/send.js 

bigchaindb-jukebox's People

Contributors

diminator avatar timdaub avatar

Watchers

James Cloos 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.