UNPKG

@atomiqlabs/sdk

Version:

atomiq labs SDK for cross-chain swaps between smart chains and bitcoin

22 lines (21 loc) 820 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isIBitcoinWallet = void 0; /** * Type guard to check if an object implements {@link IBitcoinWallet} * * @category Bitcoin */ function isIBitcoinWallet(val) { return val !== null && typeof (val.sendTransaction) === "function" && typeof (val.fundPsbt) === "function" && typeof (val.signPsbt) === "function" && typeof (val.getFeeRate) === "function" && typeof (val.getTransactionFee) === "function" && typeof (val.getFundedPsbtFee) === "function" && typeof (val.getReceiveAddress) === "function" && typeof (val.getBalance) === "function" && typeof (val.getSpendableBalance) === "function"; } exports.isIBitcoinWallet = isIBitcoinWallet;