Expand description
This crate is the base foundation to build things that can interact with the CDK (Cashu Development Kit) and their internal crates.
This is meant to contain the shared types, traits and common functions that are used across the internal crates.
§CDK Common
ALPHA This library is in early development, the API will change and should be used with caution.
Common types and utilities shared across the Cashu Development Kit (CDK) crates.
§Installation
Add this to your Cargo.toml
:
[dependencies]
cdk-common = "*"
§Features
This crate provides common functionality used across CDK crates including:
- Common data types and structures
- Shared traits and interfaces
- Utility functions
- Error types
§License
This project is licensed under the MIT License.
Re-exports§
pub use error::Error;
pub use bitcoin;
pub use cashu::lightning_invoice;
Modules§
- amount
- CDK Amount
- common
- Types
- database
- CDK Database
- dhke
- Diffie-Hellmann key exchange
- error
- Errors
- mint
- Mint types
- mint_
url - Url
- nut00
- NUT-00: Notation and Models
- nut01
- NUT-01: Mint public key exchange
- nut02
- NUT-02: Keysets and keyset ID
- nut03
- NUT-03: Swap
- nut04
- NUT-04: Mint Tokens via Bolt11
- nut05
- NUT-05: Melting Tokens
- nut06
- NUT-06: Mint Information
- nut07
- NUT-07: Spendable Check
- nut08
- NUT-08: Lightning fee return
- nut09
- NUT-09: Restore signatures
- nut10
- NUT-10: Spending conditions
- nut11
- NUT-11: Pay to Public Key (P2PK)
- nut12
- NUT-12: Offline ecash signature validation
- nut13
- NUT-13: Deterministic Secrets
- nut14
- NUT-14: Hashed Time Lock Contacts (HTLC)
- nut15
- NUT-15: Multipart payments
- nut17
- Specific Subscription for the cdk crate
- nut18
- NUT-18 module imports
- nut19
- NUT-19: Cached Responses
- nut20
- Mint Quote Signatures
- nut21
- 21 Clear Auth
- nut22
- 22 Blind Auth
- nut23
- Bolt11
- nuts
- Nuts
- payment
- CDK Mint Lightning
- pub_sub
- Publish–subscribe pattern.
- secret
- Secret
- state
- State transition rules
- subscription
- Subscription types and traits
- util
- Cashu utils
- wallet
- Wallet Types
- ws
- Websocket types and functions for the CDK.
Structs§
- Amount
- Amount can be any unit
- Auth
Proof - Auth Proofs
- Blind
Auth Settings - Blind auth settings
- Blind
Auth Token - Blind Auth Token
- Blind
Signature - Blind Signature (also called
promise
) - Blind
Signature Dleq - Blinded Signature on Dleq
- Blinded
Message - Blinded Message (also called
output
) - Bolt11
Invoice - Represents a syntactically and semantically correct lightning BOLT11 invoice.
- Check
State Request - Check spendable request [NUT-07]
- Check
State Response - Check Spendable Response [NUT-07]
- Clear
Auth Settings - Clear Auth Settings
- Conditions
- P2PK and HTLC spending conditions
- Contact
Info - Contact Info
- HTLC
Witness - HTLC Witness
- Id
- A keyset ID is an identifier for a specific keyset. It can be derived by anyone who knows the set of public keys of a mint. The keyset ID CAN be stored in a Cashu token such that the token can be used to identify which mint or keyset it was generated from.
- KeySet
- Keyset
- KeySet
Info - KeySetInfo
- Keys
- Mint public keys per amount.
- Keys
Response - Mint Public Keys [NUT-01]
- Keyset
Response - Mint Keysets [NUT-02] Ids of mints keyset ids
- Melt
Method Settings - Melt Method Settings
- Melt
Quote Bolt11 Request - BOLT11 melt quote request [NUT-23]
- Melt
Quote Bolt11 Response - Melt quote response [NUT-05]
- Melt
Request - Melt Bolt11 Request [NUT-05]
- Mint
Auth Request - Mint auth request [NUT-XX]
- Mint
Info - Mint Info [NUT-06]
- Mint
KeySet - MintKeyset
- Mint
Method Settings - Mint Method Settings
- Mint
Quote Bolt11 Request - Mint quote request [NUT-04]
- Mint
Quote Bolt11 Response - Mint quote response [NUT-04]
- Mint
Request - Mint request [NUT-04]
- Mint
Response - Mint response [NUT-04]
- Mint
Version - Mint Version
- Mpp
- Multi-part payment
- MppMethod
Settings - Mpp Method Settings
- NUT04
Settings - Mint Settings
- NUT05
Settings - Melt Settings
- NUT15
Settings - Mpp Settings
- Nut10
Secret - NUT10 Secret
- Nuts
- Supported nuts and settings
- P2PK
Witness - P2Pk Witness
- Payment
Request - Payment Request
- Payment
Request Builder - Builder for PaymentRequest
- Payment
Request Payload - Payment Request
- PreMint
- PreMint
- PreMint
Secrets - Premint Secrets
- PreSwap
- Preswap information
- Proof
- Proofs
- Proof
Dleq - Proof Dleq
- Proof
State - Proof state [NUT-07]
- Protected
Endpoint - List of the methods and paths that are protected
- Public
Key - PublicKey
- Restore
Request - Restore Request [NUT-09]
- Restore
Response - Restore Response [NUT-09]
- Secret
Data - Secert Date
- Secret
Key - SecretKey
- Swap
Request - Swap Request [NUT-03]
- Swap
Response - Split Response [NUT-06]
- TokenV3
- Token
- TokenV4
- Token V4
- Transport
- Transport
- Transport
Builder - Builder for Transport
Enums§
- Auth
Required - Required Auth
- Auth
Token - Auth Token
- Currency
Unit - Currency Unit
- Kind
- NUT10 Secret Kind
- Melt
Options - Melt Options
- Melt
Quote State - Possible states of a quote
- Method
- HTTP method
- Mint
Quote State - Possible states of a quote
- Notification
Payload - Subscription response
- Payment
Method - Payment Method
- Route
Path - Route path
- SigFlag
- Signature flag
- Spending
Conditions - Spending Conditions
- State
- State of Proof
- Token
- Token Enum
- Transport
Type - Transport Type
- Witness
- Witness
Statics§
- SECP256
K1 - Secp256k1 global context
Traits§
- Proofs
Methods - Utility methods for Proofs