envio 3.3.0-alpha.2 → 3.3.0-alpha.3

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.
Files changed (64) hide show
  1. package/index.d.ts +23 -21
  2. package/package.json +6 -6
  3. package/src/ChainFetching.res +25 -0
  4. package/src/ChainFetching.res.mjs +19 -0
  5. package/src/CrossChainState.res +15 -0
  6. package/src/CrossChainState.res.mjs +12 -0
  7. package/src/Ecosystem.res +0 -2
  8. package/src/EventConfigBuilder.res +42 -18
  9. package/src/EventConfigBuilder.res.mjs +21 -9
  10. package/src/EventProcessing.res +53 -37
  11. package/src/EventProcessing.res.mjs +41 -36
  12. package/src/FetchState.res +53 -43
  13. package/src/FetchState.res.mjs +71 -54
  14. package/src/HandlerLoader.res +10 -1
  15. package/src/HandlerLoader.res.mjs +15 -8
  16. package/src/Internal.res +3 -3
  17. package/src/Internal.res.mjs +1 -1
  18. package/src/LoadLayer.res +5 -5
  19. package/src/LoadLayer.res.mjs +6 -6
  20. package/src/PgStorage.res +4 -4
  21. package/src/PgStorage.res.mjs +5 -5
  22. package/src/Prometheus.res +10 -10
  23. package/src/Prometheus.res.mjs +9 -9
  24. package/src/PruneStaleHistory.res +2 -2
  25. package/src/PruneStaleHistory.res.mjs +3 -3
  26. package/src/Rollback.res +2 -2
  27. package/src/Rollback.res.mjs +3 -3
  28. package/src/SimulateItems.res +77 -15
  29. package/src/SimulateItems.res.mjs +63 -20
  30. package/src/TestIndexer.res +48 -36
  31. package/src/TestIndexer.res.mjs +35 -28
  32. package/src/bindings/Performance.res +7 -0
  33. package/src/bindings/Performance.res.mjs +21 -0
  34. package/src/bindings/Performance.resi +7 -0
  35. package/src/sources/EventRouter.res +17 -21
  36. package/src/sources/EventRouter.res.mjs +6 -9
  37. package/src/sources/Evm.res +1 -35
  38. package/src/sources/Evm.res.mjs +2 -37
  39. package/src/sources/Fuel.res +0 -2
  40. package/src/sources/Fuel.res.mjs +0 -6
  41. package/src/sources/HyperFuelSource.res +10 -11
  42. package/src/sources/HyperFuelSource.res.mjs +11 -11
  43. package/src/sources/HyperSync.res +3 -0
  44. package/src/sources/HyperSync.res.mjs +1 -0
  45. package/src/sources/HyperSync.resi +1 -0
  46. package/src/sources/HyperSyncClient.res +5 -1
  47. package/src/sources/HyperSyncSource.res +42 -24
  48. package/src/sources/HyperSyncSource.res.mjs +30 -26
  49. package/src/sources/RpcSource.res +7 -8
  50. package/src/sources/RpcSource.res.mjs +8 -8
  51. package/src/sources/SimulateSource.res +1 -1
  52. package/src/sources/Source.res +1 -1
  53. package/src/sources/SourceManager.res +17 -16
  54. package/src/sources/SourceManager.res.mjs +10 -15
  55. package/src/sources/Svm.res +4 -10
  56. package/src/sources/Svm.res.mjs +5 -12
  57. package/src/sources/SvmHyperSyncSource.res +24 -18
  58. package/src/sources/SvmHyperSyncSource.res.mjs +22 -15
  59. package/src/sources/TransactionStore.res +59 -42
  60. package/src/sources/TransactionStore.res.mjs +21 -1
  61. package/svm.schema.json +30 -37
  62. package/src/bindings/Hrtime.res +0 -58
  63. package/src/bindings/Hrtime.res.mjs +0 -90
  64. package/src/bindings/Hrtime.resi +0 -30
@@ -1,90 +0,0 @@
1
- // Generated by ReScript, PLEASE EDIT WITH CARE
2
-
3
-
4
- function nanoToMilli(nano) {
5
- return nano / 1000000;
6
- }
7
-
8
- function secToMilli(sec) {
9
- return sec * 1000;
10
- }
11
-
12
- function nanoToTimeTuple(nano) {
13
- let seconds = Math.floor(nano / 1000000000);
14
- let nanos = nano % 1000000000;
15
- return [
16
- seconds,
17
- nanos
18
- ];
19
- }
20
-
21
- function timeElapsedToNewRef(elapsed, ref) {
22
- let match = nanoToTimeTuple(elapsed[1] + ref[1]);
23
- return [
24
- elapsed[0] + ref[0] + match[0],
25
- match[1]
26
- ];
27
- }
28
-
29
- function toMillis(param) {
30
- return param[0] * 1000 + param[1] / 1000000;
31
- }
32
-
33
- function toSeconds(param) {
34
- return param[0] + param[1] / 1000000000;
35
- }
36
-
37
- let toSecondsFloat = toSeconds;
38
-
39
- function toInt(float) {
40
- return float | 0;
41
- }
42
-
43
- function floatFromMillis(v) {
44
- return v;
45
- }
46
-
47
- function floatFromSeconds(v) {
48
- return v;
49
- }
50
-
51
- function millisBetween(from, to) {
52
- return (toMillis(to) | 0) - (toMillis(from) | 0) | 0;
53
- }
54
-
55
- function secondsBetween(from, to) {
56
- return toSeconds(to) - toSeconds(from);
57
- }
58
-
59
- function makeTimer(prim) {
60
- return process.hrtime();
61
- }
62
-
63
- function timeSince(prim) {
64
- return process.hrtime(prim);
65
- }
66
-
67
- let intFromMillis = toInt;
68
-
69
- let intFromNanos = toInt;
70
-
71
- let intFromSeconds = toInt;
72
-
73
- export {
74
- makeTimer,
75
- timeSince,
76
- nanoToMilli,
77
- secToMilli,
78
- timeElapsedToNewRef,
79
- toMillis,
80
- toSeconds,
81
- toSecondsFloat,
82
- intFromMillis,
83
- intFromNanos,
84
- intFromSeconds,
85
- floatFromMillis,
86
- floatFromSeconds,
87
- millisBetween,
88
- secondsBetween,
89
- }
90
- /* No side effect */
@@ -1,30 +0,0 @@
1
- type seconds
2
- type milliseconds
3
- type nanoseconds
4
-
5
- type timeTuple = (seconds, nanoseconds)
6
-
7
- type timeRef
8
-
9
- type timeElapsed = timeTuple
10
-
11
- let makeTimer: unit => timeRef
12
-
13
- let timeSince: timeRef => timeElapsed
14
-
15
- let nanoToMilli: nanoseconds => milliseconds
16
- let secToMilli: seconds => milliseconds
17
-
18
- let timeElapsedToNewRef: (timeElapsed, timeRef) => timeRef
19
- let toMillis: timeElapsed => milliseconds
20
- let toSeconds: timeElapsed => seconds
21
- let toSecondsFloat: timeElapsed => float
22
-
23
- let intFromMillis: milliseconds => int
24
- let intFromNanos: nanoseconds => int
25
- let intFromSeconds: seconds => int
26
- let floatFromMillis: milliseconds => float
27
- let floatFromSeconds: seconds => float
28
-
29
- let millisBetween: (~from: timeRef, ~to: timeRef) => int
30
- let secondsBetween: (~from: timeRef, ~to: timeRef) => float