var y=Object.create;var l=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var $=Object.getPrototypeOf,f=Object.prototype.hasOwnProperty;var A=(t,e)=>{for(var o in e)l(t,o,{get:e[o],enumerable:!0})},x=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of P(e))!f.call(t,n)&&n!==o&&l(t,n,{get:()=>e[n],enumerable:!(r=v(e,n))||r.enumerable});return t};var k=(t,e,o)=>(o=t!=null?y($(t)):{},x(e||!t||!t.__esModule?l(o,"default",{value:t,enumerable:!0}):o,t)),C=t=>x(l({},"__esModule",{value:!0}),t);var s=(t,e,o)=>new Promise((r,n)=>{var a=p=>{try{h(o.next(p))}catch(m){n(m)}},d=p=>{try{h(o.throw(p))}catch(m){n(m)}},h=p=>p.done?r(p.value):Promise.resolve(p.value).then(a,d);h((o=o.apply(t,e)).next())});var _={};A(_,{fetchContestParticipants:()=>g,fetchGitcoinScore:()=>X,getContestTaskStatus:()=>K,getGaslessMintSignature:()=>S,getMintSignature:()=>b,updateContestClaim:()=>Y,verifyTask:()=>E});module.exports=C(_);var i=k(require("axios"),1);var w=require("react"),I=require("react/jsx-runtime"),M=(0,w.createContext)(void 0),u="production";var c=u==="development"?"https://qa-api-v2.bandit.network/sdk":"https://api-v2.bandit.network/sdk";var E=(t,e,o)=>s(void 0,null,function*(){try{return(yield i.default.post(`${c}/collection/contest/${t}/verifyContest`,e,{headers:{"X-API-KEY":o}})).data}catch(r){throw new Error(r)}}),K=(t,e,o)=>s(void 0,null,function*(){try{return(yield i.default.get(`${c}/users/${t}/contest/${e}/getTaskStatus`,{headers:{"X-API-KEY":o}})).data}catch(r){throw new Error(r)}}),b=(t,e,o,r,n)=>s(void 0,null,function*(){try{return(yield i.default.post(`${c}/collection/contest/${t}/mint`,{moduleId:o,walletAddress:e,signature:n},{headers:{"X-API-KEY":r}})).data}catch(a){throw new Error(a)}}),S=(t,e,o,r,n)=>s(void 0,null,function*(){try{return(yield i.default.post(`${c}/collection/contest/${t}/mint-gasless`,{moduleId:o,walletAddress:e,signature:n},{headers:{"X-API-KEY":r}})).data}catch(a){return!1}}),Y=(t,e,o,r,n,a)=>s(void 0,null,function*(){try{return(yield i.default.post(`${c}/collection/contest/${t}/claim`,{referenceId:e,transactionHash:o,signature:a,walletAddress:n},{headers:{"X-API-KEY":r}})).data}catch(d){throw d}}),g=(t,e,o,r)=>s(void 0,null,function*(){try{return(yield i.default.get(`${c}/collection/contest/${t}/participants?offset=${e}&limit=${o}`,{headers:{"X-API-KEY":r}})).data}catch(n){throw n}}),X=(t,e,o)=>s(void 0,null,function*(){try{return(yield i.default.post(`${c}/collection/contest/gitcoin/score`,{walletAddress:t,signature:e},{headers:{"X-API-KEY":o}})).data}catch(r){throw r}});0&&(module.exports={fetchContestParticipants,fetchGitcoinScore,getContestTaskStatus,getGaslessMintSignature,getMintSignature,updateContestClaim,verifyTask});
