nsecbunkerd/package.json
tcheeric 16dc15b486 feat!: Add Admin API methods and NIP-46 compliance
BREAKING CHANGE: Admin API now uses kind 24133 instead of 24134

This release adds 11 new admin methods and ensures full NIP-46 compliance
by switching from the non-standard kind 24134 to the spec-compliant 24133.

## New Admin Methods

### Key Management
- `get_key` - Get details about a specific key
- `delete_key` - Soft-delete a key and its tokens
- `rotate_key` - Create new key and migrate permissions

### Policy Management
- `get_policy` - Get policy details with rules
- `delete_policy` - Soft-delete a policy

### Permission Management
- `grant_permission` - Grant user access with a policy
- `revoke_permission` - Revoke user's access to a key
- `get_permissions` - Get user's permissions on a key

### Token Management
- `get_token` - Get token details
- `revoke_token` - Soft-delete a token
- `validate_token` - Check if a token is valid

## NIP-46 Compliance

Changed all admin communication from kind 24134 to kind 24133
(NDKKind.NostrConnect) to comply with the NIP-46 specification.
Kind 24134 was never part of the official spec.

## Other Changes

- Added Vitest test framework with 93 tests
- Fixed TypeScript compilation errors
- Updated documentation with breaking change notice
- Version bump to 0.11.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 03:41:15 +00:00

78 lines
2.1 KiB
JSON

{
"name": "nsecbunkerd",
"version": "0.11.0",
"description": "nsecbunker daemon",
"main": "dist/index.js",
"bin": {
"nsecbunkerd": "dist/index.js",
"nsecbunker-client": "dist/client/client.js"
},
"files": [
"dist",
"scripts/start.js",
"prisma/schema.prisma",
"LICENSE",
"README.md"
],
"repository": {
"type": "git",
"url": "https://github.com/kind-0/nsecbunkerd"
},
"scripts": {
"build": "tsup src/index.ts; tsup src/daemon/index.ts -d dist/daemon; tsup src/client.ts -d dist/client",
"build:client": "tsup src/client.ts -d dist/client",
"prisma:generate": "npx prisma generate",
"prisma:migrate": "npx prisma migrate deploy",
"prisma:create": "npx prisma db push --preview-feature",
"start": "node ./scripts/start.js",
"lfg": "node ./scripts/start.js start",
"nsecbunkerd": "node dist/index.js",
"client": "node dist/client/client.js",
"test": "vitest run",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage"
},
"keywords": [
"nostr"
],
"author": "pablof7z",
"license": "MIT",
"dependencies": {
"@fastify/formbody": "^7.4.0",
"@fastify/view": "^8.2.0",
"@inquirer/password": "^1.1.2",
"@inquirer/prompts": "^1.2.3",
"@nostr-dev-kit/ndk": "^2.18.1",
"@prisma/client": "^5.4.1",
"@scure/base": "^1.1.1",
"@types/yargs": "^17.0.24",
"axios": "^1.6.2",
"bcrypt": "^5.1.1",
"crypto-js": "^4.2.0",
"debug": "^4.3.4",
"dotenv": "^16.3.1",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eventemitter3": "^5.0.1",
"express": "^4.18.2",
"fastify": "^4.24.3",
"handlebars": "^4.7.8",
"isomorphic-ws": "^5.0.0",
"lnbits": "^1.1.5",
"lnbits-ts": "^0.0.2",
"nostr-tools": "^2.17.0",
"websocket-polyfill": "^0.0.3",
"ws": "^8.13.0",
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/debug": "^4.1.8",
"@types/node": "^18.16.18",
"prisma": "^5.4.1",
"ts-node": "^10.9.1",
"tsup": "^7.2.0",
"typescript": "^5.1.3",
"vitest": "^1.6.1"
}
}