Claude 0c81e17964 Add per-relay permissions for kind 22242 client authentication (NIP-42)
Kind 22242 events contain a ["relay", "wss://..."] tag identifying which
relay is requesting authentication. This change makes permissions for these
events per-relay URL rather than global:

- DB: Add `relay` field to ApplicationPermissionsEntity (migration 16→17)
  with a new unique index on (pkKey, type, kind, relay). Non-22242
  permissions keep relay="" to maintain backward compatibility.

- DAO: Add getPermissionForRelay() and getWildcardRelayPermission() for
  relay-specific lookups, plus deletePermissions(key, type, kind, relay)
  and deletePermissionsForKind() helpers.

- AmberUtils: acceptOrRejectPermission() and acceptPermission() accept an
  optional relay parameter. Wildcard "*" clears all relay-specific entries
  for a kind; a specific URL only clears its own entry.

- UI: New BunkerRelayAuthScreen composable shows the relay URL prominently
  and presents a 2-option "Authentication scope" toggle:
  · "This relay only" — stores permission for the specific relay URL
  · "All relays" — stores permission with wildcard "*"
  Both options still include the RememberMyChoice time-based memory control.

- BunkerSingleEventHomeScreen & IntentSingleEventHomeScreen: detect kind
  22242 requests and show BunkerRelayAuthScreen instead of the generic
  BunkerEventData. Permission lookup checks specific relay first, then the
  "*" wildcard fallback.

- SignerProvider (ContentProvider path): kind 22242 checks relay-specific
  permission first, then wildcard, before auto-approving.

- AmberToggles: add optional segmentWidth parameter (default 55.dp) so
  the relay scope toggle can use wider 120dp segments.

https://claude.ai/code/session_01Dm9zoUbbzdJzuXTNdAVhfW
2026-03-08 00:24:53 +00:00
2025-07-12 07:29:27 -03:00
2025-01-06 07:58:39 -03:00
2023-07-26 16:44:33 -03:00
2024-05-08 08:13:46 -03:00
2025-11-07 09:52:02 -03:00
2025-09-15 13:28:01 -03:00
2026-01-30 05:17:48 -03:00
2024-10-30 17:46:57 -03:00
2024-09-04 11:02:03 -03:00
2025-09-17 07:25:51 -03:00
2026-01-30 05:17:48 -03:00
2024-09-16 06:58:05 -03:00
2024-09-16 06:58:05 -03:00
2023-07-26 16:36:23 -03:00
2025-11-28 12:13:44 -03:00
2026-02-09 11:26:11 -03:00

Amber: Nostr event signer for Android

Amber is a nostr event signer for Android. It allows users to keep their nsec segregated in a single, dedicated app. The goal of Amber is to have your smartphone act as a NIP-46 signing device without any need for servers or additional hardware. "Private keys should be exposed to as few systems as possible as each system adds to the attack surface," as the rationale of said NIP states. In addition to native apps, Amber aims to support all current nostr web applications without requiring any extensions or web servers.

GitHub downloads Last Version CI License: Apache-2.0

Current Features

  • Offline
  • Use nip-46 or make an addendum in nip-46
  • Improve the ui (currently its showing a text with the raw json of the event)
  • Check if we can use Amber to sign the events of web applications
  • Change the sign button to just copy the signature of the event
  • Use content provider to sign events in background when you checked the remember my choice option on android
  • Support for multiple accounts

Download and Install

Get it on Zap Store Get it on Obtaininum Get it on GitHub Get it on F-Droid

Contributing

Issues can be logged on: https://gitworkshop.dev/greenart7c3@greenart7c3.com/Amber

GitHub issues and pull requests here are also welcome. Translations can be provided via Crowdin

You can also send patches through Nostr using GitStr to this nostr address

By contributing to this repository, you agree to license your work under the MIT license. Any work contributed where you are not the original author must contain its license header with the original author(s) and source.

Security and Verification

🔐 All releases are cryptographically signed with GPG for your security.

Before installing any APK from our releases, we strongly recommend verifying its authenticity to ensure it hasn't been tampered with.

📋 View Release Verification Guide

The verification process involves:

  1. Importing our GPG public key
  2. Verifying the release manifest signature
  3. Checking file integrity with SHA256 hashes

GPG Key Details:

  • Key ID: 44F0AAEB77F373747E3D5444885822EED3A26A6D
  • Fingerprint: 44F0 AAEB 77F3 7374 7E3D 5444 8858 22EE D3A2 6A6D
  • User ID: greenart7c3 <greenart7c3@proton.me>

Quick verification:

# Import the signing key
gpg --keyserver hkps://keys.openpgp.org --recv-keys 44F0AAEB77F373747E3D5444885822EED3A26A6D

# Verify a release (example for v1.0.0)
gpg --verify manifest-v1.0.0.txt.sig manifest-v1.0.0.txt

⚠️ Security Notice: Only download releases from this official GitHub repository. If GPG verification fails, do not install the APK and report it as a security issue.

Verifying Reproducibility of Amber

To confirm that the Amber build is reproducible, follow these steps:

  1. Run the following command to build the image with no cache and specified version:
docker build -t amber-repro --progress=plain --no-cache --build-arg VERSION=v4.0.2 --build-arg APK_TYPE=free-arm64-v8a .
  1. After the image is built, run the container:
docker run --rm amber-repro
  1. You should see the following message indicating success:
APKs match!

Certificate fingerprint for AppVerifier

com.greenart7c3.nostrsigner
E8:AB:8C:69:33:3B:68:63:6D:D4:6C:E2:42:40:8C:79:55:3A:7F:D9:05:5D:05:4D:61:DA:AB:AB:AD:A5:3B:BF

fdroid

com.greenart7c3.nostrsigner
56:DC:63:19:96:A5:5C:22:84:79:04:48:C7:DC:9F:1D:D0:5D:F5:96:B2:CE:48:82:31:36:33:F5:60:2E:5F:E4

Usage

Check NIP 55 and NIP 46 for more information.

Contributors

S
Description
No description provided
Readme MIT
18 MiB
Languages
Kotlin 93.5%
DM 5.5%
Shell 0.7%
Dockerfile 0.2%
Python 0.1%