Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fiatjaf/nos2x
nostr signer extension
https://github.com/fiatjaf/nos2x
browser-extension chrome-extension nostr
Last synced: 20 days ago
JSON representation
nostr signer extension
- Host: GitHub
- URL: https://github.com/fiatjaf/nos2x
- Owner: fiatjaf
- Created: 2022-01-10T00:29:10.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-23T10:32:40.000Z (8 months ago)
- Last Synced: 2024-04-24T00:39:53.550Z (8 months ago)
- Topics: browser-extension, chrome-extension, nostr
- Language: JavaScript
- Homepage:
- Size: 396 KB
- Stars: 251
- Watchers: 7
- Forks: 46
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-nostr - nos2x - Nostr Signer Extension (NIP-07 Browser extensions / Client reviews and/or comparisons)
README
# nos2x
### notes and other stuff signed by an extension
## Nostr Signer Extension
Use this to sign [Nostr](https://github.com/nostr-protocol/nostr) events on web-apps without having to give them your keys.
It implements [NIP-07](https://github.com/nostr-protocol/nips/blob/master/07.md), i.e. provides a `window.nostr` object which has the following methods:
```
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 // returns ciphertext+iv as specified in nip04
async window.nostr.nip04.decrypt(pubkey, ciphertext): string // takes ciphertext+iv as specified in nip04
async window.nostr.nip44.encrypt(pubkey, plaintext): string // takes pubkey, plaintext, returns ciphertext as specified in nip-44
async window.nostr.nip44.decrypt(pubkey, ciphertext): string // takes pubkey, ciphertext, returns plaintext as specified in nip-44
```This extension is Chromium-only. For a maintained Firefox fork, see [nos2x-fox](https://diegogurpegui.com/nos2x-fox/).
## Demo Video
https://user-images.githubusercontent.com/1653275/149637382-65d50a85-fe30-4259-b7de-99c88b089b53.mp4
## Install
- [Chrome Extension](https://chrome.google.com/webstore/detail/nos2x/kpgefcfmnafjgpblomihpgmejjdanjjp)
## Develop
To run the plugin from this code:
```
git clone https://github.com/fiatjaf/nos2x
cd nos2x
yarn
./build.js prod
```then
1. go to `chrome://extensions`;
2. ensure "developer mode" is enabled on the top right;
3. click on "Load unpackaged";
4. select the `extension/` folder of this repository.---
LICENSE: public domain.
Icon made by Freepik from www.flaticon.com.