import s from"axios";import{createContext as d,useMemo as w}from"react";import{jsx as y}from"react/jsx-runtime";var x=d(void 0),p="production";var a=p==="development"?"https://qa-api-v2.bandit.network/sdk":"https://api-v2.bandit.network/sdk";var I=async(e,o,r)=>{try{return(await s.post(`${a}/collection/contest/${e}/verifyContest`,o,{headers:{"X-API-KEY":r}})).data}catch(t){throw new Error(t)}},g=async(e,o,r)=>{try{return(await s.get(`${a}/users/${e}/contest/${o}/getTaskStatus`,{headers:{"X-API-KEY":r}})).data}catch(t){throw new Error(t)}},E=async(e,o,r,t,n)=>{try{return(await s.post(`${a}/collection/contest/${e}/mint`,{moduleId:r,walletAddress:o,signature:n},{headers:{"X-API-KEY":t}})).data}catch(c){throw new Error(c)}},K=async(e,o,r,t,n)=>{try{return(await s.post(`${a}/collection/contest/${e}/mint-gasless`,{moduleId:r,walletAddress:o,signature:n},{headers:{"X-API-KEY":t}})).data}catch{return!1}},S=async(e,o,r,t,n,c)=>{try{return(await s.post(`${a}/collection/contest/${e}/claim`,{referenceId:o,transactionHash:r,signature:c,walletAddress:n},{headers:{"X-API-KEY":t}})).data}catch(i){throw i}},b=async(e,o,r,t)=>{try{return(await s.get(`${a}/collection/contest/${e}/participants?offset=${o}&limit=${r}`,{headers:{"X-API-KEY":t}})).data}catch(n){throw n}},Y=async(e,o,r)=>{try{return(await s.post(`${a}/collection/contest/gitcoin/score`,{walletAddress:e,signature:o},{headers:{"X-API-KEY":r}})).data}catch(t){throw t}};export{b as fetchContestParticipants,Y as fetchGitcoinScore,g as getContestTaskStatus,K as getGaslessMintSignature,E as getMintSignature,S as updateContestClaim,I as verifyTask};
