Giter Site home page Giter Site logo

bungalord / cryptocurrency-mit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mit-dci/cryptocurrency

0.0 0.0 0.0 1.42 MB

Uses the CryptoKernel library to create a modular cryptocurrency.

License: GNU General Public License v3.0

Shell 1.44% C++ 98.56%

cryptocurrency-mit's Introduction

CryptoCurrency

CryptoCurrency in an example digital currency written in C++ using the CryptoKernel library (https://github.com/metalicjames/CryptoKernel). Eventually I aim to use this to write an algorithm for implementing monetary policy in a decentralised manner.

Building on Ubuntu 16.04

First build and install CryptoKernel using the instructions here: https://github.com/metalicjames/CryptoKernel.

sudo apt-get update
sudo apt-get install libcurl4-openssl-dev libmicrohttpd-dev libjsonrpccpp-dev

git clone https://github.com/metalicjames/CryptoCurrency.git
cd CryptoCurrency
chmod +x build.sh
./build.sh

Usage

Run CryptoCurreny to start downloading blocks, mining and listening for commands.

screen ./CryptoCurrency

Here I use screen to have it dissapear into the background.

Use "getinfo" to retrieve various information about the state of the client

./CryptoCurrency getinfo
{
        "balance" : "150",
        "connections" : 0,
        "height" : 4,
        "version" : "1.0.0"
}

Use "account" to create or retrieve information about an address

./CryptoCurrency account myaccount
{
        "address" : "BImZrsfI0IsKl3Cm/MikTGMfuh/m113FvuDd2sGNZzz6+Cf+oLlq5/AZhNM0K77eFHwKEdvvSUoH9F6MCRghtdc=",
        "balance" : "0",
        "name" : "myaccount"
}

Use "sendtoaddress" to send funds to a public key. The first operand in the address to send to, the second is the amount, and the third is the fee

./CryptoCurrency sendtoaddress BImZrsfI0IsKl3Cm/MikTGMfuh/m113FvuDd2sGNZzz6+Cf+oLlq5/AZhNM0K77eFHwKEdvvSUoH9F6MCRghtdc= 10 0.001
1

./CryptoCurrency account myaccount
{
        "address" : "BImZrsfI0IsKl3Cm/MikTGMfuh/m113FvuDd2sGNZzz6+Cf+oLlq5/AZhNM0K77eFHwKEdvvSUoH9F6MCRghtdc=",
        "balance" : "10",
        "name" : "myaccount"
}

cryptocurrency-mit's People

Contributors

metalicjames 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.