27 lines
952 B
C
27 lines
952 B
C
#ifndef PUBLISH_H
|
|
#define PUBLISH_H
|
|
|
|
#include "../resources/nostr_core_lib/cjson/cJSON.h"
|
|
|
|
/*
|
|
* Build, sign, publish, and print standardized per-relay results.
|
|
* Returns number of relays that acknowledged with OK=true, or -1 on hard failure.
|
|
*/
|
|
int publish_signed_event_with_report(const char *label,
|
|
int kind,
|
|
const char *content,
|
|
cJSON *tags,
|
|
int timeout_ms);
|
|
|
|
/*
|
|
* Fire-and-forget publish wrapper.
|
|
* Returns 0 when background job is started, -1 on immediate setup failure.
|
|
*/
|
|
int publish_signed_event_with_report_async(const char *label,
|
|
int kind,
|
|
const char *content,
|
|
cJSON *tags,
|
|
int timeout_ms);
|
|
|
|
#endif /* PUBLISH_H */
|