File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,35 +161,3 @@ export function isValidPublicKey (publicKey) {
161161 if ( publicKey . length !== 64 ) return false ;
162162 return / ^ [ 0 - 9 a - f A - F ] { 64 } $ / . test ( publicKey ) ;
163163}
164-
165- /**
166- * Convert private key to nsec format (Bech32)
167- * @param {string } privateKeyHex - 64-char hex private key
168- * @returns {string } nsec1... format
169- */
170- export function privateKeyToNsec ( privateKeyHex ) {
171- // TODO: Implement bech32 encoding
172- // For now, return hex with nsec prefix as placeholder
173- return `nsec_${ privateKeyHex } ` ;
174- }
175-
176- /**
177- * Convert nsec to private key hex
178- * @param {string } nsec - nsec1... format
179- * @returns {string } 64-char hex private key
180- */
181- export function nsecToPrivateKey ( nsec ) {
182- // TODO: Implement bech32 decoding
183- // For now, strip nsec_ prefix as placeholder
184- return nsec . replace ( / ^ n s e c _ / , '' ) ;
185- }
186-
187- /**
188- * Convert public key to npub format (Bech32)
189- * @param {string } publicKeyHex - 64-char hex public key
190- * @returns {string } npub1... format
191- */
192- export function publicKeyToNpub ( publicKeyHex ) {
193- // TODO: Implement bech32 encoding
194- return `npub_${ publicKeyHex } ` ;
195- }
You can’t perform that action at this time.
0 commit comments