Skip to content

Commit

Permalink
the future is now: moving counterparty-cli into counterparty-lib
Browse files Browse the repository at this point in the history
Last commit from github.com/CounterpartyXCP/counterparty-cli repo:
"""
Merge pull request CounterpartyXCP#128 from pataegrillo/master

- Adding checkdb as a new parameter that will be used by counterparty to perform a database integrity check
Commit:
0f7a0a2 [0f7a0a2]
"""
  • Loading branch information
jotapea committed Feb 14, 2023
1 parent bb680cc commit b9b793f
Show file tree
Hide file tree
Showing 21 changed files with 2,242 additions and 4 deletions.
17 changes: 13 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ ENV LC_ALL en_US.UTF-8
ENV HOME /root

# Install counterparty-lib
COPY . /counterparty-lib
# COPY . /counterparty-lib
RUN mkdir /counterparty-lib
COPY requirements.txt /counterparty-lib/requirements.txt
COPY setup.py /counterparty-lib/setup.py
COPY counterpartylib /counterparty-lib/counterpartylib

COPY counterparty-cli /counterparty-cli

WORKDIR /counterparty-lib
RUN pip3 install -r requirements.txt
RUN python3 setup.py develop
Expand All @@ -31,9 +38,11 @@ RUN python3 setup.py install_apsw
# NOTE: By default, check out the counterparty-cli master branch. You can override the BRANCH build arg for a different
# branch (as you should check out the same branch as what you have with counterparty-lib, or a compatible one)
# NOTE2: In the future, counterparty-lib and counterparty-cli will go back to being one repo...
ARG CLI_BRANCH=master
ENV CLI_BRANCH ${CLI_BRANCH}
RUN git clone -b ${CLI_BRANCH} https://github.com/CounterpartyXCP/counterparty-cli.git /counterparty-cli
# ARG CLI_BRANCH=master
# ENV CLI_BRANCH ${CLI_BRANCH}
# RUN git clone -b ${CLI_BRANCH} https://github.com/CounterpartyXCP/counterparty-cli.git /counterparty-cli

# the future is now
WORKDIR /counterparty-cli
RUN pip3 install -r requirements.txt
RUN python3 setup.py develop
Expand Down
11 changes: 11 additions & 0 deletions counterparty-cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# precompiled python
*.pyc

# Setuptools distribution folder.
/dist/

# Setuptools build folder.
/build/

# Python egg metadata, regenerated from source files by setuptools.
/*.egg-info
7 changes: 7 additions & 0 deletions counterparty-cli/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: python
python:
- "3.4"
install:
- pip install -r requirements.txt
- python setup.py install
script: echo "Correctly installed"
27 changes: 27 additions & 0 deletions counterparty-cli/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Security Issues

* If you’ve identified a potential **security issue**, please contact us
directly at <support@counterparty.io>.


# Reporting an Issue

* Check to see if the issue has already been reported.

* Run with verbose logging and paste the relevant log output.

* List the exact version/commit being run, as well as the platform the software
is running on.


# Making a Pull Request

* Make (almost) all pull requests against the `develop` branch.

* All original code should follow [PEP8](https://www.python.org/dev/peps/pep-0008/).

* Code contributions should be well‐commented.

* Commit messages should be neatly formatted and descriptive, with a summary line.

* Commits should be organized into logical units.
35 changes: 35 additions & 0 deletions counterparty-cli/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## Command Line Interface Versions ##
* master (unreleased)
* Added indexd arguments
* removed backend-name argument
* v1.1.4 (2017/10/26)
* Added enhanced send arguments support.
* v1.1.3 (2017/05/01)
* Added `vacuum` command to server CLI.
* v1.1.2 (2016/07/11)
* Added P2SH support (to match counterparty-lib 9.55.0)
* added `get_tx_info` command
* added `--disable-utxo-locks` to `compose_transaction` to disable the locking of selected UTXOs for when the 'user' doesn't intend to broadcast the TX (straight away)
* Peg dependency versions in `setup.py`
* Added `debug_config` argument to print config to CLI.
* Added `--quiet` flag to `bootstrap` command
* Logging improvements
* Removed `rps` and `rpsresolve` commands
* Updated `README.md`
* v1.1.1 (2015/04/20)
* Fix `broadcast` command
* Cleaner, Commented-out Default Config Files
* Support new configuration parameter: `no-check-asset-conservation`, `rpc-batch-size`, `requests-timeout`
* v1.1.0 (2015/03/31)
* Code reorganisation
* Remove `market` command
* Add `getrows` command
* Add `clientapi` module
* Rename `get_running_info` to `getinfo`
* Rename `backend-ssl-verify` to `backend-ssl-no-verify`
* Rename `rpc-allow-cors` to `rpc-no-allow-cors`
* Change installation procedure
* v1.0.1 (2015/03/18)
* Update minimum `counterparty-lib` version from `v9.49.4` to `v9.50.0`
* v1.0.0 (2015/02/05)
* Initial Release
19 changes: 19 additions & 0 deletions counterparty-cli/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2013-Present Counterparty Developers

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
8 changes: 8 additions & 0 deletions counterparty-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[![Latest Version](https://pypip.in/version/counterparty-cli/badge.svg)](https://pypi.python.org/pypi/counterparty-cli/)
[![Supported Python versions](https://pypip.in/py_versions/counterparty-cli/badge.svg)](https://pypi.python.org/pypi/counterparty-cli/)
[![License](https://pypip.in/license/counterparty-cli/badge.svg)](https://pypi.python.org/pypi/counterparty-cli/)
[![Slack Status](http://slack.counterparty.io/badge.svg)](http://slack.counterparty.io)

`counterparty-cli` is a command line interface for [`counterparty-lib`](https://github.com/CounterpartyXCP/counterparty-lib).

For installation and configuration instructions, see the [`counterparty-lib README`](https://github.com/CounterpartyXCP/counterparty-lib), as well as the [Official Project Documentation](http://counterparty.io/docs/).
16 changes: 16 additions & 0 deletions counterparty-cli/counterpartycli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import os, sys

APP_VERSION = '1.1.5'

CURR_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser('__file__'))))
WIN_EXE_LIB = os.path.normpath(os.path.join(CURR_DIR, 'library'))
if os.path.isdir(WIN_EXE_LIB):
sys.path.insert(0, WIN_EXE_LIB)

def client_main():
from counterpartycli import client
client.main()

def server_main():
from counterpartycli import server
server.main()

0 comments on commit b9b793f

Please sign in to comment.