Skip to content

Commit

Permalink
Version 1.12.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNaif2018 committed Aug 13, 2023
1 parent 09ecebf commit 79d4210
Show file tree
Hide file tree
Showing 16 changed files with 72 additions and 68 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
bitcartcc: bitcartcc/bitcartcc-shared@1
bitcart: bitcart/bitcart-shared@2

executors:
main-executor:
Expand All @@ -22,7 +22,7 @@ commands:
- run:
name: clone daemon
command: |
git clone https://github.com/bitcartcc/bitcart ~/bitcart-daemon
git clone https://github.com/bitcart/bitcart ~/bitcart-daemon
- restore_cache:
keys:
Expand Down Expand Up @@ -94,12 +94,12 @@ jobs:
command: |
make ci
- bitcartcc/codecov
- bitcart/codecov

- upload-results

deploy:
executor: bitcartcc/docker-python
executor: bitcart/docker-python
docker:
- image: cimg/python:3.8
steps:
Expand All @@ -126,7 +126,7 @@ workflows:
version: 2
test_and_deploy:
jobs:
- bitcartcc/lint:
- bitcart/lint:
name: lint
- test:
name: test-<< matrix.v >>
Expand All @@ -140,7 +140,7 @@ workflows:
- "3.10"
- "3.11"

- bitcartcc/functional-tests:
- bitcart/functional-tests:
name: functional-tests
dependency-steps:
- install_dependencies
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Latest changes

## 1.12.1.1

Rename BitcartCC to Bitcart

## 1.12.1.0

Electrums upgrade to 4.4.5
Expand Down
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Contributing to BitcartCC SDK
# Contributing to Bitcart SDK

Welcome, and thank you for your interest in contributing to BitcartCC SDK!
Welcome, and thank you for your interest in contributing to Bitcart SDK!

Our [central contributing guidelines](https://github.com/bitcartcc/bitcart/blob/master/CONTRIBUTING.md) apply to all BitcartCC repositories.
Our [central contributing guidelines](https://github.com/bitcart/bitcart/blob/master/CONTRIBUTING.md) apply to all Bitcart repositories.

Below are the instructions for setting up development environment with BitcartCC SDK.
Below are the instructions for setting up development environment with Bitcart SDK.

## Setting up development environment

Some general advice can be found in our [central contributing guidelines](https://github.com/bitcartcc/bitcart/blob/master/CONTRIBUTING.md#setting-up-development-environment).
Some general advice can be found in our [central contributing guidelines](https://github.com/bitcart/bitcart/blob/master/CONTRIBUTING.md#setting-up-development-environment).

Instructions:

Expand All @@ -26,7 +26,7 @@ based on context.

From now on, development environment is ready.

Make sure to follow [our coding guidelines](https://github.com/bitcartcc/bitcart/blob/master/CODING_STANDARDS.md) when developing.
Make sure to follow [our coding guidelines](https://github.com/bitcart/bitcart/blob/master/CODING_STANDARDS.md) when developing.

This repository uses pre-commit hooks for better development experience. Install them with:

Expand Down Expand Up @@ -73,7 +73,7 @@ Before running extended test suite, start bitcoind and fulcrum. Each time regtes

Run `make bitcoind` to start bitcoind, `make fulcrum` to start fulcrum.

After that, stop your testnet BitcartCC daemon, and start regtest one from cloned `bitcart` repo by running `make regtest`.
After that, stop your testnet Bitcart daemon, and start regtest one from cloned `bitcart` repo by running `make regtest`.

You should also start an lightning node for testing, run `make regtestln` in another terminal.

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# BitcartCC SDK
# Bitcart SDK

[![CircleCI](https://circleci.com/gh/bitcartcc/bitcart-sdk.svg?style=svg)](https://circleci.com/gh/bitcartcc/bitcart-sdk)
[![Codecov](https://img.shields.io/codecov/c/github/bitcartcc/bitcart-sdk?style=flat-square)](https://codecov.io/gh/bitcartcc/bitcart-sdk)
[![CircleCI](https://circleci.com/gh/bitcart/bitcart-sdk.svg?style=svg)](https://circleci.com/gh/bitcart/bitcart-sdk)
[![Codecov](https://img.shields.io/codecov/c/github/bitcart/bitcart-sdk?style=flat-square)](https://codecov.io/gh/bitcart/bitcart-sdk)
[![PyPI version](https://img.shields.io/pypi/v/bitcart.svg?style=flat-square)](https://pypi.python.org/pypi/bitcart/)
[![Read the Docs](https://img.shields.io/readthedocs/bitcart-sdk?style=flat-square)](https://sdk.bitcartcc.com)
[![Read the Docs](https://img.shields.io/readthedocs/bitcart-sdk?style=flat-square)](https://sdk.bitcart.ai)

This is a client library(wrapper) around BitcartCC daemon. It is used to simplify common commands.
This is a client library(wrapper) around Bitcart daemon. It is used to simplify common commands.
Coins support(⚡ means lightning is supported):

- Bitcoin (⚡)
Expand Down Expand Up @@ -40,7 +40,7 @@ async def main():

Async callback functions for `@btc.on` are supported.

For more information [Read the Docs](https://sdk.bitcartcc.com)
For more information [Read the Docs](https://sdk.bitcart.ai)

## Release versioning

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

# -- Project information -----------------------------------------------------

project = "BitcartCC SDK"
copyright = "2019, MrNaif2018"
project = "Bitcart SDK"
copyright = "2019-2023, MrNaif2018"
author = "MrNaif2018"

# The full version, including alpha/beta/rc tags
Expand Down
2 changes: 1 addition & 1 deletion docs/events.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BitcartCC SDK Events System
Bitcart SDK Events System
---------------------------

Introduction
Expand Down
12 changes: 6 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. BitcartCC SDK documentation master file, created by
.. Bitcart SDK documentation master file, created by
sphinx-quickstart on Tue Jul 9 22:11:54 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to BitcartCC SDK's documentation!
Welcome to Bitcart SDK's documentation!
=========================================

.. toctree::
Expand All @@ -15,12 +15,12 @@ Welcome to BitcartCC SDK's documentation!
apimanager
api

BitcartCC is a platform to simplify cryptocurrencies adaptation.
This SDK is part of BitcartCC.
Using this SDK you can easily connect to BitcartCC daemon
Bitcart is a platform to simplify cryptocurrencies adaptation.
This SDK is part of Bitcart.
Using this SDK you can easily connect to Bitcart daemon
and code scripts around it easily.

Behold, the power of BitcartCC:
Behold, the power of Bitcart:

.. code-block:: python
Expand Down
12 changes: 6 additions & 6 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Installing BitcartCC SDK
Installing Bitcart SDK
========================

Simply run
Expand All @@ -12,11 +12,11 @@ to install the library.
But to initialize bitcoin instance you will need
``rpc_url``, ``rpc_login`` and ``rpc_password`` (not required, defaults
work with default ports and authentification).
For that you'll need BitcartCC daemon, so:
For that you'll need Bitcart daemon, so:

.. code-block:: sh
git clone https://github.com/bitcartcc/bitcart
git clone https://github.com/bitcart/bitcart
cd bitcart
pip install -r requirements/base.txt
pip install -r requirements/daemons/btc.txt
Expand All @@ -28,7 +28,7 @@ For example if you run bitcoin, ``coin_name=btc, COIN_NAME=BTC``, for litecoin `
Run ``pip install -r requirements/daemons/coin_name.txt`` to install
requirements for daemon of ``coin_name``.

This will clone main BitcartCC repo and install dependencies,
This will clone main Bitcart repo and install dependencies,
we recommend using virtualenv for consistency(some daemons conflict one
with another, so using one virtualenv per daemon is fine).

Expand Down Expand Up @@ -58,10 +58,10 @@ Where port is the port your daemon uses.
You can change port and host by using ``COIN_NAME_HOST`` and ``COIN_NAME_PORT``
env variables.
Default ports are starting from 5000 and increase for each daemon by 1
(in order how they were added to BitcartCC).
(in order how they were added to Bitcart).
Refer to main docs for ports information.
Bitcoin port is 5000, litecoin is 5001, etc.
So, to initialize your BitcartCC instance right now,
So, to initialize your Bitcart instance right now,
import it and use those settings:

.. code-block:: python
Expand Down
8 changes: 4 additions & 4 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# BitcartCC usage examples
# Bitcart usage examples

This folder contains examples of using BitcartCC.
This folder contains examples of using Bitcart.

Examples requirements for that folder is in requirements.txt(actually just BitcartCC SDK)
Examples requirements for that folder is in requirements.txt(actually just Bitcart SDK)

Examples:

- Full BitcartCC API usage example: full.py
- Full Bitcart API usage example: full.py
- Get transaction by tx hash(CLI): gettx.py
- Get wallet onchain and offchain(lightning) balance: getbalance.py
- Pay to some address(CLI): donateto.py
Expand Down
44 changes: 22 additions & 22 deletions examples/atomic_tipbot/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Full example of using BitcartCC: Telegram Atomic Tip Bot
# Full example of using Bitcart: Telegram Atomic Tip Bot

**_Note: this example doesn't work because of `rate()` command being removed. Fetch exchange rates yourself or use Merchants API for this_**

Expand All @@ -10,10 +10,10 @@ Used tools:
- Mongo DB
- Pyrogram(for bot)
- qrcode library for generating qr codes
- BitcartCC to do all the bitcoin and lightning job.
- Bitcart to do all the bitcoin and lightning job.

Special thanks to @reablaz, for his original [Atomic tips bot](https://github.com/reablaz/atomic_tipbot)
This bot is rewritten in my style, using modern python 3.6+ f-strings, and of course, BitcartCC. (and made this example reproducible)
This bot is rewritten in my style, using modern python 3.6+ f-strings, and of course, Bitcart. (and made this example reproducible)

## Installation

Expand All @@ -24,7 +24,7 @@ After that, install dependencies of this example using:
`pip install -r requirements.txt`

Check requirements.txt if you want to know exactly which dependencies were used and why.
BitcartCC SDK in pip is just `bitcart`.
Bitcart SDK in pip is just `bitcart`.

After that, to run your bot, you need to have a telegram account, login to
my.telegram.org, click on API development tools, create app if not yet, and take App api_id and api_hash from there.
Expand All @@ -39,19 +39,19 @@ After that, you need to get your x/y/z pub/prv(or Electrum seed). Get it from yo
Enter it in xpub section of config.
After that, rename config.ini.example to config.ini.

Now everything is ready, we only need to start BitcartCC daemon.
Now everything is ready, we only need to start Bitcart daemon.
There are two ways to do it, automatic(via docker, recommended), or directly via your installed python.

### Automatic

Clone bitcart-docker repository:

```
git clone https://github.com/bitcartcc/bitcart-docker
git clone https://github.com/bitcart/bitcart-docker
cd bitcart-docker
```

Now you need to configure BitcartCC, but if you need only BTC daemon, run those
Now you need to configure Bitcart, but if you need only BTC daemon, run those

```
export BITCART_INSTALL=none
Expand All @@ -74,10 +74,10 @@ If you will later need to stop them, run `./stop.sh`

As for this example, Python 3.8+ is required. Using virtualenv is recommended.

Clone BitcartCC repository:
Clone Bitcart repository:

```
git clone https://github.com/bitcartcc/bitcart
git clone https://github.com/bitcart/bitcart
cd bitcart
```

Expand Down Expand Up @@ -107,13 +107,13 @@ If you have come here to see how it works, read the next part.
Code is formatted using black, checked with flake8.
Below are some comments regarding what is what.

### BitcartCC
### Bitcart

BitcartCC is main in this example, it is used for all bot functions(generate invoice, wait for invoice payment, withdraw, etc.)
Bitcart is main in this example, it is used for all bot functions(generate invoice, wait for invoice payment, withdraw, etc.)

[BitcartCC Python SDK](https://pypi.org/project/bitcart) is used to make BitcartCC usage easy. It internally connects to BitcartCC daemon.
[Bitcart Python SDK](https://pypi.org/project/bitcart) is used to make Bitcart usage easy. It internally connects to Bitcart daemon.

Look at # bitcart: comments in code to find things related to BitcartCC.
Look at # bitcart: comments in code to find things related to Bitcart.
As you can see, it is quite simple, but let's recap it.

To use any coins you need, simply import them from `bitcart`, in case of bitcoin:
Expand All @@ -128,16 +128,16 @@ You can initialize it without any parameters, too, but it will be limited(wallet

BTC class accepts the following parameters:

- rpc_url - url of BitcartCC daemon to connect to
- rpc_user - user to login into your BitcartCC daemon
- rpc_pass - password to login into your BitcartCC daemon
- rpc_url - url of Bitcart daemon to connect to
- rpc_user - user to login into your Bitcart daemon
- rpc_pass - password to login into your Bitcart daemon
- xpub - actually it is not just xpub, it can be x/y/z pub/prv, almost anything. Electrum seed can be used too.
- session - completely optional, pass your precreated aiohttp.ClientSession(only if you need to customize something in default session)

After intializing coin, you can start using it.
BitcartCC SDK coins' main methods are fully documented(often with examples)
Bitcart SDK coins' main methods are fully documented(often with examples)
Those are highlevel methods.
If you see something missing, open issue at [BitcartCC SDK repository](https://github.com/bitcartcc/bitcart-sdk)
If you see something missing, open issue at [Bitcart SDK repository](https://github.com/bitcart/bitcart-sdk)
If you need to use electrum's RPC methods, call them via btc.server(a wrapper around it), like:

`btc.server.validateaddress()`
Expand All @@ -150,7 +150,7 @@ To see a list of all RPC methods, call

RPC methods accessible via btc.server can't have intellisence in your IDE because they are completely dynamic(via `__getattr__`).

Now, about using BitcartCC in this bot's code.
Now, about using Bitcart in this bot's code.
Use `btc.add_request(amount, description="", expire=15)` to create BTC invoice
Amount is amount in BTC, description is optional and is description of invoice, expire is the time invoice will expire in,
default 15 minutes, but if you pass None, invoice will never expire.
Expand Down Expand Up @@ -205,7 +205,7 @@ def payment_handler(event, arg):
# process it here
```

Possible events can be found at [SDK docs](https://sdk.bitcartcc.com/en/latest/events.html).
Possible events can be found at [SDK docs](https://sdk.bitcart.ai/en/latest/events.html).

To start listening for those updates, you need to start polling, for that, use:

Expand All @@ -224,9 +224,9 @@ To get transaction, use `btc.get_tx(tx_hash)`

To accept updates for multiple coins, even in different currencies, you can use APIManager.

You can read about APIManager in [SDK docs](https://sdk.bitcartcc.com/en/latest/apimanager.html).
You can read about APIManager in [SDK docs](https://sdk.bitcart.ai/en/latest/apimanager.html).

For more information, read [BitcartCC SDK docs](https://sdk.bitcartcc.com) and [Main BitcartCC docs](https://docs.bitcartcc.com)
For more information, read [Bitcart SDK docs](https://sdk.bitcart.ai) and [Main Bitcart docs](https://docs.bitcart.ai)

### Telegram bot

Expand Down
2 changes: 1 addition & 1 deletion examples/atomic_tipbot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def start(client, message):
send_welcome = True
if send_welcome:
message.reply(
"Welcome to the BitcartCC Atomic TipBot! /help for list of commands",
"Welcome to the Bitcart Atomic TipBot! /help for list of commands",
quote=False,
)

Expand Down
2 changes: 1 addition & 1 deletion examples/atomic_tipbot/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ tgcrypto
pymongo
# qr codes
qrcode[pil]
# BitcartCC SDK
# Bitcart SDK
bitcart
2 changes: 1 addition & 1 deletion examples/donateto.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
except InvalidOperation:
print("Invalid amount passed")
sys.exit(1)
# bitcartcc-related code
# bitcart-related code
btc = BTC(xpub=xpub)
try:
tx_hash = btc.pay_to(address, amount)
Expand Down
2 changes: 1 addition & 1 deletion examples/getbalance.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
print("Usage: ./getbalance xpub")
sys.exit(1)
xpub = sys.argv[1]
# bitcartcc-related code
# bitcart-related code
btc = BTC(xpub=xpub)
try:
balance = btc.balance()
Expand Down
Loading

0 comments on commit 79d4210

Please sign in to comment.