Crate cdk_common

Source
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

crates.io Documentation MIT licensed

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
AuthProof
Auth Proofs
BlindAuthSettings
Blind auth settings
BlindAuthToken
Blind Auth Token
BlindSignature
Blind Signature (also called promise)
BlindSignatureDleq
Blinded Signature on Dleq
BlindedMessage
Blinded Message (also called output)
Bolt11Invoice
Represents a syntactically and semantically correct lightning BOLT11 invoice.
CheckStateRequest
Check spendable request [NUT-07]
CheckStateResponse
Check Spendable Response [NUT-07]
ClearAuthSettings
Clear Auth Settings
Conditions
P2PK and HTLC spending conditions
ContactInfo
Contact Info
HTLCWitness
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
KeySetInfo
KeySetInfo
Keys
Mint public keys per amount.
KeysResponse
Mint Public Keys [NUT-01]
KeysetResponse
Mint Keysets [NUT-02] Ids of mints keyset ids
MeltMethodSettings
Melt Method Settings
MeltQuoteBolt11Request
BOLT11 melt quote request [NUT-23]
MeltQuoteBolt11Response
Melt quote response [NUT-05]
MeltRequest
Melt Bolt11 Request [NUT-05]
MintAuthRequest
Mint auth request [NUT-XX]
MintInfo
Mint Info [NUT-06]
MintKeySet
MintKeyset
MintMethodSettings
Mint Method Settings
MintQuoteBolt11Request
Mint quote request [NUT-04]
MintQuoteBolt11Response
Mint quote response [NUT-04]
MintRequest
Mint request [NUT-04]
MintResponse
Mint response [NUT-04]
MintVersion
Mint Version
Mpp
Multi-part payment
MppMethodSettings
Mpp Method Settings
NUT04Settings
Mint Settings
NUT05Settings
Melt Settings
NUT15Settings
Mpp Settings
Nut10Secret
NUT10 Secret
Nuts
Supported nuts and settings
P2PKWitness
P2Pk Witness
PaymentRequest
Payment Request
PaymentRequestBuilder
Builder for PaymentRequest
PaymentRequestPayload
Payment Request
PreMint
PreMint
PreMintSecrets
Premint Secrets
PreSwap
Preswap information
Proof
Proofs
ProofDleq
Proof Dleq
ProofState
Proof state [NUT-07]
ProtectedEndpoint
List of the methods and paths that are protected
PublicKey
PublicKey
RestoreRequest
Restore Request [NUT-09]
RestoreResponse
Restore Response [NUT-09]
SecretData
Secert Date
SecretKey
SecretKey
SwapRequest
Swap Request [NUT-03]
SwapResponse
Split Response [NUT-06]
TokenV3
Token
TokenV4
Token V4
Transport
Transport
TransportBuilder
Builder for Transport

Enums§

AuthRequired
Required Auth
AuthToken
Auth Token
CurrencyUnit
Currency Unit
Kind
NUT10 Secret Kind
MeltOptions
Melt Options
MeltQuoteState
Possible states of a quote
Method
HTTP method
MintQuoteState
Possible states of a quote
NotificationPayload
Subscription response
PaymentMethod
Payment Method
RoutePath
Route path
SigFlag
Signature flag
SpendingConditions
Spending Conditions
State
State of Proof
Token
Token Enum
TransportType
Transport Type
Witness
Witness

Statics§

SECP256K1
Secp256k1 global context

Traits§

ProofsMethods
Utility methods for Proofs

Type Aliases§

Proofs
List of Proof