Skip to content

Instantly share code, notes, and snippets.

@ubinix-warun
Last active March 14, 2024 03:02
Show Gist options
  • Save ubinix-warun/1b9677cd39ad943fb1c9d5983dd88899 to your computer and use it in GitHub Desktop.
Save ubinix-warun/1b9677cd39ad943fb1c9d5983dd88899 to your computer and use it in GitHub Desktop.
Nostamask ๐Ÿ‘บ -- Navigating Nostr Safely with Nostamask Snap.

Nostamask ๐Ÿ‘บ -- Navigating Nostr Safely with Nostamask Snap.

In an ever-evolving landscape of blockchain technologies and decentralized networks, seamless interaction and secure transactions have become paramount. Introducing Nostamask, a revolutionary Snaps plugin for Metamask, designed to redefine how users connect with the Nostr Network.

The Nostamask project addresses the challenges users currently face when navigating the complexities of Nostr Network interactions through Metamask.

We create Nostamask by extend the functionality of MetaMask Flask with Snaps, use nostr-tools interact Nostr network via relays and fork twitter-clone style to demonstrate the Snaps, use Infura IPFS to store profile/banner.

Getting Started

Config Infura API Key on packages/app/.env.local

NEXT_PUBLIC_INFURA_API_KEY="<>"
NEXT_PUBLIC_INFURA_API_KEY_SECRET="<>"
NEXT_PUBLIC_SNAP_ORIGIN="npm:@ubinix-warun/nostamask-snap"

Publish Snap to NpmJS registry.

cd packages/snap
npm publish

Run Snap and App.

yarn install && yarn start

M1: Install Nostamask snap

M2: Initialize Schnorr key or Import key
  • The snap use manageState to store key, new user can generate SK key and backup key.
  • Import key for exists user and store in manageState.

M3: Sign event
  • The app use Sign Event and call RPC signEvent to Nostamask.
  • Upload image to Infura IPFS API via IPFS HTTP client, Ex: profile image, banner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment