mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-03-17 21:31:52 +01:00
use nostrsigner: instead of intents
This commit is contained in:
parent
047f9de9c5
commit
117ea125f7
@ -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`;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user