Merge pull request #27 from planetmint/plntmnt-cryptoconditions

Plntmnt cryptoconditions
This commit is contained in:
Sangat Das 2022-02-01 11:27:25 +01:00 committed by GitHub
commit f366aab1f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 44 additions and 55 deletions

View File

@ -10,7 +10,7 @@ WORKDIR /usr/src/app
RUN apk --update add sudo bash \
&& apk --update add python3 openssl ca-certificates git \
&& apk --update add --virtual build-dependencies python3-dev \
libffi-dev openssl-dev build-base jq \
libffi-dev openssl-dev build-base jq zsh \
&& apk add --no-cache libstdc++ dpkg gnupg \
&& pip3 install --upgrade pip cffi \
&& pip install -e . \

View File

@ -5,7 +5,7 @@ COPY . /usr/src/app/
WORKDIR /usr/src/app
RUN apk --update add sudo \
&& apk --update add python3 py-pip openssl ca-certificates git\
&& apk --update add --virtual build-dependencies python3-dev \
&& apk --update add --virtual build-dependencies python3-dev zsh \
libffi-dev openssl-dev build-base \
&& apk add --no-cache libstdc++ \
&& pip3 install --upgrade pip cffi \

View File

@ -3,7 +3,7 @@ FROM python:${python_version}
LABEL maintainer "contact@ipdb.global"
RUN apt-get update \
&& apt-get install -y git \
&& apt-get install -y git zsh\
&& pip install -U pip \
&& apt-get autoremove \
&& apt-get clean

View File

@ -12,10 +12,9 @@ so show the latest GitHub release instead.
[![Codecov branch](https://img.shields.io/codecov/c/github/planetmint/planetmint/master.svg)](https://codecov.io/github/planetmint/planetmint?branch=master)
[![Latest release](https://img.shields.io/github/release/planetmint/planetmint/all.svg)](https://github.com/planetmint/planetmint/releases)
[![Status on PyPI](https://img.shields.io/pypi/status/planetmint.svg)](https://pypi.org/project/Planetmint/)
[![Travis branch](https://img.shields.io/travis/planetmint/planetmint/master.svg)](https://travis-ci.com/planetmint/planetmint)
[![Documentation Status](https://readthedocs.org/projects/planetmint-server/badge/?version=latest)](https://docs.planetmint.com/projects/server/en/latest/)
[![Join the chat at https://gitter.im/planetmint/planetmint](https://badges.gitter.im/planetmint/planetmint.svg)](https://gitter.im/planetmint/planetmint?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Status on PyPI](https://img.shields.io/pypi/status/planetmint.svg)](https://pypi.org/project/Planetmint)
[![Build Status](https://app.travis-ci.com/planetmint/planetmint.svg?branch=main)](https://app.travis-ci.com/planetmint/planetmint)
[![Join the chat at https://gitter.im/planetmint/planetmint](https://badges.gitter.im/planetmint/planetmint.svg)](https://gitter.im/planetmint/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
# Planetmint Server

View File

@ -1,9 +1,10 @@
FROM python:3.9
RUN apt-get update && apt-get install -y vim zsh
RUN mkdir -p /src
RUN pip install --upgrade \
pycco \
websocket-client~=0.47.0 \
pytest~=3.0 \
bigchaindb-driver~=0.6.2 \
planetmint-driver>=0.9.0 \
blns

View File

@ -24,8 +24,8 @@
import os
# For this test case we import and use the Python Driver.
from bigchaindb_driver import BigchainDB
from bigchaindb_driver.crypto import generate_keypair
from planetmint_driver import Planetmint
from planetmint_driver.crypto import generate_keypair
def test_basic():
@ -34,7 +34,7 @@ def test_basic():
# connect to localhost, but you can override this value using the env variable
# called `PLANETMINT_ENDPOINT`, a valid value must include the schema:
# `https://example.com:9984`
bdb = BigchainDB(os.environ.get('PLANETMINT_ENDPOINT'))
bdb = Planetmint(os.environ.get('PLANETMINT_ENDPOINT'))
# ## Create keypairs
# This test requires the interaction between two actors with their own keypair.

View File

@ -26,18 +26,18 @@
# And of course, we also need the `BadRequest`.
import os
import pytest
from bigchaindb_driver.exceptions import BadRequest
from planetmint_driver.exceptions import BadRequest
# For this test case we import and use the Python Driver.
from bigchaindb_driver import BigchainDB
from bigchaindb_driver.crypto import generate_keypair
from planetmint_driver import Planetmint
from planetmint_driver.crypto import generate_keypair
def test_divisible_assets():
# ## Set up a connection to Planetmint
# Check [test_basic.py](./test_basic.html) to get some more details
# about the endpoint.
bdb = BigchainDB(os.environ.get('PLANETMINT_ENDPOINT'))
bdb = Planetmint(os.environ.get('PLANETMINT_ENDPOINT'))
# Oh look, it is Alice again and she brought her friend Bob along.
alice, bob = generate_keypair(), generate_keypair()

View File

@ -11,13 +11,13 @@ from uuid import uuid4
from threading import Thread
import queue
import bigchaindb_driver.exceptions
from bigchaindb_driver import BigchainDB
from bigchaindb_driver.crypto import generate_keypair
import planetmint_driver.exceptions
from planetmint_driver import Planetmint
from planetmint_driver.crypto import generate_keypair
def test_double_create():
bdb = BigchainDB(os.environ.get('PLANETMINT_ENDPOINT'))
bdb = Planetmint(os.environ.get('PLANETMINT_ENDPOINT'))
alice = generate_keypair()
results = queue.Queue()
@ -33,7 +33,7 @@ def test_double_create():
try:
bdb.transactions.send_commit(tx)
results.put('OK')
except bigchaindb_driver.exceptions.TransportError as e:
except planetmint_driver.exceptions.TransportError as e:
results.put('FAIL')
t1 = Thread(target=send_and_queue, args=(tx, ))

View File

@ -25,15 +25,15 @@
import os
# For this test case we import and use the Python Driver.
from bigchaindb_driver import BigchainDB
from bigchaindb_driver.crypto import generate_keypair
from planetmint_driver import Planetmint
from planetmint_driver.crypto import generate_keypair
def test_multiple_owners():
# ## Set up a connection to Planetmint
# Check [test_basic.py](./test_basic.html) to get some more details
# about the endpoint.
bdb = BigchainDB(os.environ.get('PLANETMINT_ENDPOINT'))
bdb = Planetmint(os.environ.get('PLANETMINT_ENDPOINT'))
# Hey Alice and Bob, nice to see you again!
alice, bob = generate_keypair(), generate_keypair()

View File

@ -24,9 +24,9 @@ from blns import blns
import pytest
# For this test case we import and use the Python Driver.
from bigchaindb_driver import BigchainDB
from bigchaindb_driver.crypto import generate_keypair
from bigchaindb_driver.exceptions import BadRequest
from planetmint_driver import Planetmint
from planetmint_driver.crypto import generate_keypair
from planetmint_driver.exceptions import BadRequest
naughty_strings = blns.all()
@ -36,7 +36,7 @@ def send_naughty_tx(asset, metadata):
# ## Set up a connection to Planetmint
# Check [test_basic.py](./test_basic.html) to get some more details
# about the endpoint.
bdb = BigchainDB(os.environ.get('PLANETMINT_ENDPOINT'))
bdb = Planetmint(os.environ.get('PLANETMINT_ENDPOINT'))
# Here's Alice.
alice = generate_keypair()

View File

@ -27,8 +27,8 @@ from uuid import uuid4
# [websocket](https://github.com/websocket-client/websocket-client) module
from websocket import create_connection
from bigchaindb_driver import BigchainDB
from bigchaindb_driver.crypto import generate_keypair
from planetmint_driver import Planetmint
from planetmint_driver.crypto import generate_keypair
def test_stream():
@ -40,7 +40,7 @@ def test_stream():
# *That's pretty bad, but let's do like this for now.*
WS_ENDPOINT = 'ws://{}:9985/api/v1/streams/valid_transactions'.format(BDB_ENDPOINT.rsplit(':')[0])
bdb = BigchainDB(BDB_ENDPOINT)
bdb = Planetmint(BDB_ENDPOINT)
# Hello to Alice again, she is pretty active in those tests, good job
# Alice!

View File

@ -11,7 +11,7 @@ There are many ways you can contribute to Planetmint.
It includes several sub-projects.
- `Planetmint Server <https://github.com/planetmint/planetmint>`_
- `Planetmint Python Driver <https://github.com/planetmint/bigchaindb-driver>`_
- `Planetmint Python Driver <https://github.com/planetmint/planetmint-driver>`_
- `Planetmint JavaScript Driver <https://github.com/planetmint/js-bigchaindb-driver>`_
- `Planetmint Java Driver <https://github.com/planetmint/java-bigchaindb-driver>`_
- `cryptoconditions <https://github.com/planetmint/cryptoconditions>`_ (a Python package by us)

View File

@ -22,7 +22,6 @@ People ask questions about Planetmint in the following places:
- Gitter
- [planetmint/planetmint](https://gitter.im/planetmint/community)
- [planetmint/js-planetmint-driver](https://gitter.im/planetmint/community))
- [Twitter](https://twitter.com/planetmint)
- [Stack Overflow "planetmint"](https://stackoverflow.com/search?q=planetmint)

View File

@ -19,7 +19,7 @@ If you're writing code, you should also update any related docs. However, you mi
You can certainly do that!
- The docs for Planetmint Server live under ``planetmint/docs/`` in the ``planetmint/planetmint`` repo.
- There are docs for the Python driver under ``bigchaindb-driver/docs/`` in the ``planetmint/bigchaindb-driver`` repo.
- There are docs for the Python driver under ``planetmint-driver/docs/`` in the ``planetmint/planetmint-driver`` repo.
- There are docs for the JavaScript driver under ``planetmint/js-bigchaindb-driver`` in the ``planetmint/js-bigchaindb-driver`` repo.
- The source code for the Planetmint website is in a private repo, but we can give you access if you ask.

View File

@ -205,10 +205,6 @@ Tendermint voting 파워가 0인 노드인 추종자 노드를 생성할 수 있
[MongoDB node.js 드라이버](https://mongodb.github.io/node-mongodb-native/?jmp=docs)와 같은 MongoDB 드라이버를 사용하여 다음 중 하나를 사용하여 노드의 MongoDB 데이터베이스에 연결할 수 있습니다. 여기 자바스크립트 쿼리 코드에 대한 링크가 있습니다.
<<<<<<< HEAD
- [The Planetmint JavaScript/Node.js driver source code](https://github.com/planetmint/js-bigchaindb-driver)
=======
- [The Planetmint JavaScript/Node.js driver source code](https://github.com/planetmint/js-planetmint-driver)
>>>>>>> 3bfc3298f8210b135084e823eedd47f213538088
- [Example code by @manolodewiner](https://github.com/manolodewiner/query-mongodb-planetmint/blob/master/queryMongo.js)
- [More example code by @manolodewiner](https://github.com/planetmint/planetmint/issues/2315#issuecomment-392724279)
- [The Planetmint JavaScript/Node.js driver source code](https://github.com/bigchaindb/js-bidchaindb-driver)
- [Example code by @manolodewiner](https://github.com/manolodewiner/query-mongodb-bigchaindb/blob/master/queryMongo.js)
- [More example code by @manolodewiner](https://github.com/bigchaindb/bigchaindb/issues/2315#issuecomment-392724279)

View File

@ -9,8 +9,8 @@ WORKDIR /
RUN apk add --no-cache --update curl bind-tools python3-dev g++ \
libffi-dev make vim git nodejs openssl-dev \
&& pip3 install ipython \
&& git clone https://github.com/bigchaindb/bigchaindb-driver \
&& cd bigchaindb-driver \
&& git clone https://github.com/planetmint/planetmint-driver \
&& cd planetmint-driver \
&& pip3 install -e . \
&& npm install -g wsc
ENTRYPOINT ["/bin/sh"]

View File

@ -16,6 +16,9 @@ from setuptools import setup, find_packages
if sys.version_info < (3, 9):
sys.exit('Please use Python version 3.9 or higher.')
with open('README.md') as readme_file:
readme = readme_file.read()
# get the version
version = {}
with open('planetmint/version.py') as fp:
@ -59,7 +62,6 @@ tests_require = [
'flake8',
'flake8-quotes==0.8.1',
'hypothesis>=5.3.0',
# Removed pylint because its GPL license isn't Apache2-compatible
'pytest>=3.0.0',
'pytest-cov==2.8.1',
'pytest-mock',
@ -74,7 +76,7 @@ install_requires = [
'chardet==3.0.4',
'aiohttp==3.7.4',
'bigchaindb-abci==1.0.7',
'cryptoconditions==0.8.1',
'planetmint-cryptoconditions>=0.9.0',
'flask-cors==3.0.10',
'flask-restful==0.3.9',
'flask==2.0.1',
@ -97,20 +99,12 @@ setup(
name='Planetmint',
version=version['__version__'],
description='Planetmint: The Blockchain Database',
long_description=(
"Planetmint allows developers and enterprises to deploy blockchain "
"proof-of-concepts, platforms and applications with a blockchain "
"database. Planetmint supports a wide range of industries and use cases "
"from identity and intellectual property to supply chains, energy, IoT "
"and financial ecosystems. With high throughput, low latency, powerful "
"query functionality, decentralized control, immutable data storage and "
"built-in asset support, Planetmint is like a database with blockchain "
"characteristics."
),
long_description=readme,
long_description_content_type='text/markdown',
url='https://github.com/Planetmint/planetmint/',
author='Planetmint Contributors',
author_email='contact@ipdb.global',
license='Apache Software License 2.0',
license='AGPLv3',
zip_safe=False,
python_requires='>=3.9',
classifiers=[