mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-05 20:48:24 +00:00
- Add backup/restore for cataloged installed apps as encrypted AppStack (kind 30267) - New service: installed_apps_backup_service with backup + restore providers - Backup: saves addressable IDs to Nostr social relays via NIP-44 encryption - Restore: fetches from relays, decrypts, resolves to App models; full-screen route - Profile Data Management: Backup and Restore tiles (sign-in required) - Restore screen: sections "To install" / "Already installed", Install All button - Exclude backup identifier from bookmark/stack picker (bookmark_widgets) - UpdateAllRow: optional label for "Install All" in restore screen - Add /profile/restore route; no back arrow (matches app navigation style) Co-authored-by: Cursor <cursoragent@cursor.com>
53 lines
1.7 KiB
Dart
53 lines
1.7 KiB
Dart
/// Application identifier for Zapstore itself
|
|
const kZapstoreAppIdentifier = 'dev.zapstore.app';
|
|
|
|
/// Zapstore's public key for relay-signed apps
|
|
const kZapstorePubkey =
|
|
'78ce6faa72264387284e647ba6938995735ec8c7d5c5a65737e55130f026307d';
|
|
|
|
/// Franzap's public key for curation sets
|
|
const kFranzapPubkey =
|
|
'726a1e261cc6474674e8285e3951b3bb139be9a773d1acf49dc868db861a1c11';
|
|
|
|
/// Identifier for storing user saved apps
|
|
const kAppBookmarksIdentifier = 'zapstore-bookmarks';
|
|
|
|
/// Identifier for encrypted backup of installed apps
|
|
const kInstalledAppsBackupIdentifier = 'zapstore-installed';
|
|
|
|
/// Event filter for app stacks - excludes saved apps and stacks with zero App references
|
|
bool appStackEventFilter(Map<String, dynamic> event) {
|
|
final tags = event['tags'] as List<dynamic>?;
|
|
if (tags == null) return false;
|
|
|
|
// Check for saved apps / backup identifiers in 'd' tag (exclude from public stacks)
|
|
for (final tag in tags) {
|
|
if (tag is List && tag.isNotEmpty && tag[0] == 'd') {
|
|
if (tag.length > 1 &&
|
|
(tag[1] == kAppBookmarksIdentifier ||
|
|
tag[1] == kInstalledAppsBackupIdentifier)) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Check for at least one 'a' tag starting with '32267:' (App kind)
|
|
for (final tag in tags) {
|
|
if (tag is List && tag.isNotEmpty && tag[0] == 'a') {
|
|
if (tag.length > 1 && tag[1] is String && tag[1].startsWith('32267:')) {
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|
|
// No valid App references found
|
|
return false;
|
|
}
|
|
|
|
/// Amber signer package ID
|
|
const kAmberPackageId = 'com.greenart7c3.nostrsigner';
|
|
|
|
/// Amber signer naddr
|
|
const kAmberNaddr =
|
|
'naddr1qqdkxmmd9enhyet9deshyaphvvejumn0wd68yumfvahx2uszyp6hjpmdntls5n8aa7n7ypzlyjrv0ewch33ml3452wtjx0smhl93jqcyqqq8uzcgpp6ky';
|