use nostrsigner: instead of intents

This commit is contained in:
greenart7c3 2024-04-29 10:07:30 -03:00
parent 047f9de9c5
commit 117ea125f7
No known key found for this signature in database
GPG Key ID: 885822EED3A26A6D

View File

@ -24,14 +24,14 @@ function rejectPending() {
}
export function createNip04EncryptIntent(pubkey: string, plainText: string) {
return `intent:${encodeURIComponent(
return `nostrsigner:${encodeURIComponent(
plainText,
)}#Intent;scheme=nostrsigner;S.pubKey=${pubkey};S.compressionType=none;S.returnType=signature;S.type=nip04_encrypt;end`;
)}?pubKey=${pubkey}&compressionType=none&returnType=signature&type=nip04_encrypt`;
}
export function createNip04DecryptIntent(pubkey: string, data: string) {
return `intent:${encodeURIComponent(
return `nostrsigner:${encodeURIComponent(
data,
)}#Intent;scheme=nostrsigner;S.pubKey=${pubkey};S.compressionType=none;S.returnType=signature;S.type=nip04_decrypt;end`;
)}?pubKey=${pubkey}&compressionType=none&returnType=signature&type=nip04_decrypt`;
}