Skip to content

Commit

Permalink
Sync by specific protocols and by delegate did
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Aug 14, 2024
1 parent 22d86bd commit ed8a9e4
Show file tree
Hide file tree
Showing 5 changed files with 859 additions and 89 deletions.
8 changes: 6 additions & 2 deletions packages/agent/src/sync-api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SyncEngine } from './types/sync.js';
import type { SyncEngine, SyncIdentityOptions } from './types/sync.js';
import type { Web5PlatformAgent } from './types/agent.js';

export type SyncApiParams = {
Expand Down Expand Up @@ -41,10 +41,14 @@ export class AgentSyncApi implements SyncEngine {
this._syncEngine.agent = agent;
}

public async registerIdentity(params: { did: string; }): Promise<void> {
public async registerIdentity(params: { did: string; options: SyncIdentityOptions }): Promise<void> {
await this._syncEngine.registerIdentity(params);
}

public sync(direction?: 'push' | 'pull'): Promise<void> {
return this._syncEngine.sync(direction);
}

public startSync(params: { interval: string; }): Promise<void> {
return this._syncEngine.startSync(params);
}
Expand Down
Loading

0 comments on commit ed8a9e4

Please sign in to comment.