From aaaefc4750c6c81d935e96f48f355a2ca25a1c29 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Tue, 15 Oct 2024 16:13:43 +0200 Subject: [PATCH 1/9] Add badges Signed-off-by: Denis Varlakov --- README.md | 5 +++++ src/lib.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 3115293..af77f57 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +![License](https://img.shields.io/crates/l/hd-wallet.svg) +[![Docs](https://docs.rs/hd-wallet/badge.svg)](https://docs.rs/hd-wallet) +[![Crates io](https://img.shields.io/crates/v/hd-wallet.svg)](https://crates.io/crates/hd-wallet) +[![Discord](https://img.shields.io/discord/905194001349627914?logo=discord&logoColor=ffffff&label=Discord)][in Discord] + # HD wallets derivation This crate supports the following HD derivations: diff --git a/src/lib.rs b/src/lib.rs index 352a0b9..15ad7a5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,8 @@ +//! ![License](https://img.shields.io/crates/l/hd-wallet.svg) +//! [![Docs](https://docs.rs/hd-wallet/badge.svg)](https://docs.rs/hd-wallet) +//! [![Crates io](https://img.shields.io/crates/v/hd-wallet.svg)](https://crates.io/crates/hd-wallet) +//! [![Discord](https://img.shields.io/discord/905194001349627914?logo=discord&logoColor=ffffff&label=Discord)][in Discord] +//! //! # HD wallets derivation //! //! This crate supports the following HD derivations: From b75b014394a978c3a625994d3abd34cda4ec069b Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Tue, 15 Oct 2024 16:18:07 +0200 Subject: [PATCH 2/9] Update changelog + add changelog check into CI Signed-off-by: Denis Varlakov --- .github/changelog.sh | 22 ++++++++++++++++++++++ .github/workflows/rust.yml | 9 +++------ CHANGELOG.md | 12 ++++++++++++ 3 files changed, 37 insertions(+), 6 deletions(-) create mode 100755 .github/changelog.sh diff --git a/.github/changelog.sh b/.github/changelog.sh new file mode 100755 index 0000000..f21e927 --- /dev/null +++ b/.github/changelog.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +m_branch=m; +changelog_file=CHANGELOG.md; + +# fetch master since we might be in a shallow clone +git fetch origin "$m_branch:$m_branch" --depth=1 + +changed=0; +for log in */"$changelog_file"; do + dir=$(dirname "$log"); + # check if version changed + if git diff "$m_branch" -- "$dir/Cargo.toml" | grep -q "^-version = "; then + # check if changelog updated + if git diff --exit-code --no-patch "$m_branch" -- "$log"; then + echo "$dir version changed, but $log is not updated" + changed=1; + fi + fi +done + +exit "$changed"; diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 363b598..0cf589c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -62,13 +62,10 @@ jobs: cache-on-failure: "true" - name: Run clippy run: cargo clippy -- -D clippy::all - dry-publish: + check-changelog: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: Swatinem/rust-cache@v2 - with: - cache-on-failure: "true" - - name: Run dry publish - run: cargo publish --dry-run + - name: Check changelogs + run: ./.github/changelog.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index b9c0d9a..6462c36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# hd-wallet crate changelog + +## v0.5.0 +* The first release of `hd-wallet`, successor of `slip-10` crate. It has all functionality of + `slip-10` plus special Edwards derivation that works with Ed25519 curve [#8] + +[#8]: https://github.com/LFDT-Lockness/hd-wallet/pull/8 + +# slip-10 crate changelog + +`slip-10` crate has been restructured and renamed into `hd-wallet` + ## v0.4.0 * Update `generic-ec` dep to `v0.4` [#7] From 9b429448d085ec1521772ac63bd4c6d3f8b12ad6 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Tue, 15 Oct 2024 16:19:31 +0200 Subject: [PATCH 3/9] Fix link Signed-off-by: Denis Varlakov --- README.md | 2 +- src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index af77f57..bc89654 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![License](https://img.shields.io/crates/l/hd-wallet.svg) [![Docs](https://docs.rs/hd-wallet/badge.svg)](https://docs.rs/hd-wallet) [![Crates io](https://img.shields.io/crates/v/hd-wallet.svg)](https://crates.io/crates/hd-wallet) -[![Discord](https://img.shields.io/discord/905194001349627914?logo=discord&logoColor=ffffff&label=Discord)][in Discord] +[![Discord](https://img.shields.io/discord/905194001349627914?logo=discord&logoColor=ffffff&label=Discord)](https://discordapp.com/channels/905194001349627914/1285268686147424388) # HD wallets derivation diff --git a/src/lib.rs b/src/lib.rs index 15ad7a5..f878c03 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,7 @@ //! ![License](https://img.shields.io/crates/l/hd-wallet.svg) //! [![Docs](https://docs.rs/hd-wallet/badge.svg)](https://docs.rs/hd-wallet) //! [![Crates io](https://img.shields.io/crates/v/hd-wallet.svg)](https://crates.io/crates/hd-wallet) -//! [![Discord](https://img.shields.io/discord/905194001349627914?logo=discord&logoColor=ffffff&label=Discord)][in Discord] +//! [![Discord](https://img.shields.io/discord/905194001349627914?logo=discord&logoColor=ffffff&label=Discord)](https://discordapp.com/channels/905194001349627914/1285268686147424388) //! //! # HD wallets derivation //! From 0c560b6f85da4095a376e30d9f9347c3393deecd Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Tue, 15 Oct 2024 16:20:49 +0200 Subject: [PATCH 4/9] Add contribution guidelines Signed-off-by: Denis Varlakov --- CONTRIBUTING.md | 72 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..288d8e8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,72 @@ +# Contributing Guide + +Thanks for taking interest to contributing to our project! + +## Join us in Discord! +We welcome all contributors to communicate with us [in Discord]! Please, reach out to us +in `#lockness-contribute` room. + +## Pull Requests +Prior to making a PR, we ask you to communicate it with us, either [in Discord] or, if you +prefer, by opening an issue in the repo. This would help to keep your work aligned with the +maintainers view and avoid situations in which we can't accept your contribution. + +All commits are required to be signed via verified GPG key. You can read about commit signing +in [this series of articles](https://docs.github.com/en/authentication/managing-commit-signature-verification) +(we recommend using a hardware GPG token). + +All commits are required to be signed off by including `Signed-off-by: YOUR NAME ` line. +By doing this, you certify that the commit is compliant with [Developer Certificate of Origin (DCO)](https://developercertificate.org/), +meaning that you wrote the code or otherwise have the right to submit the code you are +contributing to the project. + +```text +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. +``` + +Commits can be automatically signed off automatically by using `-s` flag (i.e. `git commit -s`). + +## Issues +Feel free to open an issue if you found a bug, have a suggestion, or wish to +communicate with us for other reasons. + +However, if you want to report something that you believe might be a security +vulnerability or a security flaw in this or any upstream project, please report +it following the procedure described in [SECURITY.md](./SECURITY.md). + +Feel free to reach out to us [in Discord] as well. + +[in Discord]: https://discordapp.com/channels/905194001349627914/1285268686147424388 From 606d675b1203fc4f1be19debfced066f8e6cd10d Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Tue, 15 Oct 2024 16:22:06 +0200 Subject: [PATCH 5/9] Add security.md Signed-off-by: Denis Varlakov --- SECURITY.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..dfa8cd5 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,20 @@ +# Security Policy + +## Supported Versions + +Only the latest version of the library is supported. + +## Reporting a Vulnerability + +We ask to report any security vulnerabilities or flaws through: + +1. Github, in the "Security" tab, using the "Report a vulnerability" button. +2. Email, security@dfns.co + +After receiving the report, it will take us up to 2 working days to respond. +We will evaluate the reported vulnerability, determine whether it needs to +be addressed, and (if so) and provide an estimated timeline for addressing it. + +After vulnerability was fixed and the new version of the library was +properly tested, we publish the fix, and publicly disclose the vulnerability +(credits for finding the issue go to the reporter). From dc9ce66938cdeb746ed3d86af1de5eab06502d87 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Tue, 15 Oct 2024 16:23:00 +0200 Subject: [PATCH 6/9] Update repo link Signed-off-by: Denis Varlakov --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 187135b..1f4b562 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "0.5.0" edition = "2021" license = "MIT OR Apache-2.0" description = "HD wallets derivation" -repository = "https://github.com/dfns/slip-10" +repository = "https://github.com/LFDT-Lockness/hd-wallet" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html From 3e4263d6957887ed428bee8008c42166cf6458f7 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Tue, 15 Oct 2024 16:25:20 +0200 Subject: [PATCH 7/9] Bump version Signed-off-by: Denis Varlakov --- CHANGELOG.md | 5 +++++ Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6462c36..25ea7f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # hd-wallet crate changelog +## v0.5.1 +* Update docs and repo link [#11] + +[#11]: https://github.com/LFDT-Lockness/hd-wallet/pull/11 + ## v0.5.0 * The first release of `hd-wallet`, successor of `slip-10` crate. It has all functionality of `slip-10` plus special Edwards derivation that works with Ed25519 curve [#8] diff --git a/Cargo.toml b/Cargo.toml index 1f4b562..f62c698 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hd-wallet" -version = "0.5.0" +version = "0.5.1" edition = "2021" license = "MIT OR Apache-2.0" description = "HD wallets derivation" From 7f275747e08fefc59ffa70d8231f266e7005ca66 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Thu, 17 Oct 2024 15:03:05 +0200 Subject: [PATCH 8/9] Update changelog script Signed-off-by: Denis Varlakov --- .github/changelog.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/changelog.sh b/.github/changelog.sh index f21e927..fa3c35a 100755 --- a/.github/changelog.sh +++ b/.github/changelog.sh @@ -7,7 +7,7 @@ changelog_file=CHANGELOG.md; git fetch origin "$m_branch:$m_branch" --depth=1 changed=0; -for log in */"$changelog_file"; do +for log in "$changelog_file" */"$changelog_file"; do dir=$(dirname "$log"); # check if version changed if git diff "$m_branch" -- "$dir/Cargo.toml" | grep -q "^-version = "; then From 71da9a9bb7bc2744f0e3e95ae6c6a320a0d62804 Mon Sep 17 00:00:00 2001 From: Denis Varlakov Date: Thu, 17 Oct 2024 16:18:22 +0200 Subject: [PATCH 9/9] Add info about discord Signed-off-by: Denis Varlakov --- Cargo.lock | 2 +- README.md | 3 +++ src/lib.rs | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 70ab4d2..5cb99a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -305,7 +305,7 @@ dependencies = [ [[package]] name = "hd-wallet" -version = "0.5.0" +version = "0.5.1" dependencies = [ "generic-array", "generic-ec", diff --git a/README.md b/README.md index bc89654..a1a0b64 100644 --- a/README.md +++ b/README.md @@ -57,5 +57,8 @@ let child_key = derive_using_generic_algo::(master_key_pa * `curve-secp256k1`, `curve-secp256r1`, `curve-ed25519` add curve implementation into the crate curves module +## Join us in Discord! +Feel free to reach out to us [in Discord](https://discordapp.com/channels/905194001349627914/1285268686147424388)! + [slip10-spec]: https://github.com/satoshilabs/slips/blob/master/slip-0010.md [bip32-spec]: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki diff --git a/src/lib.rs b/src/lib.rs index f878c03..7ee9f68 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -59,6 +59,9 @@ //! * `curve-secp256k1`, `curve-secp256r1`, `curve-ed25519` add curve implementation into the crate //! [curves] module //! +//! ## Join us in Discord! +//! Feel free to reach out to us [in Discord](https://discordapp.com/channels/905194001349627914/1285268686147424388)! +//! //! [slip10-spec]: https://github.com/satoshilabs/slips/blob/master/slip-0010.md //! [bip32-spec]: https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki