Code Monkey home page Code Monkey logo

nos2x's Introduction

nos2x

notes and other stuff signed by an extension

Nostr Signer Extension

This allows you to sign Nostr events on web-apps without having to give them your keys.

It 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

Demo Video

screencast.mp4

Install

Develop

To run the plugin from this code:

git clone https://github.com/fiatjaf/nos2x
cd nos2x
git checkout chromium                       # or git checkout firefox
yarn                                        # or use npm or pnpm
yarn run build

then ...

  • Chromium:
    1. go to chrome://extensions
    2. make sure, "developer mode" is enabled on the top right
    3. "Load unpackaged"
    4. select the extension/ folder
  • Firefox:
    1. go to about:debugging
    2. "This Firefox"
    3. "Load Temporary Add-on..."
    4. select any file from the extension/ folder

Screenshots


LICENSE: public domain.

Icon made by Freepik from www.flaticon.com.

nos2x's People

Contributors

benalleng avatar fiatjaf avatar giszmo avatar monlovesmango avatar sondreb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.