applesauce-core 0.0.0-next-20250310200358 → 0.0.0-next-20250311162623
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.
|
@@ -12,6 +12,8 @@ export type HiddenContentSigner = {
|
|
|
12
12
|
};
|
|
13
13
|
/** Various event kinds that can have encrypted tags in their content and which encryption method they use */
|
|
14
14
|
export declare const EventContentEncryptionMethod: Record<number, "nip04" | "nip44">;
|
|
15
|
+
/** Sets the encryption method that is used for the contents of a specific event kind */
|
|
16
|
+
export declare function setEventContentEncryptionMethod(kind: number, method: "nip04" | "nip44"): void;
|
|
15
17
|
/** Checks if an event can have hidden content */
|
|
16
18
|
export declare function canHaveHiddenContent(kind: number): boolean;
|
|
17
19
|
/** Checks if an event has hidden content */
|
|
@@ -5,6 +5,7 @@ export const HiddenContentSymbol = Symbol.for("hidden-content");
|
|
|
5
5
|
export const EventContentEncryptionMethod = {
|
|
6
6
|
// NIP-60 wallet
|
|
7
7
|
17375: "nip44",
|
|
8
|
+
375: "nip44",
|
|
8
9
|
7375: "nip44",
|
|
9
10
|
7376: "nip44",
|
|
10
11
|
// DMs
|
|
@@ -26,6 +27,10 @@ export const EventContentEncryptionMethod = {
|
|
|
26
27
|
[kinds.Curationsets]: "nip04",
|
|
27
28
|
[kinds.Interestsets]: "nip04",
|
|
28
29
|
};
|
|
30
|
+
/** Sets the encryption method that is used for the contents of a specific event kind */
|
|
31
|
+
export function setEventContentEncryptionMethod(kind, method) {
|
|
32
|
+
EventContentEncryptionMethod[kind] = method;
|
|
33
|
+
}
|
|
29
34
|
/** Checks if an event can have hidden content */
|
|
30
35
|
export function canHaveHiddenContent(kind) {
|
|
31
36
|
return EventContentEncryptionMethod[kind] !== undefined;
|