Problem
Consumers have no way to observe warp-sync progress.
Proposed API
A new optional callback on addChain:
export type SyncProgress =
| { type: "warp-sync"; verified: number }
| { type: "chain-sync"; current: number; target: number }
| { type: "in-sync" };
chain = await client.addChain({
chainSpec,
onSyncProgress: (p: SyncProgress) => void,
});
Problem
Consumers have no way to observe warp-sync progress.
Proposed API
A new optional callback on
addChain: