Skip to content

Commit

Permalink
chore: null -> optional
Browse files Browse the repository at this point in the history
  • Loading branch information
thesimplekid committed Dec 5, 2024
1 parent 11a0576 commit 7ba6a76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion 04.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The wallet of `Alice` includes the following `PostMintQuoteBolt11Request` data i
{
"amount": <int>,
"unit": <str_enum["sat"]>,
"description": <str|null>
"description": <str> // Optional
}
```

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

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 @@ -25,17 +24,16 @@ The wallet of `Alice` includes the following `PostMintQuoteBolt11Request` data i
{
"amount": <int>,
"unit": <str_enum["sat"]>,
"description": <str|null>,
"pubkey": <str|null> <-- New
"description": <str>, // Optional
"pubkey": <str> // Optional <-- New
}
```

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 All @@ -45,7 +43,7 @@ The mint `Bob` then responds with a `PostMintQuoteBolt11Response`:
"request": <str>,
"state": <str_enum[STATE]>,
"expiry": <int>,
"pubkey": <str|null> <-- New
"pubkey": <str> // Optional <-- New
}
```

Expand Down

0 comments on commit 7ba6a76

Please sign in to comment.