mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-03-25 17:21:52 +01:00
Merge 587be067ed3eba7d410242df93e9c1b649c7ad84 into 0619f370bca3485bb9c5870bc2defa03c7c3d10e
This commit is contained in:
commit
48824d32be
28
47.md
28
47.md
@ -413,6 +413,34 @@ Response:
|
||||
}
|
||||
```
|
||||
|
||||
### `get_budget`
|
||||
|
||||
Budgets can be used to limit the amount of funds that can be spent by a connection in a given time period.
|
||||
Budgets are optional and can be set by the user if their wallet supports it. Support for this command indicates
|
||||
that the wallet supports user-configured budgets. The budget will be reset at the `renews_at` timestamp.
|
||||
|
||||
Request:
|
||||
```jsonc
|
||||
{
|
||||
"method": "get_budget",
|
||||
"params": {
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Response:
|
||||
```jsonc
|
||||
{
|
||||
"result_type": "get_budget",
|
||||
"result": {
|
||||
"used_budget": 10000, // used budget amount in msats
|
||||
"total_budget": 100000, // total budget amount in msats
|
||||
"renews_at": 1693876973, // timestamp in seconds since epoch, optional. If not provided, the budget does not renew.
|
||||
"renewal_period": "monthly", // daily|weekly|monthly|yearly|never
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### `get_info`
|
||||
|
||||
Request:
|
||||
|
Loading…
x
Reference in New Issue
Block a user