You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds the Nostr-publish step to Customer.request:
- New module packages/sdk/src/events.ts defines QueryRequestPayload
+ buildQueryRequestEvent / parseQueryRequestEvent (round-trip)
- Customer.request, after building the HTLC lock, builds a kind 5300
event carrying { schema, predicate, customer_pubkey, oracle_pubkey,
bounty_token, max_amount_sats, locktime_seconds, expires_at } and
publishes it via the configured RelayClient
- CustomerOptions gains optional `relayClient` (built from `relays`
when omitted; tests inject mocks)
- RelayPublishError surfaces "0 successes" responses cleanly so the
caller knows the request did not reach any relay
- Steps 6-11 (subscribe / select / decrypt / verify) remain TODO; the
not-implemented marker now reports the published event id
Tests: 8 new (165 total in test:packages, was 157). Covers the round
trip of buildQueryRequestEvent / parseQueryRequestEvent (incl. tag
layout and rejection of malformed payloads), publish path through
mock RelayClient, and RelayPublishError on zero accepts.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments