Skip to content

Commit

Permalink
feat(zkappWorkerClient.ts): add remoteApi property to interact with w…
Browse files Browse the repository at this point in the history
…orker's methods as if they were local
  • Loading branch information
ymekuria committed Sep 19, 2024
1 parent 6d32268 commit 05948b1
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import { Field, PublicKey, fetchAccount } from 'o1js';
import * as Comlink from "comlink";

import type {
WorkerFunctions,
ZkappWorkerReponse,
ZkappWorkerRequest,
} from './zkappWorker';
// import type {
// WorkerFunctions,
// ZkappWorkerReponse,
// ZkappWorkerRequest,
// } from './zkappWorker';

export default class ZkappWorkerClient {
// ---------------------------------------------------------------------------------------

// Proxy to interact with the worker's methods as if they were local
remoteApi: Comlink.Remote<typeof import('./zkappWorker').api>;

setActiveInstanceToDevnet() {
return this._call('setActiveInstanceToDevnet', {});
}
Expand Down

0 comments on commit 05948b1

Please sign in to comment.