Cleaned json

This commit is contained in:
ben 2023-04-12 13:27:24 +01:00
parent 5d4d79228a
commit 3a1393a861

44
83.md
View File

@ -27,21 +27,23 @@ There are two simple clients sending json over [NIP04](https://github.com/nostr-
`service client` sends `create_invoice` event:
```json
{ "create_invoice": {
"amount": int,
"memo": "<Optional[str]>",
"description_hash": "<Optional[bytes]>"
}
{
"create_invoice":{
"amount":"int",
"memo":"<Optional[str]>",
"description_hash":"<Optional[bytes]>"
}
}
```
`funding source client` checks the pubkey has permission and sends `generated_invoice` event:
```json
{ "generated_invoice": {
"payment_hash": "<string>",
"payment_request": "<string>"
}
{
"generated_invoice":{
"payment_hash":"<string>",
"payment_request":"<string>"
}
}
```
@ -50,10 +52,11 @@ There are two simple clients sending json over [NIP04](https://github.com/nostr-
`service client` sends `pay_invoice` event:
```json
{ "pay_invoice": {
"invoice": "<string>",
"note": "<Optional[str]>"
}
{
"pay_invoice":{
"invoice":"<string>",
"note":"<Optional[str]>"
}
}
```
@ -62,18 +65,19 @@ There are two simple clients sending json over [NIP04](https://github.com/nostr-
`service client` sends `check_payment` event:
```json
{ "check_payment": {
"payment_hash": "<string>"
}
{
"check_payment":{
"payment_hash":"<string>"
}
}
```
`funding source client` checks the pubkey has permission, checks the payment status and sends `payment_status` event:
```json
{ "payment_status": {
"paid": "<bool>"
}
{
"payment_status":{
"paid":"<bool>"
}
}
```