Skip to content

Welshman Docs / @welshman/app / Sync

Class: Sync ​

Defined in: plugins/sync.ts:19

Negentropy-aware sync. Pulls/pushes events between the local repository and a set of relays, using NIP-77 reconciliation where the relay supports it and falling back to plain request/publish otherwise. Reads NIP-11 relay profiles from the Relays collection to detect negentropy support.

Constructors ​

Constructor ​

new Sync(app): Sync

Defined in: plugins/sync.ts:20

Parameters ​

app ​

IApp

Returns ​

Sync

Properties ​

app ​

readonly app: IApp

Defined in: plugins/sync.ts:20

Methods ​

pull() ​

pull(__namedParameters): Promise<void>

Defined in: plugins/sync.ts:28

Parameters ​

__namedParameters ​

AppSyncOpts

Returns ​

Promise<void>


push() ​

push(__namedParameters): Promise<void>

Defined in: plugins/sync.ts:43

Parameters ​

__namedParameters ​

AppSyncOpts

Returns ​

Promise<void>


query() ​

query(filters): Promise<SignedEvent[]>

Defined in: plugins/sync.ts:22

Parameters ​

filters ​

Filter[]

Returns ​

Promise<SignedEvent[]>