-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js.map
1 lines (1 loc) · 1.59 KB
/
index.js.map
1
{"mappings":";;;;;;AAAA,KAAK,CAAC,6BAAO,GAAG,CAA6C;eAEvC,yCAAS,CAAE,KAAK,GAAG,CAAC,EAAE,CAAC;IAC3C,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,IAAI,6BAAO,CAAC,mBAAmB,EAAE,KAAK;IAChE,KAAK,CAAC,CAAC,OAAC,IAAI,SAAE,IAAI,EAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI;IACxC,EAAE,EAAE,IAAI,KAAK,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM;IACxC,MAAM,CAAC,IAAI;AACb,CAAC;eAEqB,yCAAU,CAAE,KAAK,GAAG,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IACrE,EAAE,GAAG,OAAO,KAAK,cAAc,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAyC;IAC1F,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,IAAI,6BAAO,CAAC,oBAAoB,EAAE,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,gBAAgB,EAAE,cAAc;IACrH,KAAK,CAAC,CAAC,OAAC,IAAI,SAAE,IAAI,EAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI;IACxC,EAAE,EAAE,IAAI,KAAK,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM;IACxC,MAAM,CAAC,IAAI;AACb,CAAC","sources":["src/index.js"],"sourcesContent":["const BaseURL = 'https://open-api.openocean.finance/v1/cross'\r\n\r\nexport async function tokenList (chain = 1) {\r\n const result = await fetch(`${BaseURL}/tokenList?chainId=${chain}`)\r\n const { code, data } = await result.json()\r\n if (code !== 200) throw new Error(result)\r\n return data\r\n}\r\n\r\nexport async function getBalance (chain = 1, account, inTokenAddress) {\r\n if (!account || !inTokenAddress) throw new Error('Account and inTokenAddress are required')\r\n const result = await fetch(`${BaseURL}/getBalance?chainId=${chain}&account=${account}&inTokenAddress=${inTokenAddress}`)\r\n const { code, data } = await result.json()\r\n if (code !== 200) throw new Error(result)\r\n return data\r\n}\r\n"],"names":[],"version":3,"file":"index.js.map","sourceRoot":"../"}