Package-level declarations

Types

Link copied to clipboard
@Serializable
data class ActiveKeysetsResponse(val keysets: List<KeysetJson>)

The data structure the mint returns when we ask for the active keysets.

Link copied to clipboard
@Serializable
data class BlindedMessage(val amount: ULong, val id: String, val blindedSecret: String)

The smallest unit of request to the mint endpoint.

Link copied to clipboard
@Serializable
data class BlindedSignature(val amount: ULong, val id: String, val blindedKey: String)

This is the smallest unit of data returned by the mint endpoint. These aggregate into a me.tb.cashuclient.mint.MintResponse object.

Link copied to clipboard
Link copied to clipboard
interface BlindingData
Link copied to clipboard
Link copied to clipboard
class Keyset(keyset: Map<ULong, PublicKey>)

A keyset is a set of public keys, each associated with a token value. The mint uses the key appropriate to the amount to perform the signature on the corresponding blinded message.

Link copied to clipboard
value class KeysetId(val value: String)

A KeysetId is a unique identifier for a Keyset.

Link copied to clipboard
@Serializable
data class KeysetJson(val id: String, val unit: String = "sat", val keys: Map<ULong, String>)
Link copied to clipboard
Link copied to clipboard
object PaymentRequestSerializer : KSerializer<PaymentRequest>
Link copied to clipboard
Link copied to clipboard
@Serializable
data class Proof(val amount: ULong, val id: String, val secret: String, val C: String, val script: String? = null)

Cashu token.

Link copied to clipboard
class Secret

Secret used to generate a token. This is the x in NUT-00, the bytes we'll use in the hashToCurve function to generate key Y.

Link copied to clipboard

The data structure the mint returns when we ask for a specific keyset.

Link copied to clipboard
sealed class SwapRequired
Link copied to clipboard
@Serializable
data class TokenEntry(val mint: String? = null, val proofs: List<Proof>)
Link copied to clipboard
@Serializable
data class TokenV3(val tokenEntries: List<TokenEntry> = listOf(), val unit: String? = null, val memo: String? = null)

A Cashu token that includes proofs and their respective mints. Can include proofs from multiple different mints and keysets.