From 81704929b741b01c5d3ebc4810ae1b6bddfa9d1a Mon Sep 17 00:00:00 2001 From: thesimplekid Date: Sun, 23 Apr 2023 15:33:48 -0400 Subject: [PATCH] readme/license/ci --- .github/workflows/lint.yml | 26 +++++++++++++++++++++++++ Cargo.toml | 7 ++++++- LICENSE | 29 +++++++++++++++++++++++++++ README.md | 40 ++++++++++++++++++++++++++++++++++++++ tests/integration_test.rs | 2 +- 5 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/lint.yml create mode 100644 LICENSE create mode 100644 README.md diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..39081926 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,26 @@ +name: lint + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout Crate + uses: actions/checkout@v3 + - name: Set Toolchain + # https://github.com/dtolnay/rust-toolchain + uses: dtolnay/rust-toolchain@stable + - name: Run fmt + run: cargo fmt --all --check + - name: Run clippy + run: | + rustup component add clippy + cargo clippy --all diff --git a/Cargo.toml b/Cargo.toml index 023cf29c..0bd1722d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,12 @@ name = "cashu-rs" version = "0.1.0" edition = "2021" +authors = ["thesimplekid"] +license = "BSD-3-Clause" +readme = "README.md" +repository = "https://github.com/thesimplekid/cashu-rs" +description = "Cashu rust library" + [dependencies] bitcoin = { version = "0.30.0", features=["serde"] } @@ -17,4 +23,3 @@ url = "2.3.1" [dev-dependencies] tokio = {version = "1.27.0", features = ["rt", "macros"] } -tokio-test = "0.4.2" diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..083823dd --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2023, thesimplekid +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100644 index 00000000..724a2e36 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ + + +⚠️ **Don't be reckless:** This project is in early development, it does however work with real sats! Always use amounts you don't mind loosing. + +Cashu RS is a rust library for [Cashu](https://github.com/cashubtc) wallets written in Rust. + +Implemented [NUTs](https://github.com/cashubtc/nuts/): + +- [x] [NUT-00](https://github.com/cashubtc/nuts/blob/main/00.md) +- [x] [NUT-01](https://github.com/cashubtc/nuts/blob/main/01.md) +- [x] [NUT-02](https://github.com/cashubtc/nuts/blob/main/02.md) +- [x] [NUT-03](https://github.com/cashubtc/nuts/blob/main/03.md) +- [x] [NUT-04](https://github.com/cashubtc/nuts/blob/main/04.md) +- [x] [NUT-05](https://github.com/cashubtc/nuts/blob/main/05.md) +- [x] [NUT-06](https://github.com/cashubtc/nuts/blob/main/06.md) +- [x] [NUT-07](https://github.com/cashubtc/nuts/blob/main/07.md) +- [x] [NUT-08](https://github.com/cashubtc/nuts/blob/main/08.md) +- [x] [NUT-09](https://github.com/cashubtc/nuts/blob/main/09.md) + + +Supported token formats: + +- [ ] v1 read +- [ ] v2 read (deprecated) +- [ ] v3 read/write + + +## License + +Code is under the [BSD 3-Clause License](LICENSE-BSD-3) + +## Contribution + +All contributions welcome. + +Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions. + +## Contact + +I can be contacted for comments or questions on nostr at _@thesimplekid.com (npub1qjgcmlpkeyl8mdkvp4s0xls4ytcux6my606tgfx9xttut907h0zs76lgjw) or via email tsk@thesimplekid.com. \ No newline at end of file diff --git a/tests/integration_test.rs b/tests/integration_test.rs index 553ed7c5..73ca9d47 100644 --- a/tests/integration_test.rs +++ b/tests/integration_test.rs @@ -45,7 +45,7 @@ async fn test_mint() { let mint_req = mint.request_mint(Amount::from_sat(21)).await.unwrap(); println!("Mint Req: {:?}", mint_req.pr.to_string()); - // Since before the mind happens the invoice in the int req has to be payed this wait is here + // Since before the mint happens the invoice in the mint req has to be payed this wait is here // probally some way to simulate this in a better way // but for now pay it quick thread::sleep(Duration::from_secs(10));