@tuwaio/satellite-evm 1.0.0-fix-test-alpha.43.2b6e6fe → 1.0.0-fix-test-alpha.44.f94c262
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/dist/ccip-NFEWBVRI.mjs +2 -0
- package/dist/{ccip-6IIASNXP.mjs.map → ccip-NFEWBVRI.mjs.map} +1 -1
- package/dist/{chunk-UIXF6GW7.mjs → chunk-5KBZWYCA.mjs} +2 -2
- package/dist/{chunk-UIXF6GW7.mjs.map → chunk-5KBZWYCA.mjs.map} +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/ccip-6IIASNXP.mjs +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"ccip-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ccip-NFEWBVRI.mjs"}
|
|
@@ -32,5 +32,5 @@ ${vo(d)}`),super(t.shortMessage,{cause:t,docsPath:r,metaMessages:[...t.metaMessa
|
|
|
32
32
|
`),{cause:t,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"});}};Object.defineProperty(he,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/insufficient funds|exceeds transaction sender account balance/});var xe=class extends u{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:t,name:"IntrinsicGasTooHighError"});}};Object.defineProperty(xe,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/intrinsic gas too high|gas limit reached/});var ge=class extends u{constructor({cause:t,gas:n}={}){super(`The amount of gas ${n?`(${n}) `:""}provided for the transaction is too low.`,{cause:t,name:"IntrinsicGasTooLowError"});}};Object.defineProperty(ge,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/intrinsic gas too low/});var we=class extends u{constructor({cause:t}){super("The transaction type is not supported for this chain.",{cause:t,name:"TransactionTypeNotSupportedError"});}};Object.defineProperty(we,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/transaction type not valid/});var J=class extends u{constructor({cause:t,maxPriorityFeePerGas:n,maxFeePerGas:r}={}){super([`The provided tip (\`maxPriorityFeePerGas\`${n?` = ${L(n)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${L(r)} gwei`:""}).`].join(`
|
|
33
33
|
`),{cause:t,name:"TipAboveFeeCapError"});}};Object.defineProperty(J,"nodeMessage",{enumerable:true,configurable:true,writable:true,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});var ve=class extends u{constructor({cause:t}){super(`An error occurred while executing: ${t?.shortMessage}`,{cause:t,name:"UnknownNodeError"});}};var ke=class extends u{constructor({body:t,cause:n,details:r,headers:o,status:i,url:s}){super("HTTP request failed.",{cause:n,details:r,metaMessages:[i&&`Status: ${i}`,`URL: ${te(s)}`,t&&`Request body: ${W(t)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"headers",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"status",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"url",{enumerable:true,configurable:true,writable:true,value:void 0}),this.body=t,this.headers=o,this.status=i,this.url=s;}};var zt=class extends u{constructor({body:t,error:n,url:r}){super("RPC Request failed.",{cause:n,details:n.message,metaMessages:[`URL: ${te(r)}`,`Request body: ${W(t)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.code=n.code,this.data=n.data;}};var To=class extends u{constructor({body:t,url:n}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${te(n)}`,`Request body: ${W(t)}`],name:"TimeoutError"});}};var Ys=-1,w=class extends u{constructor(t,{code:n,docsPath:r,metaMessages:o,name:i,shortMessage:s}){super(s,{cause:t,docsPath:r,metaMessages:o||t?.metaMessages,name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:true,configurable:true,writable:true,value:void 0}),this.name=i||t.name,this.code=t instanceof zt?t.code:n??Ys;}},$=class extends w{constructor(t,n){super(t,n),Object.defineProperty(this,"data",{enumerable:true,configurable:true,writable:true,value:void 0}),this.data=n.data;}},yn=class e extends w{constructor(t){super(t,{code:e.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."});}};Object.defineProperty(yn,"code",{enumerable:true,configurable:true,writable:true,value:-32700});var hn=class e extends w{constructor(t){super(t,{code:e.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."});}};Object.defineProperty(hn,"code",{enumerable:true,configurable:true,writable:true,value:-32600});var xn=class e extends w{constructor(t,{method:n}={}){super(t,{code:e.code,name:"MethodNotFoundRpcError",shortMessage:`The method${n?` "${n}"`:""} does not exist / is not available.`});}};Object.defineProperty(xn,"code",{enumerable:true,configurable:true,writable:true,value:-32601});var gn=class e extends w{constructor(t){super(t,{code:e.code,name:"InvalidParamsRpcError",shortMessage:["Invalid parameters were provided to the RPC method.","Double check you have provided the correct parameters."].join(`
|
|
34
34
|
`)});}};Object.defineProperty(gn,"code",{enumerable:true,configurable:true,writable:true,value:-32602});var wn=class e extends w{constructor(t){super(t,{code:e.code,name:"InternalRpcError",shortMessage:"An internal error was received."});}};Object.defineProperty(wn,"code",{enumerable:true,configurable:true,writable:true,value:-32603});var vn=class e extends w{constructor(t){super(t,{code:e.code,name:"InvalidInputRpcError",shortMessage:["Missing or invalid parameters.","Double check you have provided the correct parameters."].join(`
|
|
35
|
-
`)});}};Object.defineProperty(vn,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});var $n=class e extends w{constructor(t){super(t,{code:e.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ResourceNotFoundRpcError"});}};Object.defineProperty($n,"code",{enumerable:true,configurable:true,writable:true,value:-32001});var An=class e extends w{constructor(t){super(t,{code:e.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."});}};Object.defineProperty(An,"code",{enumerable:true,configurable:true,writable:true,value:-32002});var Pn=class e extends w{constructor(t){super(t,{code:e.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."});}};Object.defineProperty(Pn,"code",{enumerable:true,configurable:true,writable:true,value:-32003});var In=class e extends w{constructor(t,{method:n}={}){super(t,{code:e.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`});}};Object.defineProperty(In,"code",{enumerable:true,configurable:true,writable:true,value:-32004});var Mn=class e extends w{constructor(t){super(t,{code:e.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."});}};Object.defineProperty(Mn,"code",{enumerable:true,configurable:true,writable:true,value:-32005});var En=class e extends w{constructor(t){super(t,{code:e.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."});}};Object.defineProperty(En,"code",{enumerable:true,configurable:true,writable:true,value:-32006});var Tn=class e extends ${constructor(t){super(t,{code:e.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."});}};Object.defineProperty(Tn,"code",{enumerable:true,configurable:true,writable:true,value:4001});var Sn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."});}};Object.defineProperty(Sn,"code",{enumerable:true,configurable:true,writable:true,value:4100});var Bn=class e extends ${constructor(t,{method:n}={}){super(t,{code:e.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`});}};Object.defineProperty(Bn,"code",{enumerable:true,configurable:true,writable:true,value:4200});var Rn=class e extends ${constructor(t){super(t,{code:e.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."});}};Object.defineProperty(Rn,"code",{enumerable:true,configurable:true,writable:true,value:4900});var jn=class e extends ${constructor(t){super(t,{code:e.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."});}};Object.defineProperty(jn,"code",{enumerable:true,configurable:true,writable:true,value:4901});var On=class e extends ${constructor(t){super(t,{code:e.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."});}};Object.defineProperty(On,"code",{enumerable:true,configurable:true,writable:true,value:4902});var zn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."});}};Object.defineProperty(zn,"code",{enumerable:true,configurable:true,writable:true,value:5700});var Fn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."});}};Object.defineProperty(Fn,"code",{enumerable:true,configurable:true,writable:true,value:5710});var kn=class e extends ${constructor(t){super(t,{code:e.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."});}};Object.defineProperty(kn,"code",{enumerable:true,configurable:true,writable:true,value:5720});var Cn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"});}};Object.defineProperty(Cn,"code",{enumerable:true,configurable:true,writable:true,value:5730});var Un=class e extends ${constructor(t){super(t,{code:e.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."});}};Object.defineProperty(Un,"code",{enumerable:true,configurable:true,writable:true,value:5740});var Hn=class e extends ${constructor(t){super(t,{code:e.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."});}};Object.defineProperty(Hn,"code",{enumerable:true,configurable:true,writable:true,value:5750});var Nn=class e extends ${constructor(t){super(t,{code:e.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."});}};Object.defineProperty(Nn,"code",{enumerable:true,configurable:true,writable:true,value:5760});var So=class extends w{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."});}};function Bo(e,t){let n=(e.details||"").toLowerCase(),r=e instanceof u?e.walk(o=>o?.code===D.code):e;return r instanceof u?new D({cause:e,message:r.details}):D.nodeMessage.test(n)?new D({cause:e,message:e.details}):Z.nodeMessage.test(n)?new Z({cause:e,maxFeePerGas:t?.maxFeePerGas}):le.nodeMessage.test(n)?new le({cause:e,maxFeePerGas:t?.maxFeePerGas}):me.nodeMessage.test(n)?new me({cause:e,nonce:t?.nonce}):be.nodeMessage.test(n)?new be({cause:e,nonce:t?.nonce}):ye.nodeMessage.test(n)?new ye({cause:e,nonce:t?.nonce}):he.nodeMessage.test(n)?new he({cause:e}):xe.nodeMessage.test(n)?new xe({cause:e,gas:t?.gas}):ge.nodeMessage.test(n)?new ge({cause:e,gas:t?.gas}):we.nodeMessage.test(n)?new we({cause:e}):J.nodeMessage.test(n)?new J({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new ve({cause:e})}function Ro(e,{docsPath:t,...n}){let r=(()=>{let o=Bo(e,n);return o instanceof ve?e:o})();return new Rt(r,{docsPath:t,...n})}function jo(e,{format:t}){if(!t)return {};let n={};function r(i){let s=Object.keys(i);for(let a of s)a in e&&(n[a]=e[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&r(i[a]);}let o=t(e||{});return r(o),n}var Qs={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Oo(e,t){let n={};return typeof e.authorizationList<"u"&&(n.authorizationList=ei(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>E(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=b(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=b(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=b(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=b(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=b(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=b(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=Qs[e.type]),typeof e.value<"u"&&(n.value=b(e.value)),n}function ei(e){return e.map(t=>({address:t.address,r:t.r?b(BigInt(t.r)):t.r,s:t.s?b(BigInt(t.s)):t.s,chainId:b(t.chainId),nonce:b(t.nonce),...typeof t.yParity<"u"?{yParity:b(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:b(t.v)}:{}}))}function zo(){let e=()=>{},t=()=>{};return {promise:new Promise((r,o)=>{e=r,t=o;}),resolve:e,reject:t}}var Ln=new Map;function Fo({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:o}){let i=async()=>{let p=c();s();let m=p.map(({args:l})=>l);m.length!==0&&e(m).then(l=>{o&&Array.isArray(l)&&l.sort(o);for(let d=0;d<p.length;d++){let{resolve:y}=p[d];y?.([l[d],l]);}}).catch(l=>{for(let d=0;d<p.length;d++){let{reject:y}=p[d];y?.(l);}});},s=()=>Ln.delete(t),a=()=>c().map(({args:p})=>p),c=()=>Ln.get(t)||[],f=p=>Ln.set(t,[...c(),p]);return {flush:s,async schedule(p){let{promise:m,resolve:l,reject:d}=zo();return n?.([...a(),p])&&i(),c().length>0?(f({args:p,resolve:l,reject:d}),m):(f({args:p,resolve:l,reject:d}),setTimeout(i,r),m)}}}function ko(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new Re({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new Re({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function ti(e){let{balance:t,nonce:n,state:r,stateDiff:o,code:i}=e,s={};if(i!==void 0&&(s.code=i),t!==void 0&&(s.balance=b(t)),n!==void 0&&(s.nonce=b(n)),r!==void 0&&(s.state=ko(r)),o!==void 0){if(s.state)throw new St;s.stateDiff=ko(o);}return s}function Co(e){if(!e)return;let t={};for(let{address:n,...r}of e){if(!g(n,{strict:false}))throw new A({address:n});if(t[n])throw new Tt({address:n});t[n]=ti(r);}return t}var Uo=2n**256n-1n;function Ho(e){let{account:t,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:o,to:i}=e,s=t?se(t):void 0;if(s&&!g(s.address))throw new A({address:s.address});if(i&&!g(i))throw new A({address:i});if(typeof n<"u"&&(typeof r<"u"||typeof o<"u"))throw new Bt;if(r&&r>Uo)throw new Z({maxFeePerGas:r});if(o&&r&&o>r)throw new J({maxFeePerGas:r,maxPriorityFeePerGas:o})}async function No(e,t){let{account:n=e.account,authorizationList:r,batch:o=!!e.batch?.multicall,blockNumber:i,blockTag:s=e.experimental_blockTag??"latest",accessList:a,blobs:c,blockOverrides:f,code:p,data:m,factory:l,factoryData:d,gas:y,gasPrice:P,maxFeePerBlobGas:$e,maxFeePerGas:ne,maxPriorityFeePerGas:Ae,nonce:Ce,to:re,value:_o,stateOverride:Wo,...qo}=t,qn=n?se(n):void 0;if(p&&(l||d))throw new u("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(p&&re)throw new u("Cannot provide both `code` & `to` as parameters.");let Zn=p&&m,Jn=l&&d&&re&&m,Kn=Zn||Jn,Zo=Zn?Lo({code:p,data:m}):Jn?oi({data:m,factory:l,factoryData:d,to:re}):m;try{Ho(t);let Pe=(typeof i=="bigint"?b(i):void 0)||s,K=f?Hr(f):void 0,X=Co(Wo),Xn=e.chain?.formatters?.transactionRequest?.format,Ht=(Xn||Oo)({...jo(qo,{format:Xn}),from:qn?.address,accessList:a,authorizationList:r,blobs:c,data:Zo,gas:y,gasPrice:P,maxFeePerBlobGas:$e,maxFeePerGas:ne,maxPriorityFeePerGas:Ae,nonce:Ce,to:Kn?void 0:re,value:_o},"call");if(o&&ni({request:Ht})&&!X&&!K)try{return await ri(e,{...Ht,blockNumber:i,blockTag:s})}catch(G){if(!(G instanceof Me)&&!(G instanceof Y))throw G}let Jo=(()=>{let G=[Ht,Pe];return X&&K?[...G,X,K]:X?[...G,X]:K?[...G,{},K]:G})(),Yn=await e.request({method:"eth_call",params:Jo});return Yn==="0x"?{data:void 0}:{data:Yn}}catch(Ut){let Pe=si(Ut),{offchainLookup:K,offchainLookupSignature:X}=await import('./ccip-6IIASNXP.mjs');if(e.ccipRead!==false&&Pe?.slice(0,10)===X&&re)return {data:await K(e,{data:Pe,to:re})};throw Kn&&Pe?.slice(0,10)==="0x101bb98d"?new jt({factory:l}):Ro(Ut,{...t,account:qn,chain:e.chain})}}function ni({request:e}){let{data:t,to:n,...r}=e;return !(!t||t.startsWith(Lr)||!n||Object.values(r).filter(o=>typeof o<"u").length>0)}async function ri(e,t){let{batchSize:n=1024,deployless:r=false,wait:o=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockNumber:i,blockTag:s=e.experimental_blockTag??"latest",data:a,to:c}=t,f=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return Eo({blockNumber:i,chain:e.chain,contract:"multicall3"});throw new Me})(),m=(typeof i=="bigint"?b(i):void 0)||s,{schedule:l}=Fo({id:`${e.uid}.${m}`,wait:o,shouldSplitBatch(P){return P.reduce((ne,{data:Ae})=>ne+(Ae.length-2),0)>n*2},fn:async P=>{let $e=P.map(Ce=>({allowFailure:true,callData:Ce.data,target:Ce.to})),ne=Mo({abi:Xt,args:[$e],functionName:"aggregate3"}),Ae=await e.request({method:"eth_call",params:[{...f===null?{data:Lo({code:Vr,data:ne})}:{to:f,data:ne}},m]});return Ao({abi:Xt,args:[$e],functionName:"aggregate3",data:Ae||"0x"})}}),[{returnData:d,success:y}]=await l({data:a,to:c});if(!y)throw new Ot({data:d});return d==="0x"?{data:void 0}:{data:d}}function Lo(e){let{code:t,data:n}=e;return bn({abi:et(["constructor(bytes, bytes)"]),bytecode:Dr,args:[t,n]})}function oi(e){let{data:t,factory:n,factoryData:r,to:o}=e;return bn({abi:et(["constructor(address, bytes, address, bytes)"]),bytecode:Gr,args:[o,t,n,r]})}function si(e){if(!(e instanceof u))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var Ft=class extends u{constructor({callbackSelector:t,cause:n,data:r,extraData:o,sender:i,urls:s}){super(n.shortMessage||"An error occurred while fetching for an offchain result.",{cause:n,metaMessages:[...n.metaMessages||[],n.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(a=>` ${te(a)}`)],` Sender: ${i}`,` Data: ${r}`,` Callback selector: ${t}`,` Extra data: ${o}`].flat(),name:"OffchainLookupError"});}},kt=class extends u{constructor({result:t,url:n}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${te(n)}`,`Response: ${W(t)}`],name:"OffchainLookupResponseMalformedError"});}},Ct=class extends u{constructor({sender:t,to:n}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${n}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"});}};function Do(e,t){if(!g(e,{strict:false}))throw new A({address:e});if(!g(t,{strict:false}))throw new A({address:t});return e.toLowerCase()===t.toLowerCase()}function Go(e){let{abi:t,data:n}=e,r=O(n,0,4),o=t.find(i=>i.type==="function"&&r===F(B(i)));if(!o)throw new lt(r,{docsPath:"/docs/contract/decodeFunctionData"});return {functionName:o.name,args:"inputs"in o&&o.inputs&&o.inputs.length>0?de(o.inputs,O(n,4)):void 0}}var Dn="/docs/contract/encodeErrorResult";function Gn(e){let{abi:t,errorName:n,args:r}=e,o=t[0];if(n){let c=q({abi:t,args:r,name:n});if(!c)throw new Te(n,{docsPath:Dn});o=c;}if(o.type!=="error")throw new Te(void 0,{docsPath:Dn});let i=B(o),s=F(i),a="0x";if(r&&r.length>0){if(!o.inputs)throw new pt(o.name,{docsPath:Dn});a=C(o.inputs,r);}return ee([s,a])}var Vn="/docs/contract/encodeFunctionResult";function Vo(e){let{abi:t,functionName:n,result:r}=e,o=t[0];if(n){let s=q({abi:t,name:n});if(!s)throw new R(n,{docsPath:Vn});o=s;}if(o.type!=="function")throw new R(void 0,{docsPath:Vn});if(!o.outputs)throw new ae(o.name,{docsPath:Vn});let i=(()=>{if(o.outputs.length===0)return [];if(o.outputs.length===1)return [r];if(Array.isArray(r))return r;throw new ue(r)})();return C(o.outputs,i)}var _n="x-batch-gateway:true";async function Wn(e){let{data:t,ccipRequest:n}=e,{args:[r]}=Go({abi:nt,data:t}),o=[],i=[];return await Promise.all(r.map(async(s,a)=>{try{i[a]=s.urls.includes(_n)?await Wn({data:s.data,ccipRequest:n}):await n(s),o[a]=!1;}catch(c){o[a]=true,i[a]=ii(c);}})),Vo({abi:nt,functionName:"query",result:[o,i]})}function ii(e){return e.name==="HttpRequestError"&&e.status?Gn({abi:nt,errorName:"HttpError",args:[e.status,e.shortMessage]}):Gn({abi:[rt],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var nd="0x556f1830",ai={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function rd(e,{blockNumber:t,blockTag:n,data:r,to:o}){let{args:i}=mo({data:r,abi:[ai]}),[s,a,c,f,p]=i,{ccipRead:m}=e,l=m&&typeof m?.request=="function"?m.request:ui;try{if(!Do(o,s))throw new Ct({sender:s,to:o});let d=a.includes(_n)?await Wn({data:c,ccipRequest:l}):await l({data:c,sender:s,urls:a}),{data:y}=await No(e,{blockNumber:t,blockTag:n,data:N([f,C([{type:"bytes"},{type:"bytes"}],[d,p])]),to:o});return y}catch(d){throw new Ft({callbackSelector:f,cause:d,data:r,extraData:p,sender:s,urls:a})}}async function ui({data:e,sender:t,urls:n}){let r=new Error("An unknown error occurred.");for(let o=0;o<n.length;o++){let i=n[o],s=i.includes("{data}")?"GET":"POST",a=s==="POST"?{data:e,sender:t}:void 0,c=s==="POST"?{"Content-Type":"application/json"}:{};try{let f=await fetch(i.replace("{sender}",t.toLowerCase()).replace("{data}",e),{body:JSON.stringify(a),headers:c,method:s}),p;if(f.headers.get("Content-Type")?.startsWith("application/json")?p=(await f.json()).data:p=await f.text(),!f.ok){r=new ke({body:a,details:p?.error?W(p.error):f.statusText,headers:f.headers,status:f.status,url:i});continue}if(!M(p)){r=new kt({result:p,url:i});continue}return p}catch(f){r=new ke({body:a,details:f.message,url:i});}}throw r}export{Rn as A,jn as B,On as C,zn as D,Fn as E,kn as F,Cn as G,Un as H,Hn as I,Nn as J,So as K,Fo as L,nd as M,ai as N,rd as O,ui as P,u as a,K0 as b,b as c,rn as d,fe as e,Da as f,W as g,Et as h,ke as i,zt as j,To as k,yn as l,hn as m,xn as n,gn as o,wn as p,vn as q,$n as r,An as s,Pn as t,In as u,Mn as v,En as w,Tn as x,Sn as y,Bn as z};//# sourceMappingURL=chunk-UIXF6GW7.mjs.map
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
`)});}};Object.defineProperty(vn,"code",{enumerable:true,configurable:true,writable:true,value:-32e3});var $n=class e extends w{constructor(t){super(t,{code:e.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:true,configurable:true,writable:true,value:"ResourceNotFoundRpcError"});}};Object.defineProperty($n,"code",{enumerable:true,configurable:true,writable:true,value:-32001});var An=class e extends w{constructor(t){super(t,{code:e.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."});}};Object.defineProperty(An,"code",{enumerable:true,configurable:true,writable:true,value:-32002});var Pn=class e extends w{constructor(t){super(t,{code:e.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."});}};Object.defineProperty(Pn,"code",{enumerable:true,configurable:true,writable:true,value:-32003});var In=class e extends w{constructor(t,{method:n}={}){super(t,{code:e.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${n?` "${n}"`:""} is not supported.`});}};Object.defineProperty(In,"code",{enumerable:true,configurable:true,writable:true,value:-32004});var Mn=class e extends w{constructor(t){super(t,{code:e.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."});}};Object.defineProperty(Mn,"code",{enumerable:true,configurable:true,writable:true,value:-32005});var En=class e extends w{constructor(t){super(t,{code:e.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."});}};Object.defineProperty(En,"code",{enumerable:true,configurable:true,writable:true,value:-32006});var Tn=class e extends ${constructor(t){super(t,{code:e.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."});}};Object.defineProperty(Tn,"code",{enumerable:true,configurable:true,writable:true,value:4001});var Sn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."});}};Object.defineProperty(Sn,"code",{enumerable:true,configurable:true,writable:true,value:4100});var Bn=class e extends ${constructor(t,{method:n}={}){super(t,{code:e.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${n?` " ${n}"`:""}.`});}};Object.defineProperty(Bn,"code",{enumerable:true,configurable:true,writable:true,value:4200});var Rn=class e extends ${constructor(t){super(t,{code:e.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."});}};Object.defineProperty(Rn,"code",{enumerable:true,configurable:true,writable:true,value:4900});var jn=class e extends ${constructor(t){super(t,{code:e.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."});}};Object.defineProperty(jn,"code",{enumerable:true,configurable:true,writable:true,value:4901});var On=class e extends ${constructor(t){super(t,{code:e.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."});}};Object.defineProperty(On,"code",{enumerable:true,configurable:true,writable:true,value:4902});var zn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."});}};Object.defineProperty(zn,"code",{enumerable:true,configurable:true,writable:true,value:5700});var Fn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."});}};Object.defineProperty(Fn,"code",{enumerable:true,configurable:true,writable:true,value:5710});var kn=class e extends ${constructor(t){super(t,{code:e.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."});}};Object.defineProperty(kn,"code",{enumerable:true,configurable:true,writable:true,value:5720});var Cn=class e extends ${constructor(t){super(t,{code:e.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"});}};Object.defineProperty(Cn,"code",{enumerable:true,configurable:true,writable:true,value:5730});var Un=class e extends ${constructor(t){super(t,{code:e.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."});}};Object.defineProperty(Un,"code",{enumerable:true,configurable:true,writable:true,value:5740});var Hn=class e extends ${constructor(t){super(t,{code:e.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."});}};Object.defineProperty(Hn,"code",{enumerable:true,configurable:true,writable:true,value:5750});var Nn=class e extends ${constructor(t){super(t,{code:e.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."});}};Object.defineProperty(Nn,"code",{enumerable:true,configurable:true,writable:true,value:5760});var So=class extends w{constructor(t){super(t,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."});}};function Bo(e,t){let n=(e.details||"").toLowerCase(),r=e instanceof u?e.walk(o=>o?.code===D.code):e;return r instanceof u?new D({cause:e,message:r.details}):D.nodeMessage.test(n)?new D({cause:e,message:e.details}):Z.nodeMessage.test(n)?new Z({cause:e,maxFeePerGas:t?.maxFeePerGas}):le.nodeMessage.test(n)?new le({cause:e,maxFeePerGas:t?.maxFeePerGas}):me.nodeMessage.test(n)?new me({cause:e,nonce:t?.nonce}):be.nodeMessage.test(n)?new be({cause:e,nonce:t?.nonce}):ye.nodeMessage.test(n)?new ye({cause:e,nonce:t?.nonce}):he.nodeMessage.test(n)?new he({cause:e}):xe.nodeMessage.test(n)?new xe({cause:e,gas:t?.gas}):ge.nodeMessage.test(n)?new ge({cause:e,gas:t?.gas}):we.nodeMessage.test(n)?new we({cause:e}):J.nodeMessage.test(n)?new J({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new ve({cause:e})}function Ro(e,{docsPath:t,...n}){let r=(()=>{let o=Bo(e,n);return o instanceof ve?e:o})();return new Rt(r,{docsPath:t,...n})}function jo(e,{format:t}){if(!t)return {};let n={};function r(i){let s=Object.keys(i);for(let a of s)a in e&&(n[a]=e[a]),i[a]&&typeof i[a]=="object"&&!Array.isArray(i[a])&&r(i[a]);}let o=t(e||{});return r(o),n}var Qs={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function Oo(e,t){let n={};return typeof e.authorizationList<"u"&&(n.authorizationList=ei(e.authorizationList)),typeof e.accessList<"u"&&(n.accessList=e.accessList),typeof e.blobVersionedHashes<"u"&&(n.blobVersionedHashes=e.blobVersionedHashes),typeof e.blobs<"u"&&(typeof e.blobs[0]!="string"?n.blobs=e.blobs.map(r=>E(r)):n.blobs=e.blobs),typeof e.data<"u"&&(n.data=e.data),typeof e.from<"u"&&(n.from=e.from),typeof e.gas<"u"&&(n.gas=b(e.gas)),typeof e.gasPrice<"u"&&(n.gasPrice=b(e.gasPrice)),typeof e.maxFeePerBlobGas<"u"&&(n.maxFeePerBlobGas=b(e.maxFeePerBlobGas)),typeof e.maxFeePerGas<"u"&&(n.maxFeePerGas=b(e.maxFeePerGas)),typeof e.maxPriorityFeePerGas<"u"&&(n.maxPriorityFeePerGas=b(e.maxPriorityFeePerGas)),typeof e.nonce<"u"&&(n.nonce=b(e.nonce)),typeof e.to<"u"&&(n.to=e.to),typeof e.type<"u"&&(n.type=Qs[e.type]),typeof e.value<"u"&&(n.value=b(e.value)),n}function ei(e){return e.map(t=>({address:t.address,r:t.r?b(BigInt(t.r)):t.r,s:t.s?b(BigInt(t.s)):t.s,chainId:b(t.chainId),nonce:b(t.nonce),...typeof t.yParity<"u"?{yParity:b(t.yParity)}:{},...typeof t.v<"u"&&typeof t.yParity>"u"?{v:b(t.v)}:{}}))}function zo(){let e=()=>{},t=()=>{};return {promise:new Promise((r,o)=>{e=r,t=o;}),resolve:e,reject:t}}var Ln=new Map;function Fo({fn:e,id:t,shouldSplitBatch:n,wait:r=0,sort:o}){let i=async()=>{let p=c();s();let m=p.map(({args:l})=>l);m.length!==0&&e(m).then(l=>{o&&Array.isArray(l)&&l.sort(o);for(let d=0;d<p.length;d++){let{resolve:y}=p[d];y?.([l[d],l]);}}).catch(l=>{for(let d=0;d<p.length;d++){let{reject:y}=p[d];y?.(l);}});},s=()=>Ln.delete(t),a=()=>c().map(({args:p})=>p),c=()=>Ln.get(t)||[],f=p=>Ln.set(t,[...c(),p]);return {flush:s,async schedule(p){let{promise:m,resolve:l,reject:d}=zo();return n?.([...a(),p])&&i(),c().length>0?(f({args:p,resolve:l,reject:d}),m):(f({args:p,resolve:l,reject:d}),setTimeout(i,r),m)}}}function ko(e){if(!(!e||e.length===0))return e.reduce((t,{slot:n,value:r})=>{if(n.length!==66)throw new Re({size:n.length,targetSize:66,type:"hex"});if(r.length!==66)throw new Re({size:r.length,targetSize:66,type:"hex"});return t[n]=r,t},{})}function ti(e){let{balance:t,nonce:n,state:r,stateDiff:o,code:i}=e,s={};if(i!==void 0&&(s.code=i),t!==void 0&&(s.balance=b(t)),n!==void 0&&(s.nonce=b(n)),r!==void 0&&(s.state=ko(r)),o!==void 0){if(s.state)throw new St;s.stateDiff=ko(o);}return s}function Co(e){if(!e)return;let t={};for(let{address:n,...r}of e){if(!g(n,{strict:false}))throw new A({address:n});if(t[n])throw new Tt({address:n});t[n]=ti(r);}return t}var Uo=2n**256n-1n;function Ho(e){let{account:t,gasPrice:n,maxFeePerGas:r,maxPriorityFeePerGas:o,to:i}=e,s=t?se(t):void 0;if(s&&!g(s.address))throw new A({address:s.address});if(i&&!g(i))throw new A({address:i});if(typeof n<"u"&&(typeof r<"u"||typeof o<"u"))throw new Bt;if(r&&r>Uo)throw new Z({maxFeePerGas:r});if(o&&r&&o>r)throw new J({maxFeePerGas:r,maxPriorityFeePerGas:o})}async function No(e,t){let{account:n=e.account,authorizationList:r,batch:o=!!e.batch?.multicall,blockNumber:i,blockTag:s=e.experimental_blockTag??"latest",accessList:a,blobs:c,blockOverrides:f,code:p,data:m,factory:l,factoryData:d,gas:y,gasPrice:P,maxFeePerBlobGas:$e,maxFeePerGas:ne,maxPriorityFeePerGas:Ae,nonce:Ce,to:re,value:_o,stateOverride:Wo,...qo}=t,qn=n?se(n):void 0;if(p&&(l||d))throw new u("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(p&&re)throw new u("Cannot provide both `code` & `to` as parameters.");let Zn=p&&m,Jn=l&&d&&re&&m,Kn=Zn||Jn,Zo=Zn?Lo({code:p,data:m}):Jn?oi({data:m,factory:l,factoryData:d,to:re}):m;try{Ho(t);let Pe=(typeof i=="bigint"?b(i):void 0)||s,K=f?Hr(f):void 0,X=Co(Wo),Xn=e.chain?.formatters?.transactionRequest?.format,Ht=(Xn||Oo)({...jo(qo,{format:Xn}),from:qn?.address,accessList:a,authorizationList:r,blobs:c,data:Zo,gas:y,gasPrice:P,maxFeePerBlobGas:$e,maxFeePerGas:ne,maxPriorityFeePerGas:Ae,nonce:Ce,to:Kn?void 0:re,value:_o},"call");if(o&&ni({request:Ht})&&!X&&!K)try{return await ri(e,{...Ht,blockNumber:i,blockTag:s})}catch(G){if(!(G instanceof Me)&&!(G instanceof Y))throw G}let Jo=(()=>{let G=[Ht,Pe];return X&&K?[...G,X,K]:X?[...G,X]:K?[...G,{},K]:G})(),Yn=await e.request({method:"eth_call",params:Jo});return Yn==="0x"?{data:void 0}:{data:Yn}}catch(Ut){let Pe=si(Ut),{offchainLookup:K,offchainLookupSignature:X}=await import('./ccip-NFEWBVRI.mjs');if(e.ccipRead!==false&&Pe?.slice(0,10)===X&&re)return {data:await K(e,{data:Pe,to:re})};throw Kn&&Pe?.slice(0,10)==="0x101bb98d"?new jt({factory:l}):Ro(Ut,{...t,account:qn,chain:e.chain})}}function ni({request:e}){let{data:t,to:n,...r}=e;return !(!t||t.startsWith(Lr)||!n||Object.values(r).filter(o=>typeof o<"u").length>0)}async function ri(e,t){let{batchSize:n=1024,deployless:r=false,wait:o=0}=typeof e.batch?.multicall=="object"?e.batch.multicall:{},{blockNumber:i,blockTag:s=e.experimental_blockTag??"latest",data:a,to:c}=t,f=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return Eo({blockNumber:i,chain:e.chain,contract:"multicall3"});throw new Me})(),m=(typeof i=="bigint"?b(i):void 0)||s,{schedule:l}=Fo({id:`${e.uid}.${m}`,wait:o,shouldSplitBatch(P){return P.reduce((ne,{data:Ae})=>ne+(Ae.length-2),0)>n*2},fn:async P=>{let $e=P.map(Ce=>({allowFailure:true,callData:Ce.data,target:Ce.to})),ne=Mo({abi:Xt,args:[$e],functionName:"aggregate3"}),Ae=await e.request({method:"eth_call",params:[{...f===null?{data:Lo({code:Vr,data:ne})}:{to:f,data:ne}},m]});return Ao({abi:Xt,args:[$e],functionName:"aggregate3",data:Ae||"0x"})}}),[{returnData:d,success:y}]=await l({data:a,to:c});if(!y)throw new Ot({data:d});return d==="0x"?{data:void 0}:{data:d}}function Lo(e){let{code:t,data:n}=e;return bn({abi:et(["constructor(bytes, bytes)"]),bytecode:Dr,args:[t,n]})}function oi(e){let{data:t,factory:n,factoryData:r,to:o}=e;return bn({abi:et(["constructor(address, bytes, address, bytes)"]),bytecode:Gr,args:[o,t,n,r]})}function si(e){if(!(e instanceof u))return;let t=e.walk();return typeof t?.data=="object"?t.data?.data:t.data}var Ft=class extends u{constructor({callbackSelector:t,cause:n,data:r,extraData:o,sender:i,urls:s}){super(n.shortMessage||"An error occurred while fetching for an offchain result.",{cause:n,metaMessages:[...n.metaMessages||[],n.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(a=>` ${te(a)}`)],` Sender: ${i}`,` Data: ${r}`,` Callback selector: ${t}`,` Extra data: ${o}`].flat(),name:"OffchainLookupError"});}},kt=class extends u{constructor({result:t,url:n}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${te(n)}`,`Response: ${W(t)}`],name:"OffchainLookupResponseMalformedError"});}},Ct=class extends u{constructor({sender:t,to:n}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${n}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"});}};function Do(e,t){if(!g(e,{strict:false}))throw new A({address:e});if(!g(t,{strict:false}))throw new A({address:t});return e.toLowerCase()===t.toLowerCase()}function Go(e){let{abi:t,data:n}=e,r=O(n,0,4),o=t.find(i=>i.type==="function"&&r===F(B(i)));if(!o)throw new lt(r,{docsPath:"/docs/contract/decodeFunctionData"});return {functionName:o.name,args:"inputs"in o&&o.inputs&&o.inputs.length>0?de(o.inputs,O(n,4)):void 0}}var Dn="/docs/contract/encodeErrorResult";function Gn(e){let{abi:t,errorName:n,args:r}=e,o=t[0];if(n){let c=q({abi:t,args:r,name:n});if(!c)throw new Te(n,{docsPath:Dn});o=c;}if(o.type!=="error")throw new Te(void 0,{docsPath:Dn});let i=B(o),s=F(i),a="0x";if(r&&r.length>0){if(!o.inputs)throw new pt(o.name,{docsPath:Dn});a=C(o.inputs,r);}return ee([s,a])}var Vn="/docs/contract/encodeFunctionResult";function Vo(e){let{abi:t,functionName:n,result:r}=e,o=t[0];if(n){let s=q({abi:t,name:n});if(!s)throw new R(n,{docsPath:Vn});o=s;}if(o.type!=="function")throw new R(void 0,{docsPath:Vn});if(!o.outputs)throw new ae(o.name,{docsPath:Vn});let i=(()=>{if(o.outputs.length===0)return [];if(o.outputs.length===1)return [r];if(Array.isArray(r))return r;throw new ue(r)})();return C(o.outputs,i)}var _n="x-batch-gateway:true";async function Wn(e){let{data:t,ccipRequest:n}=e,{args:[r]}=Go({abi:nt,data:t}),o=[],i=[];return await Promise.all(r.map(async(s,a)=>{try{i[a]=s.urls.includes(_n)?await Wn({data:s.data,ccipRequest:n}):await n(s),o[a]=!1;}catch(c){o[a]=true,i[a]=ii(c);}})),Vo({abi:nt,functionName:"query",result:[o,i]})}function ii(e){return e.name==="HttpRequestError"&&e.status?Gn({abi:nt,errorName:"HttpError",args:[e.status,e.shortMessage]}):Gn({abi:[rt],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}var nd="0x556f1830",ai={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function rd(e,{blockNumber:t,blockTag:n,data:r,to:o}){let{args:i}=mo({data:r,abi:[ai]}),[s,a,c,f,p]=i,{ccipRead:m}=e,l=m&&typeof m?.request=="function"?m.request:ui;try{if(!Do(o,s))throw new Ct({sender:s,to:o});let d=a.includes(_n)?await Wn({data:c,ccipRequest:l}):await l({data:c,sender:s,urls:a}),{data:y}=await No(e,{blockNumber:t,blockTag:n,data:N([f,C([{type:"bytes"},{type:"bytes"}],[d,p])]),to:o});return y}catch(d){throw new Ft({callbackSelector:f,cause:d,data:r,extraData:p,sender:s,urls:a})}}async function ui({data:e,sender:t,urls:n}){let r=new Error("An unknown error occurred.");for(let o=0;o<n.length;o++){let i=n[o],s=i.includes("{data}")?"GET":"POST",a=s==="POST"?{data:e,sender:t}:void 0,c=s==="POST"?{"Content-Type":"application/json"}:{};try{let f=await fetch(i.replace("{sender}",t.toLowerCase()).replace("{data}",e),{body:JSON.stringify(a),headers:c,method:s}),p;if(f.headers.get("Content-Type")?.startsWith("application/json")?p=(await f.json()).data:p=await f.text(),!f.ok){r=new ke({body:a,details:p?.error?W(p.error):f.statusText,headers:f.headers,status:f.status,url:i});continue}if(!M(p)){r=new kt({result:p,url:i});continue}return p}catch(f){r=new ke({body:a,details:f.message,url:i});}}throw r}export{Rn as A,jn as B,On as C,zn as D,Fn as E,kn as F,Cn as G,Un as H,Hn as I,Nn as J,So as K,Fo as L,nd as M,ai as N,rd as O,ui as P,u as a,K0 as b,b as c,rn as d,fe as e,Da as f,W as g,Et as h,ke as i,zt as j,To as k,yn as l,hn as m,xn as n,gn as o,wn as p,vn as q,$n as r,An as s,Pn as t,In as u,Mn as v,En as w,Tn as x,Sn as y,Bn as z};//# sourceMappingURL=chunk-5KBZWYCA.mjs.map
|
|
36
|
+
//# sourceMappingURL=chunk-5KBZWYCA.mjs.map
|