import { RecordStore, openTransportReplayer } from "@ledgerhq/hw-transport-mocker";
/**
 * Build a mocked TransportRef
 *
 * Not a final version, can be updated.
 */
export const aTransportRefBuilder = async () => {
    const transport = await openTransportReplayer(new RecordStore());
    const transportRef = {
        current: transport,
        _refreshedCounter: 0,
        refreshTransport: Promise.resolve,
    };
    transportRef.refreshTransport = async () => {
        transportRef._refreshedCounter++;
        return Promise.resolve();
    };
    return transportRef;
};
//# sourceMappingURL=aTransportRef.js.map