Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nostr-tools

Package Overview
Dependencies
Maintainers
0
Versions
151
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nostr-tools - npm Package Compare versions

Comparing version 2.9.3 to 2.9.4

8

lib/cjs/nip17.js

@@ -315,9 +315,7 @@ "use strict";

const senderPublicKey = getPublicKey(senderPrivateKey);
const wrappeds = [wrapEvent2(senderPrivateKey, { publicKey: senderPublicKey }, message, conversationTitle, replyTo)];
recipients.forEach((recipient) => {
wrappeds.push(wrapEvent2(senderPrivateKey, recipient, message, conversationTitle, replyTo));
});
return wrappeds;
return [{ publicKey: senderPublicKey }, ...recipients].map(
(recipient) => wrapEvent2(senderPrivateKey, recipient, message, conversationTitle, replyTo)
);
}
var unwrapEvent2 = unwrapEvent;
var unwrapManyEvents2 = unwrapManyEvents;

@@ -286,7 +286,5 @@ // pure.ts

const senderPublicKey = getPublicKey(senderPrivateKey);
const wrappeds = [wrapEvent2(senderPrivateKey, { publicKey: senderPublicKey }, message, conversationTitle, replyTo)];
recipients.forEach((recipient) => {
wrappeds.push(wrapEvent2(senderPrivateKey, recipient, message, conversationTitle, replyTo));
});
return wrappeds;
return [{ publicKey: senderPublicKey }, ...recipients].map(
(recipient) => wrapEvent2(senderPrivateKey, recipient, message, conversationTitle, replyTo)
);
}

@@ -293,0 +291,0 @@ var unwrapEvent2 = unwrapEvent;

@@ -0,1 +1,2 @@

import { NostrEvent } from './pure.ts';
import * as nip59 from './nip59.ts';

@@ -10,6 +11,6 @@ type Recipient = {

};
export declare function wrapEvent(senderPrivateKey: Uint8Array, recipient: Recipient, message: string, conversationTitle?: string, replyTo?: ReplyTo): import("./core.ts").Event;
export declare function wrapManyEvents(senderPrivateKey: Uint8Array, recipients: Recipient[], message: string, conversationTitle?: string, replyTo?: ReplyTo): import("./core.ts").Event[];
export declare function wrapEvent(senderPrivateKey: Uint8Array, recipient: Recipient, message: string, conversationTitle?: string, replyTo?: ReplyTo): NostrEvent;
export declare function wrapManyEvents(senderPrivateKey: Uint8Array, recipients: Recipient[], message: string, conversationTitle?: string, replyTo?: ReplyTo): NostrEvent[];
export declare const unwrapEvent: typeof nip59.unwrapEvent;
export declare const unwrapManyEvents: typeof nip59.unwrapManyEvents;
export {};

@@ -1,2 +0,2 @@

import { UnsignedEvent, Event } from './core.ts';
import { UnsignedEvent, NostrEvent } from './core.ts';
type Rumor = UnsignedEvent & {

@@ -6,8 +6,8 @@ id: string;

export declare function createRumor(event: Partial<UnsignedEvent>, privateKey: Uint8Array): Rumor;
export declare function createSeal(rumor: Rumor, privateKey: Uint8Array, recipientPublicKey: string): Event;
export declare function createWrap(seal: Event, recipientPublicKey: string): Event;
export declare function wrapEvent(event: Partial<UnsignedEvent>, senderPrivateKey: Uint8Array, recipientPublicKey: string): Event;
export declare function wrapManyEvents(event: Partial<UnsignedEvent>, senderPrivateKey: Uint8Array, recipientsPublicKeys: string[]): Event[];
export declare function unwrapEvent(wrap: Event, recipientPrivateKey: Uint8Array): Rumor;
export declare function unwrapManyEvents(wrappedEvents: Event[], recipientPrivateKey: Uint8Array): Rumor[];
export declare function createSeal(rumor: Rumor, privateKey: Uint8Array, recipientPublicKey: string): NostrEvent;
export declare function createWrap(seal: NostrEvent, recipientPublicKey: string): NostrEvent;
export declare function wrapEvent(event: Partial<UnsignedEvent>, senderPrivateKey: Uint8Array, recipientPublicKey: string): NostrEvent;
export declare function wrapManyEvents(event: Partial<UnsignedEvent>, senderPrivateKey: Uint8Array, recipientsPublicKeys: string[]): NostrEvent[];
export declare function unwrapEvent(wrap: NostrEvent, recipientPrivateKey: Uint8Array): Rumor;
export declare function unwrapManyEvents(wrappedEvents: NostrEvent[], recipientPrivateKey: Uint8Array): Rumor[];
export {};
{
"type": "module",
"name": "nostr-tools",
"version": "2.9.3",
"version": "2.9.4",
"description": "Tools for making a Nostr client.",

@@ -106,2 +106,7 @@ "repository": {

},
"./nip17": {
"import": "./lib/esm/nip17.js",
"require": "./lib/cjs/nip17.js",
"types": "./lib/types/nip17.d.ts"
},
"./nip18": {

@@ -108,0 +113,0 @@ "import": "./lib/esm/nip18.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc