📢Publish NWC Request

Publishes the NWC request event and returns the response

Without Webhook

POST https://api.getalby.com/nwc/nip47

Request Body

Name
Type
Description

relayUrl

string

If no relay is provided, it uses the default relay (wss://relay.getalby.com/v1)

walletPubkey*

string

Pubkey of the NWC Wallet Provider

event*

JSON object (see example)

Signed request event

Event Example

{
  "id": "a16ycf4a01bcxx........xxxxx",
  "pubkey": "a16y69effexxxx........xxxxx",
  "created_at": 1700000021,
  "kind": 23194,
  "tags": [
    [
      "p",
      "a16y6sfa01bcxx........xxxxx"
    ]
  ],
  "content": "<encrypted content>",
  "sig": "<signature>"
}
// Source: https://pkg.go.dev/github.com/nbd-wtf/[email protected]#Event

Response

With Webhook

POST https://api.getalby.com/nwc/nip47/webhook

Request Body

Name
Type
Description

relayUrl

string

If no relay is provided, it uses the default relay (wss://relay.getalby.com/v1)

webhookUrl*

string

Webhook URL to publish the response event, returns the event directly if not provided

walletPubkey*

string

Pubkey of the NWC Wallet Provider

event*

JSON object (see example)

Signed request event

Response

Response to webhook

Last updated

Was this helpful?