text: 'use strict';
  
  Object.defineProperty(exports, '__esModule', { value: true });
  
  var configure = require('../lib/configure.js');
  var toUrlSearchParams = require('../lib/to-url-search-params.js');
  var mapEvent = require('./map-event.js');
  
  const createProvide = configure.configure(api => {
    async function* provide(cids, options = { recursive: false }) {
      const cidArr = Array.isArray(cids) ? cids : [cids];
      const res = await api.post('dht/provide', {
        signal: options.signal,
        searchParams: toUrlSearchParams.toUrlSearchParams({
          arg: cidArr.map(cid => cid.toString()),
          ...options
        }),
        headers: options.headers
      });
      for await (const event of res.ndjson()) {
        yield mapEvent.mapEvent(event);
      }
    }
    return provide;
  });
  
  exports.createProvide = createProvide;
  