Skip to content

Commit

Permalink
cached responses
Browse files Browse the repository at this point in the history
  • Loading branch information
lollerfirst committed Nov 23, 2024
1 parent 7b53125 commit 598c939
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 03.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ If successful, `Bob` will respond with a `PostSwapResponse`
}
```

## Cached Responses

`Bob` **MUST** cache every successful `PostSwapResponse` using `PostSwapRequest` as key.
Each cache entry has a TTL (Time-To-Live) of at least 1800 seconds.
In the event of a network error, `Alice` **CAN** replay the same exact request and get the same response.

[00]: 00.md
[01]: 01.md
[02]: 02.md
Expand Down
6 changes: 6 additions & 0 deletions 04.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ Response of `Bob`:

If the invoice was not paid yet, `Bob` responds with an error. In that case, `Alice` **CAN** repeat the same request until the Lightning invoice is settled.

## Cached Responses

`Bob` **MUST** cache every successful `PostMintBolt11Response` using `PostMintBolt11Request` as key.
Each cache entry has a TTL (Time-To-Live) of at least 1800 seconds.
In the event of a network error, `Alice` **CAN** replay the same exact request and get the same response.

## Unblinding signatures

Upon receiving the `BlindSignatures` from the mint `Bob`, the wallet of `Alice` unblinds them to generate `Proofs` (using the blinding factor `r` and the mint's public key `K`, see BDHKE [NUT-00][00]). The wallet then stores these `Proofs` in its database:
Expand Down
6 changes: 6 additions & 0 deletions 05.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ Response `PostMeltQuoteBolt11Response` of `Bob`:
}
```

## Cached Responses

`Bob` **MUST** cache every successful `PostMeltBolt11Response` using `PostMeltBolt11Request` as key.
Each cache entry has a TTL (Time-To-Live) of at least 1800 seconds.
In the event of a network error, `Alice` **CAN** replay the same exact request and get the same response.

## Settings

The mint's settings for this nut indicate the supported method-unit pairs for melting. They are part of the info response of the mint ([NUT-06][06]) which in this case reads
Expand Down

0 comments on commit 598c939

Please sign in to comment.