var s=(o,r,t)=>new Promise((e,n)=>{var a=i=>{try{l(t.next(i))}catch(h){n(h)}},d=i=>{try{l(t.throw(i))}catch(h){n(h)}},l=i=>i.done?e(i.value):Promise.resolve(i.value).then(a,d);l((t=t.apply(o,r)).next())});import p from"axios";import{createContext as w,useMemo as P}from"react";import{jsx as A}from"react/jsx-runtime";var $=w(void 0),m="production";var c=m==="development"?"https://qa-api-v2.bandit.network/sdk":"https://api-v2.bandit.network/sdk";var Y=(o,r,t)=>s(void 0,null,function*(){try{return(yield p.post(`${c}/collection/contest/${o}/verifyContest`,r,{headers:{"X-API-KEY":t}})).data}catch(e){throw new Error(e)}}),g=(o,r,t)=>s(void 0,null,function*(){try{return(yield p.get(`${c}/users/${o}/contest/${r}/getTaskStatus`,{headers:{"X-API-KEY":t}})).data}catch(e){throw new Error(e)}}),X=(o,r,t,e,n)=>s(void 0,null,function*(){try{return(yield p.post(`${c}/collection/contest/${o}/mint`,{moduleId:t,walletAddress:r,signature:n},{headers:{"X-API-KEY":e}})).data}catch(a){throw new Error(a)}}),_=(o,r,t,e,n)=>s(void 0,null,function*(){try{return(yield p.post(`${c}/collection/contest/${o}/mint-gasless`,{moduleId:t,walletAddress:r,signature:n},{headers:{"X-API-KEY":e}})).data}catch(a){return!1}}),D=(o,r,t,e,n,a)=>s(void 0,null,function*(){try{return(yield p.post(`${c}/collection/contest/${o}/claim`,{referenceId:r,transactionHash:t,signature:a,walletAddress:n},{headers:{"X-API-KEY":e}})).data}catch(d){throw d}}),N=(o,r,t,e)=>s(void 0,null,function*(){try{return(yield p.get(`${c}/collection/contest/${o}/participants?offset=${r}&limit=${t}`,{headers:{"X-API-KEY":e}})).data}catch(n){throw n}}),B=(o,r,t)=>s(void 0,null,function*(){try{return(yield p.post(`${c}/collection/contest/gitcoin/score`,{walletAddress:o,signature:r},{headers:{"X-API-KEY":t}})).data}catch(e){throw e}});export{N as fetchContestParticipants,B as fetchGitcoinScore,g as getContestTaskStatus,_ as getGaslessMintSignature,X as getMintSignature,D as updateContestClaim,Y as verifyTask};
