Use ephemeral kind 24133

This commit is contained in:
tiero
2023-01-23 12:15:21 +01:00
parent 1a08afc318
commit 2bb4d37287
2 changed files with 4 additions and 3 deletions

View File

@@ -70,7 +70,7 @@ export class NostrRPC {
return new Promise<void>((resolve, reject) => {
const sub = relay.sub([
{
kinds: [4],
kinds: [24133],
authors: [target],
'#p': [this.self.pubkey],
limit: 1,
@@ -116,7 +116,7 @@ export class NostrRPC {
const sub = relay.sub([
{
kinds: [4],
kinds: [24133],
'#p': [this.self.pubkey],
since: now(),
} as Filter,
@@ -231,7 +231,7 @@ export async function prepareEvent(
const cipherText = await nip04.encrypt(secretKey, pubkey, content);
const event: Event = {
kind: 4,
kind: 24133,
created_at: now(),
pubkey: getPublicKey(secretKey),
tags: [['p', pubkey]],

View File

@@ -130,6 +130,7 @@ describe('Nostr Connect', () => {
// define how to comnsume the event
remoteHandler.events.on('sign_event_request', (event: Event) => {
console.log(event.pubkey);
// ⚠️⚠️⚠️ IMPORTANT: always check if the app is connected
//if (!remoteHandler.isConnected(event.pubkey)) return;
// assume user clicks on approve button on the UI