46 lines
1.4 KiB
Markdown
46 lines
1.4 KiB
Markdown
# Nostr Signer (formerly Nostr Connect)
|
|
|
|
A Nostr Signer Extension - sign [nostr](https://github.com/nostr-protocol/nostr) events on web-apps without giving them your keys. Forked from [nos2x](https://github.com/fiatjaf/nos2x) with a fancy UI, crafted by Karnage.
|
|
|
|
## Features
|
|
|
|
Implements [NIP-07](https://github.com/nostr-protocol/nips/blob/master/07.md) and more:
|
|
|
|
```
|
|
async window.nostr.getPublicKey(): string // returns your public key as hex
|
|
async window.nostr.signEvent(event): Event // returns the full event object signed
|
|
async window.nostr.getRelays(): { [url: string]: RelayPolicy } // returns a map of relays
|
|
async window.nostr.nip04.encrypt(pubkey, plaintext): string // NIP-04 encryption
|
|
async window.nostr.nip04.decrypt(pubkey, ciphertext): string // NIP-04 decryption
|
|
async window.nostr.nip44.encrypt(pubkey, plaintext): string // NIP-44 encryption
|
|
async window.nostr.nip44.decrypt(pubkey, ciphertext): string // NIP-44 decryption
|
|
```
|
|
|
|
## Install
|
|
|
|
## Develop
|
|
|
|
```bash
|
|
git clone https://git.reya.su/reya/nostr-connect
|
|
cd nostr-connect
|
|
bun install
|
|
bun run build
|
|
```
|
|
|
|
Then:
|
|
|
|
1. Go to `chrome://extensions`
|
|
2. Enable "developer mode"
|
|
3. Click "Load unpackaged"
|
|
4. Select the `extension/output/` folder
|
|
|
|
## Commands
|
|
|
|
```bash
|
|
bun run dev # Development mode
|
|
bun run build # Production build
|
|
bun run lint # Lint code
|
|
bun run test # Run tests
|
|
bun run package:chrome # Package for Chrome
|
|
```
|