envio 3.0.0-alpha.1 → 3.0.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 (71) hide show
  1. package/evm.schema.json +63 -48
  2. package/fuel.schema.json +35 -31
  3. package/index.d.ts +1 -0
  4. package/package.json +15 -11
  5. package/rescript.json +1 -1
  6. package/src/Batch.res.mjs +1 -1
  7. package/src/Benchmark.res +394 -0
  8. package/src/Benchmark.res.mjs +398 -0
  9. package/src/ChainFetcher.res +459 -0
  10. package/src/ChainFetcher.res.mjs +281 -0
  11. package/src/ChainManager.res +179 -0
  12. package/src/ChainManager.res.mjs +139 -0
  13. package/src/Config.res +18 -7
  14. package/src/Config.res.mjs +28 -7
  15. package/src/Ecosystem.res +25 -0
  16. package/src/Ecosystem.res.mjs +29 -0
  17. package/src/Env.res +243 -0
  18. package/src/Env.res.mjs +270 -0
  19. package/src/Envio.gen.ts +9 -1
  20. package/src/Envio.res +12 -9
  21. package/src/EventProcessing.res +476 -0
  22. package/src/EventProcessing.res.mjs +341 -0
  23. package/src/EventRegister.res +4 -15
  24. package/src/EventRegister.res.mjs +3 -9
  25. package/src/EventRegister.resi +2 -8
  26. package/src/FetchState.res +54 -29
  27. package/src/FetchState.res.mjs +62 -35
  28. package/src/GlobalState.res +1169 -0
  29. package/src/GlobalState.res.mjs +1196 -0
  30. package/src/Internal.gen.ts +3 -14
  31. package/src/Internal.res +4 -12
  32. package/src/LoadLayer.res +444 -0
  33. package/src/LoadLayer.res.mjs +296 -0
  34. package/src/LoadLayer.resi +32 -0
  35. package/src/Prometheus.res +8 -8
  36. package/src/Prometheus.res.mjs +10 -10
  37. package/src/ReorgDetection.res +6 -10
  38. package/src/ReorgDetection.res.mjs +6 -6
  39. package/src/UserContext.res +356 -0
  40. package/src/UserContext.res.mjs +238 -0
  41. package/src/bindings/DateFns.res +71 -0
  42. package/src/bindings/DateFns.res.mjs +22 -0
  43. package/src/bindings/EventSource.res +13 -0
  44. package/src/bindings/EventSource.res.mjs +2 -0
  45. package/src/sources/Evm.res +87 -0
  46. package/src/sources/Evm.res.mjs +105 -0
  47. package/src/sources/EvmChain.res +95 -0
  48. package/src/sources/EvmChain.res.mjs +61 -0
  49. package/src/sources/Fuel.res +19 -34
  50. package/src/sources/Fuel.res.mjs +34 -16
  51. package/src/sources/FuelSDK.res +37 -0
  52. package/src/sources/FuelSDK.res.mjs +29 -0
  53. package/src/sources/HyperFuel.res +2 -2
  54. package/src/sources/HyperFuel.resi +1 -1
  55. package/src/sources/HyperFuelClient.res +2 -2
  56. package/src/sources/HyperFuelSource.res +8 -8
  57. package/src/sources/HyperFuelSource.res.mjs +5 -5
  58. package/src/sources/HyperSyncHeightStream.res +179 -0
  59. package/src/sources/HyperSyncHeightStream.res.mjs +127 -0
  60. package/src/sources/HyperSyncSource.res +7 -65
  61. package/src/sources/HyperSyncSource.res.mjs +10 -66
  62. package/src/sources/RpcSource.res +4 -4
  63. package/src/sources/RpcSource.res.mjs +3 -3
  64. package/src/sources/Solana.res +59 -0
  65. package/src/sources/Solana.res.mjs +79 -0
  66. package/src/sources/Source.res +2 -2
  67. package/src/sources/SourceManager.res +24 -32
  68. package/src/sources/SourceManager.res.mjs +20 -20
  69. package/src/sources/SourceManager.resi +4 -5
  70. package/src/Platform.res +0 -140
  71. package/src/Platform.res.mjs +0 -170
@@ -1,170 +0,0 @@
1
- // Generated by ReScript, PLEASE EDIT WITH CARE
2
-
3
-
4
- var cleanUpRawEventFieldsInPlace = (fields => {
5
- delete fields.hash
6
- delete fields.number
7
- delete fields.timestamp
8
- });
9
-
10
- var Evm = {
11
- cleanUpRawEventFieldsInPlace: cleanUpRawEventFieldsInPlace
12
- };
13
-
14
- var evm_blockFields = [
15
- "number",
16
- "timestamp",
17
- "hash",
18
- "parentHash",
19
- "nonce",
20
- "sha3Uncles",
21
- "logsBloom",
22
- "transactionsRoot",
23
- "stateRoot",
24
- "receiptsRoot",
25
- "miner",
26
- "difficulty",
27
- "totalDifficulty",
28
- "extraData",
29
- "size",
30
- "gasLimit",
31
- "gasUsed",
32
- "uncles",
33
- "baseFeePerGas",
34
- "blobGasUsed",
35
- "excessBlobGas",
36
- "parentBeaconBlockRoot",
37
- "withdrawalsRoot",
38
- "l1BlockNumber",
39
- "sendCount",
40
- "sendRoot",
41
- "mixHash"
42
- ];
43
-
44
- var evm_transactionFields = [
45
- "transactionIndex",
46
- "hash",
47
- "from",
48
- "to",
49
- "gas",
50
- "gasPrice",
51
- "maxPriorityFeePerGas",
52
- "maxFeePerGas",
53
- "cumulativeGasUsed",
54
- "effectiveGasPrice",
55
- "gasUsed",
56
- "input",
57
- "nonce",
58
- "value",
59
- "v",
60
- "r",
61
- "s",
62
- "contractAddress",
63
- "logsBloom",
64
- "root",
65
- "status",
66
- "yParity",
67
- "chainId",
68
- "maxFeePerBlobGas",
69
- "blobVersionedHashes",
70
- "type",
71
- "l1Fee",
72
- "l1GasPrice",
73
- "l1GasUsed",
74
- "l1FeeScalar",
75
- "gasUsedForL1",
76
- "accessList",
77
- "authorizationList"
78
- ];
79
-
80
- function evm_getNumber(prim) {
81
- return prim.number;
82
- }
83
-
84
- function evm_getTimestamp(prim) {
85
- return prim.timestamp;
86
- }
87
-
88
- function evm_getId(prim) {
89
- return prim.hash;
90
- }
91
-
92
- var evm = {
93
- name: "evm",
94
- blockFields: evm_blockFields,
95
- transactionFields: evm_transactionFields,
96
- blockNumberName: "number",
97
- blockTimestampName: "timestamp",
98
- blockHashName: "hash",
99
- getNumber: evm_getNumber,
100
- getTimestamp: evm_getTimestamp,
101
- getId: evm_getId,
102
- cleanUpRawEventFieldsInPlace: cleanUpRawEventFieldsInPlace
103
- };
104
-
105
- var cleanUpRawEventFieldsInPlace$1 = (fields => {
106
- delete fields.id
107
- delete fields.height
108
- delete fields.time
109
- });
110
-
111
- var Fuel = {
112
- cleanUpRawEventFieldsInPlace: cleanUpRawEventFieldsInPlace$1
113
- };
114
-
115
- var fuel_blockFields = [
116
- "id",
117
- "height",
118
- "time"
119
- ];
120
-
121
- var fuel_transactionFields = ["id"];
122
-
123
- function fuel_getNumber(prim) {
124
- return prim.height;
125
- }
126
-
127
- function fuel_getTimestamp(prim) {
128
- return prim.time;
129
- }
130
-
131
- function fuel_getId(prim) {
132
- return prim.id;
133
- }
134
-
135
- var fuel = {
136
- name: "fuel",
137
- blockFields: fuel_blockFields,
138
- transactionFields: fuel_transactionFields,
139
- blockNumberName: "height",
140
- blockTimestampName: "time",
141
- blockHashName: "id",
142
- getNumber: fuel_getNumber,
143
- getTimestamp: fuel_getTimestamp,
144
- getId: fuel_getId,
145
- cleanUpRawEventFieldsInPlace: cleanUpRawEventFieldsInPlace$1
146
- };
147
-
148
- function fromName(name) {
149
- if (name === "evm") {
150
- return evm;
151
- } else {
152
- return fuel;
153
- }
154
- }
155
-
156
- function makeBlockEvent(blockNumber, platform) {
157
- var blockEvent = {};
158
- blockEvent[platform.blockNumberName] = blockNumber;
159
- return blockEvent;
160
- }
161
-
162
- export {
163
- Evm ,
164
- evm ,
165
- Fuel ,
166
- fuel ,
167
- fromName ,
168
- makeBlockEvent ,
169
- }
170
- /* No side effect */