@antseed/gateway-console 0.1.10 → 0.1.12
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/assets/{Activity-jZYZ0SDm.js → Activity-BcXN_DqV.js} +1 -1
- package/dist/assets/Audit-nk0K4aQy.js +1 -0
- package/dist/assets/BrandIcon-6gq42Dg-.js +1 -0
- package/dist/assets/{ChainGate-In51TI2h.js → ChainGate-Do1wYOPQ.js} +1 -1
- package/dist/assets/{ChannelClose-D8CcISX0.js → ChannelClose-CdHUKMFm.js} +1 -1
- package/dist/assets/{Charts-doK0mDVf.js → Charts-BMsoEfDr.js} +1 -1
- package/dist/assets/Chat-C4DsUQG-.js +225 -0
- package/dist/assets/{ConnectWallet-DQ0PC6SO.js → ConnectWallet-BYdqZipy.js} +1 -1
- package/dist/assets/{DataTable-BTwj5g1m.js → DataTable-BCgVRqY6.js} +1 -1
- package/dist/assets/Disclosure-CQMtWM0M.js +1 -0
- package/dist/assets/KeyHolder-JK1zjm4r.js +1 -0
- package/dist/assets/Keys-BndDLQdj.js +1 -0
- package/dist/assets/Logs-DfacvRY6.js +1 -0
- package/dist/assets/Members-pSSyfBFp.js +1 -0
- package/dist/assets/{Migrate-BQYY5ty3.js → Migrate-Bqnu-HEP.js} +1 -1
- package/dist/assets/ModelDetails-Sgq3MjfG.js +1 -0
- package/dist/assets/Models-C6QzCAh4.js +1 -0
- package/dist/assets/{OperatorActions-DrRpfDBV.js → OperatorActions-DWX4uK6I.js} +1 -1
- package/dist/assets/{OperatorGateAlert-D92zhyXC.js → OperatorGateAlert-cpvsO9yT.js} +1 -1
- package/dist/assets/{Overview-CJmp6b7M.js → Overview-C4Bu8z8u.js} +1 -1
- package/dist/assets/{PeerPicker-BJfjL7Dy.js → PeerPicker-CcMSXxY3.js} +1 -1
- package/dist/assets/PolicyEditor-COREmE0O.js +1 -0
- package/dist/assets/PolicyField-ldIq_Yw-.js +1 -0
- package/dist/assets/Presets-DFKw93HK.js +4 -0
- package/dist/assets/Providers-D_0V31og.js +1 -0
- package/dist/assets/RequestLog-ChzJA1hM.js +1 -0
- package/dist/assets/{Rewards-DNNxx3NO.js → Rewards-Cgw7r3bc.js} +2 -2
- package/dist/assets/{RewardsClaim-nstcyJvi.js → RewardsClaim-Df0QQMHb.js} +1 -1
- package/dist/assets/Routing-KpWxzlwc.js +1 -0
- package/dist/assets/{Segmented-BelxPFkk.js → Segmented-DYnoemT9.js} +1 -1
- package/dist/assets/{SelectField-BWyF8Ku8.js → SelectField-m1sMIgMa.js} +1 -1
- package/dist/assets/Settings-D2MkmqAU.js +7 -0
- package/dist/assets/SidePanel-BFQArkoa.js +1 -0
- package/dist/assets/{Staking-DHwoflHG.js → Staking-2rSdK2Ob.js} +1 -1
- package/dist/assets/{StakingDashboard-DtOKTmys.js → StakingDashboard-DvLxJ1j4.js} +1 -1
- package/dist/assets/Switch-Db8Sm64J.js +1 -0
- package/dist/assets/{Tabs-yVL4Cd6z.js → Tabs-CCabxVNK.js} +1 -1
- package/dist/assets/{TextAreaField-B6jcl4RR.js → TextAreaField-BCi-qMua.js} +1 -1
- package/dist/assets/{UsageByModel-DhTF-c1H.js → UsageByModel-Fb68pvpD.js} +1 -1
- package/dist/assets/VerificationLinks-CWyl6ZEp.js +1 -0
- package/dist/assets/{Wallet-QXhhg_E-.js → Wallet-BVuVEAB5.js} +7 -7
- package/dist/assets/{WalletConfirm-CgWBuaMN.js → WalletConfirm-Bs7CFRaa.js} +1 -1
- package/dist/assets/{WalletFunding-Ydd9gD2t.js → WalletFunding-w9MlXB0t.js} +1 -1
- package/dist/assets/{WalletSignIn-DvVSFW4u.js → WalletSignIn-CFxQjhbw.js} +1 -1
- package/dist/assets/Workspaces-DktyLm08.js +1 -0
- package/dist/assets/{add-ChFb9YAz.js → add-CWU7ACA6.js} +1 -1
- package/dist/assets/{all-wallets-rdNweGUd.js → all-wallets-C7xN3fay.js} +1 -1
- package/dist/assets/{app-store-s294A1qn.js → app-store-C9LYdcrl.js} +1 -1
- package/dist/assets/{apple-Cs8Kx1eO.js → apple-DyeheYaR.js} +1 -1
- package/dist/assets/{arrow-bottom-BMmCEQIa.js → arrow-bottom-C-Ld0QTs.js} +1 -1
- package/dist/assets/{arrow-bottom-circle-CThmnDp3.js → arrow-bottom-circle-CBZDZ8Ab.js} +1 -1
- package/dist/assets/{arrow-left-BJxgCTi0.js → arrow-left-DpJrY7yH.js} +1 -1
- package/dist/assets/{arrow-right-CnLYkBsH.js → arrow-right-C12AYUbo.js} +1 -1
- package/dist/assets/{arrow-top-Dc0DLP-U.js → arrow-top-DTpoR1JD.js} +1 -1
- package/dist/assets/{bank-CSWOYeMW.js → bank-Ce19qcX5.js} +1 -1
- package/dist/assets/{basic-BHdv4O5I.js → basic-xSJded8g.js} +1 -1
- package/dist/assets/{browser-mp33aPgo.js → browser-efLjW-nE.js} +1 -1
- package/dist/assets/{bundle-full-CDQ5iC5h.js → bundle-full-Bo_XusKG.js} +1 -1
- package/dist/assets/{card-BcVuRQiM.js → card-C5hP1T57.js} +1 -1
- package/dist/assets/{ccip-O1XLvWon.js → ccip-B61TPyfu.js} +1 -1
- package/dist/assets/{checkmark-CQVJIWW1.js → checkmark-D6TDn2nt.js} +1 -1
- package/dist/assets/{checkmark-bold-DDU5XQfq.js → checkmark-bold-D6Dl_7lL.js} +1 -1
- package/dist/assets/{chevron-bottom-Bqi9FW2q.js → chevron-bottom-BN93pLQ-.js} +1 -1
- package/dist/assets/{chevron-left-Vd5st0yB.js → chevron-left-BRtPfxLq.js} +1 -1
- package/dist/assets/{chevron-right-BVwFrlss.js → chevron-right-q6ckJ6mb.js} +1 -1
- package/dist/assets/{chevron-top-D5dQ2xFn.js → chevron-top-C1AX5sm6.js} +1 -1
- package/dist/assets/{chrome-store-C9C4k8IO.js → chrome-store-Bo_BoLHJ.js} +1 -1
- package/dist/assets/{clock-Cuvc7bNo.js → clock-BhAO_7G0.js} +1 -1
- package/dist/assets/{close-fW1pJ13b.js → close-BtzdVDHu.js} +1 -1
- package/dist/assets/code-block-DqMh9vFo.js +3 -0
- package/dist/assets/{coinPlaceholder-CKymvNA8.js → coinPlaceholder-Di1b8fYJ.js} +1 -1
- package/dist/assets/{compass-D3h_6fr8.js → compass-C10lNmou.js} +1 -1
- package/dist/assets/{copy-CNGN_cOz.js → copy-B5e38uFc.js} +1 -1
- package/dist/assets/{core-LDeQm5nv.js → core-B0f6zAPS.js} +3 -3
- package/dist/assets/{cursor-transparent-BblOfv3t.js → cursor-transparent-DzGICXfN.js} +1 -1
- package/dist/assets/cursor-zACYQT2t.js +3 -0
- package/dist/assets/{desktop-gpVOlZ1-.js → desktop-DSb6a3DL.js} +1 -1
- package/dist/assets/{disconnect-C_phPN0_.js → disconnect-DRzHq1ok.js} +1 -1
- package/dist/assets/{discord-Dk_2Plhc.js → discord-c_RQc3fB.js} +1 -1
- package/dist/assets/{en_US-Y4ZOVFV4-CmhP8GU2.js → en_US-Y4ZOVFV4-Bkc-z49M.js} +4 -4
- package/dist/assets/{etherscan-Cyrh-2Lr.js → etherscan-CQGvGKJu.js} +1 -1
- package/dist/assets/{exclamation-triangle-SeeDwZ6A.js → exclamation-triangle-CPWxzsHw.js} +1 -1
- package/dist/assets/{extension-e_11O0GI.js → extension-ytWXOqXr.js} +1 -1
- package/dist/assets/{external-link-Dl0AqCn3.js → external-link-BYoSE2u3.js} +1 -1
- package/dist/assets/{facebook-Cp_-Axbh.js → facebook-CMBv0nnN.js} +1 -1
- package/dist/assets/{farcaster-Zwu26KYL.js → farcaster-CJmfWTQP.js} +1 -1
- package/dist/assets/{filters-CdkpWvgi.js → filters-DEiNVvyn.js} +1 -1
- package/dist/assets/{github-DuPUePDJ.js → github-CdMwJkf8.js} +1 -1
- package/dist/assets/{google-DlKW7Gx7.js → google-CHI5gfH8.js} +1 -1
- package/dist/assets/{help-circle-19xLhjPt.js → help-circle-dA36a8fM.js} +1 -1
- package/dist/assets/highlighted-body-KQOG7T2V-BFlyrf-z.js +1 -0
- package/dist/assets/{id-B4PjxpL6.js → id-Dm0-1g1D.js} +1 -1
- package/dist/assets/{image-CHz8w95r.js → image-BL3ODVX_.js} +1 -1
- package/dist/assets/{index-CfhMI0GY.css → index-BAcoKUeC.css} +1 -1
- package/dist/assets/{index-CAflmCbT.js → index-BRgGxCKs.js} +3 -3
- package/dist/assets/{index-CgyFWy7G.js → index-BXzZZOmS.js} +1 -1
- package/dist/assets/{index-CZbdRW9K.js → index-CHeO_lLD.js} +1 -1
- package/dist/assets/{index-BYZ6CM-r.js → index-D1OXThJP.js} +1 -1
- package/dist/assets/{index-DIcymBxc.js → index-DPXW_JSn.js} +25 -25
- package/dist/assets/{index.es-0kjt2ETS.js → index.es-XdMmjy3e.js} +3 -3
- package/dist/assets/{info-CFnwPck_.js → info-BbBzpLWs.js} +1 -1
- package/dist/assets/{info-circle-DNYjRzmq.js → info-circle-CKgnYdF-.js} +1 -1
- package/dist/assets/{lightbulb-DPrYcwVp.js → lightbulb-B6Xv9kMK.js} +1 -1
- package/dist/assets/{limits-D8_oE0N-.js → limits-uCwhqY-O.js} +1 -1
- package/dist/assets/{mail-Do_T12XQ.js → mail-BdCMypwE.js} +1 -1
- package/dist/assets/{mermaid-MCJ5UELQ-Cr83KTfF.js → mermaid-MCJ5UELQ-BaHsArCB.js} +3 -3
- package/dist/assets/{metamask-sdk-CHSvqgLD.js → metamask-sdk-BL7QLxcU.js} +1 -1
- package/dist/assets/{mobile-2wdwD-gm.js → mobile-F_82dhUb.js} +1 -1
- package/dist/assets/{more-CugjlKbm.js → more-CtMTtAsM.js} +1 -1
- package/dist/assets/{network-placeholder-D0CvRN9Z.js → network-placeholder-BRs4Lylz.js} +1 -1
- package/dist/assets/{nftPlaceholder-CjCtJ3VF.js → nftPlaceholder-DONTHyad.js} +1 -1
- package/dist/assets/{off-CjwzxGqC.js → off-Bwru40fy.js} +1 -1
- package/dist/assets/{play-store-ts_mM-L7.js → play-store-CDeNquGq.js} +1 -1
- package/dist/assets/{plus-CayVcA5r.js → plus-EcrYfJFM.js} +1 -1
- package/dist/assets/{qr-code-BJFXX7Ga.js → qr-code-CF-SIZQq.js} +1 -1
- package/dist/assets/{recycle-horizontal-Dxd_xbuW.js → recycle-horizontal-CQAPujmy.js} +1 -1
- package/dist/assets/{refresh-2tSMiCzO.js → refresh-BErGEy2b.js} +1 -1
- package/dist/assets/{reown-logo-C3tg9yiK.js → reown-logo-Ge2o4AAI.js} +1 -1
- package/dist/assets/{search-By38_AjN.js → search-Ca88O9BA.js} +1 -1
- package/dist/assets/selection-BV37SUs_.js +1 -0
- package/dist/assets/{send-DhLEHc2T.js → send-VS1TUwft.js} +1 -1
- package/dist/assets/{sendTransaction-CqpP3CZj.js → sendTransaction-k8aDYfd4.js} +1 -1
- package/dist/assets/stored-e0tX90bC.js +1 -0
- package/dist/assets/{swapHorizontal-BSy_Qzqy.js → swapHorizontal-UNJ9wJ3Z.js} +1 -1
- package/dist/assets/{swapHorizontalBold-B4pOkOa-.js → swapHorizontalBold-eQTpC4fd.js} +1 -1
- package/dist/assets/{swapHorizontalMedium-BbDDLHs6.js → swapHorizontalMedium-DaFWQu14.js} +1 -1
- package/dist/assets/{swapHorizontalRoundedBold-MzTdSarg.js → swapHorizontalRoundedBold-BbRZUmJZ.js} +1 -1
- package/dist/assets/{swapVertical-D0uKM7wm.js → swapVertical-CrZ6Be2R.js} +1 -1
- package/dist/assets/{telegram-Q_WwsPzx.js → telegram-CDAYT0ej.js} +1 -1
- package/dist/assets/{three-dots-Cpl_X23E.js → three-dots-CK__4w5S.js} +1 -1
- package/dist/assets/{twitch-B7x-eAo9.js → twitch-BS50nSpU.js} +1 -1
- package/dist/assets/{twitterIcon-BRMMjDzW.js → twitterIcon-BtVx5zJI.js} +1 -1
- package/dist/assets/{usage-DktoZRc8.js → usage-DQGKL0DJ.js} +1 -1
- package/dist/assets/{useInfiniteQuery-NenQ5Num.js → useInfiniteQuery-CAj47QRO.js} +1 -1
- package/dist/assets/{useTx-WkiDSW_A.js → useTx-DzRlz7Ez.js} +1 -1
- package/dist/assets/{verify-filled-CaKhO-hp.js → verify-filled-E4LyUumx.js} +1 -1
- package/dist/assets/{verify-BxTMhyZY.js → verify-hRAQBjoS.js} +1 -1
- package/dist/assets/{w3m-modal-DZ2_0Ukm.js → w3m-modal-CLSVKDRP.js} +1 -1
- package/dist/assets/{waitForCallsStatus-CtriTPoz.js → waitForCallsStatus-C51Vv8Tt.js} +1 -1
- package/dist/assets/{wallet-BeZF3I-Z.js → wallet-D-TGx4VA.js} +1 -1
- package/dist/assets/{wallet-placeholder-BDvuTJ6r.js → wallet-placeholder-SjwHckDA.js} +1 -1
- package/dist/assets/{walletconnect-U8tnyg6m.js → walletconnect-7nuI2nwG.js} +1 -1
- package/dist/assets/{warning-circle-Dg69jmuZ.js → warning-circle-BI2BfSeD.js} +1 -1
- package/dist/assets/{writeContract-DrAWt0yz.js → writeContract-CaMlmKcK.js} +1 -1
- package/dist/assets/{x-CJ-uWPue.js → x-DoGk7CZD.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/dist/assets/Audit-C-dFTX_u.js +0 -1
- package/dist/assets/Chat-CaImcsH1.js +0 -220
- package/dist/assets/KeyHolder-D90Uu-Jv.js +0 -1
- package/dist/assets/Keys-B5LppZtn.js +0 -1
- package/dist/assets/Logs-Dw4sZ9lo.js +0 -1
- package/dist/assets/Members-CnaHKFut.js +0 -1
- package/dist/assets/Models-zIuHewdV.js +0 -1
- package/dist/assets/PolicyEditor-BpoV34ra.js +0 -1
- package/dist/assets/PolicyField-CfRYcr_J.js +0 -1
- package/dist/assets/Presets-c1J4UwX0.js +0 -4
- package/dist/assets/Providers-B0LuYcAw.js +0 -1
- package/dist/assets/RequestLog-D2YGgG1C.js +0 -1
- package/dist/assets/Routing-B79eDIZL.js +0 -1
- package/dist/assets/Settings-Cws5Z--R.js +0 -7
- package/dist/assets/Switch-BwBYBnSS.js +0 -1
- package/dist/assets/Workspaces-DuxGwCQ2.js +0 -1
- package/dist/assets/code-block-Djv3iQ0G.js +0 -3
- package/dist/assets/cursor-CTNYpsWo.js +0 -3
- package/dist/assets/highlighted-body-KQOG7T2V-D7DB9nBd.js +0 -1
- package/dist/assets/models-CLos5_p0.js +0 -1
- package/dist/assets/stored-CFfx95Ep.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as T}from"./index-kzlEvkEN.js";import{e as y,ab as k,ac as I}from"./en_US-Y4ZOVFV4-
|
|
1
|
+
import{r as T}from"./index-kzlEvkEN.js";import{e as y,ab as k,ac as I}from"./en_US-Y4ZOVFV4-Bkc-z49M.js";import"./index-DPXW_JSn.js";import"./clsx-B-dksMZM.js";import"./index-BhwNCc8y.js";const q=()=>"9.1.0",v=t=>t.toString(16).padStart(2,"0"),C=t=>{const e=new Uint8Array(t/2);return window.crypto.getRandomValues(e),Array.from(e,v).join("")},R=()=>typeof window<"u"?C(10):new Date().getTime().toString(36);class g{}g.makeRequest=(t,e)=>({id:R(),method:t,params:e,env:{sdkVersion:q()}});g.makeResponse=(t,e,s)=>({id:t,success:!0,version:s,data:e});g.makeErrorResponse=(t,e,s)=>({id:t,success:!1,error:e,version:s});var r;(function(t){t.sendTransactions="sendTransactions",t.rpcCall="rpcCall",t.getChainInfo="getChainInfo",t.getSafeInfo="getSafeInfo",t.getTxBySafeTxHash="getTxBySafeTxHash",t.getSafeBalances="getSafeBalances",t.signMessage="signMessage",t.signTypedMessage="signTypedMessage",t.getEnvironmentInfo="getEnvironmentInfo",t.getOffChainSignature="getOffChainSignature",t.requestAddressBook="requestAddressBook",t.wallet_getPermissions="wallet_getPermissions",t.wallet_requestPermissions="wallet_requestPermissions"})(r||(r={}));var m;(function(t){t.requestAddressBook="requestAddressBook"})(m||(m={}));class H{constructor(e=null,s=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:a,data:n,source:i})=>{const o=!n,l=!this.isServer&&i===window.parent,u=typeof n.version<"u"&&parseInt(n.version.split(".")[0]),B=typeof u=="number"&&u>=1;let p=!0;return Array.isArray(this.allowedOrigins)&&(p=this.allowedOrigins.find(P=>P.test(a))!==void 0),!o&&l&&B&&p},this.logIncomingMessage=a=>{console.info(`Safe Apps SDK v1: A message was received from origin ${a.origin}. `,a.data)},this.onParentMessage=a=>{this.isValidMessage(a)&&(this.debugMode&&this.logIncomingMessage(a),this.handleIncomingMessage(a.data))},this.handleIncomingMessage=a=>{const{id:n}=a,i=this.callbacks.get(n);i&&(i(a),this.callbacks.delete(n))},this.send=(a,n)=>{const i=g.makeRequest(a,n);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(i,"*"),new Promise((o,l)=>{this.callbacks.set(i.id,u=>{if(!u.success){l(new Error(u.error));return}o(u)})})},this.allowedOrigins=e,this.debugMode=s,this.isServer||window.addEventListener("message",this.onParentMessage)}}const b=t=>typeof t=="object"&&t!=null&&"domain"in t&&"types"in t&&"message"in t;T();class E{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw new Error("Invalid safeTxHash");return(await this.communicator.send(r.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){const s={message:e};return(await this.communicator.send(r.signMessage,s)).data}async signTypedMessage(e){if(!b(e))throw new Error("Invalid typed data");return(await this.communicator.send(r.signTypedMessage,{typedData:e})).data}async send({txs:e,params:s}){if(!e||!e.length)throw new Error("No transactions were passed");const a={txs:e,params:s};return(await this.communicator.send(r.sendTransactions,a)).data}}const c={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"},h={defaultBlockParam:(t="latest")=>t,returnFullTxObjectParam:(t=!1)=>t,blockNumberToHex:t=>Number.isInteger(t)?`0x${t.toString(16)}`:t};class A{constructor(e){this.communicator=e,this.call=this.buildRequest({call:c.eth_call,formatters:[null,h.defaultBlockParam]}),this.getBalance=this.buildRequest({call:c.eth_getBalance,formatters:[null,h.defaultBlockParam]}),this.getCode=this.buildRequest({call:c.eth_getCode,formatters:[null,h.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:c.eth_getStorageAt,formatters:[null,h.blockNumberToHex,h.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:c.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:c.eth_getBlockByHash,formatters:[null,h.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:c.eth_getBlockByNumber,formatters:[h.blockNumberToHex,h.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:c.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:c.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:c.eth_getTransactionCount,formatters:[null,h.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:c.eth_gasPrice}),this.getEstimateGas=s=>this.buildRequest({call:c.eth_estimateGas})([s]),this.setSafeSettings=this.buildRequest({call:c.safe_setSettings})}buildRequest(e){const{call:s,formatters:a}=e;return async n=>{a&&Array.isArray(n)&&a.forEach((l,u)=>{l&&(n[u]=l(n[u]))});const i={call:s,params:n||[]};return(await this.communicator.send(r.rpcCall,i)).data}}}const x="0x1626ba7e",O="0x20c13b0b",f=4001;class d extends Error{constructor(e,s,a){super(e),this.code=s,this.data=a,Object.setPrototypeOf(this,d.prototype)}}class S{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(r.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new d("Permissions request is invalid",f);try{return(await this.communicator.send(r.wallet_requestPermissions,e)).data}catch{throw new d("Permissions rejected",f)}}isPermissionRequestValid(e){return e.every(s=>typeof s=="object"?Object.keys(s).every(a=>!!Object.values(m).includes(a)):!1)}}const w=(t,e)=>e.some(s=>s.parentCapability===t),V=()=>(t,e,s)=>{const a=s.value;return s.value=async function(){const n=new S(this.communicator);let i=await n.getPermissions();if(w(e,i)||(i=await n.requestPermissions([{[e]:{}}])),!w(e,i))throw new d("Permissions rejected",f);return a.apply(this)},s};var M=function(t,e,s,a){var n=arguments.length,i=n<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,s):a,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(t,e,s,a);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(i=(n<3?o(i):n>3?o(e,s,i):o(e,s))||i);return n>3&&i&&Object.defineProperty(e,s,i),i};class _{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(r.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(r.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(r.getSafeBalances,{currency:e})).data}async check1271Signature(e,s="0x"){const a=await this.getInfo(),n=y({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,s]}),i={call:c.eth_call,params:[{to:a.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(r.rpcCall,i)).data.slice(0,10).toLowerCase()===x}catch{return!1}}async check1271SignatureBytes(e,s="0x"){const a=await this.getInfo(),n=y({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,s]}),i={call:c.eth_call,params:[{to:a.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(r.rpcCall,i)).data.slice(0,10).toLowerCase()===O}catch{return!1}}calculateMessageHash(e){return k(e)}calculateTypedMessageHash(e){const s=typeof e.domain.chainId=="object"?e.domain.chainId.toNumber():Number(e.domain.chainId);let a=e.primaryType;if(!a){const n=Object.values(e.types),i=Object.keys(e.types).filter(o=>n.every(l=>l.every(({type:u})=>u.replace("[","").replace("]","")!==o)));if(i.length===0||i.length>1)throw new Error("Please specify primaryType");a=i[0]}return I({message:e.message,domain:{...e.domain,chainId:s,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt},types:e.types,primaryType:a})}async getOffChainSignature(e){return(await this.communicator.send(r.getOffChainSignature,e)).data}async isMessageSigned(e,s="0x"){let a;if(typeof e=="string"&&(a=async()=>{const n=this.calculateMessageHash(e);return await this.isMessageHashSigned(n,s)}),b(e)&&(a=async()=>{const n=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(n,s)}),a)return await a();throw new Error("Invalid message type")}async isMessageHashSigned(e,s="0x"){const a=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const n of a)if(await n(e,s))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(r.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(r.requestAddressBook,void 0)).data}}M([V()],_.prototype,"requestAddressBook",null);class G{constructor(e={}){const{allowedDomains:s=null,debug:a=!1}=e;this.communicator=new H(s,a),this.eth=new A(this.communicator),this.txs=new E(this.communicator),this.safe=new _(this.communicator),this.wallet=new S(this.communicator)}}export{g as MessageFormatter,r as Methods,c as RPC_CALLS,m as RestrictedMethods,G as default,q as getSDKVersion,b as isObjectEIP712TypedData};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cu as lv,
|
|
1
|
+
import{cu as lv,ca as bv}from"./index-DPXW_JSn.js";import{r as mv}from"./index-kzlEvkEN.js";import{r as hv}from"./events-DQ172AOg.js";function yv(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function pv(){if(typeof WebSocket<"u")return WebSocket;if(typeof global.WebSocket<"u")return global.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const gv=pv(),_v=Object.freeze(Object.defineProperty({__proto__:null,WebSocket:gv},Symbol.toStringTag,{value:"Module"}));var pd={},On={},xt={},Zr={},jr={},xn={},Cn={},al;function G1(){if(al)return Cn;al=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.getSDKVersion=void 0;const e=()=>"9.1.0";return Cn.getSDKVersion=e,Cn}var qn={},sl;function vv(){if(sl)return qn;sl=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.generateRequestId=void 0;const e=r=>r.toString(16).padStart(2,"0"),t=r=>{const o=new Uint8Array(r/2);return window.crypto.getRandomValues(o),Array.from(o,e).join("")},n=()=>typeof window<"u"?t(10):new Date().getTime().toString(36);return qn.generateRequestId=n,qn}var cl;function V1(){if(cl)return xn;cl=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.MessageFormatter=void 0;const e=G1(),t=vv();class n{}return xn.MessageFormatter=n,n.makeRequest=(r,o)=>({id:(0,t.generateRequestId)(),method:r,params:o,env:{sdkVersion:(0,e.getSDKVersion)()}}),n.makeResponse=(r,o,s)=>({id:r,success:!0,version:s,data:o}),n.makeErrorResponse=(r,o,s)=>({id:r,success:!1,error:o,version:s}),xn}var wr={},ul;function Fr(){if(ul)return wr;ul=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.RestrictedMethods=wr.Methods=void 0;var e;(function(n){n.sendTransactions="sendTransactions",n.rpcCall="rpcCall",n.getChainInfo="getChainInfo",n.getSafeInfo="getSafeInfo",n.getTxBySafeTxHash="getTxBySafeTxHash",n.getSafeBalances="getSafeBalances",n.signMessage="signMessage",n.signTypedMessage="signTypedMessage",n.getEnvironmentInfo="getEnvironmentInfo",n.getOffChainSignature="getOffChainSignature",n.requestAddressBook="requestAddressBook",n.wallet_getPermissions="wallet_getPermissions",n.wallet_requestPermissions="wallet_requestPermissions"})(e||(wr.Methods=e={}));var t;return(function(n){n.requestAddressBook="requestAddressBook"})(t||(wr.RestrictedMethods=t={})),wr}var dl;function Ev(){return dl||(dl=1,(function(e){var t=jr&&jr.__createBinding||(Object.create?(function(s,i,a,c){c===void 0&&(c=a);var d=Object.getOwnPropertyDescriptor(i,a);(!d||("get"in d?!i.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return i[a]}}),Object.defineProperty(s,c,d)}):(function(s,i,a,c){c===void 0&&(c=a),s[c]=i[a]})),n=jr&&jr.__exportStar||function(s,i){for(var a in s)a!=="default"&&!Object.prototype.hasOwnProperty.call(i,a)&&t(i,s,a)};Object.defineProperty(e,"__esModule",{value:!0});const r=V1();class o{constructor(i=null,a=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:c,data:d,source:l})=>{const f=!d,m=!this.isServer&&l===window.parent,g=typeof d.version<"u"&&parseInt(d.version.split(".")[0]),h=typeof g=="number"&&g>=1;let b=!0;return Array.isArray(this.allowedOrigins)&&(b=this.allowedOrigins.find(v=>v.test(c))!==void 0),!f&&m&&h&&b},this.logIncomingMessage=c=>{console.info(`Safe Apps SDK v1: A message was received from origin ${c.origin}. `,c.data)},this.onParentMessage=c=>{this.isValidMessage(c)&&(this.debugMode&&this.logIncomingMessage(c),this.handleIncomingMessage(c.data))},this.handleIncomingMessage=c=>{const{id:d}=c,l=this.callbacks.get(d);l&&(l(c),this.callbacks.delete(d))},this.send=(c,d)=>{const l=r.MessageFormatter.makeRequest(c,d);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(l,"*"),new Promise((f,m)=>{this.callbacks.set(l.id,g=>{if(!g.success){m(new Error(g.error));return}f(g)})})},this.allowedOrigins=i,this.debugMode=a,this.isServer||window.addEventListener("message",this.onParentMessage)}}e.default=o,n(Fr(),e)})(jr)),jr}var Mn={},Pr={},Hn={},fl;function jv(){if(fl)return Hn;fl=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.isObjectEIP712TypedData=void 0;const e=t=>typeof t=="object"&&t!=null&&"domain"in t&&"types"in t&&"message"in t;return Hn.isObjectEIP712TypedData=e,Hn}var gd={},ll;function wv(){return ll||(ll=1,Object.defineProperty(gd,"__esModule",{value:!0})),gd}var _d={},bl;function Pv(){return bl||(bl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var t=mv();Object.defineProperty(e,"Operation",{enumerable:!0,get:function(){return t.Operation}}),Object.defineProperty(e,"TokenType",{enumerable:!0,get:function(){return t.TokenType}}),Object.defineProperty(e,"TransactionStatus",{enumerable:!0,get:function(){return t.TransactionStatus}}),Object.defineProperty(e,"TransferDirection",{enumerable:!0,get:function(){return t.TransferDirection}})})(_d)),_d}var vd={},ml;function Av(){return ml||(ml=1,Object.defineProperty(vd,"__esModule",{value:!0}),Fr()),vd}var hl;function Zd(){return hl||(hl=1,(function(e){var t=Pr&&Pr.__createBinding||(Object.create?(function(r,o,s,i){i===void 0&&(i=s);var a=Object.getOwnPropertyDescriptor(o,s);(!a||("get"in a?!o.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(r,i,a)}):(function(r,o,s,i){i===void 0&&(i=s),r[i]=o[s]})),n=Pr&&Pr.__exportStar||function(r,o){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&t(o,r,s)};Object.defineProperty(e,"__esModule",{value:!0}),n(jv(),e),n(wv(),e),n(Pv(),e),n(Av(),e)})(Pr)),Pr}var yl;function Tv(){if(yl)return Mn;yl=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.TXs=void 0;const e=Fr(),t=Zd();class n{constructor(o){this.communicator=o}async getBySafeTxHash(o){if(!o)throw new Error("Invalid safeTxHash");return(await this.communicator.send(e.Methods.getTxBySafeTxHash,{safeTxHash:o})).data}async signMessage(o){const s={message:o};return(await this.communicator.send(e.Methods.signMessage,s)).data}async signTypedMessage(o){if(!(0,t.isObjectEIP712TypedData)(o))throw new Error("Invalid typed data");return(await this.communicator.send(e.Methods.signTypedMessage,{typedData:o})).data}async send({txs:o,params:s}){if(!o||!o.length)throw new Error("No transactions were passed");const i={txs:o,params:s};return(await this.communicator.send(e.Methods.sendTransactions,i)).data}}return Mn.TXs=n,Mn}var kn={},Fn={},pl;function Jd(){return pl||(pl=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.RPC_CALLS=void 0,Fn.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"}),Fn}var gl;function Sv(){if(gl)return kn;gl=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.Eth=void 0;const e=Jd(),t=Fr(),n={defaultBlockParam:(o="latest")=>o,returnFullTxObjectParam:(o=!1)=>o,blockNumberToHex:o=>Number.isInteger(o)?`0x${o.toString(16)}`:o};class r{constructor(s){this.communicator=s,this.call=this.buildRequest({call:e.RPC_CALLS.eth_call,formatters:[null,n.defaultBlockParam]}),this.getBalance=this.buildRequest({call:e.RPC_CALLS.eth_getBalance,formatters:[null,n.defaultBlockParam]}),this.getCode=this.buildRequest({call:e.RPC_CALLS.eth_getCode,formatters:[null,n.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:e.RPC_CALLS.eth_getStorageAt,formatters:[null,n.blockNumberToHex,n.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:e.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByHash,formatters:[null,n.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:e.RPC_CALLS.eth_getBlockByNumber,formatters:[n.blockNumberToHex,n.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:e.RPC_CALLS.eth_getTransactionCount,formatters:[null,n.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:e.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=i=>this.buildRequest({call:e.RPC_CALLS.eth_estimateGas})([i]),this.setSafeSettings=this.buildRequest({call:e.RPC_CALLS.safe_setSettings})}buildRequest(s){const{call:i,formatters:a}=s;return async c=>{a&&Array.isArray(c)&&a.forEach((f,m)=>{f&&(c[m]=f(c[m]))});const d={call:i,params:c||[]};return(await this.communicator.send(t.Methods.rpcCall,d)).data}}}return kn.Eth=r,kn}var Ct={},Ed={},jd={},Nn={},zn={},_l;function Iv(){return _l||(_l=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.version=void 0,zn.version="1.2.3"),zn}var vl;function pn(){if(vl)return Nn;vl=1,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.BaseError=void 0;const e=Iv();class t extends Error{constructor(r,o={}){var c;const s=o.cause instanceof t?o.cause.details:(c=o.cause)!=null&&c.message?o.cause.message:o.details,i=o.cause instanceof t&&o.cause.docsPath||o.docsPath,a=[r||"An error occurred.","",...o.metaMessages?[...o.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...s?[`Details: ${s}`]:[],`Version: abitype@${e.version}`].join(`
|
|
2
2
|
`);super(a),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"}),o.cause&&(this.cause=o.cause),this.details=s,this.docsPath=i,this.metaMessages=o.metaMessages,this.shortMessage=r}}return Nn.BaseError=t,Nn}var di={},El;function Rv(){if(El)return di;El=1,Object.defineProperty(di,"__esModule",{value:!0}),di.narrow=e;function e(t){return t}return di}var fi={},li={},bi={},mi={},Tt={},jl;function Pu(){if(jl)return Tt;jl=1,Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.isTupleRegex=Tt.integerRegex=Tt.bytesRegex=void 0,Tt.execTyped=e;function e(t,n){const r=t.exec(n);return r==null?void 0:r.groups}return Tt.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,Tt.integerRegex=/^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)?$/,Tt.isTupleRegex=/^\(.+?\).*?$/,Tt}var wl;function W1(){if(wl)return mi;wl=1,Object.defineProperty(mi,"__esModule",{value:!0}),mi.formatAbiParameter=n;const e=Pu(),t=/^tuple(?<array>(\[(\d*)\])*)$/;function n(r){let o=r.type;if(t.test(r.type)&&"components"in r){o="(";const s=r.components.length;for(let a=0;a<s;a++){const c=r.components[a];o+=n(c),a<s-1&&(o+=", ")}const i=(0,e.execTyped)(t,r.type);return o+=`)${(i==null?void 0:i.array)||""}`,n({...r,type:o})}return"indexed"in r&&r.indexed&&(o=`${o} indexed`),r.name?`${o} ${r.name}`:o}return mi}var Pl;function K1(){if(Pl)return bi;Pl=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.formatAbiParameters=t;const e=W1();function t(n){let r="";const o=n.length;for(let s=0;s<o;s++){const i=n[s];r+=(0,e.formatAbiParameter)(i),s!==o-1&&(r+=", ")}return r}return bi}var Al;function Z1(){if(Al)return li;Al=1,Object.defineProperty(li,"__esModule",{value:!0}),li.formatAbiItem=t;const e=K1();function t(n){var r;return n.type==="function"?`function ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability&&n.stateMutability!=="nonpayable"?` ${n.stateMutability}`:""}${(r=n.outputs)!=null&&r.length?` returns (${(0,e.formatAbiParameters)(n.outputs)})`:""}`:n.type==="event"?`event ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="error"?`error ${n.name}(${(0,e.formatAbiParameters)(n.inputs)})`:n.type==="constructor"?`constructor(${(0,e.formatAbiParameters)(n.inputs)})${n.stateMutability==="payable"?" payable":""}`:n.type==="fallback"?`fallback() external${n.stateMutability==="payable"?" payable":""}`:"receive() external payable"}return li}var Tl;function Bv(){if(Tl)return fi;Tl=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.formatAbi=t;const e=Z1();function t(n){const r=[],o=n.length;for(let s=0;s<o;s++){const i=n[s],a=(0,e.formatAbiItem)(i);r.push(a)}return r}return fi}var hi={},Re={},Sl;function gn(){if(Sl)return Re;Sl=1,Object.defineProperty(Re,"__esModule",{value:!0}),Re.functionModifiers=Re.eventModifiers=Re.modifiers=void 0,Re.isErrorSignature=n,Re.execErrorSignature=r,Re.isEventSignature=s,Re.execEventSignature=i,Re.isFunctionSignature=c,Re.execFunctionSignature=d,Re.isStructSignature=f,Re.execStructSignature=m,Re.isConstructorSignature=h,Re.execConstructorSignature=b,Re.isFallbackSignature=_,Re.execFallbackSignature=E,Re.isReceiveSignature=u;const e=Pu(),t=/^error (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function n(j){return t.test(j)}function r(j){return(0,e.execTyped)(t,j)}const o=/^event (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)$/;function s(j){return o.test(j)}function i(j){return(0,e.execTyped)(o,j)}const a=/^function (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*)\((?<parameters>.*?)\)(?: (?<scope>external|public{1}))?(?: (?<stateMutability>pure|view|nonpayable|payable{1}))?(?: returns\s?\((?<returns>.*?)\))?$/;function c(j){return a.test(j)}function d(j){return(0,e.execTyped)(a,j)}const l=/^struct (?<name>[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?<properties>.*?)\}$/;function f(j){return l.test(j)}function m(j){return(0,e.execTyped)(l,j)}const g=/^constructor\((?<parameters>.*?)\)(?:\s(?<stateMutability>payable{1}))?$/;function h(j){return g.test(j)}function b(j){return(0,e.execTyped)(g,j)}const v=/^fallback\(\) external(?:\s(?<stateMutability>payable{1}))?$/;function _(j){return v.test(j)}function E(j){return(0,e.execTyped)(v,j)}const P=/^receive\(\) external payable$/;function u(j){return P.test(j)}return Re.modifiers=new Set(["memory","indexed","storage","calldata"]),Re.eventModifiers=new Set(["indexed"]),Re.functionModifiers=new Set(["calldata","memory","storage"]),Re}var yi={},qt={},Il;function Au(){if(Il)return qt;Il=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.UnknownSolidityTypeError=qt.UnknownTypeError=qt.InvalidAbiItemError=void 0;const e=pn();class t extends e.BaseError{constructor({signature:s}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(s,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}qt.InvalidAbiItemError=t;class n extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" 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"})}}qt.UnknownTypeError=n;class r extends e.BaseError{constructor({type:s}){super("Unknown type.",{metaMessages:[`Type "${s}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}return qt.UnknownSolidityTypeError=r,qt}var ke={},Rl;function Co(){if(Rl)return ke;Rl=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.InvalidAbiTypeParameterError=ke.InvalidFunctionModifierError=ke.InvalidModifierError=ke.SolidityProtectedKeywordError=ke.InvalidParameterError=ke.InvalidAbiParametersError=ke.InvalidAbiParameterError=void 0;const e=pn();class t extends e.BaseError{constructor({param:d}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(d,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}ke.InvalidAbiParameterError=t;class n extends e.BaseError{constructor({params:d}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(d,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}ke.InvalidAbiParametersError=n;class r extends e.BaseError{constructor({param:d}){super("Invalid ABI parameter.",{details:d}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}ke.InvalidParameterError=r;class o extends e.BaseError{constructor({param:d,name:l}){super("Invalid ABI parameter.",{details:d,metaMessages:[`"${l}" 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"})}}ke.SolidityProtectedKeywordError=o;class s extends e.BaseError{constructor({param:d,type:l,modifier:f}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${f}" not allowed${l?` in "${l}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}ke.InvalidModifierError=s;class i extends e.BaseError{constructor({param:d,type:l,modifier:f}){super("Invalid ABI parameter.",{details:d,metaMessages:[`Modifier "${f}" not allowed${l?` in "${l}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${f}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}ke.InvalidFunctionModifierError=i;class a extends e.BaseError{constructor({abiParameter:d}){super("Invalid ABI parameter.",{details:JSON.stringify(d,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}return ke.InvalidAbiTypeParameterError=a,ke}var Mt={},Bl;function Yd(){if(Bl)return Mt;Bl=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.InvalidStructSignatureError=Mt.UnknownSignatureError=Mt.InvalidSignatureError=void 0;const e=pn();class t extends e.BaseError{constructor({signature:s,type:i}){super(`Invalid ${i} signature.`,{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}Mt.InvalidSignatureError=t;class n extends e.BaseError{constructor({signature:s}){super("Unknown signature.",{details:s}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}Mt.UnknownSignatureError=n;class r extends e.BaseError{constructor({signature:s}){super("Invalid struct signature.",{details:s,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}return Mt.InvalidStructSignatureError=r,Mt}var Un={},Ol;function J1(){if(Ol)return Un;Ol=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.CircularReferenceError=void 0;const e=pn();class t extends e.BaseError{constructor({type:r}){super("Circular reference detected.",{metaMessages:[`Struct "${r}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}return Un.CircularReferenceError=t,Un}var Ye={},Ln={},xl;function Y1(){if(xl)return Ln;xl=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.InvalidParenthesisError=void 0;const e=pn();class t extends e.BaseError{constructor({current:r,depth:o}){super("Unbalanced parentheses.",{metaMessages:[`"${r.trim()}" has too many ${o>0?"opening":"closing"} parentheses.`],details:`Depth "${o}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}return Ln.InvalidParenthesisError=t,Ln}var Jr={},Cl;function Ov(){if(Cl)return Jr;Cl=1,Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.parameterCache=void 0,Jr.getParameterCacheKey=e;function e(t,n,r){let o="";if(r)for(const s of Object.entries(r)){if(!s)continue;let i="";for(const a of s[1])i+=`[${a.type}${a.name?`:${a.name}`:""}]`;o+=`(${s[0]}{${i}})`}return n?`${n}:${t}${o}`:`${t}${o}`}return Jr.parameterCache=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}]]),Jr}var ql;function yn(){if(ql)return Ye;ql=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.parseSignature=a,Ye.parseFunctionSignature=c,Ye.parseEventSignature=d,Ye.parseErrorSignature=l,Ye.parseConstructorSignature=f,Ye.parseFallbackSignature=m,Ye.parseAbiParameter=v,Ye.splitParameters=_,Ye.isSolidityType=E,Ye.isSolidityKeyword=u,Ye.isValidDataLocation=j;const e=Pu(),t=Au(),n=Co(),r=Yd(),o=Y1(),s=Ov(),i=gn();function a(p,y={}){if((0,i.isFunctionSignature)(p))return c(p,y);if((0,i.isEventSignature)(p))return d(p,y);if((0,i.isErrorSignature)(p))return l(p,y);if((0,i.isConstructorSignature)(p))return f(p,y);if((0,i.isFallbackSignature)(p))return m(p);if((0,i.isReceiveSignature)(p))return{type:"receive",stateMutability:"payable"};throw new r.UnknownSignatureError({signature:p})}function c(p,y={}){const I=(0,i.execFunctionSignature)(p);if(!I)throw new r.InvalidSignatureError({signature:p,type:"function"});const w=_(I.parameters),A=[],B=w.length;for(let S=0;S<B;S++)A.push(v(w[S],{modifiers:i.functionModifiers,structs:y,type:"function"}));const R=[];if(I.returns){const S=_(I.returns),x=S.length;for(let F=0;F<x;F++)R.push(v(S[F],{modifiers:i.functionModifiers,structs:y,type:"function"}))}return{name:I.name,type:"function",stateMutability:I.stateMutability??"nonpayable",inputs:A,outputs:R}}function d(p,y={}){const I=(0,i.execEventSignature)(p);if(!I)throw new r.InvalidSignatureError({signature:p,type:"event"});const w=_(I.parameters),A=[],B=w.length;for(let R=0;R<B;R++)A.push(v(w[R],{modifiers:i.eventModifiers,structs:y,type:"event"}));return{name:I.name,type:"event",inputs:A}}function l(p,y={}){const I=(0,i.execErrorSignature)(p);if(!I)throw new r.InvalidSignatureError({signature:p,type:"error"});const w=_(I.parameters),A=[],B=w.length;for(let R=0;R<B;R++)A.push(v(w[R],{structs:y,type:"error"}));return{name:I.name,type:"error",inputs:A}}function f(p,y={}){const I=(0,i.execConstructorSignature)(p);if(!I)throw new r.InvalidSignatureError({signature:p,type:"constructor"});const w=_(I.parameters),A=[],B=w.length;for(let R=0;R<B;R++)A.push(v(w[R],{structs:y,type:"constructor"}));return{type:"constructor",stateMutability:I.stateMutability??"nonpayable",inputs:A}}function m(p){const y=(0,i.execFallbackSignature)(p);if(!y)throw new r.InvalidSignatureError({signature:p,type:"fallback"});return{type:"fallback",stateMutability:y.stateMutability??"nonpayable"}}const g=/^(?<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$_]*))?$/,h=/^\((?<type>.+?)\)(?<array>(?:\[\d*?\])+?)?(?:\s(?<modifier>calldata|indexed|memory|storage{1}))?(?:\s(?<name>[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,b=/^u?int$/;function v(p,y){var T,k;const I=(0,s.getParameterCacheKey)(p,y==null?void 0:y.type,y==null?void 0:y.structs);if(s.parameterCache.has(I))return s.parameterCache.get(I);const w=e.isTupleRegex.test(p),A=(0,e.execTyped)(w?h:g,p);if(!A)throw new n.InvalidParameterError({param:p});if(A.name&&u(A.name))throw new n.SolidityProtectedKeywordError({param:p,name:A.name});const B=A.name?{name:A.name}:{},R=A.modifier==="indexed"?{indexed:!0}:{},S=(y==null?void 0:y.structs)??{};let x,F={};if(w){x="tuple";const O=_(A.type),C=[],q=O.length;for(let M=0;M<q;M++)C.push(v(O[M],{structs:S}));F={components:C}}else if(A.type in S)x="tuple",F={components:S[A.type]};else if(b.test(A.type))x=`${A.type}256`;else if(A.type==="address payable")x="address";else if(x=A.type,(y==null?void 0:y.type)!=="struct"&&!E(x))throw new t.UnknownSolidityTypeError({type:x});if(A.modifier){if(!((k=(T=y==null?void 0:y.modifiers)==null?void 0:T.has)!=null&&k.call(T,A.modifier)))throw new n.InvalidModifierError({param:p,type:y==null?void 0:y.type,modifier:A.modifier});if(i.functionModifiers.has(A.modifier)&&!j(x,!!A.array))throw new n.InvalidFunctionModifierError({param:p,type:y==null?void 0:y.type,modifier:A.modifier})}const H={type:`${x}${A.array??""}`,...B,...R,...F};return s.parameterCache.set(I,H),H}function _(p,y=[],I="",w=0){const A=p.trim().length;for(let B=0;B<A;B++){const R=p[B],S=p.slice(B+1);switch(R){case",":return w===0?_(S,[...y,I.trim()]):_(S,y,`${I}${R}`,w);case"(":return _(S,y,`${I}${R}`,w+1);case")":return _(S,y,`${I}${R}`,w-1);default:return _(S,y,`${I}${R}`,w)}}if(I==="")return y;if(w!==0)throw new o.InvalidParenthesisError({current:I,depth:w});return y.push(I.trim()),y}function E(p){return p==="address"||p==="bool"||p==="function"||p==="string"||e.bytesRegex.test(p)||e.integerRegex.test(p)}const P=/^(?: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 u(p){return p==="address"||p==="bool"||p==="function"||p==="string"||p==="tuple"||e.bytesRegex.test(p)||e.integerRegex.test(p)||P.test(p)}function j(p,y){return y||p==="bytes"||p==="string"||p==="tuple"}return Ye}var Ml;function Tu(){if(Ml)return yi;Ml=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.parseStructs=a;const e=Pu(),t=Au(),n=Co(),r=Yd(),o=J1(),s=gn(),i=yn();function a(l){const f={},m=l.length;for(let v=0;v<m;v++){const _=l[v];if(!(0,s.isStructSignature)(_))continue;const E=(0,s.execStructSignature)(_);if(!E)throw new r.InvalidSignatureError({signature:_,type:"struct"});const P=E.properties.split(";"),u=[],j=P.length;for(let p=0;p<j;p++){const I=P[p].trim();if(!I)continue;const w=(0,i.parseAbiParameter)(I,{type:"struct"});u.push(w)}if(!u.length)throw new r.InvalidStructSignatureError({signature:_});f[E.name]=u}const g={},h=Object.entries(f),b=h.length;for(let v=0;v<b;v++){const[_,E]=h[v];g[_]=d(E,f)}return g}const c=/^(?<type>[a-zA-Z$_][a-zA-Z0-9$_]*)(?<array>(?:\[\d*?\])+?)?$/;function d(l=[],f={},m=new Set){const g=[],h=l.length;for(let b=0;b<h;b++){const v=l[b];if(e.isTupleRegex.test(v.type))g.push(v);else{const E=(0,e.execTyped)(c,v.type);if(!(E!=null&&E.type))throw new n.InvalidAbiTypeParameterError({abiParameter:v});const{array:P,type:u}=E;if(u in f){if(m.has(u))throw new o.CircularReferenceError({type:u});g.push({...v,type:`tuple${P??""}`,components:d(f[u],f,new Set([...m,u]))})}else if((0,i.isSolidityType)(u))g.push(v);else throw new t.UnknownTypeError({type:u})}}return g}return yi}var Hl;function xv(){if(Hl)return hi;Hl=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.parseAbi=r;const e=gn(),t=Tu(),n=yn();function r(o){const s=(0,t.parseStructs)(o),i=[],a=o.length;for(let c=0;c<a;c++){const d=o[c];(0,e.isStructSignature)(d)||i.push((0,n.parseSignature)(d,s))}return i}return hi}var pi={},kl;function Cv(){if(kl)return pi;kl=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.parseAbiItem=o;const e=Au(),t=gn(),n=Tu(),r=yn();function o(s){let i;if(typeof s=="string")i=(0,r.parseSignature)(s);else{const a=(0,n.parseStructs)(s),c=s.length;for(let d=0;d<c;d++){const l=s[d];if(!(0,t.isStructSignature)(l)){i=(0,r.parseSignature)(l,a);break}}}if(!i)throw new e.InvalidAbiItemError({signature:s});return i}return pi}var gi={},Fl;function qv(){if(Fl)return gi;Fl=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.parseAbiParameter=o;const e=Co(),t=gn(),n=Tu(),r=yn();function o(s){let i;if(typeof s=="string")i=(0,r.parseAbiParameter)(s,{modifiers:t.modifiers});else{const a=(0,n.parseStructs)(s),c=s.length;for(let d=0;d<c;d++){const l=s[d];if(!(0,t.isStructSignature)(l)){i=(0,r.parseAbiParameter)(l,{modifiers:t.modifiers,structs:a});break}}}if(!i)throw new e.InvalidAbiParameterError({param:s});return i}return gi}var _i={},Nl;function Mv(){if(Nl)return _i;Nl=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.parseAbiParameters=s;const e=Co(),t=gn(),n=Tu(),r=yn(),o=yn();function s(i){const a=[];if(typeof i=="string"){const c=(0,r.splitParameters)(i),d=c.length;for(let l=0;l<d;l++)a.push((0,o.parseAbiParameter)(c[l],{modifiers:t.modifiers}))}else{const c=(0,n.parseStructs)(i),d=i.length;for(let l=0;l<d;l++){const f=i[l];if((0,t.isStructSignature)(f))continue;const m=(0,r.splitParameters)(f),g=m.length;for(let h=0;h<g;h++)a.push((0,o.parseAbiParameter)(m[h],{modifiers:t.modifiers,structs:c}))}}if(a.length===0)throw new e.InvalidAbiParametersError({params:i});return a}return _i}var zl;function ir(){return zl||(zl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CircularReferenceError=e.InvalidParenthesisError=e.UnknownSignatureError=e.InvalidSignatureError=e.InvalidStructSignatureError=e.InvalidAbiParameterError=e.InvalidAbiParametersError=e.InvalidParameterError=e.SolidityProtectedKeywordError=e.InvalidModifierError=e.InvalidFunctionModifierError=e.InvalidAbiTypeParameterError=e.UnknownSolidityTypeError=e.InvalidAbiItemError=e.UnknownTypeError=e.parseAbiParameters=e.parseAbiParameter=e.parseAbiItem=e.parseAbi=e.formatAbiParameters=e.formatAbiParameter=e.formatAbiItem=e.formatAbi=e.narrow=e.BaseError=void 0;var t=pn();Object.defineProperty(e,"BaseError",{enumerable:!0,get:function(){return t.BaseError}});var n=Rv();Object.defineProperty(e,"narrow",{enumerable:!0,get:function(){return n.narrow}});var r=Bv();Object.defineProperty(e,"formatAbi",{enumerable:!0,get:function(){return r.formatAbi}});var o=Z1();Object.defineProperty(e,"formatAbiItem",{enumerable:!0,get:function(){return o.formatAbiItem}});var s=W1();Object.defineProperty(e,"formatAbiParameter",{enumerable:!0,get:function(){return s.formatAbiParameter}});var i=K1();Object.defineProperty(e,"formatAbiParameters",{enumerable:!0,get:function(){return i.formatAbiParameters}});var a=xv();Object.defineProperty(e,"parseAbi",{enumerable:!0,get:function(){return a.parseAbi}});var c=Cv();Object.defineProperty(e,"parseAbiItem",{enumerable:!0,get:function(){return c.parseAbiItem}});var d=qv();Object.defineProperty(e,"parseAbiParameter",{enumerable:!0,get:function(){return d.parseAbiParameter}});var l=Mv();Object.defineProperty(e,"parseAbiParameters",{enumerable:!0,get:function(){return l.parseAbiParameters}});var f=Au();Object.defineProperty(e,"UnknownTypeError",{enumerable:!0,get:function(){return f.UnknownTypeError}}),Object.defineProperty(e,"InvalidAbiItemError",{enumerable:!0,get:function(){return f.InvalidAbiItemError}}),Object.defineProperty(e,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return f.UnknownSolidityTypeError}});var m=Co();Object.defineProperty(e,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return m.InvalidAbiTypeParameterError}}),Object.defineProperty(e,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return m.InvalidFunctionModifierError}}),Object.defineProperty(e,"InvalidModifierError",{enumerable:!0,get:function(){return m.InvalidModifierError}}),Object.defineProperty(e,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return m.SolidityProtectedKeywordError}}),Object.defineProperty(e,"InvalidParameterError",{enumerable:!0,get:function(){return m.InvalidParameterError}}),Object.defineProperty(e,"InvalidAbiParametersError",{enumerable:!0,get:function(){return m.InvalidAbiParametersError}}),Object.defineProperty(e,"InvalidAbiParameterError",{enumerable:!0,get:function(){return m.InvalidAbiParameterError}});var g=Yd();Object.defineProperty(e,"InvalidStructSignatureError",{enumerable:!0,get:function(){return g.InvalidStructSignatureError}}),Object.defineProperty(e,"InvalidSignatureError",{enumerable:!0,get:function(){return g.InvalidSignatureError}}),Object.defineProperty(e,"UnknownSignatureError",{enumerable:!0,get:function(){return g.UnknownSignatureError}});var h=Y1();Object.defineProperty(e,"InvalidParenthesisError",{enumerable:!0,get:function(){return h.InvalidParenthesisError}});var b=J1();Object.defineProperty(e,"CircularReferenceError",{enumerable:!0,get:function(){return b.CircularReferenceError}})})(jd)),jd}var Yr={},vi={},Ul;function me(){if(Ul)return vi;Ul=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.getAction=e;function e(t,n,r){const o=t[n.name];if(typeof o=="function")return o;const s=t[r];return typeof s=="function"?s:i=>n(t,i)}return vi}var Ei={},ji={},ae={},Dn={},Ll;function Wt(){if(Ll)return Dn;Ll=1,Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.formatAbiItem=t,Dn.formatAbiParams=n;const e=Se();function t(o,{includeName:s=!1}={}){if(o.type!=="function"&&o.type!=="event"&&o.type!=="error")throw new e.InvalidDefinitionTypeError(o.type);return`${o.name}(${n(o.inputs,{includeName:s})})`}function n(o,{includeName:s=!1}={}){return o?o.map(i=>r(i,{includeName:s})).join(s?", ":","):""}function r(o,{includeName:s}){return o.type.startsWith("tuple")?`(${n(o.components,{includeName:s})})${o.type.slice(5)}`:o.type+(s&&o.name?` ${o.name}`:"")}return Dn}var wi={},Pi={},Dl;function Ve(){if(Dl)return Pi;Dl=1,Object.defineProperty(Pi,"__esModule",{value:!0}),Pi.isHex=e;function e(t,{strict:n=!0}={}){return!t||typeof t!="string"?!1:n?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x")}return Pi}var Gl;function We(){if(Gl)return wi;Gl=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.size=t;const e=Ve();function t(n){return(0,e.isHex)(n,{strict:!1})?Math.ceil((n.length-2)/2):n.length}return wi}var Xr={},Gn={},Vl;function Hv(){return Vl||(Vl=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.version=void 0,Gn.version="2.47.12"),Gn}var Wl;function ue(){if(Wl)return Xr;Wl=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.BaseError=void 0,Xr.setErrorConfig=n;const e=Hv();let t={getDocsUrl:({docsBaseUrl:s,docsPath:i="",docsSlug:a})=>i?`${s??"https://viem.sh"}${i}${a?`#${a}`:""}`:void 0,version:`viem@${e.version}`};function n(s){t=s}class r extends Error{constructor(i,a={}){var m;const c=(()=>{var g;return a.cause instanceof r?a.cause.details:(g=a.cause)!=null&&g.message?a.cause.message:a.details})(),d=a.cause instanceof r&&a.cause.docsPath||a.docsPath,l=(m=t.getDocsUrl)==null?void 0:m.call(t,{...a,docsPath:d}),f=[i||"An error occurred.","",...a.metaMessages?[...a.metaMessages,""]:[],...l?[`Docs: ${l}`]:[],...c?[`Details: ${c}`]:[],...t.version?[`Version: ${t.version}`]:[]].join(`
|
|
3
3
|
`);super(f,a.cause?{cause:a.cause}:void 0),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,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=c,this.docsPath=d,this.metaMessages=a.metaMessages,this.name=a.name??this.name,this.shortMessage=i,this.version=e.version}walk(i){return o(this,i)}}Xr.BaseError=r;function o(s,i){return i!=null&&i(s)?s:s&&typeof s=="object"&&"cause"in s&&s.cause!==void 0?o(s.cause,i):i?null:s}return Xr}var Kl;function Se(){if(Kl)return ae;Kl=1,Object.defineProperty(ae,"__esModule",{value:!0}),ae.UnsupportedPackedAbiType=ae.InvalidDefinitionTypeError=ae.InvalidArrayError=ae.InvalidAbiDecodingTypeError=ae.InvalidAbiEncodingTypeError=ae.DecodeLogTopicsMismatch=ae.DecodeLogDataMismatch=ae.BytesSizeMismatchError=ae.AbiItemAmbiguityError=ae.AbiFunctionSignatureNotFoundError=ae.AbiFunctionOutputsNotFoundError=ae.AbiFunctionNotFoundError=ae.AbiEventNotFoundError=ae.AbiEventSignatureNotFoundError=ae.AbiEventSignatureEmptyTopicsError=ae.AbiErrorSignatureNotFoundError=ae.AbiErrorNotFoundError=ae.AbiErrorInputsNotFoundError=ae.AbiEncodingLengthMismatchError=ae.AbiEncodingBytesSizeMismatchError=ae.AbiEncodingArrayLengthMismatchError=ae.AbiDecodingZeroDataError=ae.AbiDecodingDataSizeTooSmallError=ae.AbiDecodingDataSizeInvalidError=ae.AbiConstructorParamsNotFoundError=ae.AbiConstructorNotFoundError=void 0;const e=Wt(),t=We(),n=ue();class r extends n.BaseError{constructor({docsPath:x}){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(`
|
|
4
4
|
`),{docsPath:x,name:"AbiConstructorNotFoundError"})}}ae.AbiConstructorNotFoundError=r;class o extends n.BaseError{constructor({docsPath:x}){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(`
|