UNPKG

@shocknet/clink-sdk

Version:

sdk client for clink

24 lines 967 B
import { SimplePool } from "nostr-tools"; import { SendNofferRequest } from "./noffer.js"; import { SendNdebitRequest } from "./ndebit.js"; export class ClinkSDK { constructor(settings, pool) { this.Noffer = (data, timeoutSeconds) => { SendNofferRequest(this.pool, this.settings.privateKey, this.settings.relays, this.settings.toPubKey, data, timeoutSeconds || this.settings.defaultTimeoutSeconds); }; this.Ndebit = (data, timeoutSeconds) => { SendNdebitRequest(this.pool, this.settings.privateKey, this.settings.relays, this.settings.toPubKey, data, timeoutSeconds || this.settings.defaultTimeoutSeconds); }; this.settings = settings; if (pool) { this.pool = pool; } else { this.pool = new SimplePool(); } } } export * from "./noffer.js"; export * from "./ndebit.js"; export * from "./nip19Extension.js"; //# sourceMappingURL=index.js.map