Skip to content

Commit ed8a9e4

Browse files
committed
Sync by specific protocols and by delegate did
1 parent 22d86bd commit ed8a9e4

File tree

5 files changed

+859
-89
lines changed

5 files changed

+859
-89
lines changed

packages/agent/src/sync-api.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { SyncEngine } from './types/sync.js';
1+
import type { SyncEngine, SyncIdentityOptions } from './types/sync.js';
22
import type { Web5PlatformAgent } from './types/agent.js';
33

44
export type SyncApiParams = {
@@ -41,10 +41,14 @@ export class AgentSyncApi implements SyncEngine {
4141
this._syncEngine.agent = agent;
4242
}
4343

44-
public async registerIdentity(params: { did: string; }): Promise<void> {
44+
public async registerIdentity(params: { did: string; options: SyncIdentityOptions }): Promise<void> {
4545
await this._syncEngine.registerIdentity(params);
4646
}
4747

48+
public sync(direction?: 'push' | 'pull'): Promise<void> {
49+
return this._syncEngine.sync(direction);
50+
}
51+
4852
public startSync(params: { interval: string; }): Promise<void> {
4953
return this._syncEngine.startSync(params);
5054
}

0 commit comments

Comments
 (0)