mirror of
https://github.com/dergigi/boris.git
synced 2026-02-16 20:45:01 +01:00
- Remove reconnectBunkerSigner function, inline logic into App.tsx for better control
- Clean up try-catch wrapper in highlightCreationService, signing now works reliably
- Remove extra logging from signing process (already has [bunker] prefix logs)
- Simplify nostrConnect.ts to just export permissions helper
- Update api/article-og.ts to use local relay config instead of import
- All bunker signing tests now passing ✅
27 lines
786 B
TypeScript
27 lines
786 B
TypeScript
import { NostrConnectSigner } from 'applesauce-signers'
|
|
|
|
/**
|
|
* Get default NIP-46 permissions for bunker connections
|
|
* These permissions cover all event kinds and encryption/decryption operations Boris needs
|
|
*/
|
|
export function getDefaultBunkerPermissions(): string[] {
|
|
return [
|
|
// Signing permissions for event kinds we create
|
|
...NostrConnectSigner.buildSigningPermissions([
|
|
0, // Profile metadata
|
|
5, // Event deletion
|
|
7, // Reactions (nostr events)
|
|
17, // Reactions (websites)
|
|
9802, // Highlights
|
|
30078, // Settings & reading positions
|
|
39701, // Web bookmarks
|
|
]),
|
|
// Encryption/decryption for hidden content
|
|
'nip04_encrypt',
|
|
'nip04_decrypt',
|
|
'nip44_encrypt',
|
|
'nip44_decrypt',
|
|
]
|
|
}
|
|
|