From e6f1f1e5d1ca463d98afd20bb4817ef8aaeb7ad8 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Sat, 14 Jan 2023 19:43:29 +0100 Subject: [PATCH] edit spec --- docs/specs/00.md | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/docs/specs/00.md b/docs/specs/00.md index 52b2776..172b2fb 100644 --- a/docs/specs/00.md +++ b/docs/specs/00.md @@ -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 @@ -132,4 +138,25 @@ When serialized, this becomes: ``` eyJwcm9vZnMiOlt7ImlkIjoiRFNBbDludnZ5ZnZhIiwiYW1vdW50IjoyLCJzZWNyZXQiOiJiZFlDYkhHT051bmRMZVl2djFQNWRRIiwiQyI6IjAyZTYxMTdmYjFiMTYzM2E4YzE2NTdlZDM0YWIyNWVjZjhkNDk3NDA5MTE3OWM0NzczZWM1OWY4NWY0ZTM5OTFjZiJ9LHsiaWQiOiJEU0FsOW52dnlmdmEiLCJhbW91bnQiOjgsInNlY3JldCI6Ikt4eVVQdDVNdXJfLVJWOHBDRUNKNkEiLCJDIjoiMDNiOWRjZGI3ZjE5NWUwNzIxOGI5NWI3YzJkYWRjODI4OTE1OWZjNDQwNDc0Mzk4MzBmNzY1YjhjNTBiZmI2YmRhIn1dLCJtaW50cyI6eyJNSU5UX05BTUUiOnsidXJsIjoiaHR0cDovL3NlcnZlci5ob3N0OjMzMzkiLCJrcyI6WyJEU0FsOW52dnlmdmEiXX19fQ== -``` \ No newline at end of file +``` + +[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 \ No newline at end of file