mirror of
https://github.com/nostr-connect/connect.git
synced 2025-12-18 13:34:20 +01:00
Use ephemeral kind 24133
This commit is contained in:
@@ -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]],
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user