14 Commits
2.0.0 ... main

14 changed files with 718 additions and 343 deletions

View File

@@ -1,6 +1,7 @@
MIT License MIT License
Copyright (c) 2024 Ryan Breen Copyright (c) 2025 Terry Yiu (Nostash)
Copyright (c) 2024 Ryan Breen (Nostore)
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@@ -7,6 +7,10 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
3A82CBE22DEB369D0038BB3E /* db.js in Resources */ = {isa = PBXBuildFile; fileRef = 3A82CBDF2DEB369D0038BB3E /* db.js */; };
3A82CBE32DEB369D0038BB3E /* utils.js in Resources */ = {isa = PBXBuildFile; fileRef = 3A82CBE02DEB369D0038BB3E /* utils.js */; };
3A82CBE42DEB369D0038BB3E /* db.js in Resources */ = {isa = PBXBuildFile; fileRef = 3A82CBDF2DEB369D0038BB3E /* db.js */; };
3A82CBE52DEB369D0038BB3E /* utils.js in Resources */ = {isa = PBXBuildFile; fileRef = 3A82CBE02DEB369D0038BB3E /* utils.js */; };
941B03CE296FA90400CA291E /* Nostash Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 941B03CD296FA90400CA291E /* Nostash Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 941B03CE296FA90400CA291E /* Nostash Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 941B03CD296FA90400CA291E /* Nostash Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
941B03D8296FA90400CA291E /* Nostash Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 941B03D7296FA90400CA291E /* Nostash Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 941B03D8296FA90400CA291E /* Nostash Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 941B03D7296FA90400CA291E /* Nostash Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
941B03DE296FA90400CA291E /* Main.html in Resources */ = {isa = PBXBuildFile; fileRef = 941B0399296FA90300CA291E /* Main.html */; }; 941B03DE296FA90400CA291E /* Main.html in Resources */ = {isa = PBXBuildFile; fileRef = 941B0399296FA90300CA291E /* Main.html */; };
@@ -146,6 +150,8 @@
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
3A82CBDF2DEB369D0038BB3E /* db.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = db.js; sourceTree = "<group>"; };
3A82CBE02DEB369D0038BB3E /* utils.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; path = utils.js; sourceTree = "<group>"; };
941B039A296FA90300CA291E /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = Base; path = ../Base.lproj/Main.html; sourceTree = "<group>"; }; 941B039A296FA90300CA291E /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = Base; path = ../Base.lproj/Main.html; sourceTree = "<group>"; };
941B039B296FA90300CA291E /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; }; 941B039B296FA90300CA291E /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = "<group>"; };
941B039C296FA90300CA291E /* Style.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = Style.css; sourceTree = "<group>"; }; 941B039C296FA90300CA291E /* Style.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = Style.css; sourceTree = "<group>"; };
@@ -233,6 +239,15 @@
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
3A82CBE12DEB369D0038BB3E /* utilities */ = {
isa = PBXGroup;
children = (
3A82CBDF2DEB369D0038BB3E /* db.js */,
3A82CBE02DEB369D0038BB3E /* utils.js */,
);
path = utilities;
sourceTree = "<group>";
};
941B0392296FA90300CA291E = { 941B0392296FA90300CA291E = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
@@ -309,6 +324,7 @@
941B03A9296FA90400CA291E /* popup.css */, 941B03A9296FA90400CA291E /* popup.css */,
941B03AA296FA90400CA291E /* popup.js */, 941B03AA296FA90400CA291E /* popup.js */,
948C69E72982DFE900FB3574 /* background.html */, 948C69E72982DFE900FB3574 /* background.html */,
3A82CBE12DEB369D0038BB3E /* utilities */,
); );
path = Resources; path = Resources;
sourceTree = "<group>"; sourceTree = "<group>";
@@ -552,6 +568,8 @@
941B03F4296FA90400CA291E /* content.js in Resources */, 941B03F4296FA90400CA291E /* content.js in Resources */,
941B04262977A25700CA291E /* Icon-1024.png in Resources */, 941B04262977A25700CA291E /* Icon-1024.png in Resources */,
941B04352978CDF900CA291E /* Icon-64.png in Resources */, 941B04352978CDF900CA291E /* Icon-64.png in Resources */,
3A82CBE22DEB369D0038BB3E /* db.js in Resources */,
3A82CBE32DEB369D0038BB3E /* utils.js in Resources */,
941B04242977A25700CA291E /* Icon-256.png in Resources */, 941B04242977A25700CA291E /* Icon-256.png in Resources */,
941B03FA296FA90400CA291E /* popup.js in Resources */, 941B03FA296FA90400CA291E /* popup.js in Resources */,
941B04332978CDF900CA291E /* Icon-16.png in Resources */, 941B04332978CDF900CA291E /* Icon-16.png in Resources */,
@@ -589,6 +607,8 @@
941B03F5296FA90400CA291E /* content.js in Resources */, 941B03F5296FA90400CA291E /* content.js in Resources */,
941B04272977A25700CA291E /* Icon-1024.png in Resources */, 941B04272977A25700CA291E /* Icon-1024.png in Resources */,
941B04362978CDF900CA291E /* Icon-64.png in Resources */, 941B04362978CDF900CA291E /* Icon-64.png in Resources */,
3A82CBE42DEB369D0038BB3E /* db.js in Resources */,
3A82CBE52DEB369D0038BB3E /* utils.js in Resources */,
941B04252977A25700CA291E /* Icon-256.png in Resources */, 941B04252977A25700CA291E /* Icon-256.png in Resources */,
941B03FB296FA90400CA291E /* popup.js in Resources */, 941B03FB296FA90400CA291E /* popup.js in Resources */,
941B04342978CDF900CA291E /* Icon-16.png in Resources */, 941B04342978CDF900CA291E /* Icon-16.png in Resources */,
@@ -788,7 +808,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6; CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = S99A5B637C; DEVELOPMENT_TEAM = S99A5B637C;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "iOS (Extension)/Info.plist"; INFOPLIST_FILE = "iOS (Extension)/Info.plist";
@@ -801,7 +821,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
MARKETING_VERSION = 2.0.0; MARKETING_VERSION = 2.1.0;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-framework", "-framework",
SafariServices, SafariServices,
@@ -820,7 +840,7 @@
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6; CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = S99A5B637C; DEVELOPMENT_TEAM = S99A5B637C;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "iOS (Extension)/Info.plist"; INFOPLIST_FILE = "iOS (Extension)/Info.plist";
@@ -833,7 +853,7 @@
"@executable_path/Frameworks", "@executable_path/Frameworks",
"@executable_path/../../Frameworks", "@executable_path/../../Frameworks",
); );
MARKETING_VERSION = 2.0.0; MARKETING_VERSION = 2.1.0;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-framework", "-framework",
SafariServices, SafariServices,
@@ -855,7 +875,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6; CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = S99A5B637C; DEVELOPMENT_TEAM = S99A5B637C;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "iOS (App)/Info.plist"; INFOPLIST_FILE = "iOS (App)/Info.plist";
@@ -871,7 +891,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 2.0.0; MARKETING_VERSION = 2.1.0;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-framework", "-framework",
SafariServices, SafariServices,
@@ -896,7 +916,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6; CURRENT_PROJECT_VERSION = 9;
DEVELOPMENT_TEAM = S99A5B637C; DEVELOPMENT_TEAM = S99A5B637C;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "iOS (App)/Info.plist"; INFOPLIST_FILE = "iOS (App)/Info.plist";
@@ -912,7 +932,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 2.0.0; MARKETING_VERSION = 2.1.0;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-framework", "-framework",
SafariServices, SafariServices,
@@ -937,7 +957,7 @@
buildSettings = { buildSettings = {
CODE_SIGN_ENTITLEMENTS = "macOS (Extension)/nostash.entitlements"; CODE_SIGN_ENTITLEMENTS = "macOS (Extension)/nostash.entitlements";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6; CURRENT_PROJECT_VERSION = 9;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = S99A5B637C; DEVELOPMENT_TEAM = S99A5B637C;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
@@ -951,8 +971,8 @@
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks", "@executable_path/../../../../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 2.0.0; MARKETING_VERSION = 2.1.0;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-framework", "-framework",
SafariServices, SafariServices,
@@ -971,7 +991,7 @@
buildSettings = { buildSettings = {
CODE_SIGN_ENTITLEMENTS = "macOS (Extension)/nostash.entitlements"; CODE_SIGN_ENTITLEMENTS = "macOS (Extension)/nostash.entitlements";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6; CURRENT_PROJECT_VERSION = 9;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = S99A5B637C; DEVELOPMENT_TEAM = S99A5B637C;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
@@ -985,8 +1005,8 @@
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
"@executable_path/../../../../Frameworks", "@executable_path/../../../../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 2.0.0; MARKETING_VERSION = 2.1.0;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-framework", "-framework",
SafariServices, SafariServices,
@@ -1007,21 +1027,21 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "macOS (App)/nostash.entitlements"; CODE_SIGN_ENTITLEMENTS = "macOS (App)/nostash.entitlements";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6; CURRENT_PROJECT_VERSION = 9;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = S99A5B637C; DEVELOPMENT_TEAM = S99A5B637C;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Nostash--macOS--Info.plist"; INFOPLIST_FILE = "Nostash--macOS--Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = Nostash; INFOPLIST_KEY_CFBundleDisplayName = Nostash;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSPrincipalClass = NSApplication; INFOPLIST_KEY_NSPrincipalClass = NSApplication;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 2.0.0; MARKETING_VERSION = 2.1.0;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-framework", "-framework",
SafariServices, SafariServices,
@@ -1043,21 +1063,21 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = "macOS (App)/nostash.entitlements"; CODE_SIGN_ENTITLEMENTS = "macOS (App)/nostash.entitlements";
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 6; CURRENT_PROJECT_VERSION = 9;
DEAD_CODE_STRIPPING = YES; DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = S99A5B637C; DEVELOPMENT_TEAM = S99A5B637C;
ENABLE_HARDENED_RUNTIME = YES; ENABLE_HARDENED_RUNTIME = YES;
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Nostash--macOS--Info.plist"; INFOPLIST_FILE = "Nostash--macOS--Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = Nostash; INFOPLIST_KEY_CFBundleDisplayName = Nostash;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSPrincipalClass = NSApplication; INFOPLIST_KEY_NSPrincipalClass = NSApplication;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/../Frameworks", "@executable_path/../Frameworks",
); );
MACOSX_DEPLOYMENT_TARGET = 13.0; MACOSX_DEPLOYMENT_TARGET = 15.0;
MARKETING_VERSION = 2.0.0; MARKETING_VERSION = 2.1.0;
OTHER_LDFLAGS = ( OTHER_LDFLAGS = (
"-framework", "-framework",
SafariServices, SafariServices,

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1630"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "Automatic">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "941B03AE296FA90400CA291E"
BuildableName = "Nostash.app"
BlueprintName = "Nostash (iOS)"
ReferencedContainer = "container:Nostash.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "941B03AE296FA90400CA291E"
BuildableName = "Nostash.app"
BlueprintName = "Nostash (iOS)"
ReferencedContainer = "container:Nostash.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "941B03AE296FA90400CA291E"
BuildableName = "Nostash.app"
BlueprintName = "Nostash (iOS)"
ReferencedContainer = "container:Nostash.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -1,21 +1,28 @@
# Nostash # Nostash
This is a [NIP-07][nip07] compatible extension for signing [Nostr][Nostr] events. Nostash is a [NIP-07][nip07] compatible Safari extension for signing [Nostr][Nostr] events that works on iPhone, iPad, and Mac.
## Features ## Features
- Login with Nostr (`getPublicKey`). - Login with Nostr (`getPublicKey`).
- Post Nostr event (`signEvent`). - Post Nostr event (`signEvent`).
- Encrypted direct messages (`nip04.encrypt` and `nip04.decrypt`). - Encryption and decryption (`nip44.encrypt`, `nip44.decrypt`, `nip04.encrypt`, `nip04.decrypt`).
- Multiple profiles. - Multiple profiles.
## Requirements
- iOS 18+
- iPadOS 18+
- macOS 15+
- Safari 18+
## Installation ## Installation
Available on [TestFlight](https://testflight.apple.com/join/8TFMZbMs). Download on the [App Store](https://apps.apple.com/app/nostash/id6744309333) for stable releases and [TestFlight](https://testflight.apple.com/join/8TFMZbMs) for beta releases.
<p align="center"> <p align="center">
<a href="https://testflight.apple.com/join/8TFMZbMs"> <a href="https://apps.apple.com/us/app/nostash/id6744309333">
<img src="/extras/app-store-badge-small.svg" alt="TestFlight Download" /> <img src="/extras/app-store-badge-small.svg" alt="App Store Download" />
</a> </a>
</p> </p>

View File

@@ -9,51 +9,54 @@ import SwiftUI
struct MainView: View { struct MainView: View {
var body: some View { var body: some View {
VStack { NavigationStack {
NavigationStack { Image("bigicon").resizable().frame(width: 150.0, height: 150.0)
Image("bigicon").resizable().frame(width: 150.0, height: 150.0) Text("Nostash").font(.title)
Text("Nostash").font(.title) Text("A Safari Nostr Extension").font(.title2)
Text("A Safari Nostr Extension").font(.title2) NavigationLink("Privacy Policy") {
NavigationLink("Privacy Policy") { PrivacyPolicyView()
PrivacyPolicyView()
}
#if macOS
.buttonStyle(.link)
#endif
.padding(.all, 3.0)
NavigationLink("Getting Started: iPhone") {
GettingStartediPhone()
}
#if macOS
.buttonStyle(.link)
#endif
.padding(.all, 3.0)
NavigationLink("Getting Started: iPad") {
GettingStartediPad()
}
#if macOS
.buttonStyle(.link)
#endif
.padding(.all, 3.0)
NavigationLink("Getting Started: Mac") {
GettingStartedMac()
}
#if macOS
.buttonStyle(.link)
#endif
.padding(.all, 3.0)
NavigationLink("Tips and Tricks") {
TipsAndTricks()
}
#if macOS
.buttonStyle(.link)
#endif
.padding(.all, 3.0)
} }
#if os(macOS)
.buttonStyle(.link)
#endif
.padding(.all, 3.0)
NavigationLink("Getting Started: iPhone") {
GettingStartediPhone()
}
#if os(macOS)
.buttonStyle(.link)
#endif
.padding(.all, 3.0)
NavigationLink("Getting Started: iPad") {
GettingStartediPad()
}
#if os(macOS)
.buttonStyle(.link)
#endif
.padding(.all, 3.0)
NavigationLink("Getting Started: Mac") {
GettingStartedMac()
}
#if os(macOS)
.buttonStyle(.link)
#endif
.padding(.all, 3.0)
NavigationLink("Tips and Tricks") {
TipsAndTricks()
}
#if os(macOS)
.buttonStyle(.link)
#endif
.padding(.all, 3.0)
}
.toolbar {
// There is a macOS bug where the back button overlaps the title in the navigation bar.
// Adding an empty Text element fixes the issue apparently.
Text("")
} }
} }
} }

View File

@@ -10,11 +10,11 @@ import SwiftUI
@main @main
struct NostashApp: App { struct NostashApp: App {
var body: some Scene { var body: some Scene {
WindowGroup("Nostash") { WindowGroup {
MainView() MainView()
} }
#if macOS #if os(macOS)
.defaultSize(width: 400, height: 500) .defaultSize(width: 400, height: 500)
#endif #endif
} }
} }

View File

@@ -1,6 +1,7 @@
import { import {
nip04, nip04,
nip19, nip19,
nip44,
generateSecretKey, generateSecretKey,
getPublicKey, getPublicKey,
finalizeEvent, finalizeEvent,
@@ -57,6 +58,8 @@ browser.runtime.onMessage.addListener((message, _sender, sendResponse) => {
case 'signEvent': case 'signEvent':
case 'nip04.encrypt': case 'nip04.encrypt':
case 'nip04.decrypt': case 'nip04.decrypt':
case 'nip44.encrypt':
case 'nip44.decrypt':
case 'getRelays': case 'getRelays':
validations[uuid] = sendResponse; validations[uuid] = sendResponse;
ask(uuid, message); ask(uuid, message);
@@ -153,6 +156,12 @@ function complete({ payload, origKind, event, remember, host }) {
case 'nip04.decrypt': case 'nip04.decrypt':
nip04Decrypt(event).then(e => sendResponse(e)); nip04Decrypt(event).then(e => sendResponse(e));
break; break;
case 'nip44.encrypt':
nip44Encrypt(event).then(e => sendResponse(e));
break;
case 'nip44.decrypt':
nip44Decrypt(event).then(e => sendResponse(e));
break;
case 'getRelays': case 'getRelays':
getRelays().then(e => sendResponse(e)); getRelays().then(e => sendResponse(e));
break; break;
@@ -237,6 +246,18 @@ async function nip04Decrypt({ pubKey, cipherText }) {
return nip04.decrypt(privKey, pubKey, cipherText); return nip04.decrypt(privKey, pubKey, cipherText);
} }
async function nip44Encrypt({ pubKey, plainText }) {
let privKey = await getPrivKey();
let conversationKey = nip44.getConversationKey(privKey, pubKey)
return nip44.encrypt(plainText, conversationKey);
}
async function nip44Decrypt({ pubKey, cipherText }) {
let privKey = await getPrivKey();
let conversationKey = nip44.getConversationKey(privKey, pubKey)
return nip44.decrypt(cipherText, conversationKey);
}
async function getRelays() { async function getRelays() {
let profile = await currentProfile(); let profile = await currentProfile();
let relays = profile.relays; let relays = profile.relays;

View File

@@ -9,6 +9,8 @@ window.addEventListener('message', async message => {
'getRelays', 'getRelays',
'nip04.encrypt', 'nip04.encrypt',
'nip04.decrypt', 'nip04.decrypt',
'nip44.encrypt',
'nip44.decrypt',
]; ];
let { kind, reqId, payload } = message.data; let { kind, reqId, payload } = message.data;
if (!validEvents.includes(kind)) return; if (!validEvents.includes(kind)) return;

View File

@@ -3,7 +3,7 @@
"default_locale": "en", "default_locale": "en",
"name": "__MSG_extension_name__", "name": "__MSG_extension_name__",
"description": "__MSG_extension_description__", "description": "__MSG_extension_description__",
"version": "2.0.0", "version": "2.1.0",
"icons": { "icons": {
"48": "images/icon-48.png", "48": "images/icon-48.png",
"96": "images/icon-96.png", "96": "images/icon-96.png",
@@ -18,7 +18,8 @@
"content_scripts": [ "content_scripts": [
{ {
"js": ["content.build.js"], "js": ["content.build.js"],
"matches": ["<all_urls>"] "matches": ["<all_urls>"],
"run_at": "document_end"
} }
], ],
"action": { "action": {
@@ -57,7 +58,7 @@
}, },
"browser_specific_settings": { "browser_specific_settings": {
"safari": { "safari": {
"strict_min_version": "15.4" "strict_min_version": "18.0"
} }
} }
} }

View File

@@ -42,6 +42,22 @@ window.nostr = {
}); });
}, },
}, },
nip44: {
async encrypt(pubKey, plainText) {
return await window.nostr.broadcast('nip44.encrypt', {
pubKey,
plainText,
});
},
async decrypt(pubKey, cipherText) {
return await window.nostr.broadcast('nip44.decrypt', {
pubKey,
cipherText,
});
},
},
}; };
window.addEventListener('message', message => { window.addEventListener('message', message => {
@@ -51,6 +67,8 @@ window.addEventListener('message', message => {
'getRelays', 'getRelays',
'nip04.encrypt', 'nip04.encrypt',
'nip04.decrypt', 'nip04.decrypt',
'nip44.encrypt',
'nip44.decrypt',
].map(e => `return_${e}`); ].map(e => `return_${e}`);
let { kind, reqId, payload } = message.data; let { kind, reqId, payload } = message.data;

View File

@@ -71,9 +71,13 @@ Alpine.data('permission', () => ({
case 'getRelays': case 'getRelays':
return 'Read relay list'; return 'Read relay list';
case 'nip04.encrypt': case 'nip04.encrypt':
return 'Encrypt private message'; return 'Encrypt private message (NIP-04)';
case 'nip04.decrypt': case 'nip04.decrypt':
return 'Decrypt private message'; return 'Decrypt private message (NIP-04)';
case 'nip44.encrypt':
return 'Encrypt private message (NIP-44)';
case 'nip44.decrypt':
return 'Decrypt private message (NIP-44)';
default: default:
break; break;
} }

View File

@@ -4,64 +4,157 @@ export const RECOMMENDED_RELAYS = [
new URL('wss://relay.damus.io'), new URL('wss://relay.damus.io'),
new URL('wss://relay.snort.social'), new URL('wss://relay.snort.social'),
new URL('wss://nos.lol'), new URL('wss://nos.lol'),
new URL('wss://brb.io'), new URL('wss://relay.primal.net'),
new URL('wss://relay.nostr.band'),
new URL('wss://nostr.orangepill.dev'), new URL('wss://nostr.orangepill.dev'),
]; ];
// prettier-ignore // prettier-ignore
export const KINDS = [ export const KINDS = [
[0, 'Metadata', 'https://github.com/nostr-protocol/nips/blob/master/01.md'], [0, 'User Metadata', 'https://github.com/nostr-protocol/nips/blob/master/01.md'],
[1, 'Text', 'https://github.com/nostr-protocol/nips/blob/master/01.md'], [1, 'Short Text Note', 'https://github.com/nostr-protocol/nips/blob/master/10.md'],
[2, 'Recommend Relay', 'https://github.com/nostr-protocol/nips/blob/master/01.md'], [2, 'Recommend Relay', null],
[3, 'Contacts', 'https://github.com/nostr-protocol/nips/blob/master/02.md'], [3, 'Follows', 'https://github.com/nostr-protocol/nips/blob/master/02.md'],
[4, 'Encrypted Direct Messages', 'https://github.com/nostr-protocol/nips/blob/master/04.md'], [4, 'Encrypted Direct Messages', 'https://github.com/nostr-protocol/nips/blob/master/04.md'],
[5, 'Event Deletion', 'https://github.com/nostr-protocol/nips/blob/master/09.md'], [5, 'Event Deletion Request', 'https://github.com/nostr-protocol/nips/blob/master/09.md'],
[6, 'Repost', 'https://github.com/nostr-protocol/nips/blob/master/18.md'], [6, 'Repost', 'https://github.com/nostr-protocol/nips/blob/master/18.md'],
[7, 'Reaction', 'https://github.com/nostr-protocol/nips/blob/master/25.md'], [7, 'Reaction', 'https://github.com/nostr-protocol/nips/blob/master/25.md'],
[8, 'Badge Award', 'https://github.com/nostr-protocol/nips/blob/master/58.md'], [8, 'Badge Award', 'https://github.com/nostr-protocol/nips/blob/master/58.md'],
[9, 'Chat Message', 'https://github.com/nostr-protocol/nips/blob/master/C7.md'],
[10, 'Group Chat Threaded Reply', null],
[11, 'Thread', 'https://github.com/nostr-protocol/nips/blob/master/7D.md'],
[12, 'Group Thread Reply', null],
[13, 'Seal', 'https://github.com/nostr-protocol/nips/blob/master/59.md'],
[14, 'Direct Message', 'https://github.com/nostr-protocol/nips/blob/master/17.md'],
[15, 'File Message', 'https://github.com/nostr-protocol/nips/blob/master/17.md'],
[16, 'Generic Repost', 'https://github.com/nostr-protocol/nips/blob/master/18.md'], [16, 'Generic Repost', 'https://github.com/nostr-protocol/nips/blob/master/18.md'],
[17, 'Reaction to a website', 'https://github.com/nostr-protocol/nips/blob/master/25.md'],
[20, 'Picture', 'https://github.com/nostr-protocol/nips/blob/master/68.md'],
[21, 'Video Event', 'https://github.com/nostr-protocol/nips/blob/master/71.md'],
[22, 'Short-form Portrait Video Event', 'https://github.com/nostr-protocol/nips/blob/master/71.md'],
[30, 'internal reference', 'https://wikistr.com/nkbip-03*fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1'],
[31, 'external web reference', 'https://wikistr.com/nkbip-03*fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1'],
[32, 'hardcopy reference', 'https://wikistr.com/nkbip-03*fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1'],
[33, 'prompt reference', 'https://wikistr.com/nkbip-03*fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1'],
[40, 'Channel Creation', 'https://github.com/nostr-protocol/nips/blob/master/28.md'], [40, 'Channel Creation', 'https://github.com/nostr-protocol/nips/blob/master/28.md'],
[41, 'Channel Metadata', 'https://github.com/nostr-protocol/nips/blob/master/28.md'], [41, 'Channel Metadata', 'https://github.com/nostr-protocol/nips/blob/master/28.md'],
[42, 'Channel Message', 'https://github.com/nostr-protocol/nips/blob/master/28.md'], [42, 'Channel Message', 'https://github.com/nostr-protocol/nips/blob/master/28.md'],
[43, 'Channel Hide Message', 'https://github.com/nostr-protocol/nips/blob/master/28.md'], [43, 'Channel Hide Message', 'https://github.com/nostr-protocol/nips/blob/master/28.md'],
[44, 'Channel Mute User', 'https://github.com/nostr-protocol/nips/blob/master/28.md'], [44, 'Channel Mute User', 'https://github.com/nostr-protocol/nips/blob/master/28.md'],
[62, 'Request to Vanish', 'https://github.com/nostr-protocol/nips/blob/master/62.md'],
[64, 'Chess (PGN)', 'https://github.com/nostr-protocol/nips/blob/master/64.md'],
[818, 'Merge Requests', 'https://github.com/nostr-protocol/nips/blob/master/54.md'],
[1018, 'Poll Response', 'https://github.com/nostr-protocol/nips/blob/master/88.md'],
[1021, 'Bid', 'https://github.com/nostr-protocol/nips/blob/master/15.md'],
[1022, 'Bid confirmation', 'https://github.com/nostr-protocol/nips/blob/master/15.md'],
[1040, 'OpenTimestamps', 'https://github.com/nostr-protocol/nips/blob/master/03.md'],
[1059, 'Gift Wrap', 'https://github.com/nostr-protocol/nips/blob/master/59.md'],
[1063, 'File Metadata', 'https://github.com/nostr-protocol/nips/blob/master/94.md'], [1063, 'File Metadata', 'https://github.com/nostr-protocol/nips/blob/master/94.md'],
[1068, 'Poll', 'https://github.com/nostr-protocol/nips/blob/master/88.md'],
[1111, 'Comment', 'https://github.com/nostr-protocol/nips/blob/master/22.md'],
[1311, 'Live Chat Message', 'https://github.com/nostr-protocol/nips/blob/master/53.md'], [1311, 'Live Chat Message', 'https://github.com/nostr-protocol/nips/blob/master/53.md'],
[1337, 'Code Snippet', 'https://github.com/nostr-protocol/nips/blob/master/C0.md'],
[1617, 'Patches', 'https://github.com/nostr-protocol/nips/blob/master/34.md'],
[1621, 'Issues', 'https://github.com/nostr-protocol/nips/blob/master/34.md'],
[1622, 'Git Replies (deprecated)', 'https://github.com/nostr-protocol/nips/blob/master/34.md'],
['1630-1633', 'Status', 'https://github.com/nostr-protocol/nips/blob/master/34.md'],
[1971, 'Problem Tracker', 'https://github.com/nostrocket/NIPS/blob/main/Problems.md'],
[1984, 'Reporting', 'https://github.com/nostr-protocol/nips/blob/master/56.md'], [1984, 'Reporting', 'https://github.com/nostr-protocol/nips/blob/master/56.md'],
[1985, 'Label', 'https://github.com/nostr-protocol/nips/blob/master/32.md'], [1985, 'Label', 'https://github.com/nostr-protocol/nips/blob/master/32.md'],
[1986, 'Relay reviews', null],
[1987, 'AI Embeddings / Vector lists', 'https://wikistr.com/nkbip-02*fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1'],
[2003, 'Torrent', 'https://github.com/nostr-protocol/nips/blob/master/35.md'],
[2004, 'Torrent Comment', 'https://github.com/nostr-protocol/nips/blob/master/35.md'],
[2022, 'Coinjoin Pool', 'https://gitlab.com/1440000bytes/joinstr/-/blob/main/NIP.md'],
[4550, 'Community Post Approval', 'https://github.com/nostr-protocol/nips/blob/master/72.md'], [4550, 'Community Post Approval', 'https://github.com/nostr-protocol/nips/blob/master/72.md'],
['5000-5999', 'Job Request', 'https://github.com/nostr-protocol/nips/blob/master/90.md'],
['6000-6999', 'Job Result', 'https://github.com/nostr-protocol/nips/blob/master/90.md'],
[7000, 'Job Feedback', 'https://github.com/nostr-protocol/nips/blob/master/90.md'], [7000, 'Job Feedback', 'https://github.com/nostr-protocol/nips/blob/master/90.md'],
[7374, 'Reserved Cashu Wallet Tokens', 'https://github.com/nostr-protocol/nips/blob/master/60.md'],
[7375, 'Cashu Wallet Tokens', 'https://github.com/nostr-protocol/nips/blob/master/60.md'],
[7376, 'Cashu Wallet History', 'https://github.com/nostr-protocol/nips/blob/master/60.md'],
['9000-9030', 'Group Control Events', 'https://github.com/nostr-protocol/nips/blob/master/29.md'],
[9041, 'Zap Goal', 'https://github.com/nostr-protocol/nips/blob/master/75.md'], [9041, 'Zap Goal', 'https://github.com/nostr-protocol/nips/blob/master/75.md'],
[9321, 'Nutzap', 'https://github.com/nostr-protocol/nips/blob/master/61.md'],
[9467, 'Tidal login', 'https://wikistr.com/tidal-nostr'],
[9734, 'Zap Request', 'https://github.com/nostr-protocol/nips/blob/master/57.md'], [9734, 'Zap Request', 'https://github.com/nostr-protocol/nips/blob/master/57.md'],
[9735, 'Zap', 'https://github.com/nostr-protocol/nips/blob/master/57.md'], [9735, 'Zap', 'https://github.com/nostr-protocol/nips/blob/master/57.md'],
[10000, 'Mute List', 'https://github.com/nostr-protocol/nips/blob/master/51.md'], [9802, 'Highlights', 'https://github.com/nostr-protocol/nips/blob/master/84.md'],
[10001, 'Pin List', 'https://github.com/nostr-protocol/nips/blob/master/51.md'], [10000, 'Mute list', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10001, 'Pin list', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10002, 'Relay List Metadata', 'https://github.com/nostr-protocol/nips/blob/master/65.md'], [10002, 'Relay List Metadata', 'https://github.com/nostr-protocol/nips/blob/master/65.md'],
[10003, 'Bookmark list', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10004, 'Communities list', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10005, 'Public chats list', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10006, 'Blocked relays list', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10007, 'Search relays list', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10009, 'User groups', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10012, 'Favorite relays list', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10013, 'Private event relay list', 'https://github.com/nostr-protocol/nips/blob/master/37.md'],
[10015, 'Interests list', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10019, 'Nutzap Mint Recommendation', 'https://github.com/nostr-protocol/nips/blob/master/61.md'],
[10020, 'Media follows', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10030, 'User emoji list', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10050, 'Relay list to receive DMs', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[10063, 'User server list', 'https://github.com/hzrd149/blossom'],
[10096, 'File storage server list', 'https://github.com/nostr-protocol/nips/blob/master/96.md'],
[10166, 'Relay Monitor Announcement', 'https://github.com/nostr-protocol/nips/blob/master/66.md'],
[13194, 'Wallet Info', 'https://github.com/nostr-protocol/nips/blob/master/47.md'], [13194, 'Wallet Info', 'https://github.com/nostr-protocol/nips/blob/master/47.md'],
[17375, 'Cashu Wallet Event', 'https://github.com/nostr-protocol/nips/blob/master/60.md'],
[21000, 'Lightning Pub RPC', 'https://github.com/shocknet/Lightning.Pub/blob/master/proto/autogenerated/client.md'],
[22242, 'Client Authentication', 'https://github.com/nostr-protocol/nips/blob/master/42.md'], [22242, 'Client Authentication', 'https://github.com/nostr-protocol/nips/blob/master/42.md'],
[23194, 'Wallet Request', 'https://github.com/nostr-protocol/nips/blob/master/47.md'], [23194, 'Wallet Request', 'https://github.com/nostr-protocol/nips/blob/master/47.md'],
[23195, 'Wallet Response', 'https://github.com/nostr-protocol/nips/blob/master/47.md'], [23195, 'Wallet Response', 'https://github.com/nostr-protocol/nips/blob/master/47.md'],
[24133, 'Nostr Connect', 'https://github.com/nostr-protocol/nips/blob/master/46.md'], [24133, 'Nostr Connect', 'https://github.com/nostr-protocol/nips/blob/master/46.md'],
[24242, 'Blobs stored on mediaservers', 'https://github.com/hzrd149/blossom'],
[27235, 'HTTP Auth', 'https://github.com/nostr-protocol/nips/blob/master/98.md'], [27235, 'HTTP Auth', 'https://github.com/nostr-protocol/nips/blob/master/98.md'],
[30000, 'Categorized People List', 'https://github.com/nostr-protocol/nips/blob/master/51.md'], [30000, 'Follow sets', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[30001, 'Categorized Bookmark List', 'https://github.com/nostr-protocol/nips/blob/master/51.md'], [30001, 'Generic lists', null],
[30002, 'Relay sets', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[30003, 'Bookmark sets', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[30004, 'Curation sets', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[30005, 'Video sets', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[30007, 'Kind mute sets', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[30008, 'Profile Badges', 'https://github.com/nostr-protocol/nips/blob/master/58.md'], [30008, 'Profile Badges', 'https://github.com/nostr-protocol/nips/blob/master/58.md'],
[30009, 'Badge Definition', 'https://github.com/nostr-protocol/nips/blob/master/58.md'], [30009, 'Badge Definition', 'https://github.com/nostr-protocol/nips/blob/master/58.md'],
[30015, 'Interest sets', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[30017, 'Create or update a stall', 'https://github.com/nostr-protocol/nips/blob/master/15.md'], [30017, 'Create or update a stall', 'https://github.com/nostr-protocol/nips/blob/master/15.md'],
[30018, 'Create or update a product', 'https://github.com/nostr-protocol/nips/blob/master/15.md'], [30018, 'Create or update a product', 'https://github.com/nostr-protocol/nips/blob/master/15.md'],
[30023, 'Long-Form Content', 'https://github.com/nostr-protocol/nips/blob/master/23.md'], [30019, 'Marketplace UI/UX', 'https://github.com/nostr-protocol/nips/blob/master/15.md'],
[30020, 'Product sold as an auction', 'https://github.com/nostr-protocol/nips/blob/master/15.md'],
[30023, 'Long-form Content', 'https://github.com/nostr-protocol/nips/blob/master/23.md'],
[30024, 'Draft Long-form Content', 'https://github.com/nostr-protocol/nips/blob/master/23.md'], [30024, 'Draft Long-form Content', 'https://github.com/nostr-protocol/nips/blob/master/23.md'],
[30030, 'Emoji sets', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[30040, 'Curated Publication Index', 'https://wikistr.com/nkbip-01*fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1'],
[30041, 'Curated Publication Content', 'https://wikistr.com/nkbip-01*fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1'],
[30063, 'Release artifact sets', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[30078, 'Application-specific Data', 'https://github.com/nostr-protocol/nips/blob/master/78.md'], [30078, 'Application-specific Data', 'https://github.com/nostr-protocol/nips/blob/master/78.md'],
[30166, 'Relay Discovery', 'https://github.com/nostr-protocol/nips/blob/master/66.md'],
[30267, 'App curation sets', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[30311, 'Live Event', 'https://github.com/nostr-protocol/nips/blob/master/53.md'], [30311, 'Live Event', 'https://github.com/nostr-protocol/nips/blob/master/53.md'],
[30315, 'User Statuses', 'https://github.com/nostr-protocol/nips/blob/master/38.md'], [30315, 'User Statuses', 'https://github.com/nostr-protocol/nips/blob/master/38.md'],
[30388, 'Slide Set', 'https://cornychat.com/datatypes#kind30388slideset'],
[30402, 'Classified Listing', 'https://github.com/nostr-protocol/nips/blob/master/99.md'], [30402, 'Classified Listing', 'https://github.com/nostr-protocol/nips/blob/master/99.md'],
[30403, 'Draft Classified Listing', 'https://github.com/nostr-protocol/nips/blob/master/99.md'], [30403, 'Draft Classified Listing', 'https://github.com/nostr-protocol/nips/blob/master/99.md'],
[30617, 'Repository announcements', 'https://github.com/nostr-protocol/nips/blob/master/34.md'],
[30618, 'Repository state announcements', 'https://github.com/nostr-protocol/nips/blob/master/34.md'],
[30818, 'Wiki article', 'https://github.com/nostr-protocol/nips/blob/master/54.md'],
[30819, 'Redirects', 'https://github.com/nostr-protocol/nips/blob/master/54.md'],
[31234, 'Draft Event', 'https://github.com/nostr-protocol/nips/blob/master/37.md'],
[31388, 'Link Set', 'https://cornychat.com/datatypes#kind31388linkset'],
[31890, 'Feed', 'https://wikifreedia.xyz/cip-01/'],
[31922, 'Date-Based Calendar Event', 'https://github.com/nostr-protocol/nips/blob/master/52.md'], [31922, 'Date-Based Calendar Event', 'https://github.com/nostr-protocol/nips/blob/master/52.md'],
[31923, 'Time-Based Calendar Event', 'https://github.com/nostr-protocol/nips/blob/master/52.md'], [31923, 'Time-Based Calendar Event', 'https://github.com/nostr-protocol/nips/blob/master/52.md'],
[31924, 'Calendar', 'https://github.com/nostr-protocol/nips/blob/master/52.md'], [31924, 'Calendar', 'https://github.com/nostr-protocol/nips/blob/master/52.md'],
[31925, 'Calendar Event RSVP', 'https://github.com/nostr-protocol/nips/blob/master/52.md'], [31925, 'Calendar Event RSVP', 'https://github.com/nostr-protocol/nips/blob/master/52.md'],
[31989, 'Handler recommendation', 'https://github.com/nostr-protocol/nips/blob/master/89.md'], [31989, 'Handler recommendation', 'https://github.com/nostr-protocol/nips/blob/master/89.md'],
[31990, 'Handler information', 'https://github.com/nostr-protocol/nips/blob/master/89.md'], [31990, 'Handler information', 'https://github.com/nostr-protocol/nips/blob/master/89.md'],
[32267, 'Software Application', null],
[34550, 'Community Definition', 'https://github.com/nostr-protocol/nips/blob/master/72.md'], [34550, 'Community Definition', 'https://github.com/nostr-protocol/nips/blob/master/72.md'],
[38383, 'Peer-to-peer Order events', 'https://github.com/nostr-protocol/nips/blob/master/69.md'],
['39000-9', 'Group metadata events', 'https://github.com/nostr-protocol/nips/blob/master/29.md'],
[39089, 'Starter packs', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[39092, 'Media starter packs', 'https://github.com/nostr-protocol/nips/blob/master/51.md'],
[39701, 'Web bookmarks', 'https://github.com/nostr-protocol/nips/blob/master/B0.md'],
]; ];
export async function initialize() { export async function initialize() {
@@ -257,9 +350,13 @@ export function humanPermission(p) {
case 'getRelays': case 'getRelays':
return 'Read relay list'; return 'Read relay list';
case 'nip04.encrypt': case 'nip04.encrypt':
return 'Encrypt private message'; return 'Encrypt private message (NIP-04)';
case 'nip04.decrypt': case 'nip04.decrypt':
return 'Decrypt private message'; return 'Decrypt private message (NIP-04)';
case 'nip44.encrypt':
return 'Encrypt private message (NIP-44)';
case 'nip44.decrypt':
return 'Decrypt private message (NIP-44)';
default: default:
return 'Unknown'; return 'Unknown';
} }

617
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "nostash", "name": "nostash",
"version": "1.2.0", "version": "2.1.0",
"description": "", "description": "",
"source": [ "source": [
"background.js", "background.js",
@@ -14,8 +14,8 @@
"watch-tailwind": "tailwindcss -i './Shared (Extension)/Resources/options.css' -o './Shared (Extension)/Resources/options.build.css' --watch", "watch-tailwind": "tailwindcss -i './Shared (Extension)/Resources/options.css' -o './Shared (Extension)/Resources/options.build.css' --watch",
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
}, },
"author": "", "author": "Terry Yiu (https://tyiu.xyz)",
"license": "ISC", "license": "MIT",
"dependencies": { "dependencies": {
"@alpinejs/csp": "^3.14.1", "@alpinejs/csp": "^3.14.1",
"alpinejs": "^3.14.1", "alpinejs": "^3.14.1",