@dcl-regenesislabs/mobile-hub 1.0.0-20717249605.commit-a29cf32 → 1.0.0-20717816491.commit-17f8927

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.
@@ -1,4 +1,4 @@
1
- import{$ as T,a0 as H,a1 as Ye,a2 as hr,a3 as we,a4 as L,a5 as ze,a6 as pr,a7 as io,a8 as He,a9 as $a,aa as Ia,ab as Gn,ac as V,ad as Se,ae as tn,af as Sa,ag as Te,ah as oe,ai as Ta,aj as ka,ak as me,al as Na,am as Fa,an as yr,ao as Ra,ap as Dt,aq as Hn,ar as ts,as as ns,at as rs,au as ss,av as os,aw as is,ax as as,ay as cs,az as Dn,aA as Tt,aB as us,aC as Oa,aD as Wt,aE as fs,aF as Ca,aG as qn,aH as ds,aI as ao,aJ as ls,aK as za,aL as co,aM as bs,aN as La,aO as uo,aP as hs,aQ as _a,aR as ps}from"./core-3moN3UNO.js";import{b1 as V1,b0 as Z1,b2 as W1,b3 as K1,b4 as Y1,aZ as X1,b5 as J1,b6 as Q1,b7 as eb,b8 as tb,b9 as nb,ba as rb,bb as sb,bc as ob,bd as ib,be as ab,bf as cb,bg as ub,aY as fb,a_ as db,bh as lb,a$ as bb,bi as hb,bj as pb,bk as yb,bl as mb,bm as gb,bn as wb,bo as xb,bq as vb,bp as Eb,aS as Pb,aW as Ab,aT as Bb,aX as $b,aV as Ib,br as Sb,aU as Tb,bs as kb}from"./core-3moN3UNO.js";import{_ as fo}from"./index-ChaSpG6i.js";import"./index-DrVdGUjk.js";const Ua="1.2.3";let Q=class Vn extends Error{constructor(t,n={}){const r=n.cause instanceof Vn?n.cause.details:n.cause?.message?n.cause.message:n.details,s=n.cause instanceof Vn&&n.cause.docsPath||n.docsPath,o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: https://abitype.dev${s}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${Ua}`].join(`
1
+ import{$ as T,a0 as H,a1 as Ye,a2 as hr,a3 as we,a4 as L,a5 as ze,a6 as pr,a7 as io,a8 as He,a9 as $a,aa as Ia,ab as Gn,ac as V,ad as Se,ae as tn,af as Sa,ag as Te,ah as oe,ai as Ta,aj as ka,ak as me,al as Na,am as Fa,an as yr,ao as Ra,ap as Dt,aq as Hn,ar as ts,as as ns,at as rs,au as ss,av as os,aw as is,ax as as,ay as cs,az as Dn,aA as Tt,aB as us,aC as Oa,aD as Wt,aE as fs,aF as Ca,aG as qn,aH as ds,aI as ao,aJ as ls,aK as za,aL as co,aM as bs,aN as La,aO as uo,aP as hs,aQ as _a,aR as ps}from"./core-Ds-5UYKM.js";import{b1 as V1,b0 as Z1,b2 as W1,b3 as K1,b4 as Y1,aZ as X1,b5 as J1,b6 as Q1,b7 as eb,b8 as tb,b9 as nb,ba as rb,bb as sb,bc as ob,bd as ib,be as ab,bf as cb,bg as ub,aY as fb,a_ as db,bh as lb,a$ as bb,bi as hb,bj as pb,bk as yb,bl as mb,bm as gb,bn as wb,bo as xb,bq as vb,bp as Eb,aS as Pb,aW as Ab,aT as Bb,aX as $b,aV as Ib,br as Sb,aU as Tb,bs as kb}from"./core-Ds-5UYKM.js";import{_ as fo}from"./index-CEmkvSJ-.js";import"./index-Cf-uY5dQ.js";const Ua="1.2.3";let Q=class Vn extends Error{constructor(t,n={}){const r=n.cause instanceof Vn?n.cause.details:n.cause?.message?n.cause.message:n.details,s=n.cause instanceof Vn&&n.cause.docsPath||n.docsPath,o=[t||"An error occurred.","",...n.metaMessages?[...n.metaMessages,""]:[],...s?[`Docs: https://abitype.dev${s}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${Ua}`].join(`
2
2
  `);super(o),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),n.cause&&(this.cause=n.cause),this.details=r,this.docsPath=s,this.metaMessages=n.metaMessages,this.shortMessage=t}};function Fe(e,t){return e.exec(t)?.groups}const lo=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,bo=/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,ho=/^\(.+?\).*?$/,ys=/^tuple(?<array>(\[(\d*)\])*)$/;function Zn(e){let t=e.type;if(ys.test(e.type)&&"components"in e){t="(";const n=e.components.length;for(let s=0;s<n;s++){const o=e.components[s];t+=Zn(o),s<n-1&&(t+=", ")}const r=Fe(ys,e.type);return t+=`)${r?.array||""}`,Zn({...e,type:t})}return"indexed"in e&&e.indexed&&(t=`${t} indexed`),e.name?`${t} ${e.name}`:t}function st(e){let t="";const n=e.length;for(let r=0;r<n;r++){const s=e[r];t+=Zn(s),r!==n-1&&(t+=", ")}return t}function Kt(e){return e.type==="function"?`function ${e.name}(${st(e.inputs)})${e.stateMutability&&e.stateMutability!=="nonpayable"?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${st(e.outputs)})`:""}`:e.type==="event"?`event ${e.name}(${st(e.inputs)})`:e.type==="error"?`error ${e.name}(${st(e.inputs)})`:e.type==="constructor"?`constructor(${st(e.inputs)})${e.stateMutability==="payable"?" payable":""}`:e.type==="fallback"?`fallback() external${e.stateMutability==="payable"?" payable":""}`:"receive() external payable"}const po=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Ma(e){return po.test(e)}function ja(e){return Fe(po,e)}const yo=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function Ga(e){return yo.test(e)}function Ha(e){return Fe(yo,e)}const mo=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function Da(e){return mo.test(e)}function qa(e){return Fe(mo,e)}const go=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function nn(e){return go.test(e)}function Va(e){return Fe(go,e)}const wo=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function Za(e){return wo.test(e)}function Wa(e){return Fe(wo,e)}const xo=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function Ka(e){return xo.test(e)}function Ya(e){return Fe(xo,e)}const Xa=/^receive\(\) external payable$/;function Ja(e){return Xa.test(e)}const ms=new Set(["memory","indexed","storage","calldata"]),Qa=new Set(["indexed"]),Wn=new Set(["calldata","memory","storage"]);class ec extends Q{constructor({signature:t}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class tc extends Q{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class nc extends Q{constructor({type:t}){super("Unknown type.",{metaMessages:[`Type "${t}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}class rc extends Q{constructor({params:t}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(t,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class sc extends Q{constructor({param:t}){super("Invalid ABI parameter.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class oc extends Q{constructor({param:t,name:n}){super("Invalid ABI parameter.",{details:t,metaMessages:[`"${n}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class ic extends Q{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class ac extends Q{constructor({param:t,type:n,modifier:r}){super("Invalid ABI parameter.",{details:t,metaMessages:[`Modifier "${r}" not allowed${n?` in "${n}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class cc extends Q{constructor({abiParameter:t}){super("Invalid ABI parameter.",{details:JSON.stringify(t,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}class pt extends Q{constructor({signature:t,type:n}){super(`Invalid ${n} signature.`,{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class uc extends Q{constructor({signature:t}){super("Unknown signature.",{details:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class fc extends Q{constructor({signature:t}){super("Invalid struct signature.",{details:t,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}class dc extends Q{constructor({type:t}){super("Circular reference detected.",{metaMessages:[`Struct "${t}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}class lc extends Q{constructor({current:t,depth:n}){super("Unbalanced parentheses.",{metaMessages:[`"${t.trim()}" has too many ${n>0?"opening":"closing"} parentheses.`],details:`Depth "${n}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}function bc(e,t,n){let r="";if(n)for(const s of Object.entries(n)){if(!s)continue;let o="";for(const i of s[1])o+=`[${i.type}${i.name?`:${i.name}`:""}]`;r+=`(${s[0]}{${o}})`}return t?`${t}:${e}${r}`:`${e}${r}`}const En=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);function Kn(e,t={}){if(Da(e))return hc(e,t);if(Ga(e))return pc(e,t);if(Ma(e))return yc(e,t);if(Za(e))return mc(e,t);if(Ka(e))return gc(e);if(Ja(e))return{type:"receive",stateMutability:"payable"};throw new uc({signature:e})}function hc(e,t={}){const n=qa(e);if(!n)throw new pt({signature:e,type:"function"});const r=ee(n.parameters),s=[],o=r.length;for(let a=0;a<o;a++)s.push(ke(r[a],{modifiers:Wn,structs:t,type:"function"}));const i=[];if(n.returns){const a=ee(n.returns),c=a.length;for(let u=0;u<c;u++)i.push(ke(a[u],{modifiers:Wn,structs:t,type:"function"}))}return{name:n.name,type:"function",stateMutability:n.stateMutability??"nonpayable",inputs:s,outputs:i}}function pc(e,t={}){const n=Ha(e);if(!n)throw new pt({signature:e,type:"event"});const r=ee(n.parameters),s=[],o=r.length;for(let i=0;i<o;i++)s.push(ke(r[i],{modifiers:Qa,structs:t,type:"event"}));return{name:n.name,type:"event",inputs:s}}function yc(e,t={}){const n=ja(e);if(!n)throw new pt({signature:e,type:"error"});const r=ee(n.parameters),s=[],o=r.length;for(let i=0;i<o;i++)s.push(ke(r[i],{structs:t,type:"error"}));return{name:n.name,type:"error",inputs:s}}function mc(e,t={}){const n=Wa(e);if(!n)throw new pt({signature:e,type:"constructor"});const r=ee(n.parameters),s=[],o=r.length;for(let i=0;i<o;i++)s.push(ke(r[i],{structs:t,type:"constructor"}));return{type:"constructor",stateMutability:n.stateMutability??"nonpayable",inputs:s}}function gc(e){const t=Ya(e);if(!t)throw new pt({signature:e,type:"fallback"});return{type:"fallback",stateMutability:t.stateMutability??"nonpayable"}}const wc=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,xc=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,vc=/^u?int$/;function ke(e,t){const n=bc(e,t?.type,t?.structs);if(En.has(n))return En.get(n);const r=ho.test(e),s=Fe(r?xc:wc,e);if(!s)throw new sc({param:e});if(s.name&&Pc(s.name))throw new oc({param:e,name:s.name});const o=s.name?{name:s.name}:{},i=s.modifier==="indexed"?{indexed:!0}:{},a=t?.structs??{};let c,u={};if(r){c="tuple";const d=ee(s.type),l=[],b=d.length;for(let y=0;y<b;y++)l.push(ke(d[y],{structs:a}));u={components:l}}else if(s.type in a)c="tuple",u={components:a[s.type]};else if(vc.test(s.type))c=`${s.type}256`;else if(s.type==="address payable")c="address";else if(c=s.type,t?.type!=="struct"&&!vo(c))throw new nc({type:c});if(s.modifier){if(!t?.modifiers?.has?.(s.modifier))throw new ic({param:e,type:t?.type,modifier:s.modifier});if(Wn.has(s.modifier)&&!Ac(c,!!s.array))throw new ac({param:e,type:t?.type,modifier:s.modifier})}const f={type:`${c}${s.array??""}`,...o,...i,...u};return En.set(n,f),f}function ee(e,t=[],n="",r=0){const s=e.trim().length;for(let o=0;o<s;o++){const i=e[o],a=e.slice(o+1);switch(i){case",":return r===0?ee(a,[...t,n.trim()]):ee(a,t,`${n}${i}`,r);case"(":return ee(a,t,`${n}${i}`,r+1);case")":return ee(a,t,`${n}${i}`,r-1);default:return ee(a,t,`${n}${i}`,r)}}if(n==="")return t;if(r!==0)throw new lc({current:n,depth:r});return t.push(n.trim()),t}function vo(e){return e==="address"||e==="bool"||e==="function"||e==="string"||lo.test(e)||bo.test(e)}const Ec=/^(?:after|alias|anonymous|apply|auto|byte|calldata|case|catch|constant|copyof|default|defined|error|event|external|false|final|function|immutable|implements|in|indexed|inline|internal|let|mapping|match|memory|mutable|null|of|override|partial|private|promise|public|pure|reference|relocatable|return|returns|sizeof|static|storage|struct|super|supports|switch|this|true|try|typedef|typeof|var|view|virtual)$/;function Pc(e){return e==="address"||e==="bool"||e==="function"||e==="string"||e==="tuple"||lo.test(e)||bo.test(e)||Ec.test(e)}function Ac(e,t){return t||e==="bytes"||e==="string"||e==="tuple"}function mr(e){const t={},n=e.length;for(let i=0;i<n;i++){const a=e[i];if(!nn(a))continue;const c=Va(a);if(!c)throw new pt({signature:a,type:"struct"});const u=c.properties.split(";"),f=[],d=u.length;for(let l=0;l<d;l++){const y=u[l].trim();if(!y)continue;const p=ke(y,{type:"struct"});f.push(p)}if(!f.length)throw new fc({signature:a});t[c.name]=f}const r={},s=Object.entries(t),o=s.length;for(let i=0;i<o;i++){const[a,c]=s[i];r[a]=Eo(c,t)}return r}const Bc=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function Eo(e=[],t={},n=new Set){const r=[],s=e.length;for(let o=0;o<s;o++){const i=e[o];if(ho.test(i.type))r.push(i);else{const c=Fe(Bc,i.type);if(!c?.type)throw new cc({abiParameter:i});const{array:u,type:f}=c;if(f in t){if(n.has(f))throw new dc({type:f});r.push({...i,type:`tuple${u??""}`,components:Eo(t[f],t,new Set([...n,f]))})}else if(vo(f))r.push(i);else throw new tc({type:f})}}return r}function Po(e){const t=mr(e),n=[],r=e.length;for(let s=0;s<r;s++){const o=e[s];nn(o)||n.push(Kn(o,t))}return n}function gs(e){let t;if(typeof e=="string")t=Kn(e);else{const n=mr(e),r=e.length;for(let s=0;s<r;s++){const o=e[s];if(!nn(o)){t=Kn(o,n);break}}}if(!t)throw new ec({signature:e});return t}function ws(e){const t=[];if(typeof e=="string"){const n=ee(e),r=n.length;for(let s=0;s<r;s++)t.push(ke(n[s],{modifiers:ms}))}else{const n=mr(e),r=e.length;for(let s=0;s<r;s++){const o=e[s];if(nn(o))continue;const i=ee(o),a=i.length;for(let c=0;c<a;c++)t.push(ke(i[c],{modifiers:ms,structs:n}))}}if(t.length===0)throw new rc({params:e});return t}function z(e,t,n){const r=e[t.name];if(typeof r=="function")return r;const s=e[n];return typeof s=="function"?s:o=>t(e,o)}function ue(e,{includeName:t=!1}={}){if(e.type!=="function"&&e.type!=="event"&&e.type!=="error")throw new Uc(e.type);return`${e.name}(${rn(e.inputs,{includeName:t})})`}function rn(e,{includeName:t=!1}={}){return e?e.map(n=>$c(n,{includeName:t})).join(t?", ":","):""}function $c(e,{includeName:t}){return e.type.startsWith("tuple")?`(${rn(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")}class Ic extends T{constructor({docsPath:t}){super(["A constructor was not found on the ABI.","Make sure you are using the correct ABI and that the constructor exists on it."].join(`
3
3
  `),{docsPath:t,name:"AbiConstructorNotFoundError"})}}class xs extends T{constructor({docsPath:t}){super(["Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.","Make sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists."].join(`
4
4
  `),{docsPath:t,name:"AbiConstructorParamsNotFoundError"})}}class Ao extends T{constructor({data:t,params:n,size:r}){super([`Data size of ${r} bytes is too small for given parameters.`].join(`