kernl API
    Preparing search index...

    Function publishAccepted

    • Publish to every relay and succeed when any one accepts. A relay that refuses or is unreachable is normal on an open network; only when none accepted is the publish a failure, and then the reason names how many were tried (D-028).

      Parameters

      • pool: ApplesaucePool

        The shared applesauce pool.

      • relays: string[]

        Where to publish.

      • event: NostrEvent

        The signed event.

      Returns Promise<number>

      How many relays accepted it.

      await publishAccepted(pool, ['wss://a', 'wss://b'], event); // 1 when only one accepted