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