// 

import 'regenerator-runtime/runtime'



import { makeEdgeCorePlugins } from './plugin/currencyPlugin.js'

window.addEdgeCorePlugins(
  makeEdgeCorePlugins((opts) => {
    const nativeIo = opts.nativeIo['edge-currency-bitcoin']
    if (nativeIo == null) {
      throw new Error('React Native Bitcoin IO object not loaded')
    }

    const { fetchJson, fetchText, pbkdf2, secp256k1, makeSocket } = nativeIo
    return { ...opts.io, fetchJson, fetchText, pbkdf2, secp256k1, makeSocket }
  })
)
