nostr-double-ratchet 0.0.25 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Session.d.ts +1 -1
- package/dist/Session.d.ts.map +1 -1
- package/dist/nostr-double-ratchet.es.js +194 -183
- package/dist/nostr-double-ratchet.umd.js +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Session.ts +38 -11
- package/src/types.ts +3 -4
package/src/types.ts
CHANGED
|
@@ -66,6 +66,9 @@ export type Unsubscribe = () => void;
|
|
|
66
66
|
* Function that subscribes to Nostr events matching a filter and calls onEvent for each event.
|
|
67
67
|
*/
|
|
68
68
|
export type NostrSubscribe = (filter: Filter, onEvent: (e: VerifiedEvent) => void) => Unsubscribe;
|
|
69
|
+
export type EncryptFunction = (plaintext: string, pubkey: string) => Promise<string>;
|
|
70
|
+
export type DecryptFunction = (ciphertext: string, pubkey: string) => Promise<string>;
|
|
71
|
+
export type NostrPublish = (event: UnsignedEvent) => Promise<VerifiedEvent>;
|
|
69
72
|
|
|
70
73
|
export type Rumor = UnsignedEvent & { id: string }
|
|
71
74
|
|
|
@@ -100,7 +103,3 @@ export type NostrEvent = {
|
|
|
100
103
|
content: string;
|
|
101
104
|
sig: string;
|
|
102
105
|
}
|
|
103
|
-
|
|
104
|
-
export type EncryptFunction = (plaintext: string, pubkey: string) => Promise<string>;
|
|
105
|
-
export type DecryptFunction = (ciphertext: string, pubkey: string) => Promise<string>;
|
|
106
|
-
export type NostrPublish = (event: UnsignedEvent) => Promise<VerifiedEvent>;
|