vitorpamplona/amethyst
Fork: 139 Star: 945 (更新于 1970-01-01 00:00:00)
license: MIT
Language: Kotlin .
Nostr client for Android
最后发布版本: v0.80.7 ( 2023-11-09 04:00:46)
Amethyst: Nostr client for Android
Amethyst brings the best social network to your Android phone. Just insert your Nostr private key and start posting.
Current Features
- Event Builders / WebSocket Subscriptions (NIP-01)
- Home Feed
- Notifications Feed
- Global Feed
- Replies and mentions (NIP-10)
- Reactions (NIP-25)
- Reposts (NIP-18)
- Image/Video/Url/LnInvoice Previews
- View Threads
- Private Messages (NIP-04)
- User Profiles (edit/follow/unfollow - NIP-02)
- Public Chats (NIP-28)
- Bech Encoding support (NIP-19)
- Notification Dots
- Reporting and Hide User capability (NIP-56)
- Automatic Translations
- Relay Sets (home, dms, public chats, global)
- User/Note Tagging (NIP-08, NIP-10)
- Lightning Tips
- Zaps (private, public, anon, non-zap) (NIP-57)
- URI Support (NIP-21)
- Created_at Limits (NIP-22)
- Event Deletion (NIP-09)
- Nostr Address (NIP-05)
- Long-form Content (NIP-23)
- Parameterized Replaceable Events (NIP-33)
- Online Relay Search (NIP-50)
- Internationalization
- Badges (NIP-58)
- Hashtag Following and Custom Hashtags
- Polls (NIP-69)
- Verifiable static content in URLs (NIP-94)
- Login with QR
- Wallet Connect API (NIP-47)
- Accessible uploads
- Bounty support (nostrbounties.com)
- De-googled F-Droid flavor
- External Identity Support (NIP-39)
- Multiple Accounts
- Markdown Support
- Relay Authentication (NIP-42)
- Content stored in relays themselves (NIP-95)
- Custom Emoji (NIP-30)
- Zap Forwarding (NIP-57)
- Text Note References (NIP-27)
- Audio Tracks (zapstr.live) (Kind:31337)
- Push Notifications (Zaps and Messages)
- Generic Tags (NIP-12)
- Sensitive Content (NIP-36)
- View Individual Reactions (Like, Boost, Zaps, Reports) per Post
- Recommended Application Handlers (NIP-89)
- Events with a Subject (NIP-14)
- Generic Reposts (kind:16)
- Live Activities & Live Chats (NIP-53)
- Relay Pages (NIP-11)
- HTTP Auth (NIP-98)
- Zapraiser (NIP-TBD)
- Moderated Communities (NIP-72)
- Emoji Packs (Kind:30030)
- Personal Emoji Lists (Kind:10030)
- Classifieds (Kind:30403)
- Private Messages and Small Groups (NIP-24)
- Gift Wraps & Seals (NIP-59)
- Versioned Encrypted Payloads (NIP-44)
- Expiration Support (NIP-40)
- Status Event (NIP-38)
- Marketplace (NIP-15)
- Image/Video Capture in the app
- Local Database
- Bookmarks, Pinned Posts, Muted Events (NIP-51)
- Proof of Work in the Phone (NIP-13, NIP-20)
- Workspaces
- Infinity Scroll
- Relay List Metadata (NIP-65)
- Signing Requests (NIP-46)
- Delegated Event Signing (NIP-26)
- Account Creation / Backup Guidance
- Mnemonic seed phrase (NIP-06)
- Message Sent feedback (NIP-20)
- OpenTimestamps Attestations (NIP-03)
Development Overview
Overall Architecture
This is a native Android app made with Kotlin and Jetpack Compose. The app uses a modified version of the nostrpostrlib to talk to Nostr relays. The overall architecture consists of the UI, which uses the usual State/ViewModel/Composition, the service layer that connects with Nostr relays, and the model/repository layer, which keeps all Nostr objects in memory, in a full OO graph.
The repository layer stores Nostr Events as Notes and Users separately. Those classes use LiveData objects to allow the UI and other parts of the app to subscribe to each individual Note/User and receive updates when they happen. They are also responsible for updating viewModels when needed. Filters react to changes in the screen. As the user sees different Events, the Datasource classes are used to receive more information about those particular Events.
Most of the UI is reactive to changes in the repository classes. The service layer assembles Nostr filters for each need of the app, receives the data from the Relay, and sends it to the repository. Connection with relays is never closed during the use of the app. The UI receives a notification that objects were updated. Instances of User and Notes are mutable directly. There will never be two Notes with the same ID or two User instances with the same pubkey.
Lastly, the user's account information (priv key/pub key) is stored in the Android KeyStore for security.
Setup
Make sure to have the following pre-requisites installed:
- Java 17
- Android Studio
- Android 8.0+ Phone or Emulation setup
Fork and clone this repository and import into Android Studio
git clone https://github.com/vitorpamplona/amethyst.git
Use one of the Android Studio builds to install and run the app in your device or a simulator.
Building
Build the app:
./gradlew assembleDebug
Testing
./gradlew test
./gradlew connectedAndroidTest
Linting
./gradlew ktlintCheck
./gradlew ktlintFormat
Installing on device
For the F-Droid build:
./gradlew installFdroidDebug
For the Play build:
./gradlew installPlayDebug
How to Deploy
- Generate a new signing key
keytool -genkey -v -keystore <my-release-key.keystore> -alias <alias_name> -keyalg RSA -keysize 2048 -validity 10000
openssl base64 < <my-release-key.keystore> | tr -d '\n' | tee some_signing_key.jks.base64.txt
- Create four Secret Key variables on your GitHub repository and fill in the signing key information
-
KEY_ALIAS
<-<alias_name>
-
KEY_PASSWORD
<-<your password>
-
KEY_STORE_PASSWORD
<-<your key store password>
-
SIGNING_KEY
<- the data from<my-release-key.keystore>
-
- Change the
versionCode
andversionName
onapp/build.gradle
- Commit and push.
- Tag the commit with
v{x.x.x}
- Let the Create Release GitHub Action build a new
aab
file. - Add your CHANGE LOG to the description of the new release
- Download the
aab
file and upload it to the` PlayStore.
Privacy on Relays & nostr
Your internet protocol (IP) address is exposed to the relays you connect to. If you want to improve your privacy, consider utilizing a service that masks your IP address (e.g. a VPN) from trackers online.
The relay also learns which public keys you are requesting, meaning your public key will be tied to your IP address.
Relays have all your data in raw text. They know your IP, your name, your location (guessed from IP), your pub key, all your contacts, and other relays, and can read every action you do (post, like, boost, quote, report, etc) with the exception of Private Zaps and Private DMs.
DM Privacy
While the content of direct messages (DMs) is only visible to you and your DM counterparty, everyone can see when you and your counterparty DM each other.
Visibility & Permanence of Your Content on nostr
Information Visibility
Content that you share can be shared to other relays. Information that you share publicly is visible to anyone reading from relays that have your information. Your information may also be visible to nostr users who do not share relays with you.
Information Permanence
Information shared on nostr should be assumed permanent for privacy purposes. There is no way to guarantee edit or deletion of any content once posted.
Screenshots
Home Feed | Messages | Live Streams | Notifications |
---|---|---|---|
Contributing
Issues and pull requests are very welcome.
Contributors
MIT License
Copyright (c) 2023 Vitor Pamplona
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
最近版本更新:(数据更新于 1970-01-01 00:00:00)
2023-11-09 04:00:46 v0.80.7
2023-11-08 07:06:04 v0.80.6
2023-11-08 06:08:42 v0.80.5
2023-10-31 06:57:41 v0.80.4
2023-10-29 01:01:05 v0.80.2
2023-10-28 02:28:17 v0.80.1
2023-10-24 01:49:40 v0.79.13
2023-10-22 12:10:00 v0.79.12
2023-10-21 10:17:54 v0.79.10
2023-10-21 06:33:42 v0.79.9
主题(topics):
android, kotlin, nostr, social-network
vitorpamplona/amethyst同语言 Kotlin最近更新仓库
2024-11-19 23:12:26 jellyfin/jellyfin-androidtv
2024-11-18 20:14:29 gkd-kit/gkd
2024-11-11 21:37:35 FooIbar/EhViewer
2024-11-01 20:22:27 EhViewer-NekoInverter/EhViewer
2024-11-01 16:15:30 tiann/KernelSU
2024-10-27 19:26:53 salvogiangri/KnoxPatch