envio 2.30.2 → 2.31.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "envio",
3
- "version": "v2.30.2",
3
+ "version": "v2.31.0-alpha.0",
4
4
  "description": "A latency and sync speed optimized, developer friendly blockchain data indexer.",
5
5
  "bin": "./bin.js",
6
6
  "main": "./index.js",
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "homepage": "https://envio.dev",
27
27
  "optionalDependencies": {
28
- "envio-linux-x64": "v2.30.2",
29
- "envio-linux-arm64": "v2.30.2",
30
- "envio-darwin-x64": "v2.30.2",
31
- "envio-darwin-arm64": "v2.30.2"
28
+ "envio-linux-x64": "v2.31.0-alpha.0",
29
+ "envio-linux-arm64": "v2.31.0-alpha.0",
30
+ "envio-darwin-x64": "v2.31.0-alpha.0",
31
+ "envio-darwin-arm64": "v2.31.0-alpha.0"
32
32
  },
33
33
  "dependencies": {
34
34
  "@envio-dev/hypersync-client": "0.6.6",
@@ -42,6 +42,8 @@ export type entityHandlerContext<entity> = {
42
42
  readonly deleteUnsafe: (_1:string) => void
43
43
  };
44
44
 
45
+ export type chainInfo = { readonly isReady: boolean };
46
+
45
47
  export type genericHandlerWithLoader<loader,handler,eventFilters> = {
46
48
  readonly loader: loader;
47
49
  readonly handler: handler;
package/src/Internal.res CHANGED
@@ -54,8 +54,20 @@ type entityHandlerContext<'entity> = {
54
54
  deleteUnsafe: string => unit,
55
55
  }
56
56
 
57
+ @genType
58
+ type chainInfo = {
59
+ // true when the chain has completed initial sync and is processing live events
60
+ // false during historical synchronization
61
+ isReady: bool,
62
+ }
63
+
64
+ type chains = dict<chainInfo>
65
+
57
66
  type loaderReturn
58
- type handlerContext = private {isPreload: bool}
67
+ type handlerContext = private {
68
+ isPreload: bool,
69
+ chains: chains,
70
+ }
59
71
  type handlerArgs = {
60
72
  event: event,
61
73
  context: handlerContext,