refactor: RequestBuilder

This commit is contained in:
2023-03-28 15:34:01 +01:00
parent 1bf6c7031e
commit 465c59ea20
77 changed files with 3141 additions and 2343 deletions

View File

@ -1,16 +1,16 @@
export * from "./Connection";
export { default as EventKind } from "./EventKind";
export { Subscriptions } from "./Subscriptions";
export { default as Event } from "./Event";
export { default as Tag } from "./Tag";
export * from "./Links";
export * from "./Nips";
import { RelaySettings } from ".";
export type RawEvent = {
id: u256;
pubkey: HexKey;
created_at: number;
kind: number;
tags: string[][];
tags: Array<Array<string>>;
content: string;
sig: string;
};
@ -37,6 +37,8 @@ export type MaybeHexKey = HexKey | undefined;
*/
export type u256 = string;
export type ReqCommand = [cmd: "REQ", id: string, ...filters: Array<RawReqFilter>];
/**
* Raw REQ filter object
*/
@ -83,5 +85,5 @@ export enum Lists {
export interface FullRelaySettings {
url: string;
settings: { read: boolean; write: boolean };
settings: RelaySettings;
}