diff options
Diffstat (limited to 'src/nostr-login.js')
| -rw-r--r-- | src/nostr-login.js | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/nostr-login.js b/src/nostr-login.js index 6958da0..b032c73 100644 --- a/src/nostr-login.js +++ b/src/nostr-login.js @@ -270,11 +270,3 @@ export async function walletForSigner(signer) { // request with a nostr key. `u` and `method` bind the signature to this exact // request and `payload` to its body, so a captured header can't be replayed // against a different endpoint or a tampered body. -export async function nip98Header(signer, url, method, bodyText) { - const tags = [['u', url], ['method', method.toUpperCase()]]; - if (bodyText) tags.push(['payload', hex.encode(sha256(new TextEncoder().encode(bodyText)))]); - const evt = await signer.signEvent({ - kind: 27235, created_at: Math.floor(Date.now() / 1000), tags, content: '', - }); - return 'Nostr ' + btoa(JSON.stringify(evt)); -} |
