"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.makeAccountBridgeReceive = exports.getAddr = exports.sameOp = exports.mergeOps = exports.mergeNfts = exports.makeSync = void 0;
const rxjs_1 = require("rxjs");
const jsHelpers_1 = require("@ledgerhq/coin-framework/bridge/jsHelpers");
const deviceAccess_1 = require("../hw/deviceAccess");
const getAddress_1 = __importDefault(require("../hw/getAddress"));
var jsHelpers_2 = require("@ledgerhq/coin-framework/bridge/jsHelpers");
Object.defineProperty(exports, "makeSync", { enumerable: true, get: function () { return jsHelpers_2.makeSync; } });
Object.defineProperty(exports, "mergeNfts", { enumerable: true, get: function () { return jsHelpers_2.mergeNfts; } });
Object.defineProperty(exports, "mergeOps", { enumerable: true, get: function () { return jsHelpers_2.mergeOps; } });
Object.defineProperty(exports, "sameOp", { enumerable: true, get: function () { return jsHelpers_2.sameOp; } });
function getAddr(deviceId, opts) {
    return (0, rxjs_1.firstValueFrom)((0, deviceAccess_1.withDevice)(deviceId)((transport) => (0, rxjs_1.from)((0, getAddress_1.default)(transport, opts))));
}
exports.getAddr = getAddr;
function makeAccountBridgeReceive({ injectGetAddressParams, } = {}) {
    return (0, jsHelpers_1.makeAccountBridgeReceive)(getAddr, {
        injectGetAddressParams,
    });
}
exports.makeAccountBridgeReceive = makeAccountBridgeReceive;
//# sourceMappingURL=jsHelpers.js.map