readme/license/ci

This commit is contained in:
thesimplekid
2023-04-23 15:33:48 -04:00
parent e93104a3f1
commit 81704929b7
5 changed files with 102 additions and 2 deletions

26
.github/workflows/lint.yml vendored Normal file
View File

@@ -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

View File

@@ -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"

29
LICENSE Normal file
View File

@@ -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.

40
README.md Normal file
View File

@@ -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.

View File

@@ -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));