"use strict";var c=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var v=(n,o)=>{for(var t in o)c(n,t,{get:o[t],enumerable:!0})},P=(n,o,t,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let e of f(o))!p.call(n,e)&&e!==t&&c(n,e,{get:()=>o[e],enumerable:!(r=M(o,e))||r.enumerable});return n};var h=n=>P(c({},"__esModule",{value:!0}),n);var E={};v(E,{useMoonEthers:()=>w});module.exports=h(E);var d=require("@moonup/ethers"),l=require("@moonup/moon-sdk"),i=require("react");function w(){let[n,o]=(0,i.useState)(null),[t,r]=(0,i.useState)(null),e=async()=>{let s=new l.MoonSDK;r(s),s.connect();let m={chainId:1,address:"0x",SDK:s},u=new d.MoonProvider(m);o(u)},a=async()=>{n&&(await n.disconnect(),o(null)),t&&(await t.disconnect(),r(null))};return(0,i.useEffect)(()=>{e()},[]),{moonProvider:n,moon:t,initialize:e,disconnect:a}}0&&(module.exports={useMoonEthers});
//# sourceMappingURL=useMoonEthers.js.map