This commit is contained in:
Jeremy Klein 2025-08-12 15:23:15 -07:00 committed by GitHub
commit c7ddfc2217
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 28 additions and 0 deletions

28
47.md
View File

@ -456,6 +456,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: