Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install poetry
run: pipx install poetry

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"

- name: Install dependencies
run: poetry install
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Install poetry
run: pipx install poetry pre-commit

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: poetry
Expand All @@ -41,6 +41,6 @@ jobs:

- name: Upload to codecov
uses: codecov/codecov-action@v4
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
with:
token: ${{ secrets.CODECOV_TOKEN }}
14 changes: 3 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.0
rev: v0.14.5
hooks:
- id: ruff
args: [--fix]
- id: ruff-check
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
entry: mypy bip44/
pass_filenames: false

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: check-yaml
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog

## 0.1.6

- Support Python 3.14
- Drop Python 3.8
- Bump dependencies

## 0.1.5

- Bump dependencies

## 0.1.1 ~ 0.1.4

- Support Python 3.10, 3.11, 3.12, 3.13
- Bump dependencies
- Drop Python 3.6, 3.7

## 0.1.0

- First beta release
- Bump dependencies

## 0.0.1 ~ 0.0.7

- Alpha releases
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2024 Weiliang Li
Copyright (c) 2020-2025 Weiliang Li

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 2 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,6 @@ True
'0x7aD23D6eD9a1D98E240988BED0d78e8C81Ec296C'
```

## Release Notes
## Changelog

### 0.1.1 ~ 0.1.5

- Support Python 3.10, 3.11, 3.12, 3.13
- Bump dependencies
- Drop Python 3.6, 3.7

### 0.1.0

- First beta release
- Bump dependencies

### 0.0.1 ~ 0.0.7

- Alpha releases
See [CHANGELOG.md](./CHANGELOG.md)
9 changes: 6 additions & 3 deletions bip44/consts.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
from typing import Tuple

from bip32 import HARDENED_INDEX

__all__ = ("COIN_PATHS",)


def coin_path_by_index(index: int = 0) -> Tuple[int, int]:
def coin_path_by_index(index: int = 0) -> tuple[int, int]:
# Full list is at https://github.com/satoshilabs/slips/blob/master/slip-0044.md#registered-coin-types
return (44 + HARDENED_INDEX, index + HARDENED_INDEX)

Expand All @@ -17,8 +15,13 @@ def coin_path_by_index(index: int = 0) -> Tuple[int, int]:
"DOGE": coin_path_by_index(3),
"ETH": coin_path_by_index(60),
"ETC": coin_path_by_index(61),
"XRP": coin_path_by_index(144),
"DOT": coin_path_by_index(354),
"SOL": coin_path_by_index(501),
"APT": coin_path_by_index(637),
"SUI": coin_path_by_index(784),
"SDN": coin_path_by_index(809),
"ASTR": coin_path_by_index(810),
"ADA": coin_path_by_index(1815),
"STRK": coin_path_by_index(9004),
}
1 change: 1 addition & 0 deletions bip44/py.typed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# PEP 561
4 changes: 2 additions & 2 deletions bip44/wallet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Iterable, Tuple, Union
from typing import Iterable, Union

from bip32 import BIP32, HARDENED_INDEX
from mnemonic import Mnemonic
Expand Down Expand Up @@ -56,7 +56,7 @@ def derive_account(
account: int = 0,
change: int = 0,
address_index: int = 0,
) -> Tuple[bytes, bytes]:
) -> tuple[bytes, bytes]:
"""
Derive secret and public key of account, following BIP44 standard like `m / purpose' / coin_type' / account' / change / address_index`.

Expand Down
878 changes: 501 additions & 377 deletions poetry.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bip44"
version = "0.1.5"
version = "0.1.6"
# doc
authors = ["Weiliang Li <[email protected]>"]
description = "Simple Python bip44 implementation. Mnemonic + bip32."
Expand All @@ -11,21 +11,21 @@ readme = "README.md"
repository = "https://github.com/kigawas/python-bip44"

[tool.poetry.dependencies]
python = "^3.8.1"
python = "^3.9"

# 3rd party
bip32 = ">=3.4"
mnemonic = ">=0.20"
pycryptodome = ">=3.19.1"

[tool.poetry.group.dev.dependencies]
ipython = {version = "8.29.0", python = "^3.10"}
mypy = "^1.13.0"
ruff = "^0.8.0"
ipython = {version = "9.7.0", python = "^3.11"}
ruff = "^0.14.5"
ty = "^0.0.1a26"

[tool.poetry.group.test.dependencies]
pytest = "^8.3.3"
pytest-cov = {version = "^6.0.0", python = "^3.9"}
pytest = {version = "^9.0.0", python = "^3.10"}
pytest-cov = {version = "^7.0.0", python = "^3.10"}

[build-system]
build-backend = "poetry.core.masonry.api"
Expand Down
Loading