|
1 | | -import { parse } from 'node:url'; |
2 | | -import { Identity, Inboxes, Messages, SpaceEvents, Utils } from '@graphprotocol/hypergraph'; |
3 | | -import { GEOGENESIS, GEO_TESTNET } from '@graphprotocol/hypergraph/connect/smart-account'; |
| 1 | +import { Connect, Identity, Inboxes, Messages, SpaceEvents, Utils } from '@graphprotocol/hypergraph'; |
4 | 2 | import { bytesToHex, randomBytes } from '@noble/hashes/utils.js'; |
5 | 3 | import cors from 'cors'; |
6 | 4 | import { Effect, Exit, Schema } from 'effect'; |
7 | 5 | import express, { type Request, type Response } from 'express'; |
| 6 | +import { parse } from 'node:url'; |
8 | 7 | import WebSocket, { WebSocketServer } from 'ws'; |
9 | 8 | import { addAppIdentityToSpaces } from './handlers/add-app-identity-to-spaces.js'; |
10 | 9 | import { applySpaceEvent } from './handlers/applySpaceEvent.js'; |
@@ -43,7 +42,7 @@ const decodeRequestMessage = Schema.decodeUnknownEither(Messages.RequestMessage) |
43 | 42 | const webSocketServer = new WebSocketServer({ noServer: true }); |
44 | 43 | const PORT = process.env.PORT !== undefined ? Number.parseInt(process.env.PORT) : 3030; |
45 | 44 | const app = express(); |
46 | | -const CHAIN = process.env.HYPERGRAPH_CHAIN === 'geogenesis' ? GEOGENESIS : GEO_TESTNET; |
| 45 | +const CHAIN = process.env.HYPERGRAPH_CHAIN === 'geogenesis' ? Connect.GEOGENESIS : Connect.GEO_TESTNET; |
47 | 46 | const RPC_URL = process.env.HYPERGRAPH_RPC_URL ?? CHAIN.rpcUrls.default.http[0]; |
48 | 47 |
|
49 | 48 | type AuthenticatedRequest = Request & { accountAddress?: string }; |
|
0 commit comments