update spec

This commit is contained in:
callebtc
2023-01-14 19:50:46 +01:00
parent e6f1f1e5d1
commit 3b99be52b9

View File

@@ -27,9 +27,8 @@ Mint: `Bob`
## 0.1 - Models
### `BlindedMessage`
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`.
An encrypted ("blinded") secret and an amount sent from `Alice` to `Bob` before [minting new tokens][04]
```json
{
@@ -38,10 +37,11 @@ An encrypted ("blinded") secret and an amount sent from `Alice` to `Bob`.
}
```
### `BlindedSignature`
A signature on the `BlindedMessage` sent from `Bob` to `Alice`.
`amount` is the value of the requested token and `B_` is the encrypted secret message generated by `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.
### `BlindedSignature`
A signature on the `BlindedMessage` sent from `Bob` to `Alice` after [minting new tokens][04].
```json
{
@@ -51,10 +51,11 @@ A signature on the `BlindedMessage` sent from `Bob` to `Alice`.
}
```
### `Proof`
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 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.
`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].
### `Proof`
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.
```json
{
@@ -66,8 +67,11 @@ A `Proof` is also called a `Token` in its serialized form. `Alice` sends the ser
}
```
`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].
### `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](#serialization-of-proofs) [TODO: Link Serialization])
An array (list) of `Proof`'s. In general, this will be used for most operations instead of a single `Proof`. `Proofs` must be serialized before sending between wallets (see [Serialization](#serialization-of-proofs).
## 0.2 - Methods