Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion 01.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This document outlines the exchange of the public keys of the mint `Bob` with th

Wallet user `Alice` receives public keys from mint `Bob` via `GET /v1/keys`. The set of all public keys for a set of amounts is called a _keyset_.

The mint responds only with its `active` keysets. Keyset are `active` if the mint will sign outputs with it. The mint will accept tokens from inactive keysets as inputs but will not sign with them for new outputs. The `active` keysets can change over time, for example due to key rotation. A list of all keysets, active and inactive, can be requested separately (see [NUT-02][02]).
The mint responds only with its `active` keysets. Keysets are `active` if the mint will sign outputs with it. The mint will accept tokens from inactive keysets as inputs but will not sign with them for new outputs. The `active` keysets can change over time, for example due to key rotation. A list of all keysets, active and inactive, can be requested separately (see [NUT-02][02]).

Note that a mint can support multiple keysets at the same time but will only respond with the active keysets on the endpoint `GET /v1/keys`. A wallet can ask for the keys of a specific (active or inactive) keyset via the endpoint `GET /v1/keys/{keyset_id}` (see [NUT-02][02]).

Expand Down Expand Up @@ -63,6 +63,8 @@ Response `GetKeysResponse` of `Bob`:
{
"id": <keyset_id_hex_str>,
"unit": <currency_unit_str>,
"active": <bool>,
"input_fee_ppk": <int|null>,
"final_expiry": <unix_timestamp_int|null>
"keys": {
<amount_int>: <public_key_str>,
Expand All @@ -73,6 +75,8 @@ Response `GetKeysResponse` of `Bob`:
}
```

Here, `active` indicates whether the mint will sign new outputs with this keyset, and `input_fee_ppk` is the fee in parts per thousand (ppk) per input spent from this keyset (see [NUT-02][02]).

## Example response

```json
Expand All @@ -81,6 +85,8 @@ Response `GetKeysResponse` of `Bob`:
{
"id": "009a1f293253e41e",
"unit": "sat",
"active": true,
"input_fee_ppk": 100,
"final_expiry": 1896187313,
"keys": {
"1": "02194603ffa36356f4a56b7df9371fc3192472351453ec7398b8da8117e7c3e104",
Expand All @@ -102,6 +108,8 @@ Note that for a keyset in an ISO 4217 currency, the key amounts represent values
{
"id": "00a2f293253e41f9",
"unit": "usd",
"active": true,
"input_fee_ppk": 100,
"final_expiry": 1896187313,
"keys": {
"1": "0229...e101", // 1 cent (0.01 USD)
Expand Down
24 changes: 13 additions & 11 deletions 02.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,19 @@ Response of `Bob` (same as [NUT-01][01]):

```json
{
"keysets": [
{
"id": "015ba18a8adcd02e715a58358eb618da4a4b3791151a4bee5e968bb88406ccf76a",
"unit": "sat",
"keys": {
"1": "03a40f20667ed53513075dc51e715ff2046cad64eb68960632269ba7f0210e38bc",
"2": "03fd4ce5a16b65576145949e6f99f445f8249fee17c606b688b504a849cdc452de",
"4": "02648eccfa4c026960966276fa5a4cae46ce0fd432211a4f449bf84f13aa5f8303",
"8": "02fdfd6796bfeac490cbee12f778f867f0a2c68f6508d17c649759ea0dc3547528"
}
}
"keysets": [{
"id": "009a1f293253e41e",
"unit": "sat",
"active": true,
"input_fee_ppk": 100,
"keys": {
"1": "02194603ffa36356f4a56b7df9371fc3192472351453ec7398b8da8117e7c3e104",
"2": "03b0f36d6d47ce14df8a7be9137712c42bcdd960b19dd02f1d4a9703b1f31d7513",
"4": "0366be6e026e42852498efb82014ca91e89da2e7a5bd3761bdad699fa2aec9fe09",
"8": "0253de5237f189606f29d8a690ea719f74d65f617bb1cb6fbea34f2bc4f930016d",
...
},
}, ...
]
}
```
Expand Down