UNPKG

bitmask-core

Version:

Core functionality for the BitMask wallet

47 lines (35 loc) 1.35 kB
// RGB import * as BMC from "./bitmask_core"; import {NextAddressResponse, NextUtxoResponse, WatcherRequest, WatcherResponse, WatcherStatusResponse} from "./rgb"; export const recoverWatcher = async ( nostrHexSk: string, request: WatcherRequest ): Promise<WatcherResponse> => JSON.parse(await BMC.recover_watcher(nostrHexSk, request)); export const destroyRecover = async ( nostrHexSk: string, ): Promise<WatcherResponse> => JSON.parse(await BMC.destroy_recover_watcher(nostrHexSk)); export const createWatcher = async ( nostrHexSk: string, request: WatcherRequest ): Promise<WatcherResponse> => JSON.parse(await BMC.create_watcher(nostrHexSk, request)); export const destroyWatcher = async ( nostrHexSk: string, ): Promise<WatcherResponse> => JSON.parse(await BMC.destroy_watcher(nostrHexSk)); export const checkWatcher = async ( nostrHexSk: string, ): Promise<WatcherStatusResponse> => JSON.parse(await BMC.check_watcher(nostrHexSk)); export const nextAddress = async ( nostrHexSk: string, request: string ): Promise<NextAddressResponse> => JSON.parse(await BMC.watcher_next_address(nostrHexSk, request)); export const nextUtxo = async ( nostrHexSk: string, request: string ): Promise<NextUtxoResponse> => JSON.parse(await BMC.watcher_next_utxo(nostrHexSk, request));