@dev.sail.money/sailor 1.2.0-81 → 1.2.0-82
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/package.json +1 -1
- package/packages/sdk/dist/intelligence.d.ts +1 -1
- package/packages/sdk/dist/intelligence.js +1 -1
- package/packages/ui/dist/assets/{add-BHzhulOk.js → add-DxdePWzw.js} +1 -1
- package/packages/ui/dist/assets/{all-wallets-bze9fThy.js → all-wallets-CcDyr50U.js} +1 -1
- package/packages/ui/dist/assets/{app-store-CoIZmzXK.js → app-store-BCSHe8EN.js} +1 -1
- package/packages/ui/dist/assets/{apple-BPJa64T1.js → apple-Cio1eVvD.js} +1 -1
- package/packages/ui/dist/assets/{arrow-bottom-_fkqbUu3.js → arrow-bottom-BlzVLDUl.js} +1 -1
- package/packages/ui/dist/assets/{arrow-bottom-circle-BeLtx981.js → arrow-bottom-circle-Bi45LFFD.js} +1 -1
- package/packages/ui/dist/assets/{arrow-left-BDQpVSid.js → arrow-left-B3VkjnnJ.js} +1 -1
- package/packages/ui/dist/assets/{arrow-right-BDDLer4G.js → arrow-right-5DrDm6ll.js} +1 -1
- package/packages/ui/dist/assets/{arrow-top-DxkcaWNn.js → arrow-top-wcXizC-G.js} +1 -1
- package/packages/ui/dist/assets/{bank-34M6GXpT.js → bank-SqJo5jS7.js} +1 -1
- package/packages/ui/dist/assets/{basic-DwBXPFEP.js → basic-BgCrxFS4.js} +1 -1
- package/packages/ui/dist/assets/{browser-DS9d3vTN.js → browser-DI6l7Tng.js} +1 -1
- package/packages/ui/dist/assets/{card-CI9P0wm8.js → card-DjP6FOz-.js} +1 -1
- package/packages/ui/dist/assets/{ccip-C808yP8M.js → ccip-CKVRZdQQ.js} +1 -1
- package/packages/ui/dist/assets/{checkmark-D1kleVep.js → checkmark-CBdVh2Kg.js} +1 -1
- package/packages/ui/dist/assets/{checkmark-bold-CSRBApJw.js → checkmark-bold-DvvsfN8H.js} +1 -1
- package/packages/ui/dist/assets/{chevron-bottom-DCE_2U0S.js → chevron-bottom-BBTXniKn.js} +1 -1
- package/packages/ui/dist/assets/{chevron-left-BQpAr7N9.js → chevron-left-LL7HKhOV.js} +1 -1
- package/packages/ui/dist/assets/{chevron-right-C4zYPlID.js → chevron-right-BT3XvCea.js} +1 -1
- package/packages/ui/dist/assets/{chevron-top-5u6DXU_q.js → chevron-top-D3lHXBcd.js} +1 -1
- package/packages/ui/dist/assets/{chrome-store-0eL-jc6x.js → chrome-store-BOzOVwkP.js} +1 -1
- package/packages/ui/dist/assets/{clock-K6SWz-Xp.js → clock-JbWtGDR2.js} +1 -1
- package/packages/ui/dist/assets/{close-NjUVDISN.js → close-ZT_Jiw1f.js} +1 -1
- package/packages/ui/dist/assets/{coinPlaceholder-4IlWUjA9.js → coinPlaceholder-C-Csq_lw.js} +1 -1
- package/packages/ui/dist/assets/{compass-CTQkefRP.js → compass-XKXG-uKY.js} +1 -1
- package/packages/ui/dist/assets/{copy-BJXBRCx0.js → copy-BI6jLoZK.js} +1 -1
- package/packages/ui/dist/assets/{core-B8QjFLgB.js → core-BLwyu_UZ.js} +3 -3
- package/packages/ui/dist/assets/cursor-jNUI_tHN.js +3 -0
- package/packages/ui/dist/assets/{cursor-transparent-fuIzFhCq.js → cursor-transparent-CFZylRzv.js} +1 -1
- package/packages/ui/dist/assets/{desktop-D6qLgQIO.js → desktop-Hl3xhHy9.js} +1 -1
- package/packages/ui/dist/assets/{disconnect-C6bVEQtd.js → disconnect-DW6U-dN7.js} +1 -1
- package/packages/ui/dist/assets/{discord-B401Bjx_.js → discord-BkDRI6sB.js} +1 -1
- package/packages/ui/dist/assets/{etherscan-CRQ0nvsC.js → etherscan-DM0DlV8l.js} +1 -1
- package/packages/ui/dist/assets/{events-BBs8RzFy.js → events-DuWTfKWm.js} +1 -1
- package/packages/ui/dist/assets/{exclamation-triangle-DIWcFopo.js → exclamation-triangle-BJXppW_n.js} +1 -1
- package/packages/ui/dist/assets/{extension-CRNTC5F3.js → extension-CVwJSN6F.js} +1 -1
- package/packages/ui/dist/assets/{external-link-Dxm_pEA6.js → external-link-9T1VC3J9.js} +1 -1
- package/packages/ui/dist/assets/{facebook-DYx87gzp.js → facebook-R1848HX9.js} +1 -1
- package/packages/ui/dist/assets/{fallback-B3KlM2jG.js → fallback-BQyFegq4.js} +1 -1
- package/packages/ui/dist/assets/{farcaster-vw35mSz0.js → farcaster-C8lScwHE.js} +1 -1
- package/packages/ui/dist/assets/{filters-DQTqA-v8.js → filters-D_hUKJc6.js} +1 -1
- package/packages/ui/dist/assets/{github-Cu7NllHo.js → github-BUdSlQ0g.js} +1 -1
- package/packages/ui/dist/assets/{google-CgnSFbzs.js → google-DCVSiGyR.js} +1 -1
- package/packages/ui/dist/assets/{help-circle-BgHz6FY-.js → help-circle-BmbA9WiR.js} +1 -1
- package/packages/ui/dist/assets/{id-CKIf-0ah.js → id-BpZ2AesF.js} +1 -1
- package/packages/ui/dist/assets/{image-zDrW7Zrz.js → image-D9OlBR50.js} +1 -1
- package/packages/ui/dist/assets/{index-C3Gtw0yU.js → index-BcngInt2.js} +1 -1
- package/packages/ui/dist/assets/{index-Dnu-MKRv.js → index-BmKpVmQo.js} +49 -49
- package/packages/ui/dist/assets/{index-B5WsIHNR.js → index-CFdoQ0C9.js} +1 -1
- package/packages/ui/dist/assets/{index-VqDVSstI.js → index-Cw74yaCx.js} +1 -1
- package/packages/ui/dist/assets/index-CxWif5qB.css +1 -0
- package/packages/ui/dist/assets/{index-E843mvDm.js → index-DnTTITgJ.js} +3 -3
- package/packages/ui/dist/assets/{index-T9iF7nyY.js → index-VuBRR5Ee.js} +1 -1
- package/packages/ui/dist/assets/{index.es-Dy1z_XS5.js → index.es-Cwe8eYYQ.js} +4 -4
- package/packages/ui/dist/assets/{info-Bk8ZhTtJ.js → info-CsTScSXv.js} +1 -1
- package/packages/ui/dist/assets/{info-circle-CsfaAGDJ.js → info-circle-C85unnhg.js} +1 -1
- package/packages/ui/dist/assets/{lightbulb-DVCPX6Bg.js → lightbulb-DNRTVt--.js} +1 -1
- package/packages/ui/dist/assets/{mail-CrfIhL2e.js → mail-lo_xlG5y.js} +1 -1
- package/packages/ui/dist/assets/{metamask-sdk-GPKx5rx1.js → metamask-sdk-D_zgrb2L.js} +1 -1
- package/packages/ui/dist/assets/{mobile-BqtJU2sJ.js → mobile-CeziQrHs.js} +1 -1
- package/packages/ui/dist/assets/{more-CqWuP_97.js → more-BJJ25Bco.js} +1 -1
- package/packages/ui/dist/assets/{network-placeholder-lhktYA9t.js → network-placeholder-C2bTejHc.js} +1 -1
- package/packages/ui/dist/assets/{nftPlaceholder-C4IaH_KU.js → nftPlaceholder-P9e90e3l.js} +1 -1
- package/packages/ui/dist/assets/{off-D-nqr3k7.js → off-Cf9Lcmke.js} +1 -1
- package/packages/ui/dist/assets/{parseSignature-D-JHpnlb.js → parseSignature-D3jDGZxJ.js} +1 -1
- package/packages/ui/dist/assets/{play-store-CrYh0GKd.js → play-store-CIvfWMTw.js} +1 -1
- package/packages/ui/dist/assets/{plus-BinJdB-S.js → plus-y4ZSXf_2.js} +1 -1
- package/packages/ui/dist/assets/{qr-code-B2zZzUvA.js → qr-code-BHKbMyiU.js} +1 -1
- package/packages/ui/dist/assets/{recycle-horizontal-YSIQYchy.js → recycle-horizontal-IClLWZNS.js} +1 -1
- package/packages/ui/dist/assets/{refresh-7cwylsnm.js → refresh-DGceqRDA.js} +1 -1
- package/packages/ui/dist/assets/{reown-logo-Czpar13l.js → reown-logo-Bv7sNHvL.js} +1 -1
- package/packages/ui/dist/assets/{search-l2qfswle.js → search-CRgTCcsE.js} +1 -1
- package/packages/ui/dist/assets/{secp256k1-DO8BYz4w.js → secp256k1-Cqp3PtVi.js} +1 -1
- package/packages/ui/dist/assets/{send-Cdwp4Tx_.js → send-DU6bIrPo.js} +1 -1
- package/packages/ui/dist/assets/{swapHorizontal-DuBCLhsJ.js → swapHorizontal-gFwRhx0T.js} +1 -1
- package/packages/ui/dist/assets/{swapHorizontalBold-BZgNSpz8.js → swapHorizontalBold-JtBzA3Ii.js} +1 -1
- package/packages/ui/dist/assets/{swapHorizontalMedium-CdeHDhRc.js → swapHorizontalMedium-DoYVrxv8.js} +1 -1
- package/packages/ui/dist/assets/{swapHorizontalRoundedBold-_jvGhJSf.js → swapHorizontalRoundedBold-CAKgeiv9.js} +1 -1
- package/packages/ui/dist/assets/{swapVertical-AYiftI0Y.js → swapVertical-D4_Wkrmp.js} +1 -1
- package/packages/ui/dist/assets/{telegram-lLyIYguY.js → telegram-DezHeoAw.js} +1 -1
- package/packages/ui/dist/assets/{three-dots-CWBfcc3Z.js → three-dots-_2l4KYeg.js} +1 -1
- package/packages/ui/dist/assets/{twitch-DdcRj7xY.js → twitch-D7lxAEZq.js} +1 -1
- package/packages/ui/dist/assets/{twitterIcon-rqpeZZvf.js → twitterIcon-y5jVQyUi.js} +1 -1
- package/packages/ui/dist/assets/{verify-CAIYjM8H.js → verify-Ue3VkpeM.js} +1 -1
- package/packages/ui/dist/assets/{verify-filled-BOeXWsOS.js → verify-filled-DhQ6l5Hx.js} +1 -1
- package/packages/ui/dist/assets/{w3m-modal-Bzduj2Xd.js → w3m-modal-Dk1A5UT_.js} +1 -1
- package/packages/ui/dist/assets/{wallet-Cmj6219Y.js → wallet-Z5h6x06d.js} +1 -1
- package/packages/ui/dist/assets/{wallet-placeholder-CNeKXjFf.js → wallet-placeholder-C56EAJDw.js} +1 -1
- package/packages/ui/dist/assets/{walletconnect-DgHtDBSt.js → walletconnect-CIEAhB_r.js} +1 -1
- package/packages/ui/dist/assets/{warning-circle-c50i-VXL.js → warning-circle-DhGvQBv6.js} +1 -1
- package/packages/ui/dist/assets/{x-2iqVGtH9.js → x-BveyWTSW.js} +1 -1
- package/packages/ui/dist/index.html +2 -2
- package/packages/ui/dist/assets/cursor-stgpVbe7.js +0 -3
- package/packages/ui/dist/assets/index-DxMQ5yqt.css +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{F as o}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const l=o` <svg fill="none" viewBox="0 0 13 4">
|
|
2
|
+
<path fill="currentColor" d="M.5 0h12L8.9 3.13a3.76 3.76 0 0 1-4.8 0L.5 0Z" />
|
|
3
|
+
</svg>`;export{l as cursorSvg};
|
package/packages/ui/dist/assets/{cursor-transparent-fuIzFhCq.js → cursor-transparent-CFZylRzv.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as o}from"./core-
|
|
1
|
+
import{F as o}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const s=o`<svg fill="none" viewBox="0 0 14 6">
|
|
2
2
|
<path style="fill: var(--wui-color-bg-150);" d="M0 1h14L9.21 5.12a3.31 3.31 0 0 1-4.49 0L0 1Z" />
|
|
3
3
|
<path
|
|
4
4
|
style="stroke: var(--wui-color-inverse-100);"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as c}from"./core-
|
|
1
|
+
import{F as c}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const t=c`<svg fill="none" viewBox="0 0 20 20">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
fill-rule="evenodd"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as o}from"./core-
|
|
1
|
+
import{F as o}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const l=o`<svg fill="none" viewBox="0 0 16 16">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
fill-rule="evenodd"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as l}from"./core-
|
|
1
|
+
import{F as l}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const r=l`<svg fill="none" viewBox="0 0 40 40">
|
|
2
2
|
<g clip-path="url(#a)">
|
|
3
3
|
<g clip-path="url(#b)">
|
|
4
4
|
<circle cx="20" cy="19.89" r="20" fill="#5865F2" />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as c}from"./core-
|
|
1
|
+
import{F as c}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const i=c`<svg fill="none" viewBox="0 0 16 16">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
d="M4.25 7a.63.63 0 0 0-.63.63v3.97c0 .28-.2.51-.47.54l-.75.07a.93.93 0 0 1-.9-.47A7.51 7.51 0 0 1 5.54.92a7.5 7.5 0 0 1 9.54 4.62c.12.35.06.72-.16 1-.74.97-1.68 1.78-2.6 2.44V4.44a.64.64 0 0 0-.63-.64h-1.06c-.35 0-.63.3-.63.64v5.5c0 .23-.12.42-.32.5l-.52.23V6.05c0-.36-.3-.64-.64-.64H7.45c-.35 0-.64.3-.64.64v4.97c0 .25-.17.46-.4.52a5.8 5.8 0 0 0-.45.11v-4c0-.36-.3-.65-.64-.65H4.25ZM14.07 12.4A7.49 7.49 0 0 1 3.6 14.08c4.09-.58 9.14-2.5 11.87-6.6v.03a7.56 7.56 0 0 1-1.41 4.91Z"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cS as C}from"./index-
|
|
1
|
+
import{cS as C}from"./index-BmKpVmQo.js";var p={exports:{}},a=typeof Reflect=="object"?Reflect:null,d=a&&typeof a.apply=="function"?a.apply:function(e,n,r){return Function.prototype.apply.call(e,n,r)},l;a&&typeof a.ownKeys=="function"?l=a.ownKeys:Object.getOwnPropertySymbols?l=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:l=function(e){return Object.getOwnPropertyNames(e)};function j(t){console&&console.warn&&console.warn(t)}var L=Number.isNaN||function(e){return e!==e};function o(){o.init.call(this)}p.exports=o;p.exports.once=A;o.EventEmitter=o;o.prototype._events=void 0;o.prototype._eventsCount=0;o.prototype._maxListeners=void 0;var m=10;function v(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return m},set:function(t){if(typeof t!="number"||t<0||L(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");m=t}});o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};o.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||L(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function y(t){return t._maxListeners===void 0?o.defaultMaxListeners:t._maxListeners}o.prototype.getMaxListeners=function(){return y(this)};o.prototype.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n.push(arguments[r]);var i=e==="error",f=this._events;if(f!==void 0)i=i&&f.error===void 0;else if(!i)return!1;if(i){var s;if(n.length>0&&(s=n[0]),s instanceof Error)throw s;var u=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw u.context=s,u}var c=f[e];if(c===void 0)return!1;if(typeof c=="function")d(c,this,n);else for(var h=c.length,O=E(c,h),r=0;r<h;++r)d(O[r],this,n);return!0};function g(t,e,n,r){var i,f,s;if(v(n),f=t._events,f===void 0?(f=t._events=Object.create(null),t._eventsCount=0):(f.newListener!==void 0&&(t.emit("newListener",e,n.listener?n.listener:n),f=t._events),s=f[e]),s===void 0)s=f[e]=n,++t._eventsCount;else if(typeof s=="function"?s=f[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),i=y(t),i>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,j(u)}return t}o.prototype.addListener=function(e,n){return g(this,e,n,!1)};o.prototype.on=o.prototype.addListener;o.prototype.prependListener=function(e,n){return g(this,e,n,!0)};function N(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=N.bind(r);return i.listener=n,r.wrapFn=i,i}o.prototype.once=function(e,n){return v(n),this.on(e,_(this,e,n)),this};o.prototype.prependOnceListener=function(e,n){return v(n),this.prependListener(e,_(this,e,n)),this};o.prototype.removeListener=function(e,n){var r,i,f,s,u;if(v(n),i=this._events,i===void 0)return this;if(r=i[e],r===void 0)return this;if(r===n||r.listener===n)--this._eventsCount===0?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||n));else if(typeof r!="function"){for(f=-1,s=r.length-1;s>=0;s--)if(r[s]===n||r[s].listener===n){u=r[s].listener,f=s;break}if(f<0)return this;f===0?r.shift():R(r,f),r.length===1&&(i[e]=r[0]),i.removeListener!==void 0&&this.emit("removeListener",e,u||n)}return this};o.prototype.off=o.prototype.removeListener;o.prototype.removeAllListeners=function(e){var n,r,i;if(r=this._events,r===void 0)return this;if(r.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):r[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete r[e]),this;if(arguments.length===0){var f=Object.keys(r),s;for(i=0;i<f.length;++i)s=f[i],s!=="removeListener"&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(n=r[e],typeof n=="function")this.removeListener(e,n);else if(n!==void 0)for(i=n.length-1;i>=0;i--)this.removeListener(e,n[i]);return this};function w(t,e,n){var r=t._events;if(r===void 0)return[];var i=r[e];return i===void 0?[]:typeof i=="function"?n?[i.listener||i]:[i]:n?M(i):E(i,i.length)}o.prototype.listeners=function(e){return w(this,e,!0)};o.prototype.rawListeners=function(e){return w(this,e,!1)};o.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):b.call(t,e)};o.prototype.listenerCount=b;function b(t){var e=this._events;if(e!==void 0){var n=e[t];if(typeof n=="function")return 1;if(n!==void 0)return n.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?l(this._events):[]};function E(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function R(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function M(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}function A(t,e){return new Promise(function(n,r){function i(s){t.removeListener(e,f),r(s)}function f(){typeof t.removeListener=="function"&&t.removeListener("error",i),n([].slice.call(arguments))}x(t,e,f,{once:!0}),e!=="error"&&P(t,i,{once:!0})})}function P(t,e,n){typeof t.on=="function"&&x(t,"error",e,n)}function x(t,e,n,r){if(typeof t.on=="function")r.once?t.once(e,n):t.on(e,n);else if(typeof t.addEventListener=="function")t.addEventListener(e,function i(f){r.once&&t.removeEventListener(e,i),n(f)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}var T=p.exports;const I=C(T);export{I as N,T as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as C}from"./core-
|
|
1
|
+
import{F as C}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const m=C`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path d="M15.0162 11.6312L9.55059 2.13937C9.39228 1.86862 9.16584 1.64405 8.8938 1.48798C8.62176 1.33192 8.3136 1.2498 7.99997 1.2498C7.68634 1.2498 7.37817 1.33192 7.10613 1.48798C6.83409 1.64405 6.60765 1.86862 6.44934 2.13937L0.983716 11.6312C0.830104 11.894 0.749146 12.1928 0.749146 12.4972C0.749146 12.8015 0.830104 13.1004 0.983716 13.3631C1.14027 13.6352 1.3664 13.8608 1.63889 14.0166C1.91139 14.1725 2.22044 14.253 2.53434 14.25H13.4656C13.7793 14.2528 14.0881 14.1721 14.3603 14.0163C14.6326 13.8604 14.8585 13.635 15.015 13.3631C15.1688 13.1005 15.2499 12.8017 15.2502 12.4973C15.2504 12.193 15.1696 11.8941 15.0162 11.6312ZM13.7162 12.6125C13.6908 12.6558 13.6541 12.6914 13.6101 12.7157C13.5661 12.7399 13.5164 12.7517 13.4662 12.75H2.53434C2.48415 12.7517 2.43442 12.7399 2.39042 12.7157C2.34641 12.6914 2.30976 12.6558 2.28434 12.6125C2.26278 12.5774 2.25137 12.5371 2.25137 12.4959C2.25137 12.4548 2.26278 12.4144 2.28434 12.3794L7.74997 2.88749C7.77703 2.84583 7.81408 2.8116 7.85774 2.7879C7.9014 2.7642 7.95029 2.75178 7.99997 2.75178C8.04964 2.75178 8.09854 2.7642 8.1422 2.7879C8.18586 2.8116 8.2229 2.84583 8.24997 2.88749L13.715 12.3794C13.7367 12.4143 13.7483 12.4546 13.7486 12.4958C13.7488 12.5369 13.7376 12.5773 13.7162 12.6125ZM7.24997 8.49999V6.49999C7.24997 6.30108 7.32898 6.11031 7.46964 5.96966C7.61029 5.82901 7.80105 5.74999 7.99997 5.74999C8.19888 5.74999 8.38964 5.82901 8.5303 5.96966C8.67095 6.11031 8.74997 6.30108 8.74997 6.49999V8.49999C8.74997 8.6989 8.67095 8.88967 8.5303 9.03032C8.38964 9.17097 8.19888 9.24999 7.99997 9.24999C7.80105 9.24999 7.61029 9.17097 7.46964 9.03032C7.32898 8.88967 7.24997 8.6989 7.24997 8.49999ZM8.99997 11C8.99997 11.1978 8.94132 11.3911 8.83144 11.5556C8.72155 11.72 8.56538 11.8482 8.38265 11.9239C8.19992 11.9996 7.99886 12.0194 7.80488 11.9808C7.6109 11.9422 7.43271 11.847 7.29286 11.7071C7.15301 11.5672 7.05777 11.3891 7.01918 11.1951C6.9806 11.0011 7.0004 10.8 7.07609 10.6173C7.15177 10.4346 7.27995 10.2784 7.4444 10.1685C7.60885 10.0586 7.80219 9.99999 7.99997 9.99999C8.26518 9.99999 8.51954 10.1053 8.70707 10.2929C8.89461 10.4804 8.99997 10.7348 8.99997 11Z" fill="currentColor"/>
|
|
3
3
|
</svg>
|
|
4
4
|
`;export{m as exclamationTriangleSvg};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as a}from"./core-
|
|
1
|
+
import{F as a}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const l=a`<svg fill="none" viewBox="0 0 14 15">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
fill-rule="evenodd"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as o}from"./core-
|
|
1
|
+
import{F as o}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
fill-rule="evenodd"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as l}from"./core-
|
|
1
|
+
import{F as l}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const p=l`<svg fill="none" viewBox="0 0 40 40">
|
|
2
2
|
<g clip-path="url(#a)">
|
|
3
3
|
<g clip-path="url(#b)">
|
|
4
4
|
<circle cx="20" cy="19.89" r="20" fill="#1877F2" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bZ as x,b3 as E,bg as q,bi as S,W,g3 as j}from"./index-
|
|
1
|
+
import{bZ as x,b3 as E,bg as q,bi as S,W,g3 as j}from"./index-BmKpVmQo.js";function M(s,w={}){const{key:b="fallback",name:h="Fallback",rank:f=!1,shouldThrow:k=v,retryCount:m,retryDelay:T}=w;return({chain:i,pollingInterval:_=4e3,timeout:o,...g})=>{let c=s,d=()=>{};const C=x({key:b,name:h,async request({method:t,params:e}){let l;const p=async(a=0)=>{const u=c[a]({...g,chain:i,retryCount:0,timeout:o});try{const n=await u.request({method:t,params:e});return d({method:t,params:e,response:n,transport:u,status:"success"}),n}catch(n){if(d({error:n,method:t,params:e,transport:u,status:"error"}),k(n)||a===c.length-1||(l??(l=c.slice(a+1).some(r=>{const{include:y,exclude:R}=r({chain:i}).config.methods||{};return y?y.includes(t):R?!R.includes(t):!0})),!l))throw n;return p(a+1)}};return p()},retryCount:m,retryDelay:T,type:"fallback"},{onResponse:t=>d=t,transports:c.map(t=>t({chain:i,retryCount:0}))});if(f){const t=typeof f=="object"?f:{};D({chain:i,interval:t.interval??_,onTransports:e=>c=e,ping:t.ping,sampleCount:t.sampleCount,timeout:t.timeout,transports:c,weights:t.weights})}return C}}function v(s){return!!("code"in s&&typeof s.code=="number"&&(s.code===E.code||s.code===q.code||s.code===S.code||W.nodeMessage.test(s.message)||s.code===5e3))}function D({chain:s,interval:w=4e3,onTransports:b,ping:h,sampleCount:f=10,timeout:k=1e3,transports:m,weights:T={}}){const{stability:i=.7,latency:_=.3}=T,o=[],g=async()=>{const c=await Promise.all(m.map(async t=>{const e=t({chain:s,retryCount:0,timeout:k}),l=Date.now();let p,a;try{await(h?h({transport:e}):e.request({method:"net_listening"})),a=1}catch{a=0}finally{p=Date.now()}return{latency:p-l,success:a}}));o.push(c),o.length>f&&o.shift();const d=Math.max(...o.map(t=>Math.max(...t.map(({latency:e})=>e)))),C=m.map((t,e)=>{const l=o.map(r=>r[e].latency),a=1-l.reduce((r,y)=>r+y,0)/l.length/d,u=o.map(r=>r[e].success),n=u.reduce((r,y)=>r+y,0)/u.length;return n===0?[0,e]:[_*a+i*n,e]}).sort((t,e)=>e[0]-t[0]);b(C.map(([,t])=>m[t])),await j(w),g()};g()}export{M as f,v as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as h}from"./core-
|
|
1
|
+
import{F as h}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const f=h`<svg style="border-radius: 9999px; overflow: hidden;" fill="none" viewBox="0 0 1000 1000">
|
|
2
2
|
<rect width="1000" height="1000" rx="9999" ry="9999" fill="#855DCD"/>
|
|
3
3
|
<path fill="#855DCD" d="M0 0h1000v1000H0V0Z" />
|
|
4
4
|
<path
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as o}from"./core-
|
|
1
|
+
import{F as o}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const t=o`<svg fill="none" viewBox="0 0 16 16">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
fill-rule="evenodd"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as i}from"./core-
|
|
1
|
+
import{F as i}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const a=i`<svg fill="none" viewBox="0 0 40 40">
|
|
2
2
|
<g clip-path="url(#a)">
|
|
3
3
|
<g clip-path="url(#b)">
|
|
4
4
|
<circle cx="20" cy="19.89" r="20" fill="#1B1F23" />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as l}from"./core-
|
|
1
|
+
import{F as l}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const v=l`<svg fill="none" viewBox="0 0 40 40">
|
|
2
2
|
<path
|
|
3
3
|
fill="#4285F4"
|
|
4
4
|
d="M32.74 20.3c0-.93-.08-1.81-.24-2.66H20.26v5.03h7a6 6 0 0 1-2.62 3.91v3.28h4.22c2.46-2.27 3.88-5.6 3.88-9.56Z"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as l}from"./core-
|
|
1
|
+
import{F as l}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const c=l`<svg fill="none" viewBox="0 0 16 16">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
d="M8.51 5.66a.83.83 0 0 0-.57-.2.83.83 0 0 0-.52.28.8.8 0 0 0-.25.52 1 1 0 0 1-2 0c0-.75.34-1.43.81-1.91a2.75 2.75 0 0 1 4.78 1.92c0 1.24-.8 1.86-1.25 2.2l-.04.03c-.47.36-.5.43-.5.65a1 1 0 1 1-2 0c0-1.25.8-1.86 1.24-2.2l.04-.04c.47-.36.5-.43.5-.65 0-.3-.1-.49-.24-.6ZM9.12 11.87a1.13 1.13 0 1 1-2.25 0 1.13 1.13 0 0 1 2.25 0Z"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as c}from"./core-
|
|
1
|
+
import{F as c}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const e=c`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="28"
|
|
4
4
|
height="28"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{F as C}from"./core-
|
|
1
|
+
import{F as C}from"./core-BLwyu_UZ.js";import"./index-BmKpVmQo.js";import"./events-DuWTfKWm.js";import"./index.es-Cwe8eYYQ.js";import"./fallback-BQyFegq4.js";const t=C`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
|
|
2
2
|
<path d="M4.98926 3.73932C4.2989 3.73932 3.73926 4.29896 3.73926 4.98932C3.73926 5.67968 4.2989 6.23932 4.98926 6.23932C5.67962 6.23932 6.23926 5.67968 6.23926 4.98932C6.23926 4.29896 5.67962 3.73932 4.98926 3.73932Z" fill="currentColor"/>
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.60497 0.500001H6.39504C5.41068 0.499977 4.59185 0.499958 3.93178 0.571471C3.24075 0.64634 2.60613 0.809093 2.04581 1.21619C1.72745 1.44749 1.44749 1.72745 1.21619 2.04581C0.809093 2.60613 0.64634 3.24075 0.571471 3.93178C0.499958 4.59185 0.499977 5.41065 0.500001 6.39501V7.57815C0.499998 8.37476 0.499995 9.05726 0.534869 9.62725C0.570123 10.2034 0.644114 10.7419 0.828442 11.2302C0.925651 11.4877 1.05235 11.7287 1.21619 11.9542C1.44749 12.2726 1.72745 12.5525 2.04581 12.7838C2.60613 13.1909 3.24075 13.3537 3.93178 13.4285C4.59185 13.5001 5.41066 13.5 6.39503 13.5H7.60496C8.58933 13.5 9.40815 13.5001 10.0682 13.4285C10.7593 13.3537 11.3939 13.1909 11.9542 12.7838C12.2726 12.5525 12.5525 12.2726 12.7838 11.9542C13.1909 11.3939 13.3537 10.7593 13.4285 10.0682C13.5 9.40816 13.5 8.58935 13.5 7.60497V6.39505C13.5 5.41068 13.5 4.59185 13.4285 3.93178C13.3537 3.24075 13.1909 2.60613 12.7838 2.04581C12.5525 1.72745 12.2726 1.44749 11.9542 1.21619C11.3939 0.809093 10.7593 0.64634 10.0682 0.571471C9.40816 0.499958 8.58933 0.499977 7.60497 0.500001ZM3.22138 2.83422C3.38394 2.71612 3.62634 2.61627 4.14721 2.55984C4.68679 2.50138 5.39655 2.5 6.45 2.5H7.55C8.60345 2.5 9.31322 2.50138 9.8528 2.55984C10.3737 2.61627 10.6161 2.71612 10.7786 2.83422C10.9272 2.94216 11.0578 3.07281 11.1658 3.22138C11.2839 3.38394 11.3837 3.62634 11.4402 4.14721C11.4986 4.68679 11.5 5.39655 11.5 6.45V6.49703C10.9674 6.11617 10.386 5.84936 9.74213 5.81948C8.40536 5.75745 7.3556 6.73051 6.40509 7.84229C6.33236 7.92737 6.27406 7.98735 6.22971 8.02911L6.1919 8.00514L6.17483 7.99427C6.09523 7.94353 5.98115 7.87083 5.85596 7.80302C5.56887 7.64752 5.18012 7.4921 4.68105 7.4921C4.66697 7.4921 4.6529 7.49239 4.63884 7.49299C3.79163 7.52878 3.09922 8.1106 2.62901 8.55472C2.58751 8.59392 2.54594 8.6339 2.50435 8.6745C2.50011 8.34653 2.5 7.97569 2.5 7.55V6.45C2.5 5.39655 2.50138 4.68679 2.55984 4.14721C2.61627 3.62634 2.71612 3.38394 2.83422 3.22138C2.94216 3.07281 3.07281 2.94216 3.22138 2.83422ZM10.3703 8.14825C10.6798 8.37526 11.043 8.71839 11.4832 9.20889C11.4744 9.44992 11.4608 9.662 11.4402 9.8528C11.3837 10.3737 11.2839 10.6161 11.1658 10.7786C11.0578 10.9272 10.9272 11.0578 10.7786 11.1658C10.6161 11.2839 10.3737 11.3837 9.8528 11.4402C9.31322 11.4986 8.60345 11.5 7.55 11.5H6.45C5.39655 11.5 4.68679 11.4986 4.14721 11.4402C3.62634 11.3837 3.38394 11.2839 3.22138 11.1658C3.15484 11.1174 3.0919 11.0645 3.03298 11.0075C3.10126 10.9356 3.16806 10.8649 3.23317 10.7959L3.29772 10.7276C3.55763 10.4525 3.78639 10.2126 4.00232 10.0087C4.22016 9.80294 4.39412 9.66364 4.53524 9.57742C4.63352 9.51738 4.69022 9.49897 4.71275 9.49345C4.76387 9.49804 4.81803 9.51537 4.90343 9.56162C4.96409 9.59447 5.02355 9.63225 5.11802 9.69238L5.12363 9.69595C5.20522 9.74789 5.32771 9.82587 5.46078 9.89278C5.76529 10.0459 6.21427 10.186 6.74977 10.0158C7.21485 9.86796 7.59367 9.52979 7.92525 9.14195C8.91377 7.98571 9.38267 7.80495 9.64941 7.81733C9.7858 7.82366 10.0101 7.884 10.3703 8.14825Z" fill="currentColor"/>
|
|
4
4
|
</svg>`;export{t as imageSvg};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f3 as ut,eU as dt,f8 as Ga,dh as za,a9 as Rt,fS as O,cL as L,e_ as Bt,di as Y,fJ as Mt,bR as fe,fX as qt,dl as Va,c3 as Lt,by as Me,ch as Ge,c0 as kt,fM as $a,a0 as Ot,al as Nt,d5 as V,bX as je,bG as U,B as ze,dg as b,fI as jt,bY as Wa,$ as Ka,fm as re,bN as lt,fV as Ft,fL as Ve,g1 as Ja,b$ as $e,g0 as Ya,eY as x,fj as Q,d0 as Ht,d2 as Ut,gb as Qa,de as pe,d7 as C,aw as Dt,av as $,d3 as _,br as Gt,bs as zt,fQ as Vt,bt as Xa,bu as Za,bv as $t,an as Wt,dd as Kt,ac as Jt,f$ as Yt,f0 as Fe,f9 as Qt,c_ as Xt,cw as Zt,cE as ye,ce as ea,fs as We,bM as ta,f5 as X,cK as P,q as be,bq as Ke,fk as es,cO as me,bp as Je,aD as ts,g4 as as,b2 as ht,fc as aa,c4 as ss,fr as sa,s as he,cV as ns,cQ as na,fh as rs,fH as os,bW as is,cR as cs,g5 as us,cr as ds,bV as Ye,fG as ls,fF as hs,fq as fs,cx as ms,bf as ra,bZ as oa,cZ as qe,cT as gs,aR as ia,A as ca,a as He,bO as ua,T as da,fp as la,fx as ha,b as ps,c as ys,d as bs,e as ws,f as _s,g as Es,h as xs,i as Ts,j as Ss,k as vs,l as Ps,m as Is,n as Cs,o as As,p as Rs,r as Bs,t as Ms,u as qs,v as Ls,w as ks,x as Os,y as Ns,C as js,z as Fs,D as Hs,E as Us,F as Ds,G as Gs,H as zs,I as Vs,J as $s,K as Ws,L as Ks,M as Js,N as Ys,O as Qs,P as Xs,Q as Zs,R as en,S as tn,U as an,W as sn,X as nn,Y as rn,Z as on,_ as cn,a1 as un,a2 as dn,a3 as ln,a4 as hn,a5 as fn,a6 as mn,a7 as gn,a8 as pn,aa as yn,ab as bn,ad as wn,ae as _n,af as En,ag as xn,ah as Tn,ai as Sn,aj as vn,ak as Pn,am as In,ao as Cn,ap as An,aq as Rn,ar as Bn,as as Mn,at as qn,au as Ln,ax as kn,ay as On,az as Nn,aA as jn,aB as Fn,aC as Hn,aE as Un,aF as Dn,aG as Gn,aH as zn,aI as Vn,aJ as $n,aK as Wn,aL as Kn,aM as Jn,aN as Yn,aO as Qn,aP as Xn,aQ as Zn,aS as er,aT as tr,aU as ar,aV as sr,aW as nr,aX as rr,aY as or,aZ as ir,a_ as cr,a$ as ur,b0 as dr,b1 as lr,b3 as hr,b4 as fr,b5 as mr,b6 as gr,b7 as pr,b8 as yr,b9 as br,ba as wr,bb as _r,bc as Er,bd as xr,be as Tr,bg as Sr,bh as vr,bj as Pr,bz as Ir,bA as Cr,bB as Ar,bC as Rr,bD as Br,bE as Mr,bH as qr,bI as Lr,bJ as kr,bP as Or,bT as Nr,bU as jr,b_ as Fr,c1 as Hr,c2 as Ur,c5 as Dr,c6 as Gr,c7 as zr,c8 as Vr,c9 as $r,ca as Wr,cb as Kr,cc as Jr,cd as Yr,cf as Qr,cg as Xr,ci as Zr,cj as eo,ck as to,cl as ao,cm as so,cn as no,co as ft,cp as mt,cq as ro,ct as oo,cu as io,cv as co,cy as uo,cz as lo,cA as ho,cB as fo,cC as mo,cD as go,cF as po,cG as yo,cH as bo,cI as wo,cN as _o,fT as gt,fY as oe,fU as pt,cW as Eo,cX as xo,c$ as To,d1 as So,d4 as vo,d8 as Po,d9 as Io,db as Co,dj as Ao,dn as Ro,dp as Bo,dq as Mo,dr as qo,ds as Lo,dt as ko,du as Oo,dv as No,dw as jo,dx as Fo,dy as Ho,dz as Uo,dA as Do,dB as Go,dC as zo,dD as Vo,dE as $o,dF as Wo,dG as Ko,dH as Jo,dI as Yo,dJ as Qo,dK as Xo,dL as Zo,dM as ei,dN as ti,dO as ai,dP as si,dQ as ni,dR as ri,dS as oi,dT as ii,dU as ci,dV as ui,dW as di,dX as li,dY as hi,dZ as fi,d_ as mi,d$ as gi,e0 as pi,e1 as yi,e2 as bi,e3 as wi,e4 as _i,e5 as Ei,e6 as xi,e7 as Ti,e8 as Si,e9 as vi,ea as Pi,eb as Ii,ec as Ci,ed as Ai,ee as Ri,ef as Bi,eg as Mi,eh as qi,ei as Li,ej as ki,ek as Oi,el as Ni,em as ji,en as Fi,eo as Hi,ep as Ui,eq as Di,er as Gi,es as zi,et as Vi,eu as $i,ev as Wi,ew as Ki,ex as Ji,ey as Yi,ez as Qi,eA as Xi,eB as Zi,eC as ec,eD as tc,eE as ac,eF as sc,eG as nc,eH as rc,eI as oc,eJ as ic,eK as cc,eL as uc,eM as dc,eN as lc,eO as hc,eP as fc,eQ as mc,eR as gc,eS as pc,eT as yc,eV as bc,eW as wc,eX as _c,e$ as Ec,f1 as xc,f2 as Tc,f4 as Sc,f6 as vc,f7 as Pc,fb as Ic,fd as Cc,ff as Ac,fl as Rc,fn as Bc,fo as Mc,fu as qc,fv as yt,fy as Lc,fz as kc,fC as Oc,fK as Nc,fN as jc,fO as Fc,fP as Hc,fR as Uc,fZ as bt,fW as Dc,f_ as Gc,g2 as zc,g6 as Vc,g7 as $c,g9 as Wc,ga as Kc,gc as Jc,bQ as S,cM as Yc,cS as Qc}from"./index-Dnu-MKRv.js";import{d as Xc}from"./index-VqDVSstI.js";import{e as Zc,s as fa,w as ma,b as ga,g as eu,B as tu,W as au,c as su,a as nu,p as wt,n as ru,d as ou,z as iu}from"./parseSignature-D-JHpnlb.js";import{f as cu,s as uu}from"./fallback-B3KlM2jG.js";import{ccipRequest as Ue,offchainLookup as du,offchainLookupAbiItem as lu,offchainLookupSignature as hu}from"./ccip-C808yP8M.js";import{e as fu}from"./events-BBs8RzFy.js";function mu(e,t){for(var a=0;a<t.length;a++){const s=t[a];if(typeof s!="string"&&!Array.isArray(s)){for(const n in s)if(n!=="default"&&!(n in e)){const r=Object.getOwnPropertyDescriptor(s,n);r&&Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>s[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function gu(e){let t;if(typeof e=="string")t=ut(e,{modifiers:dt});else{const a=Ga(e),s=e.length;for(let n=0;n<s;n++){const r=e[n];if(!za(r)){t=ut(r,{modifiers:dt,structs:a});break}}}if(!t)throw new Rt({param:e});return t}function De(e){return!e||typeof e!="object"||!("BYTES_PER_ELEMENT"in e)?!1:e.BYTES_PER_ELEMENT===1&&e.constructor.name==="Uint8Array"}function pu(e){return e.opcode==="CREATE2"?ya(e):pa(e)}function pa(e){const t=O(L(e.from));let a=O(e.nonce);return a[0]===0&&(a=new Uint8Array([])),L(`0x${Y(qt([t,a],"bytes")).slice(26)}`)}function ya(e){const t=O(L(e.from)),a=Bt(De(e.salt)?e.salt:O(e.salt),{size:32}),s="bytecodeHash"in e?De(e.bytecodeHash)?e.bytecodeHash:O(e.bytecodeHash):Y(e.bytecode,"bytes");return L(Mt(Y(fe([O("0xff"),t,a,s])),12))}function yu({batchGateways:e,ccipRequest:t=Ue}){return{async request({data:a,sender:s,urls:n}){if(n.includes(Va))return t({data:a,sender:s,urls:e});{const[r,i]=Lt({abi:Me,functionName:"query",data:await t({data:Ge({abi:Me,functionName:"query",args:[[{sender:s,data:a,urls:n}]]}),sender:s,urls:e})});if(r[0]){let c;try{const o=kt({abi:[...Me,$a],data:i[0]});if(o.errorName==="HttpError")c=new Ot({body:{message:o.args[1]},status:o.args[0],url:n.join(" | ")});else{const d=o.args[0];d&&(c=new Error(d))}}catch{}throw c??new Error("An unknown error occurred.")}return i[0]}}}}function bu({chains:e,id:t}){return e.find(a=>a.id===t)}function Qe(e,t="hex"){const a=(()=>{if(typeof e=="string"){if(e.length>3&&e.length%2!==0)throw new Nt(e);return V(e)}return e})(),s=je(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return ba(s,t)}function ba(e,t="hex"){if(e.bytes.length===0)return t==="hex"?U(e.bytes):e.bytes;const a=e.readByte();if(a<128&&e.decrementPosition(1),a<192){const n=_t(e,a,128),r=e.readBytes(n);return t==="hex"?U(r):r}const s=_t(e,a,192);return wu(e,s,t)}function _t(e,t,a){if(a===128&&t<128)return 1;if(t<=a+55)return t-a;if(t===a+55+1)return e.readUint8();if(t===a+55+2)return e.readUint16();if(t===a+55+3)return e.readUint24();if(t===a+55+4)return e.readUint32();throw new ze("Invalid RLP prefix")}function wu(e,t,a){const s=e.position,n=[];for(;e.position-s<t;)n.push(ba(e,a));return n}function wa(e){return b(e)&&jt(e)===32}const _u=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),_a=Uint8Array.from(new Array(16).fill(0).map((e,t)=>t)),Eu=_a.map(e=>(9*e+5)%16),Ea=(()=>{const a=[[_a],[Eu]];for(let s=0;s<4;s++)for(let n of a)n.push(n[s].map(r=>_u[r]));return a})(),xa=Ea[0],Ta=Ea[1],Sa=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>Uint8Array.from(e)),xu=xa.map((e,t)=>e.map(a=>Sa[t][a])),Tu=Ta.map((e,t)=>e.map(a=>Sa[t][a])),Su=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),vu=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function Et(e,t,a,s){return e===0?t^a^s:e===1?t&a|~t&s:e===2?(t|~a)^s:e===3?t&s|a&~s:t^(a|~s)}const ie=new Uint32Array(16);class Pu extends Ka{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:t,h1:a,h2:s,h3:n,h4:r}=this;return[t,a,s,n,r]}set(t,a,s,n,r){this.h0=t|0,this.h1=a|0,this.h2=s|0,this.h3=n|0,this.h4=r|0}process(t,a){for(let u=0;u<16;u++,a+=4)ie[u]=t.getUint32(a,!0);let s=this.h0|0,n=s,r=this.h1|0,i=r,c=this.h2|0,o=c,d=this.h3|0,m=d,h=this.h4|0,l=h;for(let u=0;u<5;u++){const f=4-u,g=Su[u],y=vu[u],E=xa[u],w=Ta[u],v=xu[u],A=Tu[u];for(let T=0;T<16;T++){const p=re(s+Et(u,r,c,d)+ie[E[T]]+g,v[T])+h|0;s=h,h=d,d=re(c,10)|0,c=r,r=p}for(let T=0;T<16;T++){const p=re(n+Et(f,i,o,m)+ie[w[T]]+y,A[T])+l|0;n=l,l=m,m=re(o,10)|0,o=i,i=p}}this.set(this.h1+c+m|0,this.h2+d+l|0,this.h3+h+n|0,this.h4+s+i|0,this.h0+r+o|0)}roundClean(){lt(ie)}destroy(){this.destroyed=!0,lt(this.buffer),this.set(0,0,0,0,0)}}const Iu=Wa(()=>new Pu),Cu=Iu;function Au(e,t){const a=t||"hex",s=Cu(b(e,{strict:!1})?O(e):e);return a==="bytes"?s:Ft(s)}function va(e){return Ve(e,-32)===Zc}function Pa(e){return Ja(e)}function Ru(e){if(!va(e))return{signature:e};const[t,a,s]=$e([{type:"address"},{type:"bytes"},{type:"bytes"}],e);return{address:t,data:a,signature:s}}function Bu(e){if(!Pa(e))return{signature:e};const{authorization:t,to:a,...s}=Ya(e);return{authorization:{address:t.address,chainId:t.chainId,nonce:Number(t.nonce),r:x(t.r,{size:32}),s:x(t.s,{size:32}),yParity:t.yParity},...a?{address:a}:{},...s}}async function Ia({message:e,signature:t}){return Q({hash:Ht(e),signature:t})}async function Ca(e){const{domain:t,message:a,primaryType:s,signature:n,types:r}=e;return Q({hash:Ut({domain:t,message:a,primaryType:s,types:r}),signature:n})}function Mu(e){const{address:t,data:a,signature:s,to:n="hex"}=e,r=Qa({authorization:{address:e.authorization.address,chainId:e.authorization.chainId,nonce:BigInt(e.authorization.nonce),r:BigInt(e.authorization.r),s:BigInt(e.authorization.s),yParity:e.authorization.yParity},data:a,signature:s,to:t});return n==="hex"?r:V(r)}async function qu({address:e,hash:t,signature:a}){return pe(L(e),await Q({hash:t,signature:a}))}async function Lu({address:e,message:t,signature:a}){return pe(L(e),await Ia({message:t,signature:a}))}async function ku(e){const{address:t,domain:a,message:s,primaryType:n,signature:r,types:i}=e;return pe(L(t),await Ca({domain:a,message:s,primaryType:n,signature:r,types:i}))}function Aa(e){const t=Ve(e,0,1);if(t==="0x04")return"eip7702";if(t==="0x03")return"eip4844";if(t==="0x02")return"eip1559";if(t==="0x01")return"eip2930";if(t!=="0x"&&C(t)>=192)return"legacy";throw new Dt({serializedType:t})}function Ra(e){const t=Aa(e);return t==="eip1559"?ju(e):t==="eip2930"?Fu(e):t==="eip4844"?Nu(e):t==="eip7702"?Ou(e):Hu(e)}function Ou(e){const t=we(e),[a,s,n,r,i,c,o,d,m,h,l,u,f]=t;if(t.length!==10&&t.length!==13)throw new $({attributes:{chainId:a,nonce:s,maxPriorityFeePerGas:n,maxFeePerGas:r,gas:i,to:c,value:o,data:d,accessList:m,authorizationList:h,...t.length>9?{v:l,r:u,s:f}:{}},serializedTransaction:e,type:"eip7702"});const g={chainId:C(a),type:"eip7702"};return b(c)&&c!=="0x"&&(g.to=c),b(i)&&i!=="0x"&&(g.gas=_(i)),b(d)&&d!=="0x"&&(g.data=d),b(s)&&(g.nonce=s==="0x"?0:C(s)),b(o)&&o!=="0x"&&(g.value=_(o)),b(r)&&r!=="0x"&&(g.maxFeePerGas=_(r)),b(n)&&n!=="0x"&&(g.maxPriorityFeePerGas=_(n)),m.length!==0&&m!=="0x"&&(g.accessList=_e(m)),h.length!==0&&h!=="0x"&&(g.authorizationList=Uu(h)),Za(g),{...t.length===13?Z(t):void 0,...g}}function Nu(e){const t=we(e),a=t.length===4,s=a?t[0]:t,n=a?t.slice(1):[],[r,i,c,o,d,m,h,l,u,f,g,y,E,w]=s,[v,A,T]=n;if(!(s.length===11||s.length===14))throw new $({attributes:{chainId:r,nonce:i,maxPriorityFeePerGas:c,maxFeePerGas:o,gas:d,to:m,value:h,data:l,accessList:u,...s.length>9?{v:y,r:E,s:w}:{}},serializedTransaction:e,type:"eip4844"});const p={blobVersionedHashes:g,chainId:C(r),to:m,type:"eip4844"};return b(d)&&d!=="0x"&&(p.gas=_(d)),b(l)&&l!=="0x"&&(p.data=l),b(i)&&(p.nonce=i==="0x"?0:C(i)),b(h)&&h!=="0x"&&(p.value=_(h)),b(f)&&f!=="0x"&&(p.maxFeePerBlobGas=_(f)),b(o)&&o!=="0x"&&(p.maxFeePerGas=_(o)),b(c)&&c!=="0x"&&(p.maxPriorityFeePerGas=_(c)),u.length!==0&&u!=="0x"&&(p.accessList=_e(u)),v&&A&&T&&(p.sidecars=Vt({blobs:v,commitments:A,proofs:T})),Xa(p),{...s.length===14?Z(s):void 0,...p}}function ju(e){const t=we(e),[a,s,n,r,i,c,o,d,m,h,l,u]=t;if(!(t.length===9||t.length===12))throw new $({attributes:{chainId:a,nonce:s,maxPriorityFeePerGas:n,maxFeePerGas:r,gas:i,to:c,value:o,data:d,accessList:m,...t.length>9?{v:h,r:l,s:u}:{}},serializedTransaction:e,type:"eip1559"});const f={chainId:C(a),type:"eip1559"};return b(c)&&c!=="0x"&&(f.to=c),b(i)&&i!=="0x"&&(f.gas=_(i)),b(d)&&d!=="0x"&&(f.data=d),b(s)&&(f.nonce=s==="0x"?0:C(s)),b(o)&&o!=="0x"&&(f.value=_(o)),b(r)&&r!=="0x"&&(f.maxFeePerGas=_(r)),b(n)&&n!=="0x"&&(f.maxPriorityFeePerGas=_(n)),m.length!==0&&m!=="0x"&&(f.accessList=_e(m)),Gt(f),{...t.length===12?Z(t):void 0,...f}}function Fu(e){const t=we(e),[a,s,n,r,i,c,o,d,m,h,l]=t;if(!(t.length===8||t.length===11))throw new $({attributes:{chainId:a,nonce:s,gasPrice:n,gas:r,to:i,value:c,data:o,accessList:d,...t.length>8?{v:m,r:h,s:l}:{}},serializedTransaction:e,type:"eip2930"});const u={chainId:C(a),type:"eip2930"};return b(i)&&i!=="0x"&&(u.to=i),b(r)&&r!=="0x"&&(u.gas=_(r)),b(o)&&o!=="0x"&&(u.data=o),b(s)&&(u.nonce=s==="0x"?0:C(s)),b(c)&&c!=="0x"&&(u.value=_(c)),b(n)&&n!=="0x"&&(u.gasPrice=_(n)),d.length!==0&&d!=="0x"&&(u.accessList=_e(d)),zt(u),{...t.length===11?Z(t):void 0,...u}}function Hu(e){const t=Qe(e,"hex"),[a,s,n,r,i,c,o,d,m]=t;if(!(t.length===6||t.length===9))throw new $({attributes:{nonce:a,gasPrice:s,gas:n,to:r,value:i,data:c,...t.length>6?{v:o,r:d,s:m}:{}},serializedTransaction:e,type:"legacy"});const h={type:"legacy"};if(b(r)&&r!=="0x"&&(h.to=r),b(n)&&n!=="0x"&&(h.gas=_(n)),b(c)&&c!=="0x"&&(h.data=c),b(a)&&(h.nonce=a==="0x"?0:C(a)),b(i)&&i!=="0x"&&(h.value=_(i)),b(s)&&s!=="0x"&&(h.gasPrice=_(s)),$t(h),t.length===6)return h;const l=b(o)&&o!=="0x"?_(o):0n;if(m==="0x"&&d==="0x")return l>0&&(h.chainId=Number(l)),h;const u=l,f=Number((u-35n)/2n);if(f>0)h.chainId=f;else if(u!==27n&&u!==28n)throw new Wt({v:u});return h.v=u,h.s=m,h.r=d,h.yParity=u%2n===0n?1:0,h}function we(e){return Qe(`0x${e.slice(4)}`,"hex")}function _e(e){const t=[];for(let a=0;a<e.length;a++){const[s,n]=e[a];if(!Kt(s,{strict:!1}))throw new Jt({address:s});t.push({address:s,storageKeys:n.map(r=>wa(r)?r:Yt(r))})}return t}function Uu(e){const t=[];for(let a=0;a<e.length;a++){const[s,n,r,i,c,o]=e[a];t.push({address:n,chainId:s==="0x"?0:C(s),nonce:r==="0x"?0:C(r),...Z([i,c,o])})}return t}function Z(e){const t=e.slice(-3),a=t[0]==="0x"||_(t[0])===0n?27n:28n;return{r:Fe(t[1],{size:32}),s:Fe(t[2],{size:32}),v:a,yParity:a===27n?0:1}}function Du(e,t="wei"){return Qt(e,Xt[t])}async function Gu(e,{hash:t}){await e.request({method:`${e.mode}_dropTransaction`,params:[t]})}async function zu(e){return e.request({method:`${e.mode}_dumpState`})}async function Vu(e){return e.mode==="ganache"?await e.request({method:"eth_mining"}):await e.request({method:`${e.mode}_getAutomine`})}async function $u(e){return await e.request({method:"txpool_content"})}async function Wu(e){const{pending:t,queued:a}=await e.request({method:"txpool_status"});return{pending:C(t),queued:C(a)}}async function Ku(e,{address:t}){await e.request({method:`${e.mode}_impersonateAccount`,params:[t]})}async function Ju(e,{seconds:t}){return await e.request({method:"evm_increaseTime",params:[x(t)]})}async function Yu(e){return await e.request({method:"txpool_inspect"})}async function Qu(e,{state:t}){await e.request({method:`${e.mode}_loadState`,params:[t]})}async function Xu(e,{blocks:t,interval:a}){e.mode==="ganache"?await e.request({method:"evm_mine",params:[{blocks:x(t)}]}):await e.request({method:`${e.mode}_mine`,params:[x(t),x(a||0)]})}async function Zu(e){await e.request({method:`${e.mode}_removeBlockTimestampInterval`})}async function ed(e,{blockNumber:t,jsonRpcUrl:a}={}){await e.request({method:`${e.mode}_reset`,params:[{forking:{blockNumber:Number(t),jsonRpcUrl:a}}]})}async function td(e,{id:t}){await e.request({method:"evm_revert",params:[t]})}async function ad(e,t){var E,w,v;const{accessList:a,data:s,from:n,gas:r,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:o,nonce:d,to:m,value:h,...l}=t,u=(v=(w=(E=e.chain)==null?void 0:E.formatters)==null?void 0:w.transactionRequest)==null?void 0:v.format,g=(u||ye)({...Zt(l,{format:u}),accessList:a,data:s,from:n,gas:r,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:o,nonce:d,to:m,value:h},"sendUnsignedTransaction");return await e.request({method:"eth_sendUnsignedTransaction",params:[g]})}async function sd(e,t){e.mode==="ganache"?t?await e.request({method:"miner_start"}):await e.request({method:"miner_stop"}):await e.request({method:"evm_setAutomine",params:[t]})}async function nd(e,{address:t,value:a}){e.mode==="ganache"?await e.request({method:"evm_setAccountBalance",params:[t,x(a)]}):await e.request({method:`${e.mode}_setBalance`,params:[t,x(a)]})}async function rd(e,{gasLimit:t}){await e.request({method:"evm_setBlockGasLimit",params:[x(t)]})}async function od(e,{interval:t}){const a=e.mode==="hardhat"?t*1e3:t;await e.request({method:`${e.mode}_setBlockTimestampInterval`,params:[a]})}async function id(e,{address:t,bytecode:a}){e.mode==="ganache"?await e.request({method:"evm_setAccountCode",params:[t,a]}):await e.request({method:`${e.mode}_setCode`,params:[t,a]})}async function cd(e,{address:t}){await e.request({method:`${e.mode}_setCoinbase`,params:[t]})}async function ud(e,{interval:t}){const a=e.mode==="hardhat"?t*1e3:t;await e.request({method:"evm_setIntervalMining",params:[a]})}async function dd(e,t){await e.request({method:`${e.mode}_setLoggingEnabled`,params:[t]})}async function ld(e,{gasPrice:t}){await e.request({method:`${e.mode}_setMinGasPrice`,params:[x(t)]})}async function hd(e,{baseFeePerGas:t}){await e.request({method:`${e.mode}_setNextBlockBaseFeePerGas`,params:[x(t)]})}async function fd(e,{timestamp:t}){await e.request({method:"evm_setNextBlockTimestamp",params:[x(t)]})}async function md(e,{address:t,nonce:a}){await e.request({method:`${e.mode}_setNonce`,params:[t,x(a)]})}async function gd(e,t){await e.request({method:`${e.mode}_setRpcUrl`,params:[t]})}async function pd(e,{address:t,index:a,value:s}){await e.request({method:`${e.mode}_setStorageAt`,params:[t,typeof a=="number"?x(a):a,s]})}async function yd(e){return await e.request({method:"evm_snapshot"})}async function bd(e,{address:t}){await e.request({method:`${e.mode}_stopImpersonatingAccount`,params:[t]})}async function wd(e,{chain:t}){const{id:a,name:s,nativeCurrency:n,rpcUrls:r,blockExplorers:i}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:x(a),chainName:s,nativeCurrency:n,rpcUrls:r.default.http,blockExplorerUrls:i?Object.values(i).map(({url:c})=>c):void 0}]},{dedupe:!0,retryCount:0})}function _d(e,t){const{abi:a,args:s,bytecode:n,...r}=t,i=ea({abi:a,args:s,bytecode:n});return We(e,{...r,...r.authorizationList?{to:null}:{},data:i})}async function Ed(e){var a;return((a=e.account)==null?void 0:a.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(s=>ta(s))}async function xd(e,t={}){const{account:a=e.account,chainId:s}=t,n=a?X(a):void 0,r=s?[n==null?void 0:n.address,[x(s)]]:[n==null?void 0:n.address],i=await e.request({method:"wallet_getCapabilities",params:r}),c={};for(const[o,d]of Object.entries(i)){c[Number(o)]={};for(let[m,h]of Object.entries(d))m==="addSubAccount"&&(m="unstable_addSubAccount"),c[Number(o)][m]=h}return typeof s=="number"?c[s]:c}async function Td(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function Sd(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>L(a))}async function vd(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function Pd(e,t){const{chain:a=e.chain}=t,s=t.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),n=await P(e,fa,"sendCalls")(t);return await P(e,ma,"waitForCallsStatus")({...t,id:n.id,timeout:s})}const Le=new ts(128);async function Ba(e,t){var tt,at,st,nt,rt,ot;const{account:a=e.account,assertChainId:s=!0,chain:n=e.chain,accessList:r,authorizationList:i,blobs:c,data:o,dataSuffix:d=typeof e.dataSuffix=="string"?e.dataSuffix:(tt=e.dataSuffix)==null?void 0:tt.value,gas:m,gasPrice:h,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:g,pollingInterval:y,throwOnReceiptRevert:E,type:w,value:v,...A}=t,T=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof a>"u")throw new be({docsPath:"/docs/actions/wallet/sendTransactionSync"});const p=a?X(a):null;let I;try{Ke(t);const N=await(async()=>{if(t.to)return t.to;if(t.to!==null&&i&&i.length>0)return await es({authorization:i[0]}).catch(()=>{throw new ze("`to` is required. Could not infer from `authorizationList`.")})})();if((p==null?void 0:p.type)==="json-rpc"||p===null){let K;n!==null&&(K=await P(e,me,"getChainId")({}),s&&Je({currentChainId:K,chain:n}));const se=(nt=(st=(at=e.chain)==null?void 0:at.formatters)==null?void 0:st.transactionRequest)==null?void 0:nt.format,J=(se||ye)({...Zt(A,{format:se}),accessList:r,account:p,authorizationList:i,blobs:c,chainId:K,data:d?fe([o??"0x",d]):o,gas:m,gasPrice:h,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:g,to:N,type:w,value:v},"sendTransaction"),ne=Le.get(e.uid),Ua=ne?"wallet_sendTransaction":"eth_sendTransaction",Da=await(async()=>{try{return await e.request({method:Ua,params:[J]},{retryCount:0})}catch(ct){if(ne===!1)throw ct;const F=ct;if(F.name==="InvalidInputRpcError"||F.name==="InvalidParamsRpcError"||F.name==="MethodNotFoundRpcError"||F.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[J]},{retryCount:0}).then(Re=>(Le.set(e.uid,!0),Re)).catch(Re=>{const Be=Re;throw Be.name==="MethodNotFoundRpcError"||Be.name==="MethodNotSupportedRpcError"?(Le.set(e.uid,!1),F):Be});throw F}})(),Ae=await P(e,as,"waitForTransactionReceipt")({checkReplacement:!1,hash:Da,pollingInterval:y,timeout:T});if(E&&Ae.status==="reverted")throw new ht({receipt:Ae});return Ae}if((p==null?void 0:p.type)==="local"){if(p.nonceManager&&typeof g>"u"){const J=A.chainId,ne=await(async()=>typeof J=="number"?J:n?n.id:P(e,me,"getChainId")({}))();I={address:p.address,chainId:ne}}const K=await P(e,aa,"prepareTransactionRequest")({account:p,accessList:r,authorizationList:i,blobs:c,chain:n,data:d?fe([o??"0x",d]):o,gas:m,gasPrice:h,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:g,nonceManager:p.nonceManager,parameters:[...ss,"sidecars"],type:w,value:v,...A,to:N}),se=(rt=n==null?void 0:n.serializers)==null?void 0:rt.transaction,it=await p.signTransaction(K,{serializer:se});return await P(e,sa,"sendRawTransactionSync")({serializedTransaction:it,throwOnReceiptRevert:E,timeout:t.timeout})}throw(p==null?void 0:p.type)==="smart"?new he({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new he({docsPath:"/docs/actions/wallet/sendTransactionSync",type:p==null?void 0:p.type})}catch(N){throw N instanceof he?N:(I&&!(N instanceof ht)&&((ot=p==null?void 0:p.nonceManager)==null||ot.reset(I)),ns(N,{...t,account:p,chain:t.chain||void 0}))}}async function Id(e,t){const{id:a}=t;await e.request({method:"wallet_showCallsStatus",params:[a]})}async function Cd(e,t){const{account:a=e.account}=t;if(!a)throw new be({docsPath:"/docs/eip7702/signAuthorization"});const s=X(a);if(!s.signAuthorization)throw new he({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:s.type});const n=await ga(e,t);return s.signAuthorization(n)}async function Ad(e,t){var d,m,h,l;const{account:a=e.account,chain:s=e.chain,...n}=t;if(!a)throw new be({docsPath:"/docs/actions/wallet/signTransaction"});const r=X(a);Ke({account:r,...t});const i=await P(e,me,"getChainId")({});s!==null&&Je({currentChainId:i,chain:s});const c=(s==null?void 0:s.formatters)||((d=e.chain)==null?void 0:d.formatters),o=((m=c==null?void 0:c.transactionRequest)==null?void 0:m.format)||ye;return r.signTransaction?r.signTransaction({...n,account:r,chainId:i},{serializer:(l=(h=e.chain)==null?void 0:h.serializers)==null?void 0:l.transaction}):await e.request({method:"eth_signTransaction",params:[{...o({...n,account:r},"signTransaction"),chainId:x(i),from:r.address}]},{retryCount:0})}async function Rd(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:x(t)}]},{retryCount:0})}async function Bd(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function D(e,t){return D.internal(e,We,"sendTransaction",t)}(function(e){async function t(a,s,n,r){const{abi:i,account:c=a.account,address:o,args:d,functionName:m,...h}=r;if(typeof c>"u")throw new be({docsPath:"/docs/contract/writeContract"});const l=c?X(c):null,u=Ge({abi:i,args:d,functionName:m});try{return await P(a,s,n)({data:u,to:o,account:l,...h})}catch(f){throw na(f,{abi:i,address:o,args:d,docsPath:"/docs/contract/writeContract",functionName:m,sender:l==null?void 0:l.address})}}e.internal=t})(D||(D={}));async function Md(e,t){return D.internal(e,Ba,"sendTransactionSync",t)}function qd({abi:e,address:t,client:a}){const s=a,[n,r]=s?"public"in s&&"wallet"in s?[s.public,s.wallet]:"public"in s?[s.public,void 0]:"wallet"in s?[void 0,s.wallet]:[s,s]:[void 0,void 0],i=n!=null,c=r!=null,o={};let d=!1,m=!1,h=!1;for(const l of e)if(l.type==="function"?l.stateMutability==="view"||l.stateMutability==="pure"?d=!0:m=!0:l.type==="event"&&(h=!0),d&&m&&h)break;return i&&(d&&(o.read=new Proxy({},{get(l,u){return(...f)=>{const{args:g,options:y}=ce(f);return P(n,rs,"readContract")({abi:e,address:t,functionName:u,args:g,...y})}}})),m&&(o.simulate=new Proxy({},{get(l,u){return(...f)=>{const{args:g,options:y}=ce(f);return P(n,os,"simulateContract")({abi:e,address:t,functionName:u,args:g,...y})}}})),h&&(o.createEventFilter=new Proxy({},{get(l,u){return(...f)=>{const g=e.find(w=>w.type==="event"&&w.name===u),{args:y,options:E}=ke(f,g);return P(n,is,"createContractEventFilter")({abi:e,address:t,eventName:u,args:y,...E})}}}),o.getEvents=new Proxy({},{get(l,u){return(...f)=>{const g=e.find(w=>w.type==="event"&&w.name===u),{args:y,options:E}=ke(f,g);return P(n,cs,"getContractEvents")({abi:e,address:t,eventName:u,args:y,...E})}}}),o.watchEvent=new Proxy({},{get(l,u){return(...f)=>{const g=e.find(w=>w.type==="event"&&w.name===u),{args:y,options:E}=ke(f,g);return P(n,us,"watchContractEvent")({abi:e,address:t,eventName:u,args:y,...E})}}}))),c&&m&&(o.write=new Proxy({},{get(l,u){return(...f)=>{const{args:g,options:y}=ce(f);return P(r,D,"writeContract")({abi:e,address:t,functionName:u,args:g,...y})}}})),(i||c)&&m&&(o.estimateGas=new Proxy({},{get(l,u){return(...f)=>{const{args:g,options:y}=ce(f);return P(n??r,ds,"estimateContractGas")({abi:e,address:t,functionName:u,args:g,...y,account:y.account??r.account})}}})),o.address=t,o.abi=e,o}function ce(e){const t=e.length&&Array.isArray(e[0]),a=t?e[0]:[],s=(t?e[1]:e[0])??{};return{args:a,options:s}}function ke(e,t){let a=!1;Array.isArray(e[0])?a=!0:e.length===1?a=t.inputs.some(r=>r.indexed):e.length===2&&(a=!0);const s=a?e[0]:void 0,n=(a?e[1]:e[0])??{};return{args:s,options:n}}function Ma({mode:e}){return t=>{const a=t.extend(()=>({mode:e}));return{dropTransaction:s=>Gu(a,s),dumpState:()=>zu(a),getAutomine:()=>Vu(a),getTxpoolContent:()=>$u(a),getTxpoolStatus:()=>Wu(a),impersonateAccount:s=>Ku(a,s),increaseTime:s=>Ju(a,s),inspectTxpool:()=>Yu(a),loadState:s=>Qu(a,s),mine:s=>Xu(a,s),removeBlockTimestampInterval:()=>Zu(a),reset:s=>ed(a,s),revert:s=>td(a,s),sendUnsignedTransaction:s=>ad(a,s),setAutomine:s=>sd(a,s),setBalance:s=>nd(a,s),setBlockGasLimit:s=>rd(a,s),setBlockTimestampInterval:s=>od(a,s),setCode:s=>id(a,s),setCoinbase:s=>cd(a,s),setIntervalMining:s=>ud(a,s),setLoggingEnabled:s=>dd(a,s),setMinGasPrice:s=>ld(a,s),setNextBlockBaseFeePerGas:s=>hd(a,s),setNextBlockTimestamp:s=>fd(a,s),setNonce:s=>md(a,s),setRpcUrl:s=>gd(a,s),setStorageAt:s=>pd(a,s),snapshot:()=>yd(a),stopImpersonatingAccount:s=>bd(a,s)}}}function Ld(e){const{key:t="test",name:a="Test Client",mode:s}=e;return Ye({...e,key:t,name:a,type:"testClient"}).extend(r=>({mode:s,...Ma({mode:s})(r)}))}function qa(e){return{addChain:t=>wd(e,t),deployContract:t=>_d(e,t),fillTransaction:t=>ms(e,t),getAddresses:()=>Ed(e),getCallsStatus:t=>eu(e,t),getCapabilities:t=>xd(e,t),getChainId:()=>me(e),getPermissions:()=>Td(e),prepareAuthorization:t=>ga(e,t),prepareTransactionRequest:t=>aa(e,t),requestAddresses:()=>Sd(e),requestPermissions:t=>vd(e,t),sendCalls:t=>fa(e,t),sendCallsSync:t=>Pd(e,t),sendRawTransaction:t=>fs(e,t),sendRawTransactionSync:t=>sa(e,t),sendTransaction:t=>We(e,t),sendTransactionSync:t=>Ba(e,t),showCallsStatus:t=>Id(e,t),signAuthorization:t=>Cd(e,t),signMessage:t=>hs(e,t),signTransaction:t=>Ad(e,t),signTypedData:t=>ls(e,t),switchChain:t=>Rd(e,t),waitForCallsStatus:t=>ma(e,t),watchAsset:t=>Bd(e,t),writeContract:t=>D(e,t),writeContractSync:t=>Md(e,t)}}function kd(e){const{key:t="wallet",name:a="Wallet Client",transport:s}=e;return Ye({...e,key:t,name:a,transport:s,type:"walletClient"}).extend(qa)}function Od(e,t={}){const{keepAlive:a,key:s="webSocket",methods:n,name:r="WebSocket JSON-RPC",reconnect:i,retryDelay:c}=t;return({chain:o,retryCount:d,timeout:m})=>{var g;const h=t.retryCount??d,l=m??t.timeout??1e4,u=e||((g=o==null?void 0:o.rpcUrls.default.webSocket)==null?void 0:g[0]),f={keepAlive:a,reconnect:i};if(!u)throw new ra;return oa({key:s,methods:n,name:r,async request({method:y,params:E}){const w={method:y,params:E},v=await qe(u,f),{error:A,result:T}=await v.requestAsync({body:w,timeout:l});if(A)throw new ia({body:w,error:A,url:u});return T},retryCount:h,retryDelay:c,timeout:l,type:"webSocket"},{getSocket(){return gs(u)},getRpcClient(){return qe(u,f)},async subscribe({params:y,onData:E,onError:w}){const v=await qe(u,f),{result:A}=await new Promise((T,p)=>v.request({body:{method:"eth_subscribe",params:y},onError(I){p(I),w==null||w(I)},onResponse(I){if(I.error){p(I.error),w==null||w(I.error);return}if(typeof I.id=="number"){T(I);return}I.method==="eth_subscription"&&E(I.params)}}));return{subscriptionId:A,async unsubscribe(){return new Promise(T=>v.request({body:{method:"eth_unsubscribe",params:[A]},onResponse:T}))}}}})}}class Nd extends Error{constructor(t,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t,this.details=a}}const Oe="/docs/contract/decodeDeployData";function jd(e){const{abi:t,bytecode:a,data:s}=e;if(s===a)return{bytecode:a};const n=t.find(i=>"type"in i&&i.type==="constructor");if(!n)throw new ca({docsPath:Oe});if(!("inputs"in n))throw new He({docsPath:Oe});if(!n.inputs||n.inputs.length===0)throw new He({docsPath:Oe});return{args:$e(n.inputs,`0x${s.replace(a,"")}`),bytecode:a}}function Fd(e){const t=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),a=typeof e.blobs[0]=="string"?e.blobs.map(c=>V(c)):e.blobs,s=a.reduce((c,o)=>c+o.length,0),n=je(new Uint8Array(s));let r=!0;for(const c of a){const o=je(c);for(;r&&o.position<c.length;){o.incrementPosition(1);let d=31;c.length-o.position<31&&(d=c.length-o.position);for(const m in Array.from({length:d})){const h=o.readByte();if(h===128&&!o.inspectBytes(o.remaining).includes(128)){r=!1;break}n.pushByte(h)}}}const i=n.bytes.slice(0,n.position);return t==="hex"?U(i):i}function Hd(e){const{sidecars:t,version:a}=e,s=e.to??(typeof t[0].blob=="string"?"hex":"bytes"),n=[];for(const{commitment:r}of t)n.push(ua({commitment:r,to:s,version:a}));return n}const Ud=2147483648;function Dd(e){if(e===1)return 60n;if(e>=Ud||e<0)throw new da({chainId:e});return BigInt((2147483648|e)>>>0)}function La({blobToKzgCommitment:e,computeBlobKzgProof:t}){return{blobToKzgCommitment:e,computeBlobKzgProof:t}}function Gd(e,t){try{e.loadTrustedSetup(t)}catch(a){const s=a;if(!s.message.includes("trusted setup is already loaded"))throw s}return La(e)}function zd({r:e,yParityAndS:t}){const a=V(t),s=a[0]&128?1:0,n=a;return s===1&&(n[0]&=127),{r:e,s:U(n),yParity:s}}function xt(e){const{r:t,s:a}=la.Signature.fromCompact(e.slice(2,130));return{r:x(t,{size:32}),yParityAndS:x(a,{size:32})}}async function Vd(e){const{serializedTransaction:t,signature:a}=e,s=Ra(t),n=a??{r:s.r,s:s.s,v:s.v,yParity:s.yParity},r=ha({...s,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await Q({hash:Y(r),signature:n})}function Tt({r:e,yParityAndS:t}){return`0x${new la.Signature(_(e),_(t)).toCompactHex()}`}function $d(e){const{r:t,s:a,v:s,yParity:n}=e,r=Number(n??s-27n);let i=a;if(r===1){const c=V(a);c[0]|=128,i=U(c)}return{r:t,yParityAndS:i}}const Wd=Object.freeze(Object.defineProperty({__proto__:null,AbiConstructorNotFoundError:ca,AbiConstructorParamsNotFoundError:He,AbiDecodingDataSizeInvalidError:ps,AbiDecodingDataSizeTooSmallError:ys,AbiDecodingZeroDataError:bs,AbiEncodingArrayLengthMismatchError:ws,AbiEncodingBytesSizeMismatchError:_s,AbiEncodingLengthMismatchError:Es,AbiErrorInputsNotFoundError:xs,AbiErrorNotFoundError:Ts,AbiErrorSignatureNotFoundError:Ss,AbiEventNotFoundError:vs,AbiEventSignatureEmptyTopicsError:Ps,AbiEventSignatureNotFoundError:Is,AbiFunctionNotFoundError:Cs,AbiFunctionOutputsNotFoundError:As,AbiFunctionSignatureNotFoundError:Rs,AccountStateConflictError:Bs,AtomicReadyWalletRejectedUpgradeError:Ms,AtomicityNotSupportedError:qs,BaseError:ze,BaseFeeScalarError:Ls,BlockNotFoundError:ks,BundleFailedError:tu,BundleTooLargeError:Os,BytesSizeMismatchError:Ns,CallExecutionError:js,ChainDisconnectedError:Fs,ChainDoesNotSupportContract:Hs,ChainMismatchError:Us,ChainNotFoundError:Ds,CircularReferenceError:Gs,ClientChainNotConfiguredError:zs,ContractFunctionExecutionError:Vs,ContractFunctionRevertedError:$s,ContractFunctionZeroDataError:Ws,CounterfactualDeploymentFailedError:Ks,DecodeLogDataMismatch:Js,DecodeLogTopicsMismatch:Ys,DuplicateIdError:Qs,EIP1193ProviderRpcError:Nd,Eip1559FeesNotSupportedError:Xs,EnsAvatarInvalidNftUriError:Zs,EnsAvatarUnsupportedNamespaceError:en,EnsAvatarUriResolutionError:tn,EnsInvalidChainIdError:da,EstimateGasExecutionError:an,ExecutionRevertedError:sn,FeeCapTooHighError:nn,FeeCapTooLowError:rn,FeeConflictError:on,FilterTypeNotSupportedError:cn,HttpRequestError:Ot,InsufficientFundsError:un,IntegerOutOfRangeError:dn,InternalRpcError:ln,IntrinsicGasTooHighError:hn,IntrinsicGasTooLowError:fn,InvalidAbiDecodingTypeError:mn,InvalidAbiEncodingTypeError:gn,InvalidAbiItemError:pn,InvalidAbiParameterError:Rt,InvalidAbiParametersError:yn,InvalidAbiTypeParameterError:bn,InvalidAddressError:Jt,InvalidArrayError:wn,InvalidBytesBooleanError:_n,InvalidChainIdError:En,InvalidDecimalNumberError:xn,InvalidDefinitionTypeError:Tn,InvalidDomainError:Sn,InvalidFunctionModifierError:vn,InvalidHexBooleanError:Pn,InvalidHexValueError:Nt,InvalidInputRpcError:In,InvalidLegacyVError:Wt,InvalidModifierError:Cn,InvalidParameterError:An,InvalidParamsRpcError:Rn,InvalidParenthesisError:Bn,InvalidPrimaryTypeError:Mn,InvalidRequestRpcError:qn,InvalidSerializableTransactionError:Ln,InvalidSerializedTransactionError:$,InvalidSerializedTransactionTypeError:Dt,InvalidSignatureError:kn,InvalidStorageKeySizeError:On,InvalidStructSignatureError:Nn,InvalidStructTypeError:jn,JsonRpcVersionUnsupportedError:Fn,LimitExceededRpcError:Hn,MaxFeePerGasTooLowError:Un,MethodNotFoundRpcError:Dn,MethodNotSupportedRpcError:Gn,NonceMaxValueError:zn,NonceTooHighError:Vn,NonceTooLowError:$n,ParseRpcError:Wn,ProviderDisconnectedError:Kn,ProviderRpcError:Jn,RawContractError:Yn,ResourceNotFoundRpcError:Qn,ResourceUnavailableRpcError:Xn,RpcError:Zn,RpcRequestError:ia,SizeExceedsPaddingSizeError:er,SizeOverflowError:tr,SliceOffsetOutOfBoundsError:ar,SocketClosedError:sr,SolidityProtectedKeywordError:nr,StateAssignmentConflictError:rr,SwitchChainError:or,TimeoutError:ir,TipAboveFeeCapError:cr,TransactionExecutionError:ur,TransactionNotFoundError:dr,TransactionReceiptNotFoundError:lr,TransactionRejectedRpcError:hr,TransactionTypeNotSupportedError:fr,UnauthorizedProviderError:mr,UnknownBundleIdError:gr,UnknownNodeError:pr,UnknownRpcError:yr,UnknownSignatureError:br,UnknownTypeError:wr,UnsupportedChainIdError:_r,UnsupportedNonOptionalCapabilityError:Er,UnsupportedPackedAbiType:xr,UnsupportedProviderMethodError:Tr,UrlRequiredError:ra,UserRejectedRequestError:Sr,WaitForCallsStatusTimeoutError:au,WaitForTransactionReceiptTimeoutError:vr,WebSocketRequestError:Pr,assertCurrentChain:Je,assertRequest:Ke,assertTransactionEIP1559:Gt,assertTransactionEIP2930:zt,assertTransactionLegacy:$t,blobsToCommitments:Ir,blobsToProofs:Cr,boolToBytes:Ar,boolToHex:Rr,bytesToBigInt:Br,bytesToBool:Mr,bytesToHex:U,bytesToNumber:qr,bytesToRlp:Lr,bytesToString:kr,ccipFetch:Ue,ccipReadTunnel:yu,ccipRequest:Ue,checksumAddress:ta,commitmentToVersionedHash:ua,commitmentsToVersionedHashes:Or,compactSignatureToHex:Tt,compactSignatureToSignature:zd,concat:fe,concatBytes:Nr,concatHex:jr,createClient:Ye,createNonceManager:su,createPublicClient:nu,createTestClient:Ld,createTransport:oa,createWalletClient:kd,custom:Fr,decodeAbiParameters:$e,decodeDeployData:jd,decodeErrorResult:kt,decodeEventLog:Hr,decodeFunctionData:Ur,decodeFunctionResult:Lt,defineBlock:Dr,defineChain:Gr,defineKzg:La,defineTransaction:zr,defineTransactionReceipt:Vr,defineTransactionRequest:$r,deploylessCallViaBytecodeBytecode:Wr,deploylessCallViaFactoryBytecode:Kr,domainSeparator:Jr,encodeAbiParameters:Yr,encodeDeployData:ea,encodeErrorResult:Qr,encodeEventTopics:Xr,encodeFunctionData:Ge,encodeFunctionResult:Zr,encodePacked:eo,erc1155Abi:to,erc20Abi:ao,erc20Abi_bytes32:so,erc4626Abi:no,erc6492SignatureValidatorAbi:ft,erc6492SignatureValidatorByteCode:mt,erc721Abi:ro,ethAddress:oo,etherUnits:io,extendSchema:co,extractChain:bu,fallback:cu,formatBlock:uo,formatEther:lo,formatGwei:ho,formatLog:fo,formatTransaction:mo,formatTransactionReceipt:go,formatTransactionRequest:ye,formatUnits:po,fromBlobs:Fd,fromBytes:yo,fromHex:bo,fromRlp:Qe,getAbiItem:wo,getAddress:L,getChainContractAddress:_o,getContract:qd,getContractAddress:pu,getContractError:na,getCreate2Address:ya,getCreateAddress:pa,getEventSelector:gt,getEventSignature:oe,getFunctionSelector:pt,getFunctionSignature:oe,getSerializedTransactionType:Aa,getTransactionType:Eo,getTypesForEIP712Domain:xo,gweiUnits:Xt,hashDomain:To,hashMessage:Ht,hashStruct:So,hashTypedData:Ut,hexToBigInt:_,hexToBool:vo,hexToBytes:V,hexToCompactSignature:xt,hexToNumber:C,hexToRlp:Po,hexToSignature:wt,hexToString:Io,http:Co,isAddress:Kt,isAddressEqual:pe,isBytes:De,isErc6492Signature:va,isErc8010Signature:Pa,isHash:wa,isHex:b,keccak256:Y,labelhash:Ao,maxInt104:Ro,maxInt112:Bo,maxInt120:Mo,maxInt128:qo,maxInt136:Lo,maxInt144:ko,maxInt152:Oo,maxInt16:No,maxInt160:jo,maxInt168:Fo,maxInt176:Ho,maxInt184:Uo,maxInt192:Do,maxInt200:Go,maxInt208:zo,maxInt216:Vo,maxInt224:$o,maxInt232:Wo,maxInt24:Ko,maxInt240:Jo,maxInt248:Yo,maxInt256:Qo,maxInt32:Xo,maxInt40:Zo,maxInt48:ei,maxInt56:ti,maxInt64:ai,maxInt72:si,maxInt8:ni,maxInt80:ri,maxInt88:oi,maxInt96:ii,maxUint104:ci,maxUint112:ui,maxUint120:di,maxUint128:li,maxUint136:hi,maxUint144:fi,maxUint152:mi,maxUint16:gi,maxUint160:pi,maxUint168:yi,maxUint176:bi,maxUint184:wi,maxUint192:_i,maxUint200:Ei,maxUint208:xi,maxUint216:Ti,maxUint224:Si,maxUint232:vi,maxUint24:Pi,maxUint240:Ii,maxUint248:Ci,maxUint256:Ai,maxUint32:Ri,maxUint40:Bi,maxUint48:Mi,maxUint56:qi,maxUint64:Li,maxUint72:ki,maxUint8:Oi,maxUint80:Ni,maxUint88:ji,maxUint96:Fi,minInt104:Hi,minInt112:Ui,minInt120:Di,minInt128:Gi,minInt136:zi,minInt144:Vi,minInt152:$i,minInt16:Wi,minInt160:Ki,minInt168:Ji,minInt176:Yi,minInt184:Qi,minInt192:Xi,minInt200:Zi,minInt208:ec,minInt216:tc,minInt224:ac,minInt232:sc,minInt24:nc,minInt240:rc,minInt248:oc,minInt256:ic,minInt32:cc,minInt40:uc,minInt48:dc,minInt56:lc,minInt64:hc,minInt72:fc,minInt8:mc,minInt80:gc,minInt88:pc,minInt96:yc,multicall3Abi:bc,namehash:wc,nonceManager:ru,numberToBytes:_c,numberToHex:x,offchainLookup:du,offchainLookupAbiItem:lu,offchainLookupSignature:hu,pad:Bt,padBytes:Ec,padHex:Fe,parseAbi:xc,parseAbiItem:Tc,parseAbiParameter:gu,parseAbiParameters:Sc,parseCompactSignature:xt,parseErc6492Signature:Ru,parseErc8010Signature:Bu,parseEther:vc,parseEventLogs:Pc,parseGwei:Du,parseSignature:wt,parseTransaction:Ra,parseUnits:Qt,prepareEncodeFunctionData:Ic,presignMessagePrefix:Cc,publicActions:Ac,recoverAddress:Q,recoverMessageAddress:Ia,recoverPublicKey:Rc,recoverTransactionAddress:Vd,recoverTypedDataAddress:Ca,ripemd160:Au,rpcSchema:Bc,rpcTransactionType:Mc,serializeAccessList:qc,serializeCompactSignature:Tt,serializeErc6492Signature:ou,serializeErc8010Signature:Mu,serializeSignature:yt,serializeTransaction:ha,serializeTypedData:Lc,setErrorConfig:kc,setupKzg:Gd,sha256:Oc,shouldThrow:uu,sidecarsToVersionedHashes:Hd,signatureToCompactSignature:$d,signatureToHex:yt,size:jt,slice:Mt,sliceBytes:Nc,sliceHex:Ve,stringToBytes:jc,stringToHex:Fc,stringify:Hc,testActions:Ma,toBlobSidecars:Vt,toBlobs:Uc,toBytes:O,toCoinType:Dd,toEventHash:bt,toEventSelector:gt,toEventSignature:oe,toFunctionHash:bt,toFunctionSelector:pt,toFunctionSignature:oe,toHex:Ft,toPrefixedMessage:Dc,toRlp:qt,transactionType:Gc,trim:Yt,universalSignatureValidatorAbi:ft,universalSignatureValidatorByteCode:mt,validateTypedData:zc,verifyHash:qu,verifyMessage:Lu,verifyTypedData:ku,walletActions:qa,webSocket:Od,weiUnits:Vc,withCache:$c,withRetry:Wc,withTimeout:Kc,zeroAddress:Jc,zeroHash:iu},Symbol.toStringTag,{value:"Module"}));var Xe={},Ee={},ka={},ge={},Oa={},ee={},te={};Object.defineProperty(te,"__esModule",{value:!0});te.getSDKVersion=void 0;const Kd=()=>"9.1.0";te.getSDKVersion=Kd;var xe={};Object.defineProperty(xe,"__esModule",{value:!0});xe.generateRequestId=void 0;const Jd=e=>e.toString(16).padStart(2,"0"),Yd=e=>{const t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Jd).join("")},Qd=()=>typeof window<"u"?Yd(10):new Date().getTime().toString(36);xe.generateRequestId=Qd;Object.defineProperty(ee,"__esModule",{value:!0});ee.MessageFormatter=void 0;const Xd=te,Zd=xe;class Te{}ee.MessageFormatter=Te;Te.makeRequest=(e,t)=>({id:(0,Zd.generateRequestId)(),method:e,params:t,env:{sdkVersion:(0,Xd.getSDKVersion)()}});Te.makeResponse=(e,t,a)=>({id:e,success:!0,version:a,data:t});Te.makeErrorResponse=(e,t,a)=>({id:e,success:!1,error:t,version:a});var M={};Object.defineProperty(M,"__esModule",{value:!0});M.RestrictedMethods=M.Methods=void 0;var St;(function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage",e.signTypedMessage="signTypedMessage",e.getEnvironmentInfo="getEnvironmentInfo",e.getOffChainSignature="getOffChainSignature",e.requestAddressBook="requestAddressBook",e.wallet_getPermissions="wallet_getPermissions",e.wallet_requestPermissions="wallet_requestPermissions"})(St||(M.Methods=St={}));var vt;(function(e){e.requestAddressBook="requestAddressBook"})(vt||(M.RestrictedMethods=vt={}));(function(e){var t=S&&S.__createBinding||(Object.create?function(r,i,c,o){o===void 0&&(o=c);var d=Object.getOwnPropertyDescriptor(i,c);(!d||("get"in d?!i.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return i[c]}}),Object.defineProperty(r,o,d)}:function(r,i,c,o){o===void 0&&(o=c),r[o]=i[c]}),a=S&&S.__exportStar||function(r,i){for(var c in r)c!=="default"&&!Object.prototype.hasOwnProperty.call(i,c)&&t(i,r,c)};Object.defineProperty(e,"__esModule",{value:!0});const s=ee;class n{constructor(i=null,c=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:o,data:d,source:m})=>{const h=!d,l=!this.isServer&&m===window.parent,u=typeof d.version<"u"&&parseInt(d.version.split(".")[0]),f=typeof u=="number"&&u>=1;let g=!0;return Array.isArray(this.allowedOrigins)&&(g=this.allowedOrigins.find(y=>y.test(o))!==void 0),!h&&l&&f&&g},this.logIncomingMessage=o=>{console.info(`Safe Apps SDK v1: A message was received from origin ${o.origin}. `,o.data)},this.onParentMessage=o=>{this.isValidMessage(o)&&(this.debugMode&&this.logIncomingMessage(o),this.handleIncomingMessage(o.data))},this.handleIncomingMessage=o=>{const{id:d}=o,m=this.callbacks.get(d);m&&(m(o),this.callbacks.delete(d))},this.send=(o,d)=>{const m=s.MessageFormatter.makeRequest(o,d);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(m,"*"),new Promise((h,l)=>{this.callbacks.set(m.id,u=>{if(!u.success){l(new Error(u.error));return}h(u)})})},this.allowedOrigins=i,this.debugMode=c,this.isServer||window.addEventListener("message",this.onParentMessage)}}e.default=n,a(M,e)})(Oa);var Se={},ve={},Pe={};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.isObjectEIP712TypedData=void 0;const el=e=>typeof e=="object"&&e!=null&&"domain"in e&&"types"in e&&"message"in e;Pe.isObjectEIP712TypedData=el;var Na={};Object.defineProperty(Na,"__esModule",{value:!0});var ja={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var t=Xc;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}})})(ja);var Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});(function(e){var t=S&&S.__createBinding||(Object.create?function(s,n,r,i){i===void 0&&(i=r);var c=Object.getOwnPropertyDescriptor(n,r);(!c||("get"in c?!n.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(s,i,c)}:function(s,n,r,i){i===void 0&&(i=r),s[i]=n[r]}),a=S&&S.__exportStar||function(s,n){for(var r in s)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,s,r)};Object.defineProperty(e,"__esModule",{value:!0}),a(Pe,e),a(Na,e),a(ja,e),a(Fa,e)})(ve);Object.defineProperty(Se,"__esModule",{value:!0});Se.TXs=void 0;const ue=M,tl=ve;class al{constructor(t){this.communicator=t}async getBySafeTxHash(t){if(!t)throw new Error("Invalid safeTxHash");return(await this.communicator.send(ue.Methods.getTxBySafeTxHash,{safeTxHash:t})).data}async signMessage(t){const a={message:t};return(await this.communicator.send(ue.Methods.signMessage,a)).data}async signTypedMessage(t){if(!(0,tl.isObjectEIP712TypedData)(t))throw new Error("Invalid typed data");return(await this.communicator.send(ue.Methods.signTypedMessage,{typedData:t})).data}async send({txs:t,params:a}){if(!t||!t.length)throw new Error("No transactions were passed");const s={txs:t,params:a};return(await this.communicator.send(ue.Methods.sendTransactions,s)).data}}Se.TXs=al;var Ie={},W={};Object.defineProperty(W,"__esModule",{value:!0});W.RPC_CALLS=void 0;W.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"};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.Eth=void 0;const R=W,sl=M,q={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};class nl{constructor(t){this.communicator=t,this.call=this.buildRequest({call:R.RPC_CALLS.eth_call,formatters:[null,q.defaultBlockParam]}),this.getBalance=this.buildRequest({call:R.RPC_CALLS.eth_getBalance,formatters:[null,q.defaultBlockParam]}),this.getCode=this.buildRequest({call:R.RPC_CALLS.eth_getCode,formatters:[null,q.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:R.RPC_CALLS.eth_getStorageAt,formatters:[null,q.blockNumberToHex,q.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:R.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:R.RPC_CALLS.eth_getBlockByHash,formatters:[null,q.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:R.RPC_CALLS.eth_getBlockByNumber,formatters:[q.blockNumberToHex,q.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:R.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:R.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:R.RPC_CALLS.eth_getTransactionCount,formatters:[null,q.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:R.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=a=>this.buildRequest({call:R.RPC_CALLS.eth_estimateGas})([a]),this.setSafeSettings=this.buildRequest({call:R.RPC_CALLS.safe_setSettings})}buildRequest(t){const{call:a,formatters:s}=t;return async n=>{s&&Array.isArray(n)&&s.forEach((c,o)=>{c&&(n[o]=c(n[o]))});const r={call:a,params:n||[]};return(await this.communicator.send(sl.Methods.rpcCall,r)).data}}}Ie.Eth=nl;var Ce={};const rl=Yc(Wd);var G={};Object.defineProperty(G,"__esModule",{value:!0});G.MAGIC_VALUE_BYTES=G.MAGIC_VALUE=void 0;const ol="0x1626ba7e";G.MAGIC_VALUE=ol;const il="0x20c13b0b";G.MAGIC_VALUE_BYTES=il;var Ze={},ae={},j={};Object.defineProperty(j,"__esModule",{value:!0});j.PermissionsError=j.PERMISSIONS_REQUEST_REJECTED=void 0;j.PERMISSIONS_REQUEST_REJECTED=4001;class et extends Error{constructor(t,a,s){super(t),this.code=a,this.data=s,Object.setPrototypeOf(this,et.prototype)}}j.PermissionsError=et;Object.defineProperty(ae,"__esModule",{value:!0});ae.Wallet=void 0;const Ne=M,de=j;class cl{constructor(t){this.communicator=t}async getPermissions(){return(await this.communicator.send(Ne.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(t){if(!this.isPermissionRequestValid(t))throw new de.PermissionsError("Permissions request is invalid",de.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(Ne.Methods.wallet_requestPermissions,t)).data}catch{throw new de.PermissionsError("Permissions rejected",de.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(t){return t.every(a=>typeof a=="object"?Object.keys(a).every(s=>!!Object.values(Ne.RestrictedMethods).includes(s)):!1)}}ae.Wallet=cl;Object.defineProperty(Ze,"__esModule",{value:!0});const ul=ae,Pt=j,It=(e,t)=>t.some(a=>a.parentCapability===e),dl=()=>(e,t,a)=>{const s=a.value;return a.value=async function(){const n=new ul.Wallet(this.communicator);let r=await n.getPermissions();if(It(t,r)||(r=await n.requestPermissions([{[t]:{}}])),!It(t,r))throw new Pt.PermissionsError("Permissions rejected",Pt.PERMISSIONS_REQUEST_REJECTED);return s.apply(this)},a};Ze.default=dl;var ll=S&&S.__decorate||function(e,t,a,s){var n=arguments.length,r=n<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,a):s,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,a,s);else for(var c=e.length-1;c>=0;c--)(i=e[c])&&(r=(n<3?i(r):n>3?i(t,a,r):i(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r},hl=S&&S.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.Safe=void 0;const le=rl,Ct=G,k=M,At=W,fl=ve,ml=hl(Ze);class Ha{constructor(t){this.communicator=t}async getChainInfo(){return(await this.communicator.send(k.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(k.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:t="usd"}={}){return(await this.communicator.send(k.Methods.getSafeBalances,{currency:t})).data}async check1271Signature(t,a="0x"){const s=await this.getInfo(),n=(0,le.encodeFunctionData)({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:[t,a]}),r={call:At.RPC_CALLS.eth_call,params:[{to:s.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(k.Methods.rpcCall,r)).data.slice(0,10).toLowerCase()===Ct.MAGIC_VALUE}catch{return!1}}async check1271SignatureBytes(t,a="0x"){const s=await this.getInfo(),n=(0,le.encodeFunctionData)({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:[t,a]}),r={call:At.RPC_CALLS.eth_call,params:[{to:s.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(k.Methods.rpcCall,r)).data.slice(0,10).toLowerCase()===Ct.MAGIC_VALUE_BYTES}catch{return!1}}calculateMessageHash(t){return(0,le.hashMessage)(t)}calculateTypedMessageHash(t){const a=typeof t.domain.chainId=="object"?t.domain.chainId.toNumber():Number(t.domain.chainId);let s=t.primaryType;if(!s){const n=Object.values(t.types),r=Object.keys(t.types).filter(i=>n.every(c=>c.every(({type:o})=>o.replace("[","").replace("]","")!==i)));if(r.length===0||r.length>1)throw new Error("Please specify primaryType");s=r[0]}return(0,le.hashTypedData)({message:t.message,domain:{...t.domain,chainId:a,verifyingContract:t.domain.verifyingContract,salt:t.domain.salt},types:t.types,primaryType:s})}async getOffChainSignature(t){return(await this.communicator.send(k.Methods.getOffChainSignature,t)).data}async isMessageSigned(t,a="0x"){let s;if(typeof t=="string"&&(s=async()=>{const n=this.calculateMessageHash(t);return await this.isMessageHashSigned(n,a)}),(0,fl.isObjectEIP712TypedData)(t)&&(s=async()=>{const n=this.calculateTypedMessageHash(t);return await this.isMessageHashSigned(n,a)}),s)return await s();throw new Error("Invalid message type")}async isMessageHashSigned(t,a="0x"){const s=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const n of s)if(await n(t,a))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(k.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(k.Methods.requestAddressBook,void 0)).data}}Ce.Safe=Ha;ll([(0,ml.default)()],Ha.prototype,"requestAddressBook",null);var gl=S&&S.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ge,"__esModule",{value:!0});const pl=gl(Oa),yl=Se,bl=Ie,wl=Ce,_l=ae;class El{constructor(t={}){const{allowedDomains:a=null,debug:s=!1}=t;this.communicator=new pl.default(a,s),this.eth=new bl.Eth(this.communicator),this.txs=new yl.TXs(this.communicator),this.safe=new wl.Safe(this.communicator),this.wallet=new _l.Wallet(this.communicator)}}ge.default=El;(function(e){var t=S&&S.__createBinding||(Object.create?function(i,c,o,d){d===void 0&&(d=o);var m=Object.getOwnPropertyDescriptor(c,o);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[o]}}),Object.defineProperty(i,d,m)}:function(i,c,o,d){d===void 0&&(d=o),i[d]=c[o]}),a=S&&S.__exportStar||function(i,c){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(c,o)&&t(c,i,o)},s=S&&S.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.getSDKVersion=void 0;const n=s(ge);e.default=n.default,a(ge,e),a(ve,e),a(M,e),a(ee,e);var r=te;Object.defineProperty(e,"getSDKVersion",{enumerable:!0,get:function(){return r.getSDKVersion}}),a(W,e)})(ka);var z={};Object.defineProperty(z,"__esModule",{value:!0});z.numberToHex=z.getLowerCase=void 0;function xl(e){return e&&e.toLowerCase()}z.getLowerCase=xl;function Tl(e){return`0x${e.toString(16)}`}z.numberToHex=Tl;Object.defineProperty(Ee,"__esModule",{value:!0});Ee.SafeAppProvider=void 0;const H=ka,Sl=fu,B=z;class vl extends Sl.EventEmitter{constructor(t,a){super(),this.submittedTxs=new Map,this.safe=t,this.sdk=a}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(t){var n,r,i,c;const{method:a,params:s=[]}=t;switch(a){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return(0,B.numberToHex)(this.chainId);case"personal_sign":{const[l,u]=s;if(this.safe.safeAddress.toLowerCase()!==u.toLowerCase())throw new Error("The address or message hash is invalid");const f=await this.sdk.txs.signMessage(l);return("signature"in f?f.signature:void 0)||"0x"}case"eth_sign":{const[l,u]=s;if(this.safe.safeAddress.toLowerCase()!==l.toLowerCase()||!u.startsWith("0x"))throw new Error("The address or message hash is invalid");const f=await this.sdk.txs.signMessage(u);return("signature"in f?f.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[l,u]=s,f=typeof u=="string"?JSON.parse(u):u;if(this.safe.safeAddress.toLowerCase()!==l.toLowerCase())throw new Error("The address is invalid");const g=await this.sdk.txs.signTypedMessage(f);return("signature"in g?g.signature:void 0)||"0x"}case"eth_sendTransaction":const o={...s[0],value:s[0].value||"0",data:s[0].data||"0x"};typeof o.gas=="string"&&o.gas.startsWith("0x")&&(o.gas=parseInt(o.gas,16));const d=await this.sdk.txs.send({txs:[o],params:{safeTxGas:o.gas}});return this.submittedTxs.set(d.safeTxHash,{from:this.safe.safeAddress,hash:d.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:o.data,value:o.value,to:o.to,blockHash:null,blockNumber:null,transactionIndex:null}),d.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,B.getLowerCase)(s[0]),s[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,B.getLowerCase)(s[0]),s[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,B.getLowerCase)(s[0]),s[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,B.getLowerCase)(s[0]),s[1],s[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([s[0],s[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([s[0],s[1]]);case"eth_getTransactionByHash":let h=s[0];try{h=(await this.sdk.txs.getBySafeTxHash(h)).txHash||h}catch{}return this.submittedTxs.has(h)?this.submittedTxs.get(h):this.sdk.eth.getTransactionByHash([h]).then(l=>(l&&(l.hash=s[0]),l));case"eth_getTransactionReceipt":{let l=s[0];try{l=(await this.sdk.txs.getBySafeTxHash(l)).txHash||l}catch{}return this.sdk.eth.getTransactionReceipt([l]).then(u=>(u&&(u.transactionHash=s[0]),u))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(s[0]);case"eth_call":return this.sdk.eth.call([s[0],s[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([s[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(s[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([s[0]]);case"wallet_sendCalls":{const{from:l,calls:u,chainId:f}=s[0];if(f!==(0,B.numberToHex)(this.chainId))throw new Error(`Safe is not on chain ${f}`);if(l!==this.safe.safeAddress)throw Error("Invalid from address");const g=u.map((w,v)=>{if(!w.to)throw new Error(`Invalid call #${v}: missing "to" field`);return{to:w.to,data:w.data??"0x",value:w.value??(0,B.numberToHex)(0)}}),{safeTxHash:y}=await this.sdk.txs.send({txs:g});return{id:y}}case"wallet_getCallsStatus":{const l=s[0],u={[H.TransactionStatus.AWAITING_CONFIRMATIONS]:100,[H.TransactionStatus.AWAITING_EXECUTION]:100,[H.TransactionStatus.SUCCESS]:200,[H.TransactionStatus.CANCELLED]:400,[H.TransactionStatus.FAILED]:500},f=await this.sdk.txs.getBySafeTxHash(l),g={version:"1.0",id:l,chainId:(0,B.numberToHex)(this.chainId),status:u[f.txStatus]};if(!f.txHash)return g;const y=await this.sdk.eth.getTransactionReceipt([f.txHash]);if(!y)return g;const E=((r=(n=f.txData)==null?void 0:n.dataDecoded)==null?void 0:r.method)!=="multiSend"?1:((c=(i=f.txData.dataDecoded.parameters)==null?void 0:i[0].valueDecoded)==null?void 0:c.length)??1,w=Number(y.blockNumber),v=Number(y.gasUsed);return g.receipts=Array(E).fill({logs:y.logs,status:(0,B.numberToHex)(f.txStatus===H.TransactionStatus.SUCCESS?1:0),blockHash:y.blockHash,blockNumber:(0,B.numberToHex)(w),gasUsed:(0,B.numberToHex)(v),transactionHash:f.txHash}),g}case"wallet_showCallsStatus":throw new Error(`"${t.method}" not supported`);case"wallet_getCapabilities":return{[(0,B.numberToHex)(this.chainId)]:{atomicBatch:{supported:!0}}};default:throw Error(`"${t.method}" not implemented`)}}send(t,a){t||a("Undefined request"),this.request(t).then(s=>a(null,{jsonrpc:"2.0",id:t.id,result:s})).catch(s=>a(s,null))}}Ee.SafeAppProvider=vl;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var t=Ee;Object.defineProperty(e,"SafeAppProvider",{enumerable:!0,get:function(){return t.SafeAppProvider}})})(Xe);const Pl=Qc(Xe),ql=mu({__proto__:null,default:Pl},[Xe]);export{ql as i};
|
|
1
|
+
import{f3 as ut,eU as dt,f8 as Ga,dh as za,a9 as Rt,fS as O,cL as L,e_ as Bt,di as Y,fJ as Mt,bR as fe,fX as qt,dl as Va,c3 as Lt,by as Me,ch as Ge,c0 as kt,fM as $a,a0 as Ot,al as Nt,d5 as V,bX as je,bG as U,B as ze,dg as b,fI as jt,bY as Wa,$ as Ka,fm as re,bN as lt,fV as Ft,fL as Ve,g1 as Ja,b$ as $e,g0 as Ya,eY as x,fj as Q,d0 as Ht,d2 as Ut,gb as Qa,de as pe,d7 as C,aw as Dt,av as $,d3 as _,br as Gt,bs as zt,fQ as Vt,bt as Xa,bu as Za,bv as $t,an as Wt,dd as Kt,ac as Jt,f$ as Yt,f0 as Fe,f9 as Qt,c_ as Xt,cw as Zt,cE as ye,ce as ea,fs as We,bM as ta,f5 as X,cK as P,q as be,bq as Ke,fk as es,cO as me,bp as Je,aD as ts,g4 as as,b2 as ht,fc as aa,c4 as ss,fr as sa,s as he,cV as ns,cQ as na,fh as rs,fH as os,bW as is,cR as cs,g5 as us,cr as ds,bV as Ye,fG as ls,fF as hs,fq as fs,cx as ms,bf as ra,bZ as oa,cZ as qe,cT as gs,aR as ia,A as ca,a as He,bO as ua,T as da,fp as la,fx as ha,b as ps,c as ys,d as bs,e as ws,f as _s,g as Es,h as xs,i as Ts,j as Ss,k as vs,l as Ps,m as Is,n as Cs,o as As,p as Rs,r as Bs,t as Ms,u as qs,v as Ls,w as ks,x as Os,y as Ns,C as js,z as Fs,D as Hs,E as Us,F as Ds,G as Gs,H as zs,I as Vs,J as $s,K as Ws,L as Ks,M as Js,N as Ys,O as Qs,P as Xs,Q as Zs,R as en,S as tn,U as an,W as sn,X as nn,Y as rn,Z as on,_ as cn,a1 as un,a2 as dn,a3 as ln,a4 as hn,a5 as fn,a6 as mn,a7 as gn,a8 as pn,aa as yn,ab as bn,ad as wn,ae as _n,af as En,ag as xn,ah as Tn,ai as Sn,aj as vn,ak as Pn,am as In,ao as Cn,ap as An,aq as Rn,ar as Bn,as as Mn,at as qn,au as Ln,ax as kn,ay as On,az as Nn,aA as jn,aB as Fn,aC as Hn,aE as Un,aF as Dn,aG as Gn,aH as zn,aI as Vn,aJ as $n,aK as Wn,aL as Kn,aM as Jn,aN as Yn,aO as Qn,aP as Xn,aQ as Zn,aS as er,aT as tr,aU as ar,aV as sr,aW as nr,aX as rr,aY as or,aZ as ir,a_ as cr,a$ as ur,b0 as dr,b1 as lr,b3 as hr,b4 as fr,b5 as mr,b6 as gr,b7 as pr,b8 as yr,b9 as br,ba as wr,bb as _r,bc as Er,bd as xr,be as Tr,bg as Sr,bh as vr,bj as Pr,bz as Ir,bA as Cr,bB as Ar,bC as Rr,bD as Br,bE as Mr,bH as qr,bI as Lr,bJ as kr,bP as Or,bT as Nr,bU as jr,b_ as Fr,c1 as Hr,c2 as Ur,c5 as Dr,c6 as Gr,c7 as zr,c8 as Vr,c9 as $r,ca as Wr,cb as Kr,cc as Jr,cd as Yr,cf as Qr,cg as Xr,ci as Zr,cj as eo,ck as to,cl as ao,cm as so,cn as no,co as ft,cp as mt,cq as ro,ct as oo,cu as io,cv as co,cy as uo,cz as lo,cA as ho,cB as fo,cC as mo,cD as go,cF as po,cG as yo,cH as bo,cI as wo,cN as _o,fT as gt,fY as oe,fU as pt,cW as Eo,cX as xo,c$ as To,d1 as So,d4 as vo,d8 as Po,d9 as Io,db as Co,dj as Ao,dn as Ro,dp as Bo,dq as Mo,dr as qo,ds as Lo,dt as ko,du as Oo,dv as No,dw as jo,dx as Fo,dy as Ho,dz as Uo,dA as Do,dB as Go,dC as zo,dD as Vo,dE as $o,dF as Wo,dG as Ko,dH as Jo,dI as Yo,dJ as Qo,dK as Xo,dL as Zo,dM as ei,dN as ti,dO as ai,dP as si,dQ as ni,dR as ri,dS as oi,dT as ii,dU as ci,dV as ui,dW as di,dX as li,dY as hi,dZ as fi,d_ as mi,d$ as gi,e0 as pi,e1 as yi,e2 as bi,e3 as wi,e4 as _i,e5 as Ei,e6 as xi,e7 as Ti,e8 as Si,e9 as vi,ea as Pi,eb as Ii,ec as Ci,ed as Ai,ee as Ri,ef as Bi,eg as Mi,eh as qi,ei as Li,ej as ki,ek as Oi,el as Ni,em as ji,en as Fi,eo as Hi,ep as Ui,eq as Di,er as Gi,es as zi,et as Vi,eu as $i,ev as Wi,ew as Ki,ex as Ji,ey as Yi,ez as Qi,eA as Xi,eB as Zi,eC as ec,eD as tc,eE as ac,eF as sc,eG as nc,eH as rc,eI as oc,eJ as ic,eK as cc,eL as uc,eM as dc,eN as lc,eO as hc,eP as fc,eQ as mc,eR as gc,eS as pc,eT as yc,eV as bc,eW as wc,eX as _c,e$ as Ec,f1 as xc,f2 as Tc,f4 as Sc,f6 as vc,f7 as Pc,fb as Ic,fd as Cc,ff as Ac,fl as Rc,fn as Bc,fo as Mc,fu as qc,fv as yt,fy as Lc,fz as kc,fC as Oc,fK as Nc,fN as jc,fO as Fc,fP as Hc,fR as Uc,fZ as bt,fW as Dc,f_ as Gc,g2 as zc,g6 as Vc,g7 as $c,g9 as Wc,ga as Kc,gc as Jc,bQ as S,cM as Yc,cS as Qc}from"./index-BmKpVmQo.js";import{d as Xc}from"./index-Cw74yaCx.js";import{e as Zc,s as fa,w as ma,b as ga,g as eu,B as tu,W as au,c as su,a as nu,p as wt,n as ru,d as ou,z as iu}from"./parseSignature-D3jDGZxJ.js";import{f as cu,s as uu}from"./fallback-BQyFegq4.js";import{ccipRequest as Ue,offchainLookup as du,offchainLookupAbiItem as lu,offchainLookupSignature as hu}from"./ccip-CKVRZdQQ.js";import{e as fu}from"./events-DuWTfKWm.js";function mu(e,t){for(var a=0;a<t.length;a++){const s=t[a];if(typeof s!="string"&&!Array.isArray(s)){for(const n in s)if(n!=="default"&&!(n in e)){const r=Object.getOwnPropertyDescriptor(s,n);r&&Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>s[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function gu(e){let t;if(typeof e=="string")t=ut(e,{modifiers:dt});else{const a=Ga(e),s=e.length;for(let n=0;n<s;n++){const r=e[n];if(!za(r)){t=ut(r,{modifiers:dt,structs:a});break}}}if(!t)throw new Rt({param:e});return t}function De(e){return!e||typeof e!="object"||!("BYTES_PER_ELEMENT"in e)?!1:e.BYTES_PER_ELEMENT===1&&e.constructor.name==="Uint8Array"}function pu(e){return e.opcode==="CREATE2"?ya(e):pa(e)}function pa(e){const t=O(L(e.from));let a=O(e.nonce);return a[0]===0&&(a=new Uint8Array([])),L(`0x${Y(qt([t,a],"bytes")).slice(26)}`)}function ya(e){const t=O(L(e.from)),a=Bt(De(e.salt)?e.salt:O(e.salt),{size:32}),s="bytecodeHash"in e?De(e.bytecodeHash)?e.bytecodeHash:O(e.bytecodeHash):Y(e.bytecode,"bytes");return L(Mt(Y(fe([O("0xff"),t,a,s])),12))}function yu({batchGateways:e,ccipRequest:t=Ue}){return{async request({data:a,sender:s,urls:n}){if(n.includes(Va))return t({data:a,sender:s,urls:e});{const[r,i]=Lt({abi:Me,functionName:"query",data:await t({data:Ge({abi:Me,functionName:"query",args:[[{sender:s,data:a,urls:n}]]}),sender:s,urls:e})});if(r[0]){let c;try{const o=kt({abi:[...Me,$a],data:i[0]});if(o.errorName==="HttpError")c=new Ot({body:{message:o.args[1]},status:o.args[0],url:n.join(" | ")});else{const d=o.args[0];d&&(c=new Error(d))}}catch{}throw c??new Error("An unknown error occurred.")}return i[0]}}}}function bu({chains:e,id:t}){return e.find(a=>a.id===t)}function Qe(e,t="hex"){const a=(()=>{if(typeof e=="string"){if(e.length>3&&e.length%2!==0)throw new Nt(e);return V(e)}return e})(),s=je(a,{recursiveReadLimit:Number.POSITIVE_INFINITY});return ba(s,t)}function ba(e,t="hex"){if(e.bytes.length===0)return t==="hex"?U(e.bytes):e.bytes;const a=e.readByte();if(a<128&&e.decrementPosition(1),a<192){const n=_t(e,a,128),r=e.readBytes(n);return t==="hex"?U(r):r}const s=_t(e,a,192);return wu(e,s,t)}function _t(e,t,a){if(a===128&&t<128)return 1;if(t<=a+55)return t-a;if(t===a+55+1)return e.readUint8();if(t===a+55+2)return e.readUint16();if(t===a+55+3)return e.readUint24();if(t===a+55+4)return e.readUint32();throw new ze("Invalid RLP prefix")}function wu(e,t,a){const s=e.position,n=[];for(;e.position-s<t;)n.push(ba(e,a));return n}function wa(e){return b(e)&&jt(e)===32}const _u=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),_a=Uint8Array.from(new Array(16).fill(0).map((e,t)=>t)),Eu=_a.map(e=>(9*e+5)%16),Ea=(()=>{const a=[[_a],[Eu]];for(let s=0;s<4;s++)for(let n of a)n.push(n[s].map(r=>_u[r]));return a})(),xa=Ea[0],Ta=Ea[1],Sa=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>Uint8Array.from(e)),xu=xa.map((e,t)=>e.map(a=>Sa[t][a])),Tu=Ta.map((e,t)=>e.map(a=>Sa[t][a])),Su=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),vu=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function Et(e,t,a,s){return e===0?t^a^s:e===1?t&a|~t&s:e===2?(t|~a)^s:e===3?t&s|a&~s:t^(a|~s)}const ie=new Uint32Array(16);class Pu extends Ka{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:t,h1:a,h2:s,h3:n,h4:r}=this;return[t,a,s,n,r]}set(t,a,s,n,r){this.h0=t|0,this.h1=a|0,this.h2=s|0,this.h3=n|0,this.h4=r|0}process(t,a){for(let u=0;u<16;u++,a+=4)ie[u]=t.getUint32(a,!0);let s=this.h0|0,n=s,r=this.h1|0,i=r,c=this.h2|0,o=c,d=this.h3|0,m=d,h=this.h4|0,l=h;for(let u=0;u<5;u++){const f=4-u,g=Su[u],y=vu[u],E=xa[u],w=Ta[u],v=xu[u],A=Tu[u];for(let T=0;T<16;T++){const p=re(s+Et(u,r,c,d)+ie[E[T]]+g,v[T])+h|0;s=h,h=d,d=re(c,10)|0,c=r,r=p}for(let T=0;T<16;T++){const p=re(n+Et(f,i,o,m)+ie[w[T]]+y,A[T])+l|0;n=l,l=m,m=re(o,10)|0,o=i,i=p}}this.set(this.h1+c+m|0,this.h2+d+l|0,this.h3+h+n|0,this.h4+s+i|0,this.h0+r+o|0)}roundClean(){lt(ie)}destroy(){this.destroyed=!0,lt(this.buffer),this.set(0,0,0,0,0)}}const Iu=Wa(()=>new Pu),Cu=Iu;function Au(e,t){const a=t||"hex",s=Cu(b(e,{strict:!1})?O(e):e);return a==="bytes"?s:Ft(s)}function va(e){return Ve(e,-32)===Zc}function Pa(e){return Ja(e)}function Ru(e){if(!va(e))return{signature:e};const[t,a,s]=$e([{type:"address"},{type:"bytes"},{type:"bytes"}],e);return{address:t,data:a,signature:s}}function Bu(e){if(!Pa(e))return{signature:e};const{authorization:t,to:a,...s}=Ya(e);return{authorization:{address:t.address,chainId:t.chainId,nonce:Number(t.nonce),r:x(t.r,{size:32}),s:x(t.s,{size:32}),yParity:t.yParity},...a?{address:a}:{},...s}}async function Ia({message:e,signature:t}){return Q({hash:Ht(e),signature:t})}async function Ca(e){const{domain:t,message:a,primaryType:s,signature:n,types:r}=e;return Q({hash:Ut({domain:t,message:a,primaryType:s,types:r}),signature:n})}function Mu(e){const{address:t,data:a,signature:s,to:n="hex"}=e,r=Qa({authorization:{address:e.authorization.address,chainId:e.authorization.chainId,nonce:BigInt(e.authorization.nonce),r:BigInt(e.authorization.r),s:BigInt(e.authorization.s),yParity:e.authorization.yParity},data:a,signature:s,to:t});return n==="hex"?r:V(r)}async function qu({address:e,hash:t,signature:a}){return pe(L(e),await Q({hash:t,signature:a}))}async function Lu({address:e,message:t,signature:a}){return pe(L(e),await Ia({message:t,signature:a}))}async function ku(e){const{address:t,domain:a,message:s,primaryType:n,signature:r,types:i}=e;return pe(L(t),await Ca({domain:a,message:s,primaryType:n,signature:r,types:i}))}function Aa(e){const t=Ve(e,0,1);if(t==="0x04")return"eip7702";if(t==="0x03")return"eip4844";if(t==="0x02")return"eip1559";if(t==="0x01")return"eip2930";if(t!=="0x"&&C(t)>=192)return"legacy";throw new Dt({serializedType:t})}function Ra(e){const t=Aa(e);return t==="eip1559"?ju(e):t==="eip2930"?Fu(e):t==="eip4844"?Nu(e):t==="eip7702"?Ou(e):Hu(e)}function Ou(e){const t=we(e),[a,s,n,r,i,c,o,d,m,h,l,u,f]=t;if(t.length!==10&&t.length!==13)throw new $({attributes:{chainId:a,nonce:s,maxPriorityFeePerGas:n,maxFeePerGas:r,gas:i,to:c,value:o,data:d,accessList:m,authorizationList:h,...t.length>9?{v:l,r:u,s:f}:{}},serializedTransaction:e,type:"eip7702"});const g={chainId:C(a),type:"eip7702"};return b(c)&&c!=="0x"&&(g.to=c),b(i)&&i!=="0x"&&(g.gas=_(i)),b(d)&&d!=="0x"&&(g.data=d),b(s)&&(g.nonce=s==="0x"?0:C(s)),b(o)&&o!=="0x"&&(g.value=_(o)),b(r)&&r!=="0x"&&(g.maxFeePerGas=_(r)),b(n)&&n!=="0x"&&(g.maxPriorityFeePerGas=_(n)),m.length!==0&&m!=="0x"&&(g.accessList=_e(m)),h.length!==0&&h!=="0x"&&(g.authorizationList=Uu(h)),Za(g),{...t.length===13?Z(t):void 0,...g}}function Nu(e){const t=we(e),a=t.length===4,s=a?t[0]:t,n=a?t.slice(1):[],[r,i,c,o,d,m,h,l,u,f,g,y,E,w]=s,[v,A,T]=n;if(!(s.length===11||s.length===14))throw new $({attributes:{chainId:r,nonce:i,maxPriorityFeePerGas:c,maxFeePerGas:o,gas:d,to:m,value:h,data:l,accessList:u,...s.length>9?{v:y,r:E,s:w}:{}},serializedTransaction:e,type:"eip4844"});const p={blobVersionedHashes:g,chainId:C(r),to:m,type:"eip4844"};return b(d)&&d!=="0x"&&(p.gas=_(d)),b(l)&&l!=="0x"&&(p.data=l),b(i)&&(p.nonce=i==="0x"?0:C(i)),b(h)&&h!=="0x"&&(p.value=_(h)),b(f)&&f!=="0x"&&(p.maxFeePerBlobGas=_(f)),b(o)&&o!=="0x"&&(p.maxFeePerGas=_(o)),b(c)&&c!=="0x"&&(p.maxPriorityFeePerGas=_(c)),u.length!==0&&u!=="0x"&&(p.accessList=_e(u)),v&&A&&T&&(p.sidecars=Vt({blobs:v,commitments:A,proofs:T})),Xa(p),{...s.length===14?Z(s):void 0,...p}}function ju(e){const t=we(e),[a,s,n,r,i,c,o,d,m,h,l,u]=t;if(!(t.length===9||t.length===12))throw new $({attributes:{chainId:a,nonce:s,maxPriorityFeePerGas:n,maxFeePerGas:r,gas:i,to:c,value:o,data:d,accessList:m,...t.length>9?{v:h,r:l,s:u}:{}},serializedTransaction:e,type:"eip1559"});const f={chainId:C(a),type:"eip1559"};return b(c)&&c!=="0x"&&(f.to=c),b(i)&&i!=="0x"&&(f.gas=_(i)),b(d)&&d!=="0x"&&(f.data=d),b(s)&&(f.nonce=s==="0x"?0:C(s)),b(o)&&o!=="0x"&&(f.value=_(o)),b(r)&&r!=="0x"&&(f.maxFeePerGas=_(r)),b(n)&&n!=="0x"&&(f.maxPriorityFeePerGas=_(n)),m.length!==0&&m!=="0x"&&(f.accessList=_e(m)),Gt(f),{...t.length===12?Z(t):void 0,...f}}function Fu(e){const t=we(e),[a,s,n,r,i,c,o,d,m,h,l]=t;if(!(t.length===8||t.length===11))throw new $({attributes:{chainId:a,nonce:s,gasPrice:n,gas:r,to:i,value:c,data:o,accessList:d,...t.length>8?{v:m,r:h,s:l}:{}},serializedTransaction:e,type:"eip2930"});const u={chainId:C(a),type:"eip2930"};return b(i)&&i!=="0x"&&(u.to=i),b(r)&&r!=="0x"&&(u.gas=_(r)),b(o)&&o!=="0x"&&(u.data=o),b(s)&&(u.nonce=s==="0x"?0:C(s)),b(c)&&c!=="0x"&&(u.value=_(c)),b(n)&&n!=="0x"&&(u.gasPrice=_(n)),d.length!==0&&d!=="0x"&&(u.accessList=_e(d)),zt(u),{...t.length===11?Z(t):void 0,...u}}function Hu(e){const t=Qe(e,"hex"),[a,s,n,r,i,c,o,d,m]=t;if(!(t.length===6||t.length===9))throw new $({attributes:{nonce:a,gasPrice:s,gas:n,to:r,value:i,data:c,...t.length>6?{v:o,r:d,s:m}:{}},serializedTransaction:e,type:"legacy"});const h={type:"legacy"};if(b(r)&&r!=="0x"&&(h.to=r),b(n)&&n!=="0x"&&(h.gas=_(n)),b(c)&&c!=="0x"&&(h.data=c),b(a)&&(h.nonce=a==="0x"?0:C(a)),b(i)&&i!=="0x"&&(h.value=_(i)),b(s)&&s!=="0x"&&(h.gasPrice=_(s)),$t(h),t.length===6)return h;const l=b(o)&&o!=="0x"?_(o):0n;if(m==="0x"&&d==="0x")return l>0&&(h.chainId=Number(l)),h;const u=l,f=Number((u-35n)/2n);if(f>0)h.chainId=f;else if(u!==27n&&u!==28n)throw new Wt({v:u});return h.v=u,h.s=m,h.r=d,h.yParity=u%2n===0n?1:0,h}function we(e){return Qe(`0x${e.slice(4)}`,"hex")}function _e(e){const t=[];for(let a=0;a<e.length;a++){const[s,n]=e[a];if(!Kt(s,{strict:!1}))throw new Jt({address:s});t.push({address:s,storageKeys:n.map(r=>wa(r)?r:Yt(r))})}return t}function Uu(e){const t=[];for(let a=0;a<e.length;a++){const[s,n,r,i,c,o]=e[a];t.push({address:n,chainId:s==="0x"?0:C(s),nonce:r==="0x"?0:C(r),...Z([i,c,o])})}return t}function Z(e){const t=e.slice(-3),a=t[0]==="0x"||_(t[0])===0n?27n:28n;return{r:Fe(t[1],{size:32}),s:Fe(t[2],{size:32}),v:a,yParity:a===27n?0:1}}function Du(e,t="wei"){return Qt(e,Xt[t])}async function Gu(e,{hash:t}){await e.request({method:`${e.mode}_dropTransaction`,params:[t]})}async function zu(e){return e.request({method:`${e.mode}_dumpState`})}async function Vu(e){return e.mode==="ganache"?await e.request({method:"eth_mining"}):await e.request({method:`${e.mode}_getAutomine`})}async function $u(e){return await e.request({method:"txpool_content"})}async function Wu(e){const{pending:t,queued:a}=await e.request({method:"txpool_status"});return{pending:C(t),queued:C(a)}}async function Ku(e,{address:t}){await e.request({method:`${e.mode}_impersonateAccount`,params:[t]})}async function Ju(e,{seconds:t}){return await e.request({method:"evm_increaseTime",params:[x(t)]})}async function Yu(e){return await e.request({method:"txpool_inspect"})}async function Qu(e,{state:t}){await e.request({method:`${e.mode}_loadState`,params:[t]})}async function Xu(e,{blocks:t,interval:a}){e.mode==="ganache"?await e.request({method:"evm_mine",params:[{blocks:x(t)}]}):await e.request({method:`${e.mode}_mine`,params:[x(t),x(a||0)]})}async function Zu(e){await e.request({method:`${e.mode}_removeBlockTimestampInterval`})}async function ed(e,{blockNumber:t,jsonRpcUrl:a}={}){await e.request({method:`${e.mode}_reset`,params:[{forking:{blockNumber:Number(t),jsonRpcUrl:a}}]})}async function td(e,{id:t}){await e.request({method:"evm_revert",params:[t]})}async function ad(e,t){var E,w,v;const{accessList:a,data:s,from:n,gas:r,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:o,nonce:d,to:m,value:h,...l}=t,u=(v=(w=(E=e.chain)==null?void 0:E.formatters)==null?void 0:w.transactionRequest)==null?void 0:v.format,g=(u||ye)({...Zt(l,{format:u}),accessList:a,data:s,from:n,gas:r,gasPrice:i,maxFeePerGas:c,maxPriorityFeePerGas:o,nonce:d,to:m,value:h},"sendUnsignedTransaction");return await e.request({method:"eth_sendUnsignedTransaction",params:[g]})}async function sd(e,t){e.mode==="ganache"?t?await e.request({method:"miner_start"}):await e.request({method:"miner_stop"}):await e.request({method:"evm_setAutomine",params:[t]})}async function nd(e,{address:t,value:a}){e.mode==="ganache"?await e.request({method:"evm_setAccountBalance",params:[t,x(a)]}):await e.request({method:`${e.mode}_setBalance`,params:[t,x(a)]})}async function rd(e,{gasLimit:t}){await e.request({method:"evm_setBlockGasLimit",params:[x(t)]})}async function od(e,{interval:t}){const a=e.mode==="hardhat"?t*1e3:t;await e.request({method:`${e.mode}_setBlockTimestampInterval`,params:[a]})}async function id(e,{address:t,bytecode:a}){e.mode==="ganache"?await e.request({method:"evm_setAccountCode",params:[t,a]}):await e.request({method:`${e.mode}_setCode`,params:[t,a]})}async function cd(e,{address:t}){await e.request({method:`${e.mode}_setCoinbase`,params:[t]})}async function ud(e,{interval:t}){const a=e.mode==="hardhat"?t*1e3:t;await e.request({method:"evm_setIntervalMining",params:[a]})}async function dd(e,t){await e.request({method:`${e.mode}_setLoggingEnabled`,params:[t]})}async function ld(e,{gasPrice:t}){await e.request({method:`${e.mode}_setMinGasPrice`,params:[x(t)]})}async function hd(e,{baseFeePerGas:t}){await e.request({method:`${e.mode}_setNextBlockBaseFeePerGas`,params:[x(t)]})}async function fd(e,{timestamp:t}){await e.request({method:"evm_setNextBlockTimestamp",params:[x(t)]})}async function md(e,{address:t,nonce:a}){await e.request({method:`${e.mode}_setNonce`,params:[t,x(a)]})}async function gd(e,t){await e.request({method:`${e.mode}_setRpcUrl`,params:[t]})}async function pd(e,{address:t,index:a,value:s}){await e.request({method:`${e.mode}_setStorageAt`,params:[t,typeof a=="number"?x(a):a,s]})}async function yd(e){return await e.request({method:"evm_snapshot"})}async function bd(e,{address:t}){await e.request({method:`${e.mode}_stopImpersonatingAccount`,params:[t]})}async function wd(e,{chain:t}){const{id:a,name:s,nativeCurrency:n,rpcUrls:r,blockExplorers:i}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:x(a),chainName:s,nativeCurrency:n,rpcUrls:r.default.http,blockExplorerUrls:i?Object.values(i).map(({url:c})=>c):void 0}]},{dedupe:!0,retryCount:0})}function _d(e,t){const{abi:a,args:s,bytecode:n,...r}=t,i=ea({abi:a,args:s,bytecode:n});return We(e,{...r,...r.authorizationList?{to:null}:{},data:i})}async function Ed(e){var a;return((a=e.account)==null?void 0:a.type)==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(s=>ta(s))}async function xd(e,t={}){const{account:a=e.account,chainId:s}=t,n=a?X(a):void 0,r=s?[n==null?void 0:n.address,[x(s)]]:[n==null?void 0:n.address],i=await e.request({method:"wallet_getCapabilities",params:r}),c={};for(const[o,d]of Object.entries(i)){c[Number(o)]={};for(let[m,h]of Object.entries(d))m==="addSubAccount"&&(m="unstable_addSubAccount"),c[Number(o)][m]=h}return typeof s=="number"?c[s]:c}async function Td(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}async function Sd(e){return(await e.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(a=>L(a))}async function vd(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}async function Pd(e,t){const{chain:a=e.chain}=t,s=t.timeout??Math.max(((a==null?void 0:a.blockTime)??0)*3,5e3),n=await P(e,fa,"sendCalls")(t);return await P(e,ma,"waitForCallsStatus")({...t,id:n.id,timeout:s})}const Le=new ts(128);async function Ba(e,t){var tt,at,st,nt,rt,ot;const{account:a=e.account,assertChainId:s=!0,chain:n=e.chain,accessList:r,authorizationList:i,blobs:c,data:o,dataSuffix:d=typeof e.dataSuffix=="string"?e.dataSuffix:(tt=e.dataSuffix)==null?void 0:tt.value,gas:m,gasPrice:h,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:g,pollingInterval:y,throwOnReceiptRevert:E,type:w,value:v,...A}=t,T=t.timeout??Math.max(((n==null?void 0:n.blockTime)??0)*3,5e3);if(typeof a>"u")throw new be({docsPath:"/docs/actions/wallet/sendTransactionSync"});const p=a?X(a):null;let I;try{Ke(t);const N=await(async()=>{if(t.to)return t.to;if(t.to!==null&&i&&i.length>0)return await es({authorization:i[0]}).catch(()=>{throw new ze("`to` is required. Could not infer from `authorizationList`.")})})();if((p==null?void 0:p.type)==="json-rpc"||p===null){let K;n!==null&&(K=await P(e,me,"getChainId")({}),s&&Je({currentChainId:K,chain:n}));const se=(nt=(st=(at=e.chain)==null?void 0:at.formatters)==null?void 0:st.transactionRequest)==null?void 0:nt.format,J=(se||ye)({...Zt(A,{format:se}),accessList:r,account:p,authorizationList:i,blobs:c,chainId:K,data:d?fe([o??"0x",d]):o,gas:m,gasPrice:h,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:g,to:N,type:w,value:v},"sendTransaction"),ne=Le.get(e.uid),Ua=ne?"wallet_sendTransaction":"eth_sendTransaction",Da=await(async()=>{try{return await e.request({method:Ua,params:[J]},{retryCount:0})}catch(ct){if(ne===!1)throw ct;const F=ct;if(F.name==="InvalidInputRpcError"||F.name==="InvalidParamsRpcError"||F.name==="MethodNotFoundRpcError"||F.name==="MethodNotSupportedRpcError")return await e.request({method:"wallet_sendTransaction",params:[J]},{retryCount:0}).then(Re=>(Le.set(e.uid,!0),Re)).catch(Re=>{const Be=Re;throw Be.name==="MethodNotFoundRpcError"||Be.name==="MethodNotSupportedRpcError"?(Le.set(e.uid,!1),F):Be});throw F}})(),Ae=await P(e,as,"waitForTransactionReceipt")({checkReplacement:!1,hash:Da,pollingInterval:y,timeout:T});if(E&&Ae.status==="reverted")throw new ht({receipt:Ae});return Ae}if((p==null?void 0:p.type)==="local"){if(p.nonceManager&&typeof g>"u"){const J=A.chainId,ne=await(async()=>typeof J=="number"?J:n?n.id:P(e,me,"getChainId")({}))();I={address:p.address,chainId:ne}}const K=await P(e,aa,"prepareTransactionRequest")({account:p,accessList:r,authorizationList:i,blobs:c,chain:n,data:d?fe([o??"0x",d]):o,gas:m,gasPrice:h,maxFeePerBlobGas:l,maxFeePerGas:u,maxPriorityFeePerGas:f,nonce:g,nonceManager:p.nonceManager,parameters:[...ss,"sidecars"],type:w,value:v,...A,to:N}),se=(rt=n==null?void 0:n.serializers)==null?void 0:rt.transaction,it=await p.signTransaction(K,{serializer:se});return await P(e,sa,"sendRawTransactionSync")({serializedTransaction:it,throwOnReceiptRevert:E,timeout:t.timeout})}throw(p==null?void 0:p.type)==="smart"?new he({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"}):new he({docsPath:"/docs/actions/wallet/sendTransactionSync",type:p==null?void 0:p.type})}catch(N){throw N instanceof he?N:(I&&!(N instanceof ht)&&((ot=p==null?void 0:p.nonceManager)==null||ot.reset(I)),ns(N,{...t,account:p,chain:t.chain||void 0}))}}async function Id(e,t){const{id:a}=t;await e.request({method:"wallet_showCallsStatus",params:[a]})}async function Cd(e,t){const{account:a=e.account}=t;if(!a)throw new be({docsPath:"/docs/eip7702/signAuthorization"});const s=X(a);if(!s.signAuthorization)throw new he({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:s.type});const n=await ga(e,t);return s.signAuthorization(n)}async function Ad(e,t){var d,m,h,l;const{account:a=e.account,chain:s=e.chain,...n}=t;if(!a)throw new be({docsPath:"/docs/actions/wallet/signTransaction"});const r=X(a);Ke({account:r,...t});const i=await P(e,me,"getChainId")({});s!==null&&Je({currentChainId:i,chain:s});const c=(s==null?void 0:s.formatters)||((d=e.chain)==null?void 0:d.formatters),o=((m=c==null?void 0:c.transactionRequest)==null?void 0:m.format)||ye;return r.signTransaction?r.signTransaction({...n,account:r,chainId:i},{serializer:(l=(h=e.chain)==null?void 0:h.serializers)==null?void 0:l.transaction}):await e.request({method:"eth_signTransaction",params:[{...o({...n,account:r},"signTransaction"),chainId:x(i),from:r.address}]},{retryCount:0})}async function Rd(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:x(t)}]},{retryCount:0})}async function Bd(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}async function D(e,t){return D.internal(e,We,"sendTransaction",t)}(function(e){async function t(a,s,n,r){const{abi:i,account:c=a.account,address:o,args:d,functionName:m,...h}=r;if(typeof c>"u")throw new be({docsPath:"/docs/contract/writeContract"});const l=c?X(c):null,u=Ge({abi:i,args:d,functionName:m});try{return await P(a,s,n)({data:u,to:o,account:l,...h})}catch(f){throw na(f,{abi:i,address:o,args:d,docsPath:"/docs/contract/writeContract",functionName:m,sender:l==null?void 0:l.address})}}e.internal=t})(D||(D={}));async function Md(e,t){return D.internal(e,Ba,"sendTransactionSync",t)}function qd({abi:e,address:t,client:a}){const s=a,[n,r]=s?"public"in s&&"wallet"in s?[s.public,s.wallet]:"public"in s?[s.public,void 0]:"wallet"in s?[void 0,s.wallet]:[s,s]:[void 0,void 0],i=n!=null,c=r!=null,o={};let d=!1,m=!1,h=!1;for(const l of e)if(l.type==="function"?l.stateMutability==="view"||l.stateMutability==="pure"?d=!0:m=!0:l.type==="event"&&(h=!0),d&&m&&h)break;return i&&(d&&(o.read=new Proxy({},{get(l,u){return(...f)=>{const{args:g,options:y}=ce(f);return P(n,rs,"readContract")({abi:e,address:t,functionName:u,args:g,...y})}}})),m&&(o.simulate=new Proxy({},{get(l,u){return(...f)=>{const{args:g,options:y}=ce(f);return P(n,os,"simulateContract")({abi:e,address:t,functionName:u,args:g,...y})}}})),h&&(o.createEventFilter=new Proxy({},{get(l,u){return(...f)=>{const g=e.find(w=>w.type==="event"&&w.name===u),{args:y,options:E}=ke(f,g);return P(n,is,"createContractEventFilter")({abi:e,address:t,eventName:u,args:y,...E})}}}),o.getEvents=new Proxy({},{get(l,u){return(...f)=>{const g=e.find(w=>w.type==="event"&&w.name===u),{args:y,options:E}=ke(f,g);return P(n,cs,"getContractEvents")({abi:e,address:t,eventName:u,args:y,...E})}}}),o.watchEvent=new Proxy({},{get(l,u){return(...f)=>{const g=e.find(w=>w.type==="event"&&w.name===u),{args:y,options:E}=ke(f,g);return P(n,us,"watchContractEvent")({abi:e,address:t,eventName:u,args:y,...E})}}}))),c&&m&&(o.write=new Proxy({},{get(l,u){return(...f)=>{const{args:g,options:y}=ce(f);return P(r,D,"writeContract")({abi:e,address:t,functionName:u,args:g,...y})}}})),(i||c)&&m&&(o.estimateGas=new Proxy({},{get(l,u){return(...f)=>{const{args:g,options:y}=ce(f);return P(n??r,ds,"estimateContractGas")({abi:e,address:t,functionName:u,args:g,...y,account:y.account??r.account})}}})),o.address=t,o.abi=e,o}function ce(e){const t=e.length&&Array.isArray(e[0]),a=t?e[0]:[],s=(t?e[1]:e[0])??{};return{args:a,options:s}}function ke(e,t){let a=!1;Array.isArray(e[0])?a=!0:e.length===1?a=t.inputs.some(r=>r.indexed):e.length===2&&(a=!0);const s=a?e[0]:void 0,n=(a?e[1]:e[0])??{};return{args:s,options:n}}function Ma({mode:e}){return t=>{const a=t.extend(()=>({mode:e}));return{dropTransaction:s=>Gu(a,s),dumpState:()=>zu(a),getAutomine:()=>Vu(a),getTxpoolContent:()=>$u(a),getTxpoolStatus:()=>Wu(a),impersonateAccount:s=>Ku(a,s),increaseTime:s=>Ju(a,s),inspectTxpool:()=>Yu(a),loadState:s=>Qu(a,s),mine:s=>Xu(a,s),removeBlockTimestampInterval:()=>Zu(a),reset:s=>ed(a,s),revert:s=>td(a,s),sendUnsignedTransaction:s=>ad(a,s),setAutomine:s=>sd(a,s),setBalance:s=>nd(a,s),setBlockGasLimit:s=>rd(a,s),setBlockTimestampInterval:s=>od(a,s),setCode:s=>id(a,s),setCoinbase:s=>cd(a,s),setIntervalMining:s=>ud(a,s),setLoggingEnabled:s=>dd(a,s),setMinGasPrice:s=>ld(a,s),setNextBlockBaseFeePerGas:s=>hd(a,s),setNextBlockTimestamp:s=>fd(a,s),setNonce:s=>md(a,s),setRpcUrl:s=>gd(a,s),setStorageAt:s=>pd(a,s),snapshot:()=>yd(a),stopImpersonatingAccount:s=>bd(a,s)}}}function Ld(e){const{key:t="test",name:a="Test Client",mode:s}=e;return Ye({...e,key:t,name:a,type:"testClient"}).extend(r=>({mode:s,...Ma({mode:s})(r)}))}function qa(e){return{addChain:t=>wd(e,t),deployContract:t=>_d(e,t),fillTransaction:t=>ms(e,t),getAddresses:()=>Ed(e),getCallsStatus:t=>eu(e,t),getCapabilities:t=>xd(e,t),getChainId:()=>me(e),getPermissions:()=>Td(e),prepareAuthorization:t=>ga(e,t),prepareTransactionRequest:t=>aa(e,t),requestAddresses:()=>Sd(e),requestPermissions:t=>vd(e,t),sendCalls:t=>fa(e,t),sendCallsSync:t=>Pd(e,t),sendRawTransaction:t=>fs(e,t),sendRawTransactionSync:t=>sa(e,t),sendTransaction:t=>We(e,t),sendTransactionSync:t=>Ba(e,t),showCallsStatus:t=>Id(e,t),signAuthorization:t=>Cd(e,t),signMessage:t=>hs(e,t),signTransaction:t=>Ad(e,t),signTypedData:t=>ls(e,t),switchChain:t=>Rd(e,t),waitForCallsStatus:t=>ma(e,t),watchAsset:t=>Bd(e,t),writeContract:t=>D(e,t),writeContractSync:t=>Md(e,t)}}function kd(e){const{key:t="wallet",name:a="Wallet Client",transport:s}=e;return Ye({...e,key:t,name:a,transport:s,type:"walletClient"}).extend(qa)}function Od(e,t={}){const{keepAlive:a,key:s="webSocket",methods:n,name:r="WebSocket JSON-RPC",reconnect:i,retryDelay:c}=t;return({chain:o,retryCount:d,timeout:m})=>{var g;const h=t.retryCount??d,l=m??t.timeout??1e4,u=e||((g=o==null?void 0:o.rpcUrls.default.webSocket)==null?void 0:g[0]),f={keepAlive:a,reconnect:i};if(!u)throw new ra;return oa({key:s,methods:n,name:r,async request({method:y,params:E}){const w={method:y,params:E},v=await qe(u,f),{error:A,result:T}=await v.requestAsync({body:w,timeout:l});if(A)throw new ia({body:w,error:A,url:u});return T},retryCount:h,retryDelay:c,timeout:l,type:"webSocket"},{getSocket(){return gs(u)},getRpcClient(){return qe(u,f)},async subscribe({params:y,onData:E,onError:w}){const v=await qe(u,f),{result:A}=await new Promise((T,p)=>v.request({body:{method:"eth_subscribe",params:y},onError(I){p(I),w==null||w(I)},onResponse(I){if(I.error){p(I.error),w==null||w(I.error);return}if(typeof I.id=="number"){T(I);return}I.method==="eth_subscription"&&E(I.params)}}));return{subscriptionId:A,async unsubscribe(){return new Promise(T=>v.request({body:{method:"eth_unsubscribe",params:[A]},onResponse:T}))}}}})}}class Nd extends Error{constructor(t,a){super(a),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t,this.details=a}}const Oe="/docs/contract/decodeDeployData";function jd(e){const{abi:t,bytecode:a,data:s}=e;if(s===a)return{bytecode:a};const n=t.find(i=>"type"in i&&i.type==="constructor");if(!n)throw new ca({docsPath:Oe});if(!("inputs"in n))throw new He({docsPath:Oe});if(!n.inputs||n.inputs.length===0)throw new He({docsPath:Oe});return{args:$e(n.inputs,`0x${s.replace(a,"")}`),bytecode:a}}function Fd(e){const t=e.to??(typeof e.blobs[0]=="string"?"hex":"bytes"),a=typeof e.blobs[0]=="string"?e.blobs.map(c=>V(c)):e.blobs,s=a.reduce((c,o)=>c+o.length,0),n=je(new Uint8Array(s));let r=!0;for(const c of a){const o=je(c);for(;r&&o.position<c.length;){o.incrementPosition(1);let d=31;c.length-o.position<31&&(d=c.length-o.position);for(const m in Array.from({length:d})){const h=o.readByte();if(h===128&&!o.inspectBytes(o.remaining).includes(128)){r=!1;break}n.pushByte(h)}}}const i=n.bytes.slice(0,n.position);return t==="hex"?U(i):i}function Hd(e){const{sidecars:t,version:a}=e,s=e.to??(typeof t[0].blob=="string"?"hex":"bytes"),n=[];for(const{commitment:r}of t)n.push(ua({commitment:r,to:s,version:a}));return n}const Ud=2147483648;function Dd(e){if(e===1)return 60n;if(e>=Ud||e<0)throw new da({chainId:e});return BigInt((2147483648|e)>>>0)}function La({blobToKzgCommitment:e,computeBlobKzgProof:t}){return{blobToKzgCommitment:e,computeBlobKzgProof:t}}function Gd(e,t){try{e.loadTrustedSetup(t)}catch(a){const s=a;if(!s.message.includes("trusted setup is already loaded"))throw s}return La(e)}function zd({r:e,yParityAndS:t}){const a=V(t),s=a[0]&128?1:0,n=a;return s===1&&(n[0]&=127),{r:e,s:U(n),yParity:s}}function xt(e){const{r:t,s:a}=la.Signature.fromCompact(e.slice(2,130));return{r:x(t,{size:32}),yParityAndS:x(a,{size:32})}}async function Vd(e){const{serializedTransaction:t,signature:a}=e,s=Ra(t),n=a??{r:s.r,s:s.s,v:s.v,yParity:s.yParity},r=ha({...s,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await Q({hash:Y(r),signature:n})}function Tt({r:e,yParityAndS:t}){return`0x${new la.Signature(_(e),_(t)).toCompactHex()}`}function $d(e){const{r:t,s:a,v:s,yParity:n}=e,r=Number(n??s-27n);let i=a;if(r===1){const c=V(a);c[0]|=128,i=U(c)}return{r:t,yParityAndS:i}}const Wd=Object.freeze(Object.defineProperty({__proto__:null,AbiConstructorNotFoundError:ca,AbiConstructorParamsNotFoundError:He,AbiDecodingDataSizeInvalidError:ps,AbiDecodingDataSizeTooSmallError:ys,AbiDecodingZeroDataError:bs,AbiEncodingArrayLengthMismatchError:ws,AbiEncodingBytesSizeMismatchError:_s,AbiEncodingLengthMismatchError:Es,AbiErrorInputsNotFoundError:xs,AbiErrorNotFoundError:Ts,AbiErrorSignatureNotFoundError:Ss,AbiEventNotFoundError:vs,AbiEventSignatureEmptyTopicsError:Ps,AbiEventSignatureNotFoundError:Is,AbiFunctionNotFoundError:Cs,AbiFunctionOutputsNotFoundError:As,AbiFunctionSignatureNotFoundError:Rs,AccountStateConflictError:Bs,AtomicReadyWalletRejectedUpgradeError:Ms,AtomicityNotSupportedError:qs,BaseError:ze,BaseFeeScalarError:Ls,BlockNotFoundError:ks,BundleFailedError:tu,BundleTooLargeError:Os,BytesSizeMismatchError:Ns,CallExecutionError:js,ChainDisconnectedError:Fs,ChainDoesNotSupportContract:Hs,ChainMismatchError:Us,ChainNotFoundError:Ds,CircularReferenceError:Gs,ClientChainNotConfiguredError:zs,ContractFunctionExecutionError:Vs,ContractFunctionRevertedError:$s,ContractFunctionZeroDataError:Ws,CounterfactualDeploymentFailedError:Ks,DecodeLogDataMismatch:Js,DecodeLogTopicsMismatch:Ys,DuplicateIdError:Qs,EIP1193ProviderRpcError:Nd,Eip1559FeesNotSupportedError:Xs,EnsAvatarInvalidNftUriError:Zs,EnsAvatarUnsupportedNamespaceError:en,EnsAvatarUriResolutionError:tn,EnsInvalidChainIdError:da,EstimateGasExecutionError:an,ExecutionRevertedError:sn,FeeCapTooHighError:nn,FeeCapTooLowError:rn,FeeConflictError:on,FilterTypeNotSupportedError:cn,HttpRequestError:Ot,InsufficientFundsError:un,IntegerOutOfRangeError:dn,InternalRpcError:ln,IntrinsicGasTooHighError:hn,IntrinsicGasTooLowError:fn,InvalidAbiDecodingTypeError:mn,InvalidAbiEncodingTypeError:gn,InvalidAbiItemError:pn,InvalidAbiParameterError:Rt,InvalidAbiParametersError:yn,InvalidAbiTypeParameterError:bn,InvalidAddressError:Jt,InvalidArrayError:wn,InvalidBytesBooleanError:_n,InvalidChainIdError:En,InvalidDecimalNumberError:xn,InvalidDefinitionTypeError:Tn,InvalidDomainError:Sn,InvalidFunctionModifierError:vn,InvalidHexBooleanError:Pn,InvalidHexValueError:Nt,InvalidInputRpcError:In,InvalidLegacyVError:Wt,InvalidModifierError:Cn,InvalidParameterError:An,InvalidParamsRpcError:Rn,InvalidParenthesisError:Bn,InvalidPrimaryTypeError:Mn,InvalidRequestRpcError:qn,InvalidSerializableTransactionError:Ln,InvalidSerializedTransactionError:$,InvalidSerializedTransactionTypeError:Dt,InvalidSignatureError:kn,InvalidStorageKeySizeError:On,InvalidStructSignatureError:Nn,InvalidStructTypeError:jn,JsonRpcVersionUnsupportedError:Fn,LimitExceededRpcError:Hn,MaxFeePerGasTooLowError:Un,MethodNotFoundRpcError:Dn,MethodNotSupportedRpcError:Gn,NonceMaxValueError:zn,NonceTooHighError:Vn,NonceTooLowError:$n,ParseRpcError:Wn,ProviderDisconnectedError:Kn,ProviderRpcError:Jn,RawContractError:Yn,ResourceNotFoundRpcError:Qn,ResourceUnavailableRpcError:Xn,RpcError:Zn,RpcRequestError:ia,SizeExceedsPaddingSizeError:er,SizeOverflowError:tr,SliceOffsetOutOfBoundsError:ar,SocketClosedError:sr,SolidityProtectedKeywordError:nr,StateAssignmentConflictError:rr,SwitchChainError:or,TimeoutError:ir,TipAboveFeeCapError:cr,TransactionExecutionError:ur,TransactionNotFoundError:dr,TransactionReceiptNotFoundError:lr,TransactionRejectedRpcError:hr,TransactionTypeNotSupportedError:fr,UnauthorizedProviderError:mr,UnknownBundleIdError:gr,UnknownNodeError:pr,UnknownRpcError:yr,UnknownSignatureError:br,UnknownTypeError:wr,UnsupportedChainIdError:_r,UnsupportedNonOptionalCapabilityError:Er,UnsupportedPackedAbiType:xr,UnsupportedProviderMethodError:Tr,UrlRequiredError:ra,UserRejectedRequestError:Sr,WaitForCallsStatusTimeoutError:au,WaitForTransactionReceiptTimeoutError:vr,WebSocketRequestError:Pr,assertCurrentChain:Je,assertRequest:Ke,assertTransactionEIP1559:Gt,assertTransactionEIP2930:zt,assertTransactionLegacy:$t,blobsToCommitments:Ir,blobsToProofs:Cr,boolToBytes:Ar,boolToHex:Rr,bytesToBigInt:Br,bytesToBool:Mr,bytesToHex:U,bytesToNumber:qr,bytesToRlp:Lr,bytesToString:kr,ccipFetch:Ue,ccipReadTunnel:yu,ccipRequest:Ue,checksumAddress:ta,commitmentToVersionedHash:ua,commitmentsToVersionedHashes:Or,compactSignatureToHex:Tt,compactSignatureToSignature:zd,concat:fe,concatBytes:Nr,concatHex:jr,createClient:Ye,createNonceManager:su,createPublicClient:nu,createTestClient:Ld,createTransport:oa,createWalletClient:kd,custom:Fr,decodeAbiParameters:$e,decodeDeployData:jd,decodeErrorResult:kt,decodeEventLog:Hr,decodeFunctionData:Ur,decodeFunctionResult:Lt,defineBlock:Dr,defineChain:Gr,defineKzg:La,defineTransaction:zr,defineTransactionReceipt:Vr,defineTransactionRequest:$r,deploylessCallViaBytecodeBytecode:Wr,deploylessCallViaFactoryBytecode:Kr,domainSeparator:Jr,encodeAbiParameters:Yr,encodeDeployData:ea,encodeErrorResult:Qr,encodeEventTopics:Xr,encodeFunctionData:Ge,encodeFunctionResult:Zr,encodePacked:eo,erc1155Abi:to,erc20Abi:ao,erc20Abi_bytes32:so,erc4626Abi:no,erc6492SignatureValidatorAbi:ft,erc6492SignatureValidatorByteCode:mt,erc721Abi:ro,ethAddress:oo,etherUnits:io,extendSchema:co,extractChain:bu,fallback:cu,formatBlock:uo,formatEther:lo,formatGwei:ho,formatLog:fo,formatTransaction:mo,formatTransactionReceipt:go,formatTransactionRequest:ye,formatUnits:po,fromBlobs:Fd,fromBytes:yo,fromHex:bo,fromRlp:Qe,getAbiItem:wo,getAddress:L,getChainContractAddress:_o,getContract:qd,getContractAddress:pu,getContractError:na,getCreate2Address:ya,getCreateAddress:pa,getEventSelector:gt,getEventSignature:oe,getFunctionSelector:pt,getFunctionSignature:oe,getSerializedTransactionType:Aa,getTransactionType:Eo,getTypesForEIP712Domain:xo,gweiUnits:Xt,hashDomain:To,hashMessage:Ht,hashStruct:So,hashTypedData:Ut,hexToBigInt:_,hexToBool:vo,hexToBytes:V,hexToCompactSignature:xt,hexToNumber:C,hexToRlp:Po,hexToSignature:wt,hexToString:Io,http:Co,isAddress:Kt,isAddressEqual:pe,isBytes:De,isErc6492Signature:va,isErc8010Signature:Pa,isHash:wa,isHex:b,keccak256:Y,labelhash:Ao,maxInt104:Ro,maxInt112:Bo,maxInt120:Mo,maxInt128:qo,maxInt136:Lo,maxInt144:ko,maxInt152:Oo,maxInt16:No,maxInt160:jo,maxInt168:Fo,maxInt176:Ho,maxInt184:Uo,maxInt192:Do,maxInt200:Go,maxInt208:zo,maxInt216:Vo,maxInt224:$o,maxInt232:Wo,maxInt24:Ko,maxInt240:Jo,maxInt248:Yo,maxInt256:Qo,maxInt32:Xo,maxInt40:Zo,maxInt48:ei,maxInt56:ti,maxInt64:ai,maxInt72:si,maxInt8:ni,maxInt80:ri,maxInt88:oi,maxInt96:ii,maxUint104:ci,maxUint112:ui,maxUint120:di,maxUint128:li,maxUint136:hi,maxUint144:fi,maxUint152:mi,maxUint16:gi,maxUint160:pi,maxUint168:yi,maxUint176:bi,maxUint184:wi,maxUint192:_i,maxUint200:Ei,maxUint208:xi,maxUint216:Ti,maxUint224:Si,maxUint232:vi,maxUint24:Pi,maxUint240:Ii,maxUint248:Ci,maxUint256:Ai,maxUint32:Ri,maxUint40:Bi,maxUint48:Mi,maxUint56:qi,maxUint64:Li,maxUint72:ki,maxUint8:Oi,maxUint80:Ni,maxUint88:ji,maxUint96:Fi,minInt104:Hi,minInt112:Ui,minInt120:Di,minInt128:Gi,minInt136:zi,minInt144:Vi,minInt152:$i,minInt16:Wi,minInt160:Ki,minInt168:Ji,minInt176:Yi,minInt184:Qi,minInt192:Xi,minInt200:Zi,minInt208:ec,minInt216:tc,minInt224:ac,minInt232:sc,minInt24:nc,minInt240:rc,minInt248:oc,minInt256:ic,minInt32:cc,minInt40:uc,minInt48:dc,minInt56:lc,minInt64:hc,minInt72:fc,minInt8:mc,minInt80:gc,minInt88:pc,minInt96:yc,multicall3Abi:bc,namehash:wc,nonceManager:ru,numberToBytes:_c,numberToHex:x,offchainLookup:du,offchainLookupAbiItem:lu,offchainLookupSignature:hu,pad:Bt,padBytes:Ec,padHex:Fe,parseAbi:xc,parseAbiItem:Tc,parseAbiParameter:gu,parseAbiParameters:Sc,parseCompactSignature:xt,parseErc6492Signature:Ru,parseErc8010Signature:Bu,parseEther:vc,parseEventLogs:Pc,parseGwei:Du,parseSignature:wt,parseTransaction:Ra,parseUnits:Qt,prepareEncodeFunctionData:Ic,presignMessagePrefix:Cc,publicActions:Ac,recoverAddress:Q,recoverMessageAddress:Ia,recoverPublicKey:Rc,recoverTransactionAddress:Vd,recoverTypedDataAddress:Ca,ripemd160:Au,rpcSchema:Bc,rpcTransactionType:Mc,serializeAccessList:qc,serializeCompactSignature:Tt,serializeErc6492Signature:ou,serializeErc8010Signature:Mu,serializeSignature:yt,serializeTransaction:ha,serializeTypedData:Lc,setErrorConfig:kc,setupKzg:Gd,sha256:Oc,shouldThrow:uu,sidecarsToVersionedHashes:Hd,signatureToCompactSignature:$d,signatureToHex:yt,size:jt,slice:Mt,sliceBytes:Nc,sliceHex:Ve,stringToBytes:jc,stringToHex:Fc,stringify:Hc,testActions:Ma,toBlobSidecars:Vt,toBlobs:Uc,toBytes:O,toCoinType:Dd,toEventHash:bt,toEventSelector:gt,toEventSignature:oe,toFunctionHash:bt,toFunctionSelector:pt,toFunctionSignature:oe,toHex:Ft,toPrefixedMessage:Dc,toRlp:qt,transactionType:Gc,trim:Yt,universalSignatureValidatorAbi:ft,universalSignatureValidatorByteCode:mt,validateTypedData:zc,verifyHash:qu,verifyMessage:Lu,verifyTypedData:ku,walletActions:qa,webSocket:Od,weiUnits:Vc,withCache:$c,withRetry:Wc,withTimeout:Kc,zeroAddress:Jc,zeroHash:iu},Symbol.toStringTag,{value:"Module"}));var Xe={},Ee={},ka={},ge={},Oa={},ee={},te={};Object.defineProperty(te,"__esModule",{value:!0});te.getSDKVersion=void 0;const Kd=()=>"9.1.0";te.getSDKVersion=Kd;var xe={};Object.defineProperty(xe,"__esModule",{value:!0});xe.generateRequestId=void 0;const Jd=e=>e.toString(16).padStart(2,"0"),Yd=e=>{const t=new Uint8Array(e/2);return window.crypto.getRandomValues(t),Array.from(t,Jd).join("")},Qd=()=>typeof window<"u"?Yd(10):new Date().getTime().toString(36);xe.generateRequestId=Qd;Object.defineProperty(ee,"__esModule",{value:!0});ee.MessageFormatter=void 0;const Xd=te,Zd=xe;class Te{}ee.MessageFormatter=Te;Te.makeRequest=(e,t)=>({id:(0,Zd.generateRequestId)(),method:e,params:t,env:{sdkVersion:(0,Xd.getSDKVersion)()}});Te.makeResponse=(e,t,a)=>({id:e,success:!0,version:a,data:t});Te.makeErrorResponse=(e,t,a)=>({id:e,success:!1,error:t,version:a});var M={};Object.defineProperty(M,"__esModule",{value:!0});M.RestrictedMethods=M.Methods=void 0;var St;(function(e){e.sendTransactions="sendTransactions",e.rpcCall="rpcCall",e.getChainInfo="getChainInfo",e.getSafeInfo="getSafeInfo",e.getTxBySafeTxHash="getTxBySafeTxHash",e.getSafeBalances="getSafeBalances",e.signMessage="signMessage",e.signTypedMessage="signTypedMessage",e.getEnvironmentInfo="getEnvironmentInfo",e.getOffChainSignature="getOffChainSignature",e.requestAddressBook="requestAddressBook",e.wallet_getPermissions="wallet_getPermissions",e.wallet_requestPermissions="wallet_requestPermissions"})(St||(M.Methods=St={}));var vt;(function(e){e.requestAddressBook="requestAddressBook"})(vt||(M.RestrictedMethods=vt={}));(function(e){var t=S&&S.__createBinding||(Object.create?function(r,i,c,o){o===void 0&&(o=c);var d=Object.getOwnPropertyDescriptor(i,c);(!d||("get"in d?!i.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return i[c]}}),Object.defineProperty(r,o,d)}:function(r,i,c,o){o===void 0&&(o=c),r[o]=i[c]}),a=S&&S.__exportStar||function(r,i){for(var c in r)c!=="default"&&!Object.prototype.hasOwnProperty.call(i,c)&&t(i,r,c)};Object.defineProperty(e,"__esModule",{value:!0});const s=ee;class n{constructor(i=null,c=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer=typeof window>"u",this.isValidMessage=({origin:o,data:d,source:m})=>{const h=!d,l=!this.isServer&&m===window.parent,u=typeof d.version<"u"&&parseInt(d.version.split(".")[0]),f=typeof u=="number"&&u>=1;let g=!0;return Array.isArray(this.allowedOrigins)&&(g=this.allowedOrigins.find(y=>y.test(o))!==void 0),!h&&l&&f&&g},this.logIncomingMessage=o=>{console.info(`Safe Apps SDK v1: A message was received from origin ${o.origin}. `,o.data)},this.onParentMessage=o=>{this.isValidMessage(o)&&(this.debugMode&&this.logIncomingMessage(o),this.handleIncomingMessage(o.data))},this.handleIncomingMessage=o=>{const{id:d}=o,m=this.callbacks.get(d);m&&(m(o),this.callbacks.delete(d))},this.send=(o,d)=>{const m=s.MessageFormatter.makeRequest(o,d);if(this.isServer)throw new Error("Window doesn't exist");return window.parent.postMessage(m,"*"),new Promise((h,l)=>{this.callbacks.set(m.id,u=>{if(!u.success){l(new Error(u.error));return}h(u)})})},this.allowedOrigins=i,this.debugMode=c,this.isServer||window.addEventListener("message",this.onParentMessage)}}e.default=n,a(M,e)})(Oa);var Se={},ve={},Pe={};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.isObjectEIP712TypedData=void 0;const el=e=>typeof e=="object"&&e!=null&&"domain"in e&&"types"in e&&"message"in e;Pe.isObjectEIP712TypedData=el;var Na={};Object.defineProperty(Na,"__esModule",{value:!0});var ja={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferDirection=e.TransactionStatus=e.TokenType=e.Operation=void 0;var t=Xc;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}})})(ja);var Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});(function(e){var t=S&&S.__createBinding||(Object.create?function(s,n,r,i){i===void 0&&(i=r);var c=Object.getOwnPropertyDescriptor(n,r);(!c||("get"in c?!n.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return n[r]}}),Object.defineProperty(s,i,c)}:function(s,n,r,i){i===void 0&&(i=r),s[i]=n[r]}),a=S&&S.__exportStar||function(s,n){for(var r in s)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,s,r)};Object.defineProperty(e,"__esModule",{value:!0}),a(Pe,e),a(Na,e),a(ja,e),a(Fa,e)})(ve);Object.defineProperty(Se,"__esModule",{value:!0});Se.TXs=void 0;const ue=M,tl=ve;class al{constructor(t){this.communicator=t}async getBySafeTxHash(t){if(!t)throw new Error("Invalid safeTxHash");return(await this.communicator.send(ue.Methods.getTxBySafeTxHash,{safeTxHash:t})).data}async signMessage(t){const a={message:t};return(await this.communicator.send(ue.Methods.signMessage,a)).data}async signTypedMessage(t){if(!(0,tl.isObjectEIP712TypedData)(t))throw new Error("Invalid typed data");return(await this.communicator.send(ue.Methods.signTypedMessage,{typedData:t})).data}async send({txs:t,params:a}){if(!t||!t.length)throw new Error("No transactions were passed");const s={txs:t,params:a};return(await this.communicator.send(ue.Methods.sendTransactions,s)).data}}Se.TXs=al;var Ie={},W={};Object.defineProperty(W,"__esModule",{value:!0});W.RPC_CALLS=void 0;W.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"};Object.defineProperty(Ie,"__esModule",{value:!0});Ie.Eth=void 0;const R=W,sl=M,q={defaultBlockParam:(e="latest")=>e,returnFullTxObjectParam:(e=!1)=>e,blockNumberToHex:e=>Number.isInteger(e)?`0x${e.toString(16)}`:e};class nl{constructor(t){this.communicator=t,this.call=this.buildRequest({call:R.RPC_CALLS.eth_call,formatters:[null,q.defaultBlockParam]}),this.getBalance=this.buildRequest({call:R.RPC_CALLS.eth_getBalance,formatters:[null,q.defaultBlockParam]}),this.getCode=this.buildRequest({call:R.RPC_CALLS.eth_getCode,formatters:[null,q.defaultBlockParam]}),this.getStorageAt=this.buildRequest({call:R.RPC_CALLS.eth_getStorageAt,formatters:[null,q.blockNumberToHex,q.defaultBlockParam]}),this.getPastLogs=this.buildRequest({call:R.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:R.RPC_CALLS.eth_getBlockByHash,formatters:[null,q.returnFullTxObjectParam]}),this.getBlockByNumber=this.buildRequest({call:R.RPC_CALLS.eth_getBlockByNumber,formatters:[q.blockNumberToHex,q.returnFullTxObjectParam]}),this.getTransactionByHash=this.buildRequest({call:R.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:R.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:R.RPC_CALLS.eth_getTransactionCount,formatters:[null,q.defaultBlockParam]}),this.getGasPrice=this.buildRequest({call:R.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=a=>this.buildRequest({call:R.RPC_CALLS.eth_estimateGas})([a]),this.setSafeSettings=this.buildRequest({call:R.RPC_CALLS.safe_setSettings})}buildRequest(t){const{call:a,formatters:s}=t;return async n=>{s&&Array.isArray(n)&&s.forEach((c,o)=>{c&&(n[o]=c(n[o]))});const r={call:a,params:n||[]};return(await this.communicator.send(sl.Methods.rpcCall,r)).data}}}Ie.Eth=nl;var Ce={};const rl=Yc(Wd);var G={};Object.defineProperty(G,"__esModule",{value:!0});G.MAGIC_VALUE_BYTES=G.MAGIC_VALUE=void 0;const ol="0x1626ba7e";G.MAGIC_VALUE=ol;const il="0x20c13b0b";G.MAGIC_VALUE_BYTES=il;var Ze={},ae={},j={};Object.defineProperty(j,"__esModule",{value:!0});j.PermissionsError=j.PERMISSIONS_REQUEST_REJECTED=void 0;j.PERMISSIONS_REQUEST_REJECTED=4001;class et extends Error{constructor(t,a,s){super(t),this.code=a,this.data=s,Object.setPrototypeOf(this,et.prototype)}}j.PermissionsError=et;Object.defineProperty(ae,"__esModule",{value:!0});ae.Wallet=void 0;const Ne=M,de=j;class cl{constructor(t){this.communicator=t}async getPermissions(){return(await this.communicator.send(Ne.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(t){if(!this.isPermissionRequestValid(t))throw new de.PermissionsError("Permissions request is invalid",de.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(Ne.Methods.wallet_requestPermissions,t)).data}catch{throw new de.PermissionsError("Permissions rejected",de.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(t){return t.every(a=>typeof a=="object"?Object.keys(a).every(s=>!!Object.values(Ne.RestrictedMethods).includes(s)):!1)}}ae.Wallet=cl;Object.defineProperty(Ze,"__esModule",{value:!0});const ul=ae,Pt=j,It=(e,t)=>t.some(a=>a.parentCapability===e),dl=()=>(e,t,a)=>{const s=a.value;return a.value=async function(){const n=new ul.Wallet(this.communicator);let r=await n.getPermissions();if(It(t,r)||(r=await n.requestPermissions([{[t]:{}}])),!It(t,r))throw new Pt.PermissionsError("Permissions rejected",Pt.PERMISSIONS_REQUEST_REJECTED);return s.apply(this)},a};Ze.default=dl;var ll=S&&S.__decorate||function(e,t,a,s){var n=arguments.length,r=n<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,a):s,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(e,t,a,s);else for(var c=e.length-1;c>=0;c--)(i=e[c])&&(r=(n<3?i(r):n>3?i(t,a,r):i(t,a))||r);return n>3&&r&&Object.defineProperty(t,a,r),r},hl=S&&S.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ce,"__esModule",{value:!0});Ce.Safe=void 0;const le=rl,Ct=G,k=M,At=W,fl=ve,ml=hl(Ze);class Ha{constructor(t){this.communicator=t}async getChainInfo(){return(await this.communicator.send(k.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(k.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:t="usd"}={}){return(await this.communicator.send(k.Methods.getSafeBalances,{currency:t})).data}async check1271Signature(t,a="0x"){const s=await this.getInfo(),n=(0,le.encodeFunctionData)({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:[t,a]}),r={call:At.RPC_CALLS.eth_call,params:[{to:s.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(k.Methods.rpcCall,r)).data.slice(0,10).toLowerCase()===Ct.MAGIC_VALUE}catch{return!1}}async check1271SignatureBytes(t,a="0x"){const s=await this.getInfo(),n=(0,le.encodeFunctionData)({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:[t,a]}),r={call:At.RPC_CALLS.eth_call,params:[{to:s.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(k.Methods.rpcCall,r)).data.slice(0,10).toLowerCase()===Ct.MAGIC_VALUE_BYTES}catch{return!1}}calculateMessageHash(t){return(0,le.hashMessage)(t)}calculateTypedMessageHash(t){const a=typeof t.domain.chainId=="object"?t.domain.chainId.toNumber():Number(t.domain.chainId);let s=t.primaryType;if(!s){const n=Object.values(t.types),r=Object.keys(t.types).filter(i=>n.every(c=>c.every(({type:o})=>o.replace("[","").replace("]","")!==i)));if(r.length===0||r.length>1)throw new Error("Please specify primaryType");s=r[0]}return(0,le.hashTypedData)({message:t.message,domain:{...t.domain,chainId:a,verifyingContract:t.domain.verifyingContract,salt:t.domain.salt},types:t.types,primaryType:s})}async getOffChainSignature(t){return(await this.communicator.send(k.Methods.getOffChainSignature,t)).data}async isMessageSigned(t,a="0x"){let s;if(typeof t=="string"&&(s=async()=>{const n=this.calculateMessageHash(t);return await this.isMessageHashSigned(n,a)}),(0,fl.isObjectEIP712TypedData)(t)&&(s=async()=>{const n=this.calculateTypedMessageHash(t);return await this.isMessageHashSigned(n,a)}),s)return await s();throw new Error("Invalid message type")}async isMessageHashSigned(t,a="0x"){const s=[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)];for(const n of s)if(await n(t,a))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(k.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(k.Methods.requestAddressBook,void 0)).data}}Ce.Safe=Ha;ll([(0,ml.default)()],Ha.prototype,"requestAddressBook",null);var gl=S&&S.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ge,"__esModule",{value:!0});const pl=gl(Oa),yl=Se,bl=Ie,wl=Ce,_l=ae;class El{constructor(t={}){const{allowedDomains:a=null,debug:s=!1}=t;this.communicator=new pl.default(a,s),this.eth=new bl.Eth(this.communicator),this.txs=new yl.TXs(this.communicator),this.safe=new wl.Safe(this.communicator),this.wallet=new _l.Wallet(this.communicator)}}ge.default=El;(function(e){var t=S&&S.__createBinding||(Object.create?function(i,c,o,d){d===void 0&&(d=o);var m=Object.getOwnPropertyDescriptor(c,o);(!m||("get"in m?!c.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return c[o]}}),Object.defineProperty(i,d,m)}:function(i,c,o,d){d===void 0&&(d=o),i[d]=c[o]}),a=S&&S.__exportStar||function(i,c){for(var o in i)o!=="default"&&!Object.prototype.hasOwnProperty.call(c,o)&&t(c,i,o)},s=S&&S.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.getSDKVersion=void 0;const n=s(ge);e.default=n.default,a(ge,e),a(ve,e),a(M,e),a(ee,e);var r=te;Object.defineProperty(e,"getSDKVersion",{enumerable:!0,get:function(){return r.getSDKVersion}}),a(W,e)})(ka);var z={};Object.defineProperty(z,"__esModule",{value:!0});z.numberToHex=z.getLowerCase=void 0;function xl(e){return e&&e.toLowerCase()}z.getLowerCase=xl;function Tl(e){return`0x${e.toString(16)}`}z.numberToHex=Tl;Object.defineProperty(Ee,"__esModule",{value:!0});Ee.SafeAppProvider=void 0;const H=ka,Sl=fu,B=z;class vl extends Sl.EventEmitter{constructor(t,a){super(),this.submittedTxs=new Map,this.safe=t,this.sdk=a}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(t){var n,r,i,c;const{method:a,params:s=[]}=t;switch(a){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return(0,B.numberToHex)(this.chainId);case"personal_sign":{const[l,u]=s;if(this.safe.safeAddress.toLowerCase()!==u.toLowerCase())throw new Error("The address or message hash is invalid");const f=await this.sdk.txs.signMessage(l);return("signature"in f?f.signature:void 0)||"0x"}case"eth_sign":{const[l,u]=s;if(this.safe.safeAddress.toLowerCase()!==l.toLowerCase()||!u.startsWith("0x"))throw new Error("The address or message hash is invalid");const f=await this.sdk.txs.signMessage(u);return("signature"in f?f.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{const[l,u]=s,f=typeof u=="string"?JSON.parse(u):u;if(this.safe.safeAddress.toLowerCase()!==l.toLowerCase())throw new Error("The address is invalid");const g=await this.sdk.txs.signTypedMessage(f);return("signature"in g?g.signature:void 0)||"0x"}case"eth_sendTransaction":const o={...s[0],value:s[0].value||"0",data:s[0].data||"0x"};typeof o.gas=="string"&&o.gas.startsWith("0x")&&(o.gas=parseInt(o.gas,16));const d=await this.sdk.txs.send({txs:[o],params:{safeTxGas:o.gas}});return this.submittedTxs.set(d.safeTxHash,{from:this.safe.safeAddress,hash:d.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:o.data,value:o.value,to:o.to,blockHash:null,blockNumber:null,transactionIndex:null}),d.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,B.getLowerCase)(s[0]),s[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,B.getLowerCase)(s[0]),s[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,B.getLowerCase)(s[0]),s[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,B.getLowerCase)(s[0]),s[1],s[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([s[0],s[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([s[0],s[1]]);case"eth_getTransactionByHash":let h=s[0];try{h=(await this.sdk.txs.getBySafeTxHash(h)).txHash||h}catch{}return this.submittedTxs.has(h)?this.submittedTxs.get(h):this.sdk.eth.getTransactionByHash([h]).then(l=>(l&&(l.hash=s[0]),l));case"eth_getTransactionReceipt":{let l=s[0];try{l=(await this.sdk.txs.getBySafeTxHash(l)).txHash||l}catch{}return this.sdk.eth.getTransactionReceipt([l]).then(u=>(u&&(u.transactionHash=s[0]),u))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(s[0]);case"eth_call":return this.sdk.eth.call([s[0],s[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([s[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(s[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([s[0]]);case"wallet_sendCalls":{const{from:l,calls:u,chainId:f}=s[0];if(f!==(0,B.numberToHex)(this.chainId))throw new Error(`Safe is not on chain ${f}`);if(l!==this.safe.safeAddress)throw Error("Invalid from address");const g=u.map((w,v)=>{if(!w.to)throw new Error(`Invalid call #${v}: missing "to" field`);return{to:w.to,data:w.data??"0x",value:w.value??(0,B.numberToHex)(0)}}),{safeTxHash:y}=await this.sdk.txs.send({txs:g});return{id:y}}case"wallet_getCallsStatus":{const l=s[0],u={[H.TransactionStatus.AWAITING_CONFIRMATIONS]:100,[H.TransactionStatus.AWAITING_EXECUTION]:100,[H.TransactionStatus.SUCCESS]:200,[H.TransactionStatus.CANCELLED]:400,[H.TransactionStatus.FAILED]:500},f=await this.sdk.txs.getBySafeTxHash(l),g={version:"1.0",id:l,chainId:(0,B.numberToHex)(this.chainId),status:u[f.txStatus]};if(!f.txHash)return g;const y=await this.sdk.eth.getTransactionReceipt([f.txHash]);if(!y)return g;const E=((r=(n=f.txData)==null?void 0:n.dataDecoded)==null?void 0:r.method)!=="multiSend"?1:((c=(i=f.txData.dataDecoded.parameters)==null?void 0:i[0].valueDecoded)==null?void 0:c.length)??1,w=Number(y.blockNumber),v=Number(y.gasUsed);return g.receipts=Array(E).fill({logs:y.logs,status:(0,B.numberToHex)(f.txStatus===H.TransactionStatus.SUCCESS?1:0),blockHash:y.blockHash,blockNumber:(0,B.numberToHex)(w),gasUsed:(0,B.numberToHex)(v),transactionHash:f.txHash}),g}case"wallet_showCallsStatus":throw new Error(`"${t.method}" not supported`);case"wallet_getCapabilities":return{[(0,B.numberToHex)(this.chainId)]:{atomicBatch:{supported:!0}}};default:throw Error(`"${t.method}" not implemented`)}}send(t,a){t||a("Undefined request"),this.request(t).then(s=>a(null,{jsonrpc:"2.0",id:t.id,result:s})).catch(s=>a(s,null))}}Ee.SafeAppProvider=vl;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SafeAppProvider=void 0;var t=Ee;Object.defineProperty(e,"SafeAppProvider",{enumerable:!0,get:function(){return t.SafeAppProvider}})})(Xe);const Pl=Qc(Xe),ql=mu({__proto__:null,default:Pl},[Xe]);export{ql as i};
|