prettier, update to the dependencies (latest), remove nip26 and its artifacts, cleanup and renew
This commit is contained in:
@@ -9,59 +9,59 @@ export const RECOMMENDED_RELAYS = [
|
||||
];
|
||||
// prettier-ignore
|
||||
export const KINDS = [
|
||||
[0, 'Metadata', 'https://github.com/nostr-protocol/nips/blob/master/01.md'],
|
||||
[1, 'Text', 'https://github.com/nostr-protocol/nips/blob/master/01.md'],
|
||||
[2, 'Recommend Relay', 'https://github.com/nostr-protocol/nips/blob/master/01.md'],
|
||||
[3, 'Contacts', 'https://github.com/nostr-protocol/nips/blob/master/02.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'],
|
||||
[6, 'Repost', 'https://github.com/nostr-protocol/nips/blob/master/18.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'],
|
||||
[16, 'Generic Repost', 'https://github.com/nostr-protocol/nips/blob/master/18.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'],
|
||||
[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'],
|
||||
[44, 'Channel Mute User', 'https://github.com/nostr-protocol/nips/blob/master/28.md'],
|
||||
[1063, 'File Metadata', 'https://github.com/nostr-protocol/nips/blob/master/94.md'],
|
||||
[1311, 'Live Chat Message', 'https://github.com/nostr-protocol/nips/blob/master/53.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'],
|
||||
[4550, 'Community Post Approval', 'https://github.com/nostr-protocol/nips/blob/master/72.md'],
|
||||
[7000, 'Job Feedback', 'https://github.com/nostr-protocol/nips/blob/master/90.md'],
|
||||
[9041, 'Zap Goal', 'https://github.com/nostr-protocol/nips/blob/master/75.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'],
|
||||
[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'],
|
||||
[13194, 'Wallet Info', 'https://github.com/nostr-protocol/nips/blob/master/47.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'],
|
||||
[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'],
|
||||
[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'],
|
||||
[30001, 'Categorized Bookmark List', 'https://github.com/nostr-protocol/nips/blob/master/51.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'],
|
||||
[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'],
|
||||
[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'],
|
||||
[30078, 'Application-specific Data', 'https://github.com/nostr-protocol/nips/blob/master/78.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'],
|
||||
[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'],
|
||||
[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'],
|
||||
[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'],
|
||||
[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'],
|
||||
[34550, 'Community Definition', 'https://github.com/nostr-protocol/nips/blob/master/72.md'],
|
||||
[0, 'Metadata', 'https://github.com/nostr-protocol/nips/blob/master/01.md'],
|
||||
[1, 'Text', 'https://github.com/nostr-protocol/nips/blob/master/01.md'],
|
||||
[2, 'Recommend Relay', 'https://github.com/nostr-protocol/nips/blob/master/01.md'],
|
||||
[3, 'Contacts', 'https://github.com/nostr-protocol/nips/blob/master/02.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'],
|
||||
[6, 'Repost', 'https://github.com/nostr-protocol/nips/blob/master/18.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'],
|
||||
[16, 'Generic Repost', 'https://github.com/nostr-protocol/nips/blob/master/18.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'],
|
||||
[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'],
|
||||
[44, 'Channel Mute User', 'https://github.com/nostr-protocol/nips/blob/master/28.md'],
|
||||
[1063, 'File Metadata', 'https://github.com/nostr-protocol/nips/blob/master/94.md'],
|
||||
[1311, 'Live Chat Message', 'https://github.com/nostr-protocol/nips/blob/master/53.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'],
|
||||
[4550, 'Community Post Approval', 'https://github.com/nostr-protocol/nips/blob/master/72.md'],
|
||||
[7000, 'Job Feedback', 'https://github.com/nostr-protocol/nips/blob/master/90.md'],
|
||||
[9041, 'Zap Goal', 'https://github.com/nostr-protocol/nips/blob/master/75.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'],
|
||||
[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'],
|
||||
[13194, 'Wallet Info', 'https://github.com/nostr-protocol/nips/blob/master/47.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'],
|
||||
[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'],
|
||||
[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'],
|
||||
[30001, 'Categorized Bookmark List', 'https://github.com/nostr-protocol/nips/blob/master/51.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'],
|
||||
[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'],
|
||||
[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'],
|
||||
[30078, 'Application-specific Data', 'https://github.com/nostr-protocol/nips/blob/master/78.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'],
|
||||
[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'],
|
||||
[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'],
|
||||
[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'],
|
||||
[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'],
|
||||
[34550, 'Community Definition', 'https://github.com/nostr-protocol/nips/blob/master/72.md'],
|
||||
];
|
||||
|
||||
export async function initialize() {
|
||||
@@ -87,7 +87,6 @@ async function migrate(version, goal) {
|
||||
if (version === 1) {
|
||||
console.log('migrating to version 2.');
|
||||
let profiles = await getProfiles();
|
||||
profiles.forEach(profile => (profile.delegate = false));
|
||||
await storage.set({ profiles });
|
||||
return version + 1;
|
||||
}
|
||||
@@ -156,7 +155,6 @@ export async function generateProfile(name = 'Default') {
|
||||
privKey: await generatePrivateKey(),
|
||||
hosts: {},
|
||||
relays: [],
|
||||
delegate: false,
|
||||
relayReminder: true,
|
||||
};
|
||||
}
|
||||
@@ -293,13 +291,6 @@ export async function toggleRelayReminder() {
|
||||
await storage.set({ profiles });
|
||||
}
|
||||
|
||||
export async function getDelegator(index) {
|
||||
let profiles = await getProfiles();
|
||||
let profile = profiles[index];
|
||||
console.log(profile);
|
||||
return [profile.delegate, profile.delegator];
|
||||
}
|
||||
|
||||
export async function getNpub() {
|
||||
let index = await getProfileIndex();
|
||||
return await browser.runtime.sendMessage({
|
||||
|
||||
Reference in New Issue
Block a user