"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.aTransportRefBuilder = void 0;
const hw_transport_mocker_1 = require("@ledgerhq/hw-transport-mocker");
/**
 * Build a mocked TransportRef
 *
 * Not a final version, can be updated.
 */
const aTransportRefBuilder = async () => {
    const transport = await (0, hw_transport_mocker_1.openTransportReplayer)(new hw_transport_mocker_1.RecordStore());
    const transportRef = {
        current: transport,
        _refreshedCounter: 0,
        refreshTransport: Promise.resolve,
    };
    transportRef.refreshTransport = async () => {
        transportRef._refreshedCounter++;
        return Promise.resolve();
    };
    return transportRef;
};
exports.aTransportRefBuilder = aTransportRefBuilder;
//# sourceMappingURL=aTransportRef.js.map