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
4 changes: 2 additions & 2 deletions apps/events/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
"@xmtp/xmtp-js": "^13.0.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"effect": "^3.10.12",
"effect": "^3.10.19",
"ethers": "^6.13.3",
"graph-framework": "workspace:*",
"lucide-react": "^0.441.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwind-merge": "^2.5.3",
"tailwindcss-animate": "^1.0.7",
"uuid": "^11.0.2",
"uuid": "^11.0.3",
"vite-plugin-node-polyfills": "^0.22.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@prisma/client": "5.22.0",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"effect": "^3.10.12",
"effect": "^3.10.19",
"express": "^5.0.1",
"graph-framework-space-events": "workspace:*",
"graph-framework-messages": "workspace:*",
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
"workspaces": ["apps/*", "packages/*"],
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@effect/build-utils": "^0.7.8",
"escape-string-regexp": "^5.0.0",
"glob": "^11.0.0",
"typescript": "^5.6.3",
"vite": "^5.4.10",
"vitest": "^2.1.4",
"vite-plugin-dts": "^4.3.0"
"vitest": "^2.1.4"
},
"scripts": {
"build": "pnpm -r build",
"clean": "node scripts/clean.mjs",
"build": "tsc -b tsconfig.build.json && pnpm --recursive --parallel run build",
"ts:check": "pnpm -r ts:check",
"test": "vitest",
"lint": "pnpm -r lint",
Expand Down
21 changes: 21 additions & 0 deletions packages/graph-framework-identity/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023-present The Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 5 additions & 0 deletions packages/graph-framework-identity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @graph-framework/identity

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.

## TODO: add api/examples
29 changes: 19 additions & 10 deletions packages/graph-framework-identity/package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
{
"name": "graph-framework-identity",
"version": "0.0.1",
"description": "",
"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": {
"type": "git",
"url": "https://github.com/geobrowser/graph-framework.git",
"directory": "packages/graph-framework-identity"
},
"license": "MIT",
"type": "module",
"exports": {
".": {
"default": "./build/esm/index.js",
"types": "./build/dts/index.d.ts"
}
},
"scripts": {
"build": "pnpm build-esm && build-utils pack-v2",
"build-esm": "tsc -b tsconfig.build.json",
"test": "vitest run --typecheck",
"ts:check": "tsc --noEmit",
"ts:check": "tsc -b tsconfig.json",
"lint": "pnpm biome lint src/*",
"lint:fix": "pnpm biome lint --write src/*",
"format": "pnpm biome format src/*",
"format:fix": "pnpm biome format --write src/*",
"check": "pnpm biome check src/*",
"check:fix": "pnpm biome check --write src/*"
},
"exports": {
".": {
"default": "./dist/index.js"
}
},
"peerDependencies": {
"effect": "^3.10.12"
"effect": "^3.10.19"
},
"devDependencies": {
"effect": "^3.10.12"
"effect": "^3.10.19"
},
"dependencies": {
"uuid": "^11.0.2",
"uuid": "^11.0.3",
"graph-framework-utils": "workspace:*"
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect, it } from 'vitest';
import { createIdentity } from './create-identity.js';
import { createIdentity } from '../src/create-identity.js';

it.skip('should generate an identity', () => {
expect(createIdentity()).toEqual({});
Expand Down
3 changes: 1 addition & 2 deletions packages/graph-framework-identity/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"outDir": "build/esm",
"declarationDir": "build/dts",
"stripInternal": true
},
"exclude": ["node_modules", "src/**/*.test.ts", "src/**/*.spec.ts"]
}
}
10 changes: 10 additions & 0 deletions packages/graph-framework-identity/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"include": ["test"],
"references": [{ "path": "tsconfig.src.json" }, { "path": "../graph-framework-utils" }],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/test.tsbuildinfo",
"rootDir": "test",
"noEmit": true
}
}
21 changes: 21 additions & 0 deletions packages/graph-framework-key/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023-present The Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion packages/graph-framework-key/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Graph Framework Key
# @graph-framework/key

Utilities for Space Keys and Key boxes.
19 changes: 12 additions & 7 deletions packages/graph-framework-key/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@
"name": "graph-framework-key",
"version": "0.0.1",
"description": "Utilities for Space Keys and Key boxes",
"repository": {
"type": "git",
"url": "https://github.com/geobrowser/graph-framework.git",
"directory": "packages/graph-framework-key"
},
"license": "MIT",
"type": "module",
"exports": {
".": {
"default": "./dist/index.js"
"default": "./build/esm/index.js",
"types": "./build/dts/index.d.ts"
}
},
"scripts": {
"build": "tsc",
"build": "pnpm build-esm && build-utils pack-v2",
"build-esm": "tsc -b tsconfig.build.json",
"test": "vitest run --typecheck",
"ts:check": "tsc --noEmit",
"ts:check": "tsc -b tsconfig.json",
"lint": "pnpm biome lint src/*",
"lint:fix": "pnpm biome lint --write src/*",
"format": "pnpm biome format src/*",
Expand All @@ -23,9 +31,6 @@
"@noble/ciphers": "^1.0.0",
"@noble/curves": "^1.6.0",
"@noble/hashes": "^1.5.0",
"effect": "^3.10.12"
},
"devDependencies": {
"vite-plugin-dts": "^4.3.0"
"effect": "^3.10.19"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { randomBytes } from '@noble/ciphers/webcrypto';
import { bytesToHex } from '@noble/hashes/utils';
import { describe, expect, it } from 'vitest';
import { decryptKeyBox, encryptKeyBox, generateKeypair } from './key-box.js';

import { decryptKeyBox, encryptKeyBox, generateKeypair } from '../src/key-box.js';

describe('KeyBox Encryption/Decryption', () => {
describe('encryptKeyBox', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { randomBytes } from '@noble/ciphers/webcrypto';
import { describe, expect, it } from 'vitest';
import { createKey } from './create-key.js';
import { encryptKey } from './encrypt-key.js';
import { decryptKeyBox, generateKeypair } from './key-box.js';

import { createKey } from '../src/create-key.js';
import { encryptKey } from '../src/encrypt-key.js';
import { decryptKeyBox, generateKeypair } from '../src/key-box.js';

describe('Key Encryption', () => {
describe('encryptKey', () => {
Expand Down Expand Up @@ -158,9 +159,7 @@ describe('Key Encryption', () => {
// Each recipient should be able to decrypt their version
recipients.forEach((recipient, index) => {
const decryptedKey = decryptKeyBox({
// @ts-expect-error entry is defined
ciphertext: encryptedKeys[index].keyBoxCiphertext,
// @ts-expect-error entry is defined
nonce: encryptedKeys[index].keyBoxNonce,
publicKey: sender.publicKey,
secretKey: recipient.secretKey,
Expand Down
3 changes: 1 addition & 2 deletions packages/graph-framework-key/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
"outDir": "build/esm",
"declarationDir": "build/dts",
"stripInternal": true
},
"exclude": ["node_modules", "src/**/*.test.ts", "src/**/*.spec.ts"]
}
}
10 changes: 10 additions & 0 deletions packages/graph-framework-key/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"include": ["test"],
"references": [{ "path": "tsconfig.src.json" }],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/test.tsbuildinfo",
"rootDir": "test",
"noEmit": true
}
}
21 changes: 21 additions & 0 deletions packages/graph-framework-messages/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023-present The Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion packages/graph-framework-messages/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Graph Framework Messages
# @graph-framework/messages

Provides types related to messages for the Graph Framework
19 changes: 12 additions & 7 deletions packages/graph-framework-messages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@
"name": "graph-framework-messages",
"version": "0.0.1",
"description": "Provides types related to messages for the Graph Framework",
"repository": {
"type": "git",
"url": "https://github.com/geobrowser/graph-framework.git",
"directory": "packages/graph-framework-messages"
},
"license": "MIT",
"type": "module",
"exports": {
".": {
"default": "./dist/index.js"
"default": "./build/esm/index.js",
"types": "./build/dts/index.d.ts"
}
},
"scripts": {
"build": "tsc",
"build": "pnpm build-esm && build-utils pack-v2",
"build-esm": "tsc -b tsconfig.build.json",
"test": "vitest run --typecheck",
"ts:check": "tsc --noEmit",
"ts:check": "tsc -b tsconfig.json",
"lint": "pnpm biome lint src/*",
"lint:fix": "pnpm biome lint --write src/*",
"format": "pnpm biome format src/*",
Expand All @@ -22,10 +30,7 @@
"dependencies": {
"@noble/ciphers": "^1.0.0",
"@noble/curves": "^1.6.0",
"effect": "^3.10.12",
"effect": "^3.10.19",
"graph-framework-space-events": "workspace:*"
},
"devDependencies": {
"vite-plugin-dts": "^4.3.0"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { describe, expect, it } from 'vitest';
import { decryptMessage } from './decrypt-message.js';
import { encryptMessage } from './encrypt-message.js';

import { decryptMessage } from '../src/decrypt-message.js';
import { encryptMessage } from '../src/encrypt-message.js';

describe('decryptMessage', () => {
const testKey = new Uint8Array(32).fill(1);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { describe, expect, it } from 'vitest';
import { encryptMessage } from './encrypt-message.js';

import { encryptMessage } from '../src/encrypt-message.js';

describe('encryptMessage', () => {
const tooShortKey = new Uint8Array(31).fill(1);

Expand Down
3 changes: 1 addition & 2 deletions packages/graph-framework-messages/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
"outDir": "build/esm",
"declarationDir": "build/dts",
"stripInternal": true
},
"exclude": ["node_modules", "src/**/*.test.ts", "src/**/*.spec.ts"]
}
}
10 changes: 10 additions & 0 deletions packages/graph-framework-messages/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"include": ["test"],
"references": [{ "path": "tsconfig.src.json" }, { "path": "../graph-framework-space-events" }],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/test.tsbuildinfo",
"rootDir": "test",
"noEmit": true
}
}
Loading