UNPKG

nostr-nsec-seedphrase

Version:

A comprehensive TypeScript library for Nostr key management with BIP39 seed phrases, supporting both ESM and CommonJS. Implements NIP-01, NIP-06, NIP-19, and NIP-26 with key generation, event signing, bech32 encoding/decoding, and secure cryptographic ope

25 lines (23 loc) 738 B
<!DOCTYPE html> <html> <head> <title>Nostr NSEC Seedphrase Browser Test</title> </head> <body> <h1>Nostr NSEC Seedphrase Browser Test</h1> <button onclick="generateKeys()">Generate New Keys</button> <pre id="output"></pre> <script src="../dist/browser/nostr-nsec-seedphrase.min.js"></script> <script> function generateKeys() { const output = document.getElementById('output'); try { const keyPair = NostrNsecSeedphrase.generateKeyPairWithSeed(); output.textContent = JSON.stringify(keyPair, null, 2); } catch (error) { output.textContent = 'Error: ' + error.message; } } </script> </body> </html>