edit spec

This commit is contained in:
callebtc
2023-01-14 19:43:29 +01:00
parent af0984ccde
commit e6f1f1e5d1

View File

@@ -27,7 +27,9 @@ Mint: `Bob`
## 0.1 - Models
### `BlindedMessage`
A encrypted ("blinded") secret and an amount sent from `Alice` to `Bob`.
An encrypted ("blinded") secret and an amount sent from `Alice` to `Bob`.
`Alice` sends this to `Bob` when she [mints tokens][04]. `amount` is the value of the requested token and `B_` is the encrypted secret message generated by `Alice`.
```json
{
@@ -39,6 +41,8 @@ A encrypted ("blinded") secret and an amount sent from `Alice` to `Bob`.
### `BlindedSignature`
A signature on the `BlindedMessage` sent from `Bob` to `Alice`.
`Bob` sends this to `Alice` when she [mints tokens][04]. `amount` is the value of the blinded token, `C_` is the blinded signature on the secret message `B_` sent in the previous step. `id` is the [keyset id][02] of the mint public keys that signed the token.
```json
{
"amount": int,
@@ -48,7 +52,9 @@ A signature on the `BlindedMessage` sent from `Bob` to `Alice`.
```
### `Proof`
A `Proof` is also called a `Token` and has the following form:
A `Proof` is also called a `Token` in its serialized form. `Alice` sends the serialized to `Carol` to initiate a payment. Upon receiving the token, `Carol` deserializes it and requests a split from `Bob` to exchange it for new `BlindedSignature`'s. `Carol` sends the `Proof` to `Bob` together with new `BlindedMessage`'s that she wants to have signed.
`amount` is the value of the `Proof`, `secret` is the secret message, `C` is the unblinded signature on `secret`, `id` is the [keyset id][02] of the mint public keys that signed the token. `script` is a `P2SHScript` that specifies the spending condition for this `Proof` [TODO: P2SH documentation].
```json
{
@@ -61,7 +67,7 @@ A `Proof` is also called a `Token` and has the following form:
```
### `Proofs`
An array (list) of `Proof`'s. In general, this will be used for most operations instead of a single `Proof`. `Proofs` can be serialized (see Methods/Serialization [TODO: Link Serialization])
An array (list) of `Proof`'s. In general, this will be used for most operations instead of a single `Proof`. `Proofs` can be serialized (see Methods/[Serialization](#serialization-of-proofs) [TODO: Link Serialization])
## 0.2 - Methods
@@ -133,3 +139,24 @@ When serialized, this becomes:
```
eyJwcm9vZnMiOlt7ImlkIjoiRFNBbDludnZ5ZnZhIiwiYW1vdW50IjoyLCJzZWNyZXQiOiJiZFlDYkhHT051bmRMZVl2djFQNWRRIiwiQyI6IjAyZTYxMTdmYjFiMTYzM2E4YzE2NTdlZDM0YWIyNWVjZjhkNDk3NDA5MTE3OWM0NzczZWM1OWY4NWY0ZTM5OTFjZiJ9LHsiaWQiOiJEU0FsOW52dnlmdmEiLCJhbW91bnQiOjgsInNlY3JldCI6Ikt4eVVQdDVNdXJfLVJWOHBDRUNKNkEiLCJDIjoiMDNiOWRjZGI3ZjE5NWUwNzIxOGI5NWI3YzJkYWRjODI4OTE1OWZjNDQwNDc0Mzk4MzBmNzY1YjhjNTBiZmI2YmRhIn1dLCJtaW50cyI6eyJNSU5UX05BTUUiOnsidXJsIjoiaHR0cDovL3NlcnZlci5ob3N0OjMzMzkiLCJrcyI6WyJEU0FsOW52dnlmdmEiXX19fQ==
```
[00]: 00.md
[01]: 02.md
[03]: 03.md
[04]: 04.md
[05]: 05.md
[06]: 06.md
[07]: 07.md
[08]: 08.md
[09]: 09.md
[10]: 10.md
[11]: 11.md
[12]: 12.md
[13]: 13.md
[14]: 14.md
[15]: 15.md
[16]: 16.md
[17]: 17.md
[18]: 18.md
[19]: 19.md
[20]: 20.md