126 Commits

Author SHA1 Message Date
tcheeric
49a36ca67c docs: add "Since" column to README tables and mention v0.11.0 tests
- Added a "Since" column to all command tables in the README to indicate version availability.
- Noted that unit tests for admin commands were introduced in v0.11.0 using Vitest.
2025-11-28 12:40:02 +00:00
tcheeric
241a9c56e8 fix: update health check response from "ok" to "pong" 2025-11-28 11:19:15 +00:00
tcheeric
738fb26dd2 fix(deps): update to patched NDK with NIP-46 fixes
- Update @nostr-dev-kit/ndk to use local patched version
- NDK patch fixes async error handling in NIP-46 backend
- Fixes nip44_encrypt requests not returning responses
- Bump version to 0.11.2

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 09:13:26 +00:00
Eric T
1e7eb8a279
Merge pull request #1 from 398ja/feat/admin-api-nip46-compliance
Pull Request: Post-0.10.5 updates (0.10.6 → 0.11.1)
2025-11-28 03:38:34 +00:00
tcheeric
85dfb739ad fix: Add active field to user object in daemon response
- Calculate `active` based on the absence of `revokedAt`.
2025-11-26 21:24:31 +00:00
tcheeric
666ab0d987 fix: Include revoked field in admin token response
- Add `revoked` field to indicate if a token is revoked based on `deletedAt`.
2025-11-26 21:24:23 +00:00
tcheeric
1cfa8f82d7 fix: Add revoked field to admin token response
- Include `revoked` field to indicate if a token is revoked based on its `deletedAt` property.
2025-11-26 21:24:15 +00:00
tcheeric
af02c644c0 fix: Exclude soft-deleted keys when retrieving key list
- Fetch keys marked as deleted from the database and filter them out.
- Ensure soft-deleted keys are skipped during processing.
2025-11-26 18:26:33 +00:00
tcheeric
ee8f9af717 fix: Update ping command response from 'ok' to 'pong' 2025-11-26 18:26:22 +00:00
tcheeric
35ab552e79 test: Update ping command test to expect 'pong' response 2025-11-26 18:26:03 +00:00
tcheeric
4c6bf93080 Remove post-0.10.5 PR summary 2025-11-26 18:01:17 +00:00
tcheeric
186debf5d2 Bump version to 0.11.1 and refresh PR summary 2025-11-26 17:59:39 +00:00
tcheeric
dc86897db4 feat: Persist created key to database in create_new_key
- Use Prisma to upsert key details upon creation.
- Add database mocking for related unit tests.
- Ensure `create_new_key` saves keyName and pubkey for future operations.
2025-11-26 16:34:36 +00:00
tcheeric
7ed4835bda feat: Add key_npub to admin token response and update .gitignore
- Include `key_npub` field in token response for admin methods.
- Update `.gitignore` to ignore `/claude/` and `/idea/` directories.
2025-11-26 15:46:44 +00:00
tcheeric
539106c4f1 fix: Convert policyId to integer in create_new_token
The policyId parameter comes as a string from NIP-46 RPC params but
Prisma expects an integer for the Token.policyId field. Added parseInt()
to convert the string to integer before passing to prisma.token.create().

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 13:54:18 +00:00
tcheeric
a23c6bc932 Remove implementation plan document 2025-11-26 03:54:36 +00:00
tcheeric
44597b95c8 Normalize Dockerfile stage casing 2025-11-26 03:50:14 +00:00
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
tcheeric
deda485763 fix: nostr-tools v2 compatibility and null kind handling
- Fix compatibility with nostr-tools v2 which changed nip19 encoding/decoding
  to use Uint8Array instead of hex strings
- Add hex utility functions (bytesToHex, hexToBytes) for conversion
- Fix null kind handling in create_new_policy to prevent database errors
  when policy rules have no kind specified
- Default method to "sign_event" when not specified in policy rules
- Bump version to 0.10.6

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 02:38:18 +00:00
Pablo Fernandez
f4fd7403cc gitignore 2024-09-21 13:45:11 -04:00
Pablo Fernandez
87217f9a3f updates 2024-09-21 13:44:35 -04:00
Pablo Fernandez
ff5387b778 updates 2024-09-21 13:44:24 -04:00
Pablo Fernandez
919315bbf7 bump 2024-04-25 14:47:48 +01:00
Pablo Fernandez
919beb941c update ndk 2024-04-25 14:46:32 +01:00
Pablo Fernandez
032b67632e bump ndk 2024-03-19 14:28:33 +00:00
Pablo Fernandez
70ce3b544d absolutely no reason why the username needs to be readonly 2024-02-18 00:10:03 +00:00
Pablo Fernandez
dcb9b6695c remove stupid email example 2024-02-15 13:18:17 +00:00
Pablo Fernandez
717306a108
Merge pull request #30 from hzrd149/master
Add github action for building and publishing docker images
2024-02-15 13:07:26 +00:00
Pablo Fernandez
cbb6c66804
Merge pull request #29 from erskingardner/master
Replace auth request js method, update prettierrc to handle handlebar
2024-02-15 13:06:34 +00:00
Pablo Fernandez
6caf570866
Merge branch 'master' into master 2024-02-15 13:06:16 +00:00
Pablo Fernandez
24eb27a949
Merge pull request #31 from coracle-social/master
Bring back sendPostRequest
2024-02-15 13:04:49 +00:00
Pablo Fernandez
2fde57ff90 respond to create_account with the kind that it came with 2024-02-15 13:03:43 +00:00
Jon Staab
e2be038af7 Bring back sendPostRequest 2024-02-08 10:07:00 -08:00
hzrd149
5b37032ec1 update main branch 2024-02-04 12:50:39 +00:00
hzrd149
109cb5d972 add github action for docker image 2024-02-04 11:52:56 +00:00
Jeff Gardner
e796307f30 Add required id attribute 2024-02-01 11:48:06 +01:00
Jeff Gardner
7d3e7394ed Replace auth request js method, change prettierrc to handle handlebar templates better 2024-02-01 11:22:10 +01:00
Pablo Fernandez
b5d4694e36 bump 2024-01-31 13:58:53 +00:00
Pablo Fernandez
64a41e98ab remove default start and just document using lfg 2024-01-31 13:45:23 +00:00
Pablo Fernandez
0a130089bf remove bad check on missing domains 2024-01-31 13:45:09 +00:00
Pablo Fernandez
ca3bbf4d7d remove wrong defaults on config 2024-01-31 13:44:59 +00:00
Pablo Fernandez
529f68360d create config if it's not there 2024-01-31 13:33:01 +00:00
Pablo Fernandez
a9814fd150 start without requiring start 2024-01-31 13:32:50 +00:00
Pablo Fernandez
f7752ec016 mkdir config 2024-01-31 13:25:58 +00:00
Pablo Fernandez
ed9c130ff6
Merge pull request #28 from nourspace/nour/feat/improved-configs
feat: improved configs
2024-01-26 16:17:15 +00:00
Nour
40391c536f
fix: create connection.txt inside config folder 2024-01-26 15:16:26 +00:00
Nour
894f3c3d14
feat: allow customizing auth host 2024-01-26 15:14:40 +00:00
Nour
33fb9703f7
feat: use dynamic DATABASE_URL for Prisma db 2024-01-26 15:13:26 +00:00
Nour
d1fd2d466a
fix: correct .env file in docker-compose 2024-01-26 15:10:37 +00:00
Pablo Fernandez
f9eb2d8898
Merge pull request #25 from nQuiz/patch-1
chore: minor typos / formatting
2024-01-24 13:18:15 +00:00