midnight-mcp 0.1.40 → 0.2.1

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 (100) hide show
  1. package/README.md +34 -0
  2. package/dist/bin.d.ts +1 -0
  3. package/dist/bin.js +10764 -0
  4. package/dist/index.d.ts +205 -3
  5. package/dist/index.js +10722 -15
  6. package/package.json +16 -6
  7. package/dist/config/compact-version.d.ts +0 -183
  8. package/dist/config/compact-version.js +0 -423
  9. package/dist/db/index.d.ts +0 -3
  10. package/dist/db/index.js +0 -2
  11. package/dist/db/vectorStore.d.ts +0 -69
  12. package/dist/db/vectorStore.js +0 -196
  13. package/dist/pipeline/embeddings.d.ts +0 -25
  14. package/dist/pipeline/embeddings.js +0 -103
  15. package/dist/pipeline/github.d.ts +0 -84
  16. package/dist/pipeline/github.js +0 -399
  17. package/dist/pipeline/index.d.ts +0 -11
  18. package/dist/pipeline/index.js +0 -6
  19. package/dist/pipeline/indexer.d.ts +0 -41
  20. package/dist/pipeline/indexer.js +0 -254
  21. package/dist/pipeline/parser.d.ts +0 -46
  22. package/dist/pipeline/parser.js +0 -436
  23. package/dist/pipeline/releases.d.ts +0 -112
  24. package/dist/pipeline/releases.js +0 -298
  25. package/dist/pipeline/repository.d.ts +0 -372
  26. package/dist/pipeline/repository.js +0 -520
  27. package/dist/prompts/index.d.ts +0 -3
  28. package/dist/prompts/index.js +0 -2
  29. package/dist/prompts/templates.d.ts +0 -26
  30. package/dist/prompts/templates.js +0 -443
  31. package/dist/resources/code.d.ts +0 -15
  32. package/dist/resources/code.js +0 -122
  33. package/dist/resources/content/code-content.d.ts +0 -6
  34. package/dist/resources/content/code-content.js +0 -802
  35. package/dist/resources/content/docs-content.d.ts +0 -14
  36. package/dist/resources/content/docs-content.js +0 -1202
  37. package/dist/resources/content/index.d.ts +0 -6
  38. package/dist/resources/content/index.js +0 -6
  39. package/dist/resources/docs.d.ts +0 -15
  40. package/dist/resources/docs.js +0 -98
  41. package/dist/resources/index.d.ts +0 -6
  42. package/dist/resources/index.js +0 -13
  43. package/dist/resources/schemas.d.ts +0 -16
  44. package/dist/resources/schemas.js +0 -407
  45. package/dist/scripts/index-repos.d.ts +0 -12
  46. package/dist/scripts/index-repos.js +0 -53
  47. package/dist/server.d.ts +0 -43
  48. package/dist/server.js +0 -693
  49. package/dist/services/index.d.ts +0 -6
  50. package/dist/services/index.js +0 -6
  51. package/dist/services/sampling.d.ts +0 -62
  52. package/dist/services/sampling.js +0 -277
  53. package/dist/tools/analyze.d.ts +0 -106
  54. package/dist/tools/analyze.js +0 -431
  55. package/dist/tools/generation.d.ts +0 -9
  56. package/dist/tools/generation.js +0 -285
  57. package/dist/tools/health.d.ts +0 -120
  58. package/dist/tools/health.js +0 -362
  59. package/dist/tools/index.d.ts +0 -14
  60. package/dist/tools/index.js +0 -22
  61. package/dist/tools/meta.d.ts +0 -61
  62. package/dist/tools/meta.js +0 -282
  63. package/dist/tools/repository/constants.d.ts +0 -19
  64. package/dist/tools/repository/constants.js +0 -324
  65. package/dist/tools/repository/handlers.d.ts +0 -373
  66. package/dist/tools/repository/handlers.js +0 -724
  67. package/dist/tools/repository/index.d.ts +0 -9
  68. package/dist/tools/repository/index.js +0 -13
  69. package/dist/tools/repository/schemas.d.ts +0 -153
  70. package/dist/tools/repository/schemas.js +0 -106
  71. package/dist/tools/repository/tools.d.ts +0 -7
  72. package/dist/tools/repository/tools.js +0 -484
  73. package/dist/tools/repository/validation.d.ts +0 -106
  74. package/dist/tools/repository/validation.js +0 -820
  75. package/dist/tools/repository.d.ts +0 -6
  76. package/dist/tools/repository.js +0 -7
  77. package/dist/tools/search.d.ts +0 -76
  78. package/dist/tools/search.js +0 -423
  79. package/dist/types/index.d.ts +0 -2
  80. package/dist/types/index.js +0 -2
  81. package/dist/types/mcp.d.ts +0 -187
  82. package/dist/types/mcp.js +0 -6
  83. package/dist/utils/cache.d.ts +0 -77
  84. package/dist/utils/cache.js +0 -172
  85. package/dist/utils/config.d.ts +0 -70
  86. package/dist/utils/config.js +0 -294
  87. package/dist/utils/errors.d.ts +0 -111
  88. package/dist/utils/errors.js +0 -165
  89. package/dist/utils/health.d.ts +0 -29
  90. package/dist/utils/health.js +0 -132
  91. package/dist/utils/hosted-api.d.ts +0 -67
  92. package/dist/utils/hosted-api.js +0 -119
  93. package/dist/utils/index.d.ts +0 -16
  94. package/dist/utils/index.js +0 -15
  95. package/dist/utils/logger.d.ts +0 -48
  96. package/dist/utils/logger.js +0 -124
  97. package/dist/utils/rate-limit.d.ts +0 -61
  98. package/dist/utils/rate-limit.js +0 -148
  99. package/dist/utils/validation.d.ts +0 -52
  100. package/dist/utils/validation.js +0 -255
@@ -1,282 +0,0 @@
1
- /**
2
- * Meta-tools for progressive disclosure and tool discovery
3
- * These tools help AI agents efficiently discover and use available capabilities
4
- */
5
- // Import all tool arrays to build the index
6
- import { searchTools } from "./search.js";
7
- import { analyzeTools } from "./analyze.js";
8
- import { repositoryTools } from "./repository.js";
9
- import { healthTools } from "./health.js";
10
- import { generationTools } from "./generation.js";
11
- // ============================================================================
12
- // Tool Category Descriptions
13
- // ============================================================================
14
- const CATEGORY_INFO = {
15
- search: {
16
- description: "Semantic search across Midnight codebase - find code by meaning, not keywords",
17
- useCases: [
18
- "Find example implementations",
19
- "Search for patterns",
20
- "Discover relevant code",
21
- ],
22
- },
23
- analyze: {
24
- description: "Static analysis of Compact contracts - security, structure, patterns",
25
- useCases: [
26
- "Security audit",
27
- "Code review",
28
- "Understand contract structure",
29
- ],
30
- },
31
- repository: {
32
- description: "Access repository files, examples, and recent updates",
33
- useCases: [
34
- "Get specific files",
35
- "List examples",
36
- "Track repository changes",
37
- ],
38
- },
39
- versioning: {
40
- description: "Version management, breaking changes, and migration assistance",
41
- useCases: [
42
- "Check for updates",
43
- "Plan upgrades",
44
- "Compare versions",
45
- "Get migration guides",
46
- ],
47
- },
48
- generation: {
49
- description: "AI-powered code generation, review, and documentation (requires sampling)",
50
- useCases: ["Generate contracts", "Review code", "Generate documentation"],
51
- },
52
- health: {
53
- description: "Server health checks and status monitoring",
54
- useCases: ["Check API status", "Monitor rate limits", "Debug connectivity"],
55
- },
56
- compound: {
57
- description: "Multi-step operations in a single call - saves tokens and reduces latency",
58
- useCases: [
59
- "Full upgrade analysis",
60
- "Get complete repo context",
61
- "One-shot operations",
62
- ],
63
- },
64
- };
65
- const listCategoriesOutputSchema = {
66
- type: "object",
67
- properties: {
68
- categories: {
69
- type: "array",
70
- description: "Available tool categories",
71
- items: {
72
- type: "object",
73
- properties: {
74
- name: { type: "string", description: "Category identifier" },
75
- description: {
76
- type: "string",
77
- description: "What the category does",
78
- },
79
- toolCount: { type: "number", description: "Number of tools" },
80
- useCases: {
81
- type: "array",
82
- description: "When to use this category",
83
- items: { type: "string" },
84
- },
85
- },
86
- },
87
- },
88
- totalTools: { type: "number", description: "Total tool count" },
89
- recommendation: {
90
- type: "string",
91
- description: "Suggested starting point",
92
- },
93
- },
94
- required: ["categories", "totalTools"],
95
- description: "Tool categories for progressive discovery",
96
- };
97
- const listCategoryToolsOutputSchema = {
98
- type: "object",
99
- properties: {
100
- category: { type: "string", description: "Category name" },
101
- tools: {
102
- type: "array",
103
- description: "Tools in this category",
104
- items: {
105
- type: "object",
106
- properties: {
107
- name: { type: "string", description: "Tool name" },
108
- description: { type: "string", description: "What the tool does" },
109
- title: { type: "string", description: "Human-readable title" },
110
- isCompound: {
111
- type: "boolean",
112
- description: "Whether this is a compound tool",
113
- },
114
- requiresSampling: {
115
- type: "boolean",
116
- description: "Requires client sampling capability",
117
- },
118
- },
119
- },
120
- },
121
- suggestion: { type: "string", description: "Usage suggestion" },
122
- },
123
- required: ["category", "tools"],
124
- description: "Tools within a specific category",
125
- };
126
- // ============================================================================
127
- // Handler Functions
128
- // ============================================================================
129
- // Build tool index by category
130
- function getToolsByCategory() {
131
- const allTools = [
132
- ...searchTools,
133
- ...analyzeTools,
134
- ...repositoryTools,
135
- ...healthTools,
136
- ...generationTools,
137
- ...metaTools,
138
- ];
139
- const byCategory = new Map();
140
- for (const tool of allTools) {
141
- const category = tool.annotations?.category || "repository";
142
- if (!byCategory.has(category)) {
143
- byCategory.set(category, []);
144
- }
145
- byCategory.get(category).push(tool);
146
- }
147
- return byCategory;
148
- }
149
- /**
150
- * List available tool categories
151
- * Use this first to understand what's available before drilling into specific tools
152
- */
153
- export async function listToolCategories(_input) {
154
- const toolsByCategory = getToolsByCategory();
155
- const categories = Object.entries(CATEGORY_INFO).map(([name, info]) => ({
156
- name,
157
- description: info.description,
158
- toolCount: toolsByCategory.get(name)?.length || 0,
159
- useCases: info.useCases,
160
- }));
161
- // Filter out empty categories
162
- const nonEmptyCategories = categories.filter((c) => c.toolCount > 0);
163
- const totalTools = nonEmptyCategories.reduce((sum, c) => sum + c.toolCount, 0);
164
- return {
165
- categories: nonEmptyCategories,
166
- totalTools,
167
- recommendation: "Start with 'compound' category for efficient multi-step operations, or 'search' to find relevant code.",
168
- tip: "Use midnight-list-category-tools to see tools within a specific category.",
169
- };
170
- }
171
- /**
172
- * List tools within a specific category
173
- * Progressive disclosure: drill into a category to see its tools
174
- */
175
- export async function listCategoryTools(input) {
176
- const toolsByCategory = getToolsByCategory();
177
- const tools = toolsByCategory.get(input.category) || [];
178
- if (tools.length === 0) {
179
- return {
180
- error: `Unknown or empty category: ${input.category}`,
181
- availableCategories: Object.keys(CATEGORY_INFO),
182
- suggestion: "Use midnight-list-tool-categories to see available categories.",
183
- };
184
- }
185
- const categoryInfo = CATEGORY_INFO[input.category];
186
- return {
187
- category: input.category,
188
- description: categoryInfo.description,
189
- tools: tools.map((t) => ({
190
- name: t.name,
191
- description: t.description.split("\n")[0], // First line only
192
- title: t.annotations?.title || t.name,
193
- isCompound: t.annotations?.category === "compound",
194
- requiresSampling: t.annotations?.longRunningHint &&
195
- t.annotations?.category === "generation",
196
- ...(input.includeSchemas && {
197
- inputSchema: t.inputSchema,
198
- outputSchema: t.outputSchema,
199
- }),
200
- })),
201
- suggestion: generateCategorySuggestion(input.category),
202
- };
203
- }
204
- function generateCategorySuggestion(category) {
205
- switch (category) {
206
- case "compound":
207
- return "🚀 Compound tools save 50-70% tokens. Use midnight-upgrade-check or midnight-get-repo-context for efficient operations.";
208
- case "search":
209
- return "💡 Search tools use semantic matching - describe what you want in natural language.";
210
- case "generation":
211
- return "⚠️ Generation tools require sampling capability. They use the client's LLM for AI-powered operations.";
212
- case "versioning":
213
- return "📦 For version checks, prefer midnight-upgrade-check (compound) over individual version tools.";
214
- case "analyze":
215
- return "🔍 Analyze tools work on Compact code. Provide the contract source code directly.";
216
- default:
217
- return `Use these tools for ${CATEGORY_INFO[category]?.useCases[0] || "related operations"}.`;
218
- }
219
- }
220
- // ============================================================================
221
- // Tool Definitions
222
- // ============================================================================
223
- export const metaTools = [
224
- {
225
- name: "midnight-list-tool-categories",
226
- description: "📋 DISCOVERY TOOL: List available tool categories for progressive exploration. Use this FIRST to understand what capabilities are available, then drill into specific categories with midnight-list-category-tools. Reduces cognitive load by organizing 25 tools into 7 logical groups.",
227
- inputSchema: {
228
- type: "object",
229
- properties: {
230
- includeToolCounts: {
231
- type: "boolean",
232
- description: "Include number of tools per category (default: true)",
233
- },
234
- },
235
- required: [],
236
- },
237
- outputSchema: listCategoriesOutputSchema,
238
- annotations: {
239
- readOnlyHint: true,
240
- idempotentHint: true,
241
- title: "📋 List Tool Categories",
242
- category: "health",
243
- },
244
- handler: listToolCategories,
245
- },
246
- {
247
- name: "midnight-list-category-tools",
248
- description: "📋 DISCOVERY TOOL: List tools within a specific category. Use after midnight-list-tool-categories to see detailed tool information for a category of interest. Supports progressive disclosure pattern.",
249
- inputSchema: {
250
- type: "object",
251
- properties: {
252
- category: {
253
- type: "string",
254
- enum: [
255
- "search",
256
- "analyze",
257
- "repository",
258
- "versioning",
259
- "generation",
260
- "health",
261
- "compound",
262
- ],
263
- description: "Category to list tools for",
264
- },
265
- includeSchemas: {
266
- type: "boolean",
267
- description: "Include input/output schemas (default: false)",
268
- },
269
- },
270
- required: ["category"],
271
- },
272
- outputSchema: listCategoryToolsOutputSchema,
273
- annotations: {
274
- readOnlyHint: true,
275
- idempotentHint: true,
276
- title: "📋 List Category Tools",
277
- category: "health",
278
- },
279
- handler: listCategoryTools,
280
- },
281
- ];
282
- //# sourceMappingURL=meta.js.map
@@ -1,19 +0,0 @@
1
- /**
2
- * Repository constants
3
- * Aliases, example definitions, and configuration data
4
- */
5
- export declare const REPO_ALIASES: Record<string, {
6
- owner: string;
7
- repo: string;
8
- }>;
9
- export interface ExampleDefinition {
10
- name: string;
11
- repository: string;
12
- description: string;
13
- category: string;
14
- complexity: "beginner" | "intermediate" | "advanced";
15
- mainFile: string;
16
- features: string[];
17
- }
18
- export declare const EXAMPLES: ExampleDefinition[];
19
- //# sourceMappingURL=constants.d.ts.map
@@ -1,324 +0,0 @@
1
- /**
2
- * Repository constants
3
- * Aliases, example definitions, and configuration data
4
- */
5
- // Repository name mapping
6
- export const REPO_ALIASES = {
7
- // Core Language & SDK
8
- compact: { owner: "midnightntwrk", repo: "compact" },
9
- "midnight-js": { owner: "midnightntwrk", repo: "midnight-js" },
10
- js: { owner: "midnightntwrk", repo: "midnight-js" },
11
- sdk: { owner: "midnightntwrk", repo: "midnight-js" },
12
- // Documentation
13
- docs: { owner: "midnightntwrk", repo: "midnight-docs" },
14
- "midnight-docs": { owner: "midnightntwrk", repo: "midnight-docs" },
15
- // Example DApps
16
- "example-counter": { owner: "midnightntwrk", repo: "example-counter" },
17
- counter: { owner: "midnightntwrk", repo: "example-counter" },
18
- "example-bboard": { owner: "midnightntwrk", repo: "example-bboard" },
19
- bboard: { owner: "midnightntwrk", repo: "example-bboard" },
20
- "example-dex": { owner: "midnightntwrk", repo: "example-dex" },
21
- dex: { owner: "midnightntwrk", repo: "example-dex" },
22
- // Developer Tools
23
- "create-mn-app": { owner: "midnightntwrk", repo: "create-mn-app" },
24
- "midnight-wallet": { owner: "midnightntwrk", repo: "midnight-wallet" },
25
- wallet: { owner: "midnightntwrk", repo: "midnight-wallet" },
26
- // Infrastructure
27
- "midnight-indexer": { owner: "midnightntwrk", repo: "midnight-indexer" },
28
- indexer: { owner: "midnightntwrk", repo: "midnight-indexer" },
29
- "midnight-node-docker": {
30
- owner: "midnightntwrk",
31
- repo: "midnight-node-docker",
32
- },
33
- node: { owner: "midnightntwrk", repo: "midnight-node-docker" },
34
- // APIs & Connectors
35
- "midnight-dapp-connector-api": {
36
- owner: "midnightntwrk",
37
- repo: "midnight-dapp-connector-api",
38
- },
39
- connector: { owner: "midnightntwrk", repo: "midnight-dapp-connector-api" },
40
- // Tooling
41
- "compact-tree-sitter": {
42
- owner: "midnightntwrk",
43
- repo: "compact-tree-sitter",
44
- },
45
- "tree-sitter": { owner: "midnightntwrk", repo: "compact-tree-sitter" },
46
- "setup-compact-action": {
47
- owner: "midnightntwrk",
48
- repo: "setup-compact-action",
49
- },
50
- "setup-compact": { owner: "midnightntwrk", repo: "setup-compact-action" },
51
- "compact-action": { owner: "midnightntwrk", repo: "setup-compact-action" },
52
- // Community
53
- "midnight-awesome-dapps": {
54
- owner: "midnightntwrk",
55
- repo: "midnight-awesome-dapps",
56
- },
57
- awesome: { owner: "midnightntwrk", repo: "midnight-awesome-dapps" },
58
- "contributor-hub": { owner: "midnightntwrk", repo: "contributor-hub" },
59
- // Partner Libraries (OpenZeppelin)
60
- "compact-contracts": { owner: "OpenZeppelin", repo: "compact-contracts" },
61
- openzeppelin: { owner: "OpenZeppelin", repo: "compact-contracts" },
62
- oz: { owner: "OpenZeppelin", repo: "compact-contracts" },
63
- "midnight-apps": { owner: "OpenZeppelin", repo: "midnight-apps" },
64
- lunarswap: { owner: "OpenZeppelin", repo: "midnight-apps" },
65
- // Official Partners (from awesome-dapps)
66
- "midnight-seabattle": { owner: "bricktowers", repo: "midnight-seabattle" },
67
- seabattle: { owner: "bricktowers", repo: "midnight-seabattle" },
68
- battleship: { owner: "bricktowers", repo: "midnight-seabattle" },
69
- "midnight-identity": { owner: "bricktowers", repo: "midnight-identity" },
70
- identity: { owner: "bricktowers", repo: "midnight-identity" },
71
- "midnight-rwa": { owner: "bricktowers", repo: "midnight-rwa" },
72
- rwa: { owner: "bricktowers", repo: "midnight-rwa" },
73
- "midnight-starter-template": {
74
- owner: "MeshJS",
75
- repo: "midnight-starter-template",
76
- },
77
- meshjs: { owner: "MeshJS", repo: "midnight-starter-template" },
78
- starter: { owner: "MeshJS", repo: "midnight-starter-template" },
79
- midnames: { owner: "midnames", repo: "core" },
80
- did: { owner: "midnames", repo: "core" },
81
- // Sea Battle Hackathon Winners (Feb 2025)
82
- "naval-battle": { owner: "ErickRomeroDev", repo: "naval-battle-game_v2" },
83
- "edda-labs": { owner: "ErickRomeroDev", repo: "naval-battle-game_v2" },
84
- "sea-battle-hackathon": {
85
- owner: "eddex",
86
- repo: "midnight-sea-battle-hackathon",
87
- },
88
- shipyspace: { owner: "eddex", repo: "midnight-sea-battle-hackathon" },
89
- // Core Partner - PaimaStudios (Gaming Infrastructure)
90
- "midnight-game-2": { owner: "PaimaStudios", repo: "midnight-game-2" },
91
- "paima-game": { owner: "PaimaStudios", repo: "midnight-game-2" },
92
- "dust-to-dust": { owner: "PaimaStudios", repo: "midnight-game-2" },
93
- "midnight-wasm-prover": {
94
- owner: "PaimaStudios",
95
- repo: "midnight-wasm-prover",
96
- },
97
- "wasm-prover": { owner: "PaimaStudios", repo: "midnight-wasm-prover" },
98
- "midnight-batcher": { owner: "PaimaStudios", repo: "midnight-batcher" },
99
- batcher: { owner: "PaimaStudios", repo: "midnight-batcher" },
100
- "midnight-impact-rps": {
101
- owner: "PaimaStudios",
102
- repo: "midnight-impact-rps-example",
103
- },
104
- "impact-rps": { owner: "PaimaStudios", repo: "midnight-impact-rps-example" },
105
- "vm-bindings": { owner: "PaimaStudios", repo: "midnight-impact-rps-example" },
106
- // Mini DApp Hackathon Winners (Sep 2025)
107
- statera: { owner: "statera-protocol", repo: "statera-protocol-midnight" },
108
- "statera-protocol": {
109
- owner: "statera-protocol",
110
- repo: "statera-protocol-midnight",
111
- },
112
- lucentlabs: { owner: "statera-protocol", repo: "statera-protocol-midnight" },
113
- stablecoin: { owner: "statera-protocol", repo: "statera-protocol-midnight" },
114
- "midnight-bank": { owner: "nel349", repo: "midnight-bank" },
115
- bank: { owner: "nel349", repo: "midnight-bank" },
116
- zkbadge: { owner: "Imdavyking", repo: "zkbadge" },
117
- badge: { owner: "Imdavyking", repo: "zkbadge" },
118
- davyking: { owner: "Imdavyking", repo: "zkbadge" },
119
- };
120
- export const EXAMPLES = [
121
- {
122
- name: "Counter",
123
- repository: "midnightntwrk/example-counter",
124
- description: "Simple counter contract demonstrating basic Compact concepts. Perfect for learning ledger state, circuits, and witnesses.",
125
- category: "counter",
126
- complexity: "beginner",
127
- mainFile: "contract/src/counter.compact",
128
- features: [
129
- "Ledger state management",
130
- "Basic circuit definition",
131
- "Counter increment/decrement",
132
- "TypeScript integration",
133
- ],
134
- },
135
- {
136
- name: "Bulletin Board",
137
- repository: "midnightntwrk/example-bboard",
138
- description: "Full DApp example with CLI and React UI. Demonstrates posting messages with privacy features.",
139
- category: "bboard",
140
- complexity: "intermediate",
141
- mainFile: "contract/src/bboard.compact",
142
- features: [
143
- "Private messaging",
144
- "React frontend",
145
- "CLI interface",
146
- "Wallet integration",
147
- "Disclose operations",
148
- ],
149
- },
150
- {
151
- name: "DEX (Decentralized Exchange)",
152
- repository: "midnightntwrk/example-dex",
153
- description: "Advanced DApp example showing token swaps and liquidity pools with privacy-preserving transactions.",
154
- category: "dex",
155
- complexity: "advanced",
156
- mainFile: "contract/src/dex.compact",
157
- features: [
158
- "Token swaps",
159
- "Liquidity pools",
160
- "Privacy-preserving trades",
161
- "Price calculations",
162
- "Advanced state management",
163
- ],
164
- },
165
- // Sea Battle Hackathon Winners (Feb 2025)
166
- {
167
- name: "Sea Battle (Brick Towers)",
168
- repository: "bricktowers/midnight-seabattle",
169
- description: "1st place hackathon winner. Fully playable battleship game with token staking (100 shielded tBTC). Features ZK-protected ship placements and moves.",
170
- category: "game",
171
- complexity: "advanced",
172
- mainFile: "contract/src/seabattle.compact",
173
- features: [
174
- "ZK game mechanics",
175
- "Shielded token staking",
176
- "Turn-based gameplay",
177
- "Private state management",
178
- "Lace wallet integration",
179
- ],
180
- },
181
- {
182
- name: "Naval Battle (Edda Labs)",
183
- repository: "ErickRomeroDev/naval-battle-game_v2",
184
- description: "2nd place hackathon winner. Clean implementation with 4 ZK circuits: join game, commit grid, start game, make move. Modern drag-and-drop UI.",
185
- category: "game",
186
- complexity: "intermediate",
187
- mainFile: "contract/src/naval.compact",
188
- features: [
189
- "4 ZK circuits",
190
- "Drag-and-drop UI",
191
- "Real-time updates",
192
- "Clean circuit design",
193
- "Open-source docs",
194
- ],
195
- },
196
- {
197
- name: "Sea Battle (ShipySpace)",
198
- repository: "eddex/midnight-sea-battle-hackathon",
199
- description: "3rd place hackathon winner. Great beginner-friendly example showing core game mechanics without centralized server. Good first ZK project reference.",
200
- category: "game",
201
- complexity: "beginner",
202
- mainFile: "contract/src/game.compact",
203
- features: [
204
- "No centralized server",
205
- "Deploy/join/resume games",
206
- "Basic ZK patterns",
207
- "Beginner friendly",
208
- "Clear player interactions",
209
- ],
210
- },
211
- // Mini DApp Hackathon Winners (Sep 2025)
212
- {
213
- name: "Statera Protocol (LucentLabs)",
214
- repository: "statera-protocol/statera-protocol-midnight",
215
- description: "1st place Mini DApp winner. Private overcollateralized stablecoin with shielded liquidations. Institutional-grade DeFi with KYC compliance and full transaction privacy.",
216
- category: "defi",
217
- complexity: "advanced",
218
- mainFile: "contract/src/statera.compact",
219
- features: [
220
- "Shielded stablecoin",
221
- "Automated liquidations",
222
- "Off-chain KYC",
223
- "Private minting/staking",
224
- "Institutional DeFi",
225
- ],
226
- },
227
- {
228
- name: "Midnight Bank",
229
- repository: "nel349/midnight-bank",
230
- description: "2nd place Mini DApp winner. Private banking DApp demonstrating prove/hide/compute/reveal patterns. Shared accounts with PIN, multi-party authorization, and selective disclosure.",
231
- category: "defi",
232
- complexity: "intermediate",
233
- mainFile: "contract/src/bank.compact",
234
- features: [
235
- "Encrypted balances",
236
- "PIN-protected accounts",
237
- "Multi-party auth",
238
- "Selective disclosure",
239
- "Private transfers",
240
- ],
241
- },
242
- {
243
- name: "zkBadge (Davyking)",
244
- repository: "Imdavyking/zkbadge",
245
- description: "3rd place Mini DApp winner. Privacy-preserving identity and access control. Issue verifiable credentials (e.g., age proof) without revealing personal data. Only 'verified' status stored on-chain.",
246
- category: "identity",
247
- complexity: "intermediate",
248
- mainFile: "contract/src/zkbadge.compact",
249
- features: [
250
- "ZK credentials",
251
- "Off-chain verification",
252
- "On-chain badges",
253
- "Access control",
254
- "Reputation system",
255
- ],
256
- },
257
- // Core Partner - PaimaStudios (Gaming Infrastructure)
258
- {
259
- name: "Midnight Game 2 (PaimaStudios)",
260
- repository: "PaimaStudios/midnight-game-2",
261
- description: "Full production game from core Midnight partner. Complete Phaser frontend, CLI admin tools, and batcher integration. Demonstrates advanced game mechanics with battles, quests, spirits, and upgrades using ZK proofs.",
262
- category: "game",
263
- complexity: "advanced",
264
- mainFile: "contract/src/template.compact",
265
- features: [
266
- "Phaser game frontend",
267
- "Batcher mode (no wallet needed)",
268
- "Admin CLI tools",
269
- "Battle system circuits",
270
- "Quest mechanics",
271
- "Spirit upgrades",
272
- "Code generation for circuits",
273
- ],
274
- },
275
- {
276
- name: "WASM Prover (PaimaStudios)",
277
- repository: "PaimaStudios/midnight-wasm-prover",
278
- description: "Browser-based WASM ZK prover for Midnight transactions. Enables client-side proving without external services. Essential infrastructure for decentralized DApps.",
279
- category: "infrastructure",
280
- complexity: "advanced",
281
- mainFile: "src/lib.rs",
282
- features: [
283
- "Browser-based proving",
284
- "Multi-threaded WASM",
285
- "WebWorker integration",
286
- "KZG trusted setup handling",
287
- "No server dependency",
288
- "Webpack demo included",
289
- ],
290
- },
291
- {
292
- name: "Midnight Batcher (PaimaStudios)",
293
- repository: "PaimaStudios/midnight-batcher",
294
- description: "Transaction batching service for Midnight. Enables wallet-less DApp interactions by handling transaction fees and submission. Production-ready Rust implementation.",
295
- category: "infrastructure",
296
- complexity: "advanced",
297
- mainFile: "src/main.rs",
298
- features: [
299
- "Wallet-less transactions",
300
- "Fee sponsorship",
301
- "Contract whitelisting",
302
- "Pre-proving service",
303
- "WebSocket indexer sync",
304
- "Local chain setup scripts",
305
- ],
306
- },
307
- {
308
- name: "Impact VM RPS Example (PaimaStudios)",
309
- repository: "PaimaStudios/midnight-impact-rps-example",
310
- description: "Low-level Impact VM programming example. Shows how to write Midnight contracts without Compact, directly using Impact opcodes and zkir. Rock-Paper-Scissors with commitment schemes.",
311
- category: "infrastructure",
312
- complexity: "advanced",
313
- mainFile: "lib/src/lib.rs",
314
- features: [
315
- "Impact VM direct programming",
316
- "Bypass Compact compiler",
317
- "zkir circuit building",
318
- "Commitment schemes",
319
- "TypeScript WASM bindings",
320
- "Full RPS game logic",
321
- ],
322
- },
323
- ];
324
- //# sourceMappingURL=constants.js.map