/ app / protocols / ssb-protocol.js
ssb-protocol.js
 1  import fetchToHandler from './fetch-to-handler.js'
 2  
 3  export default async function createHandler (options, session) {
 4    return fetchToHandler(async () => {
 5      const { default: makeSsbFetch } = await import('ssb-fetch')
 6  
 7      const fetch = makeSsbFetch(options)
 8  
 9      return fetch
10    }, session)
11  }