@getalby/lightning-tools
Version:
Collection of helpful building blocks and tools to develop Bitcoin Lightning web apps
15 lines (14 loc) • 988 B
TypeScript
import { KeySendRawData, KeysendResponse, Event, NostrResponse, ZapArgs, ZapOptions, LnUrlPayResponse, LnUrlRawData } from "./types";
export declare const parseKeysendResponse: (data: KeySendRawData) => KeysendResponse;
export declare function generateZapEvent({ satoshi, comment, p, e, relays }: ZapArgs, options?: ZapOptions): Promise<Event>;
export declare function validateEvent(event: Event): boolean;
export declare function serializeEvent(evt: Event): string;
export declare function getEventHash(event: Event): string;
export declare function parseNostrResponse(nostrData: NostrResponse, username: string | undefined): readonly [NostrResponse, string | undefined, string[] | undefined];
export declare const isUrl: (url: string | null) => url is string;
export declare const isValidAmount: ({ amount, min, max, }: {
amount: number;
min: number;
max: number;
}) => boolean;
export declare const parseLnUrlPayResponse: (data: LnUrlRawData) => Promise<LnUrlPayResponse>;