nostr-components 0.2.7 → 0.3.0
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/README.md +105 -185
- package/dist/assets/{base-styles-BSEzBDsk.js → base-styles-DC0ilu4S.js} +3 -3
- package/dist/assets/{base-styles-BSEzBDsk.js.map → base-styles-DC0ilu4S.js.map} +1 -1
- package/dist/assets/{copy-delegation-B7y2q5Kn.js → copy-delegation-CcagQMIW.js} +5 -5
- package/dist/assets/{copy-delegation-B7y2q5Kn.js.map → copy-delegation-CcagQMIW.js.map} +1 -1
- package/dist/assets/{dialog-component-Da1ZIYh9.js → dialog-component-Dqg0QU9I.js} +2 -7
- package/dist/assets/dialog-component-Dqg0QU9I.js.map +1 -0
- package/dist/assets/{dialog-likers-BqDn2P_3.js → dialog-likers-D3c7WIMp.js} +5 -5
- package/dist/assets/dialog-likers-D3c7WIMp.js.map +1 -0
- package/dist/assets/index.esm-ByUtE_cm.js +2159 -0
- package/dist/assets/index.esm-ByUtE_cm.js.map +1 -0
- package/dist/assets/nip05-utils-BNBHUmkr.js.map +1 -1
- package/dist/assets/nostr-login-service-D2FmscPI.js +2 -0
- package/dist/assets/nostr-login-service-D2FmscPI.js.map +1 -0
- package/dist/assets/nostr-service-m3Hgc5Xx.js +266 -0
- package/dist/assets/nostr-service-m3Hgc5Xx.js.map +1 -0
- package/dist/assets/nostr-user-component-XEnanH-d.js +2 -0
- package/dist/assets/nostr-user-component-XEnanH-d.js.map +1 -0
- package/dist/assets/{pure-DPo-pzxM.js → pure-laCRX9eG.js} +2 -2
- package/dist/assets/pure-laCRX9eG.js.map +1 -0
- package/dist/assets/{theme-BN1Bvweb.js → theme-C1r1Zw8r.js} +2 -2
- package/dist/assets/{theme-BN1Bvweb.js.map → theme-C1r1Zw8r.js.map} +1 -1
- package/dist/assets/{user-resolver-CMmbtY9Y.js → user-resolver-DqI5KGh6.js} +2 -2
- package/dist/assets/{user-resolver-CMmbtY9Y.js.map → user-resolver-DqI5KGh6.js.map} +1 -1
- package/dist/assets/utils--bxLbhGF.js.map +1 -1
- package/dist/assets/zap-utils-BZcaCsT_.js +2 -0
- package/dist/assets/zap-utils-BZcaCsT_.js.map +1 -0
- package/dist/components/nostr-comment.es.js +26 -26
- package/dist/components/nostr-comment.es.js.map +1 -1
- package/dist/components/nostr-dm.es.js +2 -2
- package/dist/components/nostr-dm.es.js.map +1 -1
- package/dist/components/nostr-follow-button.es.js +6 -7
- package/dist/components/nostr-follow-button.es.js.map +1 -1
- package/dist/components/nostr-like.es.js +16 -16
- package/dist/components/nostr-like.es.js.map +1 -1
- package/dist/components/nostr-live-chat.es.js +3 -3
- package/dist/components/nostr-live-chat.es.js.map +1 -1
- package/dist/components/nostr-post.es.js +19 -19
- package/dist/components/nostr-post.es.js.map +1 -1
- package/dist/components/nostr-profile-badge.es.js +3 -3
- package/dist/components/nostr-profile-badge.es.js.map +1 -1
- package/dist/components/nostr-profile.es.js +2 -2
- package/dist/components/nostr-profile.es.js.map +1 -1
- package/dist/components/nostr-zap.es.js +24 -24
- package/dist/components/nostr-zap.es.js.map +1 -1
- package/dist/nostr-components.es.js +1 -1
- package/dist/nostr-components.es.js.map +1 -1
- package/dist/nostr-components.umd.js +2644 -305
- package/dist/nostr-components.umd.js.map +1 -1
- package/package.json +5 -2
- package/dist/assets/dark-nostrich-running.gif +0 -0
- package/dist/assets/default_dp-NQ3TGrtT.png +0 -0
- package/dist/assets/default_dp.png +0 -0
- package/dist/assets/default_dp_32.png +0 -0
- package/dist/assets/dialog-component-Da1ZIYh9.js.map +0 -1
- package/dist/assets/dialog-likers-BqDn2P_3.js.map +0 -1
- package/dist/assets/light-nostrich-running.gif +0 -0
- package/dist/assets/nostr-service-CnaPxjc6.js +0 -78
- package/dist/assets/nostr-service-CnaPxjc6.js.map +0 -1
- package/dist/assets/nostr-user-component-Cbs97dlK.js +0 -2
- package/dist/assets/nostr-user-component-Cbs97dlK.js.map +0 -1
- package/dist/assets/pure-DPo-pzxM.js.map +0 -1
- package/dist/assets/zap-utils-KFUD_vTU.js +0 -2
- package/dist/assets/zap-utils-KFUD_vTU.js.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/nostr-comment.d.ts +0 -4
- package/dist/nostr-dm.d.ts +0 -4
- package/dist/nostr-follow-button.d.ts +0 -4
- package/dist/nostr-like.d.ts +0 -4
- package/dist/nostr-live-chat.d.ts +0 -4
- package/dist/nostr-post.d.ts +0 -4
- package/dist/nostr-profile-badge.d.ts +0 -4
- package/dist/nostr-profile.d.ts +0 -4
- package/dist/nostr-zap.d.ts +0 -4
- package/dist/src/base/base-component/nostr-base-component.d.ts +0 -116
- package/dist/src/base/copy-delegation.d.ts +0 -5
- package/dist/src/base/dialog-component/dialog-component.d.ts +0 -67
- package/dist/src/base/dialog-component/style.d.ts +0 -5
- package/dist/src/base/event-component/nostr-event-component.d.ts +0 -53
- package/dist/src/base/render-options.d.ts +0 -5
- package/dist/src/base/resolvers/event-resolver.d.ts +0 -20
- package/dist/src/base/resolvers/user-resolver.d.ts +0 -19
- package/dist/src/base/text-row/render-name.d.ts +0 -7
- package/dist/src/base/text-row/render-nip05.d.ts +0 -1
- package/dist/src/base/text-row/render-npub.d.ts +0 -1
- package/dist/src/base/text-row/render-text-row.d.ts +0 -9
- package/dist/src/base/user-component/nostr-user-component.d.ts +0 -43
- package/dist/src/common/base-styles.d.ts +0 -44
- package/dist/src/common/constants.d.ts +0 -4
- package/dist/src/common/date-utils.d.ts +0 -9
- package/dist/src/common/icons.d.ts +0 -7
- package/dist/src/common/nip05-utils.d.ts +0 -13
- package/dist/src/common/nostr-service.d.ts +0 -40
- package/dist/src/common/theme.d.ts +0 -4
- package/dist/src/common/types.d.ts +0 -1
- package/dist/src/common/utils.d.ts +0 -34
- package/dist/src/index.d.ts +0 -32
- package/dist/src/nostr-comment/nostr-comment.d.ts +0 -60
- package/dist/src/nostr-comment/render.d.ts +0 -15
- package/dist/src/nostr-comment/utils.d.ts +0 -81
- package/dist/src/nostr-dm/nostr-dm.d.ts +0 -34
- package/dist/src/nostr-dm/render.d.ts +0 -15
- package/dist/src/nostr-follow-button/nostr-follow-button.d.ts +0 -24
- package/dist/src/nostr-follow-button/render.d.ts +0 -11
- package/dist/src/nostr-follow-button/style.d.ts +0 -1
- package/dist/src/nostr-like/dialog-help-style.d.ts +0 -1
- package/dist/src/nostr-like/dialog-help.d.ts +0 -2
- package/dist/src/nostr-like/dialog-likers-style.d.ts +0 -1
- package/dist/src/nostr-like/dialog-likers.d.ts +0 -24
- package/dist/src/nostr-like/like-utils.d.ts +0 -52
- package/dist/src/nostr-like/nostr-like.d.ts +0 -49
- package/dist/src/nostr-like/render.d.ts +0 -10
- package/dist/src/nostr-like/style.d.ts +0 -1
- package/dist/src/nostr-live-chat/nostr-live-chat.d.ts +0 -65
- package/dist/src/nostr-live-chat/render.d.ts +0 -31
- package/dist/src/nostr-post/nostr-post.d.ts +0 -25
- package/dist/src/nostr-post/parse-text.d.ts +0 -8
- package/dist/src/nostr-post/render-content.d.ts +0 -5
- package/dist/src/nostr-post/render.d.ts +0 -19
- package/dist/src/nostr-post/style.d.ts +0 -1
- package/dist/src/nostr-profile/nostr-profile.d.ts +0 -24
- package/dist/src/nostr-profile/render-stats.d.ts +0 -1
- package/dist/src/nostr-profile/render.d.ts +0 -22
- package/dist/src/nostr-profile/style.d.ts +0 -1
- package/dist/src/nostr-profile-badge/nostr-profile-badge.d.ts +0 -34
- package/dist/src/nostr-profile-badge/render.d.ts +0 -11
- package/dist/src/nostr-profile-badge/style.d.ts +0 -1
- package/dist/src/nostr-zap/dialog-help-style.d.ts +0 -5
- package/dist/src/nostr-zap/dialog-help.d.ts +0 -2
- package/dist/src/nostr-zap/dialog-zap-style.d.ts +0 -6
- package/dist/src/nostr-zap/dialog-zap.d.ts +0 -31
- package/dist/src/nostr-zap/dialog-zappers-style.d.ts +0 -1
- package/dist/src/nostr-zap/dialog-zappers.d.ts +0 -25
- package/dist/src/nostr-zap/nostr-zap.d.ts +0 -45
- package/dist/src/nostr-zap/render.d.ts +0 -9
- package/dist/src/nostr-zap/style.d.ts +0 -1
- package/dist/src/nostr-zap/zap-utils.d.ts +0 -53
- package/dist/vite.config.d.ts +0 -2
- package/dist/vite.config.esm.d.ts +0 -2
- package/dist/vite.config.umd.d.ts +0 -2
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IRenderOptions } from '../base/render-options';
|
|
2
|
-
import { NDKUserProfile } from '@nostr-dev-kit/ndk';
|
|
3
|
-
export interface RenderPostOptions extends IRenderOptions {
|
|
4
|
-
author: NDKUserProfile | null | undefined;
|
|
5
|
-
date: string;
|
|
6
|
-
shouldShowStats: boolean;
|
|
7
|
-
stats: {
|
|
8
|
-
replies: number;
|
|
9
|
-
likes: number;
|
|
10
|
-
} | null;
|
|
11
|
-
statsLoading: boolean;
|
|
12
|
-
htmlToRender: string;
|
|
13
|
-
}
|
|
14
|
-
export declare function renderPost(options: RenderPostOptions): string;
|
|
15
|
-
export declare function renderEmbeddedPost(noteId: string, authorProfile: {
|
|
16
|
-
displayName?: string;
|
|
17
|
-
image?: string;
|
|
18
|
-
nip05?: string;
|
|
19
|
-
} | undefined, date: string, content: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getPostStyles(): string;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { NCStatus } from '../base/base-component/nostr-base-component';
|
|
2
|
-
import { NostrUserComponent } from '../base/user-component/nostr-user-component';
|
|
3
|
-
export default class NostrProfile extends NostrUserComponent {
|
|
4
|
-
protected profileStatus: {
|
|
5
|
-
set: (s: NCStatus, e?: string) => void;
|
|
6
|
-
get: () => NCStatus;
|
|
7
|
-
};
|
|
8
|
-
private isStatsLoading;
|
|
9
|
-
private isStatsFollowsLoading;
|
|
10
|
-
private isStatsFollowersLoading;
|
|
11
|
-
private isZapsLoading;
|
|
12
|
-
private stats;
|
|
13
|
-
static get observedAttributes(): string[];
|
|
14
|
-
connectedCallback(): Promise<void>;
|
|
15
|
-
/** Base class functions */
|
|
16
|
-
protected onStatusChange(_status: NCStatus): void;
|
|
17
|
-
protected onUserReady(_user: any, _profile: any): void;
|
|
18
|
-
getUserStats: () => Promise<void>;
|
|
19
|
-
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
20
|
-
/** Private functions */
|
|
21
|
-
private onProfileClick;
|
|
22
|
-
private attachDelegatedListeners;
|
|
23
|
-
protected renderContent(): void;
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function renderStats(label: string, value: number, isLoading: boolean): string;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { NDKUserProfile } from '@nostr-dev-kit/ndk';
|
|
2
|
-
import { IRenderOptions } from '../base/render-options';
|
|
3
|
-
export interface Stats {
|
|
4
|
-
notes: number;
|
|
5
|
-
replies: number;
|
|
6
|
-
follows: number;
|
|
7
|
-
followers: number;
|
|
8
|
-
zaps: number;
|
|
9
|
-
relays: number;
|
|
10
|
-
}
|
|
11
|
-
export interface RenderProfileOptions extends IRenderOptions {
|
|
12
|
-
npub: string;
|
|
13
|
-
userProfile: NDKUserProfile;
|
|
14
|
-
isStatsLoading: boolean;
|
|
15
|
-
isStatsFollowersLoading: boolean;
|
|
16
|
-
isStatsFollowsLoading: boolean;
|
|
17
|
-
isZapsLoading: boolean;
|
|
18
|
-
stats: Stats;
|
|
19
|
-
showFollow: boolean;
|
|
20
|
-
showNpub: boolean;
|
|
21
|
-
}
|
|
22
|
-
export declare function renderProfile(options: RenderProfileOptions): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getProfileStyles(): string;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { NCStatus } from '../base/base-component/nostr-base-component';
|
|
2
|
-
import { NostrUserComponent } from '../base/user-component/nostr-user-component';
|
|
3
|
-
import { NDKUser, NDKUserProfile } from '@nostr-dev-kit/ndk';
|
|
4
|
-
/**
|
|
5
|
-
* NostrProfileBadge
|
|
6
|
-
* =================
|
|
7
|
-
* UI component (extends `NostrUserComponent`) that renders a compact user badge
|
|
8
|
-
* with avatar/name/nip05 and optional npub + follow button.
|
|
9
|
-
*
|
|
10
|
-
* Observed attributes
|
|
11
|
-
* - `show-npub` — boolean-like attribute to display the masked npub + copy
|
|
12
|
-
* - `show-follow` — boolean-like attribute to display the follow button
|
|
13
|
-
*
|
|
14
|
-
* Events
|
|
15
|
-
* - `nc:status` — (from base) status changes for connection/user
|
|
16
|
-
* - `nc:user` — emitted when user & profile are ready (from parent)
|
|
17
|
-
* - `nc:profile_badge` — fired on badge click (detail: `NDKUserProfile | null`);
|
|
18
|
-
* default action opens `https://njump.me/<nip05|npub>`
|
|
19
|
-
*
|
|
20
|
-
* Note: Follow button placement to be improved in future versions
|
|
21
|
-
*/
|
|
22
|
-
export default class NostrProfileBadge extends NostrUserComponent {
|
|
23
|
-
/** Lifecycle methods */
|
|
24
|
-
static get observedAttributes(): string[];
|
|
25
|
-
connectedCallback(): void;
|
|
26
|
-
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
27
|
-
/** Base class functions */
|
|
28
|
-
protected onStatusChange(_status: NCStatus): void;
|
|
29
|
-
protected onUserReady(_user: NDKUser, _profile: NDKUserProfile | null): void;
|
|
30
|
-
/** Private functions */
|
|
31
|
-
private onProfileClick;
|
|
32
|
-
private attachDelegatedListeners;
|
|
33
|
-
protected renderContent(): void;
|
|
34
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { NDKUser, NDKUserProfile } from '@nostr-dev-kit/ndk';
|
|
2
|
-
export interface RenderProfileBadgeOptions {
|
|
3
|
-
isLoading: boolean;
|
|
4
|
-
isError: boolean;
|
|
5
|
-
errorMessage?: string;
|
|
6
|
-
userProfile: NDKUserProfile | null;
|
|
7
|
-
ndkUser: NDKUser | null;
|
|
8
|
-
showNpub: boolean;
|
|
9
|
-
showFollow: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare function renderProfileBadge({ isLoading, isError, errorMessage, userProfile, ndkUser, showNpub, showFollow }: RenderProfileBadgeOptions): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getProfileBadgeStyles(): string;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { DialogComponent } from '../base/dialog-component/dialog-component';
|
|
2
|
-
interface WebLN {
|
|
3
|
-
enable: () => Promise<void>;
|
|
4
|
-
sendPayment: (invoice: string) => Promise<{
|
|
5
|
-
preimage: string;
|
|
6
|
-
}>;
|
|
7
|
-
}
|
|
8
|
-
declare global {
|
|
9
|
-
interface Window {
|
|
10
|
-
webln?: WebLN;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export interface OpenZapModalParams {
|
|
14
|
-
npub: string;
|
|
15
|
-
relays: string;
|
|
16
|
-
cachedDialogComponent?: DialogComponent | null;
|
|
17
|
-
buttonColor?: string;
|
|
18
|
-
theme?: 'light' | 'dark';
|
|
19
|
-
fixedAmount?: number;
|
|
20
|
-
defaultAmount?: number;
|
|
21
|
-
initialAmount?: number;
|
|
22
|
-
anon?: boolean;
|
|
23
|
-
url?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare const injectCSS: (theme?: "light" | "dark") => void;
|
|
26
|
-
/**
|
|
27
|
-
* Opens (or re-opens) the zap modal. Returns the DialogComponent so the caller
|
|
28
|
-
* can cache it between clicks.
|
|
29
|
-
*/
|
|
30
|
-
export declare function init(params: OpenZapModalParams): Promise<DialogComponent>;
|
|
31
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getZappersDialogStyles(theme?: 'light' | 'dark'): string;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { DialogComponent } from '../base/dialog-component/dialog-component';
|
|
2
|
-
import { ZapDetails } from './zap-utils';
|
|
3
|
-
/**
|
|
4
|
-
* Modal dialog for displaying individual zap details (zappers).
|
|
5
|
-
*
|
|
6
|
-
* Shows a list of all zaps received by a user with:
|
|
7
|
-
* - Zap amount
|
|
8
|
-
* - Zap date (relative time)
|
|
9
|
-
* - Zap author's name
|
|
10
|
-
* - Zap author's profile picture
|
|
11
|
-
* - Clickable links to author profiles via njump.me
|
|
12
|
-
*/
|
|
13
|
-
export interface OpenZappersModalParams {
|
|
14
|
-
zapDetails: ZapDetails[];
|
|
15
|
-
theme?: 'light' | 'dark';
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Inject zappers dialog content styles into document head
|
|
19
|
-
* Prevents duplicate injection by checking for existing styles
|
|
20
|
-
*/
|
|
21
|
-
export declare const injectZappersDialogStyles: (theme?: "light" | "dark") => void;
|
|
22
|
-
/**
|
|
23
|
-
* Opens the zappers dialog showing individual zap details
|
|
24
|
-
*/
|
|
25
|
-
export declare function openZappersDialog(params: OpenZappersModalParams): Promise<DialogComponent>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { NostrUserComponent } from '../base/user-component/nostr-user-component';
|
|
2
|
-
import { NCStatus } from '../base/base-component/nostr-base-component';
|
|
3
|
-
/**
|
|
4
|
-
* <nostr-zap>
|
|
5
|
-
* Attributes:
|
|
6
|
-
* - npub | pubkey | nip05 (required) : Nostr user to zap
|
|
7
|
-
* - relays (optional) : comma-separated relay URLs
|
|
8
|
-
* - theme (optional) : "light" | "dark" (default light)
|
|
9
|
-
* - text (optional) : custom text (default "Zap")
|
|
10
|
-
* - amount (optional) : pre-defined zap amount in sats
|
|
11
|
-
* - default-amount (optional) : default zap amount in sats (default 21)
|
|
12
|
-
* - url (optional) : URL to send zap to (enables URL-based zaps)
|
|
13
|
-
*
|
|
14
|
-
* TODO: Doesn't yet support dynamic updates of attributes.
|
|
15
|
-
*/
|
|
16
|
-
export default class NostrZap extends NostrUserComponent {
|
|
17
|
-
protected zapActionStatus: {
|
|
18
|
-
set: (s: NCStatus, e?: string) => void;
|
|
19
|
-
get: () => NCStatus;
|
|
20
|
-
};
|
|
21
|
-
protected zapListStatus: {
|
|
22
|
-
set: (s: NCStatus, e?: string) => void;
|
|
23
|
-
get: () => NCStatus;
|
|
24
|
-
};
|
|
25
|
-
private totalZapAmount;
|
|
26
|
-
private cachedZapDetails;
|
|
27
|
-
private cachedAmountDialog;
|
|
28
|
-
constructor();
|
|
29
|
-
connectedCallback(): void;
|
|
30
|
-
static get observedAttributes(): string[];
|
|
31
|
-
attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
|
|
32
|
-
disconnectedCallback(): void;
|
|
33
|
-
/** Base class functions */
|
|
34
|
-
protected onStatusChange(_status: NCStatus): void;
|
|
35
|
-
protected onUserReady(_user: any, _profile: any): void;
|
|
36
|
-
/** Protected methods */
|
|
37
|
-
protected validateInputs(): boolean;
|
|
38
|
-
/** Private functions */
|
|
39
|
-
private handleZapClick;
|
|
40
|
-
private handleHelpClick;
|
|
41
|
-
private handleZappersClick;
|
|
42
|
-
private attachDelegatedListeners;
|
|
43
|
-
private updateZapCount;
|
|
44
|
-
protected renderContent(): void;
|
|
45
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IRenderOptions } from '../base/render-options';
|
|
2
|
-
export interface RenderZapButtonOptions extends IRenderOptions {
|
|
3
|
-
isAmountLoading: boolean;
|
|
4
|
-
isSuccess: boolean;
|
|
5
|
-
buttonText: string;
|
|
6
|
-
totalZapAmount: number | null;
|
|
7
|
-
hasZaps?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function renderZapButton({ isLoading, isError, isSuccess, errorMessage, buttonText, totalZapAmount, isAmountLoading, hasZaps, }: RenderZapButtonOptions): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getZapButtonStyles(): string;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Filter, Event } from 'nostr-tools';
|
|
2
|
-
export declare const getProfileMetadata: (authorId: string) => Promise<any>;
|
|
3
|
-
export declare const getBatchedProfileMetadata: (authorIds: string[]) => Promise<{
|
|
4
|
-
id: string;
|
|
5
|
-
profile: any;
|
|
6
|
-
}[]>;
|
|
7
|
-
export declare const extractProfileMetadataContent: (profileMetadata: any) => any;
|
|
8
|
-
export declare const getZapEndpoint: (profileMetadata: any) => Promise<string>;
|
|
9
|
-
export declare const fetchInvoice: ({ zapEndpoint, amount, comment, authorId, nip19Target, normalizedRelays, anon, url, }: {
|
|
10
|
-
zapEndpoint: string;
|
|
11
|
-
amount: number;
|
|
12
|
-
comment?: string;
|
|
13
|
-
authorId: string;
|
|
14
|
-
nip19Target?: string;
|
|
15
|
-
normalizedRelays: string[];
|
|
16
|
-
anon?: boolean;
|
|
17
|
-
url?: string;
|
|
18
|
-
}) => Promise<string>;
|
|
19
|
-
export declare const isNip07ExtAvailable: () => boolean;
|
|
20
|
-
export declare function resolveNip05(nip05Identifier: string): Promise<string | null>;
|
|
21
|
-
declare module 'nostr-tools' {
|
|
22
|
-
interface SimplePool {
|
|
23
|
-
subscribe(relays: string[], filter: Filter, params: {
|
|
24
|
-
onevent: (event: Event) => void;
|
|
25
|
-
onclose?: () => void;
|
|
26
|
-
id?: string;
|
|
27
|
-
maxWait?: number;
|
|
28
|
-
}): {
|
|
29
|
-
close: () => void;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
export interface ZapDetails {
|
|
34
|
-
amount: number;
|
|
35
|
-
date: Date;
|
|
36
|
-
authorPubkey: string;
|
|
37
|
-
comment?: string;
|
|
38
|
-
}
|
|
39
|
-
export interface ZapAmountResult {
|
|
40
|
-
totalAmount: number;
|
|
41
|
-
zapDetails: ZapDetails[];
|
|
42
|
-
}
|
|
43
|
-
export declare const fetchTotalZapAmount: ({ pubkey, relays, url, }: {
|
|
44
|
-
pubkey: string;
|
|
45
|
-
relays: string[];
|
|
46
|
-
url?: string;
|
|
47
|
-
}) => Promise<ZapAmountResult>;
|
|
48
|
-
export declare const listenForZapReceipt: ({ relays, receiversPubKey, invoice, onSuccess, }: {
|
|
49
|
-
relays: string[];
|
|
50
|
-
receiversPubKey: string;
|
|
51
|
-
invoice: string;
|
|
52
|
-
onSuccess: () => void;
|
|
53
|
-
}) => () => void;
|
package/dist/vite.config.d.ts
DELETED