fix: add optimisticUpdateCallback to client factory

This commit is contained in:
Derrick Hammer 2023-07-13 02:53:23 -04:00
parent 977d33b768
commit c3b47e67e7
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 0 deletions

View File

@ -2,16 +2,20 @@ import Client from "./client.js";
import Prover, { ProverRequestCallback } from "../prover.js";
import VerifyingProvider from "./verifyingProvider.js";
import Store from "#store.js";
import { BaseClientOptions } from "#baseClient.js";
import { OptimisticUpdateCallback } from "#types.js";
function createDefaultClient(
proverHandler: ProverRequestCallback,
rpcHandler: Function,
optimisticUpdateHandler: OptimisticUpdateCallback,
): Client {
return new Client({
prover: new Prover(proverHandler),
store: new Store(60 * 60),
provider: VerifyingProvider,
rpcHandler,
optimisticUpdateCallback: optimisticUpdateHandler,
});
}