Initial commit.

This commit is contained in:
Jay
2025-10-24 09:43:28 -04:00
commit 6bebea21f4
21 changed files with 1547 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
node_modules
dist

1490
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

31
package.json Normal file
View File

@@ -0,0 +1,31 @@
{
"name": "@wisehodl/roots",
"version": "0.1.0",
"description": "A minimal Nostr protocol library for typescript",
"type": "./dist/types.d.ts",
"main": "./dist/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"files": [
"dist"
],
"scripts": {
"build": "tsc",
"test": "vitest",
"test:run": "vitest run"
},
"dependencies": {
"@noble/hashes": "^2.0.1",
"@noble/secp256k1": "^3.0.0"
},
"devDependencies": {
"@types/node": "^24.9.1",
"typescript": "^5.9.3",
"vite": "^7.1.12",
"vitest": "^4.0.2"
}
}

0
src/constants.ts Normal file
View File

0
src/errors.ts Normal file
View File

0
src/event.test.ts Normal file
View File

0
src/event.ts Normal file
View File

0
src/filter.test.ts Normal file
View File

0
src/filter.ts Normal file
View File

0
src/id.test.ts Normal file
View File

0
src/id.ts Normal file
View File

0
src/index.ts Normal file
View File

0
src/keys.test.ts Normal file
View File

0
src/keys.ts Normal file
View File

0
src/sign.test.ts Normal file
View File

0
src/sign.ts Normal file
View File

0
src/types.ts Normal file
View File

0
src/validate.test.ts Normal file
View File

0
src/validate.ts Normal file
View File

17
tsconfig.json Normal file
View File

@@ -0,0 +1,17 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "ESNext",
"lib": ["ES2020"],
"declaration": true,
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "bundler"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist", "**/*.test.ts"]
}

7
vitest.config.ts Normal file
View File

@@ -0,0 +1,7 @@
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
globals: true,
},
});