var x=Object.create;var p=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var g=(r,e)=>{for(var t in e)p(r,t,{get:e[t],enumerable:!0})},u=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of P(e))!$.call(r,a)&&a!==t&&p(r,a,{get:()=>e[a],enumerable:!(o=D(e,a))||o.enumerable});return r};var A=(r,e,t)=>(t=r!=null?x(E(r)):{},u(e||!r||!r.__esModule?p(t,"default",{value:r,enumerable:!0}):t,r)),b=r=>u(p({},"__esModule",{value:!0}),r);var n=(r,e,t)=>new Promise((o,a)=>{var l=i=>{try{m(t.next(i))}catch(h){a(h)}},d=i=>{try{m(t.throw(i))}catch(h){a(h)}},m=i=>i.done?o(i.value):Promise.resolve(i.value).then(l,d);m((t=t.apply(r,e)).next())});var R={};g(R,{claimBnsDomain:()=>N,claimDomain:()=>K,claimEnsDomain:()=>_,claimSnsDomain:()=>f,getBnsDomainSuggestions:()=>q,getDomainSuggestions:()=>I,getEnsDomainSuggestions:()=>C,getSnsDomainSuggestions:()=>X,lockDomain:()=>Y,preLockDomain:()=>k,registerBnsDomain:()=>B,registerSnsDomain:()=>S});module.exports=b(R);var c=A(require("axios"),1);var w=require("react"),v=require("react/jsx-runtime"),O=(0,w.createContext)(void 0),y="production";var s=y==="development"?"https://qa-api-v2.bandit.network/sdk":"https://api-v2.bandit.network/sdk";var I=(r,e,t)=>n(void 0,null,function*(){try{return(yield c.default.get(`${s}/collection/unstoppable/searchDomain?query=${e}&wallet_address=${t}`,{headers:{"X-API-KEY":r}})).data}catch(o){throw new Error(o)}}),K=(r,e)=>n(void 0,null,function*(){try{return(yield c.default.post(`${s}/collection/unstoppable/claim`,e,{headers:{"X-API-KEY":r}})).data}catch(t){throw t}}),Y=(r,e)=>n(void 0,null,function*(){try{return(yield c.default.post(`${s}/collection/unstoppable/lockDomain`,e,{headers:{"X-API-KEY":r}})).data}catch(t){throw t}}),k=(r,e,t,o)=>n(void 0,null,function*(){try{return(yield c.default.get(`${s}/collection/unstoppable/updatedPrice?domain=${e}&currency=${t}&wallet_address=${o}`,{headers:{"X-API-KEY":r}})).data}catch(a){throw a}}),X=(r,e)=>n(void 0,null,function*(){try{return(yield c.default.get(`${s}/collection/sns/searchDomain?=&query=${e}`,{headers:{"X-API-KEY":r}})).data}catch(t){throw new Error(t)}}),S=(r,e,t,o,a,l)=>n(void 0,null,function*(){try{return(yield c.default.post(`${s}/collection/sns/registerDomain`,{name:e,claimWallet:t,price:o,payUsing:a,space:l},{headers:{"X-API-KEY":r}})).data}catch(d){throw new Error(d)}}),f=(r,e,t)=>n(void 0,null,function*(){try{return(yield c.default.post(`${s}/collection/sns/claimDomain`,{name:e,transactionHash:t},{headers:{"X-API-KEY":r}})).data}catch(o){throw new Error(o)}}),C=(r,e)=>n(void 0,null,function*(){try{return(yield c.default.get(`${s}/collection/ens/searchDomains?query=${e}.eth`,{headers:{"X-API-KEY":r}})).data}catch(t){throw new Error(t)}}),_=(r,e)=>n(void 0,null,function*(){try{return(yield c.default.post(`${s}/collection/ens/claimDomain`,e,{headers:{"X-API-KEY":r}})).data}catch(t){throw t}}),q=(r,e)=>n(void 0,null,function*(){try{return(yield c.default.get(`${s}/collection/base/search-domains?query=${e}`,{headers:{"X-API-KEY":r}})).data}catch(t){throw new Error(t)}}),B=(r,e,t)=>n(void 0,null,function*(){try{return(yield c.default.post(`${s}/collection/base/register-domain`,{name:e,claimWallet:t},{headers:{"X-API-KEY":r}})).data}catch(o){throw new Error(o)}}),N=(r,e)=>n(void 0,null,function*(){try{return(yield c.default.post(`${s}/collection/base/claim-domain`,e,{headers:{"X-API-KEY":r}})).data}catch(t){throw t}});0&&(module.exports={claimBnsDomain,claimDomain,claimEnsDomain,claimSnsDomain,getBnsDomainSuggestions,getDomainSuggestions,getEnsDomainSuggestions,getSnsDomainSuggestions,lockDomain,preLockDomain,registerBnsDomain,registerSnsDomain});
