@ar.io/sdk 1.2.0-alpha.14 → 1.2.0-alpha.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/web.bundle.min.js +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/io.d.ts +1 -0
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -218,7 +218,7 @@ ${C}`),A.pop(),`{${W}}`}case"number":return isFinite(T)?String(T):t?t(T):"null";
|
|
|
218
218
|
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let h=new this(t);return r.forEach(o=>h.set(o)),h}static accessor(t){let h=(this[HL]=this[HL]={accessors:{}}).accessors,o=this.prototype;function l(c){let p=o2(c);h[p]||(wht(o,c),h[p]=!0)}return Ke.isArray(t)?t.forEach(l):l(t),this}};Cd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ke.reduceDescriptors(Cd.prototype,({value:i},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>i,set(h){this[r]=h}}});Ke.freezeMethods(Cd);var Zn=Cd;function a2(i,t){let r=this||Od,h=t||r,o=Zn.from(h.headers),l=h.data;return Ke.forEach(i,function(p){l=p.call(r,l,o.normalize(),t?t.status:void 0)}),o.normalize(),l}Tt();Rt();xt();function s2(i){return!!(i&&i.__CANCEL__)}Tt();Rt();xt();function GL(i,t,r){Nr.call(this,i??"canceled",Nr.ERR_CANCELED,t,r),this.name="CanceledError"}Ke.inherits(GL,Nr,{__CANCEL__:!0});var of=GL;Tt();Rt();xt();Tt();Rt();xt();Tt();Rt();xt();function h2(i,t,r){let h=r.config.validateStatus;!r.status||!h||h(r.status)?i(r):t(new Nr("Request failed with status code "+r.status,[Nr.ERR_BAD_REQUEST,Nr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}Tt();Rt();xt();function e7(i){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(i);return t&&t[1]||""}Tt();Rt();xt();Tt();Rt();xt();function _ht(i,t){i=i||10;let r=new Array(i),h=new Array(i),o=0,l=0,c;return t=t!==void 0?t:1e3,function(w){let m=Date.now(),y=h[l];c||(c=m),r[o]=w,h[o]=m;let v=l,M=0;for(;v!==o;)M+=r[v++],v=v%i;if(o=(o+1)%i,o===l&&(l=(l+1)%i),m-c<t)return;let T=y&&m-y;return T?Math.round(M*1e3/T):void 0}}var VL=_ht;Tt();Rt();xt();function Mht(i,t){let r=0,h=1e3/t,o=null;return function(){let c=this===!0,p=Date.now();if(c||p-r>h)return o&&(clearTimeout(o),o=null),r=p,i.apply(null,arguments);o||(o=setTimeout(()=>(o=null,r=Date.now(),i.apply(null,arguments)),h-(p-r)))}}var ZL=Mht;var Pd=(i,t,r=3)=>{let h=0,o=VL(50,250);return ZL(l=>{let c=l.loaded,p=l.lengthComputable?l.total:void 0,w=c-h,m=o(w),y=c<=p;h=c;let v={loaded:c,total:p,progress:p?c/p:void 0,bytes:w,rate:m||void 0,estimated:m&&p&&y?(p-c)/m:void 0,event:l,lengthComputable:p!=null};v[t?"download":"upload"]=!0,i(v)},r)};Tt();Rt();xt();Tt();Rt();xt();var JL=fo.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),h;function o(l){let c=l;return t&&(r.setAttribute("href",c),c=r.href),r.setAttribute("href",c),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return h=o(window.location.href),function(c){let p=Ke.isString(c)?o(c):c;return p.protocol===h.protocol&&p.host===h.host}}():function(){return function(){return!0}}();Tt();Rt();xt();var XL=fo.hasStandardBrowserEnv?{write(i,t,r,h,o,l){let c=[i+"="+encodeURIComponent(t)];Ke.isNumber(r)&&c.push("expires="+new Date(r).toGMTString()),Ke.isString(h)&&c.push("path="+h),Ke.isString(o)&&c.push("domain="+o),l===!0&&c.push("secure"),document.cookie=c.join("; ")},read(i){let t=document.cookie.match(new RegExp("(^|;\\s*)("+i+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(i){this.write(i,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};Tt();Rt();xt();Tt();Rt();xt();function r7(i){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i)}Tt();Rt();xt();function i7(i,t){return t?i.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):i}function f2(i,t){return i&&!r7(t)?i7(i,t):t}Tt();Rt();xt();var YL=i=>i instanceof Zn?{...i}:i;function ph(i,t){t=t||{};let r={};function h(m,y,v){return Ke.isPlainObject(m)&&Ke.isPlainObject(y)?Ke.merge.call({caseless:v},m,y):Ke.isPlainObject(y)?Ke.merge({},y):Ke.isArray(y)?y.slice():y}function o(m,y,v){if(Ke.isUndefined(y)){if(!Ke.isUndefined(m))return h(void 0,m,v)}else return h(m,y,v)}function l(m,y){if(!Ke.isUndefined(y))return h(void 0,y)}function c(m,y){if(Ke.isUndefined(y)){if(!Ke.isUndefined(m))return h(void 0,m)}else return h(void 0,y)}function p(m,y,v){if(v in t)return h(m,y);if(v in i)return h(void 0,m)}let w={url:l,method:l,data:l,baseURL:c,transformRequest:c,transformResponse:c,paramsSerializer:c,timeout:c,timeoutMessage:c,withCredentials:c,withXSRFToken:c,adapter:c,responseType:c,xsrfCookieName:c,xsrfHeaderName:c,onUploadProgress:c,onDownloadProgress:c,decompress:c,maxContentLength:c,maxBodyLength:c,beforeRedirect:c,transport:c,httpAgent:c,httpsAgent:c,cancelToken:c,socketPath:c,responseEncoding:c,validateStatus:p,headers:(m,y)=>o(YL(m),YL(y),!0)};return Ke.forEach(Object.keys(Object.assign({},i,t)),function(y){let v=w[y]||o,M=v(i[y],t[y],y);Ke.isUndefined(M)&&v!==p||(r[y]=M)}),r}var k6=i=>{let t=ph({},i),{data:r,withXSRFToken:h,xsrfHeaderName:o,xsrfCookieName:l,headers:c,auth:p}=t;t.headers=c=Zn.from(c),t.url=n2(f2(t.baseURL,t.url),i.params,i.paramsSerializer),p&&c.set("Authorization","Basic "+btoa((p.username||"")+":"+(p.password?unescape(encodeURIComponent(p.password)):"")));let w;if(Ke.isFormData(r)){if(fo.hasStandardBrowserEnv||fo.hasStandardBrowserWebWorkerEnv)c.setContentType(void 0);else if((w=c.getContentType())!==!1){let[m,...y]=w?w.split(";").map(v=>v.trim()).filter(Boolean):[];c.setContentType([m||"multipart/form-data",...y].join("; "))}}if(fo.hasStandardBrowserEnv&&(h&&Ke.isFunction(h)&&(h=h(t)),h||h!==!1&&JL(t.url))){let m=o&&l&&XL.read(l);m&&c.set(o,m)}return t};var Sht=typeof XMLHttpRequest<"u",QL=Sht&&function(i){return new Promise(function(r,h){let o=k6(i),l=o.data,c=Zn.from(o.headers).normalize(),{responseType:p}=o,w;function m(){o.cancelToken&&o.cancelToken.unsubscribe(w),o.signal&&o.signal.removeEventListener("abort",w)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function v(){if(!y)return;let T=Zn.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),R={data:!p||p==="text"||p==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:T,config:i,request:y};h2(function(C){r(C),m()},function(C){h(C),m()},R),y=null}"onloadend"in y?y.onloadend=v:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(v)},y.onabort=function(){y&&(h(new Nr("Request aborted",Nr.ECONNABORTED,o,y)),y=null)},y.onerror=function(){h(new Nr("Network Error",Nr.ERR_NETWORK,o,y)),y=null},y.ontimeout=function(){let A=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded",R=o.transitional||T6;o.timeoutErrorMessage&&(A=o.timeoutErrorMessage),h(new Nr(A,R.clarifyTimeoutError?Nr.ETIMEDOUT:Nr.ECONNABORTED,o,y)),y=null},l===void 0&&c.setContentType(null),"setRequestHeader"in y&&Ke.forEach(c.toJSON(),function(A,R){y.setRequestHeader(R,A)}),Ke.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),p&&p!=="json"&&(y.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&y.addEventListener("progress",Pd(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&y.upload&&y.upload.addEventListener("progress",Pd(o.onUploadProgress)),(o.cancelToken||o.signal)&&(w=T=>{y&&(h(!T||T.type?new of(null,i,y):T),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(w),o.signal&&(o.signal.aborted?w():o.signal.addEventListener("abort",w)));let M=e7(o.url);if(M&&fo.protocols.indexOf(M)===-1){h(new Nr("Unsupported protocol "+M+":",Nr.ERR_BAD_REQUEST,i));return}y.send(l||null)})};Tt();Rt();xt();Tt();Rt();xt();var Eht=(i,t)=>{let r=new AbortController,h,o=function(w){if(!h){h=!0,c();let m=w instanceof Error?w:this.reason;r.abort(m instanceof Nr?m:new of(m instanceof Error?m.message:m))}},l=t&&setTimeout(()=>{o(new Nr(`timeout ${t} of ms exceeded`,Nr.ETIMEDOUT))},t),c=()=>{i&&(l&&clearTimeout(l),l=null,i.forEach(w=>{w&&(w.removeEventListener?w.removeEventListener("abort",o):w.unsubscribe(o))}),i=null)};i.forEach(w=>w&&w.addEventListener&&w.addEventListener("abort",o));let{signal:p}=r;return p.unsubscribe=c,[p,()=>{l&&clearTimeout(l),l=null}]},tD=Eht;Tt();Rt();xt();var Aht=function*(i,t){let r=i.byteLength;if(!t||r<t){yield i;return}let h=0,o;for(;h<r;)o=h+t,yield i.slice(h,o),h=o},Tht=async function*(i,t,r){for await(let h of i)yield*Aht(ArrayBuffer.isView(h)?h:await r(String(h)),t)},n7=(i,t,r,h,o)=>{let l=Tht(i,t,o),c=0;return new ReadableStream({type:"bytes",async pull(p){let{done:w,value:m}=await l.next();if(w){p.close(),h();return}let y=m.byteLength;r&&r(c+=y),p.enqueue(new Uint8Array(m))},cancel(p){return h(p),l.return()}},{highWaterMark:2})};var eD=(i,t)=>{let r=i!=null;return h=>setTimeout(()=>t({lengthComputable:r,total:i,loaded:h}))},B6=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",iD=B6&&typeof ReadableStream=="function",o7=B6&&(typeof TextEncoder=="function"?(i=>t=>i.encode(t))(new TextEncoder):async i=>new Uint8Array(await new Response(i).arrayBuffer())),xht=iD&&(()=>{let i=!1,t=new Request(fo.origin,{body:new ReadableStream,method:"POST",get duplex(){return i=!0,"half"}}).headers.has("Content-Type");return i&&!t})(),rD=64*1024,a7=iD&&!!(()=>{try{return Ke.isReadableStream(new Response("").body)}catch{}})(),I6={stream:a7&&(i=>i.body)};B6&&(i=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!I6[t]&&(I6[t]=Ke.isFunction(i[t])?r=>r[t]():(r,h)=>{throw new Nr(`Response type '${t}' is not supported`,Nr.ERR_NOT_SUPPORT,h)})})})(new Response);var Rht=async i=>{if(i==null)return 0;if(Ke.isBlob(i))return i.size;if(Ke.isSpecCompliantForm(i))return(await new Request(i).arrayBuffer()).byteLength;if(Ke.isArrayBufferView(i))return i.byteLength;if(Ke.isURLSearchParams(i)&&(i=i+""),Ke.isString(i))return(await o7(i)).byteLength},kht=async(i,t)=>{let r=Ke.toFiniteNumber(i.getContentLength());return r??Rht(t)},nD=B6&&(async i=>{let{url:t,method:r,data:h,signal:o,cancelToken:l,timeout:c,onDownloadProgress:p,onUploadProgress:w,responseType:m,headers:y,withCredentials:v="same-origin",fetchOptions:M}=k6(i);m=m?(m+"").toLowerCase():"text";let[T,A]=o||l||c?tD([o,l],c):[],R,B,C=()=>{!R&&setTimeout(()=>{T&&T.unsubscribe()}),R=!0},P;try{if(w&&xht&&r!=="get"&&r!=="head"&&(P=await kht(y,h))!==0){let J=new Request(t,{method:"POST",body:h,duplex:"half"}),F;Ke.isFormData(h)&&(F=J.headers.get("content-type"))&&y.setContentType(F),J.body&&(h=n7(J.body,rD,eD(P,Pd(w)),null,o7))}Ke.isString(v)||(v=v?"cors":"omit"),B=new Request(t,{...M,signal:T,method:r.toUpperCase(),headers:y.normalize().toJSON(),body:h,duplex:"half",withCredentials:v});let N=await fetch(B),q=a7&&(m==="stream"||m==="response");if(a7&&(p||q)){let J={};["status","statusText","headers"].forEach(H=>{J[H]=N[H]});let F=Ke.toFiniteNumber(N.headers.get("content-length"));N=new Response(n7(N.body,rD,p&&eD(F,Pd(p,!0)),q&&C,o7),J)}m=m||"text";let W=await I6[Ke.findKey(I6,m)||"text"](N,i);return!q&&C(),A&&A(),await new Promise((J,F)=>{h2(J,F,{data:W,headers:Zn.from(N.headers),status:N.status,statusText:N.statusText,config:i,request:B})})}catch(N){throw C(),N&&N.name==="TypeError"&&/fetch/i.test(N.message)?Object.assign(new Nr("Network Error",Nr.ERR_NETWORK,i,B),{cause:N.cause||N}):Nr.from(N,N&&N.code,i,B)}});var s7={http:E6,xhr:QL,fetch:nD};Ke.forEach(s7,(i,t)=>{if(i){try{Object.defineProperty(i,"name",{value:t})}catch{}Object.defineProperty(i,"adapterName",{value:t})}});var oD=i=>`- ${i}`,Iht=i=>Ke.isFunction(i)||i===null||i===!1,O6={getAdapter:i=>{i=Ke.isArray(i)?i:[i];let{length:t}=i,r,h,o={};for(let l=0;l<t;l++){r=i[l];let c;if(h=r,!Iht(r)&&(h=s7[(c=String(r)).toLowerCase()],h===void 0))throw new Nr(`Unknown adapter '${c}'`);if(h)break;o[c||"#"+l]=h}if(!h){let l=Object.entries(o).map(([p,w])=>`adapter ${p} `+(w===!1?"is not supported by the environment":"is not available in the build")),c=t?l.length>1?`since :
|
|
219
219
|
`+l.map(oD).join(`
|
|
220
220
|
`):" "+oD(l[0]):"as no adapter specified";throw new Nr("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return h},adapters:s7};function h7(i){if(i.cancelToken&&i.cancelToken.throwIfRequested(),i.signal&&i.signal.aborted)throw new of(null,i)}function C6(i){return h7(i),i.headers=Zn.from(i.headers),i.data=a2.call(i,i.transformRequest),["post","put","patch"].indexOf(i.method)!==-1&&i.headers.setContentType("application/x-www-form-urlencoded",!1),O6.getAdapter(i.adapter||Od.adapter)(i).then(function(h){return h7(i),h.data=a2.call(i,i.transformResponse,h),h.headers=Zn.from(h.headers),h},function(h){return s2(h)||(h7(i),h&&h.response&&(h.response.data=a2.call(i,i.transformResponse,h.response),h.response.headers=Zn.from(h.response.headers))),Promise.reject(h)})}Tt();Rt();xt();Tt();Rt();xt();var P6="1.7.2";var f7={};["object","boolean","number","function","string","symbol"].forEach((i,t)=>{f7[i]=function(h){return typeof h===i||"a"+(t<1?"n ":" ")+i}});var aD={};f7.transitional=function(t,r,h){function o(l,c){return"[Axios v"+P6+"] Transitional option '"+l+"'"+c+(h?". "+h:"")}return(l,c,p)=>{if(t===!1)throw new Nr(o(c," has been removed"+(r?" in "+r:"")),Nr.ERR_DEPRECATED);return r&&!aD[c]&&(aD[c]=!0,console.warn(o(c," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(l,c,p):!0}};function Bht(i,t,r){if(typeof i!="object")throw new Nr("options must be an object",Nr.ERR_BAD_OPTION_VALUE);let h=Object.keys(i),o=h.length;for(;o-- >0;){let l=h[o],c=t[l];if(c){let p=i[l],w=p===void 0||c(p,l,i);if(w!==!0)throw new Nr("option "+l+" must be "+w,Nr.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Nr("Unknown option "+l,Nr.ERR_BAD_OPTION)}}var N6={assertOptions:Bht,validators:f7};var uc=N6.validators,Nd=class{constructor(t){this.defaults=t,this.interceptors={request:new Z5,response:new Z5}}async request(t,r){try{return await this._request(t,r)}catch(h){if(h instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;let l=o.stack?o.stack.replace(/^.+\n/,""):"";try{h.stack?l&&!String(h.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(h.stack+=`
|
|
221
|
-
`+l):h.stack=l}catch{}}throw h}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ph(this.defaults,r);let{transitional:h,paramsSerializer:o,headers:l}=r;h!==void 0&&N6.assertOptions(h,{silentJSONParsing:uc.transitional(uc.boolean),forcedJSONParsing:uc.transitional(uc.boolean),clarifyTimeoutError:uc.transitional(uc.boolean)},!1),o!=null&&(Ke.isFunction(o)?r.paramsSerializer={serialize:o}:N6.assertOptions(o,{encode:uc.function,serialize:uc.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c=l&&Ke.merge(l.common,l[r.method]);l&&Ke.forEach(["delete","get","head","post","put","patch","common"],A=>{delete l[A]}),r.headers=Zn.concat(c,l);let p=[],w=!0;this.interceptors.request.forEach(function(R){typeof R.runWhen=="function"&&R.runWhen(r)===!1||(w=w&&R.synchronous,p.unshift(R.fulfilled,R.rejected))});let m=[];this.interceptors.response.forEach(function(R){m.push(R.fulfilled,R.rejected)});let y,v=0,M;if(!w){let A=[C6.bind(this),void 0];for(A.unshift.apply(A,p),A.push.apply(A,m),M=A.length,y=Promise.resolve(r);v<M;)y=y.then(A[v++],A[v++]);return y}M=p.length;let T=r;for(v=0;v<M;){let A=p[v++],R=p[v++];try{T=A(T)}catch(B){R.call(this,B);break}}try{y=C6.call(this,T)}catch(A){return Promise.reject(A)}for(v=0,M=m.length;v<M;)y=y.then(m[v++],m[v++]);return y}getUri(t){t=ph(this.defaults,t);let r=f2(t.baseURL,t.url);return n2(r,t.params,t.paramsSerializer)}};Ke.forEach(["delete","get","head","options"],function(t){Nd.prototype[t]=function(r,h){return this.request(ph(h||{},{method:t,url:r,data:(h||{}).data}))}});Ke.forEach(["post","put","patch"],function(t){function r(h){return function(l,c,p){return this.request(ph(p||{},{method:t,headers:h?{"Content-Type":"multipart/form-data"}:{},url:l,data:c}))}}Nd.prototype[t]=r(),Nd.prototype[t+"Form"]=r(!0)});var u2=Nd;Tt();Rt();xt();var u7=class i{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(l){r=l});let h=this;this.promise.then(o=>{if(!h._listeners)return;let l=h._listeners.length;for(;l-- >0;)h._listeners[l](o);h._listeners=null}),this.promise.then=o=>{let l,c=new Promise(p=>{h.subscribe(p),l=p}).then(o);return c.cancel=function(){h.unsubscribe(l)},c},t(function(l,c,p){h.reason||(h.reason=new of(l,c,p),r(h.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new i(function(o){t=o}),cancel:t}}},sD=u7;Tt();Rt();xt();function c7(i){return function(r){return i.apply(null,r)}}Tt();Rt();xt();function l7(i){return Ke.isObject(i)&&i.isAxiosError===!0}Tt();Rt();xt();var d7={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(d7).forEach(([i,t])=>{d7[t]=i});var hD=d7;function fD(i){let t=new u2(i),r=e2(u2.prototype.request,t);return Ke.extend(r,u2.prototype,t,{allOwnKeys:!0}),Ke.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return fD(ph(i,o))},r}var Wn=fD(Od);Wn.Axios=u2;Wn.CanceledError=of;Wn.CancelToken=sD;Wn.isCancel=s2;Wn.VERSION=P6;Wn.toFormData=fc;Wn.AxiosError=Nr;Wn.Cancel=Wn.CanceledError;Wn.all=function(t){return Promise.all(t)};Wn.spread=c7;Wn.isAxiosError=l7;Wn.mergeConfig=ph;Wn.AxiosHeaders=Zn;Wn.formToJSON=i=>x6(Ke.isHTMLForm(i)?new FormData(i):i);Wn.getAdapter=O6.getAdapter;Wn.HttpStatusCode=hD;Wn.default=Wn;var L6=Wn;var{Axios:nLt,AxiosError:oLt,CanceledError:aLt,isCancel:sLt,CancelToken:hLt,VERSION:fLt,all:uLt,Cancel:cLt,isAxiosError:lLt,spread:dLt,toFormData:pLt,AxiosHeaders:gLt,HttpStatusCode:mLt,formToJSON:vLt,getAdapter:yLt,mergeConfig:bLt}=L6;Tt();Rt();xt();var dD=Sl(cD(),1),p7="axios-retry";function pD(i){let t=["ERR_CANCELED","ECONNABORTED"];return i.response||!i.code||t.includes(i.code)?!1:(0,dD.default)(i)}var gD=["get","head","options"],Cht=gD.concat(["put","delete"]);function g7(i){return i.code!=="ECONNABORTED"&&(!i.response||i.response.status===429||i.response.status>=500&&i.response.status<=599)}function Pht(i){return i.config?.method?g7(i)&&gD.indexOf(i.config.method)!==-1:!1}function mD(i){return i.config?.method?g7(i)&&Cht.indexOf(i.config.method)!==-1:!1}function vD(i){return pD(i)||mD(i)}function yD(i=void 0){let t=i?.response?.headers["retry-after"];if(!t)return 0;let r=(Number(t)||0)*1e3;return r===0&&(r=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,r)}function Nht(i=0,t=void 0){return Math.max(0,yD(t))}function Lht(i=0,t=void 0,r=100){let h=2**i*r,o=Math.max(h,yD(t)),l=o*.2*Math.random();return o+l}var Dht={retries:3,retryCondition:vD,retryDelay:Nht,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function $ht(i,t){return{...Dht,...t,...i[p7]}}function lD(i,t){let r=$ht(i,t||{});return r.retryCount=r.retryCount||0,r.lastRequestTime=r.lastRequestTime||Date.now(),i[p7]=r,r}function Uht(i,t){i.defaults.agent===t.agent&&delete t.agent,i.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,i.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function qht(i,t){let{retries:r,retryCondition:h}=i,o=(i.retryCount||0)<r&&h(t);if(typeof o=="object")try{return await o!==!1}catch{return!1}return o}async function Fht(i,t,r,h){t.retryCount+=1;let{retryDelay:o,shouldResetTimeout:l,onRetry:c}=t,p=o(t.retryCount,r);if(Uht(i,h),!l&&h.timeout&&t.lastRequestTime){let w=Date.now()-t.lastRequestTime,m=h.timeout-w-p;if(m<=0)return Promise.reject(r);h.timeout=m}return h.transformRequest=[w=>w],await c(t.retryCount,r,h),new Promise(w=>{setTimeout(()=>w(i(h)),p)})}async function jht(i,t){i.retryCount>=i.retries&&await i.onMaxRetryTimesExceeded(t,i.retryCount)}var Rl=(i,t)=>{let r=i.interceptors.request.use(o=>(lD(o,t),o[p7]?.validateResponse&&(o.validateStatus=()=>!1),o)),h=i.interceptors.response.use(null,async o=>{let{config:l}=o;if(!l)return Promise.reject(o);let c=lD(l,t);return o.response&&c.validateResponse?.(o.response)?o.response:await qht(c,o)?Fht(i,c,o,l):(await jht(c,o),Promise.reject(o))});return{requestInterceptorId:r,responseInterceptorId:h}};Rl.isNetworkError=pD;Rl.isSafeRequestError=Pht;Rl.isIdempotentRequestError=mD;Rl.isNetworkOrIdempotentRequestError=vD;Rl.exponentialDelay=Lht;Rl.isRetryableError=g7;var D6=Rl;Tt();Rt();xt();var z9=Sl(Xq(),1);Tt();Rt();xt();var r1="1.2.0-alpha.
|
|
221
|
+
`+l):h.stack=l}catch{}}throw h}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ph(this.defaults,r);let{transitional:h,paramsSerializer:o,headers:l}=r;h!==void 0&&N6.assertOptions(h,{silentJSONParsing:uc.transitional(uc.boolean),forcedJSONParsing:uc.transitional(uc.boolean),clarifyTimeoutError:uc.transitional(uc.boolean)},!1),o!=null&&(Ke.isFunction(o)?r.paramsSerializer={serialize:o}:N6.assertOptions(o,{encode:uc.function,serialize:uc.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let c=l&&Ke.merge(l.common,l[r.method]);l&&Ke.forEach(["delete","get","head","post","put","patch","common"],A=>{delete l[A]}),r.headers=Zn.concat(c,l);let p=[],w=!0;this.interceptors.request.forEach(function(R){typeof R.runWhen=="function"&&R.runWhen(r)===!1||(w=w&&R.synchronous,p.unshift(R.fulfilled,R.rejected))});let m=[];this.interceptors.response.forEach(function(R){m.push(R.fulfilled,R.rejected)});let y,v=0,M;if(!w){let A=[C6.bind(this),void 0];for(A.unshift.apply(A,p),A.push.apply(A,m),M=A.length,y=Promise.resolve(r);v<M;)y=y.then(A[v++],A[v++]);return y}M=p.length;let T=r;for(v=0;v<M;){let A=p[v++],R=p[v++];try{T=A(T)}catch(B){R.call(this,B);break}}try{y=C6.call(this,T)}catch(A){return Promise.reject(A)}for(v=0,M=m.length;v<M;)y=y.then(m[v++],m[v++]);return y}getUri(t){t=ph(this.defaults,t);let r=f2(t.baseURL,t.url);return n2(r,t.params,t.paramsSerializer)}};Ke.forEach(["delete","get","head","options"],function(t){Nd.prototype[t]=function(r,h){return this.request(ph(h||{},{method:t,url:r,data:(h||{}).data}))}});Ke.forEach(["post","put","patch"],function(t){function r(h){return function(l,c,p){return this.request(ph(p||{},{method:t,headers:h?{"Content-Type":"multipart/form-data"}:{},url:l,data:c}))}}Nd.prototype[t]=r(),Nd.prototype[t+"Form"]=r(!0)});var u2=Nd;Tt();Rt();xt();var u7=class i{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(l){r=l});let h=this;this.promise.then(o=>{if(!h._listeners)return;let l=h._listeners.length;for(;l-- >0;)h._listeners[l](o);h._listeners=null}),this.promise.then=o=>{let l,c=new Promise(p=>{h.subscribe(p),l=p}).then(o);return c.cancel=function(){h.unsubscribe(l)},c},t(function(l,c,p){h.reason||(h.reason=new of(l,c,p),r(h.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new i(function(o){t=o}),cancel:t}}},sD=u7;Tt();Rt();xt();function c7(i){return function(r){return i.apply(null,r)}}Tt();Rt();xt();function l7(i){return Ke.isObject(i)&&i.isAxiosError===!0}Tt();Rt();xt();var d7={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(d7).forEach(([i,t])=>{d7[t]=i});var hD=d7;function fD(i){let t=new u2(i),r=e2(u2.prototype.request,t);return Ke.extend(r,u2.prototype,t,{allOwnKeys:!0}),Ke.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return fD(ph(i,o))},r}var Wn=fD(Od);Wn.Axios=u2;Wn.CanceledError=of;Wn.CancelToken=sD;Wn.isCancel=s2;Wn.VERSION=P6;Wn.toFormData=fc;Wn.AxiosError=Nr;Wn.Cancel=Wn.CanceledError;Wn.all=function(t){return Promise.all(t)};Wn.spread=c7;Wn.isAxiosError=l7;Wn.mergeConfig=ph;Wn.AxiosHeaders=Zn;Wn.formToJSON=i=>x6(Ke.isHTMLForm(i)?new FormData(i):i);Wn.getAdapter=O6.getAdapter;Wn.HttpStatusCode=hD;Wn.default=Wn;var L6=Wn;var{Axios:nLt,AxiosError:oLt,CanceledError:aLt,isCancel:sLt,CancelToken:hLt,VERSION:fLt,all:uLt,Cancel:cLt,isAxiosError:lLt,spread:dLt,toFormData:pLt,AxiosHeaders:gLt,HttpStatusCode:mLt,formToJSON:vLt,getAdapter:yLt,mergeConfig:bLt}=L6;Tt();Rt();xt();var dD=Sl(cD(),1),p7="axios-retry";function pD(i){let t=["ERR_CANCELED","ECONNABORTED"];return i.response||!i.code||t.includes(i.code)?!1:(0,dD.default)(i)}var gD=["get","head","options"],Cht=gD.concat(["put","delete"]);function g7(i){return i.code!=="ECONNABORTED"&&(!i.response||i.response.status===429||i.response.status>=500&&i.response.status<=599)}function Pht(i){return i.config?.method?g7(i)&&gD.indexOf(i.config.method)!==-1:!1}function mD(i){return i.config?.method?g7(i)&&Cht.indexOf(i.config.method)!==-1:!1}function vD(i){return pD(i)||mD(i)}function yD(i=void 0){let t=i?.response?.headers["retry-after"];if(!t)return 0;let r=(Number(t)||0)*1e3;return r===0&&(r=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,r)}function Nht(i=0,t=void 0){return Math.max(0,yD(t))}function Lht(i=0,t=void 0,r=100){let h=2**i*r,o=Math.max(h,yD(t)),l=o*.2*Math.random();return o+l}var Dht={retries:3,retryCondition:vD,retryDelay:Nht,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function $ht(i,t){return{...Dht,...t,...i[p7]}}function lD(i,t){let r=$ht(i,t||{});return r.retryCount=r.retryCount||0,r.lastRequestTime=r.lastRequestTime||Date.now(),i[p7]=r,r}function Uht(i,t){i.defaults.agent===t.agent&&delete t.agent,i.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,i.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function qht(i,t){let{retries:r,retryCondition:h}=i,o=(i.retryCount||0)<r&&h(t);if(typeof o=="object")try{return await o!==!1}catch{return!1}return o}async function Fht(i,t,r,h){t.retryCount+=1;let{retryDelay:o,shouldResetTimeout:l,onRetry:c}=t,p=o(t.retryCount,r);if(Uht(i,h),!l&&h.timeout&&t.lastRequestTime){let w=Date.now()-t.lastRequestTime,m=h.timeout-w-p;if(m<=0)return Promise.reject(r);h.timeout=m}return h.transformRequest=[w=>w],await c(t.retryCount,r,h),new Promise(w=>{setTimeout(()=>w(i(h)),p)})}async function jht(i,t){i.retryCount>=i.retries&&await i.onMaxRetryTimesExceeded(t,i.retryCount)}var Rl=(i,t)=>{let r=i.interceptors.request.use(o=>(lD(o,t),o[p7]?.validateResponse&&(o.validateStatus=()=>!1),o)),h=i.interceptors.response.use(null,async o=>{let{config:l}=o;if(!l)return Promise.reject(o);let c=lD(l,t);return o.response&&c.validateResponse?.(o.response)?o.response:await qht(c,o)?Fht(i,c,o,l):(await jht(c,o),Promise.reject(o))});return{requestInterceptorId:r,responseInterceptorId:h}};Rl.isNetworkError=pD;Rl.isSafeRequestError=Pht;Rl.isIdempotentRequestError=mD;Rl.isNetworkOrIdempotentRequestError=vD;Rl.exponentialDelay=Lht;Rl.isRetryableError=g7;var D6=Rl;Tt();Rt();xt();var z9=Sl(Xq(),1);Tt();Rt();xt();var r1="1.2.0-alpha.14";var la=class{logger;silent=!1;constructor({level:t="info"}={}){if(t==="none"){this.silent=!0;return}this.logger=z9.default.createLogger({level:t,name:"ar-io-sdk",version:r1,serializers:z9.default.stdSerializers})}info(t,...r){this.silent||this.logger.info(...r,t)}warn(t,...r){this.silent||this.logger.warn(...r,t)}error(t,...r){this.silent||this.logger.error(...r,t)}debug(t,...r){this.silent||this.logger.debug(...r,t)}setLogLevel(t){if(t==="none"){this.silent=!0;return}this.logger.level(t)}};var Yq=({axiosConfig:i={},logger:t=new la,retryConfig:r={retries:5,retryDelay:D6.exponentialDelay,retryCondition:h=>D6.isRetryableError(h),onRetry(h,o,l){t.error(`Retrying request ${l.url} attempt ${h}`,o)}}}={})=>{let h=L6.create({...i,maxRedirects:0,headers:{...i.headers,"x-source-version":`${r1}`,"x-source-identifier":"ar-io-sdk"},validateStatus:()=>!0});return D6(h,r),h};Tt();Rt();xt();Tt();Rt();xt();Tt();Rt();xt();var yh=class extends Error{constructor(t){super(t),this.name=this.constructor.name}},xy=class extends yh{},Qq=class extends yh{},Wl=class extends yh{constructor(t,r){super(`Failed request: ${t}: ${r}`)}},Ry=class extends yh{},i1=class extends yh{},tF=class extends yh{constructor(){super("Invalid signer. Please provide a valid signer to interact with the contract.")}},No=class extends yh{constructor(){super("Invalid contract configuration")}},eF=class extends yh{constructor(){super("Invalid process configuration")}},n1=class extends yh{};var o1=100;async function xqt({address:i,arweave:t,signal:r=AbortSignal.timeout(1e4)}){let h=!1,o,l=new Set;do{let c={query:`
|
|
222
222
|
{
|
|
223
223
|
transactions (
|
|
224
224
|
owners:["${i}"]
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/version.js
CHANGED
package/lib/types/io.d.ts
CHANGED
package/lib/types/version.d.ts
CHANGED