Skip to content

Commit 1613ebe

Browse files
author
Yuanheng Wang
committed
Fix ExtendedSigning key generation from HDWallet
2 parents a77430d + 79848b4 commit 1613ebe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2116
-870
lines changed

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[run]
22
branch = True
33
omit =
4-
pycardano/crypto/*
4+
pycardano/crypto/bech32.py
55

66
[report]
77
# Regexes for lines to exclude from consideration

.github/donate_addr.png

2.77 KB
Loading
File renamed without changes.

.github/workflows/main.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches: "**"
66
pull_request:
77
branches: ["main"]
88
types: [opened, reopened, edited, synchronize]
@@ -14,7 +14,11 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: [ubuntu-latest, macos-latest]
17-
python-version: [3.7, 3.8, 3.9, '3.10']
17+
python-version: [3.7, 3.8, 3.9, '3.10', '3.11']
18+
exclude:
19+
# excludes python 3.11 on macOS
20+
- os: macos-latest
21+
python-version: '3.11'
1822

1923
steps:
2024
- uses: actions/checkout@v3
@@ -28,16 +32,16 @@ jobs:
2832
- name: Install dependencies
2933
run: |
3034
poetry install
31-
- name: Lint with flake8
32-
run: |
33-
poetry run flake8 pycardano
3435
- name: Run unit tests
3536
run: |
3637
poetry run pytest --doctest-modules --ignore=examples --cov=pycardano --cov-config=.coveragerc --cov-report=xml
3738
- name: "Upload coverage to Codecov"
38-
uses: codecov/codecov-action@v2
39+
uses: codecov/codecov-action@v3
3940
with:
4041
fail_ci_if_error: true
42+
- name: Run static analyses
43+
run: |
44+
make qa
4145
4246
continuous-integration:
4347
runs-on: ${{ matrix.os }}
@@ -59,3 +63,15 @@ jobs:
5963
- name: Run integration tests
6064
run: |
6165
cd integration-test && ./run_tests.sh
66+
67+
- name: Dump docker logs
68+
if: failure()
69+
run: |
70+
cd integration-test && docker-compose logs --no-color > integration-test.log
71+
72+
- name: Upload integration-test.log
73+
if: failure()
74+
uses: actions/upload-artifact@v2
75+
with:
76+
name: integration-test.log
77+
path: integration-test/integration-test.log

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
.coverage
33
cov_html
44
docs/build
5-
dist
5+
dist
6+
7+
# IDE
8+
.idea
9+
.code

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [0.7.0] - 2022-10-16
8+
9+
### Added
10+
11+
- Support HDWallets and mnemonic phrases. (#85)
12+
13+
### Fixed
14+
15+
- Fix key error when there are duplicates in reference scripts.
16+
- If merging change into existing outputs is enabled, do not enforce min_utxo on changes.
17+
- Make script estimation more accurate.
18+
719
## [0.6.3] - 2022-10-02
820

921
### Added

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: clean clean-test clean-pyc clean-build format test help docs
1+
.PHONY: cov cov-html clean clean-test clean-pyc clean-build qa format test test-single help docs
22
.DEFAULT_GOAL := help
33

44
define BROWSER_PYSCRIPT
@@ -57,8 +57,13 @@ clean-test: ## remove test and coverage artifacts
5757
test: ## runs tests
5858
poetry run pytest -s -vv -n 4
5959

60-
qa: ## runs static analysis with flake8
60+
test-single: ## runs tests with "single" markers
61+
poetry run pytest -s -vv -m single
62+
63+
qa: ## runs static analyses
6164
poetry run flake8 pycardano
65+
poetry run mypy --install-types --non-interactive pycardano
66+
poetry run black --check .
6267

6368
format: ## runs code style and formatter
6469
poetry run isort .

README.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<img src="./logo.png" height=200 width=200 />
2+
<img src="./.github/logo.png" height=200 width=200 />
33
</p>
44

55
---
@@ -9,12 +9,14 @@
99
[![PyPi version](https://badgen.net/pypi/v/pycardano)](https://pypi.python.org/pypi/pycardano/)
1010
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/pycardano)](https://pypi.python.org/pypi/pycardano/)
1111
[![PyPI download month](https://img.shields.io/pypi/dm/pycardano)](https://pypi.python.org/pypi/pycardano/)
12-
[![Discord](https://img.shields.io/discord/949404918903631923.svg?label=chat&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/qT9Mn9xjgz)
1312

14-
[![PyCardano](https://github.com/cffls/pycardano/actions/workflows/main.yml/badge.svg)](https://github.com/cffls/pycardano/actions/workflows/main.yml)
15-
[![codecov](https://codecov.io/gh/cffls/pycardano/branch/main/graph/badge.svg?token=62N0IL9IMQ)](https://codecov.io/gh/cffls/pycardano)
13+
[![PyCardano](https://github.com/Python-Cardano/pycardano/actions/workflows/main.yml/badge.svg)](https://github.com/Python-Cardano/pycardano/actions/workflows/main.yml)
14+
[![codecov](https://codecov.io/gh/Python-Cardano/pycardano/branch/main/graph/badge.svg?token=62N0IL9IMQ)](https://codecov.io/gh/Python-Cardano/pycardano)
1615
[![Documentation Status](https://readthedocs.org/projects/pycardano/badge/?version=latest)](https://pycardano.readthedocs.io/en/latest/?badge=latest)
1716

17+
[![Discord](https://img.shields.io/discord/949404918903631923.svg?label=chat&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/qT9Mn9xjgz)
18+
[![Twitter](https://img.shields.io/twitter/follow/PyCardano?style=social&label=Follow%20%40PyCardano)](https://twitter.com/PyCardano)
19+
1820

1921
PyCardano is a Cardano library written in Python. It allows users to create and sign transactions without
2022
depending on third-party Cardano serialization tools, such as
@@ -41,9 +43,9 @@ could be beneficial for faster R&D iterations.
4143
- [X] Plutus script
4244
- [X] Staking certificates
4345
- [X] Reward withdraw
44-
- [ ] Mnemonic
46+
- [X] Mnemonic
47+
- [X] HD Wallet
4548
- [ ] Byron Address
46-
- [ ] HD Wallet
4749
- [ ] Pool certificate
4850
- [ ] Protocol proposal update
4951

@@ -158,7 +160,7 @@ context.submit_tx(signed_tx.to_cbor())
158160
```
159161
</details>
160162

161-
See more usages under [examples](https://github.com/cffls/pycardano/tree/main/examples).
163+
See more usages under [examples](https://github.com/Python-Cardano/pycardano/tree/main/examples).
162164

163165

164166
### Development
@@ -170,7 +172,7 @@ See more usages under [examples](https://github.com/cffls/pycardano/tree/main/ex
170172

171173
Clone the repository:
172174

173-
`git clone https://github.com/cffls/pycardano.git`
175+
`git clone https://github.com/Python-Cardano/pycardano.git`
174176

175177
PyCardano uses [poetry](https://python-poetry.org/) to manage its dependencies.
176178
Install poetry for osx / linux / bashonwindows:
@@ -235,10 +237,25 @@ Build docs and open the docs in browser:
235237

236238
</details>
237239

240+
## Donation and Sponsor
241+
If you find this project helpful, please consider donate or sponsor us. Your donation and sponsor will allow us to
242+
spend more time on improving PyCardano and adding more features in the future.
243+
244+
You can support us by 1) sponsoring through Github, or 2) donating ADA to our ADA Handle `pycardano` or to the address below:
245+
246+
[`addr1vxa4qadv7hk2dd3jtz9rep7sp92lkgwzefwkmsy3qkglq5qzv8c0d`](https://cardanoscan.io/address/61bb5075acf5eca6b632588a3c87d00955fb21c2ca5d6dc0910591f050)
247+
248+
<p>
249+
<img src="./.github/donate_addr.png" height=150 width=150/>
250+
</p>
251+
252+
238253
## Sponsors :heart:
239254

240255
<p align="left">
241256
<a href="https://www.blockery.io/"><img src="https://avatars.githubusercontent.com/u/97766045?s=50&v=4"/></a>
242257
<a href="https://github.com/KtorZ"><img src="https://avatars.githubusercontent.com/u/5680256?s=50&v=4"/></a>
243258
<a href="https://github.com/lacepool"><img src="https://avatars.githubusercontent.com/u/79309785?s=50&v=4"/></a>
259+
<a href="https://github.com/muppetADA"><img width="50" src="https://avatars.githubusercontent.com/u/115075316?s=50&v=4"/></a>
260+
<a href="https://github.com/CardanoDur"><img width="50" src="https://avatars.githubusercontent.com/u/1000466?s=50&v=4"/></a>
244261
</p>

docs/requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ babel==2.10.3 ; python_version >= "3.7" and python_version < "4.0"
55
black==22.8.0 ; python_version >= "3.7" and python_version < "4.0"
66
blockfrost-python==0.5.1 ; python_version >= "3.7" and python_version < "4"
77
cbor2==5.4.3 ; python_version >= "3.7" and python_version < "4.0"
8-
certifi==2022.6.15.2 ; python_version >= "3.7" and python_version < "4"
8+
certifi==2022.9.14 ; python_version >= "3.7" and python_version < "4"
99
certvalidator==0.11.1 ; python_version >= "3.7" and python_version < "4.0"
1010
cffi==1.15.1 ; python_version >= "3.7" and python_version < "4.0"
1111
charset-normalizer==2.1.1 ; python_version >= "3.7" and python_version < "4"
@@ -17,6 +17,7 @@ cryptography==38.0.1 ; python_version >= "3.7" and python_version < "4.0"
1717
decorator==5.1.1 ; python_version >= "3.7" and python_version < "4.0"
1818
docutils==0.17.1 ; python_version >= "3.7" and python_version < "4.0"
1919
ecdsa==0.18.0 ; python_version >= "3.7" and python_version < "4.0"
20+
ecpy==1.2.5 ; python_version >= "3.7" and python_version < "4.0"
2021
execnet==1.9.0 ; python_version >= "3.7" and python_version < "4.0"
2122
flake8==4.0.1 ; python_version >= "3.7" and python_version < "4.0"
2223
flask==2.2.2 ; python_version >= "3.7" and python_version < "4.0"
@@ -29,6 +30,7 @@ itsdangerous==2.1.2 ; python_version >= "3.7" and python_version < "4.0"
2930
jinja2==3.1.2 ; python_version >= "3.7" and python_version < "4.0"
3031
markupsafe==2.1.1 ; python_version >= "3.7" and python_version < "4.0"
3132
mccabe==0.6.1 ; python_version >= "3.7" and python_version < "4.0"
33+
mnemonic==0.20 ; python_version >= "3.7" and python_version < "4.0"
3234
mypy-extensions==0.4.3 ; python_version >= "3.7" and python_version < "4.0"
3335
oscrypto==1.3.0 ; python_version >= "3.7" and python_version < "4.0"
3436
packaging==21.3 ; python_version >= "3.7" and python_version < "4.0"
@@ -50,7 +52,6 @@ pytest==7.1.3 ; python_version >= "3.7" and python_version < "4.0"
5052
pytz==2022.2.1 ; python_version >= "3.7" and python_version < "4.0"
5153
requests==2.28.1 ; python_version >= "3.7" and python_version < "4"
5254
retry==0.9.2 ; python_version >= "3.7" and python_version < "4.0"
53-
setuptools==65.3.0 ; python_version >= "3.7" and python_version < "4.0"
5455
six==1.16.0 ; python_version >= "3.7" and python_version < "4.0"
5556
snowballstemmer==2.2.0 ; python_version >= "3.7" and python_version < "4.0"
5657
sphinx-copybutton==0.5.0 ; python_version >= "3.7" and python_version < "4.0"

docs/source/api/pycardano.cip.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
CIP
22
=====================
33

4+
Implementation of Cardano Improvement Proposals (CIPs)
5+
46
.. automodule:: pycardano.cip.cip8
57
:members:
68
:undoc-members:

0 commit comments

Comments
 (0)