Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

txJSON2Hex #35

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

120 changes: 0 additions & 120 deletions .gitignore

This file was deleted.

15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

47 changes: 0 additions & 47 deletions CONTRIBUTING.md

This file was deleted.

26 changes: 0 additions & 26 deletions LICENSE

This file was deleted.

94 changes: 7 additions & 87 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,94 +1,14 @@
# 21: Build the Machine-Payable Web [![Build Status](https://travis-ci.org/21dotco/two1-python.svg?branch=master)](https://travis-ci.org/21dotco/two1-python)
txHex2JSON

![21 logo](docs/img/21_banner.png "21")
Decode a raw hex Bitcoin transaction to a readable JSON data set

21 is an open source Python library and command line interface for
quickly building machine-payable web services. It allows you to
accomplish three major tasks:
--python 3.4+ is required--

- Get bitcoin on any device
- Add bitcoin micropayments to any Django or Flask app
- Earn bitcoin on every HTTP request
Installation (Ubuntu/Debian):

The package includes:
sudo sh install.sh

- an HD wallet to securely manage your bitcoin
- crypto and bitcoin libraries to build bitcoin/blockchain applications
- a [micropayment-channels](https://21.co/learn/intro-to-micropayment-channels/) client and server
- commands for mining, buying, and earning bitcoin, as well as requesting it from the 21 faucet
- tools for publishing machine-payable endpoints to the [21 Marketplace](https://21.co/mkt)
- containers that allow your machine to sell machine resources for bitcoin
Run:

and much more.
./txHex2JSON

## Security

_Please note that the 21 software is in beta_. To protect the security
of your systems while using 21, we highly recommend you install the
software on a device other than your main laptop (e.g. 21 Bitcoin
Computer, an old laptop, or an Amazon Virtual Machine) while the
product is still in beta. You can read more security-related
information [here](https://21.co/learn/security/). Please send an
email to [[email protected]](mailto://[email protected]) regarding any issue
concerning security.

## Installation
[Create an account](https://21.co) or install the library and CLI
(python3.4+ is required):

``` bash
$ curl https://21.co | sh
```

`two1` can also be installed via pip:

``` bash
$ sudo pip3 install two1
```

Start with the command line tool:

``` bash
$ 21 help
```

Then read the [Introduction to 21](https://21.co/learn/intro-to-21/) guide
and the `two1`
[documentation](https://21.co/learn/#reference-21-library).

## Developers
To edit and run the two1 source code:

```shell
$ git clone https://github.com/21dotco/two1-python.git
$ cd two1-python/
$ pip3 install -r requirements.txt # Install the requirements
$ pip3 install -e . # Install 21 as an editable python library
```

Your changes to the source will now be reflected in your system
installation in real-time.

## Docker
You can pull [Docker](https://www.docker.com/) images with
`two1` pre-installed from the
[21 Docker Hub repository](https://hub.docker.com/r/21dotco/two1).

``` bash
$ docker pull 21dotco/two1
```

Then run the latest base image:

``` bash
$ docker run -it 21dotco/two1 sh
```

## Community
Join the [21 developer community](https://slack.21.co) to chat
with other users or to get in touch with support.

## Licensing
`two1` is licensed under the FreeBSD License. See
[LICENSE](https://github.com/21dotco/two1-python/blob/master/LICENSE)
for the full license text.
34 changes: 0 additions & 34 deletions README.rst

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions two1/crypto/ecdsa.py → cryptolib/ecdsa.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
try:
from two1.crypto import ecdsa_openssl as _ecdsa
import cryptolib.ecdsa_openssl as _ecdsa
except:
from two1.crypto import ecdsa_python as _ecdsa
import cryptolib.ecdsa_python as _ecdsa

ECPointAffine = _ecdsa.ECPointAffine
EllipticCurve = _ecdsa.EllipticCurve
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions two1/crypto/ecdsa_openssl.py → cryptolib/ecdsa_openssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from ctypes import c_void_p
from ctypes import create_string_buffer

from two1.crypto.ecdsa_base import EllipticCurveBase
from two1.crypto.ecdsa_base import Point
from two1.crypto import openssl as ossl
from ecdsa_base import EllipticCurveBase
from ecdsa_base import Point
import openssl as ossl


class ECPointAffine(object):
Expand Down
4 changes: 2 additions & 2 deletions two1/crypto/ecdsa_python.py → cryptolib/ecdsa_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from collections import namedtuple

from two1.crypto.ecdsa_base import EllipticCurveBase
from cryptolib.ecdsa_base import EllipticCurveBase

# Links
# https://en.wikibooks.org/wiki/Cryptography/Elliptic_curve
Expand Down Expand Up @@ -776,7 +776,7 @@ def __init__(self):


class secp256k1(EllipticCurve):
""" Elliptic curve used in Bitcoin.
""" Elliptic curve used in lib.
"""
P = 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f
A = 0
Expand Down
File renamed without changes.
Loading