fix: add optimisticUpdateCallback to client factory
This commit is contained in:
parent
977d33b768
commit
c3b47e67e7
|
@ -2,16 +2,20 @@ import Client from "./client.js";
|
||||||
import Prover, { ProverRequestCallback } from "../prover.js";
|
import Prover, { ProverRequestCallback } from "../prover.js";
|
||||||
import VerifyingProvider from "./verifyingProvider.js";
|
import VerifyingProvider from "./verifyingProvider.js";
|
||||||
import Store from "#store.js";
|
import Store from "#store.js";
|
||||||
|
import { BaseClientOptions } from "#baseClient.js";
|
||||||
|
import { OptimisticUpdateCallback } from "#types.js";
|
||||||
|
|
||||||
function createDefaultClient(
|
function createDefaultClient(
|
||||||
proverHandler: ProverRequestCallback,
|
proverHandler: ProverRequestCallback,
|
||||||
rpcHandler: Function,
|
rpcHandler: Function,
|
||||||
|
optimisticUpdateHandler: OptimisticUpdateCallback,
|
||||||
): Client {
|
): Client {
|
||||||
return new Client({
|
return new Client({
|
||||||
prover: new Prover(proverHandler),
|
prover: new Prover(proverHandler),
|
||||||
store: new Store(60 * 60),
|
store: new Store(60 * 60),
|
||||||
provider: VerifyingProvider,
|
provider: VerifyingProvider,
|
||||||
rpcHandler,
|
rpcHandler,
|
||||||
|
optimisticUpdateCallback: optimisticUpdateHandler,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue