Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"clsx": "^2.1.1",
"effect": "^3.10.19",
"ethers": "^6.13.3",
"graph-framework": "workspace:*",
"@graphprotocol/graph-framework": "workspace:*",
"lucide-react": "^0.441.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
3 changes: 2 additions & 1 deletion apps/events/src/components/debug-invitations.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Invitation } from 'graph-framework';
import type { Invitation } from '@graphprotocol/graph-framework';

import { Button } from './ui/button';

type Props = {
Expand Down
2 changes: 1 addition & 1 deletion apps/events/src/components/debug-space-events.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SpaceEvent } from 'graph-framework';
import type { SpaceEvent } from '@graphprotocol/graph-framework';

export function DebugSpaceEvents({ events }: { events: SpaceEvent[] }) {
return (
Expand Down
2 changes: 1 addition & 1 deletion apps/events/src/components/debug-space-state.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SpaceState } from 'graph-framework';
import type { SpaceState } from '@graphprotocol/graph-framework';

export function DebugSpaceState(props: { state: SpaceState | undefined }) {
return (
Expand Down
6 changes: 4 additions & 2 deletions apps/events/src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Button } from '@/components/ui/button';
import { createFileRoute, useNavigate } from '@tanstack/react-router';
import { repo } from 'graph-framework';

import { repo } from '@graphprotocol/graph-framework';

import { Button } from '@/components/ui/button';

export const Route = createFileRoute('/')({
component: Index,
Expand Down
18 changes: 10 additions & 8 deletions apps/events/src/routes/playground.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { DebugInvitations } from '@/components/debug-invitations';
import { DebugSpaceEvents } from '@/components/debug-space-events';
import { DebugSpaceState } from '@/components/debug-space-state';
import { Button } from '@/components/ui/button';
import { assertExhaustive } from '@/lib/assertExhaustive';
import { uuid } from '@automerge/automerge';
import { bytesToHex, hexToBytes } from '@noble/hashes/utils';
import { createFileRoute } from '@tanstack/react-router';
import { Effect, Exit } from 'effect';
import * as Schema from 'effect/Schema';
import { useEffect, useState } from 'react';

import type {
Invitation,
RequestAcceptInvitationEvent,
Expand All @@ -19,7 +16,7 @@ import type {
RequestSubscribeToSpace,
SpaceEvent,
SpaceState,
} from 'graph-framework';
} from '@graphprotocol/graph-framework';
import {
ResponseMessage,
acceptInvitation,
Expand All @@ -34,8 +31,13 @@ import {
encryptMessage,
generateId,
serialize,
} from 'graph-framework';
import { useEffect, useState } from 'react';
} from '@graphprotocol/graph-framework';

import { DebugInvitations } from '@/components/debug-invitations';
import { DebugSpaceEvents } from '@/components/debug-space-events';
import { DebugSpaceState } from '@/components/debug-space-state';
import { Button } from '@/components/ui/button';
import { assertExhaustive } from '@/lib/assertExhaustive';

const availableAccounts = [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/events/src/schema.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createFunctions, type } from 'graph-framework';
import { createFunctions, type } from '@graphprotocol/graph-framework';

export const schema = {
types: {
Expand Down
2 changes: 1 addition & 1 deletion apps/events/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { SpaceEvent, SpaceState } from 'graph-framework';
import type { SpaceEvent, SpaceState } from '@graphprotocol/graph-framework';

export type SpaceStorageEntry = {
id: string;
Expand Down
28 changes: 14 additions & 14 deletions apps/events/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"graph-framework": ["../../packages/graph-framework/src/index.js"],
"graph-framework/*": ["../../packages/graph-framework/src/*.js"],
"graph-framework-space-events": ["../../packages/graph-framework-space-events/src/index.js"],
"graph-framework-space-events/*": ["../../packages/graph-framework-space-events/src/*.js"],
"graph-framework-messages": ["../../packages/graph-framework-messages/src/index.js"],
"graph-framework-messages/*": ["../../packages/graph-framework-messages/src/*.js"],
"graph-framework-identity": ["../../packages/graph-framework-identity/src/index.js"],
"graph-framework-identity/*": ["../../packages/graph-framework-identity/src/*.js"],
"graph-framework-key": ["../../packages/graph-framework-key/src/index.js"],
"graph-framework-key/*": ["../../packages/graph-framework-key/src/*.js"],
"graph-framework-schema": ["../../packages/graph-framework-schema/src/index.js"],
"graph-framework-schema/*": ["../../packages/graph-framework-schema/src/*.js"],
"graph-framework-utils": ["../../packages/graph-framework-utils/src/index.js"],
"graph-framework-utils/*": ["../../packages/graph-framework-utils/src/*.js"]
"@graphprotocol/graph-framework": ["../../packages/graph-framework/src/index.js"],
"@graphprotocol/graph-framework/*": ["../../packages/graph-framework/src/*.js"],
"@graph-framework/space-events": ["../../packages/graph-framework-space-events/src/index.js"],
"@graph-framework/space-events/*": ["../../packages/graph-framework-space-events/src/*.js"],
"@graph-framework/messages": ["../../packages/graph-framework-messages/src/index.js"],
"@graph-framework/messages/*": ["../../packages/graph-framework-messages/src/*.js"],
"@graph-framework/identity": ["../../packages/graph-framework-identity/src/index.js"],
"@graph-framework/identity/*": ["../../packages/graph-framework-identity/src/*.js"],
"@graph-framework/key": ["../../packages/graph-framework-key/src/index.js"],
"@graph-framework/key/*": ["../../packages/graph-framework-key/src/*.js"],
"@graph-framework/schema": ["../../packages/graph-framework-schema/src/index.js"],
"@graph-framework/schema/*": ["../../packages/graph-framework-schema/src/*.js"],
"@graph-framework/utils": ["../../packages/graph-framework-utils/src/index.js"],
"@graph-framework/utils/*": ["../../packages/graph-framework-utils/src/*.js"]
}
},
"include": ["src"]
Expand Down
28 changes: 14 additions & 14 deletions apps/events/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"graph-framework": ["../../packages/graph-framework/src/index.js"],
"graph-framework/*": ["../../packages/graph-framework/src/*.js"],
"graph-framework-space-events": ["../../packages/graph-framework-space-events/src/index.js"],
"graph-framework-space-events/*": ["../../packages/graph-framework-space-events/src/*.js"],
"graph-framework-messages": ["../../packages/graph-framework-messages/src/index.js"],
"graph-framework-messages/*": ["../../packages/graph-framework-messages/src/*.js"],
"graph-framework-identity": ["../../packages/graph-framework-identity/src/index.js"],
"graph-framework-identity/*": ["../../packages/graph-framework-identity/src/*.js"],
"graph-framework-key": ["../../packages/graph-framework-key/src/index.js"],
"graph-framework-key/*": ["../../packages/graph-framework-key/src/*.js"],
"graph-framework-schema": ["../../packages/graph-framework-schema/src/index.js"],
"graph-framework-schema/*": ["../../packages/graph-framework-schema/src/*.js"],
"graph-framework-utils": ["../../packages/graph-framework-utils/src/index.js"],
"graph-framework-utils/*": ["../../packages/graph-framework-utils/src/*.js"]
"@graphprotocol/graph-framework": ["../../packages/graph-framework/src/index.js"],
"@graphprotocol/graph-framework/*": ["../../packages/graph-framework/src/*.js"],
"@graph-framework/space-events": ["../../packages/graph-framework-space-events/src/index.js"],
"@graph-framework/space-events/*": ["../../packages/graph-framework-space-events/src/*.js"],
"@graph-framework/messages": ["../../packages/graph-framework-messages/src/index.js"],
"@graph-framework/messages/*": ["../../packages/graph-framework-messages/src/*.js"],
"@graph-framework/identity": ["../../packages/graph-framework-identity/src/index.js"],
"@graph-framework/identity/*": ["../../packages/graph-framework-identity/src/*.js"],
"@graph-framework/key": ["../../packages/graph-framework-key/src/index.js"],
"@graph-framework/key/*": ["../../packages/graph-framework-key/src/*.js"],
"@graph-framework/schema": ["../../packages/graph-framework-schema/src/index.js"],
"@graph-framework/schema/*": ["../../packages/graph-framework-schema/src/*.js"],
"@graph-framework/utils": ["../../packages/graph-framework-utils/src/index.js"],
"@graph-framework/utils/*": ["../../packages/graph-framework-utils/src/*.js"]
}
}
}
16 changes: 8 additions & 8 deletions apps/events/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'node:path';
import { TanStackRouterVite } from '@tanstack/router-plugin/vite';
import react from '@vitejs/plugin-react';
import path from 'node:path';
import { defineConfig } from 'vite';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
import topLevelAwait from 'vite-plugin-top-level-await';
Expand All @@ -23,13 +23,13 @@ export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
'graph-framework': path.resolve(__dirname, '../../packages/graph-framework/src'),
'graph-framework-space-events': path.resolve(__dirname, '../../packages/graph-framework-space-events/src'),
'graph-framework-utils': path.resolve(__dirname, '../../packages/graph-framework-utils/src'),
'graph-framework-schema': path.resolve(__dirname, '../../packages/graph-framework-schema/src'),
'graph-framework-identity': path.resolve(__dirname, '../../packages/graph-framework-identity/src'),
'graph-framework-key': path.resolve(__dirname, '../../packages/graph-framework-key/src'),
'graph-framework-messages': path.resolve(__dirname, '../../packages/graph-framework-messages/src'),
'@graphprotocol/graph-framework': path.resolve(__dirname, '../../packages/graph-framework/src'),
'@graph-framework/space-events': path.resolve(__dirname, '../../packages/graph-framework-space-events/src'),
'@graph-framework/utils': path.resolve(__dirname, '../../packages/graph-framework-utils/src'),
'@graph-framework/schema': path.resolve(__dirname, '../../packages/graph-framework-schema/src'),
'@graph-framework/identity': path.resolve(__dirname, '../../packages/graph-framework-identity/src'),
'@graph-framework/key': path.resolve(__dirname, '../../packages/graph-framework-key/src'),
'@graph-framework/messages': path.resolve(__dirname, '../../packages/graph-framework-messages/src'),
},
},
});
4 changes: 2 additions & 2 deletions apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"dotenv": "^16.4.5",
"effect": "^3.10.19",
"express": "^5.0.1",
"graph-framework-space-events": "workspace:*",
"graph-framework-messages": "workspace:*",
"@graph-framework/space-events": "workspace:*",
"@graph-framework/messages": "workspace:*",
"ws": "^8.17.1"
},
"devDependencies": {
Expand Down
8 changes: 5 additions & 3 deletions apps/server/src/handlers/applySpaceEvent.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Effect, Exit } from 'effect';
import type { KeyBoxWithKeyId } from 'graph-framework-messages';
import type { SpaceEvent } from 'graph-framework-space-events';
import { applyEvent } from 'graph-framework-space-events';

import type { KeyBoxWithKeyId } from '@graph-framework/messages';
import type { SpaceEvent } from '@graph-framework/space-events';
import { applyEvent } from '@graph-framework/space-events';

import { prisma } from '../prisma.js';

type Params = {
Expand Down
6 changes: 4 additions & 2 deletions apps/server/src/handlers/createSpace.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Effect, Exit } from 'effect';
import type { KeyBox } from 'graph-framework-messages';
import { type CreateSpaceEvent, applyEvent } from 'graph-framework-space-events';

import type { KeyBox } from '@graph-framework/messages';
import { type CreateSpaceEvent, applyEvent } from '@graph-framework/space-events';

import { prisma } from '../prisma.js';

type Params = {
Expand Down
4 changes: 3 additions & 1 deletion apps/server/src/handlers/listInvitations.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Schema } from 'effect';
import { SpaceState } from 'graph-framework-space-events';

import { SpaceState } from '@graph-framework/space-events';

import { prisma } from '../prisma.js';

type Params = {
Expand Down
12 changes: 6 additions & 6 deletions apps/server/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import cors from 'cors';
import 'dotenv/config';
import { parse } from 'node:url';
import { Effect, Exit, Schema } from 'effect';
import express from 'express';
import type {
ResponseListInvitations,
ResponseListSpaces,
Expand All @@ -11,10 +9,12 @@ import type {
ResponseUpdateConfirmed,
ResponseUpdatesNotification,
Updates,
} from 'graph-framework-messages';
import { RequestMessage, deserialize, serialize } from 'graph-framework-messages';
import type { SpaceEvent } from 'graph-framework-space-events';
import { applyEvent } from 'graph-framework-space-events';
} from '@graph-framework/messages';
import { RequestMessage, deserialize, serialize } from '@graph-framework/messages';
import type { SpaceEvent } from '@graph-framework/space-events';
import { applyEvent } from '@graph-framework/space-events';
import { Effect, Exit, Schema } from 'effect';
import express from 'express';
import WebSocket, { WebSocketServer } from 'ws';
import { applySpaceEvent } from './handlers/applySpaceEvent.js';
import { createSpace } from './handlers/createSpace.js';
Expand Down
2 changes: 1 addition & 1 deletion docs/framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ import {
acceptInvite,
createSpace,
listSpaces,
} from "graph-framework";
} from "@graphprotocol/graph-framework";

export const {
SpaceProvider,
Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,9 @@
"lint": "pnpm -r lint",
"format": "pnpm -r format",
"check": "pnpm -r check"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=22"
}
}
4 changes: 2 additions & 2 deletions packages/graph-framework-identity/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "graph-framework-identity",
"name": "@graph-framework/identity",
"version": "0.0.1",
"description": "Contains utils and tools for creating identities for graph-framework dapp users. As well as handling authentication for dapps built ontop of the graph-framework.",
"repository": {
Expand Down Expand Up @@ -35,6 +35,6 @@
},
"dependencies": {
"uuid": "^11.0.3",
"graph-framework-utils": "workspace:*"
"@graph-framework/utils": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/graph-framework-key/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "graph-framework-key",
"name": "@graph-framework/key",
"version": "0.0.1",
"description": "Utilities for Space Keys and Key boxes",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions packages/graph-framework-messages/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "graph-framework-messages",
"name": "@graph-framework/messages",
"version": "0.0.1",
"description": "Provides types related to messages for the Graph Framework",
"repository": {
Expand Down Expand Up @@ -31,6 +31,6 @@
"@noble/ciphers": "^1.0.0",
"@noble/curves": "^1.6.0",
"effect": "^3.10.19",
"graph-framework-space-events": "workspace:*"
"@graph-framework/space-events": "workspace:*"
}
}
3 changes: 2 additions & 1 deletion packages/graph-framework-messages/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as Schema from 'effect/Schema';

import {
AcceptInvitationEvent,
CreateInvitationEvent,
CreateSpaceEvent,
SpaceEvent,
} from 'graph-framework-space-events';
} from '@graph-framework/space-events';

export const Updates = Schema.Struct({
updates: Schema.Array(Schema.Uint8Array),
Expand Down
4 changes: 2 additions & 2 deletions packages/graph-framework-schema/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "graph-framework-schema",
"name": "@graph-framework/schema",
"version": "0.0.1",
"description": "Generates a strongly-typed schema representation of a Space and exposes functionality for creating a provider, and react hooks to interact with that schema.",
"repository": {
Expand Down Expand Up @@ -48,6 +48,6 @@
},
"dependencies": {
"fast-deep-equal": "^3.1.3",
"graph-framework-utils": "workspace:*"
"@graph-framework/utils": "workspace:*"
}
}
4 changes: 2 additions & 2 deletions packages/graph-framework-space-events/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "graph-framework-space-events",
"name": "@graph-framework/space-events",
"version": "0.0.1",
"description": "Exposes functionality for events, and applying them, to a space.",
"repository": {
Expand Down Expand Up @@ -36,7 +36,7 @@
"dependencies": {
"@noble/curves": "^1.6.0",
"@noble/hashes": "^1.5.0",
"graph-framework-utils": "workspace:*",
"@graph-framework/utils": "workspace:*",
"uuid": "^11.0.3"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { canonicalize, generateId, stringToUint8Array } from '@graph-framework/utils';
import { secp256k1 } from '@noble/curves/secp256k1';
import { Effect } from 'effect';
import { canonicalize, generateId, stringToUint8Array } from 'graph-framework-utils';
import type { AcceptInvitationEvent, Author } from './types.js';

type Params = {
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-framework-space-events/src/apply-event.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { canonicalize, stringToUint8Array } from '@graph-framework/utils';
import { secp256k1 } from '@noble/curves/secp256k1';
import { Effect, Schema } from 'effect';
import type { ParseError } from 'effect/ParseResult';
import { canonicalize, stringToUint8Array } from 'graph-framework-utils';
import { hashEvent } from './hash-event.js';
import {
InvalidEventError,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { secp256k1 } from '@noble/curves/secp256k1';
import { Effect } from 'effect';
import { canonicalize, generateId, stringToUint8Array } from 'graph-framework-utils';

import { canonicalize, generateId, stringToUint8Array } from '@graph-framework/utils';

import type { Author, CreateInvitationEvent } from './types.js';

type Params = {
Expand Down
2 changes: 1 addition & 1 deletion packages/graph-framework-space-events/src/create-space.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { secp256k1 } from '@noble/curves/secp256k1';
import { Effect } from 'effect';

import { canonicalize, generateId, stringToUint8Array } from 'graph-framework-utils';
import { canonicalize, generateId, stringToUint8Array } from '@graph-framework/utils';

import type { Author, CreateSpaceEvent } from './types.js';

Expand Down
Loading