Skip to content

Commit

Permalink
NUT-20: fix markdown (#207)
Browse files Browse the repository at this point in the history
* fix markdown

* prettier

* fix markup
  • Loading branch information
callebtc authored Dec 25, 2024
1 parent 6f2b389 commit 83cadff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion 04.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ Where `quote` is the quote ID and `request` is the payment request to fulfill. `
- `"PAID"` means that the request has been paid.
- `"ISSUED"` means that the quote has already been issued.

> [!CAUTION] > `quote` is a **unique and random** id generated by the mint to internally look up the payment state. `quote` **MUST** remain a secret between user and mint and **MUST NOT** be derivable from the payment request. A third party who knows the `quote` ID can front-run and steal the tokens that this operation mints.
> [!CAUTION]
>
> `quote` is a **unique and random** id generated by the mint to internally look up the payment state. `quote` **MUST** remain a secret between user and mint and **MUST NOT** be derivable from the payment request. A third party who knows the `quote` ID can front-run and steal the tokens that this operation mints.
## Example

Expand Down
9 changes: 7 additions & 2 deletions 20.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

This NUT defines signature-based authentication for mint quote redemption. When requesting a mint quote, clients provide a public key. The mint will then require a valid signature from the corresponding secret key to process the mint operation.

> [!CAUTION] > [NUT-04][04] mint quotes without a public key can be minted by anyone who knows the mint quote id without providing a signature.
> [!CAUTION]
>
> [NUT-04][04] mint quotes without a public key can be minted by anyone who knows the mint quote id without providing a signature.
## Mint quote

Expand All @@ -33,7 +35,9 @@ with the requested `amount`,`unit`, and `description` according to [NUT-04][04].

`pubkey` is the public key that will be required for signature verification during the minting operation. The mint will only mint ecash after receiving a valid signature from the corresponding private key in the subsequent `PostMintRequest`.

> [!IMPORTANT] > **Privacy:** To prevent the mint from being able to link multiple mint quotes, wallets **SHOULD** generate a unique public key for each mint quote request.
> [!IMPORTANT]
>
> **Privacy:** To prevent the mint from being able to link multiple mint quotes, wallets **SHOULD** generate a unique public key for each mint quote request.
The mint `Bob` then responds with a `PostMintQuoteBolt11Response`:

Expand Down Expand Up @@ -76,6 +80,7 @@ Response of `Bob`:
To provide a signature for a mint request, the owner of the signing public keys must concatenate the quote ID `quote` in `PostMintQuoteBolt11Response` and the `B_` fields of all `BlindedMessages` in the `PostMintBolt11Request` (i.e., the outputs, see [NUT-00][00]) to a single message string in the order they appear in the `PostMintRequest`. This concatenated string is then hashed and signed (see [Signature scheme](#signature-scheme)).

> [!NOTE]
>
> Concatenating the quote ID and the outputs into a single message prevents maliciously replacing the outputs.
If a request has `n` outputs, the message to sign becomes:
Expand Down

0 comments on commit 83cadff

Please sign in to comment.