Merge 9c8e54d74f2c38d608a76d6e70d04768ac25e7ae into 0619f370bca3485bb9c5870bc2defa03c7c3d10e

This commit is contained in:
Barry Deen 2025-03-14 16:36:53 +01:00 committed by GitHub
commit a2f238a1a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

155
47.md
View File

@ -274,6 +274,31 @@ pubkey should be used.
Errors:
- `PAYMENT_FAILED`: The payment failed. This may be due to a timeout, exhausting all routes, insufficient capacity or similar.
### `pay_chain_address`
Description: Requests payment to a chain address.
Request:
```jsonc
{
"method": "pay_chain_address",
"params": {
"address": "bc1q...",
"amount": 123, // amount in sats
}
}
```
Response:
```jsonc
{
"result_type": "pay_chain_address",
"result": {
"txid": "0123456789abcdef...",
}
}
```
### `make_invoice`
Request:
@ -346,6 +371,29 @@ Response:
Errors:
- `NOT_FOUND`: The invoice could not be found by the given parameters.
### `make_chain_address`
Request:
```jsonc
{
"method": "make_chain_address",
"params": {
"type": "p2tr", // optional - (p2tr, p2wpkh etc)
}
}
```
Response:
```jsonc
{
"result_type": "make_chain_address",
"result": {
"address": "bc1q...", // chain address
"type": "p2tr", // (p2tr, p2wpkh etc)
}
}
```
### `list_transactions`
Lists invoices and payments. If `type` is not specified, both invoices and payments are returned.
@ -393,6 +441,69 @@ Response:
}
```
### `list_chain_transactions`
Request:
```jsonc
{
"method": "list_chain_transactions",
"params": {
"from": unixtimestamp, // optional
"until": unixtimestamp, // optional
"limit": 10, // maximum number of transactions to return, optional
"offset": 0, // offset of the first transaction to return, optional
}
}
```
Response:
```jsonc
{
"result_type": "list_chain_transactions",
"result": {
"transactions": [
{
"type": "incoming", // "incoming" for received transactions, "outgoing" for sent transactions
"txid": "0123456789abcdef...",
"address": "bc1q...", // chain address
"amount": 100000, // value in sats
"confirmations": 1,
"metadata": {} // generic metadata
}
],
}
}
```
### `list_utxos`
Request:
```jsonc
{
"method": "list_utxos",
"params": {
"min_confirmations": 1, // minimum number of confirmations, optional
}
}
```
Response:
```jsonc
{
"result_type": "list_utxos",
"result": {
"utxos": [
{
"txid": "0123456789abcdef...",
"vout": 0,
"amount": 123, // value in sats
"confirmations": 1,
}
],
}
}
```
### `get_balance`
Request:
@ -413,6 +524,27 @@ Response:
}
```
### `get_chain_balance`
Request:
```jsonc
{
"method": "get_chain_balance",
"params": {}
}
```
Response:
```jsonc
{
"result_type": "get_chain_balance",
"result": {
"balance": 100000, // user's balance in sats
"unconfirmed_balance": 100000, // user's unconfirmed balance in sats
}
}
```
### `get_info`
Request:
@ -440,6 +572,29 @@ Response:
}
```
### `sign_psbt`
Request:
```jsonc
{
"method": "sign_psbt",
"params": {
"psbt": "cHNidP8BAHICAAAAA...", // base64 encoded psbt
"input_index": 0, // index of the input to sign, optional
}
}
```
Response:
```jsonc
{
"result_type": "sign_psbt",
"result": {
"psbt": "cHNidP8BAHIC...", // base64 encoded signed psbt
}
}
```
## Notifications
### `payment_received`