UNPKG

@shocknet/clink-sdk

Version:

sdk client for clink

37 lines (36 loc) 1.08 kB
import { AbstractSimplePool } from "nostr-tools/lib/types/pool"; export type NofferData = { offer: string; amount_sats?: number; zap?: string; payer_data?: any; }; export type NofferSuccess = { bolt11: string; }; export type NofferError = { code: number; error: string; range?: { min: number; max: number; }; }; export type NofferResponse = NofferSuccess | NofferError; export type NofferReceipt = { preimage?: string; }; export declare const SendNofferRequest: (pool: AbstractSimplePool, privateKey: Uint8Array, relays: string[], toPubKey: string, data: NofferData, timeoutSeconds?: number, onReceipt?: (receipt: NofferReceipt) => void) => Promise<NofferResponse>; export declare const newNofferEvent: (content: string, fromPub: string, toPub: string) => { content: string; created_at: number; kind: number; pubkey: string; tags: string[][]; }; export declare const newNofferFilter: (publicKey: string, eventId: string) => { since: number; kinds: number[]; '#p': string[]; '#e': string[]; };