Expand description
This module defines the BlindedMessage
and BlindedSignature
structs, which are used for representing blinded messages and signatures in Cashu as described in Nut-00
The BlindedMessage
struct represents a blinded message, with an amount
field for the amount in satoshis and a b_
field for the public key of the blinding factor.
The BlindedSignature
struct represents a blinded signature, with an amount
field for the amount in satoshis, a c_
field for the public key of the blinding factor, and an optional id
field for the ID of the signature.
Both the BlindedMessage
and BlindedSignature
structs are serializable and deserializable using serde.
The TotalAmount
trait is also defined in this module, which provides a total_amount
method for calculating the total amount of a vector of BlindedMessage
or BlindedSignature
structs. The trait is implemented for both Vec<BlindedMessage>
and Vec<BlindedSignature>
.