UNPKG

@nopwdio/sdk-js

Version:
2 lines (1 loc) 507 B
import{a,b as i,c as s,d as c,e as f,f as d,h as p,p as n,q as e,s as w}from"./chunk-EX74VC7J.js";var m=async(o,t)=>{try{if(!o)throw new n;return await p({method:"GET",ressource:`/tokens/${o}`,signal:t})}catch(r){throw r instanceof a||r instanceof i||r instanceof n?r:r instanceof s||r instanceof d||r instanceof c||r instanceof f?new e:new w(r)}},y=function(o){let t=o.split(".");if(t.length!==3)throw new e;let r=t[1].replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(atob(r))};export{m as a,y as b};