mirror of
https://github.com/dergigi/boris.git
synced 2026-01-30 20:24:27 +01:00
- Add project structure with TypeScript, React, and Vite - Implement nostr authentication using browser extension (NIP-07) - Add NIP-51 compliant bookmark fetching and display - Create minimal UI with login and bookmark components - Integrate applesauce-core and applesauce-react libraries - Add responsive styling with dark/light mode support - Include comprehensive README with setup instructions This is a minimal MVP for a nostr bookmark client that allows users to view their bookmarks according to NIP-51 specification.
30 lines
1.8 KiB
TypeScript
30 lines
1.8 KiB
TypeScript
import { EventTemplate, NostrEvent, UnsignedEvent } from "nostr-tools";
|
|
import { EventOperation } from "../types.js";
|
|
/** An operation that removes the signature from the event template */
|
|
export declare function stripSignature<Input extends NostrEvent | UnsignedEvent | EventTemplate>(): EventOperation<Input, Omit<Input, "sig">>;
|
|
/** An operation that removes the id and pubkey from the event template */
|
|
export declare function stripStamp<Input extends NostrEvent | UnsignedEvent | EventTemplate>(): EventOperation<Input, Omit<Input, "id" | "pubkey">>;
|
|
/** An operation that updates the created_at timestamp */
|
|
export declare function updateCreatedAt(): EventOperation;
|
|
/** An operation that removes all symbols from the event */
|
|
export declare function stripSymbols(preserve?: symbol[]): EventOperation;
|
|
/** Ensures parameterized replaceable kinds have "d" tags */
|
|
export declare function includeReplaceableIdentifier(identifier?: string | (() => string)): EventOperation;
|
|
/** Includes a NIP-31 alt tag in an events public tags */
|
|
export declare function includeAltTag(description: string): EventOperation;
|
|
/** Sets the NIP-40 expiration timestamp for an event */
|
|
export declare function setExpirationTimestamp(timestamp: number): EventOperation;
|
|
/** Adds or removes the NIP-70 "-" tag from an event */
|
|
export declare function setProtected(set?: boolean): EventOperation;
|
|
/** Options for {@link setMetaTags} */
|
|
export type MetaTagOptions = {
|
|
/** Unix timestamp when the event expires */
|
|
expiration?: number;
|
|
/** Whether the event is protected (can only be published by author) */
|
|
protected?: boolean;
|
|
/** Alt description for clients that can't render the event */
|
|
alt?: string;
|
|
};
|
|
/** Creates the necessary operations for meta tag options */
|
|
export declare function setMetaTags(options?: MetaTagOptions): EventOperation;
|