diff --git a/apps/connect/src/routes/authenticate.tsx b/apps/connect/src/routes/authenticate.tsx index 72637568..62a6b86e 100644 --- a/apps/connect/src/routes/authenticate.tsx +++ b/apps/connect/src/routes/authenticate.tsx @@ -4,7 +4,6 @@ import { Loading } from '@/components/ui/Loading'; import { usePrivateSpaces } from '@/hooks/use-private-spaces'; import { usePublicSpaces } from '@/hooks/use-public-spaces'; import { Connect, Identity, Key, type Messages, StoreConnect, Utils } from '@graphprotocol/hypergraph'; -import { GEOGENESIS, GEO_TESTNET, getSmartAccountWalletClient } from '@graphprotocol/hypergraph/connect/smart-account'; import { useIdentityToken, usePrivy, useWallets } from '@privy-io/react-auth'; import { createFileRoute } from '@tanstack/react-router'; import { createStore } from '@xstate/store'; @@ -14,7 +13,7 @@ import { TriangleAlert } from 'lucide-react'; import { useEffect } from 'react'; import { createWalletClient, custom } from 'viem'; -const CHAIN = import.meta.env.VITE_HYPERGRAPH_CHAIN === 'geogenesis' ? GEOGENESIS : GEO_TESTNET; +const CHAIN = import.meta.env.VITE_HYPERGRAPH_CHAIN === 'geogenesis' ? Connect.GEOGENESIS : Connect.GEO_TESTNET; type AuthenticateSearch = { data: unknown; @@ -396,7 +395,7 @@ function AuthenticateComponent() { }, ); console.log('smart session created'); - const smartAccountClient = await getSmartAccountWalletClient({ + const smartAccountClient = await Connect.getSmartAccountWalletClient({ owner: walletClient, address: accountAddress, chain: CHAIN, diff --git a/apps/connect/src/routes/login.lazy.tsx b/apps/connect/src/routes/login.lazy.tsx index dd46b9db..c66fcbc0 100644 --- a/apps/connect/src/routes/login.lazy.tsx +++ b/apps/connect/src/routes/login.lazy.tsx @@ -1,13 +1,12 @@ import GeoLogo from '@/assets/images/geo-logo-branded.svg?react'; import { AppTitle } from '@/components/ui/AppTitle'; import { Connect, type Identity } from '@graphprotocol/hypergraph'; -import { GEOGENESIS, GEO_TESTNET } from '@graphprotocol/hypergraph/connect/smart-account'; import { type ConnectedWallet, useIdentityToken, usePrivy, useWallets } from '@privy-io/react-auth'; import { createLazyFileRoute, useRouter } from '@tanstack/react-router'; import { useCallback, useEffect, useState } from 'react'; import { type WalletClient, createWalletClient, custom } from 'viem'; -const CHAIN = import.meta.env.VITE_HYPERGRAPH_CHAIN === 'geogenesis' ? GEOGENESIS : GEO_TESTNET; +const CHAIN = import.meta.env.VITE_HYPERGRAPH_CHAIN === 'geogenesis' ? Connect.GEOGENESIS : Connect.GEO_TESTNET; const syncServerUri = import.meta.env.VITE_HYPERGRAPH_SYNC_SERVER_ORIGIN; const storage = localStorage; diff --git a/apps/server/src/index.ts b/apps/server/src/index.ts index 27c2d231..d5adb7b2 100755 --- a/apps/server/src/index.ts +++ b/apps/server/src/index.ts @@ -1,6 +1,5 @@ import { parse } from 'node:url'; -import { Identity, Inboxes, Messages, SpaceEvents, Utils } from '@graphprotocol/hypergraph'; -import { GEOGENESIS, GEO_TESTNET } from '@graphprotocol/hypergraph/connect/smart-account'; +import { Connect, Identity, Inboxes, Messages, SpaceEvents, Utils } from '@graphprotocol/hypergraph'; import { bytesToHex, randomBytes } from '@noble/hashes/utils.js'; import cors from 'cors'; import { Effect, Exit, Schema } from 'effect'; @@ -43,7 +42,7 @@ const decodeRequestMessage = Schema.decodeUnknownEither(Messages.RequestMessage) const webSocketServer = new WebSocketServer({ noServer: true }); const PORT = process.env.PORT !== undefined ? Number.parseInt(process.env.PORT) : 3030; const app = express(); -const CHAIN = process.env.HYPERGRAPH_CHAIN === 'geogenesis' ? GEOGENESIS : GEO_TESTNET; +const CHAIN = process.env.HYPERGRAPH_CHAIN === 'geogenesis' ? Connect.GEOGENESIS : Connect.GEO_TESTNET; const RPC_URL = process.env.HYPERGRAPH_RPC_URL ?? CHAIN.rpcUrls.default.http[0]; type AuthenticatedRequest = Request & { accountAddress?: string };