Pārlūkot izejas kodu

chore: update readmes (#773)

thesimplekid 3 nedēļas atpakaļ
vecāks
revīzija
9beb0b4256

+ 0 - 20
README.md

@@ -35,22 +35,6 @@ The project is split up into several crates in the `crates/` directory:
 
 For a guide to settings up a development environment see [DEVELOPMENT.md](./DEVELOPMENT.md)
 
-### Code Style Guidelines
-
-- **Large Enum Variants**: When an enum variant contains a large type (>100 bytes), box it using `Box<T>` to reduce the overall enum size. This improves memory efficiency, especially for error types.
-
-  ```rust
-  // Instead of this:
-  enum Error {
-      SomeLargeError(LargeType),  // LargeType is >100 bytes
-  }
-  
-  // Do this:
-  enum Error {
-      SomeLargeError(Box<LargeType>),
-  }
-  ```
-
 ## Implemented [NUTs](https://github.com/cashubtc/nuts/):
 
 ### Mandatory
@@ -87,10 +71,6 @@ For a guide to settings up a development environment see [DEVELOPMENT.md](./DEVE
 | [22][22] | Blind Authentication  | :heavy_check_mark: |
 
 
-## Bindings
-
-Experimental JS bindings can be found in the [bindings repository](https://github.com/thesimplekid/cdk-js).
-
 ## License
 
 Code is under the [MIT License](LICENSE)

+ 7 - 16
crates/cdk-axum/README.md

@@ -1,23 +1,14 @@
 # CDK Axum
 
-[![crates.io](https://img.shields.io/crates/v/cdk-axum.svg)](https://crates.io/crates/cdk-axum) [![Documentation](https://docs.rs/cdk-axum/badge.svg)](https://docs.rs/cdk-axum)
+[![crates.io](https://img.shields.io/crates/v/cdk-axum.svg)](https://crates.io/crates/cdk-axum)
+[![Documentation](https://docs.rs/cdk-axum/badge.svg)](https://docs.rs/cdk-axum)
+[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cashubtc/cdk/blob/main/LICENSE)
 
-The CDK Axum crate is a component of the [Cashu Development Kit](https://github.com/cashubtc/cdk) that provides a web server implementation for Cashu mints using the [Axum](https://github.com/tokio-rs/axum) web framework.
+**ALPHA** This library is in early development, the API will change and should be used with caution.
 
-## Overview
+Axum web server implementation for the Cashu Development Kit (CDK). This provides the HTTP API for Cashu mints.
 
-This crate implements the HTTP API for Cashu mints, providing endpoints for all the Cashu NUTs (Notation, Usage, and Terminology) specifications. It handles routing, request validation, response formatting, and includes features like WebSocket support and HTTP caching.
-
-## Features
-
-- Complete implementation of Cashu mint HTTP API
-- WebSocket support for real-time notifications (NUT-17)
-- HTTP response caching for improved performance (NUT-19)
-- CORS support for browser-based clients
-- Compression and decompression of HTTP payloads
-- Configurable logging and tracing
-
-## Usage
+## Installation
 
 Add this to your `Cargo.toml`:
 
@@ -28,4 +19,4 @@ cdk-axum = "*"
 
 ## License
 
-This project is licensed under the [MIT License](https://github.com/cashubtc/cdk/blob/main/LICENSE).
+This project is licensed under the [MIT License](../../LICENSE).

+ 15 - 11
crates/cdk-cln/README.md

@@ -1,16 +1,20 @@
+# CDK CLN
 
-## Minimum Supported Rust Version (MSRV)
+[![crates.io](https://img.shields.io/crates/v/cdk-cln.svg)](https://crates.io/crates/cdk-cln)
+[![Documentation](https://docs.rs/cdk-cln/badge.svg)](https://docs.rs/cdk-cln)
+[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cashubtc/cdk/blob/main/LICENSE)
 
-The `cdk-cln` library should always compile with any combination of features on Rust **1.63.0**.
+**ALPHA** This library is in early development, the API will change and should be used with caution.
 
-To build and test with the MSRV you will need to pin the below dependency versions:
+Core Lightning (CLN) backend implementation for the Cashu Development Kit (CDK).
 
-```shell
-cargo update -p half --precise 2.2.1
-cargo update -p tokio --precise 1.38.1
-cargo update -p tokio-util --precise 0.7.11
-cargo update -p reqwest --precise 0.12.4
-cargo update -p serde_with --precise 3.1.0
-cargo update -p regex --precise 1.9.6
-cargo update -p backtrace --precise 0.3.58
+## Installation
+
+Add this to your `Cargo.toml`:
+
+```toml
+[dependencies]
+cdk-cln = "*"
 ```
+
+This project is licensed under the [MIT License](../../LICENSE).

+ 10 - 20
crates/cdk-common/README.md

@@ -4,20 +4,11 @@
 [![Documentation](https://docs.rs/cdk-common/badge.svg)](https://docs.rs/cdk-common)
 [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cashubtc/cdk/blob/main/LICENSE)
 
-Common types, traits, and utilities for the Cashu Development Kit (CDK).
+**ALPHA** This library is in early development, the API will change and should be used with caution.
 
-## Overview
+Common types and utilities shared across the Cashu Development Kit (CDK) crates.
 
-The `cdk-common` crate provides shared functionality used across the CDK crates. It contains core data structures, error types, and utility functions that are essential for implementing Cashu wallets and mints.
-
-## Features
-
-- **Core Data Types**: Implementations of fundamental Cashu types like `MintUrl`, `ProofInfo`, and `Melted`
-- **Error Handling**: Comprehensive error types for Cashu operations
-- **Database Abstractions**: Traits for database operations used by wallets and mints
-- **NUT Implementations**: Common functionality for Cashu NUTs (Notation, Usage, and Terminology)
-
-## Usage
+## Installation
 
 Add this to your `Cargo.toml`:
 
@@ -26,16 +17,15 @@ Add this to your `Cargo.toml`:
 cdk-common = "*"
 ```
 
-## Components
+## Features
 
-The crate includes several key modules:
+This crate provides common functionality used across CDK crates including:
 
-- **common**: Core data structures used throughout the CDK
-- **database**: Traits for database operations
-- **error**: Error types and handling
-- **mint_url**: Implementation of the MintUrl type
-- **nuts**: Common functionality for Cashu NUTs
+- Common data types and structures
+- Shared traits and interfaces
+- Utility functions
+- Error types
 
 ## License
 
-This project is licensed under the [MIT License](https://github.com/cashubtc/cdk/blob/main/LICENSE).
+This project is licensed under the [MIT License](../../LICENSE).

+ 8 - 17
crates/cdk-fake-wallet/README.md

@@ -1,21 +1,14 @@
 # CDK Fake Wallet
 
-[![crates.io](https://img.shields.io/crates/v/cdk-fake-wallet.svg)](https://crates.io/crates/cdk-fake-wallet) [![Documentation](https://docs.rs/cdk-fake-wallet/badge.svg)](https://docs.rs/cdk-fake-wallet)
+[![crates.io](https://img.shields.io/crates/v/cdk-fake-wallet.svg)](https://crates.io/crates/cdk-fake-wallet)
+[![Documentation](https://docs.rs/cdk-fake-wallet/badge.svg)](https://docs.rs/cdk-fake-wallet)
+[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cashubtc/cdk/blob/main/LICENSE)
 
-The CDK Fake Wallet is a component of the [Cashu Development Kit](https://github.com/cashubtc/cdk) that provides a simulated Lightning Network backend for testing Cashu mints.
+**ALPHA** This library is in early development, the API will change and should be used with caution.
 
-## Overview
+A fake Lightning wallet implementation for the Cashu Development Kit (CDK). This is intended for testing purposes only - quotes are automatically filled without actual Lightning Network interaction.
 
-This crate implements the `MintPayment` trait with a fake Lightning backend that automatically completes payments without requiring actual Lightning Network transactions. It's designed for development and testing purposes only.
-
-## Features
-
-- Simulated Lightning Network payments
-- Automatic completion of payment quotes
-- Support for testing mint functionality without real funds
-- Implementation of the standard `MintPayment` interface
-
-## Usage
+## Installation
 
 Add this to your `Cargo.toml`:
 
@@ -26,10 +19,8 @@ cdk-fake-wallet = "*"
 
 ## Warning
 
-**This is for testing purposes only!** 
-
-The fake wallet should never be used in production environments as it does not perform actual Lightning Network transactions. It simply simulates the payment flow by automatically marking invoices as paid.
+This is for testing purposes only. Do not use in production environments.
 
 ## License
 
-This project is licensed under the [MIT License](https://github.com/cashubtc/cdk/blob/main/LICENSE).
+This project is licensed under the [MIT License](../../LICENSE).

+ 8 - 16
crates/cdk-lnbits/README.md

@@ -1,22 +1,14 @@
-# CDK LNbits
+# CDK LNBits
 
-[![crates.io](https://img.shields.io/crates/v/cdk-lnbits.svg)](https://crates.io/crates/cdk-lnbits) [![Documentation](https://docs.rs/cdk-lnbits/badge.svg)](https://docs.rs/cdk-lnbits)
+[![crates.io](https://img.shields.io/crates/v/cdk-lnbits.svg)](https://crates.io/crates/cdk-lnbits)
+[![Documentation](https://docs.rs/cdk-lnbits/badge.svg)](https://docs.rs/cdk-lnbits)
+[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cashubtc/cdk/blob/main/LICENSE)
 
-The CDK LNbits crate is a component of the [Cashu Development Kit](https://github.com/cashubtc/cdk) that provides integration with [LNbits](https://lnbits.com/) as a Lightning Network backend for Cashu mints.
+**ALPHA** This library is in early development, the API will change and should be used with caution.
 
-## Overview
+LNBits backend implementation for the Cashu Development Kit (CDK). This provides integration with [LNBits](https://lnbits.com/) for Lightning Network functionality.
 
-This crate implements the `MintPayment` trait for LNbits, allowing Cashu mints to use LNbits as a payment backend for handling Lightning Network transactions.
-
-## Features
-
-- Create and pay Lightning invoices via LNbits
-- Handle webhook callbacks for payment notifications
-- Manage fee reserves for Lightning transactions
-- Support for invoice descriptions
-- MPP (Multi-Path Payment) support
-
-## Usage
+## Installation
 
 Add this to your `Cargo.toml`:
 
@@ -27,4 +19,4 @@ cdk-lnbits = "*"
 
 ## License
 
-This project is licensed under the [MIT License](https://github.com/cashubtc/cdk/blob/main/LICENSE).
+This project is licensed under the [MIT License](../../LICENSE).

+ 24 - 1
crates/cdk-lnd/README.md

@@ -1,4 +1,27 @@
+# CDK LND
+
+[![crates.io](https://img.shields.io/crates/v/cdk-lnd.svg)](https://crates.io/crates/cdk-lnd)
+[![Documentation](https://docs.rs/cdk-lnd/badge.svg)](https://docs.rs/cdk-lnd)
+[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cashubtc/cdk/blob/main/LICENSE)
+
+**ALPHA** This library is in early development, the API will change and should be used with caution.
+
+LND (Lightning Network Daemon) backend implementation for the Cashu Development Kit (CDK).
+
+## Installation
+
+Add this to your `Cargo.toml`:
+
+```toml
+[dependencies]
+cdk-lnd = "*"
+```
+
 
 ## Minimum Supported Rust Version (MSRV)
 
-The `cdk-lnd` library should always compile with any combination of features on Rust **1.75.0**.
+This crate supports Rust version **1.75.0** or higher.
+
+## License
+
+This project is licensed under the [MIT License](../../LICENSE).

+ 31 - 23
crates/cdk-mint-rpc/README.md

@@ -1,43 +1,51 @@
-# Cashu Mint Management RPC
+# CDK Mint RPC
 
-This crate is a gRPC client and server to control and manage a CDK mint. This crate exposes a server component that can be imported as a library component, see its usage in `cdk-mintd`. The client can be used as a CLI by running `cargo r --bin cdk-mint-cli`.
+[![crates.io](https://img.shields.io/crates/v/cdk-mint-rpc.svg)](https://crates.io/crates/cdk-mint-rpc)
+[![Documentation](https://docs.rs/cdk-mint-rpc/badge.svg)](https://docs.rs/cdk-mint-rpc)
+[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cashubtc/cdk/blob/main/LICENSE)
 
-The server can be run with or without certificate authentication. For running with authentication, see the [Certificate Generation Guide](./CERTIFICATES.md) for instructions on creating the necessary certificates using the included `generate_certs.sh` script.
+**ALPHA** This library is in early development, the API will change and should be used with caution.
 
-## Overview
+gRPC server and CLI client for managing Cashu mints in the Cashu Development Kit (CDK).
 
-The cdk-mint-rpc crate provides:
+## Components
 
-1. A gRPC server for managing Cashu mints
-2. A CLI client (`cdk-mint-cli`) for interacting with the gRPC server
+This crate includes:
+- gRPC server for mint management
+- CLI client for interacting with the gRPC server
+- Protocol definitions for mint management
 
-This allows mint operators to manage their Cashu mint instances remotely through a secure gRPC interface.
+## Installation
 
-## Features
+From crates.io:
+```bash
+cargo install cdk-mint-cli
+```
 
-- Remote mint management via gRPC
-- Secure authentication
-- Command-line interface for common mint operations
-- Integration with other CDK components
+As a library:
+```toml
+[dependencies]
+cdk-mint-rpc = "*"
+```
 
 ## Usage
 
-### CLI Client
-
-The `cdk-mint-cli` provides a command-line interface for interacting with the mint:
+### CLI
 
 ```bash
-# Using cargo to run the CLI with a specific address
-cargo r --bin cdk-mint-cli -- --addr https://127.0.0.1:8086 get-info
+# Show available commands
+cdk-mint-cli --help
+
+# Get mint info
+cdk-mint-cli info
+
+# Manage keysets
+cdk-mint-cli keysets list
 ```
 
-## Related Crates
 
-This crate is part of the Cashu Development Kit (CDK) ecosystem:
 
-- [cdk](../cdk/): Core Cashu protocol implementation
-- [cdk-mintd](../cdk-mintd/): Cashu Mint Binary
 
 ## License
 
-MIT License
+This project is licensed under the [MIT License](../../LICENSE).

+ 26 - 26
crates/cdk-mintd/README.md

@@ -1,42 +1,42 @@
+# CDK Mintd
 
-# cdk-mintd
+[![crates.io](https://img.shields.io/crates/v/cdk-mintd.svg)](https://crates.io/crates/cdk-mintd)
+[![Documentation](https://docs.rs/cdk-mintd/badge.svg)](https://docs.rs/cdk-mintd)
+[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cashubtc/cdk/blob/main/LICENSE)
 
-## Building from source
+**ALPHA** This library is in early development, the API will change and should be used with caution.
 
-```sh
-  nix develop
-```
+Cashu mint daemon implementation for the Cashu Development Kit (CDK). This binary provides a complete Cashu mint server implementation.
 
-#### Build
+## Installation
 
-```sh
-  cargo b --bin cdk-mintd -r
+From crates.io:
+```bash
+cargo install cdk-mintd
 ```
 
-## Configuration
-
-### Copy example config to cdk-mintd working directory.
-
-```sh
-  cp ./example.config.toml ~/.cdk-mintd/config.toml
+From source:
+```bash
+cargo install --path .
 ```
 
-### Edit config file
+## Configuration
 
-```sh
-  vi ~/.cdk-mintd/config.toml
-```
+The mint can be configured through environment variables or a configuration file. See the documentation for available options.
 
-## Running with Docker 
+## Usage
 
-### Build the Docker image
+```bash
+# Start the mint with default configuration
+cdk-mintd
 
-```sh
-  docker build -t cdk-mintd .
+# Start with custom config file
+cdk-mintd --config /path/to/config.toml
+
+# Show help
+cdk-mintd --help
 ```
 
-### Run the Docker container with the configuration file mapped
+## License
 
-```sh
-  docker run -v ~/.cdk-mintd/config.toml:/root/.cdk-mintd/config.toml cdk-mintd
-```
+This project is licensed under the [MIT License](../../LICENSE).

+ 20 - 12
crates/cdk-redb/README.md

@@ -1,23 +1,31 @@
+# CDK Redb
 
-# Cashu Development Kit Redb Storage Backend
+[![crates.io](https://img.shields.io/crates/v/cdk-redb.svg)](https://crates.io/crates/cdk-redb)
+[![Documentation](https://docs.rs/cdk-redb/badge.svg)](https://docs.rs/cdk-redb)
+[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cashubtc/cdk/blob/main/LICENSE)
 
-**ALPHA** This library is in early development, the api will change and should be used with caution.
+**ALPHA** This library is in early development, the API will change and should be used with caution.
 
-cdk-redb is the [redb](https://docs.rs/redb/latest/redb/) storage backend for cdk.
+[Redb](https://github.com/cberner/redb) storage backend implementation for the Cashu Development Kit (CDK).
 
-## Crate Feature Flags
+## Features
 
-The following crate feature flags are available:
+This crate provides a Redb-based storage implementation for:
+- Wallet storage
+- Mint storage
+- Proof tracking
+- Transaction history
 
-| Feature     | Default | Description                        |
-|-------------|:-------:|------------------------------------|
-| `wallet`    |   Yes   | Enable cashu wallet features       |
-| `mint`      |   Yes   | Enable cashu mint wallet features  |
+## Installation
 
-## Implemented [NUTs](https://github.com/cashubtc/nuts/):
+Add this to your `Cargo.toml`:
+
+```toml
+[dependencies]
+cdk-redb = "*"
+```
 
-See <https://github.com/cashubtc/cdk/blob/main/README.md>
 
 ## License
 
-This project is distributed under the MIT software license - see the [LICENSE](../../LICENSE) file for details
+This project is licensed under the [MIT License](../../LICENSE).

+ 24 - 11
crates/cdk-rexie/README.md

@@ -1,22 +1,35 @@
+# CDK Rexie
 
-# Cashu Development Kit Rexie Storage Backend
+[![crates.io](https://img.shields.io/crates/v/cdk-rexie.svg)](https://crates.io/crates/cdk-rexie)
+[![Documentation](https://docs.rs/cdk-rexie/badge.svg)](https://docs.rs/cdk-rexie)
+[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cashubtc/cdk/blob/main/LICENSE)
 
-**ALPHA** This library is in early development, the api will change and should be used with caution.
+**ALPHA** This library is in early development, the API will change and should be used with caution.
 
-cdk-rexie is the [rexie](https://docs.rs/rexie/latest/rexie/) storage backend for wasm cdk wallets in the browser.
+[Rexie](https://github.com/SaltyAom/rexie) (IndexedDB) storage backend implementation for the Cashu Development Kit (CDK). This provides browser-based storage for web applications.
 
-## Crate Feature Flags
+## Features
 
-The following crate feature flags are available:
+This crate provides a Rexie-based storage implementation for browser environments:
+- Wallet storage
+- Transaction history
+- Proof tracking
+- IndexedDB persistence
 
-| Feature     | Default | Description                        |
-|-------------|:-------:|------------------------------------|
-| `wallet`    |   Yes   | Enable cashu wallet features       |
+## Installation
 
-## Implemented [NUTs](https://github.com/cashubtc/nuts/):
+Add this to your `Cargo.toml`:
 
-See <https://github.com/cashubtc/cdk/blob/main/README.md>
+```toml
+[dependencies]
+cdk-rexie = "*"
+```
+
+
+## WASM Support
+
+This crate is specifically designed for use in WebAssembly environments and requires the `wasm32-unknown-unknown` target.
 
 ## License
 
-This project is distributed under the MIT software license - see the [LICENSE](../../LICENSE) file for details.
+This project is licensed under the [MIT License](../../LICENSE).

+ 16 - 8
crates/cdk-sqlite/README.md

@@ -1,11 +1,14 @@
+# CDK SQLite
 
-# Cashu Development Kit SQLite Storage Backend
+[![crates.io](https://img.shields.io/crates/v/cdk-sqlite.svg)](https://crates.io/crates/cdk-sqlite)
+[![Documentation](https://docs.rs/cdk-sqlite/badge.svg)](https://docs.rs/cdk-sqlite)
+[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/cashubtc/cdk/blob/main/LICENSE)
 
-**ALPHA** This library is in early development, the api will change and should be used with caution.
+**ALPHA** This library is in early development, the API will change and should be used with caution.
 
-cdk-sqlite is the sqlite storage backend for cdk.
+SQLite storage backend implementation for the Cashu Development Kit (CDK).
 
-## Crate Feature Flags
+## Features
 
 The following crate feature flags are available:
 
@@ -15,14 +18,19 @@ The following crate feature flags are available:
 | `mint`      |   Yes   | Enable cashu mint wallet features  |
 | `sqlcipher` |   No    | Enable encrypted database          |
 
-## Implemented [NUTs](https://github.com/cashubtc/nuts/):
+## Installation
 
-See <https://github.com/cashubtc/cdk/blob/main/README.md>
+Add this to your `Cargo.toml`:
+
+```toml
+[dependencies]
+cdk-sqlite = "*"
+```
 
 
 ## Minimum Supported Rust Version (MSRV)
 
-The `cdk` library should always compile with any combination of features on Rust **1.63.0**.
+This crate supports Rust version **1.75.0** or higher.
 
 To build and test with the MSRV you will need to pin the below dependency versions:
 
@@ -36,4 +44,4 @@ cargo update -p reqwest --precise 0.12.4
 
 ## License
 
-This project is distributed under the MIT software license - see the [LICENSE](../../LICENSE) file for details.
+This project is licensed under the [MIT License](../../LICENSE).

+ 1 - 1
crates/cdk/README.md

@@ -112,7 +112,7 @@ See more examples in the [examples](./examples) folder.
 
 ## Minimum Supported Rust Version (MSRV)
 
-The `cdk` library should always compile with any combination of features on Rust **1.63.0**.
+The `cdk` library should always compile with any combination of features on Rust **1.75.0**.
 
 To build and test with the MSRV you will need to pin the below dependency versions: