30 Commits

Author SHA1 Message Date
tcheeric
186debf5d2 Bump version to 0.11.1 and refresh PR summary 2025-11-26 17:59:39 +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
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
2fde57ff90 respond to create_account with the kind that it came with 2024-02-15 13:03:43 +00:00
Pablo Fernandez
b5d4694e36 bump 2024-01-31 13:58:53 +00:00
Pablo Fernandez
c92b169435 fix wrong nip46 key used 2024-01-08 15:29:54 +00:00
Pablo Fernandez
67c5252983 better error handling 2024-01-02 11:12:28 +00:00
Pablo Fernandez
59fd987c41 implement create_account in client 2023-12-20 14:57:51 +00:00
Pablo Fernandez
0a5682d1e4 create_account work 2023-12-20 10:21:24 +00:00
Pablo Fernandez
80a8651305 version bump 2023-12-09 23:59:27 +00:00
Pablo Fernandez
4f9404faa5 license stuff 2023-12-09 23:59:08 +00:00
Sebastix
537d1d227a fix fastify version 2023-12-01 22:40:17 +01:00
Pablo Fernandez
5ebf9d3482 add script 2023-12-01 16:54:41 +00:00
Pablo Fernandez
dc74289bc4 update package 2023-12-01 11:40:50 +00:00
Pablo Fernandez
e5febb3345 wip 2023-12-01 11:18:39 +00:00
pablof7z
88811fbcd2 save package version in config file 2023-07-06 22:58:38 +02:00
pablof7z
a39f99d405 bump 2023-07-06 22:30:01 +02:00
pablof7z
6f16cafd41 lots of things that I forgot to commit 😂 2023-07-06 22:29:31 +02:00
pablof7z
59556e673b follow 2023-06-29 16:55:23 +02:00
pablof7z
db0c9ae3fb minor improvements 2023-06-28 21:44:39 +02:00
pablof7z
f949c116db write to a file the connection string 2023-06-27 01:59:39 +02:00
pablof7z
bf118276cb update packages 2023-06-25 15:30:17 +02:00
pablof7z
6712c4d48a load admin npubs from env 2023-06-25 15:04:40 +02:00
pablof7z
c43f1cc95e Policies and single-use tokens 2023-06-04 10:03:02 +02:00
pablof7z
74cd9715ac updates 2023-05-31 20:26:29 +02:00
pablof7z
54de9cfa8e initial commit 2023-05-15 20:05:55 +02:00