@o1-labs/mina-archive-node-graphql 0.0.6 → 2.0.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.
Files changed (176) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +92 -268
  3. package/build/src/blockchain/utils.js.map +1 -1
  4. package/build/src/config.js +86 -0
  5. package/build/src/config.js.map +1 -0
  6. package/build/src/db/archive-node-adapter/archive-node-adapter.js +29 -2
  7. package/build/src/db/archive-node-adapter/archive-node-adapter.js.map +1 -1
  8. package/build/src/db/archive-node-adapter/postgres-options.js +35 -0
  9. package/build/src/db/archive-node-adapter/postgres-options.js.map +1 -0
  10. package/build/src/db/sql/best-chain.js +5 -0
  11. package/build/src/db/sql/best-chain.js.map +1 -0
  12. package/build/src/db/sql/events-actions/queries.js +102 -21
  13. package/build/src/db/sql/events-actions/queries.js.map +1 -1
  14. package/build/src/db/sql/verification-key-updates/queries.js +100 -0
  15. package/build/src/db/sql/verification-key-updates/queries.js.map +1 -0
  16. package/build/src/db/sql/zkapp-commands/queries.js +363 -0
  17. package/build/src/db/sql/zkapp-commands/queries.js.map +1 -0
  18. package/build/src/db/sql/zkapp-commands/types.js +2 -0
  19. package/build/src/db/sql/zkapp-commands/types.js.map +1 -0
  20. package/build/src/errors/error.js +4 -1
  21. package/build/src/errors/error.js.map +1 -1
  22. package/build/src/index.js +44 -7
  23. package/build/src/index.js.map +1 -1
  24. package/build/src/resolvers.js +42 -23
  25. package/build/src/resolvers.js.map +1 -1
  26. package/build/src/schema-version.js +2 -0
  27. package/build/src/schema-version.js.map +1 -0
  28. package/build/src/server/cors.js +41 -0
  29. package/build/src/server/cors.js.map +1 -0
  30. package/build/src/server/graceful-shutdown.js +42 -0
  31. package/build/src/server/graceful-shutdown.js.map +1 -0
  32. package/build/src/server/graphql-armor.js +39 -0
  33. package/build/src/server/graphql-armor.js.map +1 -0
  34. package/build/src/server/logger.js +45 -0
  35. package/build/src/server/logger.js.map +1 -0
  36. package/build/src/server/metrics.js +72 -0
  37. package/build/src/server/metrics.js.map +1 -0
  38. package/build/src/server/plugins.js +31 -15
  39. package/build/src/server/plugins.js.map +1 -1
  40. package/build/src/server/rate-limit.js +143 -0
  41. package/build/src/server/rate-limit.js.map +1 -0
  42. package/build/src/server/readiness.js +45 -0
  43. package/build/src/server/readiness.js.map +1 -0
  44. package/build/src/server/request-logging.js +58 -0
  45. package/build/src/server/request-logging.js.map +1 -0
  46. package/build/src/server/server.js +38 -13
  47. package/build/src/server/server.js.map +1 -1
  48. package/build/src/services/actions-service/actions-service.js +26 -15
  49. package/build/src/services/actions-service/actions-service.js.map +1 -1
  50. package/build/src/services/blocks-service/blocks-service.js +10 -9
  51. package/build/src/services/blocks-service/blocks-service.js.map +1 -1
  52. package/build/src/services/network-service/network-service.js +17 -9
  53. package/build/src/services/network-service/network-service.js.map +1 -1
  54. package/build/src/services/verification-key-updates-service/verification-key-updates-service.interface.js +2 -0
  55. package/build/src/services/verification-key-updates-service/verification-key-updates-service.interface.js.map +1 -0
  56. package/build/src/services/verification-key-updates-service/verification-key-updates-service.js +41 -0
  57. package/build/src/services/verification-key-updates-service/verification-key-updates-service.js.map +1 -0
  58. package/build/src/services/zkapp-commands-service/zkapp-commands-service.interface.js +2 -0
  59. package/build/src/services/zkapp-commands-service/zkapp-commands-service.interface.js.map +1 -0
  60. package/build/src/services/zkapp-commands-service/zkapp-commands-service.js +115 -0
  61. package/build/src/services/zkapp-commands-service/zkapp-commands-service.js.map +1 -0
  62. package/build/src/tracing/jaeger-tracing.js +2 -1
  63. package/build/src/tracing/jaeger-tracing.js.map +1 -1
  64. package/build/tests/devnet-dump/action-state-invariants.js +165 -0
  65. package/build/tests/devnet-dump/action-state-invariants.js.map +1 -0
  66. package/build/tests/devnet-dump/devnet-dump.test.js +24 -10
  67. package/build/tests/devnet-dump/devnet-dump.test.js.map +1 -1
  68. package/build/tests/devnet-dump/setup.js +63 -17
  69. package/build/tests/devnet-dump/setup.js.map +1 -1
  70. package/build/tests/integration/action-state-ordering.test.js +139 -0
  71. package/build/tests/integration/action-state-ordering.test.js.map +1 -0
  72. package/build/tests/integration/action-state-setup.js +48 -0
  73. package/build/tests/integration/action-state-setup.js.map +1 -0
  74. package/build/tests/integration/consensus-vs-chain.test.js +81 -0
  75. package/build/tests/integration/consensus-vs-chain.test.js.map +1 -0
  76. package/build/tests/integration/integration.test.js +166 -2
  77. package/build/tests/integration/integration.test.js.map +1 -1
  78. package/build/tests/integration/postgres-timeout.test.js +92 -0
  79. package/build/tests/integration/postgres-timeout.test.js.map +1 -0
  80. package/build/tests/integration/setup.js +58 -1
  81. package/build/tests/integration/setup.js.map +1 -1
  82. package/build/tests/integration/verification-key-setup.js +49 -0
  83. package/build/tests/integration/verification-key-setup.js.map +1 -0
  84. package/build/tests/integration/verification-key-updates.test.js +159 -0
  85. package/build/tests/integration/verification-key-updates.test.js.map +1 -0
  86. package/build/tests/live-api/events.test.js +11 -7
  87. package/build/tests/live-api/events.test.js.map +1 -1
  88. package/build/tests/live-api/networkState.test.js +1 -0
  89. package/build/tests/live-api/networkState.test.js.map +1 -1
  90. package/build/tests/live-network/live-network.test.js +1 -0
  91. package/build/tests/live-network/live-network.test.js.map +1 -1
  92. package/build/tests/resolvers.test.js +65 -37
  93. package/build/tests/resolvers.test.js.map +1 -1
  94. package/build/tests/services/verification-key-updates-service/verification-key-updates-service.test.js +35 -0
  95. package/build/tests/services/verification-key-updates-service/verification-key-updates-service.test.js.map +1 -0
  96. package/build/tests/services/zkapp-commands-service/zkapp-commands-service.test.js +159 -0
  97. package/build/tests/services/zkapp-commands-service/zkapp-commands-service.test.js.map +1 -0
  98. package/build/tests/test-helpers.js +15 -0
  99. package/build/tests/test-helpers.js.map +1 -1
  100. package/build/tests/unit/best-chain-anchor.test.js +70 -0
  101. package/build/tests/unit/best-chain-anchor.test.js.map +1 -0
  102. package/build/tests/unit/config.test.js +106 -0
  103. package/build/tests/unit/config.test.js.map +1 -0
  104. package/build/tests/unit/cors.test.js +95 -0
  105. package/build/tests/unit/cors.test.js.map +1 -0
  106. package/build/tests/unit/error-masking.test.js +119 -0
  107. package/build/tests/unit/error-masking.test.js.map +1 -0
  108. package/build/tests/unit/graceful-shutdown.test.js +99 -0
  109. package/build/tests/unit/graceful-shutdown.test.js.map +1 -0
  110. package/build/tests/unit/graphql-armor.test.js +121 -0
  111. package/build/tests/unit/graphql-armor.test.js.map +1 -0
  112. package/build/tests/unit/logging.test.js +120 -0
  113. package/build/tests/unit/logging.test.js.map +1 -0
  114. package/build/tests/unit/metrics.test.js +114 -0
  115. package/build/tests/unit/metrics.test.js.map +1 -0
  116. package/build/tests/unit/network-service.test.js +66 -0
  117. package/build/tests/unit/network-service.test.js.map +1 -0
  118. package/build/tests/unit/postgres-options.test.js +56 -0
  119. package/build/tests/unit/postgres-options.test.js.map +1 -0
  120. package/build/tests/unit/rate-limit.test.js +271 -0
  121. package/build/tests/unit/rate-limit.test.js.map +1 -0
  122. package/build/tests/unit/readiness.test.js +75 -0
  123. package/build/tests/unit/readiness.test.js.map +1 -0
  124. package/build/tests/unit/schema-nullability.test.js +40 -0
  125. package/build/tests/unit/schema-nullability.test.js.map +1 -0
  126. package/build/tests/unit/schema-version.test.js +48 -0
  127. package/build/tests/unit/schema-version.test.js.map +1 -0
  128. package/build/tests/unit/yoga-http-contract.test.js +30 -0
  129. package/build/tests/unit/yoga-http-contract.test.js.map +1 -0
  130. package/build/tests/unit/zkapp-commands-gating.test.js +38 -0
  131. package/build/tests/unit/zkapp-commands-gating.test.js.map +1 -0
  132. package/build/zkapp/utils.js +2 -0
  133. package/build/zkapp/utils.js.map +1 -1
  134. package/package.json +33 -14
  135. package/schema.graphql +126 -8
  136. package/src/blockchain/types.ts +65 -1
  137. package/src/blockchain/utils.ts +26 -2
  138. package/src/config.ts +133 -0
  139. package/src/db/archive-node-adapter/archive-node-adapter.interface.ts +26 -3
  140. package/src/db/archive-node-adapter/archive-node-adapter.ts +65 -2
  141. package/src/db/archive-node-adapter/postgres-options.ts +90 -0
  142. package/src/db/sql/best-chain.ts +34 -0
  143. package/src/db/sql/events-actions/queries.ts +168 -24
  144. package/src/db/sql/verification-key-updates/queries.ts +132 -0
  145. package/src/db/sql/zkapp-commands/queries.ts +406 -0
  146. package/src/db/sql/zkapp-commands/types.ts +43 -0
  147. package/src/envionment.d.ts +20 -0
  148. package/src/errors/error.ts +17 -1
  149. package/src/index.ts +64 -7
  150. package/src/resolvers-types.ts +311 -24
  151. package/src/resolvers.ts +70 -34
  152. package/src/schema-version.ts +24 -0
  153. package/src/server/cors.ts +97 -0
  154. package/src/server/graceful-shutdown.ts +76 -0
  155. package/src/server/graphql-armor.ts +78 -0
  156. package/src/server/logger.ts +72 -0
  157. package/src/server/metrics.ts +104 -0
  158. package/src/server/plugins.ts +53 -19
  159. package/src/server/rate-limit.ts +274 -0
  160. package/src/server/readiness.ts +78 -0
  161. package/src/server/request-logging.ts +83 -0
  162. package/src/server/server.ts +70 -15
  163. package/src/services/actions-service/actions-service.ts +87 -24
  164. package/src/services/blocks-service/blocks-service.ts +16 -14
  165. package/src/services/network-service/network-service.ts +30 -12
  166. package/src/services/verification-key-updates-service/verification-key-updates-service.interface.ts +9 -0
  167. package/src/services/verification-key-updates-service/verification-key-updates-service.ts +72 -0
  168. package/src/services/zkapp-commands-service/zkapp-commands-service.interface.ts +9 -0
  169. package/src/services/zkapp-commands-service/zkapp-commands-service.ts +181 -0
  170. package/src/tracing/jaeger-tracing.ts +2 -1
  171. package/build/tests/consensus/run-compare.js +0 -40
  172. package/build/tests/consensus/run-compare.js.map +0 -1
  173. package/build/tests/consensus/select-consensus-precomputed.js +0 -80
  174. package/build/tests/consensus/select-consensus-precomputed.js.map +0 -1
  175. package/build/tests/consensus/types.js +0 -15
  176. package/build/tests/consensus/types.js.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Support. While redistributing the Work or
166
+ Derivative Works thereof, You may choose to offer, and charge a
167
+ fee for, acceptance of support, warranty, indemnity, or other
168
+ liability obligations and/or rights consistent with this License.
169
+ However, in accepting such obligations, You may act only on Your
170
+ own behalf and on Your sole responsibility, not on behalf of any
171
+ other Contributor, and only if You agree to indemnify, defend,
172
+ and hold each Contributor harmless for any liability incurred by,
173
+ or claims asserted against, such Contributor by reason of your
174
+ accepting any such warranty or support.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Mina Foundation
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
200
+ implied. See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,28 +1,25 @@
1
- # Archive Node Events GraphQL Server
1
+ # Mina Archive Node GraphQL API
2
2
 
3
3
  [![Unit Tests](https://github.com/o1-labs/Archive-Node-API/actions/workflows/unit-tests.yaml/badge.svg)](https://github.com/o1-labs/Archive-Node-API/actions/workflows/unit-tests.yaml)
4
4
  [![codecov](https://codecov.io/gh/o1-labs/Archive-Node-API/branch/main/graph/badge.svg)](https://codecov.io/gh/o1-labs/Archive-Node-API)
5
+ [![npm](https://img.shields.io/npm/v/@o1-labs/mina-archive-node-graphql.svg)](https://www.npmjs.com/package/@o1-labs/mina-archive-node-graphql)
6
+ [![ghcr.io](https://img.shields.io/badge/ghcr.io-archive--node--api-2496ED?logo=docker&logoColor=white)](https://github.com/o1-labs/Archive-Node-API/pkgs/container/archive-node-api)
5
7
 
6
- This GraphQL server is built to expose information from [Mina's Archive Node](https://docs.minaprotocol.com/node-operators/archive-node).
8
+ **Client SDKs** —
9
+ [![TypeScript](https://img.shields.io/npm/v/%40o1-labs%2Fmina-archive-sdk?label=TypeScript&logo=npm)](https://www.npmjs.com/package/@o1-labs/mina-archive-sdk)
10
+ [![Rust](https://img.shields.io/crates/v/mina-archive-sdk.svg?label=Rust&logo=rust)](https://crates.io/crates/mina-archive-sdk)
11
+ [![Go](https://img.shields.io/github/v/tag/o1-labs/mina-archive-sdk-go?label=Go&sort=semver&logo=go)](https://pkg.go.dev/github.com/o1-labs/mina-archive-sdk-go)
7
12
 
8
- ## Description
9
-
10
- The server aims to expose zkApp related information to be used by developers and o1js. Users can query for events and actions related to their zkApp. In addition, users can filter for specific events and actions by public key, tokenId, to/from block ranges, and chain status.
11
-
12
- An example query for events and actions looks like this:
13
+ A GraphQL server that exposes [Mina archive-node](https://docs.minaprotocol.com/node-operators/archive-node) data — blocks, events, actions, transactions — for o1js / zkApp developers. It does **not** run an archive node itself; it queries an existing archive-node Postgres database.
13
14
 
14
15
  ```graphql
15
- query getEvents {
16
+ query {
16
17
  events(input: { address: "B62..." }) {
17
18
  blockInfo {
19
+ height
18
20
  stateHash
19
21
  timestamp
20
- ledgerHash
21
- height
22
- parentHash
23
22
  chainStatus
24
- distanceFromMaxBlockHeight
25
- globalSlotSinceGenesis
26
23
  }
27
24
  eventData {
28
25
  data
@@ -34,288 +31,115 @@ query getEvents {
34
31
  }
35
32
  }
36
33
  }
37
-
38
- query getActions {
39
- actions(input: { address: "B62..." }) {
40
- blockInfo {
41
- stateHash
42
- timestamp
43
- ledgerHash
44
- height
45
- parentHash
46
- chainStatus
47
- distanceFromMaxBlockHeight
48
- globalSlotSinceGenesis
49
- }
50
- actionState {
51
- actionStateOne
52
- actionStateTwo
53
- actionStateThree
54
- actionStateFour
55
- actionStateFive
56
- }
57
- actionData {
58
- data
59
- transactionInfo {
60
- status
61
- hash
62
- memo
63
- }
64
- }
65
- }
66
- }
67
- ```
68
-
69
- To see the data exposed, see the [GraphQL schema](./schema.graphql).
70
-
71
- The server lets operators connect to an existing Archive Node Postgres database and provides application monitoring with [Jaeger](https://github.com/jaegertracing/jaeger).
72
-
73
- Finally, the server provides a set of environment variables to configure runtime options such as database connections, CORS origin, logging behaviour, etc.
74
-
75
- ## Connecting to a Postgres database
76
-
77
- The server will use the `PG_CONN` environment variable to establish a connection to a running Archive Node. Note that `PG_CONN` is a connection string, so the expected format looks like `'postgres://postgres:password@localhost:5432/archive'`
78
-
79
- The server additionally supports multi-host connections for high availability if you are running multiple Archive Nodes. For example, numerous connection strings can be passed to `PG_CONN` as `'postgres://localhost:5432,localhost:5433'`. This works the same as the native `psql` command. Read more at [multiple host URIs](https://www.postgresql.org/docs/13/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS).
80
-
81
- Connections will be attempted in order of the specified hosts/ports. On a successful connection, all retries will be reset. This ensures that hosts can come up and down seamlessly.
82
-
83
- ## Connecting to a Jaeger server for logging
84
-
85
- To run an instance of Jaeger locally, see the [init_jaeger script](./scripts/init_jaeger.sh). By running the script, a local instance of Jaeger will be instantiated with Docker with default environment variables. If you run it as is, you can access the Jaeger dashboard by visiting `http://localhost:16686`.
86
-
87
- To enable logging to Jaeger, set the following environment variables:
88
-
89
- ```sh
90
- ENABLE_JAEGER="true"
91
- JAEGER_SERVICE_NAME="archive-api"
92
- JAEGER_ENDPOINT='http://localhost:14268/api/traces'
93
- ```
94
-
95
- `ENABLE_JAEGER`: Tells the server to allow Jaeger logging. If Jaeger logging is not enabled, all logs will be printed to stdout.
96
-
97
- `JAEGER_ENDPOINT`: The specified URL for the running Jaeger service.
98
-
99
- `JAEGER_SERVICE_NAME`: Specifies the service name to be used by Jaeger. The service name will be what identifies the service in the Jaeger logs.
100
-
101
- Also, note that Jaeger supports distributed logging. This means that if you're running multiple instances of this server, you can specify the same Jaeger endpoint. All your logs will be consolidated in one place for simplified logging across all your server instances.
102
-
103
- ## Environment Variables
104
-
105
- This section aims to describe all the environment variables exposed to configure runtime behaviour:
106
-
107
- - `APP_COMMAND`: The command to run the server. A sensible default is `npm run start`.
108
-
109
- - `PG_CONN`: The connection string used to connect to either a single or multiple Archive Nodes.
110
-
111
- - `ENABLE_INTROSPECTION`: Enable or disable [GraphQL introspection](https://graphql.org/learn/introspection/). GraphQL introspection is a feature of GraphQL that allows clients to inspect the capabilities of a GraphQL server. It enables clients to discover the types, fields, and other metadata available on the server and query it using this information.
112
-
113
- - `ENABLE_GRAPHIQL`: GraphiQL is an in-browser tool for working with GraphQL APIs. It provides a user-friendly interface for constructing and executing GraphQL queries, making it easier for developers to test and debug their GraphQL applications. GraphiQL is an excellent tool for development and testing, but it should be considered disabled in a production environment for security-related reasons.
114
-
115
- - `ENABLE_LOGGING`: Enables logging to either Jaeger or to stdout. If `ENABLE_JAEGER` is not defined, but `ENABLE_LOGGING` is, all logs will be directed to stdout. If `ENABLE_JAEGER` is specified, all logs will be directed to the Jaeger server. Logging is done using [OpenTelemetry](https://opentelemetry.io/docs/reference/specification/overview/)
116
-
117
- - `ENABLE_JAEGER`: Enable or disable logging to a Jaeger server. If not enabled, all logging is done through stdout.
118
-
119
- - `JAEGER_ENDPOINT`: A URL that specifies a running Jaeger instance to send logs to. If the `./scripts/init_jaeger.sh` was run to instantiate a local instance of Jaeger, the endpoint will be `http://localhost:14268/api/traces`.
120
-
121
- - `JAEGER_SERVICE_NAME`: The name used to specify your service within Jaeger. This name will be used to identify your specific running server.
122
-
123
- - `PORT`: The port to be used when running the server. By default, it will use port `8080`.
124
-
125
- - `LOG_LEVEL`: Specifies the level of logs to emit from GraphQL Yoga. [See documentation here](https://the-guild.dev/graphql/yoga-server/docs/features/logging-and-debugging) for more details.
126
-
127
- - `CORS_ORIGIN`: Specify the CORS origin if you wish to run this server behind a proxy. By default, the server will return `Access-Control-Allow-Origin: *`.
128
-
129
- To see an example of sensible defaults, see the [env.example](./.env.example) configuration file.
130
-
131
- ## Installing from npm
132
-
133
- This package is published to npm and is available for public access
134
-
135
- ```sh
136
- npm install mina-archive-node-graphql
137
- ```
138
-
139
- ## Installing from artifact registry
140
-
141
- This package is published to a Google Cloud Artifact Registry and is available for public access.
142
-
143
- **Configure npm to use the registry:**
144
-
145
- ```sh
146
- npm config set registry https://europe-southwest1-npm.pkg.dev/o1labs-192920/euro-npm/
147
- ```
148
-
149
- **Install the package:**
150
-
151
- ```sh
152
- # Install the latest stable version
153
- npm install archive-node-graphql
154
-
155
- # Or install a specific version
156
- npm install archive-node-graphql@1.2.3
157
-
158
- # Or install the latest dev version
159
- npm install archive-node-graphql@dev
160
- ```
161
-
162
- ## Creating a Release
163
-
164
- To create a new release, follow these steps:
165
-
166
- 1. **Update version in package.json**: `npm version <major|minor|patch>`
167
- 2. **Commit the version change**: `git commit -am "Release v1.2.3"`
168
- 3. **Create and push a tag**: `git tag v1.2.3 && git push origin v1.2.3`
169
-
170
- The CI/CD workflow will automatically:
171
-
172
- - Build and publish npm package to GCP registry with version from package.json
173
- - Build and push Docker image to both GCP Artifact Registry and GitHub Container Registry
174
- - Create semantic version tags (e.g., `1.2.3`, `1.2`, `1`, `latest`)
175
-
176
- **Published artifacts:**
177
-
178
- - npm: `https://europe-southwest1-npm.pkg.dev/o1labs-192920/euro-npm/`
179
- - Docker (GCP): `europe-west3-docker.pkg.dev/o1labs-192920/euro-docker-repo/archive-node-api`
180
- - Docker (GitHub): `ghcr.io/o1-labs/archive-node-api`
181
-
182
- ## Starting the server
183
-
184
- To start the server, run
185
-
186
- ```sh
187
- npm run build
188
- npm run start
189
34
  ```
190
35
 
191
- or in development mode, run
36
+ The full surface lives in [`schema.graphql`](./schema.graphql).
192
37
 
193
- ```sh
194
- npm run dev
195
- ```
196
-
197
- This will start the server and allow you to interact with the GraphQL API specified with the port defined in your `.env` file or port `8080` by deafult. e.g. `http://localhost:3000`.
198
-
199
- In production, we recommend running this with a process control system [pm2](https://pm2.keymetrics.io/) or [Supervisor](http://supervisord.org/). In addition to using these tools, you could utilize the provided [Dockerfile](./Dockerfile) to build and run a container.
38
+ ## Quick start
200
39
 
201
- ## Running tests
40
+ Pick the path that matches your situation. Each one is fully covered in [`docs/getting-started.md`](./docs/getting-started.md).
202
41
 
203
- To run the tests, you will need a running instance of [Lightnet](https://docs.minaprotocol.com/zkapps/testing-zkapps-lightnet). Lightnet will start a running Postgres instance with a local Mina network and will populate the database with zkApp related data. To run the tests, you will have to run a zkApp script to emit events and actions to the database. To do this, ensure you have Lightnet [running on your local machine](https://docs.minaprotocol.com/zkapps/testing-zkapps-lightnet#start-a-single-node-network) and then run the following commands:
42
+ | Path | When to use it |
43
+ | ------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- |
44
+ | **[npm](./docs/getting-started.md#path-a--npm-bring-your-own-database)** | You already have an archive-node Postgres reachable. Lightest weight. |
45
+ | **[Prebuilt Docker image](./docs/getting-started.md#path-b--prebuilt-docker-image-bring-your-own-database)** | You have a Postgres reachable but don't want a Node toolchain locally. |
46
+ | **[Docker Compose + DB snapshot](./docs/getting-started.md#path-c--docker-compose-with-database-snapshot)** | No archive-node DB available — Compose stands one up from a snapshot. |
204
47
 
205
48
  ```sh
206
- node --loader ts-node/esm benchmark/setup.ts
207
- ```
208
-
209
- This will run a script that will deploy a zkApp and emit events and actions to the database. Once the script is finished, you can run the tests with the following command:
49
+ # the 30-second taste (Path A)
50
+ npm install -g @o1-labs/mina-archive-node-graphql
51
+ PG_CONN='postgres://postgres:postgres@localhost:5432/archive' \
52
+ ENABLE_GRAPHIQL=true \
53
+ mina-archive-node-graphql
54
+ # → http://localhost:8080
55
+ ```
56
+
57
+ ## Configuration
58
+
59
+ `PG_CONN` is the only required environment variable. The most common knobs:
60
+
61
+ | Variable | Default | Description |
62
+ | ---------------------- | ------------ | -------------------------------------------------- |
63
+ | `PG_CONN` | _(required)_ | Postgres connection string for the archive-node DB |
64
+ | `PORT` | `8080` | Port the GraphQL server listens on |
65
+ | `ENABLE_GRAPHIQL` | `false` | Serve the GraphiQL playground at `/` |
66
+ | `ENABLE_INTROSPECTION` | `false` | Allow GraphQL schema introspection |
67
+ | `ENABLE_LOGGING` | `false` | Emit OpenTelemetry traces |
68
+ | `ENABLE_METRICS` | `false` | Expose Prometheus metrics at `/metrics` |
69
+ | `ENABLED_QUERIES` | _(all)_ | Comma-separated subset of root query fields |
70
+ | `BLOCK_RANGE_SIZE` | `10000` | Max block range a single query may span |
71
+ | `ENABLE_ZKAPP_COMMANDS_QUERY` | `false` | Expose the `zkappCommands` range query |
72
+ | `ZKAPP_COMMAND_RANGE_SIZE` | `1000` | Max block range for `zkappCommands` |
73
+ | `ZKAPP_COMMAND_ACCOUNT_UPDATE_LIMIT` | `5000` | Max expanded account updates for one `zkappCommands` query |
74
+ | `ENABLE_JAEGER` | `false` | Emit traces to a Jaeger collector |
75
+ | `JAEGER_ENDPOINT` | — | e.g. `http://localhost:14268/api/traces` |
76
+
77
+ Full reference, including HA / multi-host `PG_CONN` syntax, in [`docs/getting-started.md#configuration`](./docs/getting-started.md#configuration).
78
+
79
+ ## Development
80
+
81
+ | Command | What it does |
82
+ | ------------------- | ---------------------------------------------------------------------------------------------------------- |
83
+ | `npm run dev` | Run the server with hot reload (reads `.env`) |
84
+ | `npm run build` | Compile TypeScript to `build/` |
85
+ | `npm run start` | Run the compiled server |
86
+ | `npm run lint` | ESLint over `*.ts` |
87
+ | `npm run test:unit` | Unit tests (no DB required) |
88
+ | `npm run test` | Full test suite — needs a running [Lightnet](https://docs.minaprotocol.com/zkapps/testing-zkapps-lightnet) |
89
+ | `npm run codegen` | Regenerate `src/resolvers-types.ts` from `schema.graphql` |
90
+ | `npm run benchmark` | Artillery load test against a running server |
91
+
92
+ Running the full suite requires Lightnet plus a populated DB:
210
93
 
211
94
  ```sh
95
+ node --loader ts-node/esm benchmark/setup.ts # deploys a zkApp and emits events/actions
212
96
  npm run test
213
97
  ```
214
98
 
215
- ## Benchmarking
99
+ ## Releasing
216
100
 
217
- To run a benchmark on the Typescript GraphQL server, you will need to have a running Lightnet instance to connect to. See the [Running tests](#running-tests) section if you still need to run the setup.
101
+ Tagged commits trigger CI to publish:
218
102
 
219
- You will also need to run the server to run the benchmarks. For example, to run the server in development mode, run the following command:
103
+ - npm (public): [`@o1-labs/mina-archive-node-graphql`](https://www.npmjs.com/package/@o1-labs/mina-archive-node-graphql)
104
+ - Docker (GHCR): `ghcr.io/o1-labs/archive-node-api`
220
105
 
221
- ```sh
222
- npm run dev
223
- ```
224
-
225
- Once the server is up and running, you can run the benchmarking script by using the following command:
226
-
227
- ```sh
228
- npm run benchmark
229
- ```
230
-
231
- This script will run the config defined in `benchmarking/graphql.yaml` and output a report in the benchmarking folder. The report will contain summarized metrics of the performance testing run against the server.
232
-
233
- It is important to note that the benchmarking script requires the server to run to collect performance metrics. The report generated will provide valuable insights into the server's performance and help identify any potential bottlenecks or areas for improvement. Please note that running the benchmark may consume significant resources and should be done cautiously. Ensure that the server runs in a stable environment before running the benchmarking script.
106
+ A release PR bumps `package.json`, then a maintainer tags its merge commit. Do
107
+ not run `npm version` on `main`: `package.json` already carries the version
108
+ being released. Steps and the npm trusted-publishing caveat are in the
109
+ [versioning & schema stability policy](./docs/versioning.md#releasing).
234
110
 
235
- ## Hardware Requirements
111
+ CI builds, publishes the npm package with provenance once npm trusted
112
+ publishing is configured, and pushes Docker tags `1.2.3`, `1.2`, `1`,
113
+ `latest`.
236
114
 
237
- Running the Archive Node API requires a hardware configuration that can handle the load placed on the server by user requests, with the primary load being on the database. This API is written to be resource efficient; the main bottleneck is expected to be on the database performance, not the Archive Node API process.
115
+ From 1.0.0 the GraphQL schema, HTTP endpoints, and configuration are a versioned public contract — see the [versioning & schema stability policy](./docs/versioning.md) for what counts as a breaking change and how deprecations work.
238
116
 
239
- ### Increased Load on the Database
117
+ ## Compatibility
240
118
 
241
- To mitigate the load on the database, it is recommended to use the multi-host connection to utilize multiple Archive Node databases. By supplying additional read-only databases for the API to connect to, queries will be spread evenly across all databases, which will help with response time. Additionally, the use of more powerful hardware on existing Archive Node databases should be considered.
119
+ Clients can ask the server which GraphQL contract it serves with the
120
+ `schemaVersion` query. For the schema version rules and the Mina releases this
121
+ server is known to work with, see
122
+ [docs/versioning.md](docs/versioning.md#schema-version).
242
123
 
243
- To get a real sense of what hardware requirements are needed, you can utilize the [benchmarking suite](#benchmarking) to see how many requests can be handled.
124
+ ## Hardware requirements
244
125
 
245
- For example, a benchmark report is shown below and was run with an Archive Node API and Postgres database container running on the same machine with a 12-core processor & 32GB of RAM.
126
+ The bottleneck is the Postgres database, not this server. A recent benchmark on a 12-core / 32 GB box (API + Postgres co-located) sustained ~800 req/s with p99 latency of 39 ms. Use `npm run benchmark` to size your own deployment.
246
127
 
247
- ```
248
- --------------------------------------
249
- Metrics for period to: 19:05:30(-0800) (width: 9.999s)
250
- --------------------------------------
251
-
252
- http.codes.200: ................................................................ 7908
253
- http.request_rate: ............................................................. 794/sec
254
- http.requests: ................................................................. 7915
255
- http.response_time:
256
- min: ......................................................................... 1
257
- max: ......................................................................... 54
258
- median: ...................................................................... 15
259
- p95: ......................................................................... 30.9
260
- p99: ......................................................................... 39.3
261
- http.responses: ................................................................ 7908
262
- vusers.completed: .............................................................. 7907
263
- vusers.created: ................................................................ 7916
264
- vusers.created_by_name.Get Actions: ............................................ 3885
265
- vusers.created_by_name.Get Events: ............................................. 4031
266
- vusers.failed: ................................................................. 0
267
- vusers.session_length:
268
- min: ......................................................................... 2.4
269
- max: ......................................................................... 55.5
270
- median: ...................................................................... 16
271
- p95: ......................................................................... 32.1
272
- p99: ......................................................................... 40
273
- ```
128
+ Listing multiple hosts in `PG_CONN` (`postgres://host1:5432,host2:5432/archive`) buys **redundancy, not read throughput**: the client connects to the first host and only moves to the next one when that connection fails, so it fails over rather than spreading queries across replicas. To actually scale reads, load-balance in front of Postgres (PgBouncer, HAProxy, or a managed reader endpoint) and point `PG_CONN` at that.
274
129
 
275
- ## Setting Up Local Development Environment Using zkApp-CLI Lightnet
130
+ For SLOs, capacity guidance, what to monitor, and incident response, see the [operations runbook](./docs/runbook.md).
276
131
 
277
- To set up a local development environment, you can use the [zkApp-CLI Lightnet](https://docs.minaprotocol.com/zkapps/testing-zkapps-lightnet). This tool allows you to run a local Mina network with zkApps enabled. The zkApp-CLI Lightnet will also start a running Postgres instance with a local Mina network and will populate the database with zkApp related data. Once you have the zkApp-CLI Lightnet running, you can run the server and interact with the GraphQL API.
132
+ ## Deployment
278
133
 
279
- To see how to set up the zkApp-CLI Lightnet, see the [zkApp-CLI Lightnet documentation](https://docs.minaprotocol.com/zkapps/testing-zkapps-lightnet#start-a-local-network).
134
+ Reference Kubernetes and production Docker Compose manifests — with liveness/readiness probes, resource limits, autoscaling, and a hardened pod security context — live in [`deploy/`](./deploy/). Read [`docs/security.md`](./docs/security.md) for the deployment contract (TLS gateway, read-only DB role, private Postgres).
280
135
 
281
- If you wish to populate the database with zkApp related data, you can run the following commands:
136
+ The API is a public, read-only service and is meant to run **behind a TLS-terminating gateway**, against a **read-only** Postgres role. Before exposing it publicly, read [`docs/security.md`](./docs/security.md) — it covers the security model, network architecture, the built-in abuse protections, and a deployment checklist.
282
137
 
283
- ```sh
284
- node --loader ts-node/esm benchmark/setup.ts
285
- ```
138
+ ## Contributing
286
139
 
287
- This will run a script that will deploy a zkApp and emit events and actions to the database. Once the script is finished, you can run the server with the following command:
288
-
289
- ```sh
290
- npm run dev
291
- ```
140
+ - AI coding agents: read [`AGENTS.md`](./AGENTS.md) first.
141
+ - Issues and PRs: [github.com/o1-labs/Archive-Node-API](https://github.com/o1-labs/Archive-Node-API)
292
142
 
293
- To ensure you have the correct environment variables set up, you can see a copy of the `.env.example.lightnet` file.
294
-
295
- Generally, it is recommended that you use Lightnet as your local development environment, as it will provide you with a running Mina network and a Postgres instance with zkApp related data.
296
-
297
- ## Setting Up Local Development Environment Using Docker Compose
298
-
299
- The provided `docker-compose.yml` file simplifies the process of setting up a local development environment. This file orchestrates the creation of a Docker network comprising of Mina daemon, Archive Node, GraphQL server, and Jaeger. Follow the steps below to get everything up and running:
300
-
301
- **Step 1: Libp2p Keypair Generation**
302
-
303
- You will need a libp2p keypair for the setup. If you don't already have one, you can easily generate a keypair specifically for local development (note: this should not be used in production). Use the script provided in the repository:
304
-
305
- ```bash
306
- ./scripts/generate_libp2p.sh
307
- ```
308
-
309
- **Step 2: Update Environment Variables**
310
-
311
- Once you have generated the keypair, make sure to update your `.env` file with the passwords that were used during the keypair generation process.
312
-
313
- **Step 3: Launch the Docker Network**
314
-
315
- With the prerequisites in place, start the Docker network by running the following command in your terminal:
316
-
317
- ```bash
318
- docker compose up
319
- ```
143
+ ## License
320
144
 
321
- This command pulls the necessary Docker images and launches them, setting up a local environment ideal for server development. This setup offers a way to connec to a live running Mina network, specified by it's seed peers and Mina daemon build. Use this setup to test the server's functionality and performance against a live running network.
145
+ [Apache-2.0](./LICENSE) — the same license as [`MinaProtocol/mina`](https://github.com/MinaProtocol/mina), [`o1js`](https://github.com/o1-labs/o1js) and the archive SDKs.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/blockchain/utils.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,eAAe,CAAC,GAA2B;IACzD,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;QAC1B,SAAS,EAAE,GAAG,CAAC,UAAU;QACzB,UAAU,EAAE,GAAG,CAAC,WAAW;QAC3B,UAAU,EAAE,GAAG,CAAC,WAAW;QAC3B,WAAW,EAAE,GAAG,CAAC,YAAY;QAC7B,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,uBAAuB,EAAE,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC;QAChE,sBAAsB,EAAE,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC;QAC7D,0BAA0B,EAAE,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC;QACtE,aAAa,EAAE,GAAG,CAAC,eAAe;KACnC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,GAA2B;IAE3B,OAAO;QACL,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,iBAAiB,EAAE,GAAG,CAAC,kBAAkB;QACzC,cAAc,EAAE,GAAG,CAAC,eAAe;QACnC,qBAAqB,EAAE,GAAG,CAAC,yBAAyB;KACrD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,eAAuB,EACvB,IAAc,EACd,eAAgC;IAEhC,OAAO;QACL,eAAe;QACf,IAAI;QACJ,eAAe;KAChB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,eAAuB,EACvB,IAAc,EACd,eAAgC;IAEhC,OAAO;QACL,eAAe;QACf,IAAI;QACJ,eAAe;KAChB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/blockchain/utils.ts"],"names":[],"mappings":"AA2BA,MAAM,UAAU,eAAe,CAAC,GAAiB;IAC/C,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;QAC1B,SAAS,EAAE,GAAG,CAAC,UAAU;QACzB,UAAU,EAAE,GAAG,CAAC,WAAW;QAC3B,UAAU,EAAE,GAAG,CAAC,WAAW;QAC3B,WAAW,EAAE,GAAG,CAAC,YAAY;QAC7B,SAAS,EAAE,GAAG,CAAC,SAAS;QACxB,uBAAuB,EAAE,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC;QAChE,sBAAsB,EAAE,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC;QAC7D,0BAA0B,EAAE,MAAM,CAAC,GAAG,CAAC,8BAA8B,CAAC;QACtE,aAAa,EAAE,GAAG,CAAC,eAAe;KACnC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,GAAuB;IAEvB,OAAO;QACL,MAAM,EAAE,GAAG,CAAC,MAAM;QAClB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,iBAAiB,EAAE,GAAG,CAAC,kBAAkB;QACzC,cAAc,EAAE,GAAG,CAAC,eAAe;QACnC,qBAAqB,EAAE,GAAG,CAAC,yBAAyB;KACrD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,eAAuB,EACvB,IAAc,EACd,eAAgC;IAEhC,OAAO;QACL,eAAe;QACf,IAAI;QACJ,eAAe;KAChB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAC1B,eAAuB,EACvB,IAAc,EACd,eAAgC;IAEhC,OAAO;QACL,eAAe;QACf,IAAI;QACJ,eAAe;KAChB,CAAC;AACJ,CAAC"}