feat: implemented relay controller and use that for fetching and publishing events #149

Merged
s merged 10 commits from relay-controller into staging 2024-08-20 12:13:23 +00:00
Showing only changes of commit a788309126 - Show all commits

View File

@ -78,9 +78,9 @@ export class RelayController {
* Asynchronously retrieves multiple event from a set of relays based on a provided filter.
* If no relays are specified, it defaults to using connected relays.
*
* @param {Filter} filter - The filter criteria to find the event.
* @param {string[]} [relays] - An optional array of relay URLs to search for the event.
* @returns {Promise<Event | null>} - Returns a promise that resolves to the found event or null if not found.
* @param filter - The filter criteria to find the event.
* @param relays - An optional array of relay URLs to search for the event.
* @returns Returns a promise that resolves with an array of events.
s marked this conversation as resolved Outdated
Outdated
Review

Small mismatch between comment and actual function return

Small mismatch between comment and actual function return
Outdated
Review

fixed

fixed
*/
fetchEvents = async (
filter: Filter,
@ -170,9 +170,9 @@ export class RelayController {
* Asynchronously retrieves an event from a set of relays based on a provided filter.
* If no relays are specified, it defaults to using connected relays.
*
* @param {Filter} filter - The filter criteria to find the event.
* @param {string[]} [relays] - An optional array of relay URLs to search for the event.
* @returns {Promise<Event | null>} - Returns a promise that resolves to the found event or null if not found.
* @param filter - The filter criteria to find the event.
* @param relays - An optional array of relay URLs to search for the event.
* @returns Returns a promise that resolves to the found event or null if not found.
*/
fetchEvent = async (
filter: Filter,