mirror of
https://github.com/dergigi/boris.git
synced 2026-01-29 19:54:39 +01:00
- Update all applesauce packages from 3.1.0 to 4.0.0 - Add applesauce-factory dependency - Version 4.0.0 includes app-data helpers needed for NIP-78
28 lines
1.6 KiB
TypeScript
28 lines
1.6 KiB
TypeScript
import { EncryptionMethod } from "applesauce-core/helpers";
|
|
import { Emoji } from "applesauce-core/helpers/emoji";
|
|
import { EventOperation } from "../types.js";
|
|
/** Override the event content */
|
|
export declare function setContent(content: string): EventOperation;
|
|
/** Replaces any `@npub` or bare npub mentions with nostr: prefix */
|
|
export declare function repairNostrLinks(): EventOperation;
|
|
/** "p" tag any pubkey mentioned in the content using nostr: links */
|
|
export declare function tagPubkeyMentions(): EventOperation;
|
|
/** Sets the NIP-36 content-warning tag */
|
|
export declare function setContentWarning(warning: boolean | string): EventOperation;
|
|
/** Include "q" quote tags for any nostr event mentioned in the content */
|
|
export declare function includeQuoteTags(): EventOperation;
|
|
/** Adds "t" tags for every #hashtag in the content */
|
|
export declare function includeContentHashtags(): EventOperation;
|
|
/** Adds "emoji" tags for NIP-30 emojis used in the content */
|
|
export declare function includeEmojis(emojis?: Emoji[]): EventOperation;
|
|
export type TextContentOptions = {
|
|
emojis?: Emoji[];
|
|
contentWarning?: boolean | string;
|
|
};
|
|
/** Sets the text for a short text note and include hashtags and mentions */
|
|
export declare function setShortTextContent(content: string, options?: TextContentOptions): EventOperation;
|
|
/** Sets the content to be encrypted to the pubkey with optional override method */
|
|
export declare function setEncryptedContent(pubkey: string, content: string, override?: EncryptionMethod): EventOperation;
|
|
/** Sets the hidden content on an event */
|
|
export declare function setHiddenContent(content: string, override?: EncryptionMethod): EventOperation;
|