Release v1.1.3 - Add NIP-49 ncryptsec export feature
- Add ncryptsec page for exporting encrypted private keys (NIP-49) - Implement password-based encryption using scrypt + XChaCha20-Poly1305 - Display QR code for easy mobile scanning of encrypted key - Add click-to-copy functionality for ncryptsec string - Add privkeyToNcryptsec() method to NostrHelper using nostr-tools nip49 Files modified: - projects/common/src/lib/helpers/nostr-helper.ts - projects/chrome/src/app/app.routes.ts - projects/chrome/src/app/components/edit-identity/keys/keys.component.* - projects/chrome/src/app/components/edit-identity/ncryptsec/ (new) - projects/firefox/src/app/app.routes.ts - projects/firefox/src/app/components/edit-identity/keys/keys.component.* - projects/firefox/src/app/components/edit-identity/ncryptsec/ (new) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<div class="header-pane">
|
||||
<lib-icon-button
|
||||
icon="chevron-left"
|
||||
(click)="navigateBack()"
|
||||
></lib-icon-button>
|
||||
<span>Get ncryptsec</span>
|
||||
</div>
|
||||
|
||||
<p class="description">
|
||||
Enter a password to encrypt your private key. The resulting ncryptsec can be
|
||||
used to securely backup or transfer your key.
|
||||
</p>
|
||||
|
||||
<!-- PASSWORD INPUT -->
|
||||
<div class="password-section">
|
||||
<label for="ncryptsecPasswordInput">Password</label>
|
||||
<div class="input-group sam-mt-h">
|
||||
<input
|
||||
id="ncryptsecPasswordInput"
|
||||
type="password"
|
||||
class="form-control"
|
||||
placeholder="Enter encryption password"
|
||||
[(ngModel)]="ncryptsecPassword"
|
||||
[disabled]="isGenerating"
|
||||
(keyup.enter)="generateNcryptsec()"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="btn btn-primary generate-btn"
|
||||
type="button"
|
||||
(click)="generateNcryptsec()"
|
||||
[disabled]="!ncryptsecPassword || isGenerating"
|
||||
>
|
||||
@if (isGenerating) {
|
||||
<span class="spinner-border spinner-border-sm" role="status"></span>
|
||||
Generating...
|
||||
} @else {
|
||||
Generate ncryptsec
|
||||
}
|
||||
</button>
|
||||
|
||||
<!-- NCRYPTSEC OUTPUT -->
|
||||
@if (ncryptsec) {
|
||||
<div class="result-section">
|
||||
<!-- QR Code -->
|
||||
<div class="qr-container">
|
||||
<img [src]="ncryptsecQr" alt="ncryptsec QR code" class="qr-code" />
|
||||
</div>
|
||||
|
||||
<!-- ncryptsec text -->
|
||||
<div class="ncryptsec-container">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control ncryptsec-output"
|
||||
[value]="ncryptsec"
|
||||
readonly
|
||||
(click)="copyToClipboard(ncryptsec); toast.show('Copied to clipboard')"
|
||||
title="Click to copy"
|
||||
/>
|
||||
<button
|
||||
class="btn btn-outline-secondary"
|
||||
type="button"
|
||||
(click)="copyToClipboard(ncryptsec); toast.show('Copied to clipboard')"
|
||||
>
|
||||
<i class="bi bi-copy"></i> Copy
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<p class="hint">Tap the text or button to copy to clipboard</p>
|
||||
</div>
|
||||
}
|
||||
|
||||
<lib-toast #toast [bottom]="16"></lib-toast>
|
||||
Reference in New Issue
Block a user