Skip to content

Commit

Permalink
chore: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed May 29, 2024
1 parent 3dc6d28 commit 43a10a9
Showing 1 changed file with 39 additions and 47 deletions.
86 changes: 39 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ This `GET` request returns a pubkey's NWC capabilities (if any)

```json
{
"id": "a16ye1391c22xx........xxxxx",
"pubkey": "a16y69effexxxx........xxxxx",
"created_at": 1708336682,
"kind": 13194,
"tags": [],
"content": "pay_invoice, pay_keysend, get_balance, get_info, make_invoice, lookup_invoice, list_transactions",
"sig": "<signature>"
"event": {
"id": "a16ye1391c22xx........xxxxx",
"pubkey": "a16y69effexxxx........xxxxx",
"created_at": 1708336682,
"kind": 13194,
"tags": [],
"content": "pay_invoice, pay_keysend, get_balance, get_info, make_invoice, lookup_invoice, list_transactions",
"sig": "<signature>"
}
}
```
</details>
Expand Down Expand Up @@ -85,29 +87,34 @@ Returns the response event directly or to the Webhook URL if provided.
#### Response (with webhook)

```json
"webhook received"
{
"state": "WEBHOOK_RECEIVED"
}
```

#### Response (without webhook)

```json
{
"id": "a16ycf4a01bcxx........xxxxx",
"pubkey": "a16y69effexxxx........xxxxx",
"created_at": 1709033612,
"kind": 23195,
"tags": [
[
"p",
"f490f5xxxxx........xxxxx"
"event": {
"id": "a16ycf4a01bcxx........xxxxx",
"pubkey": "a16y69effexxxx........xxxxx",
"created_at": 1709033612,
"kind": 23195,
"tags": [
[
"p",
"f490f5xxxxx........xxxxx"
],
[
"e",
"a41aefxxxxx........xxxxx"
]
],
[
"e",
"a41aefxxxxx........xxxxx"
]
],
"content": "<encrypted content>",
"sig": "<signature>"
"content": "<encrypted content>",
"sig": "<signature>",
},
"state": "PUBLISHED"
}
```
</details>
Expand All @@ -130,34 +137,16 @@ Publishes any **signed** event to the specified relay.
| relayUrl | optional | string | If no relay is provided, it uses the default relay (wss://relay.getalby.com/v1) |
| event | required | JSON object (see [example](#event-example)) | **Signed** event |

#### Response (with webhook)

```json
"published"
```

#### Response (without webhook)
#### Response

```json
{
"id": "a16ycf4a01bcxx........xxxxx",
"pubkey": "a16y69effexxxx........xxxxx",
"created_at": 1709033612,
"kind": 23195,
"tags": [
[
"p",
"f490f5xxxxx........xxxxx"
],
[
"e",
"a41aefxxxxx........xxxxx"
]
],
"content": "<encrypted content>",
"sig": "<signature>"
"eventId": "a16ycf4a01bcxx........xxxxx",
"relayUrl": "wss://relay.custom.com/v1",
"state": "PUBLISHED",
}
```

</details>

------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -308,7 +297,10 @@ Delete previously requested subscriptions.
#### Response

```json
"subscription x stopped"
{
"message": "Subscription stopped successfully",
"state": "CLOSED"
}
```
</details>

Expand Down

0 comments on commit 43a10a9

Please sign in to comment.