Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


!function e(t,n,r){function i(o,a){if(!n[o]){if(!t[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(s)return s(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[o]={exports:{}};t[o][0].call(l.exports,(function(e){return i(t[o][1][e]||e)}),l,l.exports,e,t,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.COOKIE_ID_MARKETING_WHITELIST_ORIGINS=n.COOKIE_ID_MARKETING_WHITELIST=void 0;const r=n.COOKIE_ID_MARKETING_WHITELIST=["https://metamask.io","https://learn.metamask.io","https://mmi-support.zendesk.com","https://community.metamask.io","https://support.metamask.io"];n.COOKIE_ID_MARKETING_WHITELIST_ORIGINS=r.map((e=>new URL(e).origin))},{}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PHISHING_WARNING_PAGE=n.PHISHING_STREAM=n.PHISHING_SAFELIST=n.METAMASK_PROVIDER=n.METAMASK_INPAGE=n.METAMASK_COOKIE_HANDLER=n.LEGACY_PUBLIC_CONFIG=n.LEGACY_PROVIDER=n.LEGACY_INPAGE=n.LEGACY_CONTENT_SCRIPT=n.CONTENT_SCRIPT=void 0;n.CONTENT_SCRIPT="metamask-contentscript",n.METAMASK_INPAGE="metamask-inpage",n.PHISHING_WARNING_PAGE="metamask-phishing-warning-page",n.METAMASK_COOKIE_HANDLER="metamask-cookie-handler",n.METAMASK_PROVIDER="metamask-provider",n.PHISHING_SAFELIST="metamask-phishing-safelist",n.PHISHING_STREAM="phishing",n.LEGACY_CONTENT_SCRIPT="contentscript",n.LEGACY_INPAGE="inpage",n.LEGACY_PROVIDER="provider",n.LEGACY_PUBLIC_CONFIG="publicConfig"},{}],3:[function(e,t,n){"use strict";var r,i=e("../../shared/modules/browser-runtime.utils"),s=(r=e("../../shared/modules/provider-injection"))&&r.__esModule?r:{default:r},o=e("./streams/provider-stream"),a=e("./streams/phishing-stream"),c=e("./streams/cookie-handler-stream");a.isDetectedPhishingSite?(0,a.initPhishingStreams)():(c.isDetectedCookieMarketingSite&&(0,c.initializeCookieHandlerSteam)(),(0,s.default)()&&((0,o.initStreams)(),document.prerendering&&(0,i.getIsBrowserPrerenderBroken)()&&document.addEventListener("prerenderingchange",(()=>{(0,o.onDisconnectDestroyStreams)(new Error("Prerendered page has become active."))})),window.addEventListener("pageshow",(e=>{e.persisted&&(console.warn("BFCached page has become active. Restoring the streams."),(0,o.setupExtensionStreams)())})),window.addEventListener("pagehide",(e=>{e.persisted&&(console.warn("Page may become BFCached. Destroying the streams."),(0,o.destroyStreams)())}))))},{"../../shared/modules/browser-runtime.utils":602,"../../shared/modules/provider-injection":603,"./streams/cookie-handler-stream":4,"./streams/phishing-stream":5,"./streams/provider-stream":6}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.setupCookieHandlerExtStreams=n.isDetectedCookieMarketingSite=n.initializeCookieHandlerSteam=void 0;var r=f(e("webextension-polyfill")),i=e("@metamask/post-message-stream"),s=f(e("@metamask/object-multiplex")),o=e("readable-stream"),a=f(e("extension-port-stream")),c=e("../../../shared/constants/app"),u=e("../constants/marketing-site-whitelist"),l=e("../../../shared/modules/browser-runtime.utils"),d=e("../constants/stream"),h=e("./stream-utils");function f(e){return e&&e.__esModule?e:{default:e}}n.isDetectedCookieMarketingSite=u.COOKIE_ID_MARKETING_WHITELIST_ORIGINS.some((e=>e===window.location.origin));let p,m,y,g,b,w;const v=()=>{y=r.default.runtime.connect({name:d.CONTENT_SCRIPT}),g=new a.default(y),b=new s.default,b.setMaxListeners(25),(0,o.pipeline)(b,g,b,(e=>{(0,h.logStreamDisconnectWarning)("MetaMask Background Multiplex",e),window.postMessage({target:"CookieHandlerPage",data:{name:d.METAMASK_COOKIE_HANDLER,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)})),w=b.createStream(d.METAMASK_COOKIE_HANDLER),b.ignoreStream(d.LEGACY_PUBLIC_CONFIG),b.ignoreStream(d.LEGACY_PROVIDER),b.ignoreStream(d.METAMASK_PROVIDER),b.ignoreStream(d.PHISHING_SAFELIST),b.ignoreStream(d.PHISHING_STREAM),(0,o.pipeline)(m,w,m,(e=>console.debug(`MetaMask: Muxed traffic for channel "${d.METAMASK_COOKIE_HANDLER}" failed.`,e))),y.onDisconnect.addListener(x)};n.setupCookieHandlerExtStreams=v;const x=()=>{const e=(0,l.checkForLastError)();y.onDisconnect.removeListener(x),m.removeAllListeners(),b.removeAllListeners(),b.destroy(),w.removeAllListeners(),w.destroy(),g=null,e&&(console.warn(`${e} Resetting the phishing streams.`),setTimeout(v,1e3))},E=e=>{if(e.name===c.EXTENSION_MESSAGES.READY)return g||v(),Promise.resolve(`MetaMask: handled "${c.EXTENSION_MESSAGES.READY}" for phishing streams`)};n.initializeCookieHandlerSteam=()=>{const{origin:e}=window.location;!function(e){const t=new i.WindowPostMessageStream({name:d.CONTENT_SCRIPT,target:"CookieHandlerPage",targetWindow:window,targetOrigin:e});p=new s.default,p.setMaxListeners(25),(0,o.pipeline)(p,t,p,(e=>(0,h.logStreamDisconnectWarning)("MetaMask Inpage Multiplex",e))),m=p.createStream(d.METAMASK_COOKIE_HANDLER),p.ignoreStream(d.LEGACY_PUBLIC_CONFIG),p.ignoreStream(d.LEGACY_PROVIDER),p.ignoreStream(d.METAMASK_PROVIDER),p.ignoreStream(d.PHISHING_SAFELIST),p.ignoreStream(d.PHISHING_STREAM)}(e),v(),r.default.runtime.onMessage.addListener(E)}},{"../../../shared/constants/app":599,"../../../shared/modules/browser-runtime.utils":602,"../constants/marketing-site-whitelist":1,"../constants/stream":2,"./stream-utils":7,"@metamask/object-multiplex":73,"@metamask/post-message-stream":89,"extension-port-stream":470,"readable-stream":544,"webextension-polyfill":597}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.connectPhishingChannelToWarningSystem=function(e){v=e.createStream(l.PHISHING_STREAM),e.ignoreStream(l.METAMASK_COOKIE_HANDLER),e.ignoreStream(l.LEGACY_PROVIDER),e.ignoreStream(l.PHISHING_SAFELIST),v.once("data",A)},n.isDetectedPhishingSite=n.initPhishingStreams=void 0,n.redirectToPhishingWarning=A,n.setupPhishingExtStreams=void 0;var r=e("@metamask/post-message-stream"),i=h(e("@metamask/object-multiplex")),s=e("readable-stream"),o=h(e("webextension-polyfill")),a=h(e("extension-port-stream")),c=e("../../../shared/modules/browser-runtime.utils"),u=e("../../../shared/constants/app"),l=e("../constants/stream"),d=e("./stream-utils");function h(e){return e&&e.__esModule?e:{default:e}}const f=new URL("https://metamask.github.io/phishing-warning/v4.1.0/");let p,m,y,g,b,w,v;const x=()=>{y=o.default.runtime.connect({name:l.CONTENT_SCRIPT}),g=new a.default(y),m=new i.default,m.setMaxListeners(25),(0,s.pipeline)(m,g,m,(e=>{(0,d.logStreamDisconnectWarning)("MetaMask Background Multiplex",e),window.postMessage({target:l.PHISHING_WARNING_PAGE,data:{name:l.PHISHING_SAFELIST,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)})),p=m.createStream(l.PHISHING_SAFELIST),(0,s.pipeline)(b,p,b,(e=>console.debug(`MetaMask: Muxed traffic for channel "${l.PHISHING_SAFELIST}" failed.`,e))),m.ignoreStream(l.METAMASK_COOKIE_HANDLER),m.ignoreStream(l.LEGACY_PUBLIC_CONFIG),m.ignoreStream(l.LEGACY_PROVIDER),m.ignoreStream(l.METAMASK_PROVIDER),m.ignoreStream(l.PHISHING_STREAM),y.onDisconnect.addListener(E)};n.setupPhishingExtStreams=x;const E=()=>{const e=(0,c.checkForLastError)();y.onDisconnect.removeListener(E),b.removeAllListeners(),m.removeAllListeners(),m.destroy(),p.removeAllListeners(),p.destroy(),g=null,e&&(console.warn(`${e} Resetting the phishing streams.`),setTimeout(x,1e3))},S=e=>{if(e.name===u.EXTENSION_MESSAGES.READY)return g||x(),Promise.resolve(`MetaMask: handled "${u.EXTENSION_MESSAGES.READY}" for phishing streams`)};n.isDetectedPhishingSite=window.location.origin===f.origin&&window.location.pathname===f.pathname;function A(){console.debug("MetaMask: Routing to Phishing Warning page.");const{hostname:e,href:t}=window.location,n=new URLSearchParams({hostname:e,href:t});for(window.location.href=`https://metamask.github.io/phishing-warning/v4.1.0/#${n}`;;)console.log("MetaMask: Locking js execution, redirection will complete shortly")}n.initPhishingStreams=()=>{!function(){const e=new r.WindowPostMessageStream({name:l.CONTENT_SCRIPT,target:l.PHISHING_WARNING_PAGE});w=new i.default,w.setMaxListeners(25),(0,s.pipeline)(w,e,w,(e=>(0,d.logStreamDisconnectWarning)("MetaMask Inpage Multiplex",e))),b=w.createStream(l.PHISHING_SAFELIST),w.ignoreStream(l.METAMASK_COOKIE_HANDLER),w.ignoreStream(l.LEGACY_PUBLIC_CONFIG),w.ignoreStream(l.LEGACY_PROVIDER),w.ignoreStream(l.METAMASK_PROVIDER),w.ignoreStream(l.PHISHING_STREAM)}(),x(),o.default.runtime.onMessage.addListener(S)}},{"../../../shared/constants/app":599,"../../../shared/modules/browser-runtime.utils":602,"../constants/stream":2,"./stream-utils":7,"@metamask/object-multiplex":73,"@metamask/post-message-stream":89,"extension-port-stream":470,"readable-stream":544,"webextension-polyfill":597}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.destroyStreams=M,n.initStreams=void 0,n.onDisconnectDestroyStreams=R,n.setupExtensionStreams=void 0;var r=f(e("@metamask/object-multiplex")),i=e("@metamask/post-message-stream"),s=f(e("extension-port-stream")),o=e("readable-stream"),a=f(e("webextension-polyfill")),c=e("../constants/stream"),u=e("../../../shared/constants/app"),l=e("../../../shared/modules/browser-runtime.utils"),d=e("./stream-utils"),h=e("./phishing-stream");function f(e){return e&&e.__esModule?e:{default:e}}let p,m,y,g,b,w,v,x,E,S,A,_,T;let k=!1;const C=()=>{k=!0,S=a.default.runtime.connect({name:c.CONTENT_SCRIPT}),A=new s.default(S),A.on("data",B),x=new r.default,x.setMaxListeners(25),x.ignoreStream(c.LEGACY_PUBLIC_CONFIG),(0,o.pipeline)(x,A,x,(e=>{(0,d.logStreamDisconnectWarning)("MetaMask Background Multiplex",e),N()})),E=x.createStream(c.METAMASK_PROVIDER),(0,o.pipeline)(T,E,T,(e=>console.debug(`MetaMask: Muxed traffic for channel "${c.METAMASK_PROVIDER}" failed.`,e))),(0,h.connectPhishingChannelToWarningSystem)(x),S.onDisconnect.addListener(R)};n.setupExtensionStreams=C;const P=()=>{T.removeAllListeners(),x.removeAllListeners(),x.destroy(),E.removeAllListeners(),E.destroy(),A=null},O=()=>{p=new r.default,p.setMaxListeners(25),v=new o.Transform({highWaterMark:16,objectMode:!0,transform:(e,t,n)=>{var r;(null==e?void 0:e.name)===c.METAMASK_PROVIDER&&"metamask_accountsChanged"===(null===(r=e.data)||void 0===r?void 0:r.method)&&(e.data.method="wallet_accountsChanged",e.data.result=e.data.params,delete e.data.params),n(null,e)}}),(0,o.pipeline)(p,A,v,p,(e=>{(0,d.logStreamDisconnectWarning)("MetaMask Background Legacy Multiplex",e),N()})),m=p.createStream(c.METAMASK_PROVIDER),(0,o.pipeline)(b,m,b,(e=>console.debug(`MetaMask: Muxed traffic between channels "${c.LEGACY_PROVIDER}" and "${c.METAMASK_PROVIDER}" failed.`,e))),y=p.createStream(c.LEGACY_PUBLIC_CONFIG),(0,o.pipeline)(w,y,w,(e=>console.debug(`MetaMask: Muxed traffic for channel "${c.LEGACY_PUBLIC_CONFIG}" failed.`,e))),p.ignoreStream(c.METAMASK_COOKIE_HANDLER),p.ignoreStream(c.LEGACY_PROVIDER),p.ignoreStream(c.PHISHING_SAFELIST),p.ignoreStream(c.PHISHING_STREAM)},I=()=>{b.removeAllListeners(),w.removeAllListeners(),p.removeAllListeners(),p.destroy(),m.removeAllListeners(),m.destroy(),y.removeAllListeners(),y.destroy()},j=e=>{if(e.name===u.EXTENSION_MESSAGES.READY)return A||(C(),O()),Promise.resolve(`MetaMask: handled ${u.EXTENSION_MESSAGES.READY}`)};function M(){S&&(S.onDisconnect.removeListener(R),P(),I(),S.disconnect(),S=null,k=!1)}function R(e){const t=e||(0,l.checkForLastError)();M(),t&&(console.warn(`${t} Resetting the streams.`),setTimeout(C,1e3))}function B(e){k&&"metamask_chainChanged"===e.data.method&&(k=!1,window.postMessage({target:c.METAMASK_INPAGE,data:{name:c.METAMASK_PROVIDER,data:{jsonrpc:"2.0",method:"METAMASK_EXTENSION_CONNECT_CAN_RETRY"}}},window.location.origin))}function N(){window.postMessage({target:c.METAMASK_INPAGE,data:{name:c.METAMASK_PROVIDER,data:{jsonrpc:"2.0",method:"METAMASK_STREAM_FAILURE"}}},window.location.origin)}n.initStreams=()=>{(()=>{const e=new i.WindowPostMessageStream({name:c.CONTENT_SCRIPT,target:c.METAMASK_INPAGE});_=new r.default,_.setMaxListeners(25),(0,o.pipeline)(_,e,_,(e=>(0,d.logStreamDisconnectWarning)("MetaMask Inpage Multiplex",e))),T=_.createStream(c.METAMASK_PROVIDER),_.ignoreStream(c.METAMASK_COOKIE_HANDLER),_.ignoreStream(c.LEGACY_PROVIDER),_.ignoreStream(c.LEGACY_PUBLIC_CONFIG),_.ignoreStream(c.PHISHING_SAFELIST),_.ignoreStream(c.PHISHING_STREAM)})(),(()=>{const e=new i.WindowPostMessageStream({name:c.LEGACY_CONTENT_SCRIPT,target:c.LEGACY_INPAGE});g=new r.default,g.setMaxListeners(25),(0,o.pipeline)(g,e,g,(e=>(0,d.logStreamDisconnectWarning)("MetaMask Legacy Inpage Multiplex",e))),b=g.createStream(c.LEGACY_PROVIDER),w=g.createStream(c.LEGACY_PUBLIC_CONFIG),g.ignoreStream(c.METAMASK_COOKIE_HANDLER),g.ignoreStream(c.METAMASK_PROVIDER),g.ignoreStream(c.PHISHING_SAFELIST),g.ignoreStream(c.PHISHING_STREAM)})(),C(),O(),a.default.runtime.onMessage.addListener(j)}},{"../../../shared/constants/app":599,"../../../shared/modules/browser-runtime.utils":602,"../constants/stream":2,"./phishing-stream":5,"./stream-utils":7,"@metamask/object-multiplex":73,"@metamask/post-message-stream":89,"extension-port-stream":470,"readable-stream":544,"webextension-polyfill":597}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logStreamDisconnectWarning=function(e,t){console.debug(`MetaMask: Content script lost connection to "${e}".`,t)}},{}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.accountBodyToRLP=n.accountBodyToSlim=n.accountBodyFromSlim=n.isZeroAddress=n.zeroAddress=n.importPublic=n.privateToAddress=n.privateToPublic=n.publicToAddress=n.pubToAddress=n.isValidPublic=n.isValidPrivate=n.generateAddress2=n.generateAddress=n.isValidChecksumAddress=n.toChecksumAddress=n.isValidAddress=n.Account=void 0;const r=e("@ethereumjs/rlp"),i=e("ethereum-cryptography/keccak.js"),s=e("ethereum-cryptography/secp256k1.js"),o=e("./bytes.js"),a=e("./constants.js"),c=e("./helpers.js"),u=e("./internal.js");class l{constructor(e=a.BIGINT_0,t=a.BIGINT_0,n=a.KECCAK256_RLP,r=a.KECCAK256_NULL,i=null,s=0){this._nonce=null,this._balance=null,this._storageRoot=null,this._codeHash=null,this._codeSize=null,this._version=null,this._nonce=e,this._balance=t,this._storageRoot=n,this._codeHash=r,null!==i||null===r||this.isContract()||(i=0),this._codeSize=i,this._version=s,this._validate()}get version(){if(null!==this._version)return this._version;throw Error(`version=${this._version} not loaded`)}set version(e){this._version=e}get nonce(){if(null!==this._nonce)return this._nonce;throw Error(`nonce=${this._nonce} not loaded`)}set nonce(e){this._nonce=e}get balance(){if(null!==this._balance)return this._balance;throw Error(`balance=${this._balance} not loaded`)}set balance(e){this._balance=e}get storageRoot(){if(null!==this._storageRoot)return this._storageRoot;throw Error(`storageRoot=${this._storageRoot} not loaded`)}set storageRoot(e){this._storageRoot=e}get codeHash(){if(null!==this._codeHash)return this._codeHash;throw Error(`codeHash=${this._codeHash} not loaded`)}set codeHash(e){this._codeHash=e}get codeSize(){if(null!==this._codeSize)return this._codeSize;throw Error(`codeHash=${this._codeSize} not loaded`)}set codeSize(e){this._codeSize=e}static fromAccountData(e){const{nonce:t,balance:n,storageRoot:r,codeHash:i}=e;if(null===t||null===n||null===r||null===i)throw Error("Partial fields not supported in fromAccountData");return new l(void 0!==t?(0,o.bytesToBigInt)((0,o.toBytes)(t)):void 0,void 0!==n?(0,o.bytesToBigInt)((0,o.toBytes)(n)):void 0,void 0!==r?(0,o.toBytes)(r):void 0,void 0!==i?(0,o.toBytes)(i):void 0)}static fromPartialAccountData(e){const{nonce:t,balance:n,storageRoot:r,codeHash:i,codeSize:s,version:a}=e;if(null===t&&null===n&&null===r&&null===i&&null===s&&null===a)throw Error("All partial fields null");return new l(null!=t?(0,o.bytesToBigInt)((0,o.toBytes)(t)):t,null!=n?(0,o.bytesToBigInt)((0,o.toBytes)(n)):n,null!=r?(0,o.toBytes)(r):r,null!=i?(0,o.toBytes)(i):i,null!=s?(0,o.bytesToInt)((0,o.toBytes)(s)):s,null!=a?(0,o.bytesToInt)((0,o.toBytes)(a)):a)}static fromRlpSerializedAccount(e){const t=r.RLP.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(t)}static fromRlpSerializedPartialAccount(e){const t=r.RLP.decode(e);if(!Array.isArray(t))throw new Error("Invalid serialized account input. Must be array");let n=null;if(!Array.isArray(t[0]))throw new Error("Invalid partial nonce encoding. Must be array");{const e=(0,o.bytesToInt)(t[0][0]);if(0!==e&&1!==e)throw new Error(`Invalid isNullIndicator=${e} for nonce`);1===e&&(n=(0,o.bytesToBigInt)(t[0][1]))}let i=null;if(!Array.isArray(t[1]))throw new Error("Invalid partial balance encoding. Must be array");{const e=(0,o.bytesToInt)(t[1][0]);if(0!==e&&1!==e)throw new Error(`Invalid isNullIndicator=${e} for balance`);1===e&&(i=(0,o.bytesToBigInt)(t[1][1]))}let s=null;if(!Array.isArray(t[2]))throw new Error("Invalid partial storageRoot encoding. Must be array");{const e=(0,o.bytesToInt)(t[2][0]);if(0!==e&&1!==e)throw new Error(`Invalid isNullIndicator=${e} for storageRoot`);1===e&&(s=t[2][1])}let a=null;if(!Array.isArray(t[3]))throw new Error("Invalid partial codeHash encoding. Must be array");{const e=(0,o.bytesToInt)(t[3][0]);if(0!==e&&1!==e)throw new Error(`Invalid isNullIndicator=${e} for codeHash`);1===e&&(a=t[3][1])}let c=null;if(!Array.isArray(t[4]))throw new Error("Invalid partial codeSize encoding. Must be array");{const e=(0,o.bytesToInt)(t[4][0]);if(0!==e&&1!==e)throw new Error(`Invalid isNullIndicator=${e} for codeSize`);1===e&&(c=(0,o.bytesToInt)(t[4][1]))}let u=null;if(!Array.isArray(t[5]))throw new Error("Invalid partial version encoding. Must be array");{const e=(0,o.bytesToInt)(t[5][0]);if(0!==e&&1!==e)throw new Error(`Invalid isNullIndicator=${e} for version`);1===e&&(u=(0,o.bytesToInt)(t[5][1]))}return this.fromPartialAccountData({balance:i,nonce:n,storageRoot:s,codeHash:a,codeSize:c,version:u})}static fromValuesArray(e){const[t,n,r,i]=e;return new l((0,o.bytesToBigInt)(t),(0,o.bytesToBigInt)(n),r,i)}_validate(){if(null!==this._nonce&&this._nonce<a.BIGINT_0)throw new Error("nonce must be greater than zero");if(null!==this._balance&&this._balance<a.BIGINT_0)throw new Error("balance must be greater than zero");if(null!==this._storageRoot&&32!==this._storageRoot.length)throw new Error("storageRoot must have a length of 32");if(null!==this._codeHash&&32!==this._codeHash.length)throw new Error("codeHash must have a length of 32");if(null!==this._codeSize&&this._codeSize<a.BIGINT_0)throw new Error("codeSize must be greater than zero")}raw(){return[(0,o.bigIntToUnpaddedBytes)(this.nonce),(0,o.bigIntToUnpaddedBytes)(this.balance),this.storageRoot,this.codeHash]}serialize(){return r.RLP.encode(this.raw())}serializeWithPartialInfo(){const e=[],t=(0,o.intToUnpaddedBytes)(0),n=(0,o.intToUnpaddedBytes)(1);return null!==this._nonce?e.push([n,(0,o.bigIntToUnpaddedBytes)(this._nonce)]):e.push([t]),null!==this._balance?e.push([n,(0,o.bigIntToUnpaddedBytes)(this._balance)]):e.push([t]),null!==this._storageRoot?e.push([n,this._storageRoot]):e.push([t]),null!==this._codeHash?e.push([n,this._codeHash]):e.push([t]),null!==this._codeSize?e.push([n,(0,o.intToUnpaddedBytes)(this._codeSize)]):e.push([t]),null!==this._version?e.push([n,(0,o.intToUnpaddedBytes)(this._version)]):e.push([t]),r.RLP.encode(e)}isContract(){if(null===this._codeHash&&null===this._codeSize)throw Error("Insufficient data as codeHash=null and codeSize=null");return null!==this._codeHash&&!(0,o.equalsBytes)(this._codeHash,a.KECCAK256_NULL)||null!==this._codeSize&&0!==this._codeSize}isEmpty(){return!(null!==this._balance&&this.balance!==a.BIGINT_0||null===this._nonce&&this.nonce!==a.BIGINT_0||null!==this._codeHash&&!(0,o.equalsBytes)(this.codeHash,a.KECCAK256_NULL))&&(this.balance===a.BIGINT_0&&this.nonce===a.BIGINT_0&&(0,o.equalsBytes)(this.codeHash,a.KECCAK256_NULL))}}n.Account=l;n.isValidAddress=function(e){try{(0,c.assertIsString)(e)}catch(e){return!1}return/^0x[0-9a-fA-F]{40}$/.test(e)};n.toChecksumAddress=function(e,t){(0,c.assertIsHexString)(e);const n=(0,u.stripHexPrefix)(e).toLowerCase();let r="";if(void 0!==t){r=(0,o.bytesToBigInt)((0,o.toBytes)(t)).toString()+"0x"}const s=(0,o.utf8ToBytes)(r+n),a=(0,o.bytesToHex)((0,i.keccak256)(s)).slice(2);let l="";for(let e=0;e<n.length;e++)parseInt(a[e],16)>=8?l+=n[e].toUpperCase():l+=n[e];return`0x${l}`};n.isValidChecksumAddress=function(e,t){return(0,n.isValidAddress)(e)&&(0,n.toChecksumAddress)(e,t)===e};n.generateAddress=function(e,t){return(0,c.assertIsBytes)(e),(0,c.assertIsBytes)(t),(0,o.bytesToBigInt)(t)===a.BIGINT_0?(0,i.keccak256)(r.RLP.encode([e,Uint8Array.from([])])).subarray(-20):(0,i.keccak256)(r.RLP.encode([e,t])).subarray(-20)};n.generateAddress2=function(e,t,n){if((0,c.assertIsBytes)(e),(0,c.assertIsBytes)(t),(0,c.assertIsBytes)(n),20!==e.length)throw new Error("Expected from to be of length 20");if(32!==t.length)throw new Error("Expected salt to be of length 32");return(0,i.keccak256)((0,o.concatBytes)((0,o.hexToBytes)("0xff"),e,t,(0,i.keccak256)(n))).subarray(-20)};n.isValidPrivate=function(e){return s.secp256k1.utils.isValidPrivateKey(e)};n.isValidPublic=function(e,t=!1){if((0,c.assertIsBytes)(e),64===e.length)try{return s.secp256k1.ProjectivePoint.fromHex((0,o.concatBytes)(Uint8Array.from([4]),e)),!0}catch(e){return!1}if(!t)return!1;try{return s.secp256k1.ProjectivePoint.fromHex(e),!0}catch(e){return!1}};n.pubToAddress=function(e,t=!1){if((0,c.assertIsBytes)(e),t&&64!==e.length&&(e=s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1)),64!==e.length)throw new Error("Expected pubKey to be of length 64");return(0,i.keccak256)(e).subarray(-20)},n.publicToAddress=n.pubToAddress;n.privateToPublic=function(e){return(0,c.assertIsBytes)(e),s.secp256k1.ProjectivePoint.fromPrivateKey(e).toRawBytes(!1).slice(1)};n.privateToAddress=function(e){return(0,n.publicToAddress)((0,n.privateToPublic)(e))};n.importPublic=function(e){return(0,c.assertIsBytes)(e),64!==e.length&&(e=s.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1).slice(1)),e};n.zeroAddress=function(){const e=(0,o.zeros)(20);return(0,o.bytesToHex)(e)};function d(e){const[t,n,r,i]=e;return[t,n,0===r.length?a.KECCAK256_RLP:r,0===i.length?a.KECCAK256_NULL:i]}n.isZeroAddress=function(e){try{(0,c.assertIsString)(e)}catch(e){return!1}return(0,n.zeroAddress)()===e},n.accountBodyFromSlim=d;const h=new Uint8Array(0);n.accountBodyToSlim=function(e){const[t,n,r,i]=e;return[t,n,(0,o.equalsBytes)(r,a.KECCAK256_RLP)?h:r,(0,o.equalsBytes)(i,a.KECCAK256_NULL)?h:i]},n.accountBodyToRLP=function(e,t=!0){const n=t?d(e):e;return r.RLP.encode(n)}},{"./bytes.js":12,"./constants.js":13,"./helpers.js":16,"./internal.js":18,"@ethereumjs/rlp":29,"ethereum-cryptography/keccak.js":449,"ethereum-cryptography/secp256k1.js":466}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Address=void 0;const r=e("./account.js"),i=e("./bytes.js"),s=e("./constants.js");class o{constructor(e){if(20!==e.length)throw new Error("Invalid address length");this.bytes=e}static zero(){return new o((0,i.zeros)(20))}static fromString(e){if(!(0,r.isValidAddress)(e))throw new Error(`Invalid address input=${e}`);return new o((0,i.hexToBytes)(e))}static fromPublicKey(e){if(!(e instanceof Uint8Array))throw new Error("Public key should be Uint8Array");const t=(0,r.pubToAddress)(e);return new o(t)}static fromPrivateKey(e){if(!(e instanceof Uint8Array))throw new Error("Private key should be Uint8Array");const t=(0,r.privateToAddress)(e);return new o(t)}static generate(e,t){if("bigint"!=typeof t)throw new Error("Expected nonce to be a bigint");return new o((0,r.generateAddress)(e.bytes,(0,i.bigIntToBytes)(t)))}static generate2(e,t,n){if(!(t instanceof Uint8Array))throw new Error("Expected salt to be a Uint8Array");if(!(n instanceof Uint8Array))throw new Error("Expected initCode to be a Uint8Array");return new o((0,r.generateAddress2)(e.bytes,t,n))}equals(e){return(0,i.equalsBytes)(this.bytes,e.bytes)}isZero(){return this.equals(o.zero())}isPrecompileOrSystemAddress(){const e=(0,i.bytesToBigInt)(this.bytes),t=s.BIGINT_0,n=BigInt("0xffff");return e>=t&&e<=n}toString(){return(0,i.bytesToHex)(this.bytes)}toBytes(){return new Uint8Array(this.bytes)}}n.Address=o},{"./account.js":8,"./bytes.js":12,"./constants.js":13}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AsyncEventEmitter=void 0;const r=e("events");class i extends r.EventEmitter{emit(e,...t){let[n,r]=t;const i=this;let s=i._events[e]??[];return void 0===r&&"function"==typeof n&&(r=n,n=void 0),"newListener"!==e&&"removeListener"!==e||(n={event:n,fn:r},r=void 0),s=Array.isArray(s)?s:[s],async function(e,t,n){let r;for await(const i of t)try{i.length<2?i.call(e,n):await new Promise(((t,r)=>{i.call(e,n,(e=>{e?r(e):t()}))}))}catch(e){r=e}if(r)throw r}(i,s.slice(),n).then(r).catch(r),i.listenerCount(e)>0}once(e,t){const n=this;let r;if("function"!=typeof t)throw new TypeError("listener must be a function");return r=t.length>=2?function(i,s){n.removeListener(e,r),t(i,s)}:function(i){n.removeListener(e,r),t(i,r)},n.on(e,r),n}first(e,t){let n=this._events[e]??[];if("function"!=typeof t)throw new TypeError("listener must be a function");return Array.isArray(n)||(this._events[e]=n=[n]),n.unshift(t),this}before(e,t,n){return this.beforeOrAfter(e,t,n)}after(e,t,n){return this.beforeOrAfter(e,t,n,"after")}beforeOrAfter(e,t,n,r){let i,s,o=this._events[e]??[];const a="after"===r?1:0;if("function"!=typeof n)throw new TypeError("listener must be a function");if("function"!=typeof t)throw new TypeError("target must be a function");for(Array.isArray(o)||(this._events[e]=o=[o]),s=o.length,i=o.length;i--;)if(o[i]===t){s=i+a;break}return o.splice(s,0,n),this}on(e,t){return super.on(e,t)}addListener(e,t){return super.addListener(e,t)}prependListener(e,t){return super.prependListener(e,t)}prependOnceListener(e,t){return super.prependOnceListener(e,t)}removeAllListeners(e){return super.removeAllListeners(e)}removeListener(e,t){return super.removeListener(e,t)}eventNames(){return super.eventNames()}listeners(e){return super.listeners(e)}listenerCount(e){return super.listenerCount(e)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(e){return super.setMaxListeners(e)}}n.AsyncEventEmitter=i},{events:469}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.commitmentsToVersionedHashes=n.computeVersionedHash=n.blobsToProofs=n.blobsToCommitments=n.getBlobs=void 0;const r=e("ethereum-cryptography/sha256.js"),i=e("./bytes.js"),s=4096,o=131072;function a(e){const t=new Uint8Array(131072);for(let n=0;n<s;n++){const r=new Uint8Array(32);r.set(e.subarray(31*n,31*(n+1)),0),t.set(r,32*n)}return t}n.getBlobs=e=>{const t=(0,i.utf8ToBytes)(e),n=t.byteLength;if(0===n)throw Error("invalid blob data");if(n>262143)throw Error("blob data is too large");const r=Math.ceil(n/o),s=function(e,t){const n=new Uint8Array(t*o).fill(0);return n.set(e),n[e.byteLength]=128,n}(t,r),c=[];for(let e=0;e<r;e++){const t=a(s.subarray(e*o,(e+1)*o));c.push(t)}return c};n.blobsToCommitments=(e,t)=>{const n=[];for(const r of t)n.push(e.blobToKzgCommitment(r));return n};n.blobsToProofs=(e,t,n)=>t.map(((t,r)=>e.computeBlobKzgProof(t,n[r])));n.computeVersionedHash=(e,t)=>{const n=new Uint8Array(32);return n.set([t],0),n.set((0,r.sha256)(e).subarray(1),1),n};n.commitmentsToVersionedHashes=e=>{const t=[];for(const r of e)t.push((0,n.computeVersionedHash)(r,1));return t}},{"./bytes.js":12,"ethereum-cryptography/sha256.js":467}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hexToBigInt=n.utf8ToBytes=n.equalsBytes=n.bytesToUtf8=n.bigInt64ToBytes=n.int32ToBytes=n.bytesToBigInt64=n.bytesToInt32=n.concatBytes=n.randomBytes=n.compareBytes=n.intToUnpaddedBytes=n.bigIntToAddressBytes=n.bigIntToUnpaddedBytes=n.bigIntMin=n.bigIntMax=n.bigIntToHex=n.validateNoLeadingZeroes=n.short=n.addHexPrefix=n.toUnsigned=n.fromSigned=n.toBytes=n.unpadHex=n.unpadArray=n.unpadBytes=n.setLengthRight=n.setLengthLeft=n.zeros=n.bigIntToBytes=n.intToBytes=n.intToHex=n.hexToBytes=n.bytesToInt=n.bytesToBigInt=n.bytesToHex=n.unprefixedHexToBytes=n.bytesToUnprefixedHex=void 0;const r=e("ethereum-cryptography/random.js"),i=e("ethereum-cryptography/utils.js"),s=e("./helpers.js"),o=e("./internal.js"),a=BigInt(0);n.bytesToUnprefixedHex=i.bytesToHex;const c={},u={};for(let e=0;e<16;e++){const t=e,n=16*e,r=e.toString(16).toLowerCase();u[r]=t,u[r.toUpperCase()]=t,c[r]=n,c[r.toUpperCase()]=n}function l(e){const t=e.length,n=new Uint8Array(t/2);for(let r=0;r<t;r+=2)n[r/2]=c[e[r]]+u[e[r+1]];return n}n.unprefixedHexToBytes=e=>{if("0x"===e.slice(0,2))throw new Error("hex string is prefixed with 0x, should be unprefixed");return l((0,o.padToEven)(e))};const d=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));n.bytesToHex=e=>{let t="0x";if(void 0===e||0===e.length)return t;for(const n of e)t=`${t}${d[n]}`;return t};const h=[];for(let e=0;e<=65535;e++)h[e]=BigInt(e);n.bytesToBigInt=(e,t=!1)=>{t&&e.reverse();const r=(0,n.bytesToHex)(e);return"0x"===r?a:4===r.length?h[e[0]]:6===r.length?h[256*e[0]+e[1]]:BigInt(r)};n.bytesToInt=e=>{const t=Number((0,n.bytesToBigInt)(e));if(!Number.isSafeInteger(t))throw new Error("Number exceeds 53 bits");return t};n.hexToBytes=e=>{if("string"!=typeof e)throw new Error(`hex argument type ${typeof e} must be of type string`);if(!/^0x[0-9a-fA-F]*$/.test(e))throw new Error(`Input must be a 0x-prefixed hexadecimal string, got ${e}`);const t=e.slice(2);return l(t.length%2==0?t:(0,o.padToEven)(t))};n.intToHex=e=>{if(!Number.isSafeInteger(e)||e<0)throw new Error(`Received an invalid integer type: ${e}`);return`0x${e.toString(16)}`};n.intToBytes=e=>{const t=(0,n.intToHex)(e);return(0,n.hexToBytes)(t)};n.bigIntToBytes=(e,t=!1)=>{const r=(0,n.toBytes)(`0x${(0,o.padToEven)(e.toString(16))}`);return t?r.reverse():r};n.zeros=e=>new Uint8Array(e);const f=(e,t,r)=>r?e.length<t?new Uint8Array([...e,...(0,n.zeros)(t-e.length)]):e.subarray(0,t):e.length<t?new Uint8Array([...(0,n.zeros)(t-e.length),...e]):e.subarray(-t);n.setLengthLeft=(e,t)=>((0,s.assertIsBytes)(e),f(e,t,!1));n.setLengthRight=(e,t)=>((0,s.assertIsBytes)(e),f(e,t,!0));const p=e=>{let t=e[0];for(;e.length>0&&"0"===t.toString();)t=(e=e.slice(1))[0];return e};n.unpadBytes=e=>((0,s.assertIsBytes)(e),p(e));n.unpadArray=e=>((0,s.assertIsArray)(e),p(e));n.unpadHex=e=>((0,s.assertIsHexString)(e),`0x${p((0,o.stripHexPrefix)(e))}`);n.toBytes=e=>{if(null==e)return new Uint8Array;if(Array.isArray(e)||e instanceof Uint8Array)return Uint8Array.from(e);if("string"==typeof e){if(!(0,o.isHexString)(e))throw new Error(`Cannot convert string to Uint8Array. toBytes only supports 0x-prefixed hex strings and this string was given: ${e}`);return(0,n.hexToBytes)(e)}if("number"==typeof e)return(0,n.intToBytes)(e);if("bigint"==typeof e){if(e<a)throw new Error(`Cannot convert negative bigint to Uint8Array. Given: ${e}`);let t=e.toString(16);return t.length%2&&(t="0"+t),(0,n.unprefixedHexToBytes)(t)}if(void 0!==e.toBytes)return e.toBytes();throw new Error("invalid type")};n.fromSigned=e=>BigInt.asIntN(256,(0,n.bytesToBigInt)(e));n.toUnsigned=e=>(0,n.bigIntToBytes)(BigInt.asUintN(256,e));n.addHexPrefix=e=>"string"!=typeof e||(0,o.isHexString)(e)?e:`0x${e}`;n.short=(e,t=50)=>{const r=e instanceof Uint8Array?(0,n.bytesToHex)(e):e,i="0x"===r.slice(0,2)?t+2:t;return r.length<=i?r:r.slice(0,i)+"…"};n.validateNoLeadingZeroes=e=>{for(const[t,r]of Object.entries(e))if(void 0!==r&&r.length>0&&0===r[0])throw new Error(`${t} cannot have leading zeroes, received: ${(0,n.bytesToHex)(r)}`)};n.bigIntToHex=e=>`0x${e.toString(16)}`;n.bigIntMax=(...e)=>e.reduce(((e,t)=>t>e?t:e));n.bigIntMin=(...e)=>e.reduce(((e,t)=>t<e?t:e));n.bigIntToUnpaddedBytes=e=>(0,n.unpadBytes)((0,n.bigIntToBytes)(e));n.bigIntToAddressBytes=(e,t=!0)=>{const r=(0,n.bigIntToBytes)(e);if(t&&r.length>20)throw Error(`Invalid address bytes length=${r.length} strict=${t}`);return(0,n.setLengthLeft)(r,20)};n.intToUnpaddedBytes=e=>(0,n.unpadBytes)((0,n.intToBytes)(e));n.compareBytes=(e,t)=>{const r=(0,n.bytesToBigInt)(e),i=(0,n.bytesToBigInt)(t);return r>i?1:r<i?-1:0};n.randomBytes=e=>(0,r.getRandomBytesSync)(e);n.concatBytes=(...e)=>{if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n},n.bytesToInt32=function(e,t=!1){return e.length<4&&(e=f(e,4,t)),new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(0,t)},n.bytesToBigInt64=function(e,t=!1){return e.length<8&&(e=f(e,8,t)),new DataView(e.buffer,e.byteOffset,e.byteLength).getBigUint64(0,t)},n.int32ToBytes=function(e,t=!1){const n=new ArrayBuffer(4);return new DataView(n).setUint32(0,e,t),new Uint8Array(n)},n.bigInt64ToBytes=function(e,t=!1){const n=new ArrayBuffer(8);return new DataView(n).setBigUint64(0,e,t),new Uint8Array(n)};var m=e("ethereum-cryptography/utils.js");Object.defineProperty(n,"bytesToUtf8",{enumerable:!0,get:function(){return m.bytesToUtf8}}),Object.defineProperty(n,"equalsBytes",{enumerable:!0,get:function(){return m.equalsBytes}}),Object.defineProperty(n,"utf8ToBytes",{enumerable:!0,get:function(){return m.utf8ToBytes}}),n.hexToBigInt=function(e){return(0,n.bytesToBigInt)((0,n.hexToBytes)((0,o.isHexString)(e)?e:`0x${e}`))}},{"./helpers.js":16,"./internal.js":18,"ethereum-cryptography/random.js":465,"ethereum-cryptography/utils.js":468}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BIGINT_2EXP256=n.BIGINT_2EXP224=n.BIGINT_2EXP160=n.BIGINT_2EXP96=n.BIGINT_224=n.BIGINT_160=n.BIGINT_100=n.BIGINT_96=n.BIGINT_256=n.BIGINT_255=n.BIGINT_128=n.BIGINT_64=n.BIGINT_32=n.BIGINT_31=n.BIGINT_28=n.BIGINT_27=n.BIGINT_8=n.BIGINT_7=n.BIGINT_3=n.BIGINT_2=n.BIGINT_1=n.BIGINT_0=n.BIGINT_NEG1=n.RIPEMD160_ADDRESS_STRING=n.MAX_WITHDRAWALS_PER_PAYLOAD=n.RLP_EMPTY_STRING=n.KECCAK256_RLP=n.KECCAK256_RLP_S=n.KECCAK256_RLP_ARRAY=n.KECCAK256_RLP_ARRAY_S=n.KECCAK256_NULL=n.KECCAK256_NULL_S=n.TWO_POW256=n.SECP256K1_ORDER_DIV_2=n.SECP256K1_ORDER=n.MAX_INTEGER_BIGINT=n.MAX_INTEGER=n.MAX_UINT64=void 0;const r=e("ethereum-cryptography/secp256k1.js"),i=e("./bytes.js");n.MAX_UINT64=BigInt("0xffffffffffffffff"),n.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),n.SECP256K1_ORDER=r.secp256k1.CURVE.n,n.SECP256K1_ORDER_DIV_2=r.secp256k1.CURVE.n/BigInt(2),n.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),n.KECCAK256_NULL_S="0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",n.KECCAK256_NULL=(0,i.hexToBytes)(n.KECCAK256_NULL_S),n.KECCAK256_RLP_ARRAY_S="0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",n.KECCAK256_RLP_ARRAY=(0,i.hexToBytes)(n.KECCAK256_RLP_ARRAY_S),n.KECCAK256_RLP_S="0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",n.KECCAK256_RLP=(0,i.hexToBytes)(n.KECCAK256_RLP_S),n.RLP_EMPTY_STRING=Uint8Array.from([128]),n.MAX_WITHDRAWALS_PER_PAYLOAD=16,n.RIPEMD160_ADDRESS_STRING="0000000000000000000000000000000000000003",n.BIGINT_NEG1=BigInt(-1),n.BIGINT_0=BigInt(0),n.BIGINT_1=BigInt(1),n.BIGINT_2=BigInt(2),n.BIGINT_3=BigInt(3),n.BIGINT_7=BigInt(7),n.BIGINT_8=BigInt(8),n.BIGINT_27=BigInt(27),n.BIGINT_28=BigInt(28),n.BIGINT_31=BigInt(31),n.BIGINT_32=BigInt(32),n.BIGINT_64=BigInt(64),n.BIGINT_128=BigInt(128),n.BIGINT_255=BigInt(255),n.BIGINT_256=BigInt(256),n.BIGINT_96=BigInt(96),n.BIGINT_100=BigInt(100),n.BIGINT_160=BigInt(160),n.BIGINT_224=BigInt(224),n.BIGINT_2EXP96=BigInt(7922816251426434e13),n.BIGINT_2EXP160=BigInt(1461501637330903e33),n.BIGINT_2EXP224=BigInt(2695994666715064e52),n.BIGINT_2EXP256=n.BIGINT_2**n.BIGINT_256},{"./bytes.js":12,"ethereum-cryptography/secp256k1.js":466}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ValueEncoding=n.KeyEncoding=void 0,function(e){e.String="string",e.Bytes="view",e.Number="number"}(n.KeyEncoding||(n.KeyEncoding={})),function(e){e.String="string",e.Bytes="view",e.JSON="json"}(n.ValueEncoding||(n.ValueEncoding={}))},{}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseGethGenesisState=void 0;const r=e("./bytes.js"),i=e("./internal.js");n.parseGethGenesisState=function(e){const t={};for(const n of Object.keys(e.alloc)){let{balance:s,code:o,storage:a,nonce:c}=e.alloc[n];const u=(0,r.addHexPrefix)(n.toLowerCase());s=(0,i.isHexString)(s)?s:(0,r.bigIntToHex)(BigInt(s)),o=void 0!==o?(0,r.addHexPrefix)(o):void 0,a=void 0!==a?Object.entries(a):void 0,c=void 0!==c?(0,r.addHexPrefix)(c):void 0,t[u]=[s,o,a,c]}return t}},{"./bytes.js":12,"./internal.js":18}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsString=n.assertIsArray=n.assertIsBytes=n.assertIsHexString=void 0;const r=e("./internal.js");n.assertIsHexString=function(e){if(!(0,r.isHexString)(e)){throw new Error(`This method only supports 0x-prefixed hex strings but input was: ${e}`)}};n.assertIsBytes=function(e){if(!(e instanceof Uint8Array)){throw new Error(`This method only supports Uint8Array but input was: ${e}`)}};n.assertIsArray=function(e){if(!Array.isArray(e)){throw new Error(`This method only supports number arrays but input was: ${e}`)}};n.assertIsString=function(e){if("string"!=typeof e){throw new Error(`This method only supports strings but input was: ${e}`)}}},{"./internal.js":18}],17:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.toAscii=n.stripHexPrefix=n.padToEven=n.isHexString=n.getKeys=n.getBinarySize=n.fromUtf8=n.fromAscii=n.arrayContainsArray=void 0,i(e("./constants.js"),n),i(e("./units.js"),n),i(e("./account.js"),n),i(e("./address.js"),n),i(e("./db.js"),n),i(e("./withdrawal.js"),n),i(e("./signature.js"),n),i(e("./bytes.js"),n),i(e("./types.js"),n),i(e("./asyncEventEmitter.js"),n),i(e("./blobs.js"),n),i(e("./genesis.js"),n);var s=e("./internal.js");Object.defineProperty(n,"arrayContainsArray",{enumerable:!0,get:function(){return s.arrayContainsArray}}),Object.defineProperty(n,"fromAscii",{enumerable:!0,get:function(){return s.fromAscii}}),Object.defineProperty(n,"fromUtf8",{enumerable:!0,get:function(){return s.fromUtf8}}),Object.defineProperty(n,"getBinarySize",{enumerable:!0,get:function(){return s.getBinarySize}}),Object.defineProperty(n,"getKeys",{enumerable:!0,get:function(){return s.getKeys}}),Object.defineProperty(n,"isHexString",{enumerable:!0,get:function(){return s.isHexString}}),Object.defineProperty(n,"padToEven",{enumerable:!0,get:function(){return s.padToEven}}),Object.defineProperty(n,"stripHexPrefix",{enumerable:!0,get:function(){return s.stripHexPrefix}}),Object.defineProperty(n,"toAscii",{enumerable:!0,get:function(){return s.toAscii}}),i(e("./kzg.js"),n),i(e("./lock.js"),n),i(e("./mapDB.js"),n),i(e("./provider.js"),n),i(e("./requests.js"),n),i(e("./verkle.js"),n)},{"./account.js":8,"./address.js":9,"./asyncEventEmitter.js":10,"./blobs.js":11,"./bytes.js":12,"./constants.js":13,"./db.js":14,"./genesis.js":15,"./internal.js":18,"./kzg.js":19,"./lock.js":20,"./mapDB.js":21,"./provider.js":22,"./requests.js":23,"./signature.js":24,"./types.js":25,"./units.js":26,"./verkle.js":27,"./withdrawal.js":28}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getKeys=n.fromAscii=n.fromUtf8=n.toAscii=n.arrayContainsArray=n.getBinarySize=n.padToEven=n.stripHexPrefix=n.isHexString=void 0;const r=e("./bytes.js");function i(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/))&&!(void 0!==t&&t>0&&e.length!==2+2*t)}n.isHexString=i;function s(e){let t=e;if("string"!=typeof t)throw new Error("[padToEven] value must be type 'string', received "+typeof t);return t.length%2&&(t=`0${t}`),t}n.stripHexPrefix=e=>{if("string"!=typeof e)throw new Error("[stripHexPrefix] input must be type 'string', received "+typeof e);return i(e)?e.slice(2):e},n.padToEven=s,n.getBinarySize=function(e){if("string"!=typeof e)throw new Error("[getBinarySize] method requires input type 'string', received "+typeof e);return(0,r.utf8ToBytes)(e).byteLength},n.arrayContainsArray=function(e,t,n){if(!0!==Array.isArray(e))throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(!0!==Array.isArray(t))throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[!0===n?"some":"every"]((t=>e.indexOf(t)>=0))},n.toAscii=function(e){let t="",n=0;const r=e.length;for("0x"===e.substring(0,2)&&(n=2);n<r;n+=2){const r=parseInt(e.substr(n,2),16);t+=String.fromCharCode(r)}return t},n.fromUtf8=function(e){const t=(0,r.utf8ToBytes)(e);return`0x${s((0,r.bytesToUnprefixedHex)(t)).replace(/^0+|0+$/g,"")}`},n.fromAscii=function(e){let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n).toString(16);t+=r.length<2?`0${r}`:r}return`0x${t}`},n.getKeys=function(e,t,n){if(!Array.isArray(e))throw new Error("[getKeys] method expects input 'params' to be an array, got "+typeof e);if("string"!=typeof t)throw new Error("[getKeys] method expects input 'key' to be type 'string', got "+typeof e);const r=[];for(let i=0;i<e.length;i++){let s=e[i][t];if(!0!==n||s){if("string"!=typeof s)throw new Error("invalid abi - expected type 'string', received "+typeof s)}else s="";r.push(s)}return r}},{"./bytes.js":12}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.initKZG=void 0,n.initKZG=function(e,t){e.loadTrustedSetup()}},{}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Lock=void 0;n.Lock=class{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise((e=>this.promiseResolverQueue.push(e)))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(1===this.permits&&this.promiseResolverQueue.length>0){this.permits-=1;const e=this.promiseResolverQueue.shift();e&&e(!0)}}}},{}],21:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MapDB=void 0;const r=e("./bytes.js");class i{constructor(e){this._database=e??new Map}async get(e){const t=e instanceof Uint8Array?(0,r.bytesToUnprefixedHex)(e):e.toString();return this._database.get(t)}async put(e,t){const n=e instanceof Uint8Array?(0,r.bytesToUnprefixedHex)(e):e.toString();this._database.set(n,t)}async del(e){const t=e instanceof Uint8Array?(0,r.bytesToUnprefixedHex)(e):e.toString();this._database.delete(t)}async batch(e){for(const t of e)"del"===t.type&&await this.del(t.key),"put"===t.type&&await this.put(t.key,t.value)}shallowCopy(){return new i(this._database)}open(){return Promise.resolve()}}n.MapDB=i},{"./bytes.js":12}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getProvider=n.fetchFromProvider=void 0;n.fetchFromProvider=async(e,t)=>{const n=JSON.stringify({method:t.method,params:t.params,jsonrpc:"2.0",id:1}),r=await fetch(e,{headers:{"content-type":"application/json"},method:"POST",body:n});if(!r.ok)throw new Error(`JSONRpcError: ${JSON.stringify({method:t.method,status:r.status,message:await r.text().catch((()=>"Could not parse error message likely because of a network error"))},null,2)}`);return(await r.json()).result};n.getProvider=e=>{if("string"==typeof e)return e;if("object"==typeof e&&void 0!==e._getConnection)return e._getConnection().url;throw new Error("Must provide valid provider URL or Web3Provider")}},{}],23:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CLRequestFactory=n.ConsolidationRequest=n.WithdrawalRequest=n.DepositRequest=n.CLRequest=n.CLRequestType=void 0;const r=e("@ethereumjs/rlp"),i=e("ethereum-cryptography/utils"),s=e("./bytes.js"),o=e("./constants.js");var a;!function(e){e[e.Deposit=0]="Deposit",e[e.Withdrawal=1]="Withdrawal",e[e.Consolidation=2]="Consolidation"}(a=n.CLRequestType||(n.CLRequestType={}));class c{constructor(e){this.type=e}}n.CLRequest=c;class u extends c{constructor(e,t,n,r,i){super(a.Deposit),this.pubkey=e,this.withdrawalCredentials=t,this.amount=n,this.signature=r,this.index=i}static fromRequestData(e){const{pubkey:t,withdrawalCredentials:n,amount:r,signature:i,index:s}=e;return new u(t,n,r,i,s)}static fromJSON(e){const{pubkey:t,withdrawalCredentials:n,amount:r,signature:i,index:o}=e;return this.fromRequestData({pubkey:(0,s.hexToBytes)(t),withdrawalCredentials:(0,s.hexToBytes)(n),amount:(0,s.hexToBigInt)(r),signature:(0,s.hexToBytes)(i),index:(0,s.hexToBigInt)(o)})}serialize(){const e=this.index===o.BIGINT_0?new Uint8Array:(0,s.bigIntToBytes)(this.index),t=this.amount===o.BIGINT_0?new Uint8Array:(0,s.bigIntToBytes)(this.amount);return(0,i.concatBytes)(Uint8Array.from([this.type]),r.RLP.encode([this.pubkey,this.withdrawalCredentials,t,this.signature,e]))}toJSON(){return{pubkey:(0,s.bytesToHex)(this.pubkey),withdrawalCredentials:(0,s.bytesToHex)(this.withdrawalCredentials),amount:(0,s.bigIntToHex)(this.amount),signature:(0,s.bytesToHex)(this.signature),index:(0,s.bigIntToHex)(this.index)}}static deserialize(e){const[t,n,i,o,a]=r.RLP.decode(e.slice(1));return this.fromRequestData({pubkey:t,withdrawalCredentials:n,amount:(0,s.bytesToBigInt)(i),signature:o,index:(0,s.bytesToBigInt)(a)})}}n.DepositRequest=u;class l extends c{constructor(e,t,n){super(a.Withdrawal),this.sourceAddress=e,this.validatorPubkey=t,this.amount=n}static fromRequestData(e){const{sourceAddress:t,validatorPubkey:n,amount:r}=e;return new l(t,n,r)}static fromJSON(e){const{sourceAddress:t,validatorPubkey:n,amount:r}=e;return this.fromRequestData({sourceAddress:(0,s.hexToBytes)(t),validatorPubkey:(0,s.hexToBytes)(n),amount:(0,s.hexToBigInt)(r)})}serialize(){const e=this.amount===o.BIGINT_0?new Uint8Array:(0,s.bigIntToBytes)(this.amount);return(0,i.concatBytes)(Uint8Array.from([this.type]),r.RLP.encode([this.sourceAddress,this.validatorPubkey,e]))}toJSON(){return{sourceAddress:(0,s.bytesToHex)(this.sourceAddress),validatorPubkey:(0,s.bytesToHex)(this.validatorPubkey),amount:(0,s.bigIntToHex)(this.amount)}}static deserialize(e){const[t,n,i]=r.RLP.decode(e.slice(1));return this.fromRequestData({sourceAddress:t,validatorPubkey:n,amount:(0,s.bytesToBigInt)(i)})}}n.WithdrawalRequest=l;class d extends c{constructor(e,t,n){super(a.Consolidation),this.sourceAddress=e,this.sourcePubkey=t,this.targetPubkey=n}static fromRequestData(e){const{sourceAddress:t,sourcePubkey:n,targetPubkey:r}=e;return new d(t,n,r)}static fromJSON(e){const{sourceAddress:t,sourcePubkey:n,targetPubkey:r}=e;return this.fromRequestData({sourceAddress:(0,s.hexToBytes)(t),sourcePubkey:(0,s.hexToBytes)(n),targetPubkey:(0,s.hexToBytes)(r)})}serialize(){return(0,i.concatBytes)(Uint8Array.from([this.type]),r.RLP.encode([this.sourceAddress,this.sourcePubkey,this.targetPubkey]))}toJSON(){return{sourceAddress:(0,s.bytesToHex)(this.sourceAddress),sourcePubkey:(0,s.bytesToHex)(this.sourcePubkey),targetPubkey:(0,s.bytesToHex)(this.targetPubkey)}}static deserialize(e){const[t,n,i]=r.RLP.decode(e.slice(1));return this.fromRequestData({sourceAddress:t,sourcePubkey:n,targetPubkey:i})}}n.ConsolidationRequest=d;n.CLRequestFactory=class{static fromSerializedRequest(e){switch(e[0]){case a.Deposit:return u.deserialize(e);case a.Withdrawal:return l.deserialize(e);case a.Consolidation:return d.deserialize(e);default:throw Error(`Invalid request type=${e[0]}`)}}}},{"./bytes.js":12,"./constants.js":13,"@ethereumjs/rlp":29,"ethereum-cryptography/utils":468}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hashPersonalMessage=n.isValidSignature=n.fromRpcSig=n.toCompactSig=n.toRpcSig=n.ecrecover=n.calculateSigRecovery=n.ecsign=void 0;const r=e("ethereum-cryptography/keccak.js"),i=e("ethereum-cryptography/secp256k1.js"),s=e("./bytes.js"),o=e("./constants.js"),a=e("./helpers.js");function c(e,t){return e===o.BIGINT_0||e===o.BIGINT_1?e:void 0===t?e-o.BIGINT_27:e-(t*o.BIGINT_2+BigInt(35))}function u(e){return e===o.BIGINT_0||e===o.BIGINT_1}n.ecsign=function(e,t,n){const r=i.secp256k1.sign(e,t),s=r.toCompactRawBytes();return{r:s.slice(0,32),s:s.slice(32,64),v:void 0===n?BigInt(r.recovery+27):BigInt(r.recovery+35)+BigInt(n)*o.BIGINT_2}},n.calculateSigRecovery=c;n.ecrecover=function(e,t,n,r,o){const a=(0,s.concatBytes)((0,s.setLengthLeft)(n,32),(0,s.setLengthLeft)(r,32)),l=c(t,o);if(!u(l))throw new Error("Invalid signature v value");return i.secp256k1.Signature.fromCompact(a).addRecoveryBit(Number(l)).recoverPublicKey(e).toRawBytes(!1).slice(1)};n.toRpcSig=function(e,t,n,r){if(!u(c(e,r)))throw new Error("Invalid signature v value");return(0,s.bytesToHex)((0,s.concatBytes)((0,s.setLengthLeft)(t,32),(0,s.setLengthLeft)(n,32),(0,s.toBytes)(e)))};n.toCompactSig=function(e,t,n,r){if(!u(c(e,r)))throw new Error("Invalid signature v value");const i=Uint8Array.from([...n]);return(e>BigInt(28)&&e%o.BIGINT_2===o.BIGINT_1||e===o.BIGINT_1||e===BigInt(28))&&(i[0]|=128),(0,s.bytesToHex)((0,s.concatBytes)((0,s.setLengthLeft)(t,32),(0,s.setLengthLeft)(i,32)))};n.fromRpcSig=function(e){const t=(0,s.toBytes)(e);let n,r,i;if(t.length>=65)n=t.subarray(0,32),r=t.subarray(32,64),i=(0,s.bytesToBigInt)(t.subarray(64));else{if(64!==t.length)throw new Error("Invalid signature length");n=t.subarray(0,32),r=t.subarray(32,64),i=BigInt((0,s.bytesToInt)(t.subarray(32,33))>>7),r[0]&=127}return i<27&&(i+=o.BIGINT_27),{v:i,r:n,s:r}};n.isValidSignature=function(e,t,n,r=!0,i){if(32!==t.length||32!==n.length)return!1;if(!u(c(e,i)))return!1;const a=(0,s.bytesToBigInt)(t),l=(0,s.bytesToBigInt)(n);return!(a===o.BIGINT_0||a>=o.SECP256K1_ORDER||l===o.BIGINT_0||l>=o.SECP256K1_ORDER)&&!(r&&l>=o.SECP256K1_ORDER_DIV_2)};n.hashPersonalMessage=function(e){(0,a.assertIsBytes)(e);const t=(0,s.utf8ToBytes)(`Ethereum Signed Message:\n${e.length}`);return(0,r.keccak256)((0,s.concatBytes)(t,e))}},{"./bytes.js":12,"./constants.js":13,"./helpers.js":16,"ethereum-cryptography/keccak.js":449,"ethereum-cryptography/secp256k1.js":466}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toType=n.TypeOutput=n.isNestedUint8Array=void 0;const r=e("./bytes.js"),i=e("./internal.js");var s;n.isNestedUint8Array=function e(t){if(!Array.isArray(t))return!1;for(const n of t)if(Array.isArray(n)){if(!e(n))return!1}else if(!(n instanceof Uint8Array))return!1;return!0},function(e){e[e.Number=0]="Number",e[e.BigInt=1]="BigInt",e[e.Uint8Array=2]="Uint8Array",e[e.PrefixedHexString=3]="PrefixedHexString"}(s=n.TypeOutput||(n.TypeOutput={})),n.toType=function(e,t){if(null===e)return null;if(void 0===e)return;if("string"==typeof e&&!(0,i.isHexString)(e))throw new Error(`A string must be provided with a 0x-prefix, given: ${e}`);if("number"==typeof e&&!Number.isSafeInteger(e))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const n=(0,r.toBytes)(e);switch(t){case s.Uint8Array:return n;case s.BigInt:return(0,r.bytesToBigInt)(n);case s.Number:{const e=(0,r.bytesToBigInt)(n);if(e>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(e)}case s.PrefixedHexString:return(0,r.bytesToHex)(n);default:throw new Error("unknown outputType")}}},{"./bytes.js":12,"./internal.js":18}],26:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatBigDecimal=n.GWEI_TO_WEI=void 0;const r=e("./constants.js");n.GWEI_TO_WEI=BigInt(1e9),n.formatBigDecimal=function(e,t,n){t===r.BIGINT_0&&(t=r.BIGINT_1);const i=e/t,s=(e-i*t)*n/t,o=String(n).length-1-String(s).length;return`${i}.${"0".repeat(o)}${s}`}},{"./constants.js":13}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getVerkleTreeKeyForStorageSlot=n.chunkifyCode=n.getVerkleTreeKeyForCodeChunk=n.getVerkleTreeIndicesForCodeChunk=n.getVerkleTreeIndexesForStorageSlot=n.getVerkleKey=n.VERKLE_MAIN_STORAGE_OFFSET=n.VERKLE_NODE_WIDTH=n.VERKLE_CODE_OFFSET=n.VERKLE_HEADER_STORAGE_OFFSET=n.VERKLE_CODE_SIZE_LEAF_KEY=n.VERKLE_CODE_HASH_LEAF_KEY=n.VERKLE_NONCE_LEAF_KEY=n.VERKLE_BALANCE_LEAF_KEY=n.VERKLE_VERSION_LEAF_KEY=n.VerkleLeafType=n.verifyVerkleProof=n.getVerkleStem=void 0;const r=e("./bytes.js");function i(e,t,n=0){const i=(0,r.setLengthLeft)(t.toBytes(),32);let s;s="number"==typeof n?(0,r.setLengthRight)((0,r.int32ToBytes)(Number(n),!0),32):(0,r.setLengthRight)((0,r.bigIntToBytes)(BigInt(n),!0).slice(0,32),32);return e.getTreeKey(i,s,0).slice(0,31)}var s;n.getVerkleStem=i,n.verifyVerkleProof=function(e,t,n){return e.verifyExecutionWitnessPreState((0,r.bytesToHex)(t),JSON.stringify(n))},function(e){e[e.Version=0]="Version",e[e.Balance=1]="Balance",e[e.Nonce=2]="Nonce",e[e.CodeHash=3]="CodeHash",e[e.CodeSize=4]="CodeSize"}(s=n.VerkleLeafType||(n.VerkleLeafType={})),n.VERKLE_VERSION_LEAF_KEY=(0,r.intToBytes)(s.Version),n.VERKLE_BALANCE_LEAF_KEY=(0,r.intToBytes)(s.Balance),n.VERKLE_NONCE_LEAF_KEY=(0,r.intToBytes)(s.Nonce),n.VERKLE_CODE_HASH_LEAF_KEY=(0,r.intToBytes)(s.CodeHash),n.VERKLE_CODE_SIZE_LEAF_KEY=(0,r.intToBytes)(s.CodeSize),n.VERKLE_HEADER_STORAGE_OFFSET=64,n.VERKLE_CODE_OFFSET=128,n.VERKLE_NODE_WIDTH=256,n.VERKLE_MAIN_STORAGE_OFFSET=BigInt(256)**BigInt(31);function o(e){let t;t=e<n.VERKLE_CODE_OFFSET-n.VERKLE_HEADER_STORAGE_OFFSET?BigInt(n.VERKLE_HEADER_STORAGE_OFFSET)+e:n.VERKLE_MAIN_STORAGE_OFFSET+e;return{treeIndex:t/BigInt(n.VERKLE_NODE_WIDTH),subIndex:Number(t%BigInt(n.VERKLE_NODE_WIDTH))}}function a(e){return{treeIndex:Math.floor((n.VERKLE_CODE_OFFSET+e)/n.VERKLE_NODE_WIDTH),subIndex:(n.VERKLE_CODE_OFFSET+e)%n.VERKLE_NODE_WIDTH}}n.getVerkleKey=(e,t)=>{switch(t){case s.Version:return(0,r.concatBytes)(e,n.VERKLE_VERSION_LEAF_KEY);case s.Balance:return(0,r.concatBytes)(e,n.VERKLE_BALANCE_LEAF_KEY);case s.Nonce:return(0,r.concatBytes)(e,n.VERKLE_NONCE_LEAF_KEY);case s.CodeHash:return(0,r.concatBytes)(e,n.VERKLE_CODE_HASH_LEAF_KEY);case s.CodeSize:return(0,r.concatBytes)(e,n.VERKLE_CODE_SIZE_LEAF_KEY);default:return(0,r.concatBytes)(e,t)}},n.getVerkleTreeIndexesForStorageSlot=o,n.getVerkleTreeIndicesForCodeChunk=a;n.getVerkleTreeKeyForCodeChunk=async(e,t,n)=>{const{treeIndex:s,subIndex:o}=a(t);return(0,r.concatBytes)(i(n,e,s),(0,r.toBytes)(o))};n.chunkifyCode=e=>{if(e.length%31!=0){const t=31-e.length%31;e=(0,r.setLengthRight)(e,e.length+t)}throw new Error("Not implemented")};n.getVerkleTreeKeyForStorageSlot=async(e,t,n)=>{const{treeIndex:s,subIndex:a}=o(t);return(0,r.concatBytes)(i(n,e,s),(0,r.toBytes)(a))}},{"./bytes.js":12}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Withdrawal=void 0;const r=e("./address.js"),i=e("./bytes.js"),s=e("./constants.js"),o=e("./types.js");class a{constructor(e,t,n,r){this.index=e,this.validatorIndex=t,this.address=n,this.amount=r}static fromWithdrawalData(e){const{index:t,validatorIndex:n,address:s,amount:c}=e,u=(0,o.toType)(t,o.TypeOutput.BigInt),l=(0,o.toType)(n,o.TypeOutput.BigInt),d=s instanceof r.Address?s:new r.Address((0,i.toBytes)(s)),h=(0,o.toType)(c,o.TypeOutput.BigInt);return new a(u,l,d,h)}static fromValuesArray(e){if(4!==e.length)throw Error(`Invalid withdrawalArray length expected=4 actual=${e.length}`);const[t,n,r,i]=e;return a.fromWithdrawalData({index:t,validatorIndex:n,address:r,amount:i})}static toBytesArray(e){const{index:t,validatorIndex:n,address:i,amount:a}=e;return[(0,o.toType)(t,o.TypeOutput.BigInt)===s.BIGINT_0?new Uint8Array:(0,o.toType)(t,o.TypeOutput.Uint8Array),(0,o.toType)(n,o.TypeOutput.BigInt)===s.BIGINT_0?new Uint8Array:(0,o.toType)(n,o.TypeOutput.Uint8Array),i instanceof r.Address?i.bytes:(0,o.toType)(i,o.TypeOutput.Uint8Array),(0,o.toType)(a,o.TypeOutput.BigInt)===s.BIGINT_0?new Uint8Array:(0,o.toType)(a,o.TypeOutput.Uint8Array)]}raw(){return a.toBytesArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.bytes,amount:this.amount}}toJSON(){return{index:(0,i.bigIntToHex)(this.index),validatorIndex:(0,i.bigIntToHex)(this.validatorIndex),address:(0,i.bytesToHex)(this.address.bytes),amount:(0,i.bigIntToHex)(this.amount)}}}n.Withdrawal=a},{"./address.js":9,"./bytes.js":12,"./constants.js":13,"./types.js":25}],29:[function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){const t=[];let n=0;for(let i=0;i<e.length;i++){const s=r(e[i]);t.push(s),n+=s.length}return f(o(n,192),...t)}const t=g(e);return 1===t.length&&t[0]<128?t:f(o(t.length,128),t)}function i(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function s(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return d(l(e))}function o(e,t){if(e<56)return Uint8Array.from([e+t]);const n=m(e),r=m(t+55+n.length/2);return Uint8Array.from(h(r+n))}function a(e,t=!1){if(null==e||0===e.length)return Uint8Array.from([]);const n=c(g(e));if(t)return{data:n.data,remainder:n.remainder.slice()};if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function c(e){let t,n,r,o,a;const u=[],l=e[0];if(l<=127)return{data:e.slice(0,1),remainder:e.subarray(1)};if(l<=183){if(t=l-127,r=128===l?Uint8Array.from([]):i(e,1,t),2===t&&r[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:r,remainder:e.subarray(t)}}if(l<=191){if(n=l-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=s(i(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return r=i(e,n,t+n),{data:r,remainder:e.subarray(t+n)}}if(l<=247){for(t=l-191,o=i(e,1,t);o.length;)a=c(o),u.push(a.data),o=a.remainder;return{data:u,remainder:e.subarray(t)}}{if(n=l-246,t=s(i(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const r=n+t;if(r>e.length)throw new Error("invalid RLP: total length is larger than the data");for(o=i(e,n,r);o.length;)a=c(o),u.push(a.data),o=a.remainder;return{data:u,remainder:e.subarray(r)}}}Object.defineProperty(n,"__esModule",{value:!0}),n.RLP=n.utils=n.decode=n.encode=void 0,n.encode=r,n.decode=a;const u=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function l(e){let t="";for(let n=0;n<e.length;n++)t+=u[e[n]];return t}function d(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function h(e){if("string"!=typeof e)throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let n=0;n<t.length;n++){const r=2*n;t[n]=d(e.slice(r,r+2))}return t}function f(...e){if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n}function p(e){return(new TextEncoder).encode(e)}function m(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function y(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function g(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return y(e)?h((t="string"!=typeof(n=e)?n:y(n)?n.slice(2):n).length%2?`0${t}`:t):p(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?h(m(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}n.utils={bytesToHex:l,concatBytes:f,hexToBytes:h,utf8ToBytes:p},n.RLP={encode:r,decode:a}},{}],30:[function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.getPersistentState=n.getAnonymizedState=n.BaseController=n.isBaseController=void 0;const o=e("immer");(0,o.enablePatches)(),n.isBaseController=function(e){return"object"==typeof e&&null!==e&&"name"in e&&"string"==typeof e.name&&"state"in e&&"object"==typeof e.state&&"metadata"in e&&"object"==typeof e.metadata};function a(e,t,n){return Object.keys(e).reduce(((r,i)=>{try{const s=t[i];if(!s)throw new Error(`No metadata found for '${String(i)}'`);const o=s[n],a=e[i];return"function"==typeof o?r[i]=o(a):o&&(r[i]=a),r}catch(e){return setTimeout((()=>{throw e})),r}}),{})}n.BaseController=class{constructor({messenger:e,metadata:t,name:n,state:s}){r.set(this,void 0),this.messagingSystem=e,this.name=n,i(this,r,(0,o.freeze)(s,!0),"f"),this.metadata=t,this.messagingSystem.registerActionHandler(`${n}:getState`,(()=>this.state)),this.messagingSystem.registerInitialEventPayload({eventType:`${n}:stateChange`,getPayload:()=>[this.state,[]]})}get state(){return s(this,r,"f")}set state(e){throw new Error("Controller state cannot be directly mutated; use 'update' method instead.")}update(e){const[t,n,a]=o.produceWithPatches(s(this,r,"f"),e);return n.length>0&&(i(this,r,t,"f"),this.messagingSystem.publish(`${this.name}:stateChange`,t,n)),{nextState:t,patches:n,inversePatches:a}}applyPatches(e){const t=(0,o.applyPatches)(s(this,r,"f"),e);i(this,r,t,"f"),this.messagingSystem.publish(`${this.name}:stateChange`,t,e)}destroy(){this.messagingSystem.clearEventSubscriptions(`${this.name}:stateChange`)}},r=new WeakMap,n.getAnonymizedState=function(e,t){return a(e,t,"anonymous")},n.getPersistentState=function(e,t){return a(e,t,"persist")}},{immer:515}],31:[function(e,t,n){"use strict";var r,i,s,o,a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.Messenger=void 0;const c=e("./RestrictedMessenger.cjs");n.Messenger=class{constructor(){r.set(this,new Map),i.set(this,new Map),s.set(this,new Map),o.set(this,new Map)}registerActionHandler(e,t){if(a(this,r,"f").has(e))throw new Error(`A handler for ${e} has already been registered`);a(this,r,"f").set(e,t)}unregisterActionHandler(e){a(this,r,"f").delete(e)}clearActions(){a(this,r,"f").clear()}call(e,...t){const n=a(this,r,"f").get(e);if(!n)throw new Error(`A handler for ${e} has not been registered`);return n(...t)}registerInitialEventPayload({eventType:e,getPayload:t}){a(this,s,"f").set(e,t)}publish(e,...t){const n=a(this,i,"f").get(e);if(n)for(const[e,r]of n.entries())try{if(r){const n=a(this,o,"f").get(e),i=r(...t);i!==n&&(a(this,o,"f").set(e,i),e(i,n))}else e(...t)}catch(e){setTimeout((()=>{throw e}))}}subscribe(e,t,n){let r=a(this,i,"f").get(e);if(r||(r=new Map,a(this,i,"f").set(e,r)),r.set(t,n),n){const r=a(this,s,"f").get(e);if(r){const e=n(...r());a(this,o,"f").set(t,e)}}}unsubscribe(e,t){const n=a(this,i,"f").get(e);if(!n||!n.has(t))throw new Error(`Subscription not found for event: ${e}`);n.get(t)&&a(this,o,"f").delete(t),n.delete(t)}clearEventSubscriptions(e){a(this,i,"f").delete(e)}clearSubscriptions(){a(this,i,"f").clear()}getRestricted({name:e,allowedActions:t,allowedEvents:n}){return new c.RestrictedMessenger({messenger:this,name:e,allowedActions:t,allowedEvents:n})}},r=new WeakMap,i=new WeakMap,s=new WeakMap,o=new WeakMap},{"./RestrictedMessenger.cjs":32}],32:[function(e,t,n){"use strict";var r,i,s,o,a,c,u,l,d=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},h=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.RestrictedMessenger=void 0;n.RestrictedMessenger=class{constructor({messenger:e,name:t,allowedActions:n,allowedEvents:c}){if(r.add(this),i.set(this,void 0),s.set(this,void 0),o.set(this,void 0),a.set(this,void 0),!e)throw new Error("Messenger not provided");d(this,i,e,"f"),d(this,s,t,"f"),d(this,o,n,"f"),d(this,a,c,"f")}registerActionHandler(e,t){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed registering action handlers prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").registerActionHandler(e,t)}unregisterActionHandler(e){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed unregistering action handlers prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").unregisterActionHandler(e)}call(e,...t){if(!h(this,r,"m",u).call(this,e))throw new Error(`Action missing from allow list: ${e}`);return h(this,i,"f").call(e,...t)}registerInitialEventPayload({eventType:e,getPayload:t}){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").registerInitialEventPayload({eventType:e,getPayload:t})}publish(e,...t){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed publishing events prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").publish(e,...t)}subscribe(e,t,n){if(!h(this,r,"m",c).call(this,e))throw new Error(`Event missing from allow list: ${e}`);return n?h(this,i,"f").subscribe(e,t,n):h(this,i,"f").subscribe(e,t)}unsubscribe(e,t){if(!h(this,r,"m",c).call(this,e))throw new Error(`Event missing from allow list: ${e}`);h(this,i,"f").unsubscribe(e,t)}clearEventSubscriptions(e){if(!h(this,r,"m",l).call(this,e))throw new Error(`Only allowed clearing events prefixed by '${h(this,s,"f")}:'`);h(this,i,"f").clearEventSubscriptions(e)}},i=new WeakMap,s=new WeakMap,o=new WeakMap,a=new WeakMap,r=new WeakSet,c=function(e){const t=h(this,a,"f");return h(this,r,"m",l).call(this,e)||null!==t&&t.includes(e)},u=function(e){const t=h(this,o,"f");return h(this,r,"m",l).call(this,e)||null!==t&&t.includes(e)},l=function(e){return e.startsWith(`${h(this,s,"f")}:`)}},{}],33:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RestrictedMessenger=n.Messenger=n.isBaseController=n.getPersistentState=n.getAnonymizedState=n.BaseController=void 0;var r=e("./BaseControllerV2.cjs");Object.defineProperty(n,"BaseController",{enumerable:!0,get:function(){return r.BaseController}}),Object.defineProperty(n,"getAnonymizedState",{enumerable:!0,get:function(){return r.getAnonymizedState}}),Object.defineProperty(n,"getPersistentState",{enumerable:!0,get:function(){return r.getPersistentState}}),Object.defineProperty(n,"isBaseController",{enumerable:!0,get:function(){return r.isBaseController}});var i=e("./Messenger.cjs");Object.defineProperty(n,"Messenger",{enumerable:!0,get:function(){return i.Messenger}});var s=e("./RestrictedMessenger.cjs");Object.defineProperty(n,"RestrictedMessenger",{enumerable:!0,get:function(){return s.RestrictedMessenger}})},{"./BaseControllerV2.cjs":30,"./Messenger.cjs":31,"./RestrictedMessenger.cjs":32}],34:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP=n.ApprovalType=n.ORIGIN_METAMASK=n.NFT_API_TIMEOUT=n.NFT_API_VERSION=n.NFT_API_BASE_URL=n.OPENSEA_PROXY_URL=n.BUILT_IN_NETWORKS=n.BUILT_IN_CUSTOM_NETWORKS_RPC=n.TESTNET_TICKER_SYMBOLS=n.ASSET_TYPES=n.GWEI=n.ERC1155_TOKEN_RECEIVER_INTERFACE_ID=n.ERC1155_METADATA_URI_INTERFACE_ID=n.ERC1155_INTERFACE_ID=n.ERC721_ENUMERABLE_INTERFACE_ID=n.ERC721_METADATA_INTERFACE_ID=n.ERC721_INTERFACE_ID=n.ERC20=n.ERC1155=n.ERC721=n.MAX_SAFE_CHAIN_ID=n.GANACHE_CHAIN_ID=n.IPFS_DEFAULT_GATEWAY_URL=n.FALL_BACK_VS_CURRENCY=n.RPC=void 0;const r=e("./types.cjs");var i;n.RPC="rpc",n.FALL_BACK_VS_CURRENCY="ETH",n.IPFS_DEFAULT_GATEWAY_URL="https://cloudflare-ipfs.com/ipfs/",n.GANACHE_CHAIN_ID="0x539",n.MAX_SAFE_CHAIN_ID=0xfffffffffffec,n.ERC721="ERC721",n.ERC1155="ERC1155",n.ERC20="ERC20",n.ERC721_INTERFACE_ID="0x80ac58cd",n.ERC721_METADATA_INTERFACE_ID="0x5b5e139f",n.ERC721_ENUMERABLE_INTERFACE_ID="0x780e9d63",n.ERC1155_INTERFACE_ID="0xd9b67a26",n.ERC1155_METADATA_URI_INTERFACE_ID="0x0e89341c",n.ERC1155_TOKEN_RECEIVER_INTERFACE_ID="0x4e2312e0",n.GWEI="gwei",n.ASSET_TYPES={NATIVE:"NATIVE",TOKEN:"TOKEN",NFT:"NFT",UNKNOWN:"UNKNOWN"},n.TESTNET_TICKER_SYMBOLS={GOERLI:"GoerliETH",SEPOLIA:"SepoliaETH",LINEA_GOERLI:"LineaETH",LINEA_SEPOLIA:"LineaETH",MEGAETH_TESTNET:"MegaETH"},n.BUILT_IN_CUSTOM_NETWORKS_RPC={MEGAETH_TESTNET:"https://carrot.megaeth.com/rpc"},n.BUILT_IN_NETWORKS={[r.NetworkType.goerli]:{chainId:r.ChainId.goerli,ticker:r.NetworksTicker.goerli,rpcPrefs:{blockExplorerUrl:r.BlockExplorerUrl.goerli}},[r.NetworkType.sepolia]:{chainId:r.ChainId.sepolia,ticker:r.NetworksTicker.sepolia,rpcPrefs:{blockExplorerUrl:r.BlockExplorerUrl.sepolia}},[r.NetworkType.mainnet]:{chainId:r.ChainId.mainnet,ticker:r.NetworksTicker.mainnet,rpcPrefs:{blockExplorerUrl:r.BlockExplorerUrl.mainnet}},[r.NetworkType["linea-goerli"]]:{chainId:r.ChainId["linea-goerli"],ticker:r.NetworksTicker["linea-goerli"],rpcPrefs:{blockExplorerUrl:r.BlockExplorerUrl["linea-goerli"]}},[r.NetworkType["linea-sepolia"]]:{chainId:r.ChainId["linea-sepolia"],ticker:r.NetworksTicker["linea-sepolia"],rpcPrefs:{blockExplorerUrl:r.BlockExplorerUrl["linea-sepolia"]}},[r.NetworkType["linea-mainnet"]]:{chainId:r.ChainId["linea-mainnet"],ticker:r.NetworksTicker["linea-mainnet"],rpcPrefs:{blockExplorerUrl:r.BlockExplorerUrl["linea-mainnet"]}},[r.NetworkType["megaeth-testnet"]]:{chainId:r.ChainId["megaeth-testnet"],ticker:r.NetworksTicker["megaeth-testnet"],rpcPrefs:{blockExplorerUrl:r.BlockExplorerUrl["megaeth-testnet"]}},[r.NetworkType.rpc]:{chainId:void 0,blockExplorerUrl:void 0,ticker:void 0,rpcPrefs:void 0}},n.OPENSEA_PROXY_URL="https://proxy.api.cx.metamask.io/opensea/v1/api/v2",n.NFT_API_BASE_URL="https://nft.api.cx.metamask.io",n.NFT_API_VERSION="1",n.NFT_API_TIMEOUT=15e3,n.ORIGIN_METAMASK="metamask",function(e){e.AddEthereumChain="wallet_addEthereumChain",e.ConnectAccounts="connect_accounts",e.EthDecrypt="eth_decrypt",e.EthGetEncryptionPublicKey="eth_getEncryptionPublicKey",e.EthSignTypedData="eth_signTypedData",e.PersonalSign="personal_sign",e.ResultError="result_error",e.ResultSuccess="result_success",e.SnapDialogAlert="snap_dialog:alert",e.SnapDialogConfirmation="snap_dialog:confirmation",e.SnapDialogPrompt="snap_dialog:prompt",e.SnapDialogDefault="snap_dialog",e.SwitchEthereumChain="wallet_switchEthereumChain",e.Transaction="transaction",e.Unlock="unlock",e.WalletConnect="wallet_connect",e.WalletRequestPermissions="wallet_requestPermissions",e.WatchAsset="wallet_watchAsset"}(i||(n.ApprovalType=i={})),n.CHAIN_ID_TO_ETHERS_NETWORK_NAME_MAP={[r.ChainId.goerli]:r.BuiltInNetworkName.Goerli,[r.ChainId.sepolia]:r.BuiltInNetworkName.Sepolia,[r.ChainId.mainnet]:r.BuiltInNetworkName.Mainnet,[r.ChainId["linea-goerli"]]:r.BuiltInNetworkName.LineaGoerli,[r.ChainId["linea-sepolia"]]:r.BuiltInNetworkName.LineaSepolia,[r.ChainId["linea-mainnet"]]:r.BuiltInNetworkName.LineaMainnet,[r.ChainId.aurora]:r.BuiltInNetworkName.Aurora}},{"./types.cjs":39}],35:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createServicePolicy=n.DEFAULT_DEGRADED_THRESHOLD=n.DEFAULT_CIRCUIT_BREAK_DURATION=n.DEFAULT_MAX_CONSECUTIVE_FAILURES=n.DEFAULT_MAX_RETRIES=n.handleWhen=n.handleAll=n.ExponentialBackoff=n.ConstantBackoff=n.CircuitState=n.BrokenCircuitError=void 0;const r=e("cockatiel");Object.defineProperty(n,"BrokenCircuitError",{enumerable:!0,get:function(){return r.BrokenCircuitError}}),Object.defineProperty(n,"CircuitState",{enumerable:!0,get:function(){return r.CircuitState}}),Object.defineProperty(n,"ExponentialBackoff",{enumerable:!0,get:function(){return r.ExponentialBackoff}}),Object.defineProperty(n,"ConstantBackoff",{enumerable:!0,get:function(){return r.ConstantBackoff}}),Object.defineProperty(n,"handleAll",{enumerable:!0,get:function(){return r.handleAll}}),Object.defineProperty(n,"handleWhen",{enumerable:!0,get:function(){return r.handleWhen}}),n.DEFAULT_MAX_RETRIES=3,n.DEFAULT_MAX_CONSECUTIVE_FAILURES=3*(1+n.DEFAULT_MAX_RETRIES),n.DEFAULT_CIRCUIT_BREAK_DURATION=18e5,n.DEFAULT_DEGRADED_THRESHOLD=5e3,n.createServicePolicy=function(e={}){const{maxRetries:t=n.DEFAULT_MAX_RETRIES,retryFilterPolicy:i=r.handleAll,maxConsecutiveFailures:s=n.DEFAULT_MAX_CONSECUTIVE_FAILURES,circuitBreakDuration:o=n.DEFAULT_CIRCUIT_BREAK_DURATION,degradedThreshold:a=n.DEFAULT_DEGRADED_THRESHOLD,backoff:c=new r.ExponentialBackoff}=e,u=(0,r.retry)(i,{maxAttempts:t,backoff:c}),l=u.onRetry.bind(u),d=(0,r.circuitBreaker)(r.handleAll,{halfOpenAfter:o,breaker:new r.ConsecutiveBreaker(s)}),h=d.onBreak.bind(d),f=new r.EventEmitter;u.onGiveUp((()=>{d.state===r.CircuitState.Closed&&f.emit()})),u.onSuccess((({duration:e})=>{d.state===r.CircuitState.Closed&&e>a&&f.emit()}));const p=f.addListener;return{...(0,r.wrap)(u,d),circuitBreakerPolicy:d,retryPolicy:u,onBreak:h,onDegraded:p,onRetry:l}}},{cockatiel:435}],36:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.isEqualCaseInsensitive=n.weiHexToGweiDec=n.toHex=n.toChecksumHexAddress=n.timeoutFetch=n.successfulFetch=n.safelyExecuteWithTimeout=n.safelyExecute=n.query=n.normalizeEnsName=n.isValidHexAddress=n.isValidJson=n.isSmartContractCode=n.isSafeDynamicKey=n.isSafeChainId=n.isPlainObject=n.isNonEmptyArray=n.hexToText=n.hexToBN=n.handleFetch=n.gweiDecToWEIBN=n.getBuyURL=n.fromHex=n.fractionBN=n.fetchWithErrorHandling=n.convertHexToDecimal=n.BNToHex=n.handleWhen=n.handleAll=n.createServicePolicy=n.ExponentialBackoff=n.DEFAULT_MAX_RETRIES=n.DEFAULT_MAX_CONSECUTIVE_FAILURES=n.DEFAULT_DEGRADED_THRESHOLD=n.DEFAULT_CIRCUIT_BREAK_DURATION=n.ConstantBackoff=n.CircuitState=n.BrokenCircuitError=void 0;var s=e("./create-service-policy.cjs");Object.defineProperty(n,"BrokenCircuitError",{enumerable:!0,get:function(){return s.BrokenCircuitError}}),Object.defineProperty(n,"CircuitState",{enumerable:!0,get:function(){return s.CircuitState}}),Object.defineProperty(n,"ConstantBackoff",{enumerable:!0,get:function(){return s.ConstantBackoff}}),Object.defineProperty(n,"DEFAULT_CIRCUIT_BREAK_DURATION",{enumerable:!0,get:function(){return s.DEFAULT_CIRCUIT_BREAK_DURATION}}),Object.defineProperty(n,"DEFAULT_DEGRADED_THRESHOLD",{enumerable:!0,get:function(){return s.DEFAULT_DEGRADED_THRESHOLD}}),Object.defineProperty(n,"DEFAULT_MAX_CONSECUTIVE_FAILURES",{enumerable:!0,get:function(){return s.DEFAULT_MAX_CONSECUTIVE_FAILURES}}),Object.defineProperty(n,"DEFAULT_MAX_RETRIES",{enumerable:!0,get:function(){return s.DEFAULT_MAX_RETRIES}}),Object.defineProperty(n,"ExponentialBackoff",{enumerable:!0,get:function(){return s.ExponentialBackoff}}),Object.defineProperty(n,"createServicePolicy",{enumerable:!0,get:function(){return s.createServicePolicy}}),Object.defineProperty(n,"handleAll",{enumerable:!0,get:function(){return s.handleAll}}),Object.defineProperty(n,"handleWhen",{enumerable:!0,get:function(){return s.handleWhen}}),i(e("./constants.cjs"),n);var o=e("./util.cjs");Object.defineProperty(n,"BNToHex",{enumerable:!0,get:function(){return o.BNToHex}}),Object.defineProperty(n,"convertHexToDecimal",{enumerable:!0,get:function(){return o.convertHexToDecimal}}),Object.defineProperty(n,"fetchWithErrorHandling",{enumerable:!0,get:function(){return o.fetchWithErrorHandling}}),Object.defineProperty(n,"fractionBN",{enumerable:!0,get:function(){return o.fractionBN}}),Object.defineProperty(n,"fromHex",{enumerable:!0,get:function(){return o.fromHex}}),Object.defineProperty(n,"getBuyURL",{enumerable:!0,get:function(){return o.getBuyURL}}),Object.defineProperty(n,"gweiDecToWEIBN",{enumerable:!0,get:function(){return o.gweiDecToWEIBN}}),Object.defineProperty(n,"handleFetch",{enumerable:!0,get:function(){return o.handleFetch}}),Object.defineProperty(n,"hexToBN",{enumerable:!0,get:function(){return o.hexToBN}}),Object.defineProperty(n,"hexToText",{enumerable:!0,get:function(){return o.hexToText}}),Object.defineProperty(n,"isNonEmptyArray",{enumerable:!0,get:function(){return o.isNonEmptyArray}}),Object.defineProperty(n,"isPlainObject",{enumerable:!0,get:function(){return o.isPlainObject}}),Object.defineProperty(n,"isSafeChainId",{enumerable:!0,get:function(){return o.isSafeChainId}}),Object.defineProperty(n,"isSafeDynamicKey",{enumerable:!0,get:function(){return o.isSafeDynamicKey}}),Object.defineProperty(n,"isSmartContractCode",{enumerable:!0,get:function(){return o.isSmartContractCode}}),Object.defineProperty(n,"isValidJson",{enumerable:!0,get:function(){return o.isValidJson}}),Object.defineProperty(n,"isValidHexAddress",{enumerable:!0,get:function(){return o.isValidHexAddress}}),Object.defineProperty(n,"normalizeEnsName",{enumerable:!0,get:function(){return o.normalizeEnsName}}),Object.defineProperty(n,"query",{enumerable:!0,get:function(){return o.query}}),Object.defineProperty(n,"safelyExecute",{enumerable:!0,get:function(){return o.safelyExecute}}),Object.defineProperty(n,"safelyExecuteWithTimeout",{enumerable:!0,get:function(){return o.safelyExecuteWithTimeout}}),Object.defineProperty(n,"successfulFetch",{enumerable:!0,get:function(){return o.successfulFetch}}),Object.defineProperty(n,"timeoutFetch",{enumerable:!0,get:function(){return o.timeoutFetch}}),Object.defineProperty(n,"toChecksumHexAddress",{enumerable:!0,get:function(){return o.toChecksumHexAddress}}),Object.defineProperty(n,"toHex",{enumerable:!0,get:function(){return o.toHex}}),Object.defineProperty(n,"weiHexToGweiDec",{enumerable:!0,get:function(){return o.weiHexToGweiDec}}),Object.defineProperty(n,"isEqualCaseInsensitive",{enumerable:!0,get:function(){return o.isEqualCaseInsensitive}}),i(e("./types.cjs"),n),i(e("./siwe.cjs"),n)},{"./constants.cjs":34,"./create-service-policy.cjs":35,"./siwe.cjs":38,"./types.cjs":39,"./util.cjs":40}],37:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.projectLogger=void 0;const r=e("@metamask/utils");Object.defineProperty(n,"createModuleLogger",{enumerable:!0,get:function(){return r.createModuleLogger}}),n.projectLogger=(0,r.createProjectLogger)("controller-utils")},{"@metamask/utils":327}],38:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.detectSIWE=n.isValidSIWEOrigin=n.parseDomainParts=void 0;const r=e("@metamask/utils"),i=e("@spruceid/siwe-parser"),s=e("./logger.cjs"),o=(0,s.createModuleLogger)(s.projectLogger,"detect-siwe");function a(e){try{const i="string"!=typeof(n=e)?n:(0,r.remove0x)(n),s=t.from(i,"hex");return 32===s.length?e:s.toString("utf8")}catch(t){return o(t),e}var n}const c={"http:":"80","https:":"443"};n.parseDomainParts=(e,t)=>e.match(/^[^/:]*:\/\//u)?new URL(e):new URL(`${t}//${e}`);n.isValidSIWEOrigin=e=>{try{const{origin:t,siwe:r}=e;if(!t||!r?.parsedMessage?.domain)return!1;const i=new URL(t),s=(0,n.parseDomainParts)(r.parsedMessage.domain,i.protocol);return 0===s.hostname.localeCompare(i.hostname,void 0,{sensitivity:"accent"})&&(""!==s.port&&s.port!==i.port?""===i.port&&s.port===c[i.protocol]:""===s.username||s.username===i.username)}catch(e){return o(e),!1}};n.detectSIWE=e=>{try{const{data:t}=e,n=a(t);return{isSIWEMessage:!0,parsedMessage:new i.ParsedMessage(n)}}catch(e){return{isSIWEMessage:!1,parsedMessage:null}}}}).call(this)}).call(this,e("buffer").Buffer)},{"./logger.cjs":37,"@metamask/utils":327,"@spruceid/siwe-parser":371,buffer:403}],39:[function(e,t,n){"use strict";var r,i;Object.defineProperty(n,"__esModule",{value:!0}),n.NetworkNickname=n.BlockExplorerUrl=n.NetworksTicker=n.ChainId=n.BuiltInNetworkName=n.isInfuraNetworkType=n.isNetworkType=n.NetworkType=n.CustomNetworkType=n.InfuraNetworkType=void 0,n.InfuraNetworkType={mainnet:"mainnet",goerli:"goerli",sepolia:"sepolia","linea-goerli":"linea-goerli","linea-sepolia":"linea-sepolia","linea-mainnet":"linea-mainnet"},n.CustomNetworkType={"megaeth-testnet":"megaeth-testnet"},n.NetworkType={...n.InfuraNetworkType,...n.CustomNetworkType,rpc:"rpc"},n.isNetworkType=function(e){return Object.values(n.NetworkType).includes(e)},n.isInfuraNetworkType=function(e){return Object.keys(n.InfuraNetworkType).includes(e)},function(e){e.Mainnet="mainnet",e.Goerli="goerli",e.Sepolia="sepolia",e.LineaGoerli="linea-goerli",e.LineaSepolia="linea-sepolia",e.LineaMainnet="linea-mainnet",e.Aurora="aurora",e.MegaETHTestnet="megaeth-testnet"}(r||(n.BuiltInNetworkName=r={})),n.ChainId={[r.Mainnet]:"0x1",[r.Goerli]:"0x5",[r.Sepolia]:"0xaa36a7",[r.Aurora]:"0x4e454152",[r.LineaGoerli]:"0xe704",[r.LineaSepolia]:"0xe705",[r.LineaMainnet]:"0xe708",[r.MegaETHTestnet]:"0x18c6"},function(e){e.mainnet="ETH",e.goerli="GoerliETH",e.sepolia="SepoliaETH",e["linea-goerli"]="LineaETH",e["linea-sepolia"]="LineaETH",e["linea-mainnet"]="ETH",e["megaeth-testnet"]="MegaETH",e.rpc=""}(i||(n.NetworksTicker=i={})),n.BlockExplorerUrl={[r.Mainnet]:"https://etherscan.io",[r.Goerli]:"https://goerli.etherscan.io",[r.Sepolia]:"https://sepolia.etherscan.io",[r.LineaGoerli]:"https://goerli.lineascan.build",[r.LineaSepolia]:"https://sepolia.lineascan.build",[r.LineaMainnet]:"https://lineascan.build",[r.MegaETHTestnet]:"https://megaexplorer.xyz"},n.NetworkNickname={[r.Mainnet]:"Ethereum Mainnet",[r.Goerli]:"Goerli",[r.Sepolia]:"Sepolia",[r.LineaGoerli]:"Linea Goerli",[r.LineaSepolia]:"Linea Sepolia",[r.LineaMainnet]:"Linea",[r.MegaETHTestnet]:"Mega Testnet"}},{}],40:[function(e,t,n){(function(t){(function(){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.isEqualCaseInsensitive=n.isValidJson=n.isNonEmptyArray=n.isPlainObject=n.convertHexToDecimal=n.query=n.normalizeEnsName=n.timeoutFetch=n.fetchWithErrorHandling=n.handleFetch=n.successfulFetch=n.isSmartContractCode=n.isValidHexAddress=n.toChecksumHexAddress=n.safelyExecuteWithTimeout=n.safelyExecute=n.toHex=n.fromHex=n.hexToText=n.hexToBN=n.getBuyURL=n.weiHexToGweiDec=n.gweiDecToWEIBN=n.fractionBN=n.BNToHex=n.isSafeChainId=n.isSafeDynamicKey=n.PROTOTYPE_POLLUTION_BLOCKLIST=void 0;const i=e("@ethereumjs/util"),s=e("@metamask/ethjs-unit"),o=e("@metamask/utils"),a=r(e("bn.js")),c=r(e("eth-ens-namehash")),u=r(e("fast-deep-equal")),l=e("./constants.cjs"),d=new Error("timeout");function h(e){return e?new a.default((0,o.remove0x)(e),16):new a.default(0)}async function f(e,t){const n=await fetch(e,t);if(!n.ok)throw new Error(`Fetch failed with status '${n.status}' for request '${String(e)}'`);return n}async function p(e,t){const n=await f(e,t);return await n.json()}n.PROTOTYPE_POLLUTION_BLOCKLIST=["__proto__","constructor","prototype"],n.isSafeDynamicKey=function(e){return"string"==typeof e&&!n.PROTOTYPE_POLLUTION_BLOCKLIST.some((t=>e===t))},n.isSafeChainId=function(e){if(!(0,o.isHexString)(e))return!1;const t=Number.parseInt(e,(0,o.isStrictHexString)(e)?16:10);return Number.isSafeInteger(t)&&t>0&&t<=l.MAX_SAFE_CHAIN_ID},n.BNToHex=function(e){return(0,o.add0x)(e.toString(16))},n.fractionBN=function(e,t,n){const r=new a.default(t),i=new a.default(n);return e.mul(r).div(i)},n.gweiDecToWEIBN=function(e){if(Number.isNaN(e))return new a.default(0);const t=e.toString().split(),n=t[0]||"0";let r=t[1]||"";if(!r)return(0,s.toWei)(n,"gwei");if(r.length<=9)return(0,s.toWei)(`${n}.${r}`,"gwei");const i=r.slice(9)[0];r=r.slice(0,9);let o=(0,s.toWei)(`${n}.${r}`,"gwei");return Number(i)>=5&&(o=o.add(new a.default(1))),o},n.weiHexToGweiDec=function(e){const t=new a.default((0,o.remove0x)(e),16);return(0,s.fromWei)(t,"gwei")},n.getBuyURL=function(e="1",t,n=5){switch(e){case"1":return`https://buy.coinbase.com/?code=9ec56d01-7e81-5017-930c-513daa27bb6a&amount=${n}&address=${t}&crypto_currency=ETH`;case"5":return"https://goerli-faucet.slock.it/";case"11155111":return"https://sepoliafaucet.net/";default:return}},n.hexToBN=h,n.hexToText=function(e){try{const n=(0,o.remove0x)(e);return t.from(n,"hex").toString("utf8")}catch(t){return e}},n.fromHex=function(e){return a.default.isBN(e)?e:new a.default(h(e).toString(10))},n.toHex=function(e){return"string"==typeof e&&(0,o.isStrictHexString)(e)?e:`0x${a.default.isBN(e)||"bigint"==typeof e?e.toString(16):new a.default(e.toString(),10).toString(16)}`},n.safelyExecute=async function(e,t=!1){try{return await e()}catch(e){return void(t&&console.error(e))}},n.safelyExecuteWithTimeout=async function(e,t=!1,n=500){try{return await Promise.race([e(),new Promise(((e,t)=>setTimeout((()=>{t(d)}),n)))])}catch(e){return void(t&&console.error(e))}},n.toChecksumHexAddress=function(e){if("string"!=typeof e)return e;const t=(0,o.add0x)(e);return(0,o.isHexString)(t)?(0,i.toChecksumAddress)(t):t},n.isValidHexAddress=function(e,{allowNonPrefixed:t=!0}={}){const n=t?(0,o.add0x)(e):e;return!!(0,o.isStrictHexString)(n)&&(0,i.isValidAddress)(n)},n.isSmartContractCode=function(e){return!!e&&("0x"!==e&&"0x0"!==e)},n.successfulFetch=f,n.handleFetch=p,n.fetchWithErrorHandling=async function({url:e,options:t,timeout:n,errorCodesToCatch:r}){let i;try{i=n?Promise.race([await p(e,t),new Promise(((e,t)=>setTimeout((()=>{t(d)}),n)))]):await p(e,t)}catch(e){!function(e,t=[]){if(!e)return;if(!(e instanceof Error))throw e;if(!t.some((t=>e.message.includes(`Fetch failed with status '${t}'`)))&&!e.message.includes("Failed to fetch")&&e!==d)throw e;console.error(e)}(e,r)}return i},n.timeoutFetch=async function(e,t,n=500){return Promise.race([f(e,t),new Promise(((e,t)=>setTimeout((()=>{t(d)}),n)))])},n.normalizeEnsName=function(e){if(===e)return e;if(e&&"string"==typeof e)try{const t=c.default.normalize(e.trim());if(t.match(/^(([\w\d-]+)\.)*[\w\d-]{7,}\.(eth|test)$/u))return t}catch(e){}return null},n.query=function(e,t,n=[]){return new Promise(((r,i)=>{const s=(e,t)=>{e?i(e):r(t)};t in e&&"function"==typeof e[t]?e[t](...n,s):e.sendAsync({method:t,params:n},s)}))};n.convertHexToDecimal=(e="0x0")=>(0,o.isStrictHexString)(e)?parseInt(e,16):Number(e)?Number(e):0,n.isPlainObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},n.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},n.isValidJson=function(e){try{return(0,u.default)(e,JSON.parse(JSON.stringify(e)))}catch(e){return!1}},n.isEqualCaseInsensitive=function(e,t){return"string"==typeof e&&"string"==typeof t&&e.toLowerCase()===t.toLowerCase()}}).call(this)}).call(this,e("buffer").Buffer)},{"./constants.cjs":34,"@ethereumjs/util":17,"@metamask/ethjs-unit":41,"@metamask/utils":327,"bn.js":400,buffer:403,"eth-ens-namehash":448,"fast-deep-equal":496}],41:[function(e,t,n){"use strict";var r=e("bn.js"),i=e("@metamask/number-to-bn"),s=new r(0),o=new r(-1),a={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"};function c(e){var t=e?e.toLowerCase():"ether",n=a[t];if("string"!=typeof n)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(a,null,2));return new r(n,10)}function u(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).");return e}if("number"==typeof e)return String(e);if("object"==typeof e&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10);throw new Error("while converting number to string, invalid number value '"+e+"' type "+typeof e+)}t.exports={unitMap:a,numberToString:u,getValueOfUnit:c,fromWei:function(e,t,n){var r=i(e),u=r.lt(s),l=c(t),d=a[t].length-1||1,h=n||{};u&&(r=r.mul(o));for(var f=r.mod(l).toString(10);f.length<d;)f="0"+f;h.pad||(f=f.match(/^([0-9]*[1-9]|0)(0*)/)[1]);var p=r.div(l).toString(10);h.commify&&(p=p.replace(/\B(?=(\d{3})+(?!\d))/g,","));var m=p+("0"==f?"":+f);return u&&(m="-"+m),m},toWei:function(e,t){var n=u(e),i=c(t),s=a[t].length-1||1,l="-"===n.substring(0,1);if(l&&(n=n.substring(1)),===n)throw new Error("[ethjs-unit] while converting number "+e+" to wei, invalid value");var d=n.split();if(d.length>2)throw new Error("[ethjs-unit] while converting number "+e+" to wei,  too many decimal points");var h=d[0],f=d[1];if(h||(h="0"),f||(f="0"),f.length>s)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places");for(;f.length<s;)f+="0";h=new r(h),f=new r(f);var p=h.mul(i).add(f);return l&&(p=p.mul(o)),new r(p.toString(10),10)}}},{"@metamask/number-to-bn":70,"bn.js":400}],42:[function(e,t,n){"use strict";var r,i,s,o,a,c,u,l,d,h,f,p,m,y=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},g=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},b=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.JsonRpcEngine=void 0;const w=e("@metamask/rpc-errors"),v=b(e("@metamask/safe-event-emitter")),x=e("@metamask/utils");class E extends v.default{constructor({notificationHandler:e}={}){super(),r.add(this),s.set(this,!1),o.set(this,void 0),a.set(this,void 0),y(this,o,[],"f"),y(this,a,e,"f")}destroy(){g(this,o,"f").forEach((e=>{"destroy"in e&&"function"==typeof e.destroy&&e.destroy()})),y(this,o,[],"f"),y(this,s,!0,"f")}push(e){g(this,r,"m",c).call(this),g(this,o,"f").push(e)}handle(e,t){if(g(this,r,"m",c).call(this),t&&"function"!=typeof t)throw new Error('"callback" must be a function if provided.');return Array.isArray(e)?t?g(this,r,"m",u).call(this,e,t):g(this,r,"m",u).call(this,e):t?g(this,r,"m",l).call(this,e,t):this._promiseHandle(e)}asMiddleware(){return g(this,r,"m",c).call(this),async(e,t,n,r)=>{try{const[s,a,c]=await g(i,i,"m",h).call(i,e,t,g(this,o,"f"));return a?(await g(i,i,"m",p).call(i,c),r(s)):n((async e=>{try{await g(i,i,"m",p).call(i,c)}catch(t){return e(t)}return e()}))}catch(e){return r(e)}}}async _promiseHandle(e){return new Promise(((t,n)=>{g(this,r,"m",l).call(this,e,((e,r)=>{e&&void 0===r?n(e):t(r)})).catch(n)}))}}function S(e){return JSON.stringify(e,null,2)}n.JsonRpcEngine=E,i=E,s=new WeakMap,o=new WeakMap,a=new WeakMap,r=new WeakSet,c=function(){if(g(this,s,"f"))throw new Error("This engine is destroyed and can no longer be used.")},u=async function(e,t){try{if(0===e.length){const e=[{id:null,jsonrpc:"2.0",error:new w.JsonRpcError(w.errorCodes.rpc.invalidRequest,"Request batch must contain plain objects. Received an empty array")}];return t?t(null,e):e}const n=(await Promise.all(e.map(this._promiseHandle.bind(this)))).filter((e=>void 0!==e));return t?t(null,n):n}catch(e){if(t)return t(e);throw e}},l=async function(e,t){if(!e||Array.isArray(e)||"object"!=typeof e){const n=new w.JsonRpcError(w.errorCodes.rpc.invalidRequest,"Requests must be plain objects. Received: "+typeof e,{request:e});return t(n,{id:null,jsonrpc:"2.0",error:n})}if("string"!=typeof e.method){const n=new w.JsonRpcError(w.errorCodes.rpc.invalidRequest,"Must specify a string method. Received: "+typeof e.method,{request:e});return g(this,a,"f")&&!(0,x.isJsonRpcRequest)(e)?t(null):t(n,{id:e.id??null,jsonrpc:"2.0",error:n})}if(g(this,a,"f")&&(0,x.isJsonRpcNotification)(e)&&!(0,x.isJsonRpcRequest)(e)){try{await g(this,a,"f").call(this,e)}catch(n){return t(n)}return t(null)}let n=null;const r={...e},s={id:r.id,jsonrpc:r.jsonrpc};try{await g(i,i,"m",d).call(i,r,s,g(this,o,"f"))}catch(e){n=e}return n&&(delete s.result,s.error||(s.error=(0,w.serializeError)(n))),t(n,s)},d=async function(e,t,n){const[r,s,o]=await g(i,i,"m",h).call(i,e,t,n);if(g(i,i,"m",m).call(i,e,t,s),await g(i,i,"m",p).call(i,o),r)throw r},h=async function(e,t,n){const r=[];let s=null,o=!1;for(const a of n)if([s,o]=await g(i,i,"m",f).call(i,e,t,a,r),o)break;return[s,o,r.reverse()]},f=async function(e,t,n,r){return new Promise((i=>{const s=e=>{const n=e||t.error;n&&(t.error=(0,w.serializeError)(n)),i([n,!0])},o=n=>{t.error?s(t.error):(n&&("function"!=typeof n&&s(new w.JsonRpcError(w.errorCodes.rpc.internal,`JsonRpcEngine: "next" return handlers must be functions. Received "${typeof n}" for request:\n${S(e)}`,{request:e})),r.push(n)),i([null,!1]))};try{n(e,t,o,s)}catch(e){s(e)}}))},p=async function(e){for(const t of e)await new Promise(((e,n)=>{t((t=>t?n(t):e()))}))},m=function(e,t,n){if(!(0,x.hasProperty)(t,"result")&&!(0,x.hasProperty)(t,"error"))throw new w.JsonRpcError(w.errorCodes.rpc.internal,`JsonRpcEngine: Response has no error or result for request:\n${S(e)}`,{request:e});if(!n)throw new w.JsonRpcError(w.errorCodes.rpc.internal,`JsonRpcEngine: Nothing ended request:\n${S(e)}`,{request:e})}},{"@metamask/rpc-errors":96,"@metamask/safe-event-emitter":98,"@metamask/utils":327}],43:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createAsyncMiddleware=void 0,n.createAsyncMiddleware=function(e){return async(t,n,r,i)=>{let s;const o=new Promise((e=>{s=e}));let a=null,c=!1;const u=async()=>(c=!0,r((e=>{a=e,s()})),o);try{await e(t,n,u),c?(await o,a(null)):i(null)}catch(e){a?a(e):i(e)}}}},{}],44:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createScaffoldMiddleware=void 0,n.createScaffoldMiddleware=function(e){return(t,n,r,i)=>{const s=e[t.method];return void 0===s?r():"function"==typeof s?s(t,n,r,i):(n.result=s,i())}}},{}],45:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getUniqueId=void 0;const r=4294967295;let i=Math.floor(Math.random()*r);n.getUniqueId=function(){return i=(i+1)%r,i}},{}],46:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createIdRemapMiddleware=void 0;const r=e("./getUniqueId.cjs");n.createIdRemapMiddleware=function(){return(e,t,n,i)=>{const s=e.id,o=(0,r.getUniqueId)();e.id=o,t.id=o,n((n=>{e.id=s,t.id=s,n()}))}}},{"./getUniqueId.cjs":45}],47:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeMiddleware=n.JsonRpcEngine=n.createIdRemapMiddleware=n.getUniqueId=n.createScaffoldMiddleware=n.createAsyncMiddleware=void 0;var r=e("./createAsyncMiddleware.cjs");Object.defineProperty(n,"createAsyncMiddleware",{enumerable:!0,get:function(){return r.createAsyncMiddleware}});var i=e("./createScaffoldMiddleware.cjs");Object.defineProperty(n,"createScaffoldMiddleware",{enumerable:!0,get:function(){return i.createScaffoldMiddleware}});var s=e("./getUniqueId.cjs");Object.defineProperty(n,"getUniqueId",{enumerable:!0,get:function(){return s.getUniqueId}});var o=e("./idRemapMiddleware.cjs");Object.defineProperty(n,"createIdRemapMiddleware",{enumerable:!0,get:function(){return o.createIdRemapMiddleware}});var a=e("./JsonRpcEngine.cjs");Object.defineProperty(n,"JsonRpcEngine",{enumerable:!0,get:function(){return a.JsonRpcEngine}});var c=e("./mergeMiddleware.cjs");Object.defineProperty(n,"mergeMiddleware",{enumerable:!0,get:function(){return c.mergeMiddleware}})},{"./JsonRpcEngine.cjs":42,"./createAsyncMiddleware.cjs":43,"./createScaffoldMiddleware.cjs":44,"./getUniqueId.cjs":45,"./idRemapMiddleware.cjs":46,"./mergeMiddleware.cjs":48}],48:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeMiddleware=void 0;const r=e("./JsonRpcEngine.cjs");n.mergeMiddleware=function(e){const t=new r.JsonRpcEngine;return e.forEach((e=>t.push(e))),t.asMiddleware()}},{"./JsonRpcEngine.cjs":42}],49:[function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.getBIP44AddressKeyDeriver=n.deriveBIP44AddressKey=n.BIP44CoinTypeNode=n.BIP_44_COIN_TYPE_DEPTH=void 0;const o=e("./BIP44Node.cjs"),a=e("./constants.cjs"),c=e("./SLIP10Node.cjs"),u=e("./utils.cjs");n.BIP_44_COIN_TYPE_DEPTH=2;class l{static async fromJSON(e,t,n){h(t),d(e.depth);const r=await o.BIP44Node.fromExtendedKey({depth:e.depth,index:e.index,network:e.network,parentFingerprint:e.parentFingerprint,chainCode:(0,u.hexStringToBytes)(e.chainCode),privateKey:(0,u.nullableHexStringToBytes)(e.privateKey),publicKey:(0,u.hexStringToBytes)(e.publicKey)},n);return new l(r,t)}static async fromDerivationPath(e,t,n){d(e.length-1);const r=await o.BIP44Node.fromDerivationPath({derivationPath:e,network:t},n),i=(0,u.getBIP44CoinType)(e);return new l(r,i)}static async fromSeed({derivationPath:e,network:t},n){d(e.length-1);const r=await o.BIP44Node.fromSeed({derivationPath:e,network:t},n),i=(0,u.getBIP44CoinType)(e);return new l(r,i)}static async fromNode(e,t){if(!(e instanceof o.BIP44Node))throw new Error("Invalid node: Expected an instance of BIP44Node.");return h(t),d(e.depth),Promise.resolve(new l(e,t))}constructor(e,t){r.set(this,void 0),i(this,r,e,"f"),this.coin_type=t,this.path=(0,u.getBIP44CoinTypePathString)(t),Object.freeze(this)}get depth(){return s(this,r,"f").depth}get privateKeyBytes(){return s(this,r,"f").privateKeyBytes}get publicKeyBytes(){return s(this,r,"f").publicKeyBytes}get chainCodeBytes(){return s(this,r,"f").chainCodeBytes}get privateKey(){return s(this,r,"f").privateKey}get publicKey(){return s(this,r,"f").publicKey}get compressedPublicKey(){return s(this,r,"f").compressedPublicKey}get compressedPublicKeyBytes(){return s(this,r,"f").compressedPublicKeyBytes}get chainCode(){return s(this,r,"f").chainCode}get address(){return s(this,r,"f").address}get masterFingerprint(){return s(this,r,"f").masterFingerprint}get parentFingerprint(){return s(this,r,"f").parentFingerprint}get fingerprint(){return s(this,r,"f").fingerprint}get index(){return s(this,r,"f").index}get network(){return s(this,r,"f").network}get curve(){return s(this,r,"f").curve}get extendedKey(){return s(this,r,"f").extendedKey}async deriveBIP44AddressKey({account:e=0,change:t=0,address_index:n}){return await s(this,r,"f").derive((0,u.getBIP44CoinTypeToAddressPathTuple)({account:e,change:t,address_index:n}))}toJSON(){return{...s(this,r,"f").toJSON(),coin_type:this.coin_type,path:this.path}}}function d(e){if(e!==n.BIP_44_COIN_TYPE_DEPTH)throw new Error(`Invalid depth: Coin type nodes must be of depth ${n.BIP_44_COIN_TYPE_DEPTH}. Received: "${e}"`)}function h(e){if("number"!=typeof e||!Number.isInteger(e)||e<0)throw new Error("Invalid coin type: The specified coin type must be a non-negative integer number.")}async function f(e,t){if(e instanceof l)return d(e.depth),e;if("string"==typeof e){const n=await o.BIP44Node.fromExtendedKey(e,t),r=await l.fromNode(n,n.index-a.BIP_32_HARDENED_OFFSET);return d(r.depth),r}return l.fromJSON(e,e.coin_type,t)}n.BIP44CoinTypeNode=l,r=new WeakMap,n.deriveBIP44AddressKey=async function(e,{account:t=0,change:n=0,address_index:r},i){const s=(0,u.getBIP44CoinTypeToAddressPathTuple)({account:t,change:n,address_index:r}),a=await f(e,i),l=await(0,c.deriveChildNode)({path:s,node:a},i);return new o.BIP44Node(l)},n.getBIP44AddressKeyDeriver=async function(e,t,n){const{account:r=0,change:i=0}=t??{},s=await f(e,n),a=(0,u.getHardenedBIP32NodeToken)(r),l=(0,u.getBIP32NodeToken)(i),d=async(e,t=!1)=>{const r=await(0,c.deriveChildNode)({path:[a,l,t?(0,u.getHardenedBIP32NodeToken)(e):(0,u.getUnhardenedBIP32NodeToken)(e)],node:s},n);return new o.BIP44Node(r)};return d.coin_type=s.coin_type,d.path=(0,u.getBIP44ChangePathString)(s.path,{account:r,change:i}),Object.freeze(d),d}},{"./BIP44Node.cjs":50,"./SLIP10Node.cjs":51,"./constants.cjs":52,"./utils.cjs":69}],50:[function(e,t,n){"use strict";var r,i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},s=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.validateBIP44Depth=n.BIP44Node=void 0;const o=e("@metamask/utils"),a=e("./constants.cjs"),c=e("./extended-keys.cjs"),u=e("./SLIP10Node.cjs"),l=e("./utils.cjs");class d{static async fromJSON(e,t){return d.fromExtendedKey(e,t)}static async fromExtendedKey(e,t){if("string"==typeof e){const n=(0,c.decodeExtendedKey)(e),{type:r,chainCode:i,depth:s,parentFingerprint:o,index:a,network:u}=n;if("private"===r){const{privateKey:e}=n;return d.fromExtendedKey({depth:s,parentFingerprint:o,index:a,network:u,privateKey:e,chainCode:i},t)}const{publicKey:l}=n;return d.fromExtendedKey({depth:s,parentFingerprint:o,index:a,network:u,publicKey:l,chainCode:i},t)}const{privateKey:n,publicKey:r,chainCode:i,depth:s,parentFingerprint:o,index:a,network:l}=e;h(s);const f=await u.SLIP10Node.fromExtendedKey({privateKey:n,publicKey:r,chainCode:i,depth:s,parentFingerprint:o,index:a,network:l,curve:"secp256k1"},t);return new d(f)}static async fromDerivationPath({derivationPath:e,network:t},n){h(e.length-1),f(e,a.MIN_BIP_44_DEPTH);const r=await u.SLIP10Node.fromDerivationPath({derivationPath:e,network:t,curve:"secp256k1"},n);return new d(r)}static async fromSeed({derivationPath:e,network:t},n){h(e.length-1),f(e,a.MIN_BIP_44_DEPTH);const r=await u.SLIP10Node.fromSeed({derivationPath:e,network:t,curve:"secp256k1"},n);return new d(r)}get depth(){return i(this,r,"f").depth}get privateKeyBytes(){return i(this,r,"f").privateKeyBytes}get publicKeyBytes(){return i(this,r,"f").publicKeyBytes}get chainCodeBytes(){return i(this,r,"f").chainCodeBytes}get privateKey(){return i(this,r,"f").privateKey}get publicKey(){return i(this,r,"f").publicKey}get compressedPublicKey(){return i(this,r,"f").compressedPublicKey}get compressedPublicKeyBytes(){return i(this,r,"f").compressedPublicKeyBytes}get chainCode(){return i(this,r,"f").chainCode}get address(){return i(this,r,"f").address}get masterFingerprint(){return i(this,r,"f").masterFingerprint}get parentFingerprint(){return i(this,r,"f").parentFingerprint}get fingerprint(){return i(this,r,"f").fingerprint}get index(){return i(this,r,"f").index}get network(){return i(this,r,"f").network}get extendedKey(){return i(this,r,"f").extendedKey}get curve(){return i(this,r,"f").curve}constructor(e){r.set(this,void 0),s(this,r,e,"f"),Object.freeze(this)}neuter(){const e=i(this,r,"f").neuter();return new d(e)}async derive(e){if(this.depth===a.MAX_BIP_44_DEPTH)throw new Error("Illegal operation: This HD tree node is already a leaf node.");h(this.depth+e.length),f(e,this.depth+1);const t=await i(this,r,"f").derive(e);return new d(t)}toJSON(){return{depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,network:this.network,privateKey:this.privateKey,publicKey:this.publicKey,chainCode:this.chainCode}}}function h(e){if((0,u.validateBIP32Depth)(e),e<a.MIN_BIP_44_DEPTH||e>a.MAX_BIP_44_DEPTH)throw new Error(`Invalid HD tree path depth: The depth must be a positive integer N such that 0 <= N <= 5. Received: "${e}"`)}function f(e,t){e.forEach(((e,n)=>{const r=t+n;if(r!==a.MIN_BIP_44_DEPTH)switch((0,o.assert)("string"==typeof e),r){case 1:if(e!==a.BIP44PurposeNodeToken)throw new Error(`Invalid derivation path: The "purpose" node (depth 1) must be the string "${a.BIP44PurposeNodeToken}".`);break;case 2:if(!a.BIP_32_PATH_REGEX.test(e)||!(0,l.isHardened)(e))throw new Error('Invalid derivation path: The "coin_type" node (depth 2) must be a hardened BIP-32 node.');break;case 3:if(!a.BIP_32_PATH_REGEX.test(e)||!(0,l.isHardened)(e))throw new Error('Invalid derivation path: The "account" node (depth 3) must be a hardened BIP-32 node.');break;case 4:if(!a.BIP_32_PATH_REGEX.test(e))throw new Error('Invalid derivation path: The "change" node (depth 4) must be a BIP-32 node.');break;case a.MAX_BIP_44_DEPTH:if(!a.BIP_32_PATH_REGEX.test(e))throw new Error('Invalid derivation path: The "address_index" node (depth 5) must be a BIP-32 node.')}else if(!(e instanceof Uint8Array||a.BIP_39_PATH_REGEX.test(e)))throw new Error('Invalid derivation path: The "m" / seed node (depth 0) must be a BIP-39 node.')}))}n.BIP44Node=d,r=new WeakMap,n.validateBIP44Depth=h},{"./SLIP10Node.cjs":51,"./constants.cjs":52,"./extended-keys.cjs":66,"./utils.cjs":69,"@metamask/utils":327}],51:[function(e,t,n){"use strict";var r,i,s,o,a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},c=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildNode=n.validateRootIndex=n.validateMasterParentFingerprint=n.validateParentFingerprint=n.validateBIP32Depth=n.SLIP10Node=void 0;const u=e("@metamask/utils"),l=e("./constants.cjs"),d=e("./curves/index.cjs"),h=e("./derivation.cjs"),f=e("./derivers/bip32.cjs"),p=e("./derivers/bip39.cjs"),m=e("./extended-keys.cjs"),y=e("./guard.cjs"),g=e("./utils.cjs");class b{static async fromJSON(e,t){return r.fromExtendedKey(e,t)}static async fromExtendedKey(e,t){if("string"==typeof e){const n=(0,m.decodeExtendedKey)(e),{chainCode:i,depth:s,parentFingerprint:o,index:a}=n;if("private"===n.type){const{privateKey:e}=n;return r.fromExtendedKey({depth:s,parentFingerprint:o,index:a,privateKey:e,chainCode:i,curve:"secp256k1"},t)}const{publicKey:c}=n;return r.fromExtendedKey({depth:s,parentFingerprint:o,index:a,publicKey:c,chainCode:i,curve:"secp256k1"},t)}const{depth:n,masterFingerprint:s,parentFingerprint:o,index:c,network:h,privateKey:f,publicKey:p,chainCode:b,curve:S,guard:A}=e,_=(0,g.getBytes)(b,l.BYTES_KEY_LENGTH);(0,g.validateCurve)(S),w(n),(0,g.validateBIP32Index)(c),E(c,n),(0,g.validateNetwork)(h),v(o,n),x(s,o,n);const T=(0,d.getCurveByName)(S);if(f){const e=(0,g.getBytesUnsafe)(f,T.privateKeyLength);(0,u.assert)(T.isValidPrivateKey(e),`Invalid private key: Value is not a valid ${S} private key.`);const l=A===y.PUBLIC_KEY_GUARD&&p?(0,g.getBytes)(p,T.publicKeyLength):void 0;return new r({depth:n,masterFingerprint:s,parentFingerprint:o,index:c,network:h,chainCode:_,privateKey:e,publicKey:l,curve:S},t,a(this,r,"f",i))}if(p){const e=(0,g.getBytes)(p,T.publicKeyLength);return new r({depth:n,masterFingerprint:s,parentFingerprint:o,index:c,network:h,chainCode:_,publicKey:e,curve:S},t,a(this,r,"f",i))}throw new Error("Invalid options: Must provide either a private key or a public key.")}static async fromDerivationPath({derivationPath:e,network:t,curve:n},r){if((0,g.validateCurve)(n),!e)throw new Error("Invalid options: Must provide a derivation path.");if(0===e.length)throw new Error("Invalid derivation path: May not specify an empty derivation path.");const i=await(0,p.getDerivationPathWithSeed)({path:e,curve:n},r);return await(0,h.deriveKeyFromPath)({path:i,depth:e.length-1,network:t,curve:n},r)}static async fromSeed({derivationPath:e,network:t,curve:n},r){if((0,g.validateCurve)(n),"ed25519Bip32"===n)throw new Error('Invalid curve: The curve "ed25519Bip32" is not supported by the `fromSeed` function.');if(!e)throw new Error("Invalid options: Must provide a derivation path.");if(0===e.length)throw new Error("Invalid derivation path: May not specify an empty derivation path.");return await(0,h.deriveKeyFromPath)({path:e,depth:e.length-1,network:t,curve:n},r)}constructor({depth:e,masterFingerprint:t,parentFingerprint:n,index:l,network:d="mainnet",chainCode:h,privateKey:f,publicKey:p,curve:m},y={},g){s.set(this,void 0),o.set(this,void 0),(0,u.assert)(g===a(r,r,"f",i),"SLIP10Node can only be constructed using `SLIP10Node.fromJSON`, `SLIP10Node.fromExtendedKey`, `SLIP10Node.fromDerivationPath`, or `SLIP10Node.fromSeed`."),(0,u.assert)(void 0!==f||void 0!==p,"SLIP10Node requires either a private key or a public key to be set."),this.depth=e,this.masterFingerprint=t,this.parentFingerprint=n,this.index=l,this.network=d,this.chainCodeBytes=h,this.privateKeyBytes=f,this.curve=m,c(this,s,p,"f"),c(this,o,y,"f"),Object.freeze(this)}get chainCode(){return(0,u.bytesToHex)(this.chainCodeBytes)}get privateKey(){if(this.privateKeyBytes)return(0,u.bytesToHex)(this.privateKeyBytes)}get publicKey(){return(0,u.bytesToHex)(this.publicKeyBytes)}get publicKeyBytes(){return void 0!==a(this,s,"f")||((0,u.assert)(this.privateKeyBytes,"Either a private key or public key is required."),c(this,s,(0,d.getCurveByName)(this.curve).getPublicKey(this.privateKeyBytes),"f")),a(this,s,"f")}get compressedPublicKeyBytes(){return(0,d.getCurveByName)(this.curve).compressPublicKey(this.publicKeyBytes)}get compressedPublicKey(){return(0,u.bytesToHex)(this.compressedPublicKeyBytes)}get address(){if("secp256k1"!==this.curve)throw new Error("Unable to get address for this node: Only secp256k1 is supported.");return(0,u.bytesToHex)((0,f.publicKeyToEthAddress)(this.publicKeyBytes))}get fingerprint(){return(0,g.getFingerprint)(this.compressedPublicKeyBytes,(0,d.getCurveByName)(this.curve).compressedPublicKeyLength)}get extendedKey(){(0,u.assert)("secp256k1"===this.curve,"Unable to get extended key for this node: Only secp256k1 is supported.");const e={depth:this.depth,parentFingerprint:this.parentFingerprint,index:this.index,network:this.network,chainCode:this.chainCodeBytes};return this.privateKeyBytes?(0,m.encodeExtendedKey)({...e,type:"private",privateKey:this.privateKeyBytes}):(0,m.encodeExtendedKey)({...e,type:"public",publicKey:this.publicKeyBytes})}neuter(){return new r({depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,chainCode:this.chainCodeBytes,publicKey:this.publicKeyBytes,curve:this.curve,network:this.network},a(this,o,"f"),a(r,r,"f",i))}async derive(e){return await S({path:e,node:this},a(this,o,"f"))}toJSON(){return{depth:this.depth,masterFingerprint:this.masterFingerprint,parentFingerprint:this.parentFingerprint,index:this.index,network:this.network,curve:this.curve,privateKey:this.privateKey,publicKey:this.publicKey,chainCode:this.chainCode}}}function w(e){if(!(0,g.isValidInteger)(e))throw new Error(`Invalid HD tree path depth: The depth must be a positive integer. Received: "${String(e)}".`)}function v(e,t){if(!(0,g.isValidInteger)(e))throw new Error(`Invalid parent fingerprint: The fingerprint must be a positive integer. Received: "${String(e)}".`);if(0===t&&0!==e)throw new Error(`Invalid parent fingerprint: The fingerprint of the root node must be 0. Received: "${String(e)}".`);if(t>0&&0===e)throw new Error(`Invalid parent fingerprint: The fingerprint of a child node must not be 0. Received: "${String(e)}".`)}function x(e,t,n){if(e&&n>=2&&e===t)throw new Error(`Invalid parent fingerprint: The fingerprint of a child node cannot be equal to the master fingerprint. Received: "${String(t)}".`)}function E(e,t){if(0===t&&0!==e)throw new Error(`Invalid index: The index of the root node must be 0. Received: "${String(e)}".`)}async function S({path:e,node:t},n){if(0===e.length)throw new Error("Invalid HD tree derivation path: Deriving a path of length 0 is not defined.");const r=t.depth+e.length;return w(r),await(0,h.deriveKeyFromPath)({path:e,node:t,depth:r},n)}n.SLIP10Node=b,r=b,s=new WeakMap,o=new WeakMap,i={value:Symbol("SLIP10Node.constructor")},n.validateBIP32Depth=w,n.validateParentFingerprint=v,n.validateMasterParentFingerprint=x,n.validateRootIndex=E,n.deriveChildNode=S},{"./constants.cjs":52,"./curves/index.cjs":57,"./derivation.cjs":59,"./derivers/bip32.cjs":60,"./derivers/bip39.cjs":61,"./extended-keys.cjs":66,"./guard.cjs":67,"./utils.cjs":69,"@metamask/utils":327}],52:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BIP_32_HARDENED_OFFSET=n.BIP_39_PATH_REGEX=n.CIP_3_PATH_REGEX=n.SLIP_10_PATH_REGEX=n.BIP_32_PATH_REGEX=n.UNPREFIXED_BIP_32_PATH_REGEX=n.UNPREFIXED_PATH_REGEX=n.BIP44PurposeNodeToken=n.MAX_BIP_32_INDEX=n.MAX_UNHARDENED_BIP_32_INDEX=n.MAX_BIP_44_DEPTH=n.MIN_BIP_44_DEPTH=n.BYTES_KEY_LENGTH=void 0,n.BYTES_KEY_LENGTH=32,n.MIN_BIP_44_DEPTH=0,n.MAX_BIP_44_DEPTH=5,n.MAX_UNHARDENED_BIP_32_INDEX=2147483647,n.MAX_BIP_32_INDEX=4294967295,n.BIP44PurposeNodeToken="bip32:44'",n.UNPREFIXED_PATH_REGEX=/^\d+$/u,n.UNPREFIXED_BIP_32_PATH_REGEX=/^(?<index>\d+)'?$/u,n.BIP_32_PATH_REGEX=/^bip32:\d+'?$/u,n.SLIP_10_PATH_REGEX=/^slip10:\d+'?$/u,n.CIP_3_PATH_REGEX=/^cip3:\d+'?$/u,n.BIP_39_PATH_REGEX=/^bip39:([a-z]+){1}( [a-z]+){11,23}$/u,n.BIP_32_HARDENED_OFFSET=2147483648},{}],53:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha256=n.ripemd160=n.pbkdf2Sha512=n.keccak256=n.hmacSha512=void 0;const r=e("@noble/hashes/hmac"),i=e("@noble/hashes/pbkdf2"),s=e("@noble/hashes/ripemd160"),o=e("@noble/hashes/sha256"),a=e("@noble/hashes/sha3"),c=e("@noble/hashes/sha512"),u=e("./utils.cjs");n.hmacSha512=async function(e,t,n={}){if(n.hmacSha512)return await n.hmacSha512(e,t);if((0,u.isWebCryptoSupported)()){const n=await crypto.subtle.importKey("raw",e,{name:"HMAC",hash:"SHA-512"},!1,["sign"]),r=await crypto.subtle.sign("HMAC",n,t);return new Uint8Array(r)}return(0,r.hmac)(c.sha512,e,t)},n.keccak256=function(e){return(0,a.keccak_256)(e)},n.pbkdf2Sha512=async function(e,t,n,r,s={}){if(s.pbkdf2Sha512)return await s.pbkdf2Sha512(e,t,n,r);if((0,u.isWebCryptoSupported)()){const i=await crypto.subtle.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]),s=await crypto.subtle.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:"SHA-512"}},i,8*r);return new Uint8Array(s)}return await(0,i.pbkdf2Async)(c.sha512,e,t,{c:n,dkLen:r})},n.ripemd160=function(e){return(0,s.ripemd160)(e)},n.sha256=function(e){return(0,o.sha256)(e)}},{"./utils.cjs":69,"@noble/hashes/hmac":360,"@noble/hashes/pbkdf2":362,"@noble/hashes/ripemd160":363,"@noble/hashes/sha256":365,"@noble/hashes/sha3":366,"@noble/hashes/sha512":367}],54:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.mod=n.getCurveByName=n.curves=void 0;const o=s(e("./ed25519.cjs")),a=s(e("./ed25519Bip32.cjs")),c=s(e("./secp256k1.cjs"));n.curves={secp256k1:c,ed25519:o,ed25519Bip32:a},n.getCurveByName=function(e){return n.curves[e]};var u=e("@noble/curves/abstract/modular");Object.defineProperty(n,"mod",{enumerable:!0,get:function(){return u.mod}})},{"./ed25519.cjs":55,"./ed25519Bip32.cjs":56,"./secp256k1.cjs":58,"@noble/curves/abstract/modular":343}],55:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressedPublicKeyLength=n.masterNodeGenerationSpec=n.privateKeyLength=n.decompressPublicKey=n.compressPublicKey=n.publicAdd=n.getPublicKey=n.publicKeyLength=n.deriveUnhardenedKeys=n.isValidPrivateKey=n.secret=n.name=n.curve=void 0;const r=e("@metamask/utils"),i=e("@noble/curves/ed25519");n.curve=i.ed25519.CURVE,n.name="ed25519",n.secret=(0,r.stringToBytes)("ed25519 seed");n.isValidPrivateKey=e=>!0,n.deriveUnhardenedKeys=!1,n.publicKeyLength=33;n.getPublicKey=(()=>{let e=!1;return(t,n)=>{e||(i.ed25519.ExtendedPoint.BASE._setWindowSize(4),e=!0);const s=i.ed25519.getPublicKey(t);return(0,r.concatBytes)([new Uint8Array([0]),s])}})();n.publicAdd=(e,t)=>{throw new Error("Ed25519 does not support public key derivation.")};n.compressPublicKey=e=>e;n.decompressPublicKey=e=>e,n.privateKeyLength=32,n.masterNodeGenerationSpec="slip10",n.compressedPublicKeyLength=33},{"@metamask/utils":327,"@noble/curves/ed25519":347}],56:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressedPublicKeyLength=n.masterNodeGenerationSpec=n.privateKeyLength=n.decompressPublicKey=n.compressPublicKey=n.publicAdd=n.getPublicKey=n.multiplyWithBase=n.bytesToNumberLE=n.publicKeyLength=n.deriveUnhardenedKeys=n.isValidPrivateKey=n.secret=n.name=n.curve=void 0;const r=e("@metamask/utils"),i=e("@noble/curves/abstract/modular"),s=e("@noble/curves/ed25519");function o(e,t){const n=e[t];return(0,r.assert)(void 0!==n,"Private key is too short."),n}n.curve=s.ed25519.CURVE,n.name="ed25519Bip32",n.secret=(0,r.stringToBytes)("");n.isValidPrivateKey=e=>!(7&o(e,0))&&(!(128&o(e,31))&&!(64&~o(e,31))),n.deriveUnhardenedKeys=!0,n.publicKeyLength=32;n.bytesToNumberLE=e=>(0,r.hexToBigInt)((0,r.bytesToHex)(Uint8Array.from(e).reverse()));n.multiplyWithBase=e=>{const t=(0,i.mod)((0,n.bytesToNumberLE)(e),n.curve.n);return s.ed25519.ExtendedPoint.BASE.multiply(t).toRawBytes()};n.getPublicKey=(e,t)=>(0,n.multiplyWithBase)(e.slice(0,32));n.publicAdd=(e,t)=>s.ed25519.ExtendedPoint.fromHex((0,r.remove0x)((0,r.bytesToHex)(e))).add(s.ed25519.ExtendedPoint.fromHex((0,r.remove0x)((0,r.bytesToHex)(t)))).toRawBytes();n.compressPublicKey=e=>e;n.decompressPublicKey=e=>e,n.privateKeyLength=64,n.masterNodeGenerationSpec="cip3",n.compressedPublicKeyLength=32},{"@metamask/utils":327,"@noble/curves/abstract/modular":343,"@noble/curves/ed25519":347}],57:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.ed25519Bip32=n.ed25519=n.secp256k1=void 0,s(e("./curve.cjs"),n),n.secp256k1=o(e("./secp256k1.cjs")),n.ed25519=o(e("./ed25519.cjs")),n.ed25519Bip32=o(e("./ed25519Bip32.cjs"))},{"./curve.cjs":54,"./ed25519.cjs":55,"./ed25519Bip32.cjs":56,"./secp256k1.cjs":58}],58:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compressedPublicKeyLength=n.masterNodeGenerationSpec=n.privateKeyLength=n.decompressPublicKey=n.compressPublicKey=n.publicAdd=n.getPublicKey=n.isValidPrivateKey=n.publicKeyLength=n.deriveUnhardenedKeys=n.secret=n.name=n.curve=void 0;const r=e("@metamask/utils"),i=e("@noble/curves/secp256k1"),s=e("../utils.cjs");n.curve=i.secp256k1.CURVE,n.name="secp256k1",n.secret=(0,r.stringToBytes)("Bitcoin seed"),n.deriveUnhardenedKeys=!0,n.publicKeyLength=65;n.isValidPrivateKey=e=>i.secp256k1.utils.isValidPrivateKey(e);n.getPublicKey=(()=>{let e=!1;return(t,n=!1)=>(e||(i.secp256k1.ProjectivePoint.BASE._setWindowSize(4),e=!0),i.secp256k1.getPublicKey(t,n))})();n.publicAdd=(e,t)=>{(0,r.assert)((0,s.isValidBytesKey)(t,32),"Invalid tweak: Tweak must be a non-zero 32-byte Uint8Array.");const n=i.secp256k1.ProjectivePoint.fromHex(e).add(i.secp256k1.ProjectivePoint.fromPrivateKey(t));return n.assertValidity(),n.toRawBytes(!1)};n.compressPublicKey=e=>i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!0);n.decompressPublicKey=e=>i.secp256k1.ProjectivePoint.fromHex(e).toRawBytes(!1),n.privateKeyLength=32,n.masterNodeGenerationSpec="slip10",n.compressedPublicKeyLength=33},{"../utils.cjs":69,"@metamask/utils":327,"@noble/curves/secp256k1":356}],59:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validatePathSegment=n.deriveKeyFromPath=void 0;const r=e("@metamask/utils"),i=e("./BIP44CoinTypeNode.cjs"),s=e("./BIP44Node.cjs"),o=e("./constants.cjs"),a=e("./curves/index.cjs"),c=e("./derivers/index.cjs"),u=e("./SLIP10Node.cjs");function l(e,t,n){if(0===e.length)throw new Error("Invalid HD path segment: The segment must not be empty.");let i=!1;if(e.forEach(((e,t)=>{if(0===t){if(i=e instanceof Uint8Array||o.BIP_39_PATH_REGEX.test(e),!(e instanceof Uint8Array||i||o.BIP_32_PATH_REGEX.test(e)||o.SLIP_10_PATH_REGEX.test(e)||o.CIP_3_PATH_REGEX.test(e)))throw d()}else if(e instanceof Uint8Array||!o.BIP_32_PATH_REGEX.test(e)&&!o.SLIP_10_PATH_REGEX.test(e)&&!o.CIP_3_PATH_REGEX.test(e))throw d()})),n===o.MIN_BIP_44_DEPTH&&(!i||1!==e.length))throw new Error(`Invalid HD path segment: The segment must consist of a single BIP-39 node for depths of ${o.MIN_BIP_44_DEPTH}. Received: "${String(e)}".`);if(!t&&!i)throw new Error("Invalid derivation parameters: Must specify parent key if the first node of the path segment is not a BIP-39 node.");if(t&&i)throw new Error("Invalid derivation parameters: May not specify parent key if the path segment starts with a BIP-39 node.");const s=i?e.slice(1):e;if(s.length>0){const e=s[0]?.split(":")[0];(0,r.assert)(e),(0,r.assert)(s.every((t=>t.startsWith(`${e}:`))),"Invalid HD path segment: Cannot mix 'bip32' and 'slip10' path segments.")}}function d(){return new Error("Invalid HD path segment: The path segment is malformed.")}n.deriveKeyFromPath=async function(e,t){const{path:n,depth:o=n.length}=e,h="node"in e?e.node:void 0,f="network"in e?e.network:h?.network,p="curve"in e?e.curve:h?.curve;if(h&&!(h instanceof u.SLIP10Node)&&!(h instanceof s.BIP44Node)&&!(h instanceof i.BIP44CoinTypeNode))throw new Error("Invalid arguments: Node must be a SLIP-10 node or a BIP-44 node when provided.");if(!p)throw new Error("Invalid arguments: Must specify either a parent node or curve.");return l(n,Boolean(h?.privateKey)||Boolean(h?.publicKey),o),await n.reduce((async(e,n,i)=>{const s=await e;if("string"==typeof n){const[e,i]=n.split(":");(0,r.assert)(e),(0,r.assert)(i),(0,r.assert)(function(e){return e in c.derivers}(e),`Unknown derivation type: "${e}".`);const o=c.derivers[e];return await o.deriveChildKey({path:i,node:s,curve:(0,a.getCurveByName)(p),network:f},t)}return(0,r.assert)(0===i,d()),await c.derivers.bip39.deriveChildKey({path:n,node:s,curve:(0,a.getCurveByName)(p),network:f},t)}),Promise.resolve(h))},n.validatePathSegment=l},{"./BIP44CoinTypeNode.cjs":49,"./BIP44Node.cjs":50,"./SLIP10Node.cjs":51,"./constants.cjs":52,"./curves/index.cjs":57,"./derivers/index.cjs":63,"@metamask/utils":327}],60:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildKey=n.publicKeyToEthAddress=n.privateKeyToEthAddress=void 0;const r=e("@metamask/utils"),i=e("./shared.cjs"),s=e("../constants.cjs"),o=e("../cryptography.cjs"),a=e("../curves/index.cjs"),c=e("../utils.cjs");function u(e){return(0,r.assert)(e instanceof Uint8Array&&(0,c.isValidBytesKey)(e,a.secp256k1.publicKeyLength),"Invalid key: The key must be a 65-byte, non-zero Uint8Array."),(0,o.keccak256)(e.slice(1)).slice(-20)}async function l(e,t,n){const{childIndex:r,privateKey:s,publicKey:o,isHardened:a,chainCode:u,curve:l}=t;if((0,c.validateBIP32Index)(r+1),s){const e=await(0,i.deriveSecretExtension)({privateKey:s,publicKey:l.compressPublicKey(o),childIndex:r+1,isHardened:a,curve:l}),c=await(0,i.generateEntropy)({chainCode:u,extension:e},n);return{...t,childIndex:r+1,entropy:c}}const d=(0,i.derivePublicExtension)({parentPublicKey:o,childIndex:r+1}),h=await(0,i.generateEntropy)({chainCode:u,extension:d});return{...t,childIndex:r+1,entropy:h}}n.privateKeyToEthAddress=function(e){return(0,r.assert)(e instanceof Uint8Array&&(0,c.isValidBytesKey)(e,s.BYTES_KEY_LENGTH),"Invalid key: The key must be a 32-byte, non-zero Uint8Array."),u(a.secp256k1.getPublicKey(e,!1))},n.publicKeyToEthAddress=u,n.deriveChildKey=async function(e,t){return(0,r.assert)("secp256k1"===e.curve.name,"Invalid curve: Only secp256k1 is supported by BIP-32."),(0,i.deriveChildKey)(e,l,t)}},{"../constants.cjs":52,"../cryptography.cjs":53,"../curves/index.cjs":57,"../utils.cjs":69,"./shared.cjs":64,"@metamask/utils":327}],61:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.entropyToCip3MasterNode=n.createBip39KeyFromSeed=n.deriveChildKey=n.getDerivationPathWithSeed=n.multipathToBip39Mnemonic=n.bip39MnemonicToMultipath=n.mnemonicToSeed=void 0;const r=e("@metamask/scure-bip39"),i=e("@metamask/scure-bip39/dist/wordlists/english.js"),s=e("@metamask/utils"),o=e("../constants.cjs"),a=e("../cryptography.cjs"),c=e("../curves/index.cjs"),u=e("../guard.cjs"),l=e("../SLIP10Node.cjs"),d=e("../utils.cjs"),h=[12,15,18,21,24];function f(e){const t=e.split(" ");(0,s.assert)(h.includes(t.length),"Invalid mnemonic phrase: The mnemonic phrase must consist of 12, 15, 18, 21, or 24 words."),(0,s.assert)(t.every((e=>i.wordlist.includes(e))),"Invalid mnemonic phrase: The mnemonic phrase contains an unknown word.")}async function p(e,t="",n){const r=`mnemonic${t}`.normalize("NFKD");return await(0,a.pbkdf2Sha512)(function(e,t){if("string"==typeof e)return f(e),(0,s.stringToBytes)(e.normalize("NFKD"));const n=Array.from(new Uint16Array(e.buffer)).map((e=>t[e])).join(" ");return f(n),(0,s.stringToBytes)(n)}(e,i.wordlist),(0,s.stringToBytes)(r),2048,64,n)}function m(e){return e instanceof Uint8Array?e:((0,s.assert)(e.startsWith("bip39:"),'Invalid HD path segment: The BIP-39 path must start with "bip39:),e.slice(6))}async function y(e,t,n,r){(0,s.assert)(e.length>=16&&e.length<=64,"Invalid seed: The seed must be between 16 and 64 bytes long.");const i=await(0,a.hmacSha512)(t.secret,e,r),c=i.slice(0,o.BYTES_KEY_LENGTH),h=i.slice(o.BYTES_KEY_LENGTH);(0,s.assert)(t.isValidPrivateKey(c),"Invalid private key: The private key must greater than 0 and less than the curve order.");const f=t.getPublicKey(c,!1),p=(0,d.getFingerprint)(t.compressPublicKey(f),t.compressedPublicKeyLength);return l.SLIP10Node.fromExtendedKey({privateKey:c,publicKey:f,chainCode:h,masterFingerprint:p,network:n,depth:0,parentFingerprint:0,index:0,curve:t.name,guard:u.PUBLIC_KEY_GUARD},r)}async function g(e,t,n,r){(0,s.assert)(e.length>=16&&e.length<=64,"Invalid entropy: The entropy must be between 16 and 64 bytes long.");const i=await(0,a.pbkdf2Sha512)(t.secret,e,4096,96,r);i[0]&=248,i[31]&=31,i[31]|=64;const o=i.slice(0,t.privateKeyLength),c=i.slice(t.privateKeyLength);(0,s.assert)(t.isValidPrivateKey(o),"Invalid private key.");const h=t.getPublicKey(o,!1),f=(0,d.getFingerprint)(t.compressPublicKey(h),t.compressedPublicKeyLength);return l.SLIP10Node.fromExtendedKey({privateKey:o,publicKey:h,chainCode:c,masterFingerprint:f,network:n,depth:0,parentFingerprint:0,index:0,curve:t.name,guard:u.PUBLIC_KEY_GUARD},r)}n.mnemonicToSeed=p,n.bip39MnemonicToMultipath=function(e){return`bip39:${e.toLowerCase().trim()}`},n.multipathToBip39Mnemonic=m,n.getDerivationPathWithSeed=async function({path:e,curve:t},n){const[o,...a]=e,u=m(o),l=(0,c.getCurveByName)(t);switch(l.masterNodeGenerationSpec){case"slip10":return[await p(u,"",n),...a];case"cip3":return[(0,r.mnemonicToEntropy)(u,i.wordlist),...a];default:return(0,s.assertExhaustive)(l)}},n.deriveChildKey=async function({path:e,curve:t,network:n},r){switch((0,s.assert)(e instanceof Uint8Array,"Invalid path: The path must be a Uint8Array."),t.masterNodeGenerationSpec){case"slip10":return y(e,t,n,r);case"cip3":return g(e,t,n,r);default:throw new Error("Unsupported master node generation spec.")}},n.createBip39KeyFromSeed=y,n.entropyToCip3MasterNode=g},{"../SLIP10Node.cjs":51,"../constants.cjs":52,"../cryptography.cjs":53,"../curves/index.cjs":57,"../guard.cjs":67,"../utils.cjs":69,"@metamask/scure-bip39":99,"@metamask/scure-bip39/dist/wordlists/english.js":100,"@metamask/utils":327}],62:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildKey=n.derivePublicKey=n.deriveChainCode=n.derivePrivateKey=n.getKeyExtension=n.add=n.mod2Pow256=n.trunc28Mul8=n.padEnd32Bytes=n.bigIntToBytes=n.bytesToBigInt=n.toReversed=void 0;const r=e("@metamask/utils"),i=e("./shared.cjs"),s=e("../constants.cjs"),o=e("../curves/index.cjs"),a=e("../SLIP10Node.cjs"),c=e("../utils.cjs");n.toReversed=e=>e.slice().reverse();n.bytesToBigInt=e=>{const t=(0,n.toReversed)(e),i=(0,r.bytesToHex)(t);return BigInt(i)};n.bigIntToBytes=e=>{const t=e.toString(16);return(0,n.toReversed)((0,r.hexToBytes)(t))};n.padEnd32Bytes=e=>(0,r.concatBytes)([e,new Uint8Array(Math.max(32-e.length,0)).fill(0)]);n.trunc28Mul8=e=>{const t=(0,n.bytesToBigInt)(e.slice(0,28))*BigInt(8);return(0,n.padEnd32Bytes)((0,n.bigIntToBytes)(t))};n.mod2Pow256=e=>(0,n.padEnd32Bytes)((0,n.bigIntToBytes)((0,o.mod)((0,n.bytesToBigInt)(e),BigInt(2)**BigInt(256))));n.add=(e,t)=>{const r=(0,n.bytesToBigInt)(e)+(0,n.bytesToBigInt)(t);return(0,n.padEnd32Bytes)((0,n.bigIntToBytes)(r)).slice(0,32)};n.getKeyExtension=(e,t,n)=>(0,r.concatBytes)([new Uint8Array([e]),t,(0,c.numberToUint32)(n,!0)]);const u=2,l=0;n.derivePrivateKey=async({parentNode:e,childIndex:t,isHardened:o},a)=>{const c=o?(0,n.getKeyExtension)(l,e.privateKeyBytes,t+s.BIP_32_HARDENED_OFFSET):(0,n.getKeyExtension)(u,e.publicKeyBytes,t),d=await(0,i.generateEntropy)({chainCode:e.chainCodeBytes,extension:c},a),h=d.subarray(0,32),f=d.subarray(32),p=e.privateKeyBytes.subarray(0,32),m=e.privateKeyBytes.subarray(32),y=(0,n.add)((0,n.trunc28Mul8)(h),p),g=(0,n.add)(f,m);return(0,r.concatBytes)([y,g])};const d=3,h=1;n.deriveChainCode=async({parentNode:e,childIndex:t,isHardened:r},o)=>{const a=r?(0,n.getKeyExtension)(h,e.privateKeyBytes,t+s.BIP_32_HARDENED_OFFSET):(0,n.getKeyExtension)(d,e.publicKeyBytes,t);return(await(0,i.generateEntropy)({chainCode:e.chainCodeBytes,extension:a},o)).subarray(32)};const f=2;n.derivePublicKey=async({parentNode:e,childIndex:t,curve:r},s)=>{const o=(0,n.getKeyExtension)(f,e.publicKeyBytes,t),a=(await(0,i.generateEntropy)({chainCode:e.chainCodeBytes,extension:o},s)).slice(0,32),c=r.getPublicKey((0,n.trunc28Mul8)(a));return r.publicAdd(e.publicKeyBytes,c)},n.deriveChildKey=async function(e,t){const{curve:o,node:c,path:u}=e;(0,i.validateNode)(c);const{childIndex:l,isHardened:d}=(0,i.getValidatedPath)(u,c,o);if("ed25519Bip32"!==o.name||!c)throw new Error("Unsupported curve: Only ed25519Bip32 is supported by CIP3.");const h=l+(d?s.BIP_32_HARDENED_OFFSET:0),{privateKeyBytes:f,chainCodeBytes:p,publicKeyBytes:m,masterFingerprint:y,depth:g,fingerprint:b}=c;if(f){const e={privateKeyBytes:f,chainCodeBytes:p,publicKeyBytes:m},i=await(0,n.derivePrivateKey)({parentNode:e,childIndex:l,isHardened:d},t),s=await(0,n.deriveChainCode)({parentNode:e,childIndex:l,isHardened:d},t);return a.SLIP10Node.fromExtendedKey({privateKey:(0,r.bytesToHex)(i),chainCode:(0,r.bytesToHex)(s),masterFingerprint:y,depth:g+1,parentFingerprint:b,index:h,curve:o.name},t)}(0,r.assert)(!d,"Invalid parameters: Cannot derive hardened child keys without a private key.");const w={chainCodeBytes:p,publicKeyBytes:m},v=await(0,n.derivePublicKey)({parentNode:w,childIndex:l,isHardened:!1,curve:o},t),x=await(0,n.deriveChainCode)({parentNode:w,childIndex:l,isHardened:!1},t);return a.SLIP10Node.fromExtendedKey({publicKey:(0,r.bytesToHex)(v),chainCode:(0,r.bytesToHex)(x),masterFingerprint:y,depth:g+1,parentFingerprint:b,index:h,curve:o.name},t)}},{"../SLIP10Node.cjs":51,"../constants.cjs":52,"../curves/index.cjs":57,"../utils.cjs":69,"./shared.cjs":64,"@metamask/utils":327}],63:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.mnemonicToSeed=n.createBip39KeyFromSeed=n.derivers=void 0;const o=s(e("./bip32.cjs")),a=s(e("./bip39.cjs")),c=s(e("./cip3.cjs")),u=s(e("./slip10.cjs"));n.derivers={bip32:o,bip39:a,slip10:u,cip3:c};var l=e("./bip39.cjs");Object.defineProperty(n,"createBip39KeyFromSeed",{enumerable:!0,get:function(){return l.createBip39KeyFromSeed}}),Object.defineProperty(n,"mnemonicToSeed",{enumerable:!0,get:function(){return l.mnemonicToSeed}})},{"./bip32.cjs":60,"./bip39.cjs":61,"./cip3.cjs":62,"./slip10.cjs":65}],64:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedPath=n.validateNode=n.generateEntropy=n.privateAdd=n.derivePublicChildKey=n.derivePublicExtension=n.deriveSecretExtension=n.deriveChildKey=void 0;const r=e("@metamask/utils"),i=e("../constants.cjs"),s=e("../cryptography.cjs"),o=e("../curves/index.cjs"),a=e("../guard.cjs"),c=e("../SLIP10Node.cjs"),u=e("../utils.cjs");async function l(e,t,n){const{privateKey:r,publicKey:s,entropy:o,childIndex:u,isHardened:d,depth:h,parentFingerprint:m,masterFingerprint:y,curve:g,network:b}=e;try{return r?await async function({entropy:e,privateKey:t,depth:n,masterFingerprint:r,parentFingerprint:s,childIndex:o,isHardened:u,curve:l,network:d},h){const f=o+(u?i.BIP_32_HARDENED_OFFSET:0),{privateKey:m,chainCode:y}=function({privateKey:e,entropy:t,curve:n}){const r=t.slice(0,32),i=t.slice(32);if("ed25519"===n.name)return{privateKey:r,chainCode:i};const s=p(e,r,n);return{privateKey:s,chainCode:i}}({privateKey:t,entropy:e,curve:l});return await c.SLIP10Node.fromExtendedKey({privateKey:m,chainCode:y,depth:n+1,masterFingerprint:r,parentFingerprint:s,index:f,curve:l.name,network:d,guard:a.PUBLIC_KEY_GUARD},h)}({entropy:o,privateKey:r,depth:h,masterFingerprint:y,parentFingerprint:m,childIndex:u,isHardened:d,curve:g,network:b},n):await f({entropy:o,publicKey:s,depth:h,masterFingerprint:y,parentFingerprint:m,childIndex:u,curve:g,network:b},n)}catch(r){return await l(await t(r,e,n),t,n)}}async function d({privateKey:e,publicKey:t,childIndex:n,isHardened:s,curve:o}){return s?(0,r.concatBytes)([new Uint8Array([0]),e,(0,u.numberToUint32)(n+i.BIP_32_HARDENED_OFFSET)]):((0,u.validateBytes)(t,o.compressedPublicKeyLength),h({parentPublicKey:t,childIndex:n}))}function h({parentPublicKey:e,childIndex:t}){return(0,r.concatBytes)([e,(0,u.numberToUint32)(t)])}async function f({entropy:e,publicKey:t,depth:n,masterFingerprint:r,parentFingerprint:i,childIndex:s,curve:o,network:a},u){const{publicKey:l,chainCode:d}=function({publicKey:e,entropy:t,curve:n}){const r=t.slice(0,32),i=t.slice(32);return{publicKey:n.publicAdd(e,r),chainCode:i}}({publicKey:t,entropy:e,curve:o});return await c.SLIP10Node.fromExtendedKey({publicKey:l,chainCode:d,depth:n+1,masterFingerprint:r,parentFingerprint:i,index:s,curve:o.name,network:a},u)}function p(e,t,n){(0,r.assert)((0,u.isValidBytesKey)(t,32),"Invalid tweak: Tweak must be a non-zero 32-byte Uint8Array.");const i=(0,r.bytesToBigInt)(e),s=(0,r.bytesToBigInt)(t);if(s>=n.curve.n)throw new Error("Invalid tweak: Tweak is larger than the curve order.");const a=(0,o.mod)(i+s,n.curve.n),c=(0,r.hexToBytes)(a.toString(16).padStart(64,"0"));if(!n.isValidPrivateKey(c))throw new Error("Invalid private key or tweak: The resulting private key is invalid.");return c}async function m({chainCode:e,extension:t},n){return await(0,s.hmacSha512)(e,t,n)}function y(e){(0,r.assert)(e,"Invalid parameters: Must specify a node to derive from.")}function g(e,t,n){!function(e,t,n){(0,r.assert)("string"==typeof e,"Invalid path: Must be a string.");const i=e.endsWith("'");(0,r.assert)(!i||t.privateKey,"Invalid parameters: Cannot derive hardened child keys without a private key."),(0,r.assert)(i||n.deriveUnhardenedKeys,`Invalid path: Cannot derive unhardened child keys with ${n.name}.`)}(e,t,n);const s=e.split("'")[0];(0,r.assert)(s);const o=parseInt(s,10);if(!i.UNPREFIXED_PATH_REGEX.test(s)||!Number.isInteger(o)||o<0||o>=i.BIP_32_HARDENED_OFFSET)throw new Error(`Invalid path: The index must be a non-negative decimal integer less than ${i.BIP_32_HARDENED_OFFSET}.`);return{childIndex:o,isHardened:e.includes("'")}}n.deriveChildKey=async function({path:e,node:t,curve:n,network:r},i,s){y(t);const{childIndex:o,isHardened:a}=g(e,t,n),c={chainCode:t.chainCodeBytes,childIndex:o,isHardened:a,depth:t.depth,parentFingerprint:t.fingerprint,masterFingerprint:t.masterFingerprint,curve:n,network:r};if(t.privateKeyBytes){const e=await d({privateKey:t.privateKeyBytes,get publicKey(){return t.compressedPublicKeyBytes},childIndex:o,isHardened:a,curve:n}),r=await m({chainCode:t.chainCodeBytes,extension:e},s);return await l({privateKey:t.privateKeyBytes,get publicKey(){return t.publicKeyBytes},entropy:r,...c},i,s)}const u=h({parentPublicKey:t.compressedPublicKeyBytes,childIndex:o}),f=await m({chainCode:t.chainCodeBytes,extension:u},s);return await l({publicKey:t.compressedPublicKeyBytes,entropy:f,...c},i,s)},n.deriveSecretExtension=d,n.derivePublicExtension=h,n.derivePublicChildKey=f,n.privateAdd=p,n.generateEntropy=m,n.validateNode=y,n.getValidatedPath=g},{"../SLIP10Node.cjs":51,"../constants.cjs":52,"../cryptography.cjs":53,"../curves/index.cjs":57,"../guard.cjs":67,"../utils.cjs":69,"@metamask/utils":327}],65:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.deriveChildKey=void 0;const r=e("@metamask/utils"),i=e("./shared.cjs"),s=e("../constants.cjs"),o=e("../utils.cjs");async function a(e,t,n){const{curve:a,isHardened:c,childIndex:u,entropy:l,chainCode:d}=t;if("ed25519"===a.name)throw e;const h=c?u+s.BIP_32_HARDENED_OFFSET:u,f=await(0,i.generateEntropy)({chainCode:d,extension:(0,r.concatBytes)([1,l.slice(32,64),(0,o.numberToUint32)(h)])},n);return{...t,entropy:f}}n.deriveChildKey=async function(e,t){return await(0,i.deriveChildKey)(e,a,t)}},{"../constants.cjs":52,"../utils.cjs":69,"./shared.cjs":64,"@metamask/utils":327}],66:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.encodeExtendedKey=n.decodeExtendedKey=void 0;const r=e("@metamask/utils"),i=e("./BIP44Node.cjs"),s=e("./curves/secp256k1.cjs"),o=e("./utils.cjs"),a=76067358,c=76066276,u=70617039,l=70615956;n.decodeExtendedKey=e=>{const t=(0,o.decodeBase58check)(e);if(78!==t.length)throw new Error(`Invalid extended key: Expected a length of 78, got ${t.length}.`);const n=(0,r.createDataView)(t),d=n.getUint32(0,!1),{network:h,type:f}=function(e){switch(e){case a:return{type:"public",network:"mainnet"};case u:return{type:"public",network:"testnet"};case c:return{type:"private",network:"mainnet"};case l:return{type:"private",network:"testnet"};default:throw new Error("Invalid extended key: Expected a public (xpub) or private key (xprv) version.")}}(d),p=n.getUint8(4);(0,i.validateBIP44Depth)(p);const m=n.getUint32(5,!1),y=n.getUint32(9,!1),g=t.slice(13,45);if(!(0,o.isValidBytesKey)(g,32))throw new Error("Invalid extended key: Chain code must be a 32-byte non-zero byte array.");const b=t.slice(45,78);if(!(0,o.isValidBytesKey)(b,33))throw new Error("Invalid extended key: Key must be a 33-byte non-zero byte array.");const w=(0,r.createDataView)(b);if("public"===f){if(2!==w.getUint8(0)&&3!==w.getUint8(0))throw new Error("Invalid extended key: Public key must start with 0x02 or 0x03.");return{type:f,depth:p,parentFingerprint:m,index:y,network:h,chainCode:g,publicKey:(0,s.decompressPublicKey)(b)}}if(0!==w.getUint8(0))throw new Error("Invalid extended key: Private key must start with 0x00.");return{type:f,depth:p,parentFingerprint:m,index:y,network:h,chainCode:g,privateKey:b.slice(1)}};n.encodeExtendedKey=e=>{const{type:t,depth:n,parentFingerprint:i,index:d,network:h,chainCode:f}=e,p=new Uint8Array(78),m=(0,r.createDataView)(p),y=function(e,t){switch(e){case"mainnet":return"public"===t?a:c;case"testnet":return"public"===t?u:l;default:return(0,r.assertExhaustive)(e)}}(h,t);if(m.setUint32(0,y,!1),m.setUint8(4,n),m.setUint32(5,i,!1),m.setUint32(9,d,!1),p.set(f,13),"public"===t){const{publicKey:t}=e,n=(0,s.compressPublicKey)(t);p.set(n,45)}if("private"===t){const{privateKey:t}=e;p.set(t,46)}return(0,o.encodeBase58check)(p)}},{"./BIP44Node.cjs":50,"./curves/secp256k1.cjs":58,"./utils.cjs":69,"@metamask/utils":327}],67:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PUBLIC_KEY_GUARD=void 0,n.PUBLIC_KEY_GUARD=Symbol("Public key guard. Do not export this from the module.")},{}],68:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.mnemonicToSeed=n.createBip39KeyFromSeed=n.mnemonicPhraseToBytes=n.isValidBIP32PathSegment=n.getBIP44CoinTypeToAddressPathTuple=n.getBIP44AddressKeyDeriver=n.deriveBIP44AddressKey=n.BIP_44_COIN_TYPE_DEPTH=n.BIP44CoinTypeNode=n.ed25519Bip32=n.ed25519=n.secp256k1=n.SLIP10Node=n.BIP44Node=void 0;var s=e("./BIP44Node.cjs");Object.defineProperty(n,"BIP44Node",{enumerable:!0,get:function(){return s.BIP44Node}});var o=e("./SLIP10Node.cjs");Object.defineProperty(n,"SLIP10Node",{enumerable:!0,get:function(){return o.SLIP10Node}});var a=e("./curves/index.cjs");Object.defineProperty(n,"secp256k1",{enumerable:!0,get:function(){return a.secp256k1}}),Object.defineProperty(n,"ed25519",{enumerable:!0,get:function(){return a.ed25519}}),Object.defineProperty(n,"ed25519Bip32",{enumerable:!0,get:function(){return a.ed25519Bip32}});var c=e("./BIP44CoinTypeNode.cjs");Object.defineProperty(n,"BIP44CoinTypeNode",{enumerable:!0,get:function(){return c.BIP44CoinTypeNode}}),Object.defineProperty(n,"BIP_44_COIN_TYPE_DEPTH",{enumerable:!0,get:function(){return c.BIP_44_COIN_TYPE_DEPTH}}),Object.defineProperty(n,"deriveBIP44AddressKey",{enumerable:!0,get:function(){return c.deriveBIP44AddressKey}}),Object.defineProperty(n,"getBIP44AddressKeyDeriver",{enumerable:!0,get:function(){return c.getBIP44AddressKeyDeriver}}),i(e("./constants.cjs"),n);var u=e("./utils.cjs");Object.defineProperty(n,"getBIP44CoinTypeToAddressPathTuple",{enumerable:!0,get:function(){return u.getBIP44CoinTypeToAddressPathTuple}}),Object.defineProperty(n,"isValidBIP32PathSegment",{enumerable:!0,get:function(){return u.isValidBIP32PathSegment}}),Object.defineProperty(n,"mnemonicPhraseToBytes",{enumerable:!0,get:function(){return u.mnemonicPhraseToBytes}});var l=e("./derivers/index.cjs");Object.defineProperty(n,"createBip39KeyFromSeed",{enumerable:!0,get:function(){return l.createBip39KeyFromSeed}}),Object.defineProperty(n,"mnemonicToSeed",{enumerable:!0,get:function(){return l.mnemonicToSeed}})},{"./BIP44CoinTypeNode.cjs":49,"./BIP44Node.cjs":50,"./SLIP10Node.cjs":51,"./constants.cjs":52,"./curves/index.cjs":57,"./derivers/index.cjs":63,"./utils.cjs":69}],69:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBIP44CoinType=n.validateNetwork=n.isWebCryptoSupported=n.numberToUint32=n.validateCurve=n.mnemonicPhraseToBytes=n.getFingerprint=n.encodeBase58check=n.decodeBase58check=n.validateBytes=n.getBytesUnsafe=n.getBytes=n.isValidInteger=n.isValidBytesKey=n.nullableHexStringToBytes=n.hexStringToBytes=n.isHardened=n.isValidBIP32PathSegment=n.isValidBIP32Index=n.validateBIP32Index=n.getBIP32NodeToken=n.getUnhardenedBIP32NodeToken=n.getHardenedBIP32NodeToken=n.getBIP44CoinTypeToAddressPathTuple=n.getBIP44ChangePathString=n.getBIP44CoinTypePathString=void 0;const r=e("@metamask/scure-bip39/dist/wordlists/english.js"),i=e("@metamask/utils"),s=e("@scure/base"),o=e("./BIP44CoinTypeNode.cjs"),a=e("./constants.cjs"),c=e("./cryptography.cjs"),u=e("./curves/index.cjs");function l(e){return f(e),`${d(e)}'`}function d(e){return f(e),`bip32:${e}`}function h(e){if("number"==typeof e)return d(e);if(!e||!Number.isInteger(e.index)||"boolean"!=typeof e.hardened)throw new Error("Invalid BIP-32 index: Must be an object containing the index and whether it is hardened.");return e.hardened?l(e.index):d(e.index)}function f(e){if(!p(e))throw new Error("Invalid BIP-32 index: Must be a non-negative integer.")}function p(e){return g(e)&&e<=a.MAX_BIP_32_INDEX}function m(e){return e instanceof Uint8Array?e:(0,i.hexToBytes)(e)}function y(e,t){if(e.length!==t)return!1;for(const t of e)if(0!==t)return!0;return!1}function g(e){return"number"==typeof e&&Number.isInteger(e)&&e>=0}function b(e,t){if(!y(e,t))throw new Error(`Invalid value: Must be a non-zero ${t}-byte byte array.`)}n.getBIP44CoinTypePathString=function(e){return`m / ${a.BIP44PurposeNodeToken} / ${l(e)}`},n.getBIP44ChangePathString=function(e,t){return`${e} / ${l(t.account??0)} / ${h(t.change??0)}`},n.getBIP44CoinTypeToAddressPathTuple=function({account:e=0,change:t=0,address_index:n}){return[l(e),h(t),h(n)]},n.getHardenedBIP32NodeToken=l,n.getUnhardenedBIP32NodeToken=d,n.getBIP32NodeToken=h,n.validateBIP32Index=f,n.isValidBIP32Index=p,n.isValidBIP32PathSegment=function(e){if("string"!=typeof e)return!1;const t=e.match(a.UNPREFIXED_BIP_32_PATH_REGEX);if(void 0===t?.groups?.index)return!1;const n=parseInt(t.groups.index,10);return g(n)&&n<=a.MAX_UNHARDENED_BIP_32_INDEX},n.isHardened=function(e){return e.endsWith("'")},n.hexStringToBytes=m,n.nullableHexStringToBytes=function(e){if(void 0!==e)return m(e)},n.isValidBytesKey=y,n.isValidInteger=g,n.getBytes=function(e,t){if(e instanceof Uint8Array)return b(e,t),e;if("string"==typeof e){const n=(0,i.hexToBytes)(e);return b(n,t),n}throw new Error("Invalid value: Expected an instance of Uint8Array or hexadecimal string.")},n.getBytesUnsafe=function e(t,n){if(t instanceof Uint8Array)return(0,i.assert)(t.length===n,`Invalid value: Must be a ${n}-byte byte array.`),t;if("string"==typeof t)return e((0,i.hexToBytes)(t),n);throw new Error("Invalid value: Expected an instance of Uint8Array or hexadecimal string.")},n.validateBytes=b;n.decodeBase58check=e=>{const t=(0,s.base58check)(c.sha256);try{return t.decode(e)}catch{throw new Error("Invalid extended key: Value is not base58-encoded, or the checksum is invalid.")}};n.encodeBase58check=e=>(0,s.base58check)(c.sha256).encode(e);n.getFingerprint=(e,t)=>{if(!y(e,t))throw new Error(`Invalid public key: The key must be a ${t}-byte, non-zero byte array.`);const n=(0,c.ripemd160)((0,c.sha256)(e));return(0,i.createDataView)(n).getUint32(0,!1)},n.mnemonicPhraseToBytes=function(e){const t=e.split(" ").map((e=>{const t=r.wordlist.indexOf(e);return(0,i.assert)(-1!==t,`Invalid mnemonic phrase: Unknown word "${e}".`),t}));return new Uint8Array(new Uint16Array(t).buffer)},n.validateCurve=function(e){if(!e||"string"!=typeof e)throw new Error("Invalid curve: Must specify a curve.");if(!Object.keys(u.curves).includes(e))throw new Error(`Invalid curve: Only the following curves are supported: ${Object.keys(u.curves).join(", ")}.`)},n.numberToUint32=function(e,t=!1){const n=new Uint8Array(4);return(0,i.createDataView)(n).setUint32(0,e,t),n},n.isWebCryptoSupported=function(){return Boolean(globalThis.crypto?.subtle)},n.validateNetwork=function(e){if(void 0!==e){if("string"!=typeof e)throw new Error("Invalid network: Must be a string if specified.");if(!["mainnet","testnet"].includes(e))throw new Error('Invalid network: Must be either "mainnet" or "testnet" if specified.')}},n.getBIP44CoinType=function(e){const t=e[o.BIP_44_COIN_TYPE_DEPTH].split(":")[1]?.replace("'","");(0,i.assert)(t,"Invalid derivation path: Coin type is not specified.");const n=Number.parseInt(t,10);return(0,i.assert)(g(n),"Invalid derivation path: Coin type is not a valid integer."),n}},{"./BIP44CoinTypeNode.cjs":49,"./constants.cjs":52,"./cryptography.cjs":53,"./curves/index.cjs":57,"@metamask/scure-bip39/dist/wordlists/english.js":100,"@metamask/utils":327,"@scure/base":369}],70:[function(e,t,n){var r=e("bn.js"),i=e("strip-hex-prefix");t.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new r(1),n=String(e).toLowerCase().trim(),s="0x"===n.substr(0,2)||"-0x"===n.substr(0,3),o=i(n);if("-"===o.substr(0,1)&&(o=i(o.slice(1)),t=new r(-1,10)),!(o=""===o?"0":o).match(/^-?[0-9]+$/)&&o.match(/^[0-9A-Fa-f]+$/)||o.match(/^[a-fA-F]+$/)||!0===s&&o.match(/^[0-9A-Fa-f]+$/))return new r(o,16).mul(t);if((o.match(/^-?[0-9]+$/)||""===o)&&!1===s)return new r(o,10).mul(t)}else if("object"==typeof e&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new r(e.toString(10),10);throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},{"bn.js":400,"strip-hex-prefix":593}],71:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.ObjectMultiplex=void 0;const i=e("readable-stream"),s=r(e("once")),o=e("./Substream"),a=Symbol("IGNORE_SUBSTREAM");class c extends i.Duplex{constructor(e={}){super(Object.assign({objectMode:!0},e)),this._substreams={}}createStream(e,t={}){if(this.destroyed)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already destroyed`);if(this._readableState.ended||this._writableState.ended)throw new Error(`ObjectMultiplex - parent stream for name "${e}" already ended`);if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);const n=new o.Substream(Object.assign({name:e,parent:this},t));return this._substreams[e]=n,function(e,t){const n=(0,s.default)(t);(0,i.finished)(e,{readable:!1},n),(0,i.finished)(e,{writable:!1},n)}(this,(e=>n.destroy(e||void 0))),n}ignoreStream(e){if(!e)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[e])throw new Error(`ObjectMultiplex - Substream for name "${e}" already exists`);this._substreams[e]=a}_read(){}_write(e,t,n){const{name:r,data:i}=e;if(!r)return console.warn(`ObjectMultiplex - malformed chunk without name "${e}"`),n();const s=this._substreams[r];return s?(s!==a&&s.push(i),n()):(console.warn(`ObjectMultiplex - orphaned data for stream "${r}"`),n())}}n.ObjectMultiplex=c},{"./Substream":72,once:525,"readable-stream":544}],72:[function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(n,"__esModule",{value:!0}),n.Substream=void 0;const i=e("readable-stream");class s extends i.Duplex{constructor(e){var{parent:t,name:n}=e,i=r(e,["parent","name"]);super(Object.assign({objectMode:!0},i)),this._parent=t,this._name=n}_read(){}_write(e,t,n){this._parent.push({name:this._name,data:e}),n()}}n.Substream=s},{"readable-stream":544}],73:[function(e,t,n){"use strict";const r=e("./ObjectMultiplex");t.exports=r.ObjectMultiplex},{"./ObjectMultiplex":71}],74:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decorateWithCaveats=n.isRestrictedMethodCaveatSpecification=void 0;const r=e("@metamask/utils"),i=e("./errors.cjs"),s=e("./Permission.cjs");function o(e){return(0,r.hasProperty)(e,"decorator")}n.isRestrictedMethodCaveatSpecification=o,n.decorateWithCaveats=function(e,t,n){const{caveats:r}=t;if(!r)return e;let a=async t=>e(t);for(const e of r){const t=n[e.type];if(!t)throw new i.UnrecognizedCaveatTypeError(e.type);if(!o(t))throw new i.CaveatSpecificationMismatchError(t,s.PermissionType.RestrictedMethod);a=t.decorator(a,e)}return a}},{"./Permission.cjs":75,"./errors.cjs":78,"@metamask/utils":327}],75:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hasSpecificationType=n.PermissionType=n.findCaveat=n.constructPermission=void 0;const r=e("nanoid");var i;n.constructPermission=function(e){const{caveats:t=null,invoker:n,target:i}=e;return{id:(0,r.nanoid)(),parentCapability:i,invoker:n,caveats:t,date:(new Date).getTime()}},n.findCaveat=function(e,t){return e.caveats?.find((e=>e.type===t))},function(e){e.RestrictedMethod="RestrictedMethod",e.Endowment="Endowment"}(i||(n.PermissionType=i={})),n.hasSpecificationType=function(e,t){return e.permissionType===t}},{nanoid:523}],76:[function(e,t,n){"use strict";var r,i,s,o,a,c,u,l=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},d=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.PermissionController=n.CaveatMutatorOperation=void 0;const h=e("@metamask/base-controller"),f=e("@metamask/controller-utils"),p=e("@metamask/rpc-errors"),m=e("@metamask/utils"),y=d(e("deep-freeze-strict")),g=e("immer"),b=e("nanoid"),w=e("./Caveat.cjs"),v=e("./errors.cjs"),x=e("./Permission.cjs"),E=e("./permission-middleware.cjs"),S=e("./utils.cjs"),A="PermissionController";var _;!function(e){e[e.Noop=0]="Noop",e[e.UpdateValue=1]="UpdateValue",e[e.DeleteCaveat=2]="DeleteCaveat",e[e.RevokePermission=3]="RevokePermission"}(_||(n.CaveatMutatorOperation=_={}));class T extends h.BaseController{get unrestrictedMethods(){return this._unrestrictedMethods}constructor(e){const{caveatSpecifications:t,permissionSpecifications:n,unrestrictedMethods:i,messenger:s,state:o={}}=e;super({name:A,metadata:{subjects:{anonymous:!0,persist:!0}},messenger:s,state:{subjects:{},...o}}),r.add(this),this._unrestrictedMethods=new Set(i),this._caveatSpecifications=(0,y.default)({...t}),this.validatePermissionSpecifications(n,this._caveatSpecifications),this._permissionSpecifications=(0,y.default)({...n}),this.registerMessageHandlers(),this.createPermissionMiddleware=(0,E.getPermissionMiddlewareFactory)({executeRestrictedMethod:this._executeRestrictedMethod.bind(this),getRestrictedMethod:this.getRestrictedMethod.bind(this),isUnrestrictedMethod:this.unrestrictedMethods.has.bind(this.unrestrictedMethods)})}getPermissionSpecification(e){return this._permissionSpecifications[e]}getCaveatSpecification(e){return this._caveatSpecifications[e]}validatePermissionSpecifications(e,t){Object.entries(e).forEach((([e,{permissionType:n,targetName:r,allowedCaveats:i}])=>{if(!n||!(0,m.hasProperty)(x.PermissionType,n))throw new Error(`Invalid permission type: "${n}"`);if(!e)throw new Error(`Invalid permission target name: "${e}"`);if(e!==r)throw new Error(`Invalid permission specification: target name "${e}" must match specification.targetName value "${r}".`);i&&i.forEach((e=>{if(!(0,m.hasProperty)(t,e))throw new v.UnrecognizedCaveatTypeError(e);const r=t[e],i=(0,w.isRestrictedMethodCaveatSpecification)(r);if(n===x.PermissionType.RestrictedMethod&&!i||n===x.PermissionType.Endowment&&i)throw new v.CaveatSpecificationMismatchError(r,n)}))}))}registerMessageHandlers(){this.messagingSystem.registerActionHandler(`${A}:clearPermissions`,(()=>this.clearState())),this.messagingSystem.registerActionHandler(`${A}:getEndowments`,((e,t,n)=>this.getEndowments(e,t,n))),this.messagingSystem.registerActionHandler(`${A}:getSubjectNames`,(()=>this.getSubjectNames())),this.messagingSystem.registerActionHandler(`${A}:getPermissions`,(e=>this.getPermissions(e))),this.messagingSystem.registerActionHandler(`${A}:hasPermission`,((e,t)=>this.hasPermission(e,t))),this.messagingSystem.registerActionHandler(`${A}:hasPermissions`,(e=>this.hasPermissions(e))),this.messagingSystem.registerActionHandler(`${A}:grantPermissions`,this.grantPermissions.bind(this)),this.messagingSystem.registerActionHandler(`${A}:grantPermissionsIncremental`,this.grantPermissionsIncremental.bind(this)),this.messagingSystem.registerActionHandler(`${A}:requestPermissions`,((e,t)=>this.requestPermissions(e,t))),this.messagingSystem.registerActionHandler(`${A}:requestPermissionsIncremental`,((e,t)=>this.requestPermissionsIncremental(e,t))),this.messagingSystem.registerActionHandler(`${A}:revokeAllPermissions`,(e=>this.revokeAllPermissions(e))),this.messagingSystem.registerActionHandler(`${A}:revokePermissionForAllSubjects`,(e=>this.revokePermissionForAllSubjects(e))),this.messagingSystem.registerActionHandler(`${A}:revokePermissions`,this.revokePermissions.bind(this)),this.messagingSystem.registerActionHandler(`${A}:updateCaveat`,((e,t,n,r)=>{this.updateCaveat(e,t,n,r)}))}clearState(){this.update((e=>({subjects:{}})))}getTypedPermissionSpecification(e,t,n){const r=e===x.PermissionType.RestrictedMethod?(0,v.methodNotFound)(t,n?{origin:n}:void 0):new v.EndowmentPermissionDoesNotExistError(t,n);if(!this.targetExists(t))throw r;const i=this.getPermissionSpecification(t);if(!(0,x.hasSpecificationType)(i,e))throw r;return i}getRestrictedMethod(e,t){return this.getTypedPermissionSpecification(x.PermissionType.RestrictedMethod,e,t).methodImplementation}getSubjectNames(){return Object.keys(this.state.subjects)}getPermission(e,t){return this.state.subjects[e]?.permissions[t]}getPermissions(e){return this.state.subjects[e]?.permissions}hasPermission(e,t){return Boolean(this.getPermission(e,t))}hasPermissions(e){return Boolean(this.state.subjects[e])}revokeAllPermissions(e){this.update((t=>{if(!t.subjects[e])throw new v.UnrecognizedSubjectError(e);delete t.subjects[e]}))}revokePermission(e,t){this.revokePermissions({[e]:[t]})}revokePermissions(e){this.update((t=>{Object.keys(e).forEach((n=>{if(!(0,m.hasProperty)(t.subjects,n))throw new v.UnrecognizedSubjectError(n);e[n].forEach((e=>{const{permissions:r}=t.subjects[n];if(!(0,m.hasProperty)(r,e))throw new v.PermissionDoesNotExistError(n,e);this.deletePermission(t.subjects,n,e)}))}))}))}revokePermissionForAllSubjects(e){0!==this.getSubjectNames().length&&this.update((t=>{Object.entries(t.subjects).forEach((([n,r])=>{const{permissions:i}=r;(0,m.hasProperty)(i,e)&&this.deletePermission(t.subjects,n,e)}))}))}deletePermission(e,t,n){const{permissions:r}=e[t];Object.keys(r).length>1?delete r[n]:delete e[t]}hasCaveat(e,t,n){return Boolean(this.getCaveat(e,t,n))}getCaveat(e,t,n){const r=this.getPermission(e,t);if(!r)throw new v.PermissionDoesNotExistError(e,t);return(0,x.findCaveat)(r,n)}addCaveat(e,t,n,r){if(this.hasCaveat(e,t,n))throw new v.CaveatAlreadyExistsError(e,t,n);this.setCaveat(e,t,n,r)}updateCaveat(e,t,n,r){if(!this.hasCaveat(e,t,n))throw new v.CaveatDoesNotExistError(e,t,n);this.setCaveat(e,t,n,r)}setCaveat(e,t,n,r){this.update((i=>{const s=i.subjects[e];if(!s)throw new v.UnrecognizedSubjectError(e);const o=s.permissions[t];if(!o)throw new v.PermissionDoesNotExistError(e,t);const a={type:n,value:r};this.validateCaveat(a,e,t);let c=!1;if(o.caveats){const e=o.caveats.findIndex((e=>e.type===a.type));-1===e?(o.caveats.push(a),c=!0):o.caveats.splice(e,1,a)}else o.caveats=[a],c=!0;c&&this.validateModifiedPermission(o,e,{invokePermissionValidator:!0,performCaveatValidation:!1})}))}updatePermissionsByCaveat(e,t){0!==Object.keys(this.state.subjects).length&&this.update((n=>{Object.values(n.subjects).forEach((r=>{Object.values(r.permissions).forEach((i=>{const{caveats:s}=i,o=s?.find((({type:t})=>t===e));if(!o)return;const a=t(o.value),{operation:c}=a;switch(c){case _.Noop:break;case _.UpdateValue:o.value=a.value,this.validateCaveat(o,r.origin,i.parentCapability);break;case _.DeleteCaveat:this.deleteCaveat(i,e,r.origin);break;case _.RevokePermission:this.deletePermission(n.subjects,r.origin,i.parentCapability);break;default:throw new Error(`Unrecognized mutation result: "${c}"`)}}))}))}))}removeCaveat(e,t,n){this.update((r=>{const i=r.subjects[e]?.permissions[t];if(!i)throw new v.PermissionDoesNotExistError(e,t);if(!i.caveats)throw new v.CaveatDoesNotExistError(e,t,n);this.deleteCaveat(i,n,e)}))}deleteCaveat(e,t,n){if(!e.caveats)throw new v.CaveatDoesNotExistError(n,e.parentCapability,t);const r=e.caveats.findIndex((e=>e.type===t));if(-1===r)throw new v.CaveatDoesNotExistError(n,e.parentCapability,t);1===e.caveats.length?e.caveats=null:e.caveats.splice(r,1),this.validateModifiedPermission(e,n,{invokePermissionValidator:!0,performCaveatValidation:!1})}validateModifiedPermission(e,t,n){if(!this.targetExists(e.parentCapability))throw new Error(`Fatal: Existing permission target "${e.parentCapability}" has no specification.`);this.validatePermission(this.getPermissionSpecification(e.parentCapability),e,t,n)}targetExists(e){return(0,m.hasProperty)(this._permissionSpecifications,e)}grantPermissions({approvedPermissions:e,requestData:t,preserveExistingPermissions:n=!0,subject:i}){return l(this,r,"m",s).call(this,{approvedPermissions:e,subject:i,mergePermissions:!1,preserveExistingPermissions:n,requestData:t})}grantPermissionsIncremental({approvedPermissions:e,requestData:t,subject:n}){return l(this,r,"m",s).call(this,{approvedPermissions:e,subject:n,mergePermissions:!0,preserveExistingPermissions:!0,requestData:t})}validatePermission(e,t,n,{invokePermissionValidator:r,performCaveatValidation:i}){const{allowedCaveats:s,validator:o,targetName:a}=e;if(e.subjectTypes?.length&&e.subjectTypes.length>0){const t=this.messagingSystem.call("SubjectMetadataController:getSubjectMetadata",n);if(!t||null===t.subjectType||!e.subjectTypes.includes(t.subjectType))throw e.permissionType===x.PermissionType.RestrictedMethod?(0,v.methodNotFound)(a,{origin:n}):new v.EndowmentPermissionDoesNotExistError(a,n)}if((0,m.hasProperty)(t,"caveats")){const{caveats:e}=t;if(null!==e&&!(Array.isArray(e)&&e.length>0))throw new v.InvalidCaveatsPropertyError(n,a,e);const r=new Set;e?.forEach((e=>{if(i&&this.validateCaveat(e,n,a),!s?.includes(e.type))throw new v.ForbiddenCaveatError(e.type,n,a);if(r.has(e.type))throw new v.DuplicateCaveatError(e.type,n,a);r.add(e.type)}))}r&&o&&o(t,n,a)}setValidatedPermissions(e,t){this.update((n=>{n.subjects[e]||(n.subjects[e]={origin:e,permissions:{}}),n.subjects[e].permissions=(0,g.castDraft)(t)}))}constructCaveats(e,t,n){const r=n?.map((n=>{this.validateCaveat(n,e,t);const{type:r,value:i}=n;return{type:r,value:i}}));return r&&(0,f.isNonEmptyArray)(r)?r:void 0}validateCaveat(e,t,n){if(!(0,f.isPlainObject)(e))throw new v.InvalidCaveatError(e,t,n);if(2!==Object.keys(e).length)throw new v.InvalidCaveatFieldsError(e,t,n);if("string"!=typeof e.type)throw new v.InvalidCaveatTypeError(e,t,n);const r=this.getCaveatSpecification(e.type);if(!r)throw new v.UnrecognizedCaveatTypeError(e.type,t,n);if(!(0,m.hasProperty)(e,"value")||void 0===e.value)throw new v.CaveatMissingValueError(e,t,n);if(!(0,f.isValidJson)(e.value))throw new v.CaveatInvalidJsonError(e,t,n);r.validator?.(e,t,n)}async requestPermissions(e,t,n={}){const{origin:i}=e,{id:s=(0,b.nanoid)(),preserveExistingPermissions:o=!0}=n;this.validateRequestedPermissions(i,t);const a={...n.metadata,id:s,origin:i},c={metadata:a,permissions:t},d=await this.requestUserApproval(c);return await l(this,r,"m",u).call(this,{subject:e,metadata:a,preserveExistingPermissions:o,approvedRequest:d})}async requestPermissionsIncremental(e,t,n={}){const{origin:i}=e,{id:s=(0,b.nanoid)()}=n;this.validateRequestedPermissions(i,t);const a=this.getPermissions(i)??{},[c,d]=l(this,r,"m",o).call(this,a,t);if(void 0===c||void 0===d)return[];try{this.validateRequestedPermissions(i,c)}catch(e){if(e instanceof Error)throw new v.InvalidMergedPermissionsError(i,e,d);throw(0,v.internalError)("Unrecognized error type",{error:e})}const h={...n.metadata,id:s,origin:i},f={metadata:h,permissions:c,diff:{currentPermissions:a,permissionDiffMap:d}},p=await this.requestUserApproval(f);return await l(this,r,"m",u).call(this,{subject:e,metadata:h,preserveExistingPermissions:!1,approvedRequest:p})}validateRequestedPermissions(e,t){if(!(0,f.isPlainObject)(t))throw(0,v.invalidParams)({message:`Requested permissions for origin "${e}" is not a plain object.`,data:{origin:e,requestedPermissions:t}});if(0===Object.keys(t).length)throw(0,v.invalidParams)({message:`Permissions request for origin "${e}" contains no permissions.`,data:{requestedPermissions:t}});for(const n of Object.keys(t)){const r=t[n];if(!this.targetExists(n))throw(0,v.methodNotFound)(n,{origin:e,requestedPermissions:t});if(!(0,f.isPlainObject)(r)||void 0!==r.parentCapability&&n!==r.parentCapability)throw(0,v.invalidParams)({message:`Permissions request for origin "${e}" contains invalid requested permission(s).`,data:{origin:e,requestedPermissions:t}});this.validatePermission(this.getPermissionSpecification(n),r,e,{invokePermissionValidator:!1,performCaveatValidation:!0})}}async requestUserApproval(e){const{origin:t,id:n}=e.metadata,r=await this.messagingSystem.call("ApprovalController:addRequest",{id:n,origin:t,requestData:e,type:S.MethodNames.RequestPermissions},!0);return this.validateApprovedPermissions(r,{id:n,origin:t}),r}getSideEffects(e){return Object.keys(e).reduce(((e,t)=>{if(this.targetExists(t)){const n=this.getPermissionSpecification(t);n.sideEffect&&(e.permittedHandlers[t]=n.sideEffect.onPermitted,n.sideEffect.onFailure&&(e.failureHandlers[t]=n.sideEffect.onFailure))}return e}),{permittedHandlers:{},failureHandlers:{}})}async executeSideEffects(e,t){const{permittedHandlers:n,failureHandlers:r}=e,i={requestData:t,messagingSystem:this.messagingSystem},s=await Promise.allSettled(Object.values(n).map((e=>e(i)))),o=s.filter((e=>"rejected"===e.status));if(o.length>0){const e=Object.values(r);if(e.length>0)try{await Promise.all(e.map((e=>e(i))))}catch(e){throw(0,v.internalError)("Unexpected error in side-effects",{error:e})}const t=o.map((e=>e.reason));throw t.forEach((e=>{console.error(e)})),t.length>1?(0,v.internalError)("Multiple errors occurred during side-effects execution",{errors:t}):t[0]}return s.map((({value:e})=>e))}validateApprovedPermissions(e,t){const{id:n,origin:r}=t;if(!(0,f.isPlainObject)(e)||!(0,f.isPlainObject)(e.metadata))throw(0,v.internalError)(`Approved permissions request for subject "${r}" is invalid.`,{data:{approvedRequest:e}});const{metadata:{id:i,origin:s},permissions:o}=e;if(i!==n)throw(0,v.internalError)(`Approved permissions request for subject "${r}" mutated its id.`,{originalId:n,mutatedId:i});if(s!==r)throw(0,v.internalError)(`Approved permissions request for subject "${r}" mutated its origin.`,{originalOrigin:r,mutatedOrigin:s});try{this.validateRequestedPermissions(r,o)}catch(e){if(e instanceof Error)throw(0,v.internalError)(`Invalid approved permissions request: ${e.message}`,e instanceof p.JsonRpcError?e.data:void 0);throw(0,v.internalError)("Unrecognized error type",{error:e})}}async acceptPermissionsRequest(e){const{id:t}=e.metadata;if(!this.hasApprovalRequest({id:t}))throw new v.PermissionsRequestNotFoundError(t);if(0!==Object.keys(e.permissions).length)try{await this.messagingSystem.call("ApprovalController:acceptRequest",t,e)}catch(e){throw this._rejectPermissionsRequest(t,e),e}else this._rejectPermissionsRequest(t,(0,v.invalidParams)({message:"Must request at least one permission."}))}async rejectPermissionsRequest(e){if(!this.hasApprovalRequest({id:e}))throw new v.PermissionsRequestNotFoundError(e);this._rejectPermissionsRequest(e,(0,v.userRejectedRequest)())}hasApprovalRequest(e){return this.messagingSystem.call("ApprovalController:hasRequest",e)}_rejectPermissionsRequest(e,t){return this.messagingSystem.call("ApprovalController:rejectRequest",e,t)}async getEndowments(e,t,n){if(!this.hasPermission(e,t))throw(0,v.unauthorized)({data:{origin:e,targetName:t}});return this.getTypedPermissionSpecification(x.PermissionType.Endowment,t,e).endowmentGetter({origin:e,requestData:n})}async executeRestrictedMethod(e,t,n){const r=this.getRestrictedMethod(t,e),i=await this._executeRestrictedMethod(r,{origin:e},t,n);if(void 0===i)throw new Error(`Internal request for method "${t}" as origin "${e}" returned no result.`);return i}_executeRestrictedMethod(e,t,n,r=[]){const{origin:i}=t,s=this.getPermission(i,n);if(!s)throw(0,v.unauthorized)({data:{origin:i,method:n}});return(0,w.decorateWithCaveats)(e,s,this._caveatSpecifications)({method:n,params:r,context:{origin:i}})}}n.PermissionController=T,r=new WeakSet,i=function(e){const{merger:t}=this.getCaveatSpecification(e);if(void 0===t)throw new v.CaveatMergerDoesNotExistError(e);return t},s=function({approvedPermissions:e,subject:t,mergePermissions:n,preserveExistingPermissions:i,requestData:s}){const{origin:o}=t;if(!o||"string"!=typeof o)throw new v.InvalidSubjectIdentifierError(o);const c=i?{...this.getPermissions(o)}:{};for(const[t,i]of Object.entries(e)){if(!this.targetExists(t))throw(0,v.methodNotFound)(t);if(void 0!==i.parentCapability&&t!==i.parentCapability)throw new v.InvalidApprovedPermissionError(o,t,i);const e=t,u=this.getPermissionSpecification(e),d={caveats:this.constructCaveats(o,e,i.caveats),invoker:o,target:e};let h;h=u.factory?u.factory(d,s):(0,x.constructPermission)(d),n&&(h=l(this,r,"m",a).call(this,c[e],h)[0]),this.validatePermission(u,h,o,{invokePermissionValidator:!0,performCaveatValidation:!0}),c[e]=h}return this.setValidatedPermissions(o,c),c},o=function(e,t){const n={},i=(0,g.produce)(e,(e=>{const i=e;Object.entries(t).forEach((([e,t])=>{const s=i[e],[o,c]=l(this,r,"m",a).call(this,s??{},t);(void 0===s||Object.keys(c).length>0)&&(i[e]=o,n[e]=c)}))}));return 0===Object.keys(n).length?[]:[i,n]},a=function(e,t){const{caveatPairs:n,leftUniqueCaveats:i,rightUniqueCaveats:s}=(0,S.collectUniqueAndPairedCaveats)(e,t),[o,a]=n.reduce((([e,t],[n,i])=>{const[s,o]=l(this,r,"m",c).call(this,n,i);return void 0!==s&&void 0!==o?(e.push(s),t[s.type]=o):e.push(n),[e,t]}),[[],{}]),u=[...o,...i,...s.map((e=>{const[t,n]=l(this,r,"m",c).call(this,void 0,e);return a[t.type]=n,t}))];return[{...e,...t,...u.length>0?{caveats:u}:{}},a]},c=function(e,t){if(void 0!==e&&e.type!==t.type)throw new v.CaveatMergeTypeMismatchError(e.type,t.type);const n=l(this,r,"m",i).call(this,t.type);if(void 0===e)return[{...t},t.value];const[s,o]=n(e.value,t.value);return void 0!==s&&void 0!==o?[{type:t.type,value:s},o]:[]},u=async function({subject:e,metadata:t,preserveExistingPermissions:n,approvedRequest:r}){const{permissions:i,...s}=r,o={...t},a=this.getSideEffects(i);if(Object.values(a.permittedHandlers).length>0){const e=await this.executeSideEffects(a,r);o.data=Object.keys(a.permittedHandlers).reduce(((t,n,r)=>({[n]:e[r],...t})),{})}return[this.grantPermissions({subject:e,approvedPermissions:i,preserveExistingPermissions:n,requestData:s}),o]}},{"./Caveat.cjs":74,"./Permission.cjs":75,"./errors.cjs":78,"./permission-middleware.cjs":80,"./utils.cjs":85,"@metamask/base-controller":33,"@metamask/controller-utils":36,"@metamask/rpc-errors":96,"@metamask/utils":327,"deep-freeze-strict":447,immer:515,nanoid:523}],77:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SubjectMetadataController=n.SubjectType=void 0;const r=e("@metamask/base-controller");var i;!function(e){e.Extension="extension",e.Internal="internal",e.Unknown="unknown",e.Website="website",e.Snap="snap"}(i||(n.SubjectType=i={}));const s={subjectMetadata:{persist:!0,anonymous:!1}},o={subjectMetadata:{}};class a extends r.BaseController{constructor({messenger:e,subjectCacheLimit:t,state:n={}}){if(!Number.isInteger(t)||t<1)throw new Error(`subjectCacheLimit must be a positive integer. Received: "${t}"`);const r=t=>e.call("PermissionController:hasPermissions",t);super({name:"SubjectMetadataController",metadata:s,messenger:e,state:{...a.getTrimmedState(n,r)}}),this.subjectHasPermissions=r,this.subjectCacheLimit=t,this.subjectsWithoutPermissionsEncounteredSinceStartup=new Set,this.messagingSystem.registerActionHandler(`${this.name}:getSubjectMetadata`,this.getSubjectMetadata.bind(this)),this.messagingSystem.registerActionHandler(`${this.name}:addSubjectMetadata`,this.addSubjectMetadata.bind(this))}clearState(){this.subjectsWithoutPermissionsEncounteredSinceStartup.clear(),this.update((e=>({...o})))}addSubjectMetadata(e){const{origin:t}=e,n={...e,extensionId:e.extensionId||null,iconUrl:e.iconUrl||null,name:e.name||null,subjectType:e.subjectType||null};let r=null;if(this.subjectsWithoutPermissionsEncounteredSinceStartup.size>=this.subjectCacheLimit){const e=this.subjectsWithoutPermissionsEncounteredSinceStartup.values().next().value;this.subjectsWithoutPermissionsEncounteredSinceStartup.delete(e),this.subjectHasPermissions(e)||(r=e)}this.subjectsWithoutPermissionsEncounteredSinceStartup.add(t),this.update((e=>{e.subjectMetadata[t]=n,"string"==typeof r&&delete e.subjectMetadata[r]}))}getSubjectMetadata(e){return this.state.subjectMetadata[e]}trimMetadataState(){this.update((e=>a.getTrimmedState(e,this.subjectHasPermissions)))}static getTrimmedState(e,t){const{subjectMetadata:n={}}=e;return{subjectMetadata:Object.keys(n).reduce(((e,r)=>(t(r)&&(e[r]=n[r]),e)),{})}}}n.SubjectMetadataController=a},{"@metamask/base-controller":33}],78:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PermissionsRequestNotFoundError=n.CaveatSpecificationMismatchError=n.CaveatMergeTypeMismatchError=n.DuplicateCaveatError=n.ForbiddenCaveatError=n.InvalidCaveatFieldsError=n.CaveatInvalidJsonError=n.CaveatMissingValueError=n.InvalidCaveatTypeError=n.InvalidCaveatError=n.CaveatAlreadyExistsError=n.CaveatDoesNotExistError=n.InvalidCaveatsPropertyError=n.UnrecognizedCaveatTypeError=n.EndowmentPermissionDoesNotExistError=n.PermissionDoesNotExistError=n.InvalidApprovedPermissionError=n.InvalidMergedPermissionsError=n.CaveatMergerDoesNotExistError=n.UnrecognizedSubjectError=n.InvalidSubjectIdentifierError=n.internalError=n.userRejectedRequest=n.invalidParams=n.methodNotFound=n.unauthorized=void 0;const r=e("@metamask/rpc-errors");n.unauthorized=function(e){return r.providerErrors.unauthorized({message:"Unauthorized to perform action. Try requesting the required permission(s) first. For more information, see: https://docs.metamask.io/guide/rpc-api.html#permissions",data:e.data})},n.methodNotFound=function(e,t){const n={message:`The method "${e}" does not exist / is not available.`};return void 0!==t&&(n.data=t),r.rpcErrors.methodNotFound(n)},n.invalidParams=function(e){return r.rpcErrors.invalidParams({data:e.data,message:e.message})},n.userRejectedRequest=function(e){return r.providerErrors.userRejectedRequest({data:e})},n.internalError=function(e,t){return r.rpcErrors.internal({message:e,data:t})};class i extends Error{constructor(e){super(`Invalid subject identifier: "${"string"==typeof e?e:typeof e}"`)}}n.InvalidSubjectIdentifierError=i;class s extends Error{constructor(e){super(`Unrecognized subject: "${e}" has no permissions.`)}}n.UnrecognizedSubjectError=s;class o extends Error{constructor(e){super(`Caveat value merger does not exist for type: "${e}"`)}}n.CaveatMergerDoesNotExistError=o;class a extends Error{constructor(e,t,n){super(`Invalid merged permissions for subject "${e}":\n${t.message}`),this.cause=t,this.data={diff:n}}}n.InvalidMergedPermissionsError=a;class c extends Error{constructor(e,t,n){super(`Invalid approved permission for origin "${e}" and target "${t}".`),this.data={origin:e,target:t,approvedPermission:n}}}n.InvalidApprovedPermissionError=c;class u extends Error{constructor(e,t){super(`Subject "${e}" has no permission for "${t}".`)}}n.PermissionDoesNotExistError=u;class l extends Error{constructor(e,t){super(`${t?`Subject "${t}"`:"Unknown subject"} has no permission for "${e}".`),t&&(this.data={origin:t})}}n.EndowmentPermissionDoesNotExistError=l;class d extends Error{constructor(e,t,n){super(`Unrecognized caveat type: "${e}"`),this.data={caveatType:e},void 0!==t&&(this.data.origin=t),void 0!==n&&(this.data.target=n)}}n.UnrecognizedCaveatTypeError=d;class h extends Error{constructor(e,t,n){super(`The "caveats" property of permission for "${t}" of subject "${e}" is invalid. It must be a non-empty array if specified.`),this.data={origin:e,target:t,caveatsProperty:n}}}n.InvalidCaveatsPropertyError=h;class f extends Error{constructor(e,t,n){super(`Permission for "${t}" of subject "${e}" has no caveat of type "${n}".`)}}n.CaveatDoesNotExistError=f;class p extends Error{constructor(e,t,n){super(`Permission for "${t}" of subject "${e}" already has a caveat of type "${n}".`)}}n.CaveatAlreadyExistsError=p;class m extends r.JsonRpcError{constructor(e,t,n){super(r.errorCodes.rpc.invalidParams,"Invalid caveat. Caveats must be plain objects.",{receivedCaveat:e}),this.data={origin:t,target:n}}}n.InvalidCaveatError=m;class y extends Error{constructor(e,t,n){super(`Caveat types must be strings. Received: "${typeof e.type}"`),this.data={caveat:e,origin:t,target:n}}}n.InvalidCaveatTypeError=y;class g extends Error{constructor(e,t,n){super('Caveat is missing "value" field.'),this.data={caveat:e,origin:t,target:n}}}n.CaveatMissingValueError=g;class b extends Error{constructor(e,t,n){super('Caveat "value" is invalid JSON.'),this.data={caveat:e,origin:t,target:n}}}n.CaveatInvalidJsonError=b;class w extends Error{constructor(e,t,n){super(`Caveat has unexpected number of fields: "${Object.keys(e).length}"`),this.data={caveat:e,origin:t,target:n}}}n.InvalidCaveatFieldsError=w;class v extends Error{constructor(e,t,n){super(`Permissions for target "${n}" may not have caveats of type "${e}".`),this.data={caveatType:e,origin:t,target:n}}}n.ForbiddenCaveatError=v;class x extends Error{constructor(e,t,n){super(`Permissions for target "${n}" contains multiple caveats of type "${e}".`),this.data={caveatType:e,origin:t,target:n}}}n.DuplicateCaveatError=x;class E extends Error{constructor(e,t){super(`Cannot merge caveats of different types: "${e}" and "${t}".`),this.data={leftCaveatType:e,rightCaveatType:t}}}n.CaveatMergeTypeMismatchError=E;class S extends Error{constructor(e,t){super(`Caveat specification uses a mismatched type. Expected caveats for ${t}`),this.data={caveatSpec:e,permissionType:t}}}n.CaveatSpecificationMismatchError=S;class A extends Error{constructor(e){super(`Permissions request with id "${e}" not found.`)}}n.PermissionsRequestNotFoundError=A},{"@metamask/rpc-errors":96}],79:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(n,"__esModule",{value:!0}),n.permissionRpcMethods=n.MethodNames=void 0,s(e("./Caveat.cjs"),n),s(e("./errors.cjs"),n),s(e("./Permission.cjs"),n),s(e("./PermissionController.cjs"),n);var a=e("./utils.cjs");Object.defineProperty(n,"MethodNames",{enumerable:!0,get:function(){return a.MethodNames}}),n.permissionRpcMethods=o(e("./rpc-methods/index.cjs")),s(e("./SubjectMetadataController.cjs"),n)},{"./Caveat.cjs":74,"./Permission.cjs":75,"./PermissionController.cjs":76,"./SubjectMetadataController.cjs":77,"./errors.cjs":78,"./rpc-methods/index.cjs":82,"./utils.cjs":85}],80:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getPermissionMiddlewareFactory=void 0;const r=e("@metamask/json-rpc-engine"),i=e("./errors.cjs");n.getPermissionMiddlewareFactory=function({executeRestrictedMethod:e,getRestrictedMethod:t,isUnrestrictedMethod:n}){return function(s){const{origin:o}=s;if("string"!=typeof o||!o)throw new Error('The subject "origin" must be a non-empty string.');return(0,r.createAsyncMiddleware)((async(r,a,c)=>{const{method:u,params:l}=r;if(n(u))return c();const d=t(u,o),h=await e(d,s,u,l);void 0!==h?a.result=h:a.error=(0,i.internalError)(`Request for method "${r.method}" returned undefined result.`,{request:r})}))}}},{"./errors.cjs":78,"@metamask/json-rpc-engine":47}],81:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getPermissionsHandler=void 0;const r=e("../utils.cjs");n.getPermissionsHandler={methodNames:[r.MethodNames.GetPermissions],implementation:async function(e,t,n,r,{getPermissionsForOrigin:i}){return t.result=Object.values(i()||{}),r()},hookNames:{getPermissionsForOrigin:!0}}},{"../utils.cjs":85}],82:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.handlers=void 0;const r=e("./getPermissions.cjs"),i=e("./requestPermissions.cjs"),s=e("./revokePermissions.cjs");n.handlers=[i.requestPermissionsHandler,r.getPermissionsHandler,s.revokePermissionsHandler]},{"./getPermissions.cjs":81,"./requestPermissions.cjs":83,"./revokePermissions.cjs":84}],83:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.requestPermissionsHandler=void 0;const r=e("@metamask/controller-utils"),i=e("../errors.cjs"),s=e("../utils.cjs");n.requestPermissionsHandler={methodNames:[s.MethodNames.RequestPermissions],implementation:async function(e,t,n,s,{requestPermissionsForOrigin:o}){const{params:a}=e;if(!Array.isArray(a)||!(0,r.isPlainObject)(a[0]))return s((0,i.invalidParams)({data:{request:e}}));const[c]=a,[u]=await o(c);return t.result=Object.values(u),s()},hookNames:{requestPermissionsForOrigin:!0}}},{"../errors.cjs":78,"../utils.cjs":85,"@metamask/controller-utils":36}],84:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.revokePermissionsHandler=void 0;const r=e("@metamask/utils"),i=e("../errors.cjs"),s=e("../utils.cjs");n.revokePermissionsHandler={methodNames:[s.MethodNames.RevokePermissions],implementation:async function(e,t,n,s,{revokePermissionsForOrigin:o}){const{params:a}=e,c=a?.[0];if(!c)return s((0,i.invalidParams)({data:{request:e}}));const u=Object.keys(c);if(!(0,r.isNonEmptyArray)(u))return s((0,i.invalidParams)({data:{request:e}}));return o(u),t.result=null,s()},hookNames:{revokePermissionsForOrigin:!0}}},{"../errors.cjs":78,"../utils.cjs":85,"@metamask/utils":327}],85:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.collectUniqueAndPairedCaveats=n.MethodNames=void 0,function(e){e.RequestPermissions="wallet_requestPermissions",e.GetPermissions="wallet_getPermissions",e.RevokePermissions="wallet_revokePermissions"}(r||(n.MethodNames=r={})),n.collectUniqueAndPairedCaveats=function(e,t){const n=e?.caveats?.slice()??[],r=t.caveats?.slice()??[],i=[],s=[];return n.forEach((e=>{const t=r.findIndex((t=>t.type===e.type));-1===t?i.push(e):(s.push([e,r[t]]),r.splice(t,1))})),{caveatPairs:s,leftUniqueCaveats:i,rightUniqueCaveats:[...r]}}},{}],86:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BasePostMessageStream=void 0;const r=e("readable-stream"),i=()=>{},s="SYN",o="ACK";class a extends r.Duplex{constructor(e){super(Object.assign({objectMode:!0},e)),this._init=!1,this._haveSyn=!1,this._log=()=>null}_handshake(){this._write(s,null,i),this.cork()}_onData(e){if(this._init)try{this.push(e),this._log(e,!1)}catch(e){this.emit("error",e)}else e===s?(this._haveSyn=!0,this._write(o,null,i)):e===o&&(this._init=!0,this._haveSyn||this._write(o,null,i),this.uncork())}_read(){}_write(e,t,n){e!==o&&e!==s&&this._log(e,!0),this._postMessage(e),n()}_setLogger(e){this._log=e}}n.BasePostMessageStream=a},{"readable-stream":544}],87:[function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(n,"__esModule",{value:!0}),n.WebWorkerParentPostMessageStream=void 0;const i=e("../BasePostMessageStream"),s=e("../utils");class o extends i.BasePostMessageStream{constructor(e){var{worker:t}=e;super(r(e,["worker"])),this._target=s.DEDICATED_WORKER_NAME,this._worker=t,this._worker.onmessage=this._onMessage.bind(this),this._handshake()}_postMessage(e){this._worker.postMessage({target:this._target,data:e})}_onMessage(e){const t=e.data;(0,s.isValidStreamMessage)(t)&&this._onData(t.data)}_destroy(){this._worker.onmessage=null,this._worker=null}}n.WebWorkerParentPostMessageStream=o},{"../BasePostMessageStream":86,"../utils":91}],88:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WebWorkerPostMessageStream=void 0;const r=e("../BasePostMessageStream"),i=e("../utils");class s extends r.BasePostMessageStream{constructor(e={}){if("undefined"==typeof self||"undefined"==typeof WorkerGlobalScope)throw new Error("WorkerGlobalScope not found. This class should only be instantiated in a WebWorker.");super(e),this._name=i.DEDICATED_WORKER_NAME,self.addEventListener("message",this._onMessage.bind(this)),this._handshake()}_postMessage(e){self.postMessage({data:e})}_onMessage(e){const t=e.data;(0,i.isValidStreamMessage)(t)&&t.target===this._name&&this._onData(t.data)}_destroy(){}}n.WebWorkerPostMessageStream=s},{"../BasePostMessageStream":86,"../utils":91}],89:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./window/WindowPostMessageStream"),n),i(e("./WebWorker/WebWorkerPostMessageStream"),n),i(e("./WebWorker/WebWorkerParentPostMessageStream"),n),i(e("./runtime/BrowserRuntimePostMessageStream"),n),i(e("./BasePostMessageStream"),n)},{"./BasePostMessageStream":86,"./WebWorker/WebWorkerParentPostMessageStream":87,"./WebWorker/WebWorkerPostMessageStream":88,"./runtime/BrowserRuntimePostMessageStream":90,"./window/WindowPostMessageStream":92}],90:[function(e,t,n){"use strict";var r,i,s=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},o=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},a=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(n,"__esModule",{value:!0}),n.BrowserRuntimePostMessageStream=void 0;const c=e("../BasePostMessageStream"),u=e("../utils");class l extends c.BasePostMessageStream{constructor(e){var{name:t,target:n}=e;super(a(e,["name","target"])),r.set(this,void 0),i.set(this,void 0),s(this,r,t,"f"),s(this,i,n,"f"),this._onMessage=this._onMessage.bind(this),this._getRuntime().onMessage.addListener(this._onMessage),this._handshake()}_postMessage(e){this._getRuntime().sendMessage({target:o(this,i,"f"),data:e})}_onMessage(e){(0,u.isValidStreamMessage)(e)&&e.target===o(this,r,"f")&&this._onData(e.data)}_getRuntime(){var e,t;if("chrome"in globalThis&&"function"==typeof(null===(e=null===chrome||void 0===chrome?void 0:chrome.runtime)||void 0===e?void 0:e.sendMessage))return chrome.runtime;if("browser"in globalThis&&"function"==typeof(null===(t=null===browser||void 0===browser?void 0:browser.runtime)||void 0===t?void 0:t.sendMessage))return browser.runtime;throw new Error("browser.runtime.sendMessage is not a function. This class should only be instantiated in a web extension.")}_destroy(){this._getRuntime().onMessage.removeListener(this._onMessage)}}n.BrowserRuntimePostMessageStream=l,r=new WeakMap,i=new WeakMap},{"../BasePostMessageStream":86,"../utils":91}],91:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isValidStreamMessage=n.DEDICATED_WORKER_NAME=void 0;const r=e("@metamask/utils");n.DEDICATED_WORKER_NAME="dedicatedWorker",n.isValidStreamMessage=function(e){return(0,r.isObject)(e)&&Boolean(e.data)&&("number"==typeof e.data||"object"==typeof e.data||"string"==typeof e.data)}},{"@metamask/utils":327}],92:[function(e,t,n){"use strict";var r,i,s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(n,"__esModule",{value:!0}),n.WindowPostMessageStream=void 0;const o=e("@metamask/utils"),a=e("../BasePostMessageStream"),c=e("../utils"),u=null===(r=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"source"))||void 0===r?void 0:r.get;(0,o.assert)(u,"MessageEvent.prototype.source getter is not defined.");const l=null===(i=Object.getOwnPropertyDescriptor(MessageEvent.prototype,"origin"))||void 0===i?void 0:i.get;(0,o.assert)(l,"MessageEvent.prototype.origin getter is not defined.");class d extends a.BasePostMessageStream{constructor(e){var{name:t,target:n,targetOrigin:r=location.origin,targetWindow:i=window}=e;if(super(s(e,["name","target","targetOrigin","targetWindow"])),"undefined"==typeof window||"function"!=typeof window.postMessage)throw new Error("window.postMessage is not a function. This class should only be instantiated in a Window.");this._name=t,this._target=n,this._targetOrigin=r,this._targetWindow=i,this._onMessage=this._onMessage.bind(this),window.addEventListener("message",this._onMessage,!1),this._handshake()}_postMessage(e){this._targetWindow.postMessage({target:this._target,data:e},this._targetOrigin)}_onMessage(e){const t=e.data;"*"!==this._targetOrigin&&l.call(e)!==this._targetOrigin||u.call(e)!==this._targetWindow||!(0,c.isValidStreamMessage)(t)||t.target!==this._name||this._onData(t.data)}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}n.WindowPostMessageStream=d},{"../BasePostMessageStream":86,"../utils":91,"@metamask/utils":327}],93:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.EthereumProviderError=n.JsonRpcError=void 0;const i=e("@metamask/utils"),s=r(e("fast-safe-stringify")),o=e("./utils.cjs");class a extends Error{constructor(e,t,n){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');(0,o.dataHasCause)(n)?(super(t,{cause:n.cause}),(0,i.hasProperty)(this,"cause")||Object.assign(this,{cause:n.cause})):super(t),void 0!==n&&(this.data=n),this.code=e}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,(0,i.isPlainObject)(this.data)&&(e.data.cause=(0,o.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,s.default)(this.serialize(),c,2)}}n.JsonRpcError=a;function c(e,t){if("[Circular]"!==t)return t}n.EthereumProviderError=class extends a{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}},{"./utils.cjs":97,"@metamask/utils":327,"fast-safe-stringify":498}],94:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.errorValues=n.errorCodes=void 0,n.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},n.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},{}],95:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.providerErrors=n.rpcErrors=void 0;const r=e("./classes.cjs"),i=e("./error-constants.cjs"),s=e("./utils.cjs");function o(e,t){const[n,i]=c(t);return new r.JsonRpcError(e,n??(0,s.getMessageFromCode)(e),i)}function a(e,t){const[n,i]=c(t);return new r.EthereumProviderError(e,n??(0,s.getMessageFromCode)(e),i)}function c(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,n]}}return[]}n.rpcErrors={parse:e=>o(i.errorCodes.rpc.parse,e),invalidRequest:e=>o(i.errorCodes.rpc.invalidRequest,e),invalidParams:e=>o(i.errorCodes.rpc.invalidParams,e),methodNotFound:e=>o(i.errorCodes.rpc.methodNotFound,e),internal:e=>o(i.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return o(t,e)},invalidInput:e=>o(i.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>o(i.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>o(i.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>o(i.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>o(i.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>o(i.errorCodes.rpc.limitExceeded,e)},n.providerErrors={userRejectedRequest:e=>a(i.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(i.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(i.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(i.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(i.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:n,data:i}=e;if(!n||"string"!=typeof n)throw new Error('"message" must be a nonempty string');return new r.EthereumProviderError(t,n,i)}}},{"./classes.cjs":93,"./error-constants.cjs":94,"./utils.cjs":97}],96:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.errorCodes=n.providerErrors=n.rpcErrors=n.getMessageFromCode=n.serializeError=n.serializeCause=n.dataHasCause=n.EthereumProviderError=n.JsonRpcError=void 0;var r=e("./classes.cjs");Object.defineProperty(n,"JsonRpcError",{enumerable:!0,get:function(){return r.JsonRpcError}}),Object.defineProperty(n,"EthereumProviderError",{enumerable:!0,get:function(){return r.EthereumProviderError}});var i=e("./utils.cjs");Object.defineProperty(n,"dataHasCause",{enumerable:!0,get:function(){return i.dataHasCause}}),Object.defineProperty(n,"serializeCause",{enumerable:!0,get:function(){return i.serializeCause}}),Object.defineProperty(n,"serializeError",{enumerable:!0,get:function(){return i.serializeError}}),Object.defineProperty(n,"getMessageFromCode",{enumerable:!0,get:function(){return i.getMessageFromCode}});var s=e("./errors.cjs");Object.defineProperty(n,"rpcErrors",{enumerable:!0,get:function(){return s.rpcErrors}}),Object.defineProperty(n,"providerErrors",{enumerable:!0,get:function(){return s.providerErrors}});var o=e("./error-constants.cjs");Object.defineProperty(n,"errorCodes",{enumerable:!0,get:function(){return o.errorCodes}})},{"./classes.cjs":93,"./error-constants.cjs":94,"./errors.cjs":95,"./utils.cjs":97}],97:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.dataHasCause=n.serializeCause=n.serializeError=n.isValidCode=n.getMessageFromCode=n.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const r=e("@metamask/utils"),i=e("./error-constants.cjs"),s=i.errorCodes.rpc.internal,o={code:s,message:a(s)};function a(e,t="Unspecified error message. This is a bug, please report it."){if(c(e)){const t=e.toString();if((0,r.hasProperty)(i.errorValues,t))return i.errorValues[t].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return n.JSON_RPC_SERVER_ERROR_MESSAGE}return t}function c(e){return Number.isInteger(e)}function u(e){return Array.isArray(e)?e.map((e=>(0,r.isValidJson)(e)?e:(0,r.isObject)(e)?l(e):null)):(0,r.isObject)(e)?l(e):(0,r.isValidJson)(e)?e:null}function l(e){return Object.getOwnPropertyNames(e).reduce(((t,n)=>{const i=e[n];return(0,r.isValidJson)(i)&&(t[n]=i),t}),{})}n.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",n.getMessageFromCode=a,n.isValidCode=c,n.serializeError=function(e,{fallbackError:t=o,shouldIncludeStack:n=!0,shouldPreserveMessage:i=!0}={}){if(!(0,r.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const s=function(e,t,n){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if((0,r.isJsonRpcError)(e))return e;const i=function(e){if((0,r.isObject)(e)&&(0,r.hasProperty)(e,"message")&&"string"==typeof e.message&&e.message.length>0)return e.message;return}(e),s=u(e),o={...t,...n&&i&&{message:i},data:{cause:s}};return o}(e,t,i);return n||delete s.stack,s},n.serializeCause=u,n.dataHasCause=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"cause")&&(0,r.isObject)(e.cause)}},{"./error-constants.cjs":94,"@metamask/utils":327}],98:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("events");function i(e,t,n){try{Reflect.apply(e,t,n)}catch(e){setTimeout((()=>{throw e}))}}class s extends r.EventEmitter{emit(e,...t){let n="error"===e;const r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){let e;if(t.length>0&&([e]=t),e instanceof Error)throw e;const n=new Error("Unhandled error."+(e?` (${e.message})`:""));throw n.context=e,n}const s=r[e];if(void 0===s)return!1;if("function"==typeof s)i(s,this,t);else{const e=s.length,n=function(e){const t=e.length,n=new Array(t);for(let r=0;r<t;r+=1)n[r]=e[r];return n}(s);for(let r=0;r<e;r+=1)i(n[r],this,t)}return!0}}n.default=s},{events:469}],99:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mnemonicToSeedSync=n.mnemonicToSeed=n.validateMnemonic=n.entropyToMnemonic=n.mnemonicToEntropy=n.generateMnemonic=void 0;

const r=e("@noble/hashes/_assert"),i=e("@noble/hashes/pbkdf2"),s=e("@noble/hashes/sha256"),o=e("@noble/hashes/sha512"),a=e("@noble/hashes/utils"),c=e("@scure/base");function u(e){if("string"!=typeof e)throw new TypeError("Invalid mnemonic type: "+typeof e);return e.normalize("NFKD")}function l(e){const t=u(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}function d(e){r.default.bytes(e,16,20,24,28,32)}n.generateMnemonic=function(e,t=128){if(r.default.number(t),t%32!=0||t>256)throw new TypeError("Invalid entropy");return m((0,a.randomBytes)(t/8),e)};const h=e=>{const t=8-e.length/4;return new Uint8Array([(0,s.sha256)(e)[0]>>t<<t])};function f(e){if(!Array.isArray(e)||2048!==e.length||"string"!=typeof e[0])throw new Error("Worlist: expected array of 2048 strings");return e.forEach((e=>{if("string"!=typeof e)throw new Error(`Wordlist: non-string element: ${e}`)})),c.utils.chain(c.utils.checksum(1,h),c.utils.radix2(11,!0),c.utils.alphabet(e))}function p(e,t){let n;if("string"==typeof e){const{words:r}=l(e);n=f(t).decode(r)}else n=f(t).decode(Array.from(new Uint16Array(e.buffer)).map((e=>t[e])));return d(n),n}function m(e,t){d(e);const n=f(t).encode(e).map((e=>t.indexOf(e)));return new Uint8Array(new Uint16Array(n).buffer)}n.mnemonicToEntropy=p,n.entropyToMnemonic=m,n.validateMnemonic=function(e,t){try{p(e,t)}catch(e){return!1}return!0};const y=e=>u(`mnemonic${e}`);function g(e,t){let n;return n="string"==typeof e?(new TextEncoder).encode(l(e).nfkd):(new TextEncoder).encode(Array.from(new Uint16Array(e.buffer)).map((e=>t[e])).join(" ")),n}n.mnemonicToSeed=function(e,t,n=""){const r=g(e,t);return(0,i.pbkdf2Async)(o.sha512,r,y(n),{c:2048,dkLen:64})},n.mnemonicToSeedSync=function(e,t,n=""){const r=g(e,t);return(0,i.pbkdf2)(o.sha512,r,y(n),{c:2048,dkLen:64})}},{"@noble/hashes/_assert":101,"@noble/hashes/pbkdf2":106,"@noble/hashes/sha256":107,"@noble/hashes/sha512":108,"@noble/hashes/utils":109,"@scure/base":110}],100:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.wordlist=void 0,n.wordlist="abandon\nability\nable\nabout\nabove\nabsent\nabsorb\nabstract\nabsurd\nabuse\naccess\naccident\naccount\naccuse\nachieve\nacid\nacoustic\nacquire\nacross\nact\naction\nactor\nactress\nactual\nadapt\nadd\naddict\naddress\nadjust\nadmit\nadult\nadvance\nadvice\naerobic\naffair\nafford\nafraid\nagain\nage\nagent\nagree\nahead\naim\nair\nairport\naisle\nalarm\nalbum\nalcohol\nalert\nalien\nall\nalley\nallow\nalmost\nalone\nalpha\nalready\nalso\nalter\nalways\namateur\namazing\namong\namount\namused\nanalyst\nanchor\nancient\nanger\nangle\nangry\nanimal\nankle\nannounce\nannual\nanother\nanswer\nantenna\nantique\nanxiety\nany\napart\napology\nappear\napple\napprove\napril\narch\narctic\narea\narena\nargue\narm\narmed\narmor\narmy\naround\narrange\narrest\narrive\narrow\nart\nartefact\nartist\nartwork\nask\naspect\nassault\nasset\nassist\nassume\nasthma\nathlete\natom\nattack\nattend\nattitude\nattract\nauction\naudit\naugust\naunt\nauthor\nauto\nautumn\naverage\navocado\navoid\nawake\naware\naway\nawesome\nawful\nawkward\naxis\nbaby\nbachelor\nbacon\nbadge\nbag\nbalance\nbalcony\nball\nbamboo\nbanana\nbanner\nbar\nbarely\nbargain\nbarrel\nbase\nbasic\nbasket\nbattle\nbeach\nbean\nbeauty\nbecause\nbecome\nbeef\nbefore\nbegin\nbehave\nbehind\nbelieve\nbelow\nbelt\nbench\nbenefit\nbest\nbetray\nbetter\nbetween\nbeyond\nbicycle\nbid\nbike\nbind\nbiology\nbird\nbirth\nbitter\nblack\nblade\nblame\nblanket\nblast\nbleak\nbless\nblind\nblood\nblossom\nblouse\nblue\nblur\nblush\nboard\nboat\nbody\nboil\nbomb\nbone\nbonus\nbook\nboost\nborder\nboring\nborrow\nboss\nbottom\nbounce\nbox\nboy\nbracket\nbrain\nbrand\nbrass\nbrave\nbread\nbreeze\nbrick\nbridge\nbrief\nbright\nbring\nbrisk\nbroccoli\nbroken\nbronze\nbroom\nbrother\nbrown\nbrush\nbubble\nbuddy\nbudget\nbuffalo\nbuild\nbulb\nbulk\nbullet\nbundle\nbunker\nburden\nburger\nburst\nbus\nbusiness\nbusy\nbutter\nbuyer\nbuzz\ncabbage\ncabin\ncable\ncactus\ncage\ncake\ncall\ncalm\ncamera\ncamp\ncan\ncanal\ncancel\ncandy\ncannon\ncanoe\ncanvas\ncanyon\ncapable\ncapital\ncaptain\ncar\ncarbon\ncard\ncargo\ncarpet\ncarry\ncart\ncase\ncash\ncasino\ncastle\ncasual\ncat\ncatalog\ncatch\ncategory\ncattle\ncaught\ncause\ncaution\ncave\nceiling\ncelery\ncement\ncensus\ncentury\ncereal\ncertain\nchair\nchalk\nchampion\nchange\nchaos\nchapter\ncharge\nchase\nchat\ncheap\ncheck\ncheese\nchef\ncherry\nchest\nchicken\nchief\nchild\nchimney\nchoice\nchoose\nchronic\nchuckle\nchunk\nchurn\ncigar\ncinnamon\ncircle\ncitizen\ncity\ncivil\nclaim\nclap\nclarify\nclaw\nclay\nclean\nclerk\nclever\nclick\nclient\ncliff\nclimb\nclinic\nclip\nclock\nclog\nclose\ncloth\ncloud\nclown\nclub\nclump\ncluster\nclutch\ncoach\ncoast\ncoconut\ncode\ncoffee\ncoil\ncoin\ncollect\ncolor\ncolumn\ncombine\ncome\ncomfort\ncomic\ncommon\ncompany\nconcert\nconduct\nconfirm\ncongress\nconnect\nconsider\ncontrol\nconvince\ncook\ncool\ncopper\ncopy\ncoral\ncore\ncorn\ncorrect\ncost\ncotton\ncouch\ncountry\ncouple\ncourse\ncousin\ncover\ncoyote\ncrack\ncradle\ncraft\ncram\ncrane\ncrash\ncrater\ncrawl\ncrazy\ncream\ncredit\ncreek\ncrew\ncricket\ncrime\ncrisp\ncritic\ncrop\ncross\ncrouch\ncrowd\ncrucial\ncruel\ncruise\ncrumble\ncrunch\ncrush\ncry\ncrystal\ncube\nculture\ncup\ncupboard\ncurious\ncurrent\ncurtain\ncurve\ncushion\ncustom\ncute\ncycle\ndad\ndamage\ndamp\ndance\ndanger\ndaring\ndash\ndaughter\ndawn\nday\ndeal\ndebate\ndebris\ndecade\ndecember\ndecide\ndecline\ndecorate\ndecrease\ndeer\ndefense\ndefine\ndefy\ndegree\ndelay\ndeliver\ndemand\ndemise\ndenial\ndentist\ndeny\ndepart\ndepend\ndeposit\ndepth\ndeputy\nderive\ndescribe\ndesert\ndesign\ndesk\ndespair\ndestroy\ndetail\ndetect\ndevelop\ndevice\ndevote\ndiagram\ndial\ndiamond\ndiary\ndice\ndiesel\ndiet\ndiffer\ndigital\ndignity\ndilemma\ndinner\ndinosaur\ndirect\ndirt\ndisagree\ndiscover\ndisease\ndish\ndismiss\ndisorder\ndisplay\ndistance\ndivert\ndivide\ndivorce\ndizzy\ndoctor\ndocument\ndog\ndoll\ndolphin\ndomain\ndonate\ndonkey\ndonor\ndoor\ndose\ndouble\ndove\ndraft\ndragon\ndrama\ndrastic\ndraw\ndream\ndress\ndrift\ndrill\ndrink\ndrip\ndrive\ndrop\ndrum\ndry\nduck\ndumb\ndune\nduring\ndust\ndutch\nduty\ndwarf\ndynamic\neager\neagle\nearly\nearn\nearth\neasily\neast\neasy\necho\necology\neconomy\nedge\nedit\neducate\neffort\negg\neight\neither\nelbow\nelder\nelectric\nelegant\nelement\nelephant\nelevator\nelite\nelse\nembark\nembody\nembrace\nemerge\nemotion\nemploy\nempower\nempty\nenable\nenact\nend\nendless\nendorse\nenemy\nenergy\nenforce\nengage\nengine\nenhance\nenjoy\nenlist\nenough\nenrich\nenroll\nensure\nenter\nentire\nentry\nenvelope\nepisode\nequal\nequip\nera\nerase\nerode\nerosion\nerror\nerupt\nescape\nessay\nessence\nestate\neternal\nethics\nevidence\nevil\nevoke\nevolve\nexact\nexample\nexcess\nexchange\nexcite\nexclude\nexcuse\nexecute\nexercise\nexhaust\nexhibit\nexile\nexist\nexit\nexotic\nexpand\nexpect\nexpire\nexplain\nexpose\nexpress\nextend\nextra\neye\neyebrow\nfabric\nface\nfaculty\nfade\nfaint\nfaith\nfall\nfalse\nfame\nfamily\nfamous\nfan\nfancy\nfantasy\nfarm\nfashion\nfat\nfatal\nfather\nfatigue\nfault\nfavorite\nfeature\nfebruary\nfederal\nfee\nfeed\nfeel\nfemale\nfence\nfestival\nfetch\nfever\nfew\nfiber\nfiction\nfield\nfigure\nfile\nfilm\nfilter\nfinal\nfind\nfine\nfinger\nfinish\nfire\nfirm\nfirst\nfiscal\nfish\nfit\nfitness\nfix\nflag\nflame\nflash\nflat\nflavor\nflee\nflight\nflip\nfloat\nflock\nfloor\nflower\nfluid\nflush\nfly\nfoam\nfocus\nfog\nfoil\nfold\nfollow\nfood\nfoot\nforce\nforest\nforget\nfork\nfortune\nforum\nforward\nfossil\nfoster\nfound\nfox\nfragile\nframe\nfrequent\nfresh\nfriend\nfringe\nfrog\nfront\nfrost\nfrown\nfrozen\nfruit\nfuel\nfun\nfunny\nfurnace\nfury\nfuture\ngadget\ngain\ngalaxy\ngallery\ngame\ngap\ngarage\ngarbage\ngarden\ngarlic\ngarment\ngas\ngasp\ngate\ngather\ngauge\ngaze\ngeneral\ngenius\ngenre\ngentle\ngenuine\ngesture\nghost\ngiant\ngift\ngiggle\nginger\ngiraffe\ngirl\ngive\nglad\nglance\nglare\nglass\nglide\nglimpse\nglobe\ngloom\nglory\nglove\nglow\nglue\ngoat\ngoddess\ngold\ngood\ngoose\ngorilla\ngospel\ngossip\ngovern\ngown\ngrab\ngrace\ngrain\ngrant\ngrape\ngrass\ngravity\ngreat\ngreen\ngrid\ngrief\ngrit\ngrocery\ngroup\ngrow\ngrunt\nguard\nguess\nguide\nguilt\nguitar\ngun\ngym\nhabit\nhair\nhalf\nhammer\nhamster\nhand\nhappy\nharbor\nhard\nharsh\nharvest\nhat\nhave\nhawk\nhazard\nhead\nhealth\nheart\nheavy\nhedgehog\nheight\nhello\nhelmet\nhelp\nhen\nhero\nhidden\nhigh\nhill\nhint\nhip\nhire\nhistory\nhobby\nhockey\nhold\nhole\nholiday\nhollow\nhome\nhoney\nhood\nhope\nhorn\nhorror\nhorse\nhospital\nhost\nhotel\nhour\nhover\nhub\nhuge\nhuman\nhumble\nhumor\nhundred\nhungry\nhunt\nhurdle\nhurry\nhurt\nhusband\nhybrid\nice\nicon\nidea\nidentify\nidle\nignore\nill\nillegal\nillness\nimage\nimitate\nimmense\nimmune\nimpact\nimpose\nimprove\nimpulse\ninch\ninclude\nincome\nincrease\nindex\nindicate\nindoor\nindustry\ninfant\ninflict\ninform\ninhale\ninherit\ninitial\ninject\ninjury\ninmate\ninner\ninnocent\ninput\ninquiry\ninsane\ninsect\ninside\ninspire\ninstall\nintact\ninterest\ninto\ninvest\ninvite\ninvolve\niron\nisland\nisolate\nissue\nitem\nivory\njacket\njaguar\njar\njazz\njealous\njeans\njelly\njewel\njob\njoin\njoke\njourney\njoy\njudge\njuice\njump\njungle\njunior\njunk\njust\nkangaroo\nkeen\nkeep\nketchup\nkey\nkick\nkid\nkidney\nkind\nkingdom\nkiss\nkit\nkitchen\nkite\nkitten\nkiwi\nknee\nknife\nknock\nknow\nlab\nlabel\nlabor\nladder\nlady\nlake\nlamp\nlanguage\nlaptop\nlarge\nlater\nlatin\nlaugh\nlaundry\nlava\nlaw\nlawn\nlawsuit\nlayer\nlazy\nleader\nleaf\nlearn\nleave\nlecture\nleft\nleg\nlegal\nlegend\nleisure\nlemon\nlend\nlength\nlens\nleopard\nlesson\nletter\nlevel\nliar\nliberty\nlibrary\nlicense\nlife\nlift\nlight\nlike\nlimb\nlimit\nlink\nlion\nliquid\nlist\nlittle\nlive\nlizard\nload\nloan\nlobster\nlocal\nlock\nlogic\nlonely\nlong\nloop\nlottery\nloud\nlounge\nlove\nloyal\nlucky\nluggage\nlumber\nlunar\nlunch\nluxury\nlyrics\nmachine\nmad\nmagic\nmagnet\nmaid\nmail\nmain\nmajor\nmake\nmammal\nman\nmanage\nmandate\nmango\nmansion\nmanual\nmaple\nmarble\nmarch\nmargin\nmarine\nmarket\nmarriage\nmask\nmass\nmaster\nmatch\nmaterial\nmath\nmatrix\nmatter\nmaximum\nmaze\nmeadow\nmean\nmeasure\nmeat\nmechanic\nmedal\nmedia\nmelody\nmelt\nmember\nmemory\nmention\nmenu\nmercy\nmerge\nmerit\nmerry\nmesh\nmessage\nmetal\nmethod\nmiddle\nmidnight\nmilk\nmillion\nmimic\nmind\nminimum\nminor\nminute\nmiracle\nmirror\nmisery\nmiss\nmistake\nmix\nmixed\nmixture\nmobile\nmodel\nmodify\nmom\nmoment\nmonitor\nmonkey\nmonster\nmonth\nmoon\nmoral\nmore\nmorning\nmosquito\nmother\nmotion\nmotor\nmountain\nmouse\nmove\nmovie\nmuch\nmuffin\nmule\nmultiply\nmuscle\nmuseum\nmushroom\nmusic\nmust\nmutual\nmyself\nmystery\nmyth\nnaive\nname\nnapkin\nnarrow\nnasty\nnation\nnature\nnear\nneck\nneed\nnegative\nneglect\nneither\nnephew\nnerve\nnest\nnet\nnetwork\nneutral\nnever\nnews\nnext\nnice\nnight\nnoble\nnoise\nnominee\nnoodle\nnormal\nnorth\nnose\nnotable\nnote\nnothing\nnotice\nnovel\nnow\nnuclear\nnumber\nnurse\nnut\noak\nobey\nobject\noblige\nobscure\nobserve\nobtain\nobvious\noccur\nocean\noctober\nodor\noff\noffer\noffice\noften\noil\nokay\nold\nolive\nolympic\nomit\nonce\none\nonion\nonline\nonly\nopen\nopera\nopinion\noppose\noption\norange\norbit\norchard\norder\nordinary\norgan\norient\noriginal\norphan\nostrich\nother\noutdoor\nouter\noutput\noutside\noval\noven\nover\nown\nowner\noxygen\noyster\nozone\npact\npaddle\npage\npair\npalace\npalm\npanda\npanel\npanic\npanther\npaper\nparade\nparent\npark\nparrot\nparty\npass\npatch\npath\npatient\npatrol\npattern\npause\npave\npayment\npeace\npeanut\npear\npeasant\npelican\npen\npenalty\npencil\npeople\npepper\nperfect\npermit\nperson\npet\nphone\nphoto\nphrase\nphysical\npiano\npicnic\npicture\npiece\npig\npigeon\npill\npilot\npink\npioneer\npipe\npistol\npitch\npizza\nplace\nplanet\nplastic\nplate\nplay\nplease\npledge\npluck\nplug\nplunge\npoem\npoet\npoint\npolar\npole\npolice\npond\npony\npool\npopular\nportion\nposition\npossible\npost\npotato\npottery\npoverty\npowder\npower\npractice\npraise\npredict\nprefer\nprepare\npresent\npretty\nprevent\nprice\npride\nprimary\nprint\npriority\nprison\nprivate\nprize\nproblem\nprocess\nproduce\nprofit\nprogram\nproject\npromote\nproof\nproperty\nprosper\nprotect\nproud\nprovide\npublic\npudding\npull\npulp\npulse\npumpkin\npunch\npupil\npuppy\npurchase\npurity\npurpose\npurse\npush\nput\npuzzle\npyramid\nquality\nquantum\nquarter\nquestion\nquick\nquit\nquiz\nquote\nrabbit\nraccoon\nrace\nrack\nradar\nradio\nrail\nrain\nraise\nrally\nramp\nranch\nrandom\nrange\nrapid\nrare\nrate\nrather\nraven\nraw\nrazor\nready\nreal\nreason\nrebel\nrebuild\nrecall\nreceive\nrecipe\nrecord\nrecycle\nreduce\nreflect\nreform\nrefuse\nregion\nregret\nregular\nreject\nrelax\nrelease\nrelief\nrely\nremain\nremember\nremind\nremove\nrender\nrenew\nrent\nreopen\nrepair\nrepeat\nreplace\nreport\nrequire\nrescue\nresemble\nresist\nresource\nresponse\nresult\nretire\nretreat\nreturn\nreunion\nreveal\nreview\nreward\nrhythm\nrib\nribbon\nrice\nrich\nride\nridge\nrifle\nright\nrigid\nring\nriot\nripple\nrisk\nritual\nrival\nriver\nroad\nroast\nrobot\nrobust\nrocket\nromance\nroof\nrookie\nroom\nrose\nrotate\nrough\nround\nroute\nroyal\nrubber\nrude\nrug\nrule\nrun\nrunway\nrural\nsad\nsaddle\nsadness\nsafe\nsail\nsalad\nsalmon\nsalon\nsalt\nsalute\nsame\nsample\nsand\nsatisfy\nsatoshi\nsauce\nsausage\nsave\nsay\nscale\nscan\nscare\nscatter\nscene\nscheme\nschool\nscience\nscissors\nscorpion\nscout\nscrap\nscreen\nscript\nscrub\nsea\nsearch\nseason\nseat\nsecond\nsecret\nsection\nsecurity\nseed\nseek\nsegment\nselect\nsell\nseminar\nsenior\nsense\nsentence\nseries\nservice\nsession\nsettle\nsetup\nseven\nshadow\nshaft\nshallow\nshare\nshed\nshell\nsheriff\nshield\nshift\nshine\nship\nshiver\nshock\nshoe\nshoot\nshop\nshort\nshoulder\nshove\nshrimp\nshrug\nshuffle\nshy\nsibling\nsick\nside\nsiege\nsight\nsign\nsilent\nsilk\nsilly\nsilver\nsimilar\nsimple\nsince\nsing\nsiren\nsister\nsituate\nsix\nsize\nskate\nsketch\nski\nskill\nskin\nskirt\nskull\nslab\nslam\nsleep\nslender\nslice\nslide\nslight\nslim\nslogan\nslot\nslow\nslush\nsmall\nsmart\nsmile\nsmoke\nsmooth\nsnack\nsnake\nsnap\nsniff\nsnow\nsoap\nsoccer\nsocial\nsock\nsoda\nsoft\nsolar\nsoldier\nsolid\nsolution\nsolve\nsomeone\nsong\nsoon\nsorry\nsort\nsoul\nsound\nsoup\nsource\nsouth\nspace\nspare\nspatial\nspawn\nspeak\nspecial\nspeed\nspell\nspend\nsphere\nspice\nspider\nspike\nspin\nspirit\nsplit\nspoil\nsponsor\nspoon\nsport\nspot\nspray\nspread\nspring\nspy\nsquare\nsqueeze\nsquirrel\nstable\nstadium\nstaff\nstage\nstairs\nstamp\nstand\nstart\nstate\nstay\nsteak\nsteel\nstem\nstep\nstereo\nstick\nstill\nsting\nstock\nstomach\nstone\nstool\nstory\nstove\nstrategy\nstreet\nstrike\nstrong\nstruggle\nstudent\nstuff\nstumble\nstyle\nsubject\nsubmit\nsubway\nsuccess\nsuch\nsudden\nsuffer\nsugar\nsuggest\nsuit\nsummer\nsun\nsunny\nsunset\nsuper\nsupply\nsupreme\nsure\nsurface\nsurge\nsurprise\nsurround\nsurvey\nsuspect\nsustain\nswallow\nswamp\nswap\nswarm\nswear\nsweet\nswift\nswim\nswing\nswitch\nsword\nsymbol\nsymptom\nsyrup\nsystem\ntable\ntackle\ntag\ntail\ntalent\ntalk\ntank\ntape\ntarget\ntask\ntaste\ntattoo\ntaxi\nteach\nteam\ntell\nten\ntenant\ntennis\ntent\nterm\ntest\ntext\nthank\nthat\ntheme\nthen\ntheory\nthere\nthey\nthing\nthis\nthought\nthree\nthrive\nthrow\nthumb\nthunder\nticket\ntide\ntiger\ntilt\ntimber\ntime\ntiny\ntip\ntired\ntissue\ntitle\ntoast\ntobacco\ntoday\ntoddler\ntoe\ntogether\ntoilet\ntoken\ntomato\ntomorrow\ntone\ntongue\ntonight\ntool\ntooth\ntop\ntopic\ntopple\ntorch\ntornado\ntortoise\ntoss\ntotal\ntourist\ntoward\ntower\ntown\ntoy\ntrack\ntrade\ntraffic\ntragic\ntrain\ntransfer\ntrap\ntrash\ntravel\ntray\ntreat\ntree\ntrend\ntrial\ntribe\ntrick\ntrigger\ntrim\ntrip\ntrophy\ntrouble\ntruck\ntrue\ntruly\ntrumpet\ntrust\ntruth\ntry\ntube\ntuition\ntumble\ntuna\ntunnel\nturkey\nturn\nturtle\ntwelve\ntwenty\ntwice\ntwin\ntwist\ntwo\ntype\ntypical\nugly\numbrella\nunable\nunaware\nuncle\nuncover\nunder\nundo\nunfair\nunfold\nunhappy\nuniform\nunique\nunit\nuniverse\nunknown\nunlock\nuntil\nunusual\nunveil\nupdate\nupgrade\nuphold\nupon\nupper\nupset\nurban\nurge\nusage\nuse\nused\nuseful\nuseless\nusual\nutility\nvacant\nvacuum\nvague\nvalid\nvalley\nvalve\nvan\nvanish\nvapor\nvarious\nvast\nvault\nvehicle\nvelvet\nvendor\nventure\nvenue\nverb\nverify\nversion\nvery\nvessel\nveteran\nviable\nvibrant\nvicious\nvictory\nvideo\nview\nvillage\nvintage\nviolin\nvirtual\nvirus\nvisa\nvisit\nvisual\nvital\nvivid\nvocal\nvoice\nvoid\nvolcano\nvolume\nvote\nvoyage\nwage\nwagon\nwait\nwalk\nwall\nwalnut\nwant\nwarfare\nwarm\nwarrior\nwash\nwasp\nwaste\nwater\nwave\nway\nwealth\nweapon\nwear\nweasel\nweather\nweb\nwedding\nweekend\nweird\nwelcome\nwest\nwet\nwhale\nwhat\nwheat\nwheel\nwhen\nwhere\nwhip\nwhisper\nwide\nwidth\nwife\nwild\nwill\nwin\nwindow\nwine\nwing\nwink\nwinner\nwinter\nwire\nwisdom\nwise\nwish\nwitness\nwolf\nwoman\nwonder\nwood\nwool\nword\nwork\nworld\nworry\nworth\nwrap\nwreck\nwrestle\nwrist\nwrite\nwrong\nyard\nyear\nyellow\nyou\nyoung\nyouth\nzebra\nzero\nzone\nzoo".split("\n")},{}],101:[function(e,t,n){"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function i(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function s(e,...t){if(!((n=e)instanceof Uint8Array||null!=n&&"object"==typeof n&&"Uint8Array"===n.constructor.name))throw new Error("Expected Uint8Array");var n;if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function c(e,t){s(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}Object.defineProperty(n,"__esModule",{value:!0}),n.output=n.exists=n.hash=n.bytes=n.bool=n.number=void 0,n.number=r,n.bool=i,n.bytes=s,n.hash=o,n.exists=a,n.output=c;const u={number:r,bool:i,bytes:s,hash:o,exists:a,output:c};n.default=u},{}],102:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SHA2=void 0;const r=e("./_assert.js"),i=e("./utils.js");class s extends i.Hash{constructor(e,t,n,r){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){(0,r.exists)(this);const{view:t,buffer:n,blockLen:s}=this,o=(e=(0,i.toBytes)(e)).length;for(let r=0;r<o;){const a=Math.min(s-this.pos,o-r);if(a!==s)n.set(e.subarray(r,r+a),this.pos),this.pos+=a,r+=a,this.pos===s&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;s<=o-r;r+=s)this.process(t,r)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,r.exists)(this),(0,r.output)(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:s,isLE:o}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>s-a&&(this.process(n,0),a=0);for(let e=a;e<s;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const i=BigInt(32),s=BigInt(4294967295),o=Number(n>>i&s),a=Number(n&s),c=r?4:0,u=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+u,a,r)}(n,s-8,BigInt(8*this.length),o),this.process(n,0);const c=(0,i.createView)(e),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)c.setUint32(4*e,d[e],o)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:i,destroyed:s,pos:o}=this;return e.length=r,e.pos=o,e.finished=i,e.destroyed=s,r%t&&e.buffer.set(n),e}}n.SHA2=s},{"./_assert.js":101,"./utils.js":109}],103:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.add5L=n.add5H=n.add4H=n.add4L=n.add3H=n.add3L=n.add=n.rotlBL=n.rotlBH=n.rotlSL=n.rotlSH=n.rotr32L=n.rotr32H=n.rotrBL=n.rotrBH=n.rotrSL=n.rotrSH=n.shrSL=n.shrSH=n.toBig=n.split=n.fromBig=void 0;const r=BigInt(2**32-1),i=BigInt(32);function s(e,t=!1){return t?{h:Number(e&r),l:Number(e>>i&r)}:{h:0|Number(e>>i&r),l:0|Number(e&r)}}function o(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:o,l:a}=s(e[i],t);[n[i],r[i]]=[o,a]}return[n,r]}n.fromBig=s,n.split=o;const a=(e,t)=>BigInt(e>>>0)<<i|BigInt(t>>>0);n.toBig=a;const c=(e,t,n)=>e>>>n;n.shrSH=c;const u=(e,t,n)=>e<<32-n|t>>>n;n.shrSL=u;const l=(e,t,n)=>e>>>n|t<<32-n;n.rotrSH=l;const d=(e,t,n)=>e<<32-n|t>>>n;n.rotrSL=d;const h=(e,t,n)=>e<<64-n|t>>>n-32;n.rotrBH=h;const f=(e,t,n)=>e>>>n-32|t<<64-n;n.rotrBL=f;const p=(e,t)=>t;n.rotr32H=p;const m=(e,t)=>e;n.rotr32L=m;const y=(e,t,n)=>e<<n|t>>>32-n;n.rotlSH=y;const g=(e,t,n)=>t<<n|e>>>32-n;n.rotlSL=g;const b=(e,t,n)=>t<<n-32|e>>>64-n;n.rotlBH=b;const w=(e,t,n)=>e<<n-32|t>>>64-n;function v(e,t,n,r){const i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:0|i}}n.rotlBL=w,n.add=v;const x=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);n.add3L=x;const E=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;n.add3H=E;const S=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);n.add4L=S;const A=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;n.add4H=A;const _=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);n.add5L=_;const T=(e,t,n,r,i,s)=>t+n+r+i+s+(e/2**32|0)|0;n.add5H=T;const k={fromBig:s,split:o,toBig:a,shrSH:c,shrSL:u,rotrSH:l,rotrSL:d,rotrBH:h,rotrBL:f,rotr32H:p,rotr32L:m,rotlSH:y,rotlSL:g,rotlBH:b,rotlBL:w,add:v,add3L:x,add3H:E,add4L:S,add4H:A,add5H:T,add5L:_};n.default=k},{}],104:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.crypto=void 0,n.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},{}],105:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hmac=n.HMAC=void 0;const r=e("./_assert.js"),i=e("./utils.js");class s extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,r.hash)(e);const n=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,o=new Uint8Array(s);o.set(n.length>s?e.create().update(n).digest():n);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),o.fill(0)}update(e){return(0,r.exists)(this),this.iHash.update(e),this}digestInto(e){(0,r.exists)(this),(0,r.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:s,outputLen:o}=this;return e.finished=r,e.destroyed=i,e.blockLen=s,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}n.HMAC=s;n.hmac=(e,t,n)=>new s(e,t).update(n).digest(),n.hmac.create=(e,t)=>new s(e,t)},{"./_assert.js":101,"./utils.js":109}],106:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.pbkdf2Async=n.pbkdf2=void 0;const r=e("./_assert.js"),i=e("./hmac.js"),s=e("./utils.js");function o(e,t,n,o){(0,r.hash)(e);const a=(0,s.checkOpts)({dkLen:32,asyncTick:10},o),{c:c,dkLen:u,asyncTick:l}=a;if((0,r.number)(c),(0,r.number)(u),(0,r.number)(l),c<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const d=(0,s.toBytes)(t),h=(0,s.toBytes)(n),f=new Uint8Array(u),p=i.hmac.create(e,d),m=p._cloneInto().update(h);return{c:c,dkLen:u,asyncTick:l,DK:f,PRF:p,PRFSalt:m}}function a(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),i.fill(0),n}n.pbkdf2=function(e,t,n,r){const{c:i,dkLen:c,DK:u,PRF:l,PRFSalt:d}=o(e,t,n,r);let h;const f=new Uint8Array(4),p=(0,s.createView)(f),m=new Uint8Array(l.outputLen);for(let e=1,t=0;t<c;e++,t+=l.outputLen){const n=u.subarray(t,t+l.outputLen);p.setInt32(0,e,!1),(h=d._cloneInto(h)).update(f).digestInto(m),n.set(m.subarray(0,n.length));for(let e=1;e<i;e++){l._cloneInto(h).update(m).digestInto(m);for(let e=0;e<n.length;e++)n[e]^=m[e]}}return a(l,d,u,h,m)},n.pbkdf2Async=async function(e,t,n,r){const{c:i,dkLen:c,asyncTick:u,DK:l,PRF:d,PRFSalt:h}=o(e,t,n,r);let f;const p=new Uint8Array(4),m=(0,s.createView)(p),y=new Uint8Array(d.outputLen);for(let e=1,t=0;t<c;e++,t+=d.outputLen){const n=l.subarray(t,t+d.outputLen);m.setInt32(0,e,!1),(f=h._cloneInto(f)).update(p).digestInto(y),n.set(y.subarray(0,n.length)),await(0,s.asyncLoop)(i-1,u,(()=>{d._cloneInto(f).update(y).digestInto(y);for(let e=0;e<n.length;e++)n[e]^=y[e]}))}return a(d,h,l,f,y)}},{"./_assert.js":101,"./hmac.js":105,"./utils.js":109}],107:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha224=n.sha256=void 0;const r=e("./_sha2.js"),i=e("./utils.js"),s=(e,t,n)=>e&t^e&n^t&n,o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),c=new Uint32Array(64);class u extends r.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:n,D:r,E:i,F:s,G:o,H:a}=this;return[e,t,n,r,i,s,o,a]}set(e,t,n,r,i,s,o,a){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|i,this.F=0|s,this.G=0|o,this.H=0|a}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=c[e-15],n=c[e-2],r=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,s=(0,i.rotr)(n,17)^(0,i.rotr)(n,19)^n>>>10;c[e]=s+c[e-7]+r+c[e-16]|0}let{A:n,B:r,C:a,D:u,E:l,F:d,G:h,H:f}=this;for(let e=0;e<64;e++){const t=f+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&d^~p&h)+o[e]+c[e]|0,m=((0,i.rotr)(n,2)^(0,i.rotr)(n,13)^(0,i.rotr)(n,22))+s(n,r,a)|0;f=h,h=d,d=l,l=u+t|0,u=a,a=r,r=n,n=t+m|0}var p;n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,u=u+this.D|0,l=l+this.E|0,d=d+this.F|0,h=h+this.G|0,f=f+this.H|0,this.set(n,r,a,u,l,d,h,f)}roundClean(){c.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends u{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}n.sha256=(0,i.wrapConstructor)((()=>new u)),n.sha224=(0,i.wrapConstructor)((()=>new l))},{"./_sha2.js":102,"./utils.js":109}],108:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sha384=n.sha512_256=n.sha512_224=n.sha512=n.SHA512=void 0;const r=e("./_sha2.js"),i=e("./_u64.js"),s=e("./utils.js"),[o,a]=(()=>i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),c=new Uint32Array(80),u=new Uint32Array(80);class l extends r.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:s,Dh:o,Dl:a,Eh:c,El:u,Fh:l,Fl:d,Gh:h,Gl:f,Hh:p,Hl:m}=this;return[e,t,n,r,i,s,o,a,c,u,l,d,h,f,p,m]}set(e,t,n,r,i,s,o,a,c,u,l,d,h,f,p,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|i,this.Cl=0|s,this.Dh=0|o,this.Dl=0|a,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|h,this.Gl=0|f,this.Hh=0|p,this.Hl=0|m}process(e,t){for(let n=0;n<16;n++,t+=4)c[n]=e.getUint32(t),u[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|c[e-15],n=0|u[e-15],r=i.default.rotrSH(t,n,1)^i.default.rotrSH(t,n,8)^i.default.shrSH(t,n,7),s=i.default.rotrSL(t,n,1)^i.default.rotrSL(t,n,8)^i.default.shrSL(t,n,7),o=0|c[e-2],a=0|u[e-2],l=i.default.rotrSH(o,a,19)^i.default.rotrBH(o,a,61)^i.default.shrSH(o,a,6),d=i.default.rotrSL(o,a,19)^i.default.rotrBL(o,a,61)^i.default.shrSL(o,a,6),h=i.default.add4L(s,d,u[e-7],u[e-16]),f=i.default.add4H(h,r,l,c[e-7],c[e-16]);c[e]=0|f,u[e]=0|h}let{Ah:n,Al:r,Bh:s,Bl:l,Ch:d,Cl:h,Dh:f,Dl:p,Eh:m,El:y,Fh:g,Fl:b,Gh:w,Gl:v,Hh:x,Hl:E}=this;for(let e=0;e<80;e++){const t=i.default.rotrSH(m,y,14)^i.default.rotrSH(m,y,18)^i.default.rotrBH(m,y,41),S=i.default.rotrSL(m,y,14)^i.default.rotrSL(m,y,18)^i.default.rotrBL(m,y,41),A=m&g^~m&w,_=y&b^~y&v,T=i.default.add5L(E,S,_,a[e],u[e]),k=i.default.add5H(T,x,t,A,o[e],c[e]),C=0|T,P=i.default.rotrSH(n,r,28)^i.default.rotrBH(n,r,34)^i.default.rotrBH(n,r,39),O=i.default.rotrSL(n,r,28)^i.default.rotrBL(n,r,34)^i.default.rotrBL(n,r,39),I=n&s^n&d^s&d,j=r&l^r&h^l&h;x=0|w,E=0|v,w=0|g,v=0|b,g=0|m,b=0|y,({h:m,l:y}=i.default.add(0|f,0|p,0|k,0|C)),f=0|d,p=0|h,d=0|s,h=0|l,s=0|n,l=0|r;const M=i.default.add3L(C,O,j);n=i.default.add3H(M,k,P,I),r=0|M}({h:n,l:r}=i.default.add(0|this.Ah,0|this.Al,0|n,0|r)),({h:s,l:l}=i.default.add(0|this.Bh,0|this.Bl,0|s,0|l)),({h:d,l:h}=i.default.add(0|this.Ch,0|this.Cl,0|d,0|h)),({h:f,l:p}=i.default.add(0|this.Dh,0|this.Dl,0|f,0|p)),({h:m,l:y}=i.default.add(0|this.Eh,0|this.El,0|m,0|y)),({h:g,l:b}=i.default.add(0|this.Fh,0|this.Fl,0|g,0|b)),({h:w,l:v}=i.default.add(0|this.Gh,0|this.Gl,0|w,0|v)),({h:x,l:E}=i.default.add(0|this.Hh,0|this.Hl,0|x,0|E)),this.set(n,r,s,l,d,h,f,p,m,y,g,b,w,v,x,E)}roundClean(){c.fill(0),u.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}n.SHA512=l;class d extends l{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class h extends l{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class f extends l{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}n.sha512=(0,s.wrapConstructor)((()=>new l)),n.sha512_224=(0,s.wrapConstructor)((()=>new d)),n.sha512_256=(0,s.wrapConstructor)((()=>new h)),n.sha384=(0,s.wrapConstructor)((()=>new f))},{"./_sha2.js":102,"./_u64.js":103,"./utils.js":109}],109:[function(e,t,n){"use strict";
Object.defineProperty(n,"__esModule",{value:!0}),n.randomBytes=n.wrapXOFConstructorWithOpts=n.wrapConstructorWithOpts=n.wrapConstructor=n.checkOpts=n.Hash=n.concatBytes=n.toBytes=n.utf8ToBytes=n.asyncLoop=n.nextTick=n.hexToBytes=n.bytesToHex=n.isLE=n.rotr=n.createView=n.u32=n.u8=void 0;const r=e("@noble/hashes/crypto");n.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}n.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));n.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(n.rotr=(e,t)=>e<<32-t|e>>>t,n.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!n.isLE)throw new Error("Non little-endian hardware is not supported");const s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));n.bytesToHex=function(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n<e.length;n++)t+=s[e[n]];return t};const o={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function a(e){return e>=o._0&&e<=o._9?e-o._0:e>=o._A&&e<=o._F?e-(o._A-10):e>=o._a&&e<=o._f?e-(o._a-10):void 0}n.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){const n=a(e.charCodeAt(i)),s=a(e.charCodeAt(i+1));if(void 0===n||void 0===s){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}r[t]=16*n+s}return r};function c(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function u(e){if("string"==typeof e&&(e=c(e)),!i(e))throw new Error("expected Uint8Array, got "+typeof e);return e}n.nextTick=async()=>{},n.asyncLoop=async function(e,t,r){let i=Date.now();for(let s=0;s<e;s++){r(s);const e=Date.now()-i;e>=0&&e<t||(await(0,n.nextTick)(),i+=e)}},n.utf8ToBytes=c,n.toBytes=u,n.concatBytes=function(...e){let t=0;for(let n=0;n<e.length;n++){const r=e[n];if(!i(r))throw new Error("Uint8Array expected");t+=r.length}const n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){const i=e[t];n.set(i,r),r+=i.length}return n};n.Hash=class{clone(){return this._cloneInto()}};const l={}.toString;n.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==l.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},n.wrapConstructor=function(e){const t=t=>e().update(u(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t},n.wrapConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(u(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},n.wrapXOFConstructorWithOpts=function(e){const t=(t,n)=>e(n).update(u(t)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=t=>e(t),t},n.randomBytes=function(e=32){if(r.crypto&&"function"==typeof r.crypto.getRandomValues)return r.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},{"@noble/hashes/crypto":104}],110:[function(e,t,n){"use strict";
function r(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function s(...e){const t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map((e=>e.encode)).reduceRight(n,t),decode:e.map((e=>e.decode)).reduce(n,t)}}function o(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(r(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const n=e.indexOf(t);if(-1===n)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}}function a(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function c(e,t="="){if(r(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(n){if(!Array.isArray(n)||n.length&&"string"!=typeof n[0])throw new Error("padding.encode input should be array of strings");for(let e of n)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;n.length*e%8;)n.push(t);return n},decode(n){if(!Array.isArray(n)||n.length&&"string"!=typeof n[0])throw new Error("padding.encode input should be array of strings");for(let e of n)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let r=n.length;if(r*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;r>0&&n[r-1]===t;r--)if(!((r-1)*e%8))throw new Error("Invalid padding: string has too much padding");return n.slice(0,r)}}}function u(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function l(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let i=0;const s=[],o=Array.from(e);for(o.forEach((e=>{if(r(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,r=!0;for(let s=i;s<o.length;s++){const a=o[s],c=t*e+a;if(!Number.isSafeInteger(c)||t*e/t!==e||c-a!=t*e)throw new Error("convertRadix: carry overflow");e=c%n;const u=Math.floor(c/n);if(o[s]=u,!Number.isSafeInteger(u)||u*n+e!==c)throw new Error("convertRadix: carry overflow");r&&(u?r=!1:i=s)}if(s.push(e),r)break}for(let t=0;t<e.length-1&&0===e[t];t++)s.push(0);return s.reverse()}Object.defineProperty(n,"__esModule",{value:!0}),n.bytes=n.stringToBytes=n.str=n.bytesToString=n.hex=n.utf8=n.bech32m=n.bech32=n.base58check=n.createBase58check=n.base58xmr=n.base58xrp=n.base58flickr=n.base58=n.base64urlnopad=n.base64url=n.base64nopad=n.base64=n.base32crockford=n.base32hexnopad=n.base32hex=n.base32nopad=n.base32=n.base16=n.utils=void 0,n.assertNumber=r;const d=(e,t)=>t?d(t,e%t):e,h=(e,t)=>e+(t-d(e,t));function f(e,t,n,i){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(h(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${h(t,n)}`);let s=0,o=0;const a=2**n-1,c=[];for(const i of e){if(r(i),i>=2**t)throw new Error(`convertRadix2: invalid data word=${i} from=${t}`);if(s=s<<t|i,o+t>32)throw new Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=n;o-=n)c.push((s>>o-n&a)>>>0);s&=2**o-1}if(s=s<<n-o&a,!i&&o>=t)throw new Error("Excess padding");if(!i&&s)throw new Error(`Non-zero padding: ${s}`);return i&&o>0&&c.push(s>>>0),c}function p(e){return r(e),{encode:t=>{if(!i(t))throw new Error("radix.encode input should be Uint8Array");return l(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of numbers");return Uint8Array.from(l(t,e,256))}}}function m(e,t=!1){if(r(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(h(8,e)>32||h(e,8)>32)throw new Error("radix2: carry overflow");return{encode:n=>{if(!i(n))throw new Error("radix2.encode input should be Uint8Array");return f(Array.from(n),8,e,!t)},decode:n=>{if(!Array.isArray(n)||n.length&&"number"!=typeof n[0])throw new Error("radix2.decode input should be array of numbers");return Uint8Array.from(f(n,e,8,t))}}}function y(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}function g(e,t){if(r(e),"function"!=typeof t)throw new Error("checksum fn should be function");return{encode(n){if(!i(n))throw new Error("checksum.encode: input should be Uint8Array");const r=t(n).slice(0,e),s=new Uint8Array(n.length+e);return s.set(n),s.set(r,n.length),s},decode(n){if(!i(n))throw new Error("checksum.decode: input should be Uint8Array");const r=n.slice(0,-e),s=t(r).slice(0,e),o=n.slice(-e);for(let t=0;t<e;t++)if(s[t]!==o[t])throw new Error("Invalid checksum");return r}}}n.utils={alphabet:o,chain:s,checksum:g,convertRadix:l,convertRadix2:f,radix:p,radix2:m,join:a,padding:c},n.base16=s(m(4),o("0123456789ABCDEF"),a("")),n.base32=s(m(5),o("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),c(5),a("")),n.base32nopad=s(m(5),o("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),a("")),n.base32hex=s(m(5),o("0123456789ABCDEFGHIJKLMNOPQRSTUV"),c(5),a("")),n.base32hexnopad=s(m(5),o("0123456789ABCDEFGHIJKLMNOPQRSTUV"),a("")),n.base32crockford=s(m(5),o("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),a(""),u((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),n.base64=s(m(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),c(6),a("")),n.base64nopad=s(m(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),a("")),n.base64url=s(m(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),c(6),a("")),n.base64urlnopad=s(m(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),a(""));const b=e=>s(p(58),o(e),a(""));n.base58=b("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),n.base58flickr=b("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),n.base58xrp=b("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const w=[0,2,3,5,6,7,9,10,11];n.base58xmr={encode(e){let t="";for(let r=0;r<e.length;r+=8){const i=e.subarray(r,r+8);t+=n.base58.encode(i).padStart(w[i.length],"1")}return t},decode(e){let t=[];for(let r=0;r<e.length;r+=11){const i=e.slice(r,r+11),s=w.indexOf(i.length),o=n.base58.decode(i);for(let e=0;e<o.length-s;e++)if(0!==o[e])throw new Error("base58xmr: wrong padding");t=t.concat(Array.from(o.slice(o.length-s)))}return Uint8Array.from(t)}};n.createBase58check=e=>s(g(4,(t=>e(e(t)))),n.base58),n.base58check=n.createBase58check;const v=s(o("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),a("")),x=[996825010,642813549,513874426,1027748829,705979059];function E(e){const t=e>>25;let n=(33554431&e)<<5;for(let e=0;e<x.length;e++)1==(t>>e&1)&&(n^=x[e]);return n}function S(e,t,n=1){const r=e.length;let i=1;for(let t=0;t<r;t++){const n=e.charCodeAt(t);if(n<33||n>126)throw new Error(`Invalid prefix (${e})`);i=E(i)^n>>5}i=E(i);for(let t=0;t<r;t++)i=E(i)^31&e.charCodeAt(t);for(let e of t)i=E(i)^e;for(let e=0;e<6;e++)i=E(i);return i^=n,v.encode(f([i%2**30],30,5,!1))}function A(e){const t="bech32"===e?1:734539939,n=m(5),r=n.decode,i=n.encode,s=y(r);function o(e,n,r=90){if("string"!=typeof e)throw new Error("bech32.encode prefix should be string, not "+typeof e);if(n instanceof Uint8Array&&(n=Array.from(n)),!Array.isArray(n)||n.length&&"number"!=typeof n[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof n);if(0===e.length)throw new TypeError(`Invalid prefix length ${e.length}`);const i=e.length+7+n.length;if(!1!==r&&i>r)throw new TypeError(`Length ${i} exceeds limit ${r}`);const s=e.toLowerCase(),o=S(s,n,t);return`${s}1${v.encode(n)}${o}`}function a(e,n=90){if("string"!=typeof e)throw new Error("bech32.decode input should be string, not "+typeof e);if(e.length<8||!1!==n&&e.length>n)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${n})`);const r=e.toLowerCase();if(e!==r&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const i=r.lastIndexOf("1");if(0===i||-1===i)throw new Error('Letter "1" must be present between prefix and data only');const s=r.slice(0,i),o=r.slice(i+1);if(o.length<6)throw new Error("Data must be at least 6 characters long");const a=v.decode(o).slice(0,-6),c=S(s,a,t);if(!o.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected "${c}"`);return{prefix:s,words:a}}return{encode:o,decode:a,encodeFromBytes:function(e,t){return o(e,i(t))},decodeToBytes:function(e){const{prefix:t,words:n}=a(e,!1);return{prefix:t,words:n,bytes:r(n)}},decodeUnsafe:y(a),fromWords:r,fromWordsUnsafe:s,toWords:i}}n.bech32=A("bech32"),n.bech32m=A("bech32m"),n.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},n.hex=s(m(4),o("0123456789abcdef"),a(""),u((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));const _={utf8:n.utf8,hex:n.hex,base16:n.base16,base32:n.base32,base64:n.base64,base64url:n.base64url,base58:n.base58,base58xmr:n.base58xmr},T="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";n.bytesToString=(e,t)=>{if("string"!=typeof e||!_.hasOwnProperty(e))throw new TypeError(T);if(!i(t))throw new TypeError("bytesToString() expects Uint8Array");return _[e].encode(t)},n.str=n.bytesToString;n.stringToBytes=(e,t)=>{if(!_.hasOwnProperty(e))throw new TypeError(T);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return _[e].decode(t)},n.bytes=n.stringToBytes},{}],111:[function(e,t,n){t.exports={0:{index:"0",hex:"0x80000000",symbol:"BTC",name:"Bitcoin"},1:{index:"1",hex:"0x80000001",symbol:"",name:"Testnet (all coins)"},2:{index:"2",hex:"0x80000002",symbol:"LTC",name:"Litecoin"},3:{index:"3",hex:"0x80000003",symbol:"DOGE",name:"Dogecoin"},4:{index:"4",hex:"0x80000004",symbol:"RDD",name:"Reddcoin"},5:{index:"5",hex:"0x80000005",symbol:"DASH",name:"Dash"},6:{index:"6",hex:"0x80000006",symbol:"PPC",name:"Peercoin"},7:{index:"7",hex:"0x80000007",symbol:"NMC",name:"Namecoin"},8:{index:"8",hex:"0x80000008",symbol:"FTC",name:"Feathercoin"},9:{index:"9",hex:"0x80000009",symbol:"XCP",name:"Counterparty"},10:{index:"10",hex:"0x8000000a",symbol:"BLK",name:"Blackcoin"},11:{index:"11",hex:"0x8000000b",symbol:"NSR",name:"NuShares"},12:{index:"12",hex:"0x8000000c",symbol:"NBT",name:"NuBits"},13:{index:"13",hex:"0x8000000d",symbol:"MZC",name:"Mazacoin"},14:{index:"14",hex:"0x8000000e",symbol:"VIA",name:"Viacoin"},15:{index:"15",hex:"0x8000000f",symbol:"XCH",name:"ClearingHouse"},16:{index:"16",hex:"0x80000010",symbol:"RBY",name:"Rubycoin"},17:{index:"17",hex:"0x80000011",symbol:"GRS",name:"Groestlcoin"},18:{index:"18",hex:"0x80000012",symbol:"DGC",name:"Digitalcoin"},19:{index:"19",hex:"0x80000013",symbol:"CCN",name:"Cannacoin"},20:{index:"20",hex:"0x80000014",symbol:"DGB",name:"DigiByte"},21:{index:"21",hex:"0x80000015",symbol:"",name:"Open Assets"},22:{index:"22",hex:"0x80000016",symbol:"MONA",name:"Monacoin"},23:{index:"23",hex:"0x80000017",symbol:"CLAM",name:"Clams"},24:{index:"24",hex:"0x80000018",symbol:"XPM",name:"Primecoin"},25:{index:"25",hex:"0x80000019",symbol:"NEOS",name:"Neoscoin"},26:{index:"26",hex:"0x8000001a",symbol:"JBS",name:"Jumbucks"},27:{index:"27",hex:"0x8000001b",symbol:"ZRC",name:"ziftrCOIN"},28:{index:"28",hex:"0x8000001c",symbol:"VTC",name:"Vertcoin"},29:{index:"29",hex:"0x8000001d",symbol:"NXT",name:"NXT"},30:{index:"30",hex:"0x8000001e",symbol:"BURST",name:"Burst"},31:{index:"31",hex:"0x8000001f",symbol:"MUE",name:"MonetaryUnit"},32:{index:"32",hex:"0x80000020",symbol:"ZOOM",name:"Zoom"},33:{index:"33",hex:"0x80000021",symbol:"VASH",name:"Virtual Cash"},34:{index:"34",hex:"0x80000022",symbol:"CDN",name:"Canada eCoin"},35:{index:"35",hex:"0x80000023",symbol:"SDC",name:"ShadowCash"},36:{index:"36",hex:"0x80000024",symbol:"PKB",name:"ParkByte"},37:{index:"37",hex:"0x80000025",symbol:"PND",name:"Pandacoin"},38:{index:"38",hex:"0x80000026",symbol:"START",name:"StartCOIN"},39:{index:"39",hex:"0x80000027",symbol:"MOIN",name:"MOIN"},40:{index:"40",hex:"0x80000028",symbol:"EXP",name:"Expanse"},41:{index:"41",hex:"0x80000029",symbol:"EMC2",name:"Einsteinium"},42:{index:"42",hex:"0x8000002a",symbol:"DCR",name:"Decred"},43:{index:"43",hex:"0x8000002b",symbol:"XEM",name:"NEM"},44:{index:"44",hex:"0x8000002c",symbol:"PART",name:"Particl"},45:{index:"45",hex:"0x8000002d",symbol:"ARG",name:"Argentum (dead)"},46:{index:"46",hex:"0x8000002e",symbol:"",name:"Libertas"},47:{index:"47",hex:"0x8000002f",symbol:"",name:"Posw coin"},48:{index:"48",hex:"0x80000030",symbol:"SHR",name:"Shreeji"},49:{index:"49",hex:"0x80000031",symbol:"GCR",name:"Global Currency Reserve (GCRcoin)"},50:{index:"50",hex:"0x80000032",symbol:"NVC",name:"Novacoin"},51:{index:"51",hex:"0x80000033",symbol:"AC",name:"Asiacoin"},52:{index:"52",hex:"0x80000034",symbol:"BTCD",name:"BitcoinDark"},53:{index:"53",hex:"0x80000035",symbol:"DOPE",name:"Dopecoin"},54:{index:"54",hex:"0x80000036",symbol:"TPC",name:"Templecoin"},55:{index:"55",hex:"0x80000037",symbol:"AIB",name:"AIB"},56:{index:"56",hex:"0x80000038",symbol:"EDRC",name:"EDRCoin"},57:{index:"57",hex:"0x80000039",symbol:"SYS",name:"Syscoin"},58:{index:"58",hex:"0x8000003a",symbol:"SLR",name:"Solarcoin"},59:{index:"59",hex:"0x8000003b",symbol:"SMLY",name:"Smileycoin"},60:{index:"60",hex:"0x8000003c",symbol:"ETH",name:"Ethereum"},61:{index:"61",hex:"0x8000003d",symbol:"ETC",name:"Ether Classic"},62:{index:"62",hex:"0x8000003e",symbol:"PSB",name:"Pesobit"},63:{index:"63",hex:"0x8000003f",symbol:"LDCN",name:"Landcoin (dead)"},64:{index:"64",hex:"0x80000040",symbol:"",name:"Open Chain"},65:{index:"65",hex:"0x80000041",symbol:"XBC",name:"Bitcoinplus"},66:{index:"66",hex:"0x80000042",symbol:"IOP",name:"Internet of People"},67:{index:"67",hex:"0x80000043",symbol:"NXS",name:"Nexus"},68:{index:"68",hex:"0x80000044",symbol:"INSN",name:"InsaneCoin"},69:{index:"69",hex:"0x80000045",symbol:"OK",name:"OKCash"},70:{index:"70",hex:"0x80000046",symbol:"BRIT",name:"BritCoin"},71:{index:"71",hex:"0x80000047",symbol:"CMP",name:"Compcoin"},72:{index:"72",hex:"0x80000048",symbol:"CRW",name:"Crown"},73:{index:"73",hex:"0x80000049",symbol:"BELA",name:"BelaCoin"},74:{index:"74",hex:"0x8000004a",symbol:"ICX",name:"ICON"},75:{index:"75",hex:"0x8000004b",symbol:"FJC",name:"FujiCoin"},76:{index:"76",hex:"0x8000004c",symbol:"MIX",name:"MIX"},77:{index:"77",hex:"0x8000004d",symbol:"XVG",name:"Verge Currency"},78:{index:"78",hex:"0x8000004e",symbol:"EFL",name:"Electronic Gulden"},79:{index:"79",hex:"0x8000004f",symbol:"CLUB",name:"ClubCoin"},80:{index:"80",hex:"0x80000050",symbol:"RICHX",name:"RichCoin"},81:{index:"81",hex:"0x80000051",symbol:"POT",name:"Potcoin"},82:{index:"82",hex:"0x80000052",symbol:"QRK",name:"Quarkcoin"},83:{index:"83",hex:"0x80000053",symbol:"TRC",name:"Terracoin"},84:{index:"84",hex:"0x80000054",symbol:"GRC",name:"Gridcoin"},85:{index:"85",hex:"0x80000055",symbol:"AUR",name:"Auroracoin"},86:{index:"86",hex:"0x80000056",symbol:"IXC",name:"IXCoin"},87:{index:"87",hex:"0x80000057",symbol:"NLG",name:"Gulden"},88:{index:"88",hex:"0x80000058",symbol:"BITB",name:"BitBean"},89:{index:"89",hex:"0x80000059",symbol:"BTA",name:"Bata"},90:{index:"90",hex:"0x8000005a",symbol:"XMY",name:"Myriadcoin"},91:{index:"91",hex:"0x8000005b",symbol:"BSD",name:"BitSend"},92:{index:"92",hex:"0x8000005c",symbol:"UNO",name:"Unobtanium"},93:{index:"93",hex:"0x8000005d",symbol:"MTR",name:"MasterTrader"},94:{index:"94",hex:"0x8000005e",symbol:"GB",name:"GoldBlocks"},95:{index:"95",hex:"0x8000005f",symbol:"SHM",name:"Saham"},96:{index:"96",hex:"0x80000060",symbol:"CRX",name:"Chronos"},97:{index:"97",hex:"0x80000061",symbol:"BIQ",name:"Ubiquoin"},98:{index:"98",hex:"0x80000062",symbol:"EVO",name:"Evotion"},99:{index:"99",hex:"0x80000063",symbol:"STO",name:"SaveTheOcean"},100:{index:"100",hex:"0x80000064",symbol:"BIGUP",name:"BigUp"},101:{index:"101",hex:"0x80000065",symbol:"GAME",name:"GameCredits"},102:{index:"102",hex:"0x80000066",symbol:"DLC",name:"Dollarcoins"},103:{index:"103",hex:"0x80000067",symbol:"ZYD",name:"Zayedcoin"},104:{index:"104",hex:"0x80000068",symbol:"DBIC",name:"Dubaicoin"},105:{index:"105",hex:"0x80000069",symbol:"STRAT",name:"Stratis"},106:{index:"106",hex:"0x8000006a",symbol:"SH",name:"Shilling"},107:{index:"107",hex:"0x8000006b",symbol:"MARS",name:"MarsCoin"},108:{index:"108",hex:"0x8000006c",symbol:"UBQ",name:"Ubiq"},109:{index:"109",hex:"0x8000006d",symbol:"PTC",name:"Pesetacoin"},110:{index:"110",hex:"0x8000006e",symbol:"NRO",name:"Neurocoin"},111:{index:"111",hex:"0x8000006f",symbol:"ARK",name:"ARK"},112:{index:"112",hex:"0x80000070",symbol:"USC",name:"UltimateSecureCashMain"},113:{index:"113",hex:"0x80000071",symbol:"THC",name:"Hempcoin"},114:{index:"114",hex:"0x80000072",symbol:"LINX",name:"Linx"},115:{index:"115",hex:"0x80000073",symbol:"ECN",name:"Ecoin"},116:{index:"116",hex:"0x80000074",symbol:"DNR",name:"Denarius"},117:{index:"117",hex:"0x80000075",symbol:"PINK",name:"Pinkcoin"},118:{index:"118",hex:"0x80000076",symbol:"ATOM",name:"Atom"},119:{index:"119",hex:"0x80000077",symbol:"PIVX",name:"Pivx"},120:{index:"120",hex:"0x80000078",symbol:"FLASH",name:"Flashcoin"},121:{index:"121",hex:"0x80000079",symbol:"ZEN",name:"Zencash"},122:{index:"122",hex:"0x8000007a",symbol:"PUT",name:"Putincoin"},123:{index:"123",hex:"0x8000007b",symbol:"ZNY",name:"BitZeny"},124:{index:"124",hex:"0x8000007c",symbol:"UNIFY",name:"Unify"},125:{index:"125",hex:"0x8000007d",symbol:"XST",name:"StealthCoin"},126:{index:"126",hex:"0x8000007e",symbol:"BRK",name:"Breakout Coin"},127:{index:"127",hex:"0x8000007f",symbol:"VC",name:"Vcash"},128:{index:"128",hex:"0x80000080",symbol:"XMR",name:"Monero"},129:{index:"129",hex:"0x80000081",symbol:"VOX",name:"Voxels"},130:{index:"130",hex:"0x80000082",symbol:"NAV",name:"NavCoin"},131:{index:"131",hex:"0x80000083",symbol:"FCT",name:"Factom Factoids"},132:{index:"132",hex:"0x80000084",symbol:"EC",name:"Factom Entry Credits"},133:{index:"133",hex:"0x80000085",symbol:"ZEC",name:"Zcash"},134:{index:"134",hex:"0x80000086",symbol:"LSK",name:"Lisk"},135:{index:"135",hex:"0x80000087",symbol:"STEEM",name:"Steem"},136:{index:"136",hex:"0x80000088",symbol:"XZC",name:"ZCoin"},137:{index:"137",hex:"0x80000089",symbol:"RBTC",name:"Rootstock"},138:{index:"138",hex:"0x8000008a",symbol:"",name:"Giftblock"},139:{index:"139",hex:"0x8000008b",symbol:"RPT",name:"RealPointCoin"},140:{index:"140",hex:"0x8000008c",symbol:"LBC",name:"LBRY Credits"},141:{index:"141",hex:"0x8000008d",symbol:"KMD",name:"Komodo"},142:{index:"142",hex:"0x8000008e",symbol:"BSQ",name:"bisq Token"},143:{index:"143",hex:"0x8000008f",symbol:"RIC",name:"Riecoin"},144:{index:"144",hex:"0x80000090",symbol:"XRP",name:"XRP"},145:{index:"145",hex:"0x80000091",symbol:"BCH",name:"Bitcoin Cash"},146:{index:"146",hex:"0x80000092",symbol:"NEBL",name:"Neblio"},147:{index:"147",hex:"0x80000093",symbol:"ZCL",name:"ZClassic"},148:{index:"148",hex:"0x80000094",symbol:"XLM",name:"Stellar Lumens"},149:{index:"149",hex:"0x80000095",symbol:"NLC2",name:"NoLimitCoin2"},150:{index:"150",hex:"0x80000096",symbol:"WHL",name:"WhaleCoin"},151:{index:"151",hex:"0x80000097",symbol:"ERC",name:"EuropeCoin"},152:{index:"152",hex:"0x80000098",symbol:"DMD",name:"Diamond"},153:{index:"153",hex:"0x80000099",symbol:"BTM",name:"Bytom"},154:{index:"154",hex:"0x8000009a",symbol:"BIO",name:"Biocoin"},155:{index:"155",hex:"0x8000009b",symbol:"XWCC",name:"Whitecoin Classic"},156:{index:"156",hex:"0x8000009c",symbol:"BTG",name:"Bitcoin Gold"},157:{index:"157",hex:"0x8000009d",symbol:"BTC2X",name:"Bitcoin 2x"},158:{index:"158",hex:"0x8000009e",symbol:"SSN",name:"SuperSkynet"},159:{index:"159",hex:"0x8000009f",symbol:"TOA",name:"TOACoin"},160:{index:"160",hex:"0x800000a0",symbol:"BTX",name:"Bitcore"},161:{index:"161",hex:"0x800000a1",symbol:"ACC",name:"Adcoin"},162:{index:"162",hex:"0x800000a2",symbol:"BCO",name:"Bridgecoin"},163:{index:"163",hex:"0x800000a3",symbol:"ELLA",name:"Ellaism"},164:{index:"164",hex:"0x800000a4",symbol:"PIRL",name:"Pirl"},165:{index:"165",hex:"0x800000a5",symbol:"XNO",name:"Nano"},166:{index:"166",hex:"0x800000a6",symbol:"VIVO",name:"Vivo"},167:{index:"167",hex:"0x800000a7",symbol:"FRST",name:"Firstcoin"},168:{index:"168",hex:"0x800000a8",symbol:"HNC",name:"Helleniccoin"},169:{index:"169",hex:"0x800000a9",symbol:"BUZZ",name:"BUZZ"},170:{index:"170",hex:"0x800000aa",symbol:"MBRS",name:"Ember"},171:{index:"171",hex:"0x800000ab",symbol:"HC",name:"Hcash"},172:{index:"172",hex:"0x800000ac",symbol:"HTML",name:"HTMLCOIN"},173:{index:"173",hex:"0x800000ad",symbol:"ODN",name:"Obsidian"},174:{index:"174",hex:"0x800000ae",symbol:"ONX",name:"OnixCoin"},175:{index:"175",hex:"0x800000af",symbol:"RVN",name:"Ravencoin"},176:{index:"176",hex:"0x800000b0",symbol:"GBX",name:"GoByte"},177:{index:"177",hex:"0x800000b1",symbol:"BTCZ",name:"BitcoinZ"},178:{index:"178",hex:"0x800000b2",symbol:"POA",name:"Poa"},179:{index:"179",hex:"0x800000b3",symbol:"NYC",name:"NewYorkCoin"},180:{index:"180",hex:"0x800000b4",symbol:"MXT",name:"MarteXcoin"},181:{index:"181",hex:"0x800000b5",symbol:"WC",name:"Wincoin"},182:{index:"182",hex:"0x800000b6",symbol:"MNX",name:"Minexcoin"},183:{index:"183",hex:"0x800000b7",symbol:"BTCP",name:"Bitcoin Private"},184:{index:"184",hex:"0x800000b8",symbol:"MUSIC",name:"Musicoin"},185:{index:"185",hex:"0x800000b9",symbol:"BCA",name:"Bitcoin Atom"},186:{index:"186",hex:"0x800000ba",symbol:"CRAVE",name:"Crave"},187:{index:"187",hex:"0x800000bb",symbol:"STAK",name:"STRAKS"},188:{index:"188",hex:"0x800000bc",symbol:"WBTC",name:"World Bitcoin"},189:{index:"189",hex:"0x800000bd",symbol:"LCH",name:"LiteCash"},190:{index:"190",hex:"0x800000be",symbol:"EXCL",name:"ExclusiveCoin"},191:{index:"191",hex:"0x800000bf",symbol:"",name:"Lynx"},192:{index:"192",hex:"0x800000c0",symbol:"LCC",name:"LitecoinCash"},193:{index:"193",hex:"0x800000c1",symbol:"XFE",name:"Feirm"},194:{index:"194",hex:"0x800000c2",symbol:"EOS",name:"EOS"},195:{index:"195",hex:"0x800000c3",symbol:"TRX",name:"Tron"},196:{index:"196",hex:"0x800000c4",symbol:"KOBO",name:"Kobocoin"},197:{index:"197",hex:"0x800000c5",symbol:"HUSH",name:"HUSH"},198:{index:"198",hex:"0x800000c6",symbol:"BAN",name:"Banano"},199:{index:"199",hex:"0x800000c7",symbol:"ETF",name:"ETF"},200:{index:"200",hex:"0x800000c8",symbol:"OMNI",name:"Omni"},201:{index:"201",hex:"0x800000c9",symbol:"BIFI",name:"BitcoinFile"},202:{index:"202",hex:"0x800000ca",symbol:"UFO",name:"Uniform Fiscal Object"},203:{index:"203",hex:"0x800000cb",symbol:"CNMC",name:"Cryptonodes"},204:{index:"204",hex:"0x800000cc",symbol:"BCN",name:"Bytecoin"},205:{index:"205",hex:"0x800000cd",symbol:"RIN",name:"Ringo"},206:{index:"206",hex:"0x800000ce",symbol:"ATP",name:"Alaya"},207:{index:"207",hex:"0x800000cf",symbol:"EVT",name:"everiToken"},208:{index:"208",hex:"0x800000d0",symbol:"ATN",name:"ATN"},209:{index:"209",hex:"0x800000d1",symbol:"BIS",name:"Bismuth"},210:{index:"210",hex:"0x800000d2",symbol:"NEET",name:"NEETCOIN"},211:{index:"211",hex:"0x800000d3",symbol:"BOPO",name:"BopoChain"},212:{index:"212",hex:"0x800000d4",symbol:"OOT",name:"Utrum"},213:{index:"213",hex:"0x800000d5",symbol:"ALIAS",name:"Alias"},214:{index:"214",hex:"0x800000d6",symbol:"MONK",name:"Monkey Project"},215:{index:"215",hex:"0x800000d7",symbol:"BOXY",name:"BoxyCoin"},216:{index:"216",hex:"0x800000d8",symbol:"FLO",name:"Flo"},217:{index:"217",hex:"0x800000d9",symbol:"MEC",name:"Megacoin"},218:{index:"218",hex:"0x800000da",symbol:"BTDX",name:"BitCloud"},219:{index:"219",hex:"0x800000db",symbol:"XAX",name:"Artax"},220:{index:"220",hex:"0x800000dc",symbol:"ANON",name:"ANON"},221:{index:"221",hex:"0x800000dd",symbol:"LTZ",name:"LitecoinZ"},222:{index:"222",hex:"0x800000de",symbol:"BITG",name:"Bitcoin Green"},223:{index:"223",hex:"0x800000df",symbol:"ICP",name:"Internet Computer (DFINITY)"},224:{index:"224",hex:"0x800000e0",symbol:"SMART",name:"Smartcash"},225:{index:"225",hex:"0x800000e1",symbol:"XUEZ",name:"XUEZ"},226:{index:"226",hex:"0x800000e2",symbol:"HLM",name:"Helium"},227:{index:"227",hex:"0x800000e3",symbol:"WEB",name:"Webchain"},228:{index:"228",hex:"0x800000e4",symbol:"ACM",name:"Actinium"},229:{index:"229",hex:"0x800000e5",symbol:"NOS",name:"NOS Stable Coins"},230:{index:"230",hex:"0x800000e6",symbol:"BITC",name:"BitCash"},231:{index:"231",hex:"0x800000e7",symbol:"HTH",name:"Help The Homeless Coin"},232:{index:"232",hex:"0x800000e8",symbol:"TZC",name:"Trezarcoin"},233:{index:"233",hex:"0x800000e9",symbol:"VAR",name:"Varda"},234:{index:"234",hex:"0x800000ea",symbol:"IOV",name:"IOV"},235:{index:"235",hex:"0x800000eb",symbol:"FIO",name:"FIO"},236:{index:"236",hex:"0x800000ec",symbol:"BSV",name:"BitcoinSV"},237:{index:"237",hex:"0x800000ed",symbol:"DXN",name:"DEXON"},238:{index:"238",hex:"0x800000ee",symbol:"QRL",name:"Quantum Resistant Ledger"},239:{index:"239",hex:"0x800000ef",symbol:"PCX",name:"ChainX"},240:{index:"240",hex:"0x800000f0",symbol:"LOKI",name:"Loki"},241:{index:"241",hex:"0x800000f1",symbol:"",name:"Imagewallet"},242:{index:"242",hex:"0x800000f2",symbol:"NIM",name:"Nimiq"},243:{index:"243",hex:"0x800000f3",symbol:"SOV",name:"Sovereign Coin"},244:{index:"244",hex:"0x800000f4",symbol:"JCT",name:"Jibital Coin"},245:{index:"245",hex:"0x800000f5",symbol:"SLP",name:"Simple Ledger Protocol"},246:{index:"246",hex:"0x800000f6",symbol:"EWT",name:"Energy Web"},247:{index:"247",hex:"0x800000f7",symbol:"UC",name:"Ulord"},248:{index:"248",hex:"0x800000f8",symbol:"EXOS",name:"EXOS"},249:{index:"249",hex:"0x800000f9",symbol:"ECA",name:"Electra"},250:{index:"250",hex:"0x800000fa",symbol:"SOOM",name:"Soom"},251:{index:"251",hex:"0x800000fb",symbol:"XRD",name:"Redstone"},252:{index:"252",hex:"0x800000fc",symbol:"FREE",name:"FreeCoin"},253:{index:"253",hex:"0x800000fd",symbol:"NPW",name:"NewPowerCoin"},254:{index:"254",hex:"0x800000fe",symbol:"BST",name:"BlockStamp"},255:{index:"255",hex:"0x800000ff",symbol:"",name:"SmartHoldem"},256:{index:"256",hex:"0x80000100",symbol:"NANO",name:"Bitcoin Nano"},257:{index:"257",hex:"0x80000101",symbol:"BTCC",name:"Bitcoin Core"},258:{index:"258",hex:"0x80000102",symbol:"",name:"Zen Protocol"},259:{index:"259",hex:"0x80000103",symbol:"ZEST",name:"Zest"},260:{index:"260",hex:"0x80000104",symbol:"ABT",name:"ArcBlock"},261:{index:"261",hex:"0x80000105",symbol:"PION",name:"Pion"},262:{index:"262",hex:"0x80000106",symbol:"DT3",name:"DreamTeam3"},263:{index:"263",hex:"0x80000107",symbol:"ZBUX",name:"Zbux"},264:{index:"264",hex:"0x80000108",symbol:"KPL",name:"Kepler"},265:{index:"265",hex:"0x80000109",symbol:"TPAY",name:"TokenPay"},266:{index:"266",hex:"0x8000010a",symbol:"ZILLA",name:"ChainZilla"},267:{index:"267",hex:"0x8000010b",symbol:"ANK",name:"Anker"},268:{index:"268",hex:"0x8000010c",symbol:"BCC",name:"BCChain"},269:{index:"269",hex:"0x8000010d",symbol:"HPB",name:"HPB"},270:{index:"270",hex:"0x8000010e",symbol:"ONE",name:"ONE"},271:{index:"271",hex:"0x8000010f",symbol:"SBC",name:"SBC"},272:{index:"272",hex:"0x80000110",symbol:"IPC",name:"IPChain"},273:{index:"273",hex:"0x80000111",symbol:"DMTC",name:"Dominantchain"},274:{index:"274",hex:"0x80000112",symbol:"OGC",name:"Onegram"},275:{index:"275",hex:"0x80000113",symbol:"SHIT",name:"Shitcoin"},276:{index:"276",hex:"0x80000114",symbol:"ANDES",name:"Andescoin"},277:{index:"277",hex:"0x80000115",symbol:"AREPA",name:"Arepacoin"},278:{index:"278",hex:"0x80000116",symbol:"BOLI",name:"Bolivarcoin"},279:{index:"279",hex:"0x80000117",symbol:"RIL",name:"Rilcoin"},280:{index:"280",hex:"0x80000118",symbol:"HTR",name:"Hathor Network"},281:{index:"281",hex:"0x80000119",symbol:"ACME",name:"Accumulate"},282:{index:"282",hex:"0x8000011a",symbol:"BRAVO",name:"BRAVO"},283:{index:"283",hex:"0x8000011b",symbol:"ALGO",name:"Algorand"},284:{index:"284",hex:"0x8000011c",symbol:"BZX",name:"Bitcoinzero"},285:{index:"285",hex:"0x8000011d",symbol:"GXX",name:"GravityCoin"},286:{index:"286",hex:"0x8000011e",symbol:"HEAT",name:"HEAT"},287:{index:"287",hex:"0x8000011f",symbol:"XDN",name:"DigitalNote"},288:{index:"288",hex:"0x80000120",symbol:"FSN",name:"FUSION"},289:{index:"289",hex:"0x80000121",symbol:"CPC",name:"Capricoin"},290:{index:"290",hex:"0x80000122",symbol:"BOLD",name:"Bold"},291:{index:"291",hex:"0x80000123",symbol:"IOST",name:"IOST"},292:{index:"292",hex:"0x80000124",symbol:"TKEY",name:"Tkeycoin"},293:{index:"293",hex:"0x80000125",symbol:"USE",name:"Usechain"},294:{index:"294",hex:"0x80000126",symbol:"BCZ",name:"BitcoinCZ"},295:{index:"295",hex:"0x80000127",symbol:"IOC",name:"Iocoin"},296:{index:"296",hex:"0x80000128",symbol:"ASF",name:"Asofe"},297:{index:"297",hex:"0x80000129",symbol:"MASS",name:"MASS"},298:{index:"298",hex:"0x8000012a",symbol:"FAIR",name:"FairCoin"},299:{index:"299",hex:"0x8000012b",symbol:"NUKO",name:"Nekonium"},300:{index:"300",hex:"0x8000012c",symbol:"GNX",name:"Genaro Network"},301:{index:"301",hex:"0x8000012d",symbol:"DIVI",name:"Divi Project"},302:{index:"302",hex:"0x8000012e",symbol:"CMT",name:"Community"},303:{index:"303",hex:"0x8000012f",symbol:"EUNO",name:"EUNO"},304:{index:"304",hex:"0x80000130",symbol:"IOTX",name:"IoTeX"},305:{index:"305",hex:"0x80000131",symbol:"ONION",name:"DeepOnion"},306:{index:"306",hex:"0x80000132",symbol:"8BIT",name:"8Bit"},307:{index:"307",hex:"0x80000133",symbol:"ATC",name:"AToken Coin"},308:{index:"308",hex:"0x80000134",symbol:"BTS",name:"Bitshares"},309:{index:"309",hex:"0x80000135",symbol:"CKB",name:"Nervos CKB"},310:{index:"310",hex:"0x80000136",symbol:"UGAS",name:"Ultrain"},311:{index:"311",hex:"0x80000137",symbol:"ADS",name:"Adshares"},312:{index:"312",hex:"0x80000138",symbol:"ARA",name:"Aura"},313:{index:"313",hex:"0x80000139",symbol:"ZIL",name:"Zilliqa"},314:{index:"314",hex:"0x8000013a",symbol:"MOAC",name:"MOAC"},315:{index:"315",hex:"0x8000013b",symbol:"SWTC",name:"SWTC"},316:{index:"316",hex:"0x8000013c",symbol:"VNSC",name:"vnscoin"},317:{index:"317",hex:"0x8000013d",symbol:"PLUG",name:"Pl^g"},318:{index:"318",hex:"0x8000013e",symbol:"MAN",name:"Matrix AI Network"},319:{index:"319",hex:"0x8000013f",symbol:"ECC",name:"ECCoin"},320:{index:"320",hex:"0x80000140",symbol:"RPD",name:"Rapids"},321:{index:"321",hex:"0x80000141",symbol:"RAP",name:"Rapture"},322:{index:"322",hex:"0x80000142",symbol:"GARD",name:"Hashgard"},323:{index:"323",hex:"0x80000143",symbol:"ZER",name:"Zero"},324:{index:"324",hex:"0x80000144",symbol:"EBST",name:"eBoost"},325:{index:"325",hex:"0x80000145",symbol:"SHARD",name:"Shard"},326:{index:"326",hex:"0x80000146",symbol:"MRX",name:"Metrix Coin"},327:{index:"327",hex:"0x80000147",symbol:"CMM",name:"Commercium"},328:{index:"328",hex:"0x80000148",symbol:"BLOCK",name:"Blocknet"},329:{index:"329",hex:"0x80000149",symbol:"AUDAX",name:"AUDAX"},330:{index:"330",hex:"0x8000014a",symbol:"LUNA",name:"Terra"},331:{index:"331",hex:"0x8000014b",symbol:"ZPM",name:"zPrime"},332:{index:"332",hex:"0x8000014c",symbol:"KUVA",name:"Kuva Utility Note"},333:{index:"333",hex:"0x8000014d",symbol:"MEM",name:"MemCoin"},334:{index:"334",hex:"0x8000014e",symbol:"CS",name:"Credits"},335:{index:"335",hex:"0x8000014f",symbol:"SWIFT",name:"SwiftCash"},336:{index:"336",hex:"0x80000150",symbol:"FIX",name:"FIX"},337:{index:"337",hex:"0x80000151",symbol:"CPC",name:"CPChain"},338:{index:"338",hex:"0x80000152",symbol:"VGO",name:"VirtualGoodsToken"},339:{index:"339",hex:"0x80000153",symbol:"DVT",name:"DeVault"},340:{index:"340",hex:"0x80000154",symbol:"N8V",name:"N8VCoin"},341:{index:"341",hex:"0x80000155",symbol:"MTNS",name:"OmotenashiCoin"},342:{index:"342",hex:"0x80000156",symbol:"BLAST",name:"BLAST"},343:{index:"343",hex:"0x80000157",symbol:"DCT",name:"DECENT"},344:{index:"344",hex:"0x80000158",symbol:"AUX",name:"Auxilium"},345:{index:"345",hex:"0x80000159",symbol:"USDP",name:"USDP"},346:{index:"346",hex:"0x8000015a",symbol:"HTDF",name:"HTDF"},347:{index:"347",hex:"0x8000015b",symbol:"YEC",name:"Ycash"},348:{index:"348",hex:"0x8000015c",symbol:"QLC",name:"QLC Chain"},349:{index:"349",hex:"0x8000015d",symbol:"TEA",name:"Icetea Blockchain"},350:{index:"350",hex:"0x8000015e",symbol:"ARW",name:"ArrowChain"},351:{index:"351",hex:"0x8000015f",symbol:"MDM",name:"Medium"},352:{index:"352",hex:"0x80000160",symbol:"CYB",name:"Cybex"},353:{index:"353",hex:"0x80000161",symbol:"LTO",name:"LTO Network"},354:{index:"354",hex:"0x80000162",symbol:"DOT",name:"Polkadot"},355:{index:"355",hex:"0x80000163",symbol:"AEON",name:"Aeon"},356:{index:"356",hex:"0x80000164",symbol:"RES",name:"Resistance"},357:{index:"357",hex:"0x80000165",symbol:"AYA",name:"Aryacoin"},358:{index:"358",hex:"0x80000166",symbol:"DAPS",name:"Dapscoin"},359:{index:"359",hex:"0x80000167",symbol:"CSC",name:"CasinoCoin"},360:{index:"360",hex:"0x80000168",symbol:"VSYS",name:"V Systems"},361:{index:"361",hex:"0x80000169",symbol:"NOLLAR",name:"Nollar"},362:{index:"362",hex:"0x8000016a",symbol:"XNOS",name:"NOS"},363:{index:"363",hex:"0x8000016b",symbol:"CPU",name:"CPUchain"},364:{index:"364",hex:"0x8000016c",symbol:"LAMB",name:"Lambda Storage Chain"},365:{index:"365",hex:"0x8000016d",symbol:"VCT",name:"ValueCyber"},366:{index:"366",hex:"0x8000016e",symbol:"CZR",name:"Canonchain"},367:{index:"367",hex:"0x8000016f",symbol:"ABBC",name:"ABBC"},368:{index:"368",hex:"0x80000170",symbol:"HET",name:"HET"},369:{index:"369",hex:"0x80000171",symbol:"XAS",name:"Asch"},370:{index:"370",hex:"0x80000172",symbol:"VDL",name:"Vidulum"},371:{index:"371",hex:"0x80000173",symbol:"MED",name:"MediBloc"},372:{index:"372",hex:"0x80000174",symbol:"ZVC",name:"ZVChain"},373:{index:"373",hex:"0x80000175",symbol:"VESTX",name:"Vestx"},374:{index:"374",hex:"0x80000176",symbol:"DBT",name:"DarkBit"},375:{index:"375",hex:"0x80000177",symbol:"SEOS",name:"SuperEOS"},376:{index:"376",hex:"0x80000178",symbol:"MXW",name:"Maxonrow"},377:{index:"377",hex:"0x80000179",symbol:"ZNZ",name:"ZENZO"},378:{index:"378",hex:"0x8000017a",symbol:"XCX",name:"XChain"},379:{index:"379",hex:"0x8000017b",symbol:"SOX",name:"SonicX"},380:{index:"380",hex:"0x8000017c",symbol:"NYZO",name:"Nyzo"},381:{index:"381",hex:"0x8000017d",symbol:"ULC",name:"ULCoin"},382:{index:"382",hex:"0x8000017e",symbol:"RYO",name:"Ryo Currency"},383:{index:"383",hex:"0x8000017f",symbol:"KAL",name:"Kaleidochain"},384:{index:"384",hex:"0x80000180",symbol:"XSN",name:"Stakenet"},385:{index:"385",hex:"0x80000181",symbol:"DOGEC",name:"DogeCash"},386:{index:"386",hex:"0x80000182",symbol:"BMV",name:"Bitcoin Matteo's Vision"},387:{index:"387",hex:"0x80000183",symbol:"QBC",name:"Quebecoin"},388:{index:"388",hex:"0x80000184",symbol:"IMG",name:"ImageCoin"},389:{index:"389",hex:"0x80000185",symbol:"QOS",name:"QOS"},390:{index:"390",hex:"0x80000186",symbol:"PKT",name:"PKT"},391:{index:"391",hex:"0x80000187",symbol:"LHD",name:"LitecoinHD"},392:{index:"392",hex:"0x80000188",symbol:"CENNZ",name:"CENNZnet"},393:{index:"393",hex:"0x80000189",symbol:"HSN",name:"Hyper Speed Network"},394:{index:"394",hex:"0x8000018a",symbol:"CRO",name:"Crypto Chain"},395:{index:"395",hex:"0x8000018b",symbol:"UMBRU",name:"Umbru"},396:{index:"396",hex:"0x8000018c",symbol:"EVER",name:"Everscale"},397:{index:"397",hex:"0x8000018d",symbol:"NEAR",name:"NEAR Protocol"},398:{index:"398",hex:"0x8000018e",symbol:"XPC",name:"XPChain"},399:{index:"399",hex:"0x8000018f",symbol:"ZOC",name:"01coin"},400:{index:"400",hex:"0x80000190",symbol:"NIX",name:"NIX"},401:{index:"401",hex:"0x80000191",symbol:"UC",name:"Utopiacoin"},402:{index:"402",hex:"0x80000192",symbol:"GALI",name:"Galilel"},403:{index:"403",hex:"0x80000193",symbol:"OLT",name:"Oneledger"},404:{index:"404",hex:"0x80000194",symbol:"XBI",name:"XBI"},405:{index:"405",hex:"0x80000195",symbol:"DONU",name:"DONU"},406:{index:"406",hex:"0x80000196",symbol:"EARTHS",name:"Earths"},407:{index:"407",hex:"0x80000197",symbol:"HDD",name:"HDDCash"},408:{index:"408",hex:"0x80000198",symbol:"SUGAR",name:"Sugarchain"},409:{index:"409",hex:"0x80000199",symbol:"AILE",name:"AileCoin"},410:{index:"410",hex:"0x8000019a",symbol:"TENT",name:"TENT"},411:{index:"411",hex:"0x8000019b",symbol:"TAN",name:"Tangerine Network"},412:{index:"412",hex:"0x8000019c",symbol:"AIN",name:"AIN"},413:{index:"413",hex:"0x8000019d",symbol:"MSR",name:"Masari"},414:{index:"414",hex:"0x8000019e",symbol:"SUMO",name:"Sumokoin"},415:{index:"415",hex:"0x8000019f",symbol:"ETN",name:"Electroneum"},416:{index:"416",hex:"0x800001a0",symbol:"BYTZ",name:"BYTZ"},417:{index:"417",hex:"0x800001a1",symbol:"WOW",name:"Wownero"},418:{index:"418",hex:"0x800001a2",symbol:"XTNC",name:"XtendCash"},419:{index:"419",hex:"0x800001a3",symbol:"LTHN",name:"Lethean"},420:{index:"420",hex:"0x800001a4",symbol:"NODE",name:"NodeHost"},421:{index:"421",hex:"0x800001a5",symbol:"AGM",name:"Argoneum"},422:{index:"422",hex:"0x800001a6",symbol:"CCX",name:"Conceal Network"},423:{index:"423",hex:"0x800001a7",symbol:"TNET",name:"Title Network"},424:{index:"424",hex:"0x800001a8",symbol:"TELOS",name:"TelosCoin"},425:{index:"425",hex:"0x800001a9",symbol:"AION",name:"Aion"},426:{index:"426",hex:"0x800001aa",symbol:"BC",name:"Bitcoin Confidential"},427:{index:"427",hex:"0x800001ab",symbol:"KTV",name:"KmushiCoin"},428:{index:"428",hex:"0x800001ac",symbol:"ZCR",name:"ZCore"},429:{index:"429",hex:"0x800001ad",symbol:"ERG",name:"Ergo"},430:{index:"430",hex:"0x800001ae",symbol:"PESO",name:"Criptopeso"},431:{index:"431",hex:"0x800001af",symbol:"BTC2",name:"Bitcoin 2"},432:{index:"432",hex:"0x800001b0",symbol:"XRPHD",name:"XRPHD"},433:{index:"433",hex:"0x800001b1",symbol:"WE",name:"WE Coin"},434:{index:"434",hex:"0x800001b2",symbol:"KSM",name:"Kusama"},435:{index:"435",hex:"0x800001b3",symbol:"PCN",name:"Peepcoin"},436:{index:"436",hex:"0x800001b4",symbol:"NCH",name:"NetCloth"},437:{index:"437",hex:"0x800001b5",symbol:"ICU",name:"CHIPO"},438:{index:"438",hex:"0x800001b6",symbol:"FNSA",name:"FINSCHIA"},439:{index:"439",hex:"0x800001b7",symbol:"DTP",name:"DeVault Token Protocol"},440:{index:"440",hex:"0x800001b8",symbol:"BTCR",name:"Bitcoin Royale"},441:{index:"441",hex:"0x800001b9",symbol:"AERGO",name:"AERGO"},442:{index:"442",hex:"0x800001ba",symbol:"XTH",name:"Dothereum"},443:{index:"443",hex:"0x800001bb",symbol:"LV",name:"Lava"},444:{index:"444",hex:"0x800001bc",symbol:"PHR",name:"Phore"},445:{index:"445",hex:"0x800001bd",symbol:"VITAE",name:"Vitae"},446:{index:"446",hex:"0x800001be",symbol:"COCOS",name:"Cocos-BCX"},447:{index:"447",hex:"0x800001bf",symbol:"DIN",name:"Dinero"},448:{index:"448",hex:"0x800001c0",symbol:"SPL",name:"Simplicity"},449:{index:"449",hex:"0x800001c1",symbol:"YCE",name:"MYCE"},450:{index:"450",hex:"0x800001c2",symbol:"XLR",name:"Solaris"},451:{index:"451",hex:"0x800001c3",symbol:"KTS",name:"Klimatas"},452:{index:"452",hex:"0x800001c4",symbol:"DGLD",name:"DGLD"},453:{index:"453",hex:"0x800001c5",symbol:"XNS",name:"Insolar"},454:{index:"454",hex:"0x800001c6",symbol:"EM",name:"EMPOW"},455:{index:"455",hex:"0x800001c7",symbol:"SHN",name:"ShineBlocks"},456:{index:"456",hex:"0x800001c8",symbol:"SEELE",name:"Seele"},457:{index:"457",hex:"0x800001c9",symbol:"AE",name:"æternity"},458:{index:"458",hex:"0x800001ca",symbol:"ODX",name:"ObsidianX"},459:{index:"459",hex:"0x800001cb",symbol:"KAVA",name:"Kava"},460:{index:"460",hex:"0x800001cc",symbol:"GLEEC",name:"GLEEC"},461:{index:"461",hex:"0x800001cd",symbol:"FIL",name:"Filecoin"},462:{index:"462",hex:"0x800001ce",symbol:"RUTA",name:"Rutanio"},463:{index:"463",hex:"0x800001cf",symbol:"CSDT",name:"CSDT"},464:{index:"464",hex:"0x800001d0",symbol:"ETI",name:"EtherInc"},465:{index:"465",hex:"0x800001d1",symbol:"ZSLP",name:"Zclassic Simple Ledger Protocol"},466:{index:"466",hex:"0x800001d2",symbol:"ERE",name:"EtherCore"},467:{index:"467",hex:"0x800001d3",symbol:"DX",name:"DxChain Token"},468:{index:"468",hex:"0x800001d4",symbol:"CPS",name:"Capricoin+"},469:{index:"469",hex:"0x800001d5",symbol:"BTH",name:"Bithereum"},470:{index:"470",hex:"0x800001d6",symbol:"MESG",name:"MESG"},471:{index:"471",hex:"0x800001d7",symbol:"FIMK",name:"FIMK"},472:{index:"472",hex:"0x800001d8",symbol:"AR",name:"Arweave"},473:{index:"473",hex:"0x800001d9",symbol:"OGO",name:"Origo"},474:{index:"474",hex:"0x800001da",symbol:"ROSE",name:"Oasis Network"},475:{index:"475",hex:"0x800001db",symbol:"BARE",name:"BARE Network"},476:{index:"476",hex:"0x800001dc",symbol:"GLEEC",name:"GleecBTC"},477:{index:"477",hex:"0x800001dd",symbol:"CLR",name:"Color Coin"},478:{index:"478",hex:"0x800001de",symbol:"RNG",name:"Ring"},479:{index:"479",hex:"0x800001df",symbol:"OLO",name:"Tool Global"},480:{index:"480",hex:"0x800001e0",symbol:"PEXA",name:"Pexa"},481:{index:"481",hex:"0x800001e1",symbol:"MOON",name:"Mooncoin"},482:{index:"482",hex:"0x800001e2",symbol:"OCEAN",name:"Ocean Protocol"},483:{index:"483",hex:"0x800001e3",symbol:"BNT",name:"Bluzelle Native"},484:{index:"484",hex:"0x800001e4",symbol:"AMO",name:"AMO Blockchain"},485:{index:"485",hex:"0x800001e5",symbol:"FCH",name:"FreeCash"},486:{index:"486",hex:"0x800001e6",symbol:"LAT",name:"PlatON"},487:{index:"487",hex:"0x800001e7",symbol:"COIN",name:"Bitcoin Bank"},488:{index:"488",hex:"0x800001e8",symbol:"VEO",name:"Amoveo"},489:{index:"489",hex:"0x800001e9",symbol:"CCA",name:"Counos Coin"},490:{index:"490",hex:"0x800001ea",symbol:"GFN",name:"Graphene"},491:{index:"491",hex:"0x800001eb",symbol:"BIP",name:"Minter Network"},492:{index:"492",hex:"0x800001ec",symbol:"KPG",name:"Kunpeng Network"},493:{index:"493",hex:"0x800001ed",symbol:"FIN",name:"FINL Chain"},494:{index:"494",hex:"0x800001ee",symbol:"BAND",name:"Band"},495:{index:"495",hex:"0x800001ef",symbol:"DROP",name:"Dropil"},496:{index:"496",hex:"0x800001f0",symbol:"BHT",name:"Bluehelix Chain"},497:{index:"497",hex:"0x800001f1",symbol:"LYRA",name:"Scrypta"},498:{index:"498",hex:"0x800001f2",symbol:"CS",name:"Credits"},499:{index:"499",hex:"0x800001f3",symbol:"RUPX",name:"Rupaya"},500:{index:"500",hex:"0x800001f4",symbol:"THETA",name:"Theta"},501:{index:"501",hex:"0x800001f5",symbol:"SOL",name:"Solana"},502:{index:"502",hex:"0x800001f6",symbol:"THT",name:"ThoughtAI"},503:{index:"503",hex:"0x800001f7",symbol:"CFX",name:"Conflux"},504:{index:"504",hex:"0x800001f8",symbol:"KUMA",name:"Kumacoin"},505:{index:"505",hex:"0x800001f9",symbol:"HASH",name:"Provenance"},506:{index:"506",hex:"0x800001fa",symbol:"CSPR",name:"Casper"},507:{index:"507",hex:"0x800001fb",symbol:"EARTH",name:"EARTH"},508:{index:"508",hex:"0x800001fc",symbol:"EGLD",name:"MultiversX"},509:{index:"509",hex:"0x800001fd",symbol:"CHI",name:"Xaya"},510:{index:"510",hex:"0x800001fe",symbol:"KOTO",name:"Koto"},511:{index:"511",hex:"0x800001ff",symbol:"OTC",name:"θ"},512:{index:"512",hex:"0x80000200",symbol:"RXD",name:"Radiant"},513:{index:"513",hex:"0x80000201",symbol:"SEELEN",name:"Seele-N"},514:{index:"514",hex:"0x80000202",symbol:"AETH",name:"AETH"},515:{index:"515",hex:"0x80000203",symbol:"DNA",name:"Idena"},516:{index:"516",hex:"0x80000204",symbol:"VEE",name:"Virtual Economy Era"},517:{index:"517",hex:"0x80000205",symbol:"SIERRA",name:"SierraCoin"},518:{index:"518",hex:"0x80000206",symbol:"LET",name:"Linkeye"},519:{index:"519",hex:"0x80000207",symbol:"BSC",name:"Bitcoin Smart Contract"},520:{index:"520",hex:"0x80000208",symbol:"BTCV",name:"BitcoinVIP"},521:{index:"521",hex:"0x80000209",symbol:"ABA",name:"Dabacus"},522:{index:"522",hex:"0x8000020a",symbol:"SCC",name:"StakeCubeCoin"},523:{index:"523",hex:"0x8000020b",symbol:"EDG",name:"Edgeware"},524:{index:"524",hex:"0x8000020c",symbol:"AMS",name:"AmsterdamCoin"},525:{index:"525",hex:"0x8000020d",symbol:"GOSS",name:"GOSSIP Coin"},526:{index:"526",hex:"0x8000020e",symbol:"BU",name:"BUMO"},527:{index:"527",hex:"0x8000020f",symbol:"GRAM",name:"GRAM"},528:{index:"528",hex:"0x80000210",symbol:"YAP",name:"Yapstone"},529:{index:"529",hex:"0x80000211",symbol:"SCRT",name:"Secret Network"},530:{index:"530",hex:"0x80000212",symbol:"NOVO",name:"Novo"},531:{index:"531",hex:"0x80000213",symbol:"GHOST",name:"Ghost"},532:{index:"532",hex:"0x80000214",symbol:"HST",name:"HST"},533:{index:"533",hex:"0x80000215",symbol:"PRJ",name:"ProjectCoin"},534:{index:"534",hex:"0x80000216",symbol:"YOU",name:"YOUChain"},535:{index:"535",hex:"0x80000217",symbol:"XHV",name:"Haven Protocol"},536:{index:"536",hex:"0x80000218",symbol:"BYND",name:"Beyondcoin"},537:{index:"537",hex:"0x80000219",symbol:"JOYS",name:"Joys Digital"},538:{index:"538",hex:"0x8000021a",symbol:"VAL",name:"Valorbit"},539:{index:"539",hex:"0x8000021b",symbol:"FLOW",name:"Flow"},540:{index:"540",hex:"0x8000021c",symbol:"SMESH",name:"Spacemesh Coin"},541:{index:"541",hex:"0x8000021d",symbol:"SCDO",name:"SCDO"},542:{index:"542",hex:"0x8000021e",symbol:"IQS",name:"IQ-Cash"},543:{index:"543",hex:"0x8000021f",symbol:"BIND",name:"Compendia"},544:{index:"544",hex:"0x80000220",symbol:"COINEVO",name:"Coinevo"},545:{index:"545",hex:"0x80000221",symbol:"SCRIBE",name:"Scribe"},546:{index:"546",hex:"0x80000222",symbol:"HYN",name:"Hyperion"},547:{index:"547",hex:"0x80000223",symbol:"BHP",name:"BHP"},548:{index:"548",hex:"0x80000224",symbol:"BBC",name:"BigBang Core"},549:{index:"549",hex:"0x80000225",symbol:"MKF",name:"MarketFinance"},550:{index:"550",hex:"0x80000226",symbol:"XDC",name:"XinFin"},551:{index:"551",hex:"0x80000227",symbol:"STR",name:"Straightedge"},552:{index:"552",hex:"0x80000228",symbol:"SUM",name:"Sumcoin"},553:{index:"553",hex:"0x80000229",symbol:"HBC",name:"HuobiChain"},555:{index:"555",hex:"0x8000022b",symbol:"BCS",name:"Bitcoin Smart"},556:{index:"556",hex:"0x8000022c",symbol:"KTS",name:"Kratos"},557:{index:"557",hex:"0x8000022d",symbol:"LKR",name:"Lkrcoin"},558:{index:"558",hex:"0x8000022e",symbol:"TAO",name:"Tao"},559:{index:"559",hex:"0x8000022f",symbol:"XWC",name:"Whitecoin"},560:{index:"560",hex:"0x80000230",symbol:"DEAL",name:"DEAL"},561:{index:"561",hex:"0x80000231",symbol:"NTY",name:"Nexty"},562:{index:"562",hex:"0x80000232",symbol:"TOP",name:"TOP NetWork"},564:{index:"564",hex:"0x80000234",symbol:"AG",name:"Agoric"},565:{index:"565",hex:"0x80000235",symbol:"CICO",name:"Coinicles"},566:{index:"566",hex:"0x80000236",symbol:"IRIS",name:"Irisnet"},567:{index:"567",hex:"0x80000237",symbol:"NCG",name:"Nine Chronicles"},568:{index:"568",hex:"0x80000238",symbol:"LRG",name:"Large Coin"},569:{index:"569",hex:"0x80000239",symbol:"SERO",name:"Super Zero Protocol"},570:{index:"570",hex:"0x8000023a",symbol:"BDX",name:"Beldex"},571:{index:"571",hex:"0x8000023b",symbol:"CCXX",name:"Counos X"},572:{index:"572",hex:"0x8000023c",symbol:"SLS",name:"Saluscoin"},573:{index:"573",hex:"0x8000023d",symbol:"SRM",name:"Serum"},575:{index:"575",hex:"0x8000023f",symbol:"VIVT",name:"VIDT Datalink"},576:{index:"576",hex:"0x80000240",symbol:"BPS",name:"BitcoinPoS"},577:{index:"577",hex:"0x80000241",symbol:"NKN",name:"NKN"},578:{index:"578",hex:"0x80000242",symbol:"ICL",name:"ILCOIN"},579:{index:"579",hex:"0x80000243",symbol:"BONO",name:"Bonorum"},580:{index:"580",hex:"0x80000244",symbol:"PLC",name:"PLATINCOIN"},581:{index:"581",hex:"0x80000245",symbol:"DUN",name:"Dune"},582:{index:"582",hex:"0x80000246",symbol:"DMCH",name:"Darmacash"},583:{index:"583",hex:"0x80000247",symbol:"CTC",name:"Creditcoin"},584:{index:"584",hex:"0x80000248",symbol:"KELP",name:"Haidai Network"},585:{index:"585",hex:"0x80000249",symbol:"GBCR",name:"GoldBCR"},586:{index:"586",hex:"0x8000024a",symbol:"XDAG",name:"XDAG"},587:{index:"587",hex:"0x8000024b",symbol:"PRV",name:"Incognito Privacy"},588:{index:"588",hex:"0x8000024c",symbol:"SCAP",name:"SafeCapital"},589:{index:"589",hex:"0x8000024d",symbol:"TFUEL",name:"Theta Fuel"},590:{index:"590",hex:"0x8000024e",symbol:"GTM",name:"Gentarium"},591:{index:"591",hex:"0x8000024f",symbol:"RNL",name:"RentalChain"},592:{index:"592",hex:"0x80000250",symbol:"GRIN",name:"Grin"},593:{index:"593",hex:"0x80000251",symbol:"MWC",name:"MimbleWimbleCoin"},594:{index:"594",hex:"0x80000252",symbol:"DOCK",name:"Dock"},595:{index:"595",hex:"0x80000253",symbol:"POLYX",name:"Polymesh"},596:{index:"596",hex:"0x80000254",symbol:"DIVER",name:"Divergenti"},597:{index:"597",hex:"0x80000255",symbol:"XEP",name:"Electra Protocol"},598:{index:"598",hex:"0x80000256",symbol:"APN",name:"Apron"},599:{index:"599",hex:"0x80000257",symbol:"TFC",name:"Turbo File Coin"},600:{index:"600",hex:"0x80000258",symbol:"UTE",name:"Unit-e"},601:{index:"601",hex:"0x80000259",symbol:"MTC",name:"Metacoin"},602:{index:"602",hex:"0x8000025a",symbol:"NC",name:"NobodyCash"},603:{index:"603",hex:"0x8000025b",symbol:"XINY",name:"Xinyuehu"},604:{index:"604",hex:"0x8000025c",symbol:"DYN",name:"Dynamo"},605:{index:"605",hex:"0x8000025d",symbol:"BUFS",name:"Buffer"},606:{index:"606",hex:"0x8000025e",symbol:"STOS",name:"Stratos"},607:{index:"607",hex:"0x8000025f",symbol:"TON",name:"TON"},608:{index:"608",hex:"0x80000260",symbol:"TAFT",name:"TAFT"},609:{index:"609",hex:"0x80000261",symbol:"HYDRA",name:"HYDRA"},610:{index:"610",hex:"0x80000262",symbol:"NOR",name:"Noir"},611:{index:"611",hex:"0x80000263",symbol:"",name:"Manta Network Private Asset"},612:{index:"612",hex:"0x80000264",symbol:"",name:"Calamari Network Private Asset"},613:{index:"613",hex:"0x80000265",symbol:"WCN",name:"Widecoin"},614:{index:"614",hex:"0x80000266",symbol:"OPT",name:"Optimistic Ethereum"},615:{index:"615",hex:"0x80000267",symbol:"PSWAP",name:"PolkaSwap"},616:{index:"616",hex:"0x80000268",symbol:"VAL",name:"Validator"},617:{index:"617",hex:"0x80000269",symbol:"XOR",name:"Sora"},618:{index:"618",hex:"0x8000026a",symbol:"SSP",name:"SmartShare"},619:{index:"619",hex:"0x8000026b",symbol:"DEI",name:"DeimosX"},621:{index:"621",hex:"0x8000026d",symbol:"ZERO",name:"Singularity"},622:{index:"622",hex:"0x8000026e",symbol:"ALPHA",name:"AlphaDAO"},623:{index:"623",hex:"0x8000026f",symbol:"BDECO",name:"BDCashProtocol Ecosystem"},624:{index:"624",hex:"0x80000270",symbol:"NOBL",name:"Nobility"},625:{index:"625",hex:"0x80000271",symbol:"EAST",name:"Eastcoin"},626:{index:"626",hex:"0x80000272",symbol:"KDA",name:"Kadena"},627:{index:"627",hex:"0x80000273",symbol:"SOUL",name:"Phantasma"},628:{index:"628",hex:"0x80000274",symbol:"LORE",name:"Gitopia"},629:{index:"629",hex:"0x80000275",symbol:"FNR",name:"Fincor"},630:{index:"630",hex:"0x80000276",symbol:"NEXUS",name:"Nexus"},631:{index:"631",hex:"0x80000277",symbol:"QTZ",name:"Quartz"},632:{index:"632",hex:"0x80000278",symbol:"MAS",name:"Massa"},633:{index:"633",hex:"0x80000279",symbol:"CALL",name:"Callchain"},634:{index:"634",hex:"0x8000027a",symbol:"VAL",name:"Validity"},635:{index:"635",hex:"0x8000027b",symbol:"POKT",name:"Pocket Network"},636:{index:"636",hex:"0x8000027c",symbol:"EMIT",name:"EMIT"},637:{index:"637",hex:"0x8000027d",symbol:"APTOS",name:"Aptos"},638:{index:"638",hex:"0x8000027e",symbol:"ADON",name:"ADON"},639:{index:"639",hex:"0x8000027f",symbol:"BTSG",name:"BitSong"},640:{index:"640",hex:"0x80000280",symbol:"LFC",name:"Leofcoin"},641:{index:"641",hex:"0x80000281",symbol:"KCS",name:"KuCoin Shares"},642:{index:"642",hex:"0x80000282",symbol:"KCC",name:"KuCoin Community Chain"},643:{index:"643",hex:"0x80000283",symbol:"AZERO",name:"Aleph Zero"},644:{index:"644",hex:"0x80000284",symbol:"TREE",name:"Tree"},645:{index:"645",hex:"0x80000285",symbol:"LX",name:"Lynx"},646:{index:"646",hex:"0x80000286",symbol:"XLN",name:"Lunarium"},647:{index:"647",hex:"0x80000287",symbol:"CIC",name:"CIC Chain"},648:{index:"648",hex:"0x80000288",symbol:"ZRB",name:"Zarb"},650:{index:"650",hex:"0x8000028a",symbol:"UCO",name:"Archethic"},651:{index:"651",hex:"0x8000028b",symbol:"SFX",name:"Safex Cash"},652:{index:"652",hex:"0x8000028c",symbol:"SFT",name:"Safex Token"},653:{index:"653",hex:"0x8000028d",symbol:"WSFX",name:"Wrapped Safex Cash"},654:{index:"654",hex:"0x8000028e",symbol:"USDG",name:"US Digital Gold"},655:{index:"655",hex:"0x8000028f",symbol:"WMP",name:"WAMP"},656:{index:"656",hex:"0x80000290",symbol:"EKTA",name:"Ekta"},657:{index:"657",hex:"0x80000291",symbol:"YDA",name:"YadaCoin"},658:{index:"658",hex:"0x80000292",symbol:"WHIVE",name:"Whive"},659:{index:"659",hex:"0x80000293",symbol:"KOIN",name:"Koinos"},660:{index:"660",hex:"0x80000294",symbol:"PIRATE",name:"PirateCash"},661:{index:"661",hex:"0x80000295",symbol:"UNQ",name:"Unique"},662:{index:"662",hex:"0x80000296",symbol:"ULM",name:"UltonSmartchain"},663:{index:"663",hex:"0x80000297",symbol:"SFRX",name:"EtherGem Sapphire"},664:{index:"664",hex:"0x80000298",symbol:"BSTY",name:"GlobalBoost-Y"},665:{index:"665",hex:"0x80000299",symbol:"IMP",name:"Impact Protocol"},666:{index:"666",hex:"0x8000029a",symbol:"ACT",name:"Achain"},667:{index:"667",hex:"0x8000029b",symbol:"PRKL",name:"Perkle"},668:{index:"668",hex:"0x8000029c",symbol:"SSC",name:"SelfSell"},669:{index:"669",hex:"0x8000029d",symbol:"GC",name:"GateChain"},670:{index:"670",hex:"0x8000029e",symbol:"PLGR",name:"Pledger"},671:{index:"671",hex:"0x8000029f",symbol:"MPLGR",name:"Pledger"},672:{index:"672",hex:"0x800002a0",symbol:"KNOX",name:"Knox"},673:{index:"673",hex:"0x800002a1",symbol:"ZED",name:"ZED"},674:{index:"674",hex:"0x800002a2",symbol:"CNDL",name:"Candle"},675:{index:"675",hex:"0x800002a3",symbol:"WLKR",name:"Walker Crypto Innovation Index"},676:{index:"676",hex:"0x800002a4",symbol:"WLKRR",name:"Walker"},677:{index:"677",hex:"0x800002a5",symbol:"YUNGE",name:"Yunge"},678:{index:"678",hex:"0x800002a6",symbol:"Voken",name:"Voken"},679:{index:"679",hex:"0x800002a7",symbol:"APL",name:"Apollo"},680:{index:"680",hex:"0x800002a8",symbol:"Evrynet",name:"Evrynet"},681:{index:"681",hex:"0x800002a9",symbol:"NENG",name:"Nengcoin"},682:{index:"682",hex:"0x800002aa",symbol:"CHTA",name:"Cheetahcoin"},683:{index:"683",hex:"0x800002ab",symbol:"ALEO",name:"Aleo Network"},684:{index:"684",hex:"0x800002ac",symbol:"HMS",name:"Hemis"},685:{index:"685",hex:"0x800002ad",symbol:"OAS",name:"Oasys"},686:{index:"686",hex:"0x800002ae",symbol:"KAR",name:"Karura Network"},687:{index:"687",hex:"0x800002af",symbol:"FLON",name:"FullOn Network"},688:{index:"688",hex:"0x800002b0",symbol:"CET",name:"CoinEx Chain"},689:{index:"689",hex:"0x800002b1",symbol:"XLINK",name:"XLink Chain"},690:{index:"690",hex:"0x800002b2",symbol:"KLV",name:"KleverChain"},694:{index:"694",hex:"0x800002b6",symbol:"VTBC",name:"VTB Community"},696:{index:"696",hex:"0x800002b8",symbol:"LUM",name:"Lumos"},698:{index:"698",hex:"0x800002ba",symbol:"VEIL",name:"Veil"},699:{index:"699",hex:"0x800002bb",symbol:"GTB",name:"GotaBit"},700:{index:"700",hex:"0x800002bc",symbol:"XDAI",name:"xDai"},701:{index:"701",hex:"0x800002bd",symbol:"COM",name:"Commercio"},702:{index:"702",hex:"0x800002be",symbol:"CCC",name:"Commercio Cash Credit"},703:{index:"703",hex:"0x800002bf",symbol:"SNR",name:"Sonr"},704:{index:"704",hex:"0x800002c0",symbol:"RAQ",name:"Ra Quantum"},705:{index:"705",hex:"0x800002c1",symbol:"PEG",name:"Pegasus Token"},706:{index:"706",hex:"0x800002c2",symbol:"LKG",name:"Lionking"},707:{index:"707",hex:"0x800002c3",symbol:"MCOIN",name:"Moneta Coin"},709:{index:"709",hex:"0x800002c5",symbol:"AVAIL",name:"Avail"},710:{index:"710",hex:"0x800002c6",symbol:"FURY",name:"Highbury"},711:{index:"711",hex:"0x800002c7",symbol:"CHC",name:"Chaincoin"},712:{index:"712",hex:"0x800002c8",symbol:"SERF",name:"Serfnet"},713:{index:"713",hex:"0x800002c9",symbol:"XTL",name:"Katal Chain"},714:{index:"714",hex:"0x800002ca",symbol:"BNB",name:"Binance"},715:{index:"715",hex:"0x800002cb",symbol:"SIN",name:"Sinovate"},716:{index:"716",hex:"0x800002cc",symbol:"DLN",name:"Delion"},717:{index:"717",hex:"0x800002cd",symbol:"BONTE",name:"Bontecoin"},718:{index:"718",hex:"0x800002ce",symbol:"PEER",name:"Peer"},719:{index:"719",hex:"0x800002cf",symbol:"ZET",name:"Zetacoin"},720:{index:"720",hex:"0x800002d0",symbol:"ABY",name:"Artbyte"},721:{index:"721",hex:"0x800002d1",symbol:"PGX",name:"Mirai Chain"},722:{index:"722",hex:"0x800002d2",symbol:"IL8P",name:"InfiniLooP"},723:{index:"723",hex:"0x800002d3",symbol:"VOI",name:"Voi"},724:{index:"724",hex:"0x800002d4",symbol:"XVC",name:"Vanillacash"},725:{index:"725",hex:"0x800002d5",symbol:"MCX",name:"MultiCash"},727:{index:"727",hex:"0x800002d7",symbol:"BLU",name:"BluCrates"},728:{index:"728",hex:"0x800002d8",symbol:"BFC",name:"BFC"},730:{index:"730",hex:"0x800002da",symbol:"HEALIOS",name:"Tenacity"},731:{index:"731",hex:"0x800002db",symbol:"BMK",name:"Bitmark"},734:{index:"734",hex:"0x800002de",symbol:"DENTX",name:"DENTNet"},737:{index:"737",hex:"0x800002e1",symbol:"ATOP",name:"Financial Blockchain"},738:{index:"738",hex:"0x800002e2",symbol:"BTE",name:"Bitweb"},739:{index:"739",hex:"0x800002e3",symbol:"DPC",name:"Dpowcoin (DualPowCoin)"},747:{index:"747",hex:"0x800002eb",symbol:"CFG",name:"Centrifuge"},750:{index:"750",hex:"0x800002ee",symbol:"XPRT",name:"Persistence"},753:{index:"753",hex:"0x800002f1",symbol:"",name:"Age X25519 Encryption"},754:{index:"754",hex:"0x800002f2",symbol:"",name:"Age NIST Encryption"},757:{index:"757",hex:"0x800002f5",symbol:"HONEY",name:"HoneyWood"},765:{index:"765",hex:"0x800002fd",symbol:"TGN",name:"Tagion"},768:{index:"768",hex:"0x80000300",symbol:"BALLZ",name:"Ballzcoin"},770:{index:"770",hex:"0x80000302",symbol:"COSA",name:"Cosanta"},771:{index:"771",hex:"0x80000303",symbol:"BR",name:"BR"},773:{index:"773",hex:"0x80000305",symbol:"CSB",name:"CosmoBliss"},775:{index:"775",hex:"0x80000307",symbol:"PLSR",name:"Pulsar Coin"},776:{index:"776",hex:"0x80000308",symbol:"KEY",name:"Keymaker Coin"},777:{index:"777",hex:"0x80000309",symbol:"BTW",name:"Bitcoin World"},780:{index:"780",hex:"0x8000030c",symbol:"PLCUC",name:"PLC Ultima Classic"},781:{index:"781",hex:"0x8000030d",symbol:"PLCUX",name:"PLC Ultima X"},782:{index:"782",hex:"0x8000030e",symbol:"PLCU",name:"PLC Ultima"},783:{index:"783",hex:"0x8000030f",symbol:"SMARTBC",name:"SMART Blockchain"},784:{index:"784",hex:"0x80000310",symbol:"SUI",name:"Sui"},786:{index:"786",hex:"0x80000312",symbol:"UIDD",name:"UIDD"},787:{index:"787",hex:"0x80000313",symbol:"ACA",name:"Acala"},788:{index:"788",hex:"0x80000314",symbol:"BNC",name:"Bifrost"},789:{index:"789",hex:"0x80000315",symbol:"TAU",name:"Lamden"},794:{index:"794",hex:"0x8000031a",symbol:"INTR",name:"Interlay"},795:{index:"795",hex:"0x8000031b",symbol:"KINT",name:"Kintsugi"},799:{index:"799",hex:"0x8000031f",symbol:"PDEX",name:"Polkadex"},800:{index:"800",hex:"0x80000320",symbol:"BEET",name:"Beetle Coin"},801:{index:"801",hex:"0x80000321",symbol:"DST",name:"DSTRA"},802:{index:"802",hex:"0x80000322",symbol:"CY",name:"Cyberyen"},803:{index:"803",hex:"0x80000323",symbol:"RYME",name:"Ryme Network"},804:{index:"804",hex:"0x80000324",symbol:"ZKS",name:"zkSync"},805:{index:"805",hex:"0x80000325",symbol:"SCASH",name:"Scash"},808:{index:"808",hex:"0x80000328",symbol:"QVT",name:"Qvolta"},809:{index:"809",hex:"0x80000329",symbol:"SDN",name:"Shiden Network"},810:{index:"810",hex:"0x8000032a",symbol:"ASTR",name:"Astar Network"},813:{index:"813",hex:"0x8000032d",symbol:"MEER",name:"Qitmeer"},815:{index:"815",hex:"0x8000032f",symbol:"FACT",name:"ImFACT"},816:{index:"816",hex:"0x80000330",symbol:"FSC",name:"FSC"},818:{index:"818",hex:"0x80000332",symbol:"VET",name:"VeChain Token"},819:{index:"819",hex:"0x80000333",symbol:"REEF",name:"Reef"},820:{index:"820",hex:"0x80000334",symbol:"CLO",name:"Callisto"},822:{index:"822",hex:"0x80000336",symbol:"BDB",name:"BigchainDB"},824:{index:"824",hex:"0x80000338",symbol:"RBNT",name:"Redbelly Network"},827:{index:"827",hex:"0x8000033b",symbol:"ACE",name:"Endurance"},828:{index:"828",hex:"0x8000033c",symbol:"CCN",name:"ComputeCoin"},829:{index:"829",hex:"0x8000033d",symbol:"BBA",name:"BBACHAIN"},831:{index:"831",hex:"0x8000033f",symbol:"CRUZ",name:"cruzbit"},832:{index:"832",hex:"0x80000340",symbol:"SAPP",name:"Sapphire"},833:{index:"833",hex:"0x80000341",symbol:"777",name:"Jackpot"},834:{index:"834",hex:"0x80000342",symbol:"KYAN",name:"Kyanite"},835:{index:"835",hex:"0x80000343",symbol:"AZR",name:"Azzure"},836:{index:"836",hex:"0x80000344",symbol:"CFL",name:"CryptoFlow"},837:{index:"837",hex:"0x80000345",symbol:"DASHD",name:"Dash Diamond"},838:{index:"838",hex:"0x80000346",symbol:"TRTT",name:"Trittium"},839:{index:"839",hex:"0x80000347",symbol:"UCR",name:"Ultra Clear"},840:{index:"840",hex:"0x80000348",symbol:"PNY",name:"Peony"},841:{index:"841",hex:"0x80000349",symbol:"BECN",name:"Beacon"},842:{index:"842",hex:"0x8000034a",symbol:"MONK",name:"Monk"},843:{index:"843",hex:"0x8000034b",symbol:"SAGA",name:"CryptoSaga"},844:{index:"844",hex:"0x8000034c",symbol:"SUV",name:"Suvereno"},845:{index:"845",hex:"0x8000034d",symbol:"ESK",name:"EskaCoin"},846:{index:"846",hex:"0x8000034e",symbol:"OWO",name:"OneWorld Coin"},847:{index:"847",hex:"0x8000034f",symbol:"PEPS",name:"PEPS Coin"},848:{index:"848",hex:"0x80000350",symbol:"BIR",name:"Birake"},849:{index:"849",hex:"0x80000351",symbol:"MOBIC",name:"MobilityCoin"},850:{index:"850",hex:"0x80000352",symbol:"FLS",name:"Flits"},851:{index:"851",hex:"0x80000353",symbol:"FRECO",name:"Freco"},852:{index:"852",hex:"0x80000354",symbol:"DSM",name:"Desmos"},853:{index:"853",hex:"0x80000355",symbol:"PRCY",name:"PRCY Coin"},858:{index:"858",hex:"0x8000035a",symbol:"HVH",name:"HAVAH"},866:{index:"866",hex:"0x80000362",symbol:"MOB",name:"MobileCoin"},868:{index:"868",hex:"0x80000364",symbol:"IF",name:"Infinitefuture"},877:{index:"877",hex:"0x8000036d",symbol:"NAM",name:"Namada"},878:{index:"878",hex:"0x8000036e",symbol:"SCR",name:"Scorum Network"},880:{index:"880",hex:"0x80000370",symbol:"LUM",name:"Lum Network"},883:{index:"883",hex:"0x80000373",symbol:"ZBC",name:"ZooBC"},886:{index:"886",hex:"0x80000376",symbol:"ADF",name:"AD Token"},888:{index:"888",hex:"0x80000378",symbol:"NEO",name:"NEO"},889:{index:"889",hex:"0x80000379",symbol:"TOMO",name:"TOMO"},890:{index:"890",hex:"0x8000037a",symbol:"XSEL",name:"Seln"},896:{index:"896",hex:"0x80000380",symbol:"LKSC",name:"LKSCoin"},898:{index:"898",hex:"0x80000382",symbol:"AS",name:"Assetchain"},899:{index:"899",hex:"0x80000383",symbol:"XEC",name:"eCash"},900:{index:"900",hex:"0x80000384",symbol:"LMO",name:"Lumeneo"},901:{index:"901",hex:"0x80000385",symbol:"NXT",name:"NxtMeta"},904:{index:"904",hex:"0x80000388",symbol:"HNT",name:"Helium"},907:{index:"907",hex:"0x8000038b",symbol:"FIS",name:"StaFi"},909:{index:"909",hex:"0x8000038d",symbol:"SGE",name:"Saage"},911:{index:"911",hex:"0x8000038f",symbol:"GERT",name:"Gert"},913:{index:"913",hex:"0x80000391",symbol:"VARA",name:"Vara Network"},916:{index:"916",hex:"0x80000394",symbol:"META",name:"Metadium"},917:{index:"917",hex:"0x80000395",symbol:"FRA",name:"Findora"},919:{index:"919",hex:"0x80000397",symbol:"CCD",name:"Concordium"},921:{index:"921",hex:"0x80000399",symbol:"AVN",name:"Avian Network"},925:{index:"925",hex:"0x8000039d",symbol:"DIP",name:"Dipper Network"},928:{index:"928",hex:"0x800003a0",symbol:"GHM",name:"HermitMatrixNetwork"},931:{index:"931",hex:"0x800003a3",symbol:"RUNE",name:"THORChain (RUNE)"},938:{index:"938",hex:"0x800003aa",symbol:"MGO",name:"Mango Network"},939:{index:"939",hex:"0x800003ab",symbol:"AB",name:"Argot Protocol"},942:{index:"942",hex:"0x800003ae",symbol:"KCN",name:"Kylacoin"},943:{index:"943",hex:"0x800003af",symbol:"LCN",name:"Lyncoin"},945:{index:"945",hex:"0x800003b1",symbol:"UNLOCK",name:"Jasiri protocol"},955:{index:"955",hex:"0x800003bb",symbol:"LTP",name:"LifetionCoin"},958:{index:"958",hex:"0x800003be",symbol:"",name:"KickSoccer"},960:{index:"960",hex:"0x800003c0",symbol:"VKAX",name:"Vkax"},966:{index:"966",hex:"0x800003c6",symbol:"MATIC",name:"Matic"},968:{index:"968",hex:"0x800003c8",symbol:"UNW",name:"UNW"},969:{index:"969",hex:"0x800003c9",symbol:"QI",name:"Quai Network"},970:{index:"970",hex:"0x800003ca",symbol:"TWINS",name:"TWINS"},977:{index:"977",hex:"0x800003d1",symbol:"TLOS",name:"Telos"},981:{index:"981",hex:"0x800003d5",symbol:"TAFECO",name:"Taf ECO Chain"},985:{index:"985",hex:"0x800003d9",symbol:"AU",name:"Autonomy"},987:{index:"987",hex:"0x800003db",symbol:"VCG",name:"VipCoin"},988:{index:"988",hex:"0x800003dc",symbol:"XAZAB",name:"Xazab core"},989:{index:"989",hex:"0x800003dd",symbol:"AIOZ",name:"AIOZ"},990:{index:"990",hex:"0x800003de",symbol:"CORE",name:"Coreum"},991:{index:"991",hex:"0x800003df",symbol:"PEC",name:"Phoenix"},992:{index:"992",hex:"0x800003e0",symbol:"UNT",name:"Unit"},993:{index:"993",hex:"0x800003e1",symbol:"XRB",name:"X Currency"},994:{index:"994",hex:"0x800003e2",symbol:"QUAI",name:"Quai Network"},995:{index:"995",hex:"0x800003e3",symbol:"CAPS",name:"Ternoa"},996:{index:"996",hex:"0x800003e4",symbol:"OKT",name:"OKChain Token"},997:{index:"997",hex:"0x800003e5",symbol:"SUM",name:"Solidum"},998:{index:"998",hex:"0x800003e6",symbol:"LBTC",name:"Lightning Bitcoin"},999:{index:"999",hex:"0x800003e7",symbol:"BCD",name:"Bitcoin Diamond"},1e3:{index:"1000",hex:"0x800003e8",symbol:"BTN",name:"Bitcoin New"},1001:{index:"1001",hex:"0x800003e9",symbol:"TT",name:"ThunderCore"},1002:{index:"1002",hex:"0x800003ea",symbol:"BKT",name:"BanKitt"},1003:{index:"1003",hex:"0x800003eb",symbol:"NODL",name:"Nodle"},1004:{index:"1004",hex:"0x800003ec",symbol:"PCOIN",name:"PCOIN"},1005:{index:"1005",hex:"0x800003ed",symbol:"TAO",name:"Bittensor"},1006:{index:"1006",hex:"0x800003ee",symbol:"HSK",name:"HashKey Chain"},1007:{index:"1007",hex:"0x800003ef",symbol:"FTM",name:"Fantom"},1008:{index:"1008",hex:"0x800003f0",symbol:"RPG",name:"RPG"},1009:{index:"1009",hex:"0x800003f1",symbol:"LAKE",name:"iconLake"},1010:{index:"1010",hex:"0x800003f2",symbol:"HT",name:"Huobi ECO Chain"},1011:{index:"1011",hex:"0x800003f3",symbol:"ELV",name:"Eluvio"},1012:{index:"1012",hex:"0x800003f4",symbol:"JOC",name:"Japan Open Chain"},1013:{index:"1013",hex:"0x800003f5",symbol:"BIC",name:"Beincrypto"},1014:{index:"1014",hex:"0x800003f6",symbol:"JOY",name:"Joystream"},1015:{index:"1015",hex:"0x800003f7",symbol:"ZCX",name:"ZEN Exchange Token"},1020:{index:"1020",hex:"0x800003fc",symbol:"EVC",name:"Evrice"},1022:{index:"1022",hex:"0x800003fe",symbol:"XRD",name:"Radix DLT"},1023:{index:"1023",hex:"0x800003ff",symbol:"ONE",name:"HARMONY-ONE (Legacy)"},1024:{index:"1024",hex:"0x80000400",symbol:"ONT",name:"Ontology"},1025:{index:"1025",hex:"0x80000401",symbol:"CZZ",name:"Classzz"},1026:{index:"1026",hex:"0x80000402",symbol:"KEX",name:"Kira Exchange Token"},1027:{index:"1027",hex:"0x80000403",symbol:"MCM",name:"Mochimo"},1028:{index:"1028",hex:"0x80000404",symbol:"PLS",name:"Pulse Coin"},1032:{index:"1032",hex:"0x80000408",symbol:"BTCR",name:"BTCR"},1042:{index:"1042",hex:"0x80000412",symbol:"MFID",name:"Moonfish ID"},1111:{index:"1111",hex:"0x80000457",symbol:"BBC",name:"Big Bitcoin"},1116:{index:"1116",hex:"0x8000045c",symbol:"CORE",name:"Core"},1120:{index:"1120",hex:"0x80000460",symbol:"RISE",name:"RISE"},1122:{index:"1122",hex:"0x80000462",symbol:"CMT",name:"CyberMiles Token"},1128:{index:"1128",hex:"0x80000468",symbol:"ETSC",name:"Ethereum Social"},1129:{index:"1129",hex:"0x80000469",symbol:"DFI",name:"DeFiChain"},1130:{index:"1130",hex:"0x8000046a",symbol:"DFI",name:"DeFiChain EVM Network"},1137:{index:"1137",hex:"0x80000471",symbol:"$DAG",name:"Constellation Labs"},1145:{index:"1145",hex:"0x80000479",symbol:"CDY",name:"Bitcoin Candy"},1155:{index:"1155",hex:"0x80000483",symbol:"ENJ",name:"Enjin Coin"},1170:{index:"1170",hex:"0x80000492",symbol:"HOO",name:"Hoo Smart Chain"},1234:{index:"1234",hex:"0x800004d2",symbol:"ALPH",name:"Alephium"},1236:{index:"1236",hex:"0x800004d4",symbol:"",name:"Masca"},1237:{index:"1237",hex:"0x800004d5",symbol:"",name:"Nostr"},1280:{index:"1280",hex:"0x80000500",symbol:"",name:"Kudos Setler"},1284:{index:"1284",hex:"0x80000504",symbol:"GLMR",name:"Moonbeam"},1285:{index:"1285",hex:"0x80000505",symbol:"MOVR",name:"Moonriver"},1286:{index:"1286",hex:"0x80000506",symbol:"DSG",name:"Dessage Social Protocol"},1298:{index:"1298",hex:"0x80000512",symbol:"WPC",name:"Wpc"},1308:{index:"1308",hex:"0x8000051c",symbol:"WEI",name:"WEI"},1312:{index:"1312",hex:"0x80000520",symbol:"BITS",name:"Entropy"},1337:{index:"1337",hex:"0x80000539",symbol:"DFC",name:"Defcoin"},1338:{index:"1338",hex:"0x8000053a",symbol:"IRON",name:"Iron Fish"},1348:{index:"1348",hex:"0x80000544",symbol:"ISLM",name:"IslamicCoin"},1397:{index:"1397",hex:"0x80000575",symbol:"HYC",name:"Hycon"},1410:{index:"1410",hex:"0x80000582",symbol:"TENTSLP",name:"TENT Simple Ledger Protocol"},1510:{index:"1510",hex:"0x800005e6",symbol:"XSC",name:"XT Smart Chain"},1512:{index:"1512",hex:"0x800005e8",symbol:"AAC",name:"Double-A Chain"},1524:{index:"1524",hex:"0x800005f4",symbol:"",name:"Taler"},1533:{index:"1533",hex:"0x800005fd",symbol:"BEAM",name:"Beam"},1536:{index:"1536",hex:"0x80000600",symbol:"GAS",name:"BubiChain"},1540:{index:"1540",hex:"0x80000604",symbol:"ATHENA",name:"Athena"},1551:{index:"1551",hex:"0x8000060f",symbol:"SDK",name:"Sovereign SDK"},1555:{index:"1555",hex:"0x80000613",symbol:"APC",name:"Apc Chain"},1616:{index:"1616",hex:"0x80000650",symbol:"ELF",name:"AELF"},1618:{index:"1618",hex:"0x80000652",symbol:"AUDL",name:"AUDL"},1620:{index:"1620",hex:"0x80000654",symbol:"ATH",name:"Atheios"},1627:{index:"1627",hex:"0x8000065b",symbol:"LUME",name:"Lume Web"},1642:{index:"1642",hex:"0x8000066a",symbol:"NEW",name:"Newton"},1657:{index:"1657",hex:"0x80000679",symbol:"BTA",name:"Btachain"},1668:{index:"1668",hex:"0x80000684",symbol:"NEOX",name:"Neoxa"},1669:{index:"1669",hex:"0x80000685",symbol:"MEWC",name:"Meowcoin"},1688:{index:"1688",hex:"0x80000698",symbol:"BCX",name:"BitcoinX"},1729:{index:"1729",hex:"0x800006c1",symbol:"XTZ",name:"Tezos"},1776:{index:"1776",hex:"0x800006f0",symbol:"LBTC",name:"Liquid BTC"},1777:{index:"1777",hex:"0x800006f1",symbol:"BBP",name:"Biblepay"},1784:{index:"1784",hex:"0x800006f8",symbol:"JPYS",name:"JPY Stablecoin"},1789:{index:"1789",hex:"0x800006fd",symbol:"VEGA",name:"Vega Protocol"},1815:{index:"1815",hex:"0x80000717",symbol:"ADA",name:"Cardano"},1818:{index:"1818",hex:"0x8000071a",symbol:"CUBE",name:"Cube Chain Native Token"},1856:{index:"1856",hex:"0x80000743",symbol:"TES",name:"Teslacoin"},1888:{index:"1888",hex:"0x80000760",symbol:"ZTX",name:"Zetrix"},1899:{index:"1899",hex:"0x8000076b",symbol:"XEC",name:"eCash token"},1900:{index:"1900",hex:"0x8000076c",symbol:"XNA",name:"Neurai"},1901:{index:"1901",hex:"0x8000076d",symbol:"CLC",name:"Classica"},1907:{index:"1907",hex:"0x80000773",symbol:"BITCI",name:"Bitcicoin"},1919:{index:"1919",hex:"0x8000077f",symbol:"VIPS",name:"VIPSTARCOIN"},1926:{index:"1926",hex:"0x80000786",symbol:"CITY",name:"City Coin"},1951:{index:"1951",hex:"0x8000079f",symbol:"ESA",name:"Esa"},1952:{index:"1952",hex:"0x800007a0",symbol:"ESC",name:"EsaCoin"},1955:{index:"1955",hex:"0x800007a3",symbol:"XX",name:"xx coin"},1977:{index:"1977",hex:"0x800007b9",symbol:"XMX",name:"Xuma"},1984:{index:"1984",hex:"0x800007c0",symbol:"TRTL",name:"TurtleCoin"},1985:{index:"1985",hex:"0x800007c1",symbol:"SLRT",name:"Solarti Chain"},1986:{index:"1986",hex:"0x800007c2",symbol:"QTH",name:"Qing Tong Horizon"},1987:{index:"1987",hex:"0x800007c3",symbol:"EGEM",name:"EtherGem"},1988:{index:"1988",hex:"0x800007c4",symbol:"MIRA",name:"Mira Chain"},1989:{index:"1989",hex:"0x800007c5",symbol:"HODL",name:"HOdlcoin"},1990:{index:"1990",hex:"0x800007c6",symbol:"PHL",name:"Placeholders"},1991:{index:"1991",hex:"0x800007c7",symbol:"SC",name:"Sia"},1996:{index:"1996",hex:"0x800007cc",symbol:"MYT",name:"Mineyourtime"},1997:{index:"1997",hex:"0x800007cd",symbol:"POLIS",name:"Polis"},1998:{index:"1998",hex:"0x800007ce",symbol:"XMCC",name:"Monoeci"},1999:{index:"1999",hex:"0x800007cf",symbol:"COLX",name:"ColossusXT"},2e3:{index:"2000",hex:"0x800007d0",symbol:"GIN",name:"GinCoin"},2001:{index:"2001",hex:"0x800007d1",symbol:"MNP",name:"MNPCoin"},2002:{index:"2002",hex:"0x800007d2",symbol:"MLN",name:"Miraland"},2015:{index:"2015",hex:"0x800007df",symbol:"TEER",name:"Integritee"},2017:{index:"2017",hex:"0x800007e1",symbol:"KIN",name:"Kin"},2018:{index:"2018",hex:"0x800007e2",symbol:"EOSC",name:"EOSClassic"},2019:{index:"2019",hex:"0x800007e3",symbol:"GBT",name:"GoldBean Token"},2020:{index:"2020",hex:"0x800007e4",symbol:"PKC",name:"PKC"},2021:{index:"2021",hex:"0x800007e5",symbol:"SKT",name:"Sukhavati"},2022:{index:"2022",hex:"0x800007e6",symbol:"XHT",name:"Xinghuo Token"},2023:{index:"2023",hex:"0x800007e7",symbol:"COC",name:"Chat On Chain"},2024:{index:"2024",hex:"0x800007e8",symbol:"USBC",name:"Universal Ledger USBC"},2025:{index:"2025",hex:"0x800007e9",symbol:"ROCK",name:"Zenrock Labs"},2026:{index:"2026",hex:"0x800007ea",symbol:"ASTRON",name:"ASTRON Token"},2046:{index:"2046",hex:"0x800007fe",symbol:"ANY",name:"Any"},2048:{index:"2048",hex:"0x80000800",symbol:"MCASH",name:"MCashChain"},2049:{index:"2049",hex:"0x80000801",symbol:"TRUE",name:"TrueChain"},2050:{index:"2050",hex:"0x80000802",symbol:"MOVO",name:"Movo Smart Chain"},2086:{index:"2086",hex:"0x80000826",symbol:"KILT",name:"KILT Spiritnet"},2091:{index:"2091",hex:"0x8000082b",symbol:"FRQCY",name:"Frequency"},2109:{index:"2109",hex:"0x8000083d",symbol:"SAMA",name:"Exosama Network"},2112:{index:"2112",hex:"0x80000840",symbol:"IoTE",name:"IoTE"},2125:{index:"2125",hex:"0x8000084d",symbol:"BAY",name:"BitBay"},2137:{index:"2137",hex:"0x80000859",symbol:"XRG",name:"Ergon"},2199:{index:"2199",hex:"0x80000897",symbol:"SAMA",name:"Moonsama Network"},2221:{index:"2221",hex:"0x800008ad",symbol:"ASK",name:"ASK"},2222:{index:"2222",hex:"0x800008ae",symbol:"CWEB",name:"Coinweb"},2285:{index:"2285",hex:"0x800008ed",symbol:"",name:"Qiyi Chain"},2301:{index:"2301",hex:"0x800008fd",symbol:"QTUM",name:"QTUM"},2302:{index:"2302",hex:"0x800008fe",symbol:"ETP",name:"Metaverse"},2303:{index:"2303",hex:"0x800008ff",symbol:"GXC",name:"GXChain"},2304:{index:"2304",hex:"0x80000900",symbol:"CRP",name:"CranePay"},2305:{index:"2305",hex:"0x80000901",symbol:"ELA",name:"Elastos"},2338:{index:"2338",hex:"0x80000922",symbol:"SNOW",name:"Snowblossom"},2365:{index:"2365",hex:"0x8000093d",symbol:"XIN",name:"Mixin"},2500:{index:"2500",hex:"0x800009c4",symbol:"NEXI",name:"Nexi"},2570:{index:"2570",hex:"0x80000a0a",symbol:"AOA",name:"Aurora"},2686:{index:"2686",hex:"0x80000a7e",symbol:"AIPG",name:"AIPowerGrid"},2718:{index:"2718",hex:"0x80000a9e",symbol:"NAS",name:"Nebulas"},2809:{index:"2809",hex:"0x80000af9",symbol:"LAN",name:"Lanify"},2894:{index:"2894",hex:"0x80000b4e",symbol:"REOSC",name:"REOSC Ecosystem"},2941:{index:"2941",hex:"0x80000b7d",symbol:"BND",name:"Blocknode"},3e3:{index:"3000",hex:"0x80000bb8",symbol:"SM",name:"Stealth Message"},3003:{index:"3003",hex:"0x80000bbb",symbol:"LUX",name:"LUX"},3030:{index:"3030",hex:"0x80000bd6",symbol:"HBAR",name:"Hedera HBAR"},3077:{index:"3077",hex:"0x80000c05",symbol:"COS",name:"Contentos"},3276:{index:"3276",hex:"0x80000ccc",symbol:"CCC",name:"CodeChain"},3333:{index:"3333",hex:"0x80000d05",symbol:"SXP",name:"Solar"},3338:{index:"3338",hex:"0x80000d0a",symbol:"PEAQ",name:"peaq"},3344:{index:"3344",hex:"0x80000d10",symbol:"PLMC",name:"Polimec"},3377:{index:"3377",hex:"0x80000d31",symbol:"ROI",name:"ROIcoin"},3381:{index:"3381",hex:"0x80000d35",symbol:"DYN",name:"Dynamic"},3383:{index:"3383",hex:"0x80000d37",symbol:"SEQ",name:"Sequence"},3434:{index:"3434",hex:"0x80000d6a",symbol:"PEPE",name:"Pepecoin Core"},3501:{index:"3501",hex:"0x80000dad",symbol:"JFIN",name:"JFIN Coin"},3552:{index:"3552",hex:"0x80000de0",symbol:"DEO",name:"Destocoin"},3564:{index:"3564",hex:"0x80000dec",symbol:"DST",name:"DeStream"},3601:{index:"3601",hex:"0x80000e11",symbol:"CY",name:"Cybits"},3757:{index:"3757",hex:"0x80000ead",symbol:"MPC",name:"Partisia Blockchain"},3840:{index:"3840",hex:"0x80000f00",symbol:"RED",name:"ReDeFi RED"},4040:{index:"4040",hex:"0x80000fc8",symbol:"FC8",name:"FCH Network"},4096:{index:"4096",hex:"0x80001000",symbol:"YEE",name:"YeeCo"},4218:{index:"4218",hex:"0x8000107a",symbol:"IOTA",name:"IOTA"},4219:{index:"4219",hex:"0x8000107b",symbol:"SMR",name:"Shimmer"},4242:{index:"4242",hex:"0x80001092",symbol:"AXE",name:"Axe"},4343:{index:"4343",hex:"0x800010f7",symbol:"XYM",name:"Symbol"},4444:{index:"4444",hex:"0x8000115c",symbol:"C4E",name:"Chain4Energy"},4919:{index:"4919",hex:"0x80001337",symbol:"XVM",name:"Venidium"},4999:{index:"4999",hex:"0x80001387",symbol:"BXN",name:"BlackFort Exchange Network"},5e3:{index:"5000",hex:"0x80001388",symbol:"V12",name:"Vet The Vote"},5006:{index:"5006",hex:"0x8000138e",symbol:"SBC",name:"Senior Blockchain"},5248:{index:"5248",hex:"0x80001480",symbol:"FIC",name:"FIC"},5353:{index:"5353",hex:"0x800014e9",symbol:"HNS",name:"Handshake"},5404:{index:"5404",hex:"0x8000151c",symbol:"ISK",name:"ISKRA"},5467:{index:"5467",hex:"0x8000155b",symbol:"ALTME",name:"ALTME"},5555:{index:"5555",hex:"0x800015b3",symbol:"FUND",name:"Unification"},5757:{index:"5757",hex:"0x8000167d",symbol:"STX",name:"Stacks"},5895:{index:"5895",hex:"0x80001707",symbol:"VOW",name:"VowChain VOW"},5920:{index:"5920",hex:"0x80001720",symbol:"SLU",name:"SILUBIUM"},5995:{index:"5995",hex:"0x8000176B",symbol:"DUSK",name:"Dusk Network"},6060:{index:"6060",hex:"0x800017ac",symbol:"GO",name:"GoChain GO"},6144:{index:"6144",hex:"0x80001800",symbol:"DTS",name:"Datos"},6174:{index:"6174",hex:"0x8000181e",symbol:"MOI",name:"My Own Internet"},6278:{index:"6278",hex:"0x80001886",symbol:"STEAMX",name:"Rails Network Mainnet"},6532:{index:"6532",hex:"0x80001984",symbol:"UM",name:"Penumbra"},6599:{index:"6599",hex:"0x800019c7",symbol:"RSC",name:"Royal Sports City"},6666:{index:"6666",hex:"0x80001a0a",symbol:"BPA",name:"Bitcoin Pizza"},6688:{index:"6688",hex:"0x80001a20",symbol:"SAFE",name:"SAFE"},6779:{index:"6779",hex:"0x80001a7b",symbol:"COTI",name:"COTI"},6969:{index:"6969",hex:"0x80001b39",symbol:"ROGER",name:"TheHolyrogerCoin"},7e3:{index:"7000",hex:"0x80001b58",symbol:"ZETA",name:"ZetaChain"},7027:{index:"7027",hex:"0x80001b73",symbol:"ELLA",name:"Ella the heart"},7028:{index:"7028",hex:"0x80001b74",symbol:"AA",name:"Arthera"},7091:{index:"7091",hex:"0x80001bb3",symbol:"TOPL",name:"Topl"},7331:{index:"7331",hex:"0x80001ca3",symbol:"KLY",name:"KLYNTAR"},7341:{index:"7341",hex:"0x80001cad",symbol:"SHFT",name:"Shyft"},7518:{index:"7518",hex:"0x80001d5e",symbol:"MEV",name:"MEVerse"},7576:{index:"7576",hex:"0x80001d98",symbol:"ADIL",name:"ADIL Chain"},7777:{index:"7777",hex:"0x80001e61",symbol:"BTV",name:"Bitvote"},7779:{index:"7779",hex:"0x80001e63",symbol:"CPV",name:"Compverse"},8e3:{index:"8000",hex:"0x80001f40",symbol:"SKY",name:"Skycoin"},8017:{index:"8017",hex:"0x80001f51",symbol:"ISC",name:"iSunCoin"},8080:{index:"8080",hex:"0x80001f90",symbol:"",name:"DSRV"},8181:{index:"8181",hex:"0x80001ff5",symbol:"BOC",name:"BeOne Chain"},8192:{index:"8192",hex:"0x80002000",symbol:"PAC",name:"pacprotocol"},8217:{index:"8217",hex:"0x80002019",symbol:"KLAY",name:"KLAY"},8339:{index:"8339",hex:"0x80002093",symbol:"BTQ",name:"BitcoinQuark"},8444:{index:"8444",hex:"0x800020fc",symbol:"XCH",name:"Chia"},8453:{index:"8453",hex:"0x80002105",symbol:"",name:"Base"},8680:{index:"8680",hex:"0x800021e8",symbol:"PLMNT",name:"Planetmint"},8732:{index:"8732",hex:"0x8000221c",symbol:"BLN",name:"Bullions"},8866:{index:"8866",hex:"0x800022a2",symbol:"GGX",name:"Golden Gate"},8886:{index:"8886",hex:"0x800022b6",symbol:"GGXT",name:"Golden Gate Sydney"},8888:{index:"8888",hex:"0x800022b8",symbol:"SBTC",name:"Super Bitcoin"},8964:{index:"8964",hex:"0x80002304",symbol:"NULS",name:"NULS"},8997:{index:"8997",hex:"0x80002325",symbol:"BBC",name:"Babacoin"},8998:{index:"8998",hex:"0x80002326",symbol:"JGC",name:"JagoanCoin"},8999:{index:"8999",hex:"0x80002327",symbol:"BTP",name:"Bitcoin Pay"},9e3:{index:"9000",hex:"0x80002328",symbol:"AVAX",name:"Avalanche"},9001:{index:"9001",hex:"0x80002329",symbol:"ARB1",name:"Arbitrum"},9002:{index:"9002",hex:"0x8000232a",symbol:"BOBA",name:"Boba"},9003:{index:"9003",hex:"0x8000232b",symbol:"LOOP",name:"Loopring"},9004:{index:"9004",hex:"0x8000232c",symbol:"STRK",name:"StarkNet"},9005:{index:"9005",hex:"0x8000232d",symbol:"AVAXC",name:"Avalanche C-Chain"},9006:{index:"9006",hex:"0x8000232e",symbol:"BSC",name:"Binance Smart Chain"},9797:{index:"9797",hex:"0x80002645",symbol:"NRG",name:"Energi"},9888:{index:"9888",hex:"0x800026a0",symbol:"BTF",name:"Bitcoin Faith"},9999:{index:"9999",hex:"0x8000270f",symbol:"GOD",name:"Bitcoin God"},1e4:{index:"10000",hex:"0x80002710",symbol:"FO",name:"FIBOS"},10001:{index:"10001",hex:"0x80002711",symbol:"SPACE",name:"Space"},10111:{index:"10111",hex:"0x8000277f",symbol:"DHP",name:"dHealth"},10226:{index:"10226",hex:"0x800027f2",symbol:"RTM",name:"Raptoreum"},10242:{index:"10242",hex:"0x80002802",symbol:"AA",name:"Arthera"},10291:{index:"10291",hex:"0x80002833",symbol:"XRC",name:"XRhodium"},10507:{index:"10507",hex:"0x8000290b",symbol:"NUM",name:"Numbers Protocol"},10605:{index:"10605",hex:"0x8000296d",symbol:"XPI",name:"Lotus"},11111:{index:"11111",hex:"0x80002b67",symbol:"ESS",name:"Essentia One"},11742:{index:"11742",hex:"0x80002dde",symbol:"VARCH",name:"InvArch"},11743:{index:"11743",hex:"0x80002ddf",symbol:"TNKR",name:"Tinkernet"},12345:{index:"12345",hex:"0x80003039",symbol:"IPOS",name:"IPOS"},12586:{index:"12586",hex:"0x8000312a",symbol:"MINA",name:"Mina"},13107:{index:"13107",hex:"0x80003333",symbol:"BTY",name:"BitYuan"},13108:{index:"13108",hex:"0x80003334",symbol:"YCC",name:"Yuan Chain Coin"},13381:{index:"13381",hex:"0x80003445",symbol:"PHX",name:"Phoenix"},14001:{index:"14001",hex:"0x800036b1",symbol:"WAX",name:"Worldwide Asset Exchange"},15845:{index:"15845",hex:"0x80003de5",symbol:"SDGO",name:"SanDeGo"},16181:{index:"16181",hex:"0x80003f35",symbol:"XTX",name:"Totem Live Network"},16754:{index:"16754",hex:"0x80004172",symbol:"ARDR",name:"Ardor"},18e3:{index:"18000",hex:"0x80004650",symbol:"MTR",name:"Meter"},19165:{index:"19165",hex:"0x80004add",symbol:"SAFE",name:"Safecoin"},19167:{index:"19167",hex:"0x80004adf",symbol:"FLUX",name:"Flux"},19169:{index:"19169",hex:"0x80004ae1",symbol:"RITO",name:"Ritocoin"},19788:{index:"19788",hex:"0x80004d4c",symbol:"ML",name:"Mintlayer"},20036:{index:"20036",hex:"0x80004e44",symbol:"XND",name:"ndau"},21004:{index:"21004",hex:"0x8000520c",symbol:"C4EI",name:"c4ei"},21337:{index:"21337",hex:"0x80005359",symbol:"XAH",name:"Xahau"},21888:{index:"21888",hex:"0x80005580",symbol:"PAC",name:"Pactus"},22504:{index:"22504",hex:"0x800057e8",symbol:"PWR",name:"PWRcoin"},23e3:{index:"23000",hex:"0x800059d8",symbol:"EPIC",name:"Epic Cash"},25252:{index:"25252",hex:"0x800062a4",symbol:"BELL",name:"Bellcoin"},25718:{index:"25718",hex:"0x80006476",symbol:"CHX",name:"Own"},26417:{index:"26417",hex:"0x80006731",symbol:"G1",name:"Äž1"},29223:{index:"29223",hex:"0x80007227",symbol:"NEXA",name:"Nexa"},31102:{index:"31102",hex:"0x8000797e",symbol:"ESN",name:"EtherSocial Network"},31337:{index:"31337",hex:"0x80007a69",symbol:"",name:"ThePower"},33416:{index:"33416",hex:"0x80008288",symbol:"TEO",name:"Trust Eth reOrigin"},33878:{index:"33878",hex:"0x80008456",symbol:"BTCS",name:"Bitcoin Stake"},34952:{index:"34952",hex:"0x80008888",symbol:"BTT",name:"ByteTrade"},37992:{index:"37992",hex:"0x80009468",symbol:"FXTC",name:"FixedTradeCoin"},39321:{index:"39321",hex:"0x80009999",symbol:"AMA",name:"Amabig"},42069:{index:"42069",hex:"0x8000a455",symbol:"FACT",name:"FACT0RN"},43028:{index:"43028",hex:"0x8000a814",symbol:"AXIV",name:"AXIV"},47803:{index:"47803",hex:"0x8000babb",symbol:"BAX",name:"BAX"},49262:{index:"49262",hex:"0x8000c06e",symbol:"EVE",name:"evan"},49344:{index:"49344",hex:"0x8000c0c0",symbol:"STASH",name:"STASH"},52752:{index:"52752",hex:"0x8000ce10",symbol:"CELO",name:"Celo"},54176:{index:"54176",hex:"0x8000d3a0",symbol:"OVER",name:"OverProtocol"},61616:{index:"61616",hex:"0x8000f0b0",symbol:"TH",name:"TianHe"},65536:{index:"65536",hex:"0x80010000",symbol:"KETH",name:"Krypton World"},69420:{index:"69420",hex:"0x80010f2c",symbol:"GRLC",name:"Garlicoin"},70007:{index:"70007",hex:"0x80011177",symbol:"GWL",name:"Gewel"},77777:{index:"77777",hex:"0x80012fd1",symbol:"ZYN",name:"Wethio"},83293:{index:"83293",hex:"0x8001455d",symbol:"QUBIC",name:"Qubic"},88888:{index:"88888",hex:"0x80015b38",symbol:"RYO",name:"c0ban"},99999:{index:"99999",hex:"0x8001869f",symbol:"WICC",name:"Waykichain"},100500:{index:"100500",hex:"0x80018894",symbol:"HOME",name:"HomeCoin"},101010:{index:"101010",hex:"0x80018a92",symbol:"STC",name:"Starcoin"},104109:{index:"104109",hex:"0x800196ad",symbol:"",name:"Seed Hypermedia"},105105:{index:"105105",hex:"0x80019a91",symbol:"STRAX",name:"Strax"},111111:{index:"111111",hex:"0x8001b207",symbol:"KAS",name:"Kaspa"},121337:{index:"121337",hex:"0x8001d9f9",symbol:"KLS",name:"Karlsen"},123456:{index:"123456",hex:"0x8001e240",symbol:"SPR",name:"Spectre"},130822:{index:"130822",hex:"0x8001ff06",symbol:"WBT",name:"WhiteBIT Coin"},161803:{index:"161803",hex:"0x8002780b",symbol:"APTA",name:"Bloqs4Good"},200625:{index:"200625",hex:"0x80030fb1",symbol:"AKA",name:"Akroma"},200901:{index:"200901",hex:"0x800310c5",symbol:"BTR",name:"Bitlayer"},224433:{index:"224433",hex:"0x80036cb1",symbol:"CONET",name:"CONET Holesky Network"},246529:{index:"246529",hex:"0x8003c301",symbol:"ATS",name:"ARTIS sigma1"},261131:{index:"261131",hex:"0x8003fc0b",symbol:"ZAMA",name:"Zama"},314159:{index:"314159",hex:"0x8004cb2f",symbol:"PI",name:"Pi Network"},333332:{index:"333332",hex:"0x80051614",symbol:"VALUE",name:"Value Chain"},333333:{index:"333333",hex:"0x80051615",symbol:"3333",name:"Pi Value Consensus"},424242:{index:"424242",hex:"0x80067932",symbol:"X42",name:"x42"},534352:{index:"534352",hex:"0x80082750",symbol:"SCR",name:"Scroll"},666666:{index:"666666",hex:"0x800a2c2a",symbol:"VITE",name:"Vite"},696365:{index:"696365",hex:"0x800b3206",symbol:"ICE",name:"Ice Network"},888888:{index:"888888",hex:"0x800d9038",symbol:"SEA",name:"Second Exchange Alliance"},999999:{index:"999999",hex:"0x800c9061",symbol:"WTC",name:"WaltonChain"},1048576:{index:"1048576",hex:"0x80100000",symbol:"AMAX",name:"Armonia Meta Chain"},1171337:{index:"1171337",hex:"0x8011df89",symbol:"ILT",name:"iOlite"},1313114:{index:"1313114",hex:"0x8014095a",symbol:"ETHO",name:"Etho Protocol"},1313500:{index:"1313500",hex:"0x80140adc",symbol:"XERO",name:"Xerom"},1712144:{index:"1712144",hex:"0x801a2010",symbol:"LAX",name:"LAPO"},3924011:{index:"3924011",hex:"0x803be02b",symbol:"EPK",name:"EPIK Protocol"},4741444:{index:"4741444",hex:"0x80485944",symbol:"HYD",name:"Hydra Token"},5249353:{index:"5249353",hex:"0x80501949",symbol:"BCO",name:"BitcoinOre"},5249354:{index:"5249354",hex:"0x8050194a",symbol:"BHD",name:"BitcoinHD"},5264462:{index:"5264462",hex:"0x8050544e",symbol:"PTN",name:"PalletOne"},5655640:{index:"5655640",hex:"0x80564c58",symbol:"VLX",name:"Velas"},5718350:{index:"5718350",hex:"0x8057414e",symbol:"WAN",name:"Wanchain"},5741564:{index:"5741564",hex:"0x80579bfc",symbol:"WAVES",name:"Waves"},5741565:{index:"5741565",hex:"0x80579bfd",symbol:"WEST",name:"Waves Enterprise"},6382179:{index:"6382179",hex:"0x80616263",symbol:"ABC",name:"Abcmint"},6517357:{index:"6517357",hex:"0x8063726d",symbol:"CRM",name:"Creamcoin"},7171666:{index:"7171666",hex:"0x806d6e52",symbol:"BROCK",name:"Bitrock"},7562605:{index:"7562605",hex:"0x8073656d",symbol:"SEM",name:"Semux"},7567736:{index:"7567736",hex:"0x80737978",symbol:"ION",name:"ION"},7777777:{index:"7777777",hex:"0x8076adf1",symbol:"FCT",name:"FirmaChain"},7825266:{index:"7825266",hex:"0x80776772",symbol:"WGR",name:"WGR"},7825267:{index:"7825267",hex:"0x80776773",symbol:"OBSR",name:"OBServer"},8163271:{index:"8163271",hex:"0x807c8fc7",symbol:"AFS",name:"ANFS"},11259375:{index:"11259375",hex:"0x80abcdef",symbol:"LBR",name:"0L"},15118976:{index:"15118976",hex:"0x80e6b280",symbol:"XDS",name:"XDS"},20230101:{index:"20230101",hex:"0x8134afd5",symbol:"ROH",name:"Rooch"},20240430:{index:"20240430",hex:"0x8134d82e",symbol:"NLK",name:"NuLinkCoin"},61717561:{index:"61717561",hex:"0x83adbc39",symbol:"AQUA",name:"Aquachain"},77777777:{index:"77777777",hex:"0x84a2cb71",symbol:"AZT",name:"Aztecoin"},88888888:{index:"88888888",hex:"0x854c5638",symbol:"HATCH",name:"Hatch"},91927009:{index:"91927009",hex:"0x857ab1e1",symbol:"kUSD",name:"kUSD"},99999996:{index:"99999996",hex:"0x85f5e0fc",symbol:"GENS",name:"GENS"},99999997:{index:"99999997",hex:"0x85f5e0fd",symbol:"EQ",name:"EQ"},99999998:{index:"99999998",hex:"0x85f5e0fe",symbol:"FLUID",name:"Fluid Chains"},99999999:{index:"99999999",hex:"0x85f5e0ff",symbol:"QKC",name:"QuarkChain"},608589380:{index:"608589380",hex:"0xa4465644",symbol:"FVDC",name:"ForumCoin"},1179993420:{index:"1179993420",hex:"0xc655454c",symbol:"",name:"Fuel"},1179993421:{index:"1179993421",hex:"0xc655454d",symbol:"TTNC",name:"TakeTitan"},1179993431:{index:"1179993431",hex:"0xc6554557",symbol:"MTGBP",name:"MTGBP"},1179993441:{index:"1179993441",hex:"0xc6554561",symbol:"QFS",name:"Qfs"},1179993451:{index:"1179993451",hex:"0xc655456b",symbol:"RWA",name:"Asset Chain"}}},{}],112:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAssetsCaveatMapper=n.assetsEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils"),o=e("./caveats/index.cjs"),a=e("./enum.cjs").SnapEndowments.Assets;n.assetsEndowmentBuilder=Object.freeze({targetName:a,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:a,allowedCaveats:[i.SnapCaveatType.ChainIds],endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap],validator:(0,o.createGenericPermissionValidator)([{type:i.SnapCaveatType.ChainIds},{type:i.SnapCaveatType.MaxRequestTime,optional:!0}])})}),n.getAssetsCaveatMapper=function(e){return(0,s.assert)((0,s.isObject)(e)&&e.scopes),{caveats:[{type:i.SnapCaveatType.ChainIds,value:e.scopes}]}}},{"./caveats/index.cjs":114,"./enum.cjs":117,"@metamask/permission-controller":79,"@metamask/snaps-utils":288,"@metamask/utils":327}],113:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createGenericPermissionValidator=void 0;const r=e("@metamask/rpc-errors");n.createGenericPermissionValidator=function(e){const t=new Set(e.map((e=>e.type))),n=e.filter((e=>!e.optional));return function({caveats:i}){const s=i??[],o=s.map((e=>e.type)),a=new Set(o);if(a.size!==o.length)throw r.rpcErrors.invalidParams({message:"Duplicate caveats are not allowed."});if(!s.every((e=>t.has(e.type))))throw r.rpcErrors.invalidParams({message:`Expected the following caveats: ${e.map((e=>`"${e.type}"`)).join(", ")}, received ${s.map((e=>`"${e.type}"`)).join(", ")}.`});if(!n.every((e=>a.has(e.type))))throw r.rpcErrors.invalidParams({message:`Expected the following caveats: ${n.map((e=>`"${e.type}"`)).join(", ")}.`})}}},{"@metamask/rpc-errors":96}],114:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./generic.cjs"),n),i(e("./requestTime.cjs"),n)},{"./generic.cjs":113,"./requestTime.cjs":115}],115:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.maxRequestTimeCaveatSpecifications=n.getMaxRequestTimeCaveat=n.createMaxRequestTimeMapper=n.getMaxRequestTimeCaveatMapper=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils");function o(e){if(!(0,s.hasProperty)(e,"value"))throw r.rpcErrors.invalidParams({message:"Invalid maxRequestTime caveat."});const{value:t}=e;!function(e,t){(0,s.assertStruct)(e,i.MaxRequestTimeStruct,"Invalid maxRequestTime",t)}(t,r.rpcErrors.invalidParams)}n.getMaxRequestTimeCaveatMapper=function(e){return!e||!(0,s.isObject)(e)||(0,s.isObject)(e)&&!(0,s.hasProperty)(e,"maxRequestTime")?{caveats:null}:{caveats:[{type:i.SnapCaveatType.MaxRequestTime,value:e.maxRequestTime}]}},n.createMaxRequestTimeMapper=function(e){return function(t){const{maxRequestTime:n,...r}=t,s=e(r);return n?{...s,caveats:[...s.caveats??[],{type:i.SnapCaveatType.MaxRequestTime,value:n}]}:s}},n.getMaxRequestTimeCaveat=function(e){const t=e?.caveats?.find((e=>e.type===i.SnapCaveatType.MaxRequestTime));return t?.value??null},n.maxRequestTimeCaveatSpecifications={[i.SnapCaveatType.MaxRequestTime]:Object.freeze({type:i.SnapCaveatType.MaxRequestTime,validator:e=>o(e)})}},{"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/utils":327}],116:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.cronjobCaveatSpecifications=n.validateCronjobCaveat=n.getCronjobCaveatJobs=n.getCronjobCaveatMapper=n.cronjobEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Cronjob;function u(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e.value))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;if(!(0,o.hasProperty)(t,"jobs")||!(0,o.isPlainObject)(t))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});if(!(0,s.isCronjobSpecificationArray)(t.jobs))throw i.rpcErrors.invalidParams({message:"Expected a valid cronjob specification array."})}n.cronjobEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.SnapCronjob],endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap],validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.SnapCronjob,optional:!0},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}])})}),n.getCronjobCaveatMapper=function(e){return e&&(0,o.isObject)(e)&&0!==Object.keys(e).length?{caveats:[{type:s.SnapCaveatType.SnapCronjob,value:e}]}:{caveats:null}},n.getCronjobCaveatJobs=function(e){if(!e?.caveats)return null;(0,o.assert)(1===e.caveats.length),(0,o.assert)(e.caveats[0].type===s.SnapCaveatType.SnapCronjob);const t=e.caveats[0];return t.value?.jobs??null},n.validateCronjobCaveat=u,n.cronjobCaveatSpecifications={[s.SnapCaveatType.SnapCronjob]:Object.freeze({type:s.SnapCaveatType.SnapCronjob,validator:e=>u(e)})}},{"./caveats/index.cjs":114,"./enum.cjs":117,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/utils":327}],117:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.SnapEndowments=void 0,function(e){e.NetworkAccess="endowment:network-access",e.SignatureInsight="endowment:signature-insight",e.TransactionInsight="endowment:transaction-insight",e.Cronjob="endowment:cronjob",e.EthereumProvider="endowment:ethereum-provider",e.Rpc="endowment:rpc",e.WebAssemblyAccess="endowment:webassembly",e.NameLookup="endowment:name-lookup",e.LifecycleHooks="endowment:lifecycle-hooks",e.Keyring="endowment:keyring",e.HomePage="endowment:page-home",e.SettingsPage="endowment:page-settings",e.Assets="endowment:assets",e.Protocol="endowment:protocol"}(r||(n.SnapEndowments=r={}))},{}],118:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ethereumProviderEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.EthereumProvider;n.ethereumProviderEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>["ethereum"],subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":117,"@metamask/permission-controller":79}],119:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.homePageEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.HomePage;n.homePageEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":117,"@metamask/permission-controller":79}],120:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.getProtocolCaveatScopes=n.getCronjobCaveatJobs=n.getMaxRequestTimeCaveat=n.getKeyringCaveatOrigins=n.getLookupMatchersCaveat=n.getChainIdsCaveat=n.getTransactionOriginCaveat=n.getSignatureOriginCaveat=n.getRpcCaveatOrigins=n.handlerEndowments=n.endowmentCaveatMappers=n.endowmentCaveatSpecifications=n.endowmentPermissionBuilders=void 0;const s=e("@metamask/snaps-utils"),o=e("./assets.cjs"),a=e("./caveats/index.cjs"),c=e("./cronjob.cjs"),u=e("./ethereum-provider.cjs"),l=e("./home-page.cjs"),d=e("./keyring.cjs"),h=e("./lifecycle-hooks.cjs"),f=e("./name-lookup.cjs"),p=e("./network-access.cjs"),m=e("./protocol.cjs"),y=e("./rpc.cjs"),g=e("./settings-page.cjs"),b=e("./signature-insight.cjs"),w=e("./transaction-insight.cjs"),v=e("./web-assembly.cjs");n.endowmentPermissionBuilders={[p.networkAccessEndowmentBuilder.targetName]:p.networkAccessEndowmentBuilder,[w.transactionInsightEndowmentBuilder.targetName]:w.transactionInsightEndowmentBuilder,[c.cronjobEndowmentBuilder.targetName]:c.cronjobEndowmentBuilder,[u.ethereumProviderEndowmentBuilder.targetName]:u.ethereumProviderEndowmentBuilder,[y.rpcEndowmentBuilder.targetName]:y.rpcEndowmentBuilder,[v.webAssemblyEndowmentBuilder.targetName]:v.webAssemblyEndowmentBuilder,[f.nameLookupEndowmentBuilder.targetName]:f.nameLookupEndowmentBuilder,[h.lifecycleHooksEndowmentBuilder.targetName]:h.lifecycleHooksEndowmentBuilder,[d.keyringEndowmentBuilder.targetName]:d.keyringEndowmentBuilder,[g.settingsPageEndowmentBuilder.targetName]:g.settingsPageEndowmentBuilder,[m.protocolEndowmentBuilder.targetName]:m.protocolEndowmentBuilder,[l.homePageEndowmentBuilder.targetName]:l.homePageEndowmentBuilder,[b.signatureInsightEndowmentBuilder.targetName]:b.signatureInsightEndowmentBuilder,[o.assetsEndowmentBuilder.targetName]:o.assetsEndowmentBuilder},n.endowmentCaveatSpecifications={...c.cronjobCaveatSpecifications,...w.transactionInsightCaveatSpecifications,...y.rpcCaveatSpecifications,...f.nameLookupCaveatSpecifications,...d.keyringCaveatSpecifications,...b.signatureInsightCaveatSpecifications,...a.maxRequestTimeCaveatSpecifications,...m.protocolCaveatSpecifications},n.endowmentCaveatMappers={[c.cronjobEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(c.getCronjobCaveatMapper),[w.transactionInsightEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(w.getTransactionInsightCaveatMapper),[y.rpcEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(y.getRpcCaveatMapper),[f.nameLookupEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(f.getNameLookupCaveatMapper),[d.keyringEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(d.getKeyringCaveatMapper),[m.protocolEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(m.getProtocolCaveatMapper),[b.signatureInsightEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(b.getSignatureInsightCaveatMapper),[h.lifecycleHooksEndowmentBuilder.targetName]:a.getMaxRequestTimeCaveatMapper,[l.homePageEndowmentBuilder.targetName]:a.getMaxRequestTimeCaveatMapper,[g.settingsPageEndowmentBuilder.targetName]:a.getMaxRequestTimeCaveatMapper,[o.assetsEndowmentBuilder.targetName]:(0,a.createMaxRequestTimeMapper)(o.getAssetsCaveatMapper)},n.handlerEndowments={[s.HandlerType.OnRpcRequest]:y.rpcEndowmentBuilder.targetName,[s.HandlerType.OnTransaction]:w.transactionInsightEndowmentBuilder.targetName,[s.HandlerType.OnCronjob]:c.cronjobEndowmentBuilder.targetName,[s.HandlerType.OnNameLookup]:f.nameLookupEndowmentBuilder.targetName,[s.HandlerType.OnInstall]:h.lifecycleHooksEndowmentBuilder.targetName,[s.HandlerType.OnUpdate]:h.lifecycleHooksEndowmentBuilder.targetName,[s.HandlerType.OnKeyringRequest]:d.keyringEndowmentBuilder.targetName,[s.HandlerType.OnHomePage]:l.homePageEndowmentBuilder.targetName,[s.HandlerType.OnSettingsPage]:g.settingsPageEndowmentBuilder.targetName,[s.HandlerType.OnSignature]:b.signatureInsightEndowmentBuilder.targetName,[s.HandlerType.OnUserInput]:null,[s.HandlerType.OnAssetHistoricalPrice]:o.assetsEndowmentBuilder.targetName,[s.HandlerType.OnAssetsLookup]:o.assetsEndowmentBuilder.targetName,[s.HandlerType.OnAssetsConversion]:o.assetsEndowmentBuilder.targetName,[s.HandlerType.OnProtocolRequest]:m.protocolEndowmentBuilder.targetName},i(e("./enum.cjs"),n);var x=e("./rpc.cjs");Object.defineProperty(n,"getRpcCaveatOrigins",{enumerable:!0,get:function(){return x.getRpcCaveatOrigins}});var E=e("./signature-insight.cjs");Object.defineProperty(n,"getSignatureOriginCaveat",{enumerable:!0,get:function(){return E.getSignatureOriginCaveat}});var S=e("./transaction-insight.cjs");Object.defineProperty(n,"getTransactionOriginCaveat",{enumerable:!0,get:function(){return S.getTransactionOriginCaveat}});var A=e("./name-lookup.cjs");Object.defineProperty(n,"getChainIdsCaveat",{enumerable:!0,get:function(){return A.getChainIdsCaveat}}),Object.defineProperty(n,"getLookupMatchersCaveat",{enumerable:!0,get:function(){return A.getLookupMatchersCaveat}});var _=e("./keyring.cjs");Object.defineProperty(n,"getKeyringCaveatOrigins",{enumerable:!0,get:function(){return _.getKeyringCaveatOrigins}});var T=e("./caveats/index.cjs");Object.defineProperty(n,"getMaxRequestTimeCaveat",{enumerable:!0,get:function(){return T.getMaxRequestTimeCaveat}});var k=e("./cronjob.cjs");Object.defineProperty(n,"getCronjobCaveatJobs",{enumerable:!0,get:function(){return k.getCronjobCaveatJobs}});var C=e("./protocol.cjs");Object.defineProperty(n,"getProtocolCaveatScopes",{enumerable:!0,get:function(){return C.getProtocolCaveatScopes}})},{"./assets.cjs":112,"./caveats/index.cjs":114,"./cronjob.cjs":116,"./enum.cjs":117,"./ethereum-provider.cjs":118,"./home-page.cjs":119,"./keyring.cjs":121,"./lifecycle-hooks.cjs":122,"./name-lookup.cjs":123,"./network-access.cjs":124,"./protocol.cjs":125,"./rpc.cjs":126,"./settings-page.cjs":127,"./signature-insight.cjs":128,"./transaction-insight.cjs":129,"./web-assembly.cjs":130,"@metamask/snaps-utils":288}],121:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.keyringCaveatSpecifications=n.getKeyringCaveatOrigins=n.getKeyringCaveatMapper=n.keyringEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Keyring;n.keyringEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.KeyringOrigin,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.KeyringOrigin},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getKeyringCaveatMapper=function(e){return{caveats:[{type:s.SnapCaveatType.KeyringOrigin,value:e}]}},n.getKeyringCaveatOrigins=function(e){return(0,o.assert)(e?.caveats),(0,o.assert)(1===e.caveats.length),(0,o.assert)(e.caveats[0].type===s.SnapCaveatType.KeyringOrigin),e.caveats[0].value},n.keyringCaveatSpecifications={[s.SnapCaveatType.KeyringOrigin]:Object.freeze({type:s.SnapCaveatType.KeyringOrigin,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e.value))throw i.rpcErrors.invalidParams({message:"Invalid keyring origins: Expected a plain object."});const{value:t}=e;(0,s.assertIsKeyringOrigins)(t,i.rpcErrors.invalidParams)}(e)})}},{"./caveats/index.cjs":114,"./enum.cjs":117,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/utils":327}],122:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.lifecycleHooksEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.LifecycleHooks;n.lifecycleHooksEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":117,"@metamask/permission-controller":79}],123:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.nameLookupCaveatSpecifications=n.getLookupMatchersCaveat=n.getChainIdsCaveat=n.getNameLookupCaveatMapper=n.nameLookupEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.NameLookup;function u(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;switch(e.type){case s.SnapCaveatType.ChainIds:(0,o.assertStruct)(t,s.ChainIdsStruct);break;case s.SnapCaveatType.LookupMatchers:(0,o.assertStruct)(t,s.LookupMatchersStruct);break;default:throw i.rpcErrors.invalidParams({message:'Invalid caveat type, must be one of the following: "chainIds", "matchers})}}n.nameLookupEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.ChainIds,s.SnapCaveatType.LookupMatchers,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.ChainIds,optional:!0},{type:s.SnapCaveatType.LookupMatchers,optional:!0},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getNameLookupCaveatMapper=function(e){if(!e||!(0,o.isObject)(e)||0===Object.keys(e).length)return{caveats:null};const t=[];return e.chains&&t.push({type:s.SnapCaveatType.ChainIds,value:e.chains}),e.matchers&&t.push({type:s.SnapCaveatType.LookupMatchers,value:e.matchers}),(0,o.assert)(t.length>0),{caveats:t}},n.getChainIdsCaveat=function(e){if(!e?.caveats)return null;const t=e.caveats.find((e=>e.type===s.SnapCaveatType.ChainIds));return t?t.value:null},n.getLookupMatchersCaveat=function(e){if(!e?.caveats)return null;const t=e.caveats.find((e=>e.type===s.SnapCaveatType.LookupMatchers));return t?t.value:null},n.nameLookupCaveatSpecifications={[s.SnapCaveatType.ChainIds]:Object.freeze({type:s.SnapCaveatType.ChainIds,validator:e=>u(e)}),[s.SnapCaveatType.LookupMatchers]:Object.freeze({type:s.SnapCaveatType.LookupMatchers,validator:e=>u(e)})}},{"./caveats/index.cjs":114,"./enum.cjs":117,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/utils":327}],124:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.networkAccessEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.NetworkAccess;n.networkAccessEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>["fetch","Request","Headers","Response"],subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":117,"@metamask/permission-controller":79}],125:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.protocolCaveatSpecifications=n.getProtocolCaveatScopes=n.getProtocolCaveatMapper=n.protocolEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Protocol;n.protocolEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.ProtocolSnapScopes,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.ProtocolSnapScopes},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getProtocolCaveatMapper=function(e){if(!e||!(0,o.isObject)(e)||0===Object.keys(e).length)return{caveats:null};const t=[];return e.scopes&&t.push({type:s.SnapCaveatType.ProtocolSnapScopes,value:e.scopes}),{caveats:t}},n.getProtocolCaveatScopes=function(e){const t=e?.caveats?.find((e=>e.type===s.SnapCaveatType.ProtocolSnapScopes));return t?t.value:null},n.protocolCaveatSpecifications={[s.SnapCaveatType.ProtocolSnapScopes]:Object.freeze({type:s.SnapCaveatType.ProtocolSnapScopes,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;(0,o.assertStruct)(t,s.ProtocolScopesStruct,"Invalid scopes specified",i.rpcErrors.invalidParams)}(e)})}},{"./caveats/index.cjs":114,"./enum.cjs":117,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/utils":327}],126:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.rpcCaveatSpecifications=n.getRpcCaveatOrigins=n.getRpcCaveatMapper=n.rpcEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.Rpc;n.rpcEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.RpcOrigin,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.RpcOrigin},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getRpcCaveatMapper=function(e){return{caveats:[{type:s.SnapCaveatType.RpcOrigin,value:e}]}},n.getRpcCaveatOrigins=function(e){const t=e?.caveats?.filter((e=>e.type===s.SnapCaveatType.RpcOrigin));return(0,o.assert)(t),(0,o.assert)(1===t.length),t[0].value},n.rpcCaveatSpecifications={[s.SnapCaveatType.RpcOrigin]:Object.freeze({type:s.SnapCaveatType.RpcOrigin,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e.value))throw i.rpcErrors.invalidParams({message:"Invalid JSON-RPC origins: Expected a plain object."});const{value:t}=e;(0,s.assertIsRpcOrigins)(t,i.rpcErrors.invalidParams)}(e)})}},{"./caveats/index.cjs":114,"./enum.cjs":117,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/utils":327}],127:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.settingsPageEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.SettingsPage;n.settingsPageEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>null,subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":117,"@metamask/permission-controller":79}],128:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.signatureInsightCaveatSpecifications=n.getSignatureOriginCaveat=n.getSignatureInsightCaveatMapper=n.signatureInsightEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.SignatureInsight;n.signatureInsightEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.SignatureOrigin],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.SignatureOrigin,optional:!0},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getSignatureInsightCaveatMapper=function(e){return!e||!(0,o.isObject)(e)||(0,o.isObject)(e)&&0===Object.keys(e).length?{caveats:null}:{caveats:[{type:s.SnapCaveatType.SignatureOrigin,value:(0,o.hasProperty)(e,"allowSignatureOrigin")&&e.allowSignatureOrigin}]}},n.getSignatureOriginCaveat=function(e){return e?.caveats?((0,o.assert)(1===e.caveats.length),(0,o.assert)(e.caveats[0].type===s.SnapCaveatType.SignatureOrigin),e.caveats[0].value??null):null},n.signatureInsightCaveatSpecifications={[s.SnapCaveatType.SignatureOrigin]:Object.freeze({type:s.SnapCaveatType.SignatureOrigin,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;(0,o.assert)("boolean"==typeof t,'Expected caveat value to have type "boolean"')}(e)})}},{"./caveats/index.cjs":114,"./enum.cjs":117,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/utils":327}],129:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.transactionInsightCaveatSpecifications=n.getTransactionOriginCaveat=n.getTransactionInsightCaveatMapper=n.transactionInsightEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("./caveats/index.cjs"),c=e("./enum.cjs").SnapEndowments.TransactionInsight;n.transactionInsightEndowmentBuilder=Object.freeze({targetName:c,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:c,allowedCaveats:[s.SnapCaveatType.TransactionOrigin,s.SnapCaveatType.MaxRequestTime],endowmentGetter:e=>null,validator:(0,a.createGenericPermissionValidator)([{type:s.SnapCaveatType.TransactionOrigin,optional:!0},{type:s.SnapCaveatType.MaxRequestTime,optional:!0}]),subjectTypes:[r.SubjectType.Snap]})}),n.getTransactionInsightCaveatMapper=function(e){return!e||!(0,o.isObject)(e)||(0,o.isObject)(e)&&0===Object.keys(e).length?{caveats:null}:{caveats:[{type:s.SnapCaveatType.TransactionOrigin,value:(0,o.hasProperty)(e,"allowTransactionOrigin")&&e.allowTransactionOrigin}]}},n.getTransactionOriginCaveat=function(e){return e?.caveats?((0,o.assert)(1===e.caveats.length),(0,o.assert)(e.caveats[0].type===s.SnapCaveatType.TransactionOrigin),e.caveats[0].value??null):null},n.transactionInsightCaveatSpecifications={[s.SnapCaveatType.TransactionOrigin]:Object.freeze({type:s.SnapCaveatType.TransactionOrigin,validator:e=>function(e){if(!(0,o.hasProperty)(e,"value")||!(0,o.isPlainObject)(e))throw i.rpcErrors.invalidParams({message:"Expected a plain object."});const{value:t}=e;(0,o.assert)("boolean"==typeof t,'Expected caveat value to have type "boolean"')}(e)})}},{"./caveats/index.cjs":114,"./enum.cjs":117,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/utils":327}],130:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.webAssemblyEndowmentBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("./enum.cjs").SnapEndowments.WebAssemblyAccess;n.webAssemblyEndowmentBuilder=Object.freeze({targetName:i,specificationBuilder:e=>({permissionType:r.PermissionType.Endowment,targetName:i,allowedCaveats:null,endowmentGetter:e=>["WebAssembly"],subjectTypes:[r.SubjectType.Snap]})})},{"./enum.cjs":117,"@metamask/permission-controller":79}],131:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.selectHooks=n.SnapCaveatType=n.createSnapsMethodMiddleware=n.permittedMethods=void 0;var s=e("./permitted/index.cjs");Object.defineProperty(n,"permittedMethods",{enumerable:!0,get:function(){return s.handlers}}),Object.defineProperty(n,"createSnapsMethodMiddleware",{enumerable:!0,get:function(){return s.createSnapsMethodMiddleware}});var o=e("@metamask/snaps-utils");Object.defineProperty(n,"SnapCaveatType",{enumerable:!0,get:function(){return o.SnapCaveatType}});var a=e("./utils.cjs");Object.defineProperty(n,"selectHooks",{enumerable:!0,get:function(){return a.selectHooks}}),i(e("./endowments/index.cjs"),n),i(e("./permissions.cjs"),n),i(e("./restricted/index.cjs"),n)},{"./endowments/index.cjs":120,"./permissions.cjs":132,"./permitted/index.cjs":147,"./restricted/index.cjs":168,"./utils.cjs":173,"@metamask/snaps-utils":288}],132:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.buildSnapRestrictedMethodSpecifications=n.buildSnapEndowmentSpecifications=n.processSnapPermissions=void 0;const r=e("@metamask/utils"),i=e("./endowments/index.cjs"),s=e("./restricted/index.cjs"),o=e("./utils.cjs");n.processSnapPermissions=function(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>(0,r.hasProperty)(s.caveatMappers,e)?[e,s.caveatMappers[e](t)]:(0,r.hasProperty)(i.endowmentCaveatMappers,e)?[e,i.endowmentCaveatMappers[e](t)]:[e,t])))};n.buildSnapEndowmentSpecifications=e=>Object.values(i.endowmentPermissionBuilders).reduce(((t,{targetName:n,specificationBuilder:r})=>(e.includes(n)||(t[n]=r({})),t)),{});n.buildSnapRestrictedMethodSpecifications=(e,t)=>Object.values(s.restrictedMethodPermissionBuilders).reduce(((n,{targetName:r,specificationBuilder:i,methodHooks:s})=>(e.includes(r)||(n[r]=i({methodHooks:(0,o.selectHooks)(t,s)})),n)),{})},{"./endowments/index.cjs":120,"./restricted/index.cjs":168,"./utils.cjs":173,"@metamask/utils":327}],133:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.cancelBackgroundEventHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("../endowments/index.cjs");n.cancelBackgroundEventHandler={methodNames:["snap_cancelBackgroundEvent"],implementation:async function(e,t,n,a,{cancelBackgroundEvent:c,hasPermission:u}){const{params:l}=e;if(!u(s.SnapEndowments.Cronjob))return a(r.providerErrors.unauthorized());try{const e=function(e){try{return(0,i.create)(e,o)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(l),{id:n}=e;c(n),t.result=null}catch(e){return a(e)}return a()},hookNames:{cancelBackgroundEvent:!0,hasPermission:!0}};const o=(0,i.object)({id:(0,i.string)()})},{"../endowments/index.cjs":120,"@metamask/rpc-errors":96,"@metamask/superstruct":310}],134:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.clearStateHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("../restricted/manageState.cjs");n.clearStateHandler={methodNames:["snap_clearState"],implementation:async function(e,t,n,a,{clearSnapState:c,hasPermission:u}){const{params:l}=e;if(!u(s.manageStateBuilder.targetName))return a(r.providerErrors.unauthorized());try{const e=function(e){try{return(0,i.create)(e,o)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(l),{encrypted:n=!0}=e;c(n),t.result=null}catch(e){return a(e)}return a()},hookNames:{clearSnapState:!0,hasPermission:!0}};const o=(0,i.object)({encrypted:(0,i.optional)((0,i.boolean)())})},{"../restricted/manageState.cjs":171,"@metamask/rpc-errors":96,"@metamask/superstruct":310}],135:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createInterfaceHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),s=e("@metamask/superstruct");n.createInterfaceHandler={methodNames:["snap_createInterface"],implementation:async function(e,t,n,i,{createInterface:a}){const{params:c}=e;try{const e=function(e){try{return(0,s.create)(e,o)}catch(e){if(e instanceof s.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{ui:n,context:i}=e;t.result=await a(n,i)}catch(e){return i(e)}return i()},hookNames:{createInterface:!0}};const o=(0,s.object)({ui:i.ComponentOrElementStruct,context:(0,s.optional)(i.InterfaceContextStruct)})},{"@metamask/rpc-errors":96,"@metamask/snaps-sdk":177,"@metamask/superstruct":310}],136:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.providerRequestHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("../endowments/index.cjs"),a=Object.freeze(["eth_blockNumber","eth_call","eth_chainId","eth_coinbase","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleByBlockHashAndIndex","eth_getUncleByBlockNumberAndIndex","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_getWork","eth_hashrate","eth_mining","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_protocolVersion","eth_sendRawTransaction","eth_submitHashrate","eth_submitWork","eth_syncing","eth_uninstallFilter","net_listening","net_peerCount","net_version","web3_clientVersion","web3_sha3"]);n.providerRequestHandler={methodNames:["snap_experimentalProviderRequest"],implementation:async function(e,t,n,u,{hasPermission:l,getNetworkConfigurationByChainId:d,getNetworkClientById:h}){if(!l(o.SnapEndowments.EthereumProvider))return u(r.rpcErrors.methodNotFound());const{params:f}=e;try{const{chainId:e,request:n}=function(e){try{return(0,i.create)(e,c)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(f);if(!a.includes(n.method))return u(r.rpcErrors.methodNotFound());const o=(0,s.parseCaipChainId)(e);if("eip155"!==o.namespace)return u(r.rpcErrors.invalidParams({message:"Only EVM networks are currently supported."}));const l=BigInt(o.reference),p=d((0,s.bigIntToHex)(l));if(!p)return u(r.rpcErrors.invalidParams({message:"The requested network is not available."}));const m=h(p.rpcEndpoints[p.defaultRpcEndpointIndex].networkClientId),{provider:y}=m;t.result=await y.request(n)}catch(e){return u(e)}return u()},hookNames:{hasPermission:!0,getNetworkConfigurationByChainId:!0,getNetworkClientById:!0}};const c=(0,i.object)({chainId:s.CaipChainIdStruct,request:(0,i.type)({method:(0,i.string)(),params:(0,i.optional)(s.JsonRpcParamsStruct)})})},{"../endowments/index.cjs":120,"@metamask/rpc-errors":96,"@metamask/superstruct":310,"@metamask/utils":327}],137:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getAllSnapsHandler=void 0;const r=e("@metamask/rpc-errors");n.getAllSnapsHandler={methodNames:["wallet_getAllSnaps"],implementation:async function(e,t,n,i,{getAllSnaps:s}){const{origin:o}=e;if("https://snaps.metamask.io"!==o)return i(r.rpcErrors.methodNotFound());return t.result=await s(),i()},hookNames:{getAllSnaps:!0}}},{"@metamask/rpc-errors":96}],138:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBackgroundEventsHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("../endowments/index.cjs");n.getBackgroundEventsHandler={methodNames:["snap_getBackgroundEvents"],implementation:async function(e,t,n,s,{getBackgroundEvents:o,hasPermission:a}){if(!a(i.SnapEndowments.Cronjob))return s(r.providerErrors.unauthorized());try{const e=o();t.result=e}catch(e){return s(e)}return s()},hookNames:{getBackgroundEvents:!0,hasPermission:!0}}},{"../endowments/index.cjs":120,"@metamask/rpc-errors":96}],139:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getClientStatusHandler=void 0;n.getClientStatusHandler={methodNames:["snap_getClientStatus"],implementation:async function(e,t,n,r,{getIsLocked:i}){return t.result={locked:i()},r()},hookNames:{getIsLocked:!0}}},{}],140:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCurrencyRateHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/superstruct");n.getCurrencyRateHandler={methodNames:["snap_getCurrencyRate"],implementation:function(e,t,n,i,{getCurrencyRate:a}){const{params:c}=e;try{const e=function(e){try{return(0,s.create)(e,o)}catch(e){if(e instanceof s.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{currency:n}=e;t.result=a(n)??null}catch(e){return i(e)}return i()},hookNames:{getCurrencyRate:!0}};const o=(0,s.object)({currency:(0,s.union)([(0,i.currency)("btc")])})},{"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/superstruct":310}],141:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getFileHandler=n.GetFileArgsStruct=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),s=e("@metamask/superstruct"),o=e("@metamask/utils");n.GetFileArgsStruct=(0,s.object)({path:(0,s.string)(),encoding:(0,s.optional)((0,s.union)([(0,i.enumValue)(i.AuxiliaryFileEncoding.Base64),(0,i.enumValue)(i.AuxiliaryFileEncoding.Hex),(0,i.enumValue)(i.AuxiliaryFileEncoding.Utf8)]))});n.getFileHandler={methodNames:["snap_getFile"],implementation:async function(e,t,s,a,{getSnapFile:c}){const{params:u}=e;(0,o.assertStruct)(u,n.GetFileArgsStruct,'Invalid "snap_getFile" parameters',r.rpcErrors.invalidParams);try{t.result=await c(u.path,u.encoding??i.AuxiliaryFileEncoding.Base64)}catch(e){return a(e)}return a()},hookNames:{getSnapFile:!0}}},{"@metamask/rpc-errors":96,"@metamask/snaps-sdk":177,"@metamask/superstruct":310,"@metamask/utils":327}],142:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getInterfaceContextHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct");n.getInterfaceContextHandler={methodNames:["snap_getInterfaceContext"],implementation:function(e,t,n,o,{getInterfaceContext:a}){const{params:c}=e;try{const e=function(e){try{return(0,i.create)(e,s)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{id:n}=e;t.result=a(n)}catch(e){return o(e)}return o()},hookNames:{getInterfaceContext:!0}};const s=(0,i.object)({id:(0,i.string)()})},{"@metamask/rpc-errors":96,"@metamask/superstruct":310}],143:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getInterfaceStateHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct");n.getInterfaceStateHandler={methodNames:["snap_getInterfaceState"],implementation:function(e,t,n,o,{getInterfaceState:a}){const{params:c}=e;try{const e=function(e){try{return(0,i.create)(e,s)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{id:n}=e;t.result=a(n)}catch(e){return o(e)}return o()},hookNames:{getInterfaceState:!0}};const s=(0,i.object)({id:(0,i.string)()})},{"@metamask/rpc-errors":96,"@metamask/superstruct":310}],144:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSnapsHandler=void 0;n.getSnapsHandler={methodNames:["wallet_getSnaps"],implementation:async function(e,t,n,r,{getSnaps:i}){return t.result=await i(),r()},hookNames:{getSnaps:!0}}},{}],145:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.get=n.getStateHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("../restricted/manageState.cjs"),a=e("../utils.cjs");n.getStateHandler={methodNames:["snap_getState"],implementation:async function(e,t,n,s,{hasPermission:a,getSnapState:l,getUnlockPromise:d}){const{params:h}=e;if(!a(o.manageStateBuilder.targetName))return s(r.providerErrors.unauthorized());try{const e=function(e){try{return(0,i.create)(e,c)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(h),{key:n,encrypted:s=!0}=e;s&&await d(!0);const o=await l(s);t.result=u(o,n)}catch(e){return s(e)}return s()},hookNames:{hasPermission:!0,getSnapState:!0,getUnlockPromise:!0}};const c=(0,i.object)({key:(0,i.optional)(a.StateKeyStruct),encrypted:(0,i.optional)((0,i.boolean)())});function u(e,t){if(void 0===t)return e;const n=t.split();let i=e;for(let e=0;e<n.length;e++){const t=n[e];if(a.FORBIDDEN_KEYS.includes(t))throw r.rpcErrors.invalidParams("Invalid params: Key contains forbidden characters.");if(!(0,s.isObject)(i))return null;if(!(0,s.hasProperty)(i,t))return null;i=i[t]}return i}n.get=u},{"../restricted/manageState.cjs":171,"../utils.cjs":173,"@metamask/rpc-errors":96,"@metamask/superstruct":310,"@metamask/utils":327}],146:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.handlers=n.methodHandlers=void 0;const r=e("./cancelBackgroundEvent.cjs"),i=e("./clearState.cjs"),s=e("./createInterface.cjs"),o=e("./experimentalProviderRequest.cjs"),a=e("./getAllSnaps.cjs"),c=e("./getBackgroundEvents.cjs"),u=e("./getClientStatus.cjs"),l=e("./getCurrencyRate.cjs"),d=e("./getFile.cjs"),h=e("./getInterfaceContext.cjs"),f=e("./getInterfaceState.cjs"),p=e("./getSnaps.cjs"),m=e("./getState.cjs"),y=e("./invokeKeyring.cjs"),g=e("./invokeSnapSugar.cjs"),b=e("./listEntropySources.cjs"),w=e("./requestSnaps.cjs"),v=e("./resolveInterface.cjs"),x=e("./scheduleBackgroundEvent.cjs"),E=e("./setState.cjs"),S=e("./updateInterface.cjs");n.methodHandlers={wallet_getAllSnaps:a.getAllSnapsHandler,wallet_getSnaps:p.getSnapsHandler,wallet_requestSnaps:w.requestSnapsHandler,wallet_invokeSnap:g.invokeSnapSugarHandler,wallet_invokeKeyring:y.invokeKeyringHandler,snap_clearState:i.clearStateHandler,snap_getClientStatus:u.getClientStatusHandler,snap_getFile:d.getFileHandler,snap_getState:m.getStateHandler,snap_createInterface:s.createInterfaceHandler,snap_updateInterface:S.updateInterfaceHandler,snap_getInterfaceState:f.getInterfaceStateHandler,snap_getInterfaceContext:h.getInterfaceContextHandler,snap_listEntropySources:b.listEntropySourcesHandler,snap_resolveInterface:v.resolveInterfaceHandler,snap_getCurrencyRate:l.getCurrencyRateHandler,snap_experimentalProviderRequest:o.providerRequestHandler,snap_scheduleBackgroundEvent:x.scheduleBackgroundEventHandler,snap_cancelBackgroundEvent:r.cancelBackgroundEventHandler,snap_getBackgroundEvents:c.getBackgroundEventsHandler,snap_setState:E.setStateHandler},n.handlers=Object.values(n.methodHandlers)},{"./cancelBackgroundEvent.cjs":133,"./clearState.cjs":134,"./createInterface.cjs":135,"./experimentalProviderRequest.cjs":136,"./getAllSnaps.cjs":137,"./getBackgroundEvents.cjs":138,"./getClientStatus.cjs":139,"./getCurrencyRate.cjs":140,"./getFile.cjs":141,"./getInterfaceContext.cjs":142,"./getInterfaceState.cjs":143,"./getSnaps.cjs":144,"./getState.cjs":145,"./invokeKeyring.cjs":148,"./invokeSnapSugar.cjs":149,"./listEntropySources.cjs":150,"./requestSnaps.cjs":152,"./resolveInterface.cjs":153,"./scheduleBackgroundEvent.cjs":154,"./setState.cjs":155,"./updateInterface.cjs":156}],147:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./handlers.cjs"),n),i(e("./middleware.cjs"),n)},{"./handlers.cjs":146,"./middleware.cjs":151}],148:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.invokeKeyringHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils"),o=e("./invokeSnapSugar.cjs");n.invokeKeyringHandler={methodNames:["wallet_invokeKeyring"],implementation:async function(e,t,n,a,{handleSnapRpcRequest:c,hasPermission:u,getSnap:l,getAllowedKeyringMethods:d}){let h;try{h=(0,o.getValidatedParams)(e.params)}catch(e){return a(e)}const{origin:f}=e,{snapId:p,request:m}=h;if(!f||!u(i.WALLET_SNAP_PERMISSION_KEY))return a(r.rpcErrors.invalidRequest({message:`The snap "${p}" is not connected to "${f}". Please connect before invoking the snap.`}));if(!l(p))return a(r.rpcErrors.invalidRequest({message:`The snap "${p}" is not installed. Please install it first, before invoking the snap.`}));if(!(0,s.hasProperty)(m,"method")||"string"!=typeof m.method)return a(r.rpcErrors.invalidRequest({message:"The request must have a method."}));if(!d().includes(m.method))return a(r.rpcErrors.invalidRequest({message:`The origin "${f}" is not allowed to invoke the method "${m.method}".`}));try{t.result=await c({snapId:p,request:m,handler:i.HandlerType.OnKeyringRequest})}catch(e){return a(e)}return a()},hookNames:{hasPermission:!0,handleSnapRpcRequest:!0,getSnap:!0,getAllowedKeyringMethods:!0}}},{"./invokeSnapSugar.cjs":149,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/utils":327}],149:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedParams=n.invokeSnapSugar=n.invokeSnapSugarHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/utils");async function s(e,t,n,r,{invokeSnap:i}){try{const n=o(e.params);t.result=await i(n)}catch(e){return r(e)}return r()}function o(e){if(!(0,i.isObject)(e))throw r.rpcErrors.invalidParams({message:"Expected params to be a single object."});const{snapId:t,request:n}=e;if(!t||"string"!=typeof t||""===t)throw r.rpcErrors.invalidParams({message:"Must specify a valid snap ID."});if(!(0,i.isObject)(n))throw r.rpcErrors.invalidParams({message:"Expected request to be a single object."});return e}n.invokeSnapSugarHandler={methodNames:["wallet_invokeSnap"],implementation:s,hookNames:{invokeSnap:!0}},n.invokeSnapSugar=s,n.getValidatedParams=o},{"@metamask/rpc-errors":96,"@metamask/utils":327}],150:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.listEntropySourcesHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("../restricted/getBip32Entropy.cjs"),s=e("../restricted/getBip32PublicKey.cjs"),o=e("../restricted/getBip44Entropy.cjs"),a=e("../restricted/getEntropy.cjs"),c=[i.getBip32EntropyBuilder.targetName,s.getBip32PublicKeyBuilder.targetName,o.getBip44EntropyBuilder.targetName,a.getEntropyBuilder.targetName];n.listEntropySourcesHandler={methodNames:["snap_listEntropySources"],implementation:async function(e,t,n,i,{hasPermission:s,getEntropySources:o,getUnlockPromise:a}){if(!c.some(s))return i(r.providerErrors.unauthorized());return await a(!0),t.result=o(),i()},hookNames:{hasPermission:!0,getEntropySources:!0,getUnlockPromise:!0}}},{"../restricted/getBip32Entropy.cjs":162,"../restricted/getBip32PublicKey.cjs":163,"../restricted/getBip44Entropy.cjs":164,"../restricted/getEntropy.cjs":165,"@metamask/rpc-errors":96}],151:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapsMethodMiddleware=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("./handlers.cjs"),o=e("../utils.cjs");n.createSnapsMethodMiddleware=function(e,t){return async function(n,a,c,u){const l=s.methodHandlers[n.method];if(l){if(String.prototype.startsWith.call(n.method,"snap_")&&!e)return u(r.rpcErrors.methodNotFound());const{implementation:s,hookNames:d}=l;try{return await s(n,a,c,u,(0,o.selectHooks)(t,d))}catch(e){return(0,i.logError)(e),u(e)}}return c()}}},{"../utils.cjs":173,"./handlers.cjs":146,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288}],152:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSnapPermissionsRequest=n.hasRequestedSnaps=n.requestSnapsHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils"),o=e("../restricted/invokeSnap.cjs");function a(e,t){const n=e[o.WALLET_SNAP_PERMISSION_KEY]?.caveats?.find((e=>e.type===i.SnapCaveatType.SnapIds)),r=n?.value;return!!(0,s.isObject)(r)&&Object.keys(t).every((e=>(0,s.hasProperty)(r,e)))}function c(e,t){if((0,i.verifyRequestedSnapPermissions)(t),!e[o.WALLET_SNAP_PERMISSION_KEY])return t;const n=e[o.WALLET_SNAP_PERMISSION_KEY].caveats?.find((e=>e.type===i.SnapCaveatType.SnapIds)),r=n?.value??{},s=t[o.WALLET_SNAP_PERMISSION_KEY].caveats[0].value,a=[...new Set([...Object.keys(r),...Object.keys(s)])].reduce(((e,t)=>(e[t]=s[t]??r[t],e)),{});return t[o.WALLET_SNAP_PERMISSION_KEY].caveats[0].value=a,t}n.requestSnapsHandler={methodNames:["wallet_requestSnaps"],implementation:async function(e,t,n,u,{installSnaps:l,requestPermissions:d,getPermissions:h}){const f=e.params;if(!(0,s.isObject)(f))return u(r.rpcErrors.invalidParams({message:'"params" must be an object.'}));try{if(0===Object.keys(f).length)return u(r.rpcErrors.invalidParams({message:"Request must have at least one requested snap."}));const e={[o.WALLET_SNAP_PERMISSION_KEY]:{caveats:[{type:i.SnapCaveatType.SnapIds,value:f}]}},n=await h();if(n)if(a(n,f))t.result=await l(f);else{const r=c(n,e),[,i]=await d(r);t.result=i.data[o.WALLET_SNAP_PERMISSION_KEY]}else{const[,n]=await d(e);t.result=n.data[o.WALLET_SNAP_PERMISSION_KEY]}}catch(e){t.error=e}return u()},hookNames:{installSnaps:!0,requestPermissions:!0,getPermissions:!0}},n.hasRequestedSnaps=a,n.getSnapPermissionsRequest=c},{"../restricted/invokeSnap.cjs":169,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/utils":327}],153:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.resolveInterfaceHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("@metamask/utils");n.resolveInterfaceHandler={methodNames:["snap_resolveInterface"],implementation:async function(e,t,n,s,{resolveInterface:a}){const{params:c}=e;try{const e=function(e){try{return(0,i.create)(e,o)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{id:n,value:s}=e;await a(n,s),t.result=null}catch(e){return s(e)}return s()},hookNames:{resolveInterface:!0}};const o=(0,i.object)({id:(0,i.string)(),value:s.JsonStruct})},{"@metamask/rpc-errors":96,"@metamask/superstruct":310,"@metamask/utils":327}],154:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.scheduleBackgroundEventHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),s=e("@metamask/snaps-utils"),o=e("@metamask/superstruct"),a=e("@metamask/utils"),c=e("luxon"),u=e("../endowments/index.cjs");n.scheduleBackgroundEventHandler={methodNames:["snap_scheduleBackgroundEvent"],implementation:async function(e,t,n,i,{scheduleBackgroundEvent:s,hasPermission:l}){const{params:d}=e;if(!l(u.SnapEndowments.Cronjob))return i(r.providerErrors.unauthorized());try{const e=function(e){try{return(0,o.create)(e,h)}catch(e){if(e instanceof o.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(d),{request:n}=e,i=function(e){if("duration"in e)return c.DateTime.fromJSDate(new Date).toUTC().plus(c.Duration.fromISO(e.duration));return c.DateTime.fromISO(e.date,{setZone:!0})}(e),u=i.startOf("second").toISO({suppressMilliseconds:!0});(0,a.assert)(u);const l=s({date:u,request:n});t.result=l}catch(e){return i(e)}return i()},hookNames:{scheduleBackgroundEvent:!0,hasPermission:!0}};const l=(0,o.object)({date:s.ISO8601DateStruct,request:s.CronjobRpcRequestStruct}),d=(0,o.object)({duration:s.ISO8601DurationStruct,request:s.CronjobRpcRequestStruct}),h=(0,i.selectiveUnion)((e=>(0,a.hasProperty)(e,"date")?l:d))},{"../endowments/index.cjs":120,"@metamask/rpc-errors":96,"@metamask/snaps-sdk":177,"@metamask/snaps-utils":288,"@metamask/superstruct":310,"@metamask/utils":327,luxon:520}],155:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.set=n.setStateHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("../restricted/manageState.cjs"),a=e("../utils.cjs");n.setStateHandler={methodNames:["snap_setState"],implementation:async function(e,t,n,a,{hasPermission:l,getSnapState:d,getUnlockPromise:h,updateSnapState:f}){const{params:p}=e;if(!l(o.manageStateBuilder.targetName))return a(r.providerErrors.unauthorized());try{const e=function(e){try{return(0,i.create)(e,c)}catch(e){if(e instanceof i.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(p),{key:n,value:l,encrypted:m=!0}=e;if(void 0===n&&!(0,s.isObject)(l))return a(r.rpcErrors.invalidParams("Invalid params: Value must be an object if key is not provided."));m&&await h(!0);const y=await async function(e,t,n,r){if(void 0===e)return(0,s.assert)((0,s.isObject)(t)),t;const i=await r(n);return u(i,e,t)}(n,l,m,d);if((0,s.getJsonSize)(y)>o.STORAGE_SIZE_LIMIT)throw r.rpcErrors.invalidParams({message:`Invalid params: The new state must not exceed ${o.STORAGE_SIZE_LIMIT/1e6} MB in size.`});await f(y,m),t.result=null}catch(e){return a(e)}return a()},hookNames:{hasPermission:!0,getSnapState:!0,getUnlockPromise:!0,updateSnapState:!0}};const c=(0,i.object)({key:(0,i.optional)(a.StateKeyStruct),value:s.JsonStruct,encrypted:(0,i.optional)((0,i.boolean)())});function u(e,t,n){const i=t.split(),o=e??{};let c=o;for(let e=0;e<i.length;e++){const t=i[e];if(a.FORBIDDEN_KEYS.includes(t))throw r.rpcErrors.invalidParams("Invalid params: Key contains forbidden characters.");if(e===i.length-1)return c[t]=n,o;if((0,s.hasProperty)(c,t)&&null!==c[t]){if(!(0,s.isObject)(c[t]))throw r.rpcErrors.invalidParams("Invalid params: Cannot overwrite non-object value.")}else c[t]={};c=c[t]}throw new Error("Unexpected error while setting the state.")}n.set=u},{"../restricted/manageState.cjs":171,"../utils.cjs":173,"@metamask/rpc-errors":96,"@metamask/superstruct":310,"@metamask/utils":327}],156:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.updateInterfaceHandler=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-sdk"),s=e("@metamask/superstruct");n.updateInterfaceHandler={methodNames:["snap_updateInterface"],implementation:async function(e,t,n,i,{updateInterface:a}){const{params:c}=e;try{const e=function(e){try{return(0,s.create)(e,o)}catch(e){if(e instanceof s.StructError)throw r.rpcErrors.invalidParams({message:`Invalid params: ${e.message}.`});throw r.rpcErrors.internal()}}(c),{id:n,ui:i,context:u}=e;await a(n,i,u),t.result=null}catch(e){return i(e)}return i()},hookNames:{updateInterface:!0}};const o=(0,s.object)({id:(0,s.string)(),ui:i.ComponentOrElementStruct,context:(0,s.optional)(i.InterfaceContextStruct)})},{"@metamask/rpc-errors":96,"@metamask/snaps-sdk":177,"@metamask/superstruct":310}],157:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.caveatMappers=n.caveatSpecifications=void 0;const r=e("./permittedCoinTypes.cjs"),i=e("./permittedDerivationPaths.cjs"),s=e("./snapIds.cjs"),o=e("../getBip32Entropy.cjs"),a=e("../getBip32PublicKey.cjs"),c=e("../getBip44Entropy.cjs"),u=e("../invokeSnap.cjs");n.caveatSpecifications={...i.PermittedDerivationPathsCaveatSpecification,...r.PermittedCoinTypesCaveatSpecification,...s.SnapIdsCaveatSpecification},n.caveatMappers={[o.getBip32EntropyBuilder.targetName]:i.permittedDerivationPathsCaveatMapper,[a.getBip32PublicKeyBuilder.targetName]:i.permittedDerivationPathsCaveatMapper,[c.getBip44EntropyBuilder.targetName]:r.permittedCoinTypesCaveatMapper,[u.invokeSnapBuilder.targetName]:s.snapIdsCaveatMapper}},{"../getBip32Entropy.cjs":162,"../getBip32PublicKey.cjs":163,"../getBip44Entropy.cjs":164,"../invokeSnap.cjs":169,"./permittedCoinTypes.cjs":158,"./permittedDerivationPaths.cjs":159,"./snapIds.cjs":160}],158:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PermittedCoinTypesCaveatSpecification=n.validateBIP44Caveat=n.validateBIP44Params=n.permittedCoinTypesCaveatMapper=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/utils");function o(e){if(!(0,s.isPlainObject)(e)||!(0,s.hasProperty)(e,"coinType"))throw r.rpcErrors.invalidParams({message:"Expected a plain object containing a coin type."});if("number"!=typeof e.coinType||!Number.isInteger(e.coinType)||e.coinType<0||e.coinType>2147483647)throw r.rpcErrors.invalidParams({message:'Invalid "coinType" parameter. Coin type must be a non-negative integer.'});if((0,s.hasProperty)(e,"source")&&void 0!==e.source&&"string"!=typeof e.source)throw r.rpcErrors.invalidParams({message:'Invalid "source" parameter. Source must be a string if provided.'});if(i.FORBIDDEN_COIN_TYPES.includes(e.coinType))throw r.rpcErrors.invalidParams({message:`Coin type ${e.coinType} is forbidden.`})}function a(e){if(!(0,s.hasProperty)(e,"value")||!Array.isArray(e.value)||0===e.value.length)throw r.rpcErrors.invalidParams({message:"Expected non-empty array of coin types."});e.value.forEach(o)}n.permittedCoinTypesCaveatMapper=function(e){return{caveats:[{type:i.SnapCaveatType.PermittedCoinTypes,value:e}]}},n.validateBIP44Params=o,n.validateBIP44Caveat=a,n.PermittedCoinTypesCaveatSpecification={[i.SnapCaveatType.PermittedCoinTypes]:Object.freeze({type:i.SnapCaveatType.PermittedCoinTypes,decorator:(e,t)=>async n=>{const{params:i}=n;o(i);if(!t.value.find((e=>e.coinType===i.coinType)))throw r.providerErrors.unauthorized({message:"The requested coin type is not permitted. Allowed coin types must be specified in the snap manifest."});return await e(n)},validator:e=>a(e)})}},{"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/utils":327}],159:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PermittedDerivationPathsCaveatSpecification=n.validateBIP32CaveatPaths=n.validateBIP32Path=n.permittedDerivationPathsCaveatMapper=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/superstruct"),o=e("@metamask/utils");function a(e){(0,o.assertStruct)(e,i.Bip32EntropyStruct,"Invalid BIP-32 entropy path definition",r.rpcErrors.invalidParams)}function c(e){(0,o.assertStruct)(e,(0,s.type)({value:(0,s.size)((0,s.array)(i.Bip32EntropyStruct),1,1/0)}),"Invalid BIP-32 entropy caveat",r.rpcErrors.internal)}n.permittedDerivationPathsCaveatMapper=function(e){return{caveats:[{type:i.SnapCaveatType.PermittedDerivationPaths,value:e}]}},n.validateBIP32Path=a,n.validateBIP32CaveatPaths=c,n.PermittedDerivationPathsCaveatSpecification={[i.SnapCaveatType.PermittedDerivationPaths]:Object.freeze({type:i.SnapCaveatType.PermittedDerivationPaths,decorator:(e,t)=>async n=>{const{params:s}=n;a(s);if(!t.value.find((e=>(0,i.isEqual)(s.path.slice(0,e.path.length),e.path)&&e.curve===s.curve)))throw r.providerErrors.unauthorized({message:"The requested path is not permitted. Allowed paths must be specified in the snap manifest."});return await e(n)},validator:e=>c(e)})}},{"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/superstruct":310,"@metamask/utils":327}],160:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SnapIdsCaveatSpecification=n.validateSnapIdsCaveat=n.snapIdsCaveatMapper=void 0;const r=e("@metamask/rpc-errors"),i=e("@metamask/snaps-utils"),s=e("@metamask/superstruct"),o=e("@metamask/utils");function a(e){(0,o.assertStruct)(e,(0,s.type)({value:i.SnapIdsStruct}),"Expected caveat to have a value property of a non-empty object of snap IDs.",r.rpcErrors.invalidParams)}n.snapIdsCaveatMapper=function(e){return{caveats:[{type:i.SnapCaveatType.SnapIds,value:e}]}},n.validateSnapIdsCaveat=a,n.SnapIdsCaveatSpecification={[i.SnapCaveatType.SnapIds]:Object.freeze({type:i.SnapCaveatType.SnapIds,validator:e=>a(e),decorator:(e,t)=>async n=>{const{params:r,context:{origin:i}}=n,s=t.value,{snapId:a}=r;if(!(0,o.hasProperty)(s,a))throw new Error(`${i} does not have permission to invoke ${a} snap.`);return await e(n)}})}},{"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/superstruct":310,"@metamask/utils":327}],161:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getDialogImplementation=n.dialogBuilder=n.DIALOG_APPROVAL_TYPES=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-sdk"),o=e("@metamask/superstruct"),a=e("@metamask/utils"),c="snap_dialog";n.DIALOG_APPROVAL_TYPES={[s.DialogType.Alert]:`${c}:alert`,[s.DialogType.Confirmation]:`${c}:confirmation`,[s.DialogType.Prompt]:`${c}:prompt`,default:c};const u=(0,o.optional)((0,o.size)((0,o.string)(),1,40));n.dialogBuilder=Object.freeze({targetName:c,specificationBuilder:({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:c,allowedCaveats:e,methodImplementation:S(t),subjectTypes:[r.SubjectType.Snap]}),methodHooks:{requestUserApproval:!0,createInterface:!0,getInterface:!0}});const l=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Alert),content:s.ComponentOrElementStruct}),d=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Alert),id:(0,o.string)()}),h=(0,s.selectiveUnion)((e=>(0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"id")?d:l)),f=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Confirmation),content:s.ComponentOrElementStruct}),p=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Confirmation),id:(0,o.string)()}),m=(0,s.selectiveUnion)((e=>(0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"id")?p:f)),y=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Prompt),content:s.ComponentOrElementStruct,placeholder:u}),g=(0,o.object)({type:(0,s.enumValue)(s.DialogType.Prompt),id:(0,o.string)(),placeholder:u}),b=(0,s.selectiveUnion)((e=>(0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"id")?g:y)),w=(0,o.object)({content:s.ComponentOrElementStruct}),v=(0,o.object)({id:(0,o.string)()}),x=(0,s.selectiveUnion)((e=>(0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"id")?v:w)),E=(0,s.selectiveUnion)((e=>{if((0,a.isPlainObject)(e)&&(0,a.hasProperty)(e,"type"))switch(e.type){case s.DialogType.Alert:return h;case s.DialogType.Confirmation:return m;case s.DialogType.Prompt:return b;default:throw new Error(`The "type" property must be one of: ${Object.values(s.DialogType).join(", ")}.`)}return x}));function S({requestUserApproval:e,createInterface:t,getInterface:r}){return async function(c){const{params:u,context:{origin:l}}=c;if(!(0,a.isObject)(u))throw i.rpcErrors.invalidParams({message:"Invalid params: Expected params to be a single object."});const d=function(e){try{return(0,o.create)(e,E)}catch(e){throw i.rpcErrors.invalidParams({message:`Invalid params: ${e.message}`})}}(u),h=function(e){return function(e){return(0,a.hasProperty)(e,"type")?e.type:void 0}(e)===s.DialogType.Prompt}(d)?d.placeholder:void 0,f=(0,a.hasProperty)(d,"type")?d.type:"default",p=n.DIALOG_APPROVAL_TYPES[f];if((0,a.hasProperty)(d,"content")){const r=await t(l,d.content);return e({id:p===n.DIALOG_APPROVAL_TYPES.default?r:void 0,origin:l,type:p,requestData:{id:r,placeholder:h}})}return function(e,t,n){try{n(e,t)}catch(e){throw i.rpcErrors.invalidParams({message:`Invalid params: ${e.message}`})}}(l,d.id,r),e({id:p===n.DIALOG_APPROVAL_TYPES.default?d.id:void 0,origin:l,type:p,requestData:{id:d.id,placeholder:h}})}}n.getDialogImplementation=S},{"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-sdk":177,"@metamask/superstruct":310,"@metamask/utils":327}],162:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBip32EntropyImplementation=n.getBip32EntropyBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/utils"),a=e("../utils.cjs"),c="snap_getBip32Entropy";function u({getMnemonic:e,getMnemonicSeed:t,getUnlockPromise:n,getClientCryptography:r}){return async function(i){await n(!0);const{params:s}=i;if((0,o.assert)(s),"secp256k1"===s.curve||"ed25519"===s.curve){const e=await(0,a.getValueFromEntropySource)(t,s.source);return(await(0,a.getNodeFromSeed)({curve:s.curve,path:s.path,seed:e,cryptographicFunctions:r()})).toJSON()}const c=await(0,a.getValueFromEntropySource)(e,s.source);return(await(0,a.getNodeFromMnemonic)({curve:s.curve,path:s.path,secretRecoveryPhrase:c,cryptographicFunctions:r()})).toJSON()}}n.getBip32EntropyBuilder=Object.freeze({targetName:c,specificationBuilder:({methodHooks:e})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:c,allowedCaveats:[s.SnapCaveatType.PermittedDerivationPaths],methodImplementation:u(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==s.SnapCaveatType.PermittedDerivationPaths)throw i.rpcErrors.invalidParams({message:`Expected a single "${s.SnapCaveatType.PermittedDerivationPaths}" caveat.`})},subjectTypes:[r.SubjectType.Snap]}),methodHooks:{getMnemonic:!0,getMnemonicSeed:!0,getUnlockPromise:!0,getClientCryptography:!0}}),n.getBip32EntropyImplementation=u},{"../utils.cjs":173,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/utils":327}],163:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBip32PublicKeyImplementation=n.getBip32PublicKeyBuilder=n.Bip32PublicKeyArgsStruct=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/superstruct"),a=e("@metamask/utils"),c=e("../utils.cjs"),u="snap_getBip32PublicKey";n.Bip32PublicKeyArgsStruct=(0,s.bip32entropy)((0,o.object)({path:s.Bip32PathStruct,curve:s.CurveStruct,compressed:(0,o.optional)((0,o.boolean)()),source:(0,o.optional)((0,o.string)())}));function l({getMnemonic:e,getMnemonicSeed:t,getUnlockPromise:r,getClientCryptography:s}){return async function(o){await r(!0),(0,a.assertStruct)(o.params,n.Bip32PublicKeyArgsStruct,"Invalid BIP-32 public key params",i.rpcErrors.invalidParams);const{params:u}=o;if("secp256k1"===u.curve||"ed25519"===u.curve){const e=await(0,c.getValueFromEntropySource)(t,u.source),n=await(0,c.getNodeFromSeed)({curve:u.curve,path:u.path,seed:e,cryptographicFunctions:s()});return u.compressed?n.compressedPublicKey:n.publicKey}const l=await(0,c.getValueFromEntropySource)(e,u.source),d=await(0,c.getNodeFromMnemonic)({curve:u.curve,path:u.path,secretRecoveryPhrase:l,cryptographicFunctions:s()});return u.compressed?d.compressedPublicKey:d.publicKey}}n.getBip32PublicKeyBuilder=Object.freeze({targetName:u,specificationBuilder:({methodHooks:e})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:[s.SnapCaveatType.PermittedDerivationPaths],methodImplementation:l(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==s.SnapCaveatType.PermittedDerivationPaths)throw i.rpcErrors.invalidParams({message:`Expected a single "${s.SnapCaveatType.PermittedDerivationPaths}" caveat.`})},subjectTypes:[r.SubjectType.Snap]}),methodHooks:{getMnemonic:!0,getMnemonicSeed:!0,getUnlockPromise:!0,getClientCryptography:!0}}),n.getBip32PublicKeyImplementation=l},{"../utils.cjs":173,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/superstruct":310,"@metamask/utils":327}],164:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBip44EntropyImplementation=n.getBip44EntropyBuilder=void 0;const r=e("@metamask/key-tree"),i=e("@metamask/permission-controller"),s=e("@metamask/rpc-errors"),o=e("@metamask/snaps-utils"),a=e("../utils.cjs"),c="snap_getBip44Entropy";function u({getMnemonicSeed:e,getUnlockPromise:t,getClientCryptography:n}){return async function(i){await t(!0);const s=i.params,o=await(0,a.getValueFromEntropySource)(e,s.source);return(await r.BIP44CoinTypeNode.fromSeed({derivationPath:[o,"bip32:44'",`bip32:${s.coinType}'`],network:"mainnet"},n())).toJSON()}}n.getBip44EntropyBuilder=Object.freeze({targetName:c,specificationBuilder:({methodHooks:e})=>({permissionType:i.PermissionType.RestrictedMethod,targetName:c,allowedCaveats:[o.SnapCaveatType.PermittedCoinTypes],methodImplementation:u(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==o.SnapCaveatType.PermittedCoinTypes)throw s.rpcErrors.invalidParams({message:`Expected a single "${o.SnapCaveatType.PermittedCoinTypes}" caveat.`})},subjectTypes:[i.SubjectType.Snap]}),methodHooks:{getMnemonicSeed:!0,getUnlockPromise:!0,getClientCryptography:!0}}),n.getBip44EntropyImplementation=u},{"../utils.cjs":173,"@metamask/key-tree":68,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288}],165:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getEntropyBuilder=n.GetEntropyArgsStruct=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils"),o=e("@metamask/superstruct"),a=e("@metamask/utils"),c=e("../utils.cjs"),u="snap_getEntropy";n.GetEntropyArgsStruct=(0,o.object)({version:(0,o.literal)(1),salt:(0,o.optional)((0,o.string)()),source:(0,o.optional)((0,o.string)())});function l({getMnemonicSeed:e,getUnlockPromise:t,getClientCryptography:r}){return async function(o){const{params:u,context:{origin:l}}=o;(0,a.assertStruct)(u,n.GetEntropyArgsStruct,'Invalid "snap_getEntropy" parameters',i.rpcErrors.invalidParams),await t(!0);const d=await(0,c.getValueFromEntropySource)(e,u.source);return(0,c.deriveEntropyFromSeed)({input:l,salt:u.salt,seed:d,magic:s.SIP_6_MAGIC_VALUE,cryptographicFunctions:r()})}}n.getEntropyBuilder=Object.freeze({targetName:u,specificationBuilder:({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:e,methodImplementation:l(t),subjectTypes:[r.SubjectType.Snap]}),methodHooks:{getMnemonicSeed:!0,getUnlockPromise:!0,getClientCryptography:!0}})},{"../utils.cjs":173,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288,"@metamask/superstruct":310,"@metamask/utils":327}],166:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getImplementation=n.getLocaleBuilder=n.specificationBuilder=void 0;const r=e("@metamask/permission-controller"),i="snap_getLocale";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:i,allowedCaveats:e,methodImplementation:s(t),subjectTypes:[r.SubjectType.Snap]});function s({getPreferences:e}){return async function(t){return e().locale}}n.getLocaleBuilder=Object.freeze({targetName:i,specificationBuilder:n.specificationBuilder,methodHooks:{getPreferences:!0}}),n.getImplementation=s},{"@metamask/permission-controller":79}],167:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getImplementation=n.getPreferencesBuilder=n.specificationBuilder=void 0;const r=e("@metamask/permission-controller"),i="snap_getPreferences";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:i,allowedCaveats:e,methodImplementation:s(t),subjectTypes:[r.SubjectType.Snap]});function s({getPreferences:e}){return async function(t){return e()}}n.getPreferencesBuilder=Object.freeze({targetName:i,specificationBuilder:n.specificationBuilder,methodHooks:{getPreferences:!0}}),n.getImplementation=s},{"@metamask/permission-controller":79}],168:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.DIALOG_APPROVAL_TYPES=n.restrictedMethodPermissionBuilders=n.getEncryptionEntropy=n.WALLET_SNAP_PERMISSION_KEY=void 0;const s=e("./dialog.cjs"),o=e("./getBip32Entropy.cjs"),a=e("./getBip32PublicKey.cjs"),c=e("./getBip44Entropy.cjs"),u=e("./getEntropy.cjs"),l=e("./getLocale.cjs"),d=e("./getPreferences.cjs"),h=e("./invokeSnap.cjs"),f=e("./manageAccounts.cjs"),p=e("./manageState.cjs"),m=e("./notify.cjs");var y=e("./invokeSnap.cjs");Object.defineProperty(n,"WALLET_SNAP_PERMISSION_KEY",{enumerable:!0,get:function(){return y.WALLET_SNAP_PERMISSION_KEY}});var g=e("./manageState.cjs");Object.defineProperty(n,"getEncryptionEntropy",{enumerable:!0,get:function(){return g.getEncryptionEntropy}}),n.restrictedMethodPermissionBuilders={[s.dialogBuilder.targetName]:s.dialogBuilder,[o.getBip32EntropyBuilder.targetName]:o.getBip32EntropyBuilder,[a.getBip32PublicKeyBuilder.targetName]:a.getBip32PublicKeyBuilder,[c.getBip44EntropyBuilder.targetName]:c.getBip44EntropyBuilder,[u.getEntropyBuilder.targetName]:u.getEntropyBuilder,[h.invokeSnapBuilder.targetName]:h.invokeSnapBuilder,[p.manageStateBuilder.targetName]:p.manageStateBuilder,[m.notifyBuilder.targetName]:m.notifyBuilder,[f.manageAccountsBuilder.targetName]:f.manageAccountsBuilder,[l.getLocaleBuilder.targetName]:l.getLocaleBuilder,[d.getPreferencesBuilder.targetName]:d.getPreferencesBuilder},i(e("./caveats/index.cjs"),n);var b=e("./dialog.cjs");Object.defineProperty(n,"DIALOG_APPROVAL_TYPES",{enumerable:!0,get:function(){return b.DIALOG_APPROVAL_TYPES}})},{"./caveats/index.cjs":157,"./dialog.cjs":161,"./getBip32Entropy.cjs":162,"./getBip32PublicKey.cjs":163,"./getBip44Entropy.cjs":164,"./getEntropy.cjs":165,"./getLocale.cjs":166,"./getPreferences.cjs":167,"./invokeSnap.cjs":169,"./manageAccounts.cjs":170,"./manageState.cjs":171,"./notify.cjs":172}],169:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getInvokeSnapImplementation=n.invokeSnapBuilder=n.handleSnapInstall=n.WALLET_SNAP_PERMISSION_KEY=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-utils");n.WALLET_SNAP_PERMISSION_KEY="wallet_snap";n.handleSnapInstall=async({requestData:e,messagingSystem:t})=>{const r=e.permissions[n.WALLET_SNAP_PERMISSION_KEY].caveats?.[0].value,i=t.call("SnapController:getPermitted",e.metadata.origin),s=Object.keys(r).reduce(((e,t)=>(i[t]||(e[t]=r[t]),e)),{});return t.call("SnapController:install",e.metadata.origin,s)};function o({getSnap:e,handleSnapRpcRequest:t}){return async function(n){const{params:r={},context:o}=n,{snapId:a,request:c}=r;if(!e(a))throw i.rpcErrors.invalidRequest({message:`The snap "${a}" is not installed. Please install it first, before invoking the snap.`});const{origin:u}=o;return await t({snapId:a,origin:u,request:c,handler:s.HandlerType.OnRpcRequest})}}n.invokeSnapBuilder=Object.freeze({targetName:n.WALLET_SNAP_PERMISSION_KEY,specificationBuilder:({methodHooks:e})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:n.WALLET_SNAP_PERMISSION_KEY,allowedCaveats:[s.SnapCaveatType.SnapIds],methodImplementation:o(e),validator:({caveats:e})=>{if(1!==e?.length||e[0].type!==s.SnapCaveatType.SnapIds)throw i.rpcErrors.invalidParams({message:`Expected a single "${s.SnapCaveatType.SnapIds}" caveat.`})},sideEffect:{onPermitted:n.handleSnapInstall}}),methodHooks:{getSnap:!0,handleSnapRpcRequest:!0}}),n.getInvokeSnapImplementation=o},{"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-utils":288}],170:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.manageAccountsBuilder=n.manageAccountsImplementation=n.specificationBuilder=n.methodName=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=(0,i.union)([(0,i.object)({method:(0,i.string)()}),(0,i.object)({method:(0,i.string)(),params:(0,i.union)([(0,i.array)(s.JsonStruct),(0,i.record)((0,i.string)(),s.JsonStruct)])})]);n.methodName="snap_manageAccounts";function a({getSnapKeyring:e}){return async function(t){const{context:{origin:n},params:r}=t;(0,i.assert)(r,o);const s=await e(n);return await s.handleKeyringSnapMessage(n,r)}}n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:n.methodName,allowedCaveats:e,methodImplementation:a(t),subjectTypes:[r.SubjectType.Snap]}),n.manageAccountsImplementation=a,n.manageAccountsBuilder=Object.freeze({targetName:n.methodName,specificationBuilder:n.specificationBuilder,methodHooks:{getSnapKeyring:!0}})},{"@metamask/permission-controller":79,"@metamask/superstruct":310,"@metamask/utils":327}],171:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedParams=n.getManageStateImplementation=n.getEncryptionEntropy=n.STORAGE_SIZE_LIMIT=n.manageStateBuilder=n.specificationBuilder=n.STATE_ENCRYPTION_SALT=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-sdk"),o=e("@metamask/snaps-utils"),a=e("@metamask/utils"),c=e("../utils.cjs");n.STATE_ENCRYPTION_SALT="snap_manageState encryption";const u="snap_manageState";n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:e,methodImplementation:l(t),subjectTypes:[r.SubjectType.Snap]});function l({getUnlockPromise:e,clearSnapState:t,getSnapState:n,updateSnapState:r}){return async function(o){const{params:a={},method:c,context:{origin:u}}=o,l=d(a,c),h=l.encrypted??!0;switch(h&&l.operation!==s.ManageStateOperation.ClearState&&await e(!0),l.operation){case s.ManageStateOperation.ClearState:return t(u,h),null;case s.ManageStateOperation.GetState:return await n(u,h);case s.ManageStateOperation.UpdateState:return await r(u,l.newState,h),null;default:throw i.rpcErrors.invalidParams(`Invalid ${c} operation: "${l.operation}"`)}}}function d(e,t,r=n.STORAGE_SIZE_LIMIT){if(!(0,a.isObject)(e))throw i.rpcErrors.invalidParams({message:"Expected params to be a single object."});const{operation:o,newState:c,encrypted:u}=e;if(!o||"string"!=typeof o||!Object.values(s.ManageStateOperation).includes(o))throw i.rpcErrors.invalidParams({message:'Must specify a valid manage state "operation});if(void 0!==u&&"boolean"!=typeof u)throw i.rpcErrors.invalidParams({message:'"encrypted" parameter must be a boolean if specified.'});if(o===s.ManageStateOperation.UpdateState){if(!(0,a.isObject)(c))throw i.rpcErrors.invalidParams({message:`Invalid ${t} "newState" parameter: The new state must be a plain object.`});let e;try{e=(0,a.getJsonSize)(c)}catch{throw i.rpcErrors.invalidParams({message:`Invalid ${t} "newState" parameter: The new state must be JSON serializable.`})}if(e>r)throw i.rpcErrors.invalidParams({message:`Invalid ${t} "newState" parameter: The new state must not exceed ${r/1e6} MB in size.`})}return e}n.manageStateBuilder=Object.freeze({targetName:u,specificationBuilder:n.specificationBuilder,methodHooks:{getUnlockPromise:!0,clearSnapState:!0,getSnapState:!0,updateSnapState:!0}}),n.STORAGE_SIZE_LIMIT=64e6,n.getEncryptionEntropy=async function({seed:e,snapId:t,cryptographicFunctions:r}){return await(0,c.deriveEntropyFromSeed)({seed:e,input:t,salt:n.STATE_ENCRYPTION_SALT,magic:o.STATE_ENCRYPTION_MAGIC_VALUE,cryptographicFunctions:r})},n.getManageStateImplementation=l,n.getValidatedParams=d},{"../utils.cjs":173,"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-sdk":177,"@metamask/snaps-utils":288,"@metamask/utils":327}],172:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidatedParams=n.getImplementation=n.notifyBuilder=n.specificationBuilder=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/rpc-errors"),s=e("@metamask/snaps-sdk"),o=e("@metamask/snaps-utils"),a=e("@metamask/superstruct"),c=e("@metamask/utils"),u="snap_notify",l=(0,a.object)({type:(0,s.enumValue)(s.NotificationType.Native),message:(0,a.string)()}),d=(0,a.object)({type:(0,s.enumValue)(s.NotificationType.InApp),message:(0,a.string)()}),h=(0,a.object)({type:(0,s.enumValue)(s.NotificationType.InApp),message:(0,a.string)(),content:s.ComponentOrElementStruct,title:(0,a.string)(),footerLink:(0,a.optional)((0,a.object)({href:(0,a.string)(),text:(0,a.string)()}))}),f=(0,s.union)([d,h,l]);n.specificationBuilder=({allowedCaveats:e=null,methodHooks:t})=>({permissionType:r.PermissionType.RestrictedMethod,targetName:u,allowedCaveats:e,methodImplementation:p(t),subjectTypes:[r.SubjectType.Snap]});function p({showNativeNotification:e,showInAppNotification:t,isOnPhishingList:n,maybeUpdatePhishingList:r,createInterface:o,getSnap:a}){return async function(u){const{params:l,context:{origin:d}}=u;await r();const h=m(l,n,a);if((0,c.hasProperty)(h,"content")){const e=await o(d,h.content,void 0,s.ContentType.Notification);h.content=e}switch(h.type){case s.NotificationType.Native:return await e(d,h);case s.NotificationType.InApp:return await t(d,h);default:throw i.rpcErrors.invalidParams({message:'Must specify a valid notification "type})}}}function m(e,t,n){if(!(0,c.isObject)(e))throw i.rpcErrors.invalidParams({message:"Expected params to be a single object."});const{type:r,message:a}=e;if(!r||"string"!=typeof r||!Object.values(s.NotificationType).includes(r))throw i.rpcErrors.invalidParams({message:'Must specify a valid notification "type});const u=!a||"string"!=typeof a;if(r===s.NotificationType.Native&&(u||a.length>=50))throw i.rpcErrors.invalidParams({message:'Must specify a non-empty string "message" less than 50 characters long.'});if(r===s.NotificationType.InApp&&(u||a.length>=500))throw i.rpcErrors.invalidParams({message:'Must specify a non-empty string "message" less than 500 characters long.'});try{const r=(0,o.createUnion)(e,f,"type");return(0,o.validateTextLinks)(r.message,t,n),(0,c.hasProperty)(r,"footerLink")&&(0,o.validateLink)(r.footerLink.href,t,n),r}catch(e){throw i.rpcErrors.invalidParams({message:`Invalid params: ${(0,s.getErrorMessage)(e)}`})}}n.notifyBuilder=Object.freeze({targetName:u,specificationBuilder:n.specificationBuilder,methodHooks:{showNativeNotification:!0,showInAppNotification:!0,isOnPhishingList:!0,maybeUpdatePhishingList:!0,createInterface:!0,getSnap:!0}}),n.getImplementation=p,n.getValidatedParams=m},{"@metamask/permission-controller":79,"@metamask/rpc-errors":96,"@metamask/snaps-sdk":177,"@metamask/snaps-utils":288,"@metamask/superstruct":310,"@metamask/utils":327}],173:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValueFromEntropySource=n.StateKeyStruct=n.isValidStateKey=n.getNodeFromSeed=n.getNodeFromMnemonic=n.getPathPrefix=n.deriveEntropyFromSeed=n.selectHooks=n.FORBIDDEN_KEYS=void 0;const r=e("@metamask/key-tree"),i=e("@metamask/rpc-errors"),s=e("@metamask/superstruct"),o=e("@metamask/utils"),a=e("@noble/hashes/sha3"),c=2147483648;function u({input:e,salt:t,magic:n}){const r=(0,o.stringToBytes)(e),i=(0,o.stringToBytes)(t),s=function(e){const t=[],n=(0,o.createDataView)(e);for(let e=0;e<8;e++){const r=(n.getUint32(4*e)|c)>>>0;t.push(`bip32:${r-c}'`)}return t}((0,a.keccak_256)((0,o.concatBytes)([r,(0,a.keccak_256)(i)])));return[`bip32:${n}`,...s]}function l(e){switch(e){case"secp256k1":return"bip32";case"ed25519":return"slip10";case"ed25519Bip32":return"cip3";default:return(0,o.assertExhaustive)(e)}}function d(e){return void 0===e||e.split().every((e=>e.length>0))}n.FORBIDDEN_KEYS=["constructor","__proto__","prototype"],n.selectHooks=function(e,t){if(t)return Object.keys(t).reduce(((t,n)=>{const r=n;return t[r]=e[r],t}),{})},n.deriveEntropyFromSeed=async function({input:e,salt:t="",seed:n,magic:i,cryptographicFunctions:s}){const a=u({input:e,salt:t,magic:i}),{privateKey:c}=await r.SLIP10Node.fromSeed({derivationPath:[n,...a],curve:"secp256k1"},s);return(0,o.assert)(c,"Failed to derive the entropy."),(0,o.add0x)(c)},n.getPathPrefix=l,n.getNodeFromMnemonic=async function({curve:e,secretRecoveryPhrase:t,path:n,cryptographicFunctions:i}){const s=l(e);return await r.SLIP10Node.fromDerivationPath({curve:e,derivationPath:[t,...n.slice(1).map((e=>`${s}:${e}`))]},i)},n.getNodeFromSeed=async function({curve:e,seed:t,path:n,cryptographicFunctions:i}){const s=l(e);return await r.SLIP10Node.fromSeed({curve:e,derivationPath:[t,...n.slice(1).map((e=>`${s}:${e}`))]},i)},n.isValidStateKey=d,n.StateKeyStruct=(0,s.refine)((0,s.string)(),"state key",(e=>!!d(e)||"Invalid state key. Each part of the key must be non-empty.")),n.getValueFromEntropySource=async function(e,t){try{return await e(t)}catch(e){if(e instanceof Error)throw i.rpcErrors.invalidParams({message:e.message});throw i.rpcErrors.internal({message:"An unknown error occurred.",data:{error:e.toString()}})}}},{"@metamask/key-tree":68,"@metamask/rpc-errors":96,"@metamask/superstruct":310,"@metamask/utils":327,"@noble/hashes/sha3":366}],174:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UserRejectedRequestError=n.UnsupportedMethodError=n.UnauthorizedError=n.DisconnectedError=n.ChainDisconnectedError=n.TransactionRejected=n.ResourceUnavailableError=n.ResourceNotFoundError=n.ParseError=n.MethodNotSupportedError=n.MethodNotFoundError=n.LimitExceededError=n.InvalidRequestError=n.InvalidParamsError=n.InvalidInputError=n.InternalError=void 0;const r=e("@metamask/rpc-errors"),i=e("./internals/index.cjs");n.InternalError=(0,i.createSnapError)(r.rpcErrors.internal),n.InvalidInputError=(0,i.createSnapError)(r.rpcErrors.invalidInput),n.InvalidParamsError=(0,i.createSnapError)(r.rpcErrors.invalidParams),n.InvalidRequestError=(0,i.createSnapError)(r.rpcErrors.invalidRequest),n.LimitExceededError=(0,i.createSnapError)(r.rpcErrors.limitExceeded),n.MethodNotFoundError=(0,i.createSnapError)(r.rpcErrors.methodNotFound),n.MethodNotSupportedError=(0,i.createSnapError)(r.rpcErrors.methodNotSupported),n.ParseError=(0,i.createSnapError)(r.rpcErrors.parse),n.ResourceNotFoundError=(0,i.createSnapError)(r.rpcErrors.resourceNotFound),n.ResourceUnavailableError=(0,i.createSnapError)(r.rpcErrors.resourceUnavailable),n.TransactionRejected=(0,i.createSnapError)(r.rpcErrors.transactionRejected),n.ChainDisconnectedError=(0,i.createSnapError)(r.providerErrors.chainDisconnected),n.DisconnectedError=(0,i.createSnapError)(r.providerErrors.disconnected),n.UnauthorizedError=(0,i.createSnapError)(r.providerErrors.unauthorized),n.UnsupportedMethodError=(0,i.createSnapError)(r.providerErrors.unsupportedMethod),n.UserRejectedRequestError=(0,i.createSnapError)(r.providerErrors.userRejectedRequest)},{"./internals/index.cjs":180,"@metamask/rpc-errors":96}],175:[function(e,t,n){"use strict";var r,i,s,o,a=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},c=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.SnapError=void 0;const u=e("./internals/index.cjs");class l extends Error{constructor(e,t={}){const n=(0,u.getErrorMessage)(e);super(n),r.set(this,void 0),i.set(this,void 0),s.set(this,void 0),o.set(this,void 0),a(this,i,n,"f"),a(this,r,(0,u.getErrorCode)(e),"f");const c={...(0,u.getErrorData)(e),...t};Object.keys(c).length>0&&a(this,s,c,"f"),a(this,o,super.stack,"f")}get name(){return"SnapError"}get code(){return c(this,r,"f")}get message(){return c(this,i,"f")}get data(){return c(this,s,"f")}get stack(){return c(this,o,"f")}toJSON(){return{code:u.SNAP_ERROR_CODE,message:u.SNAP_ERROR_MESSAGE,data:{cause:{code:this.code,message:this.message,stack:this.stack,...this.data?{data:this.data}:{}}}}}serialize(){return this.toJSON()}}n.SnapError=l,r=new WeakMap,i=new WeakMap,s=new WeakMap,o=new WeakMap},{"./internals/index.cjs":180}],176:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getImageComponent=n.getImageData=void 0;const r=e("@metamask/utils"),i=e("./ui/index.cjs");async function s(e,t){const n=await async function(e,t){if("function"!=typeof fetch)throw new Error(`Failed to fetch image data from "${e}": Using this function requires the "endowment:network-access" permission.`);return fetch(e,t).then((async t=>{if(!t.ok)throw new Error(`Failed to fetch image data from "${e}": ${t.status} ${t.statusText}`);const n=await t.blob();return(0,r.assert)("image/jpeg"===n.type||"image/png"===n.type,"Expected image data to be a JPEG or PNG image."),n}))}(e,t),i=new Uint8Array(await n.arrayBuffer());return`data:${n.type};base64,${(0,r.bytesToBase64)(i)}`}n.getImageData=s,n.getImageComponent=async function(e,{width:t,height:n=t,request:o}){(0,r.assert)("number"==typeof t&&t>0,"Expected width to be a number greater than 0."),(0,r.assert)("number"==typeof n&&n>0,"Expected height to be a number greater than 0.");const a=await s(e,o),c=`width="${t}" height="${n}"`;return(0,i.image)(`<svg ${c.trim()} xmlns="http://www.w3.org/2000/svg"><image ${c.trim()} href="${a}" /></svg>`)}},{"./ui/index.cjs":257,"@metamask/utils":327}],177:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.assert=n.nonEmptyRecord=n.selectiveUnion=n.typedUnion=n.enumValue=n.union=n.literal=n.SNAP_ERROR_MESSAGE=n.SNAP_ERROR_CODE=n.getErrorStack=n.getErrorMessage=n.getErrorData=void 0;var s=e("./internals/index.cjs");Object.defineProperty(n,"getErrorData",{enumerable:!0,get:function(){return s.getErrorData}}),Object.defineProperty(n,"getErrorMessage",{enumerable:!0,get:function(){return s.getErrorMessage}}),Object.defineProperty(n,"getErrorStack",{enumerable:!0,get:function(){return s.getErrorStack}}),Object.defineProperty(n,"SNAP_ERROR_CODE",{enumerable:!0,get:function(){return s.SNAP_ERROR_CODE}}),Object.defineProperty(n,"SNAP_ERROR_MESSAGE",{enumerable:!0,get:function(){return s.SNAP_ERROR_MESSAGE}}),Object.defineProperty(n,"literal",{enumerable:!0,get:function(){return s.literal}}),Object.defineProperty(n,"union",{enumerable:!0,get:function(){return s.union}}),Object.defineProperty(n,"enumValue",{enumerable:!0,get:function(){return s.enumValue}}),Object.defineProperty(n,"typedUnion",{enumerable:!0,get:function(){return s.typedUnion}}),Object.defineProperty(n,"selectiveUnion",{enumerable:!0,get:function(){return s.selectiveUnion}}),Object.defineProperty(n,"nonEmptyRecord",{enumerable:!0,get:function(){return s.nonEmptyRecord}});var o=e("@metamask/utils");Object.defineProperty(n,"assert",{enumerable:!0,get:function(){return o.assert}}),i(e("./errors.cjs"),n),i(e("./error-wrappers.cjs"),n),i(e("./images.cjs"),n),i(e("./types/index.cjs"),n),i(e("./ui/index.cjs"),n)},{"./error-wrappers.cjs":174,"./errors.cjs":175,"./images.cjs":176,"./internals/index.cjs":180,"./types/index.cjs":235,"./ui/index.cjs":257,"@metamask/utils":327}],178:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapError=void 0;const r=e("../errors.cjs");n.createSnapError=function(e){return class extends r.SnapError{constructor(t,n){if("object"==typeof t){const n=e();return void super({code:n.code,message:n.message,data:t})}const r=e(t);super({code:r.code,message:r.message,data:n})}}}},{"../errors.cjs":175}],179:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getErrorData=n.getErrorCode=n.getErrorStack=n.getErrorMessage=n.SNAP_ERROR_MESSAGE=n.SNAP_ERROR_CODE=void 0;const r=e("@metamask/utils");n.SNAP_ERROR_CODE=-31002,n.SNAP_ERROR_MESSAGE="Snap Error",n.getErrorMessage=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"message")&&"string"==typeof e.message?e.message:String(e)},n.getErrorStack=function(e){if((0,r.isObject)(e)&&(0,r.hasProperty)(e,"stack")&&"string"==typeof e.stack)return e.stack},n.getErrorCode=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"code")&&"number"==typeof e.code&&Number.isInteger(e.code)?e.code:-32603},n.getErrorData=function(e){return(0,r.isObject)(e)&&(0,r.hasProperty)(e,"data")&&"object"==typeof e.data&&null!==e.data&&(0,r.isValidJson)(e.data)&&!Array.isArray(e.data)?e.data:{}}},{"@metamask/utils":327}],180:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./error-wrappers.cjs"),n),i(e("./errors.cjs"),n),i(e("./structs.cjs"),n),i(e("./jsx.cjs"),n),i(e("./svg.cjs"),n)},{"./error-wrappers.cjs":178,"./errors.cjs":179,"./jsx.cjs":181,"./structs.cjs":182,"./svg.cjs":183}],181:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.nullUnion=void 0;const r=e("./structs.cjs");n.nullUnion=function(e){return(0,r.union)(e)}},{"./structs.cjs":182}],182:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.nonEmptyRecord=n.selectiveUnion=n.typedUnion=n.enumValue=n.union=n.literal=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");function s(e){return(0,r.define)(JSON.stringify(e),(0,r.literal)(e).validator)}n.literal=s,n.union=function([e,...t]){const n=(0,r.union)([e,...t]);return new r.Struct({...n,schema:[e,...t]})},n.enumValue=function(e){return s(e)},n.typedUnion=function(e){const t=e.map((e=>"union"===e.type&&Array.isArray(e.schema)?e.schema:e)).flat(1/0),n=t.map((({schema:e})=>e.type.type)),s=t.reduce(((e,t)=>(e[JSON.parse(t.schema.type.type)]=t,e)),{});return new r.Struct({type:"union",schema:t,*entries(e,t){if(!(0,i.isObject)(e)||!(0,i.hasProperty)(e,"type")||"string"!=typeof e.type)return;const{type:n}=e,r=s[n];if(r)for(const n of r.entries(e,t))yield n},coercer(e,t){if(!(0,i.isObject)(e)||!(0,i.hasProperty)(e,"type")||"string"!=typeof e.type)return e;const{type:n}=e,r=s[n];return r?r.coercer(e,t):e},*refiner(e,t){const n=s[e.type];yield*n.refiner(e,t)},validator(e,t){if(!(0,i.isObject)(e)||!(0,i.hasProperty)(e,"type")||"string"!=typeof e.type)return`Expected type to be one of: ${n.join(", ")}, but received: undefined`;const{type:r}=e,o=s[r];return o?o.validator(e,t):`Expected type to be one of: ${n.join(", ")}, but received: "${r}"`}})},n.selectiveUnion=function(e){return new r.Struct({type:"union",schema:null,*entries(t,n){const r=e(t);for(const e of r.entries(t,n))yield e},*refiner(t,n){const r=e(t);yield*r.refiner(t,n)},coercer:(t,n)=>e(t).coercer(t,n),validator:(t,n)=>e(t).validator(t,n)})},n.nonEmptyRecord=function(e,t){return(0,r.refine)((0,r.record)(e,t),"Non-empty record",(e=>!Array.isArray(e)&&Object.keys(e).length>0))}},{"@metamask/superstruct":310,"@metamask/utils":327}],183:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.svg=void 0;const r=e("@metamask/superstruct");n.svg=function(){return(0,r.refine)((0,r.string)(),"SVG",(e=>!!e.includes("<svg")||"Value is not a valid SVG."))}},{"@metamask/superstruct":310}],184:[function(e,t,n){"use strict";function r(e){return Object.fromEntries(Object.entries(e).filter((([,e])=>void 0!==e)))}Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapComponent=void 0,n.createSnapComponent=function(e){return t=>{const{key:n=null,...i}=t;return{type:e,props:r(i),key:n}}}},{}],185:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Address=void 0;const r=e("../component.cjs");n.Address=(0,r.createSnapComponent)("Address")},{"../component.cjs":184}],186:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Avatar=void 0;const r=e("../component.cjs");n.Avatar=(0,r.createSnapComponent)("Avatar")},{"../component.cjs":184}],187:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Banner=void 0;const r=e("../component.cjs");n.Banner=(0,r.createSnapComponent)("Banner")},{"../component.cjs":184}],188:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Box=void 0;const r=e("../component.cjs");n.Box=(0,r.createSnapComponent)("Box")},{"../component.cjs":184}],189:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Card=void 0;const r=e("../component.cjs");n.Card=(0,r.createSnapComponent)("Card")},{"../component.cjs":184}],190:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Container=void 0;const r=e("../component.cjs");n.Container=(0,r.createSnapComponent)("Container")},{"../component.cjs":184}],191:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Copyable=void 0;const r=e("../component.cjs");n.Copyable=(0,r.createSnapComponent)("Copyable")},{"../component.cjs":184}],192:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Divider=void 0;const r=e("../component.cjs");n.Divider=(0,r.createSnapComponent)("Divider")},{"../component.cjs":184}],193:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Footer=void 0;const r=e("../component.cjs");n.Footer=(0,r.createSnapComponent)("Footer")},{"../component.cjs":184}],194:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Heading=void 0;const r=e("../component.cjs");n.Heading=(0,r.createSnapComponent)("Heading")},{"../component.cjs":184}],195:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Icon=n.IconName=void 0;const r=e("../component.cjs");var i;!function(e){e.AddSquare="add-square",e.Add="add",e.Arrow2Down="arrow-2-down",e.Arrow2Left="arrow-2-left",e.Arrow2Right="arrow-2-right",e.Arrow2Up="arrow-2-up",e.Arrow2UpRight="arrow-2-up-right",e.ArrowDoubleLeft="arrow-double-left",e.ArrowDoubleRight="arrow-double-right",e.ArrowDown="arrow-down",e.ArrowLeft="arrow-left",e.ArrowRight="arrow-right",e.ArrowUp="arrow-up",e.BankToken="bank-token",e.Bank="bank",e.Book="book",e.Bookmark="bookmark",e.Bridge="bridge",e.Calculator="calculator",e.CardPos="card-pos",e.CardToken="card-token",e.Card="card",e.Category="category",e.Chart="chart",e.CheckBold="check-bold",e.Check="check",e.Clock="clock",e.Close="close",e.CodeCircle="code-circle",e.Coin="coin",e.Confirmation="confirmation",e.Connect="connect",e.CopySuccess="copy-success",e.Copy="copy",e.Customize="customize",e.Danger="danger",e.Dark="dark",e.Data="data",e.Diagram="diagram",e.DocumentCode="document-code",e.DragDrop="drag-drop",e.DraggingAnimation="dragging-animation",e.PinningAnimation="pinning-animation",e.Edit="edit",e.Eraser="eraser",e.Ethereum="ethereum",e.Expand="expand",e.Explore="explore",e.Export="export",e.EyeSlash="eye-slash",e.Eye="eye",e.Filter="filter",e.Flag="flag",e.FlashSlash="flash-slash",e.Flash="flash",e.FullCircle="full-circle",e.Gas="gas",e.GlobalSearch="global-search",e.Global="global",e.Graph="graph",e.Hardware="hardware",e.Heart="heart",e.Hierarchy="hierarchy",e.Home="home",e.Import="import",e.Info="info",e.Key="key",e.Light="light",e.Link="link",e.Loading="loading",e.LockCircle="lock-circle",e.LockSlash="lock-slash",e.Lock="lock",e.Login="login",e.Logout="logout",e.Menu="menu",e.MessageQuestion="message-question",e.Messages="messages",e.MinusBold="minus-bold",e.MinusSquare="minus-square",e.Minus="minus",e.Mobile="mobile",e.Money="money",e.Monitor="monitor",e.MoreHorizontal="more-horizontal",e.MoreVertical="more-vertical",e.NotificationCircle="notification-circle",e.Notification="notification",e.PasswordCheck="password-check",e.People="people",e.Pin="pin",e.ProgrammingArrows="programming-arrows",e.Custody="custody",e.Question="question",e.Received="received",e.Refresh="refresh",e.Save="save",e.ScanBarcode="scan-barcode",e.ScanFocus="scan-focus",e.Scan="scan",e.Scroll="scroll",e.Search="search",e.SecurityCard="security-card",e.SecurityCross="security-cross",e.SecurityKey="security-key",e.SecuritySearch="security-search",e.SecuritySlash="security-slash",e.SecurityTick="security-tick",e.SecurityTime="security-time",e.SecurityUser="security-user",e.Security="security",e.Send1="send-1",e.Send2="send-2",e.Setting="setting",e.Slash="slash",e.SnapsMobile="snaps-mobile",e.SnapsPlus="snaps-plus",e.Snaps="snaps",e.Speedometer="speedometer",e.Star="star",e.Stake="stake",e.Student="student",e.SwapHorizontal="swap-horizontal",e.SwapVertical="swap-vertical",e.Tag="tag",e.Tilde="tilde",e.Timer="timer",e.Trash="trash",e.TrendDown="trend-down",e.TrendUp="trend-up",e.UserCircleAdd="user-circle-add",e.UserCircleLink="user-circle-link",e.UserCircleRemove="user-circle-remove",e.UserCircle="user-circle",e.User="user",e.WalletCard="wallet-card",e.WalletMoney="wallet-money",e.Wallet="wallet",e.Warning="warning",e.Twitter="twitter",e.QrCode="qr-code",e.UserCheck="user-check",e.Unpin="unpin",e.Ban="ban",e.Bold="bold",e.CircleX="circle-x",e.Download="download",e.FileIcon="file",e.Flask="flask",e.Plug="plug",e.Share="share",e.Square="square",e.Tint="tint",e.Upload="upload",e.Usb="usb",e.Wifi="wifi",e.PlusMinus="plus-minus"}(i||(n.IconName=i={}));n.Icon=(0,r.createSnapComponent)("Icon")},{"../component.cjs":184}],196:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Image=void 0;const r=e("../component.cjs");n.Image=(0,r.createSnapComponent)("Image")},{"../component.cjs":184}],197:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Link=void 0;const r=e("../component.cjs");n.Link=(0,r.createSnapComponent)("Link")},{"../component.cjs":184}],198:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Row=void 0;const r=e("../component.cjs");n.Row=(0,r.createSnapComponent)("Row")},{"../component.cjs":184}],199:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Section=void 0;const r=e("../component.cjs");n.Section=(0,r.createSnapComponent)("Section")},{"../component.cjs":184}],200:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Skeleton=void 0;const r=e("../component.cjs");n.Skeleton=(0,r.createSnapComponent)("Skeleton")},{"../component.cjs":184}],201:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Spinner=void 0;const r=e("../component.cjs");n.Spinner=(0,r.createSnapComponent)("Spinner")},{"../component.cjs":184}],202:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Text=void 0;const r=e("../component.cjs");n.Text=(0,r.createSnapComponent)("Text")},{"../component.cjs":184}],203:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Tooltip=void 0;const r=e("../component.cjs");n.Tooltip=(0,r.createSnapComponent)("Tooltip")},{"../component.cjs":184}],204:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Value=void 0;const r=e("../component.cjs");n.Value=(0,r.createSnapComponent)("Value")},{"../component.cjs":184}],205:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AddressInput=void 0;const r=e("../../component.cjs");n.AddressInput=(0,r.createSnapComponent)("AddressInput")},{"../../component.cjs":184}],206:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AssetSelector=void 0;const r=e("../../component.cjs");n.AssetSelector=(0,r.createSnapComponent)("AssetSelector")},{"../../component.cjs":184}],207:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Button=void 0;const r=e("../../component.cjs");n.Button=(0,r.createSnapComponent)("Button")},{"../../component.cjs":184}],208:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Checkbox=void 0;const r=e("../../component.cjs");n.Checkbox=(0,r.createSnapComponent)("Checkbox")},{"../../component.cjs":184}],209:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Dropdown=void 0;const r=e("../../component.cjs");n.Dropdown=(0,r.createSnapComponent)("Dropdown")},{"../../component.cjs":184}],210:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Field=void 0;const r=e("../../component.cjs");n.Field=(0,r.createSnapComponent)("Field")},{"../../component.cjs":184}],211:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FileInput=void 0;const r=e("../../component.cjs");n.FileInput=(0,r.createSnapComponent)("FileInput")},{"../../component.cjs":184}],212:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Form=void 0;const r=e("../../component.cjs");n.Form=(0,r.createSnapComponent)("Form")},{"../../component.cjs":184}],213:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Input=void 0;const r=e("../../component.cjs");n.Input=(0,r.createSnapComponent)("Input")},{"../../component.cjs":184}],214:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Option=void 0;const r=e("../../component.cjs");n.Option=(0,r.createSnapComponent)("Option")},{"../../component.cjs":184}],215:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Radio=void 0;const r=e("../../component.cjs");n.Radio=(0,r.createSnapComponent)("Radio")},{"../../component.cjs":184}],216:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RadioGroup=void 0;const r=e("../../component.cjs");n.RadioGroup=(0,r.createSnapComponent)("RadioGroup")},{"../../component.cjs":184}],217:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Selector=void 0;const r=e("../../component.cjs");n.Selector=(0,r.createSnapComponent)("Selector")},{"../../component.cjs":184}],218:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SelectorOption=void 0;const r=e("../../component.cjs");n.SelectorOption=(0,r.createSnapComponent)("SelectorOption")},{"../../component.cjs":184}],219:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./AssetSelector.cjs"),n),i(e("./Button.cjs"),n),i(e("./Checkbox.cjs"),n),i(e("./Dropdown.cjs"),n),i(e("./Option.cjs"),n),i(e("./Radio.cjs"),n),i(e("./RadioGroup.cjs"),n),i(e("./Field.cjs"),n),i(e("./FileInput.cjs"),n),i(e("./Form.cjs"),n),i(e("./Input.cjs"),n),i(e("./Selector.cjs"),n),i(e("./SelectorOption.cjs"),n),i(e("./AddressInput.cjs"),n)},{"./AddressInput.cjs":205,"./AssetSelector.cjs":206,"./Button.cjs":207,"./Checkbox.cjs":208,"./Dropdown.cjs":209,"./Field.cjs":210,"./FileInput.cjs":211,"./Form.cjs":212,"./Input.cjs":213,"./Option.cjs":214,"./Radio.cjs":215,"./RadioGroup.cjs":216,"./Selector.cjs":217,"./SelectorOption.cjs":218}],220:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Bold=void 0;const r=e("../../component.cjs");e("../Text.cjs");n.Bold=(0,r.createSnapComponent)("Bold")},{"../../component.cjs":184,"../Text.cjs":202}],221:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Italic=void 0;const r=e("../../component.cjs");n.Italic=(0,r.createSnapComponent)("Italic")},{"../../component.cjs":184}],222:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./Bold.cjs"),n),i(e("./Italic.cjs"),n)},{"./Bold.cjs":220,"./Italic.cjs":221}],223:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./form/index.cjs"),n),i(e("./formatting/index.cjs"),n),i(e("./Address.cjs"),n),i(e("./Avatar.cjs"),n),i(e("./Box.cjs"),n),i(e("./Card.cjs"),n),i(e("./Copyable.cjs"),n),i(e("./Divider.cjs"),n),i(e("./Value.cjs"),n),i(e("./Heading.cjs"),n),i(e("./Icon.cjs"),n),i(e("./Image.cjs"),n),i(e("./Link.cjs"),n),i(e("./Row.cjs"),n),i(e("./Spinner.cjs"),n),i(e("./Text.cjs"),n),i(e("./Tooltip.cjs"),n),i(e("./Footer.cjs"),n),i(e("./Container.cjs"),n),i(e("./Section.cjs"),n),i(e("./Banner.cjs"),n),i(e("./Skeleton.cjs"),n)},{"./Address.cjs":185,"./Avatar.cjs":186,"./Banner.cjs":187,"./Box.cjs":188,"./Card.cjs":189,"./Container.cjs":190,"./Copyable.cjs":191,"./Divider.cjs":192,"./Footer.cjs":193,"./Heading.cjs":194,"./Icon.cjs":195,"./Image.cjs":196,"./Link.cjs":197,"./Row.cjs":198,"./Section.cjs":199,"./Skeleton.cjs":200,"./Spinner.cjs":201,"./Text.cjs":202,"./Tooltip.cjs":203,"./Value.cjs":204,"./form/index.cjs":219,"./formatting/index.cjs":222}],224:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.FieldChildUnionStruct=n.FormChildStruct=n.BoxChildStruct=n.assertJSXElement=n.isJSXElementUnsafe=n.isJSXElement=n.RootJSXElementStruct=n.JSXElementStruct=void 0,i(e("./component.cjs"),n),i(e("./components/index.cjs"),n),i(e("./jsx-runtime.cjs"),n),i(e("./jsx-dev-runtime.cjs"),n);var s=e("./validation.cjs");Object.defineProperty(n,"JSXElementStruct",{enumerable:!0,get:function(){return s.JSXElementStruct}}),Object.defineProperty(n,"RootJSXElementStruct",{enumerable:!0,get:function(){return s.RootJSXElementStruct}}),Object.defineProperty(n,"isJSXElement",{enumerable:!0,get:function(){return s.isJSXElement}}),Object.defineProperty(n,"isJSXElementUnsafe",{enumerable:!0,get:function(){return s.isJSXElementUnsafe}}),Object.defineProperty(n,"assertJSXElement",{enumerable:!0,get:function(){return s.assertJSXElement}}),Object.defineProperty(n,"BoxChildStruct",{enumerable:!0,get:function(){return s.BoxChildStruct}}),Object.defineProperty(n,"FormChildStruct",{enumerable:!0,get:function(){return s.FormChildStruct}}),Object.defineProperty(n,"FieldChildUnionStruct",{enumerable:!0,get:function(){return s.FieldChildUnionStruct}})},{"./component.cjs":184,"./components/index.cjs":223,"./jsx-dev-runtime.cjs":225,"./jsx-runtime.cjs":226,"./validation.cjs":227}],225:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.jsxDEV=void 0;const r=e("./jsx-runtime.cjs"),i=e("./validation.cjs");n.jsxDEV=function(e,t,n){const s=(0,r.jsx)(e,t,n);return(0,i.assertJSXElement)(s),s}},{"./jsx-runtime.cjs":226,"./validation.cjs":227}],226:[function(e,t,n){"use strict";function r(e,t,n){if("string"==typeof e)throw new Error(`An HTML element ("${String(e)}") was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.`);if(!e)throw new Error("A JSX fragment was used in a Snap component, which is not supported by Snaps UI. Please use one of the supported Snap components.");return e({...t,key:n})}Object.defineProperty(n,"__esModule",{value:!0}),n.jsxs=n.jsx=void 0,n.jsx=r,n.jsxs=function(e,t,n){return r(e,t,n)}},{}],227:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SpinnerStruct=n.RowStruct=n.BannerStruct=n.TooltipStruct=n.TooltipContentStruct=n.TooltipChildStruct=n.ValueStruct=n.TextStruct=n.SkeletonStruct=n.LinkStruct=n.HeadingStruct=n.DividerStruct=n.CopyableStruct=n.FooterStruct=n.FooterChildStruct=n.SectionStruct=n.FormStruct=n.FormChildStruct=n.BoxStruct=n.BoxChildrenStruct=n.AvatarStruct=n.FormattingStruct=n.ItalicStruct=n.BoldStruct=n.FieldStruct=n.FieldChildUnionStruct=n.FileInputStruct=n.RadioGroupStruct=n.RadioStruct=n.AssetSelectorStruct=n.SelectorStruct=n.SelectorOptionStruct=n.CardStruct=n.AddressStruct=n.DropdownStruct=n.OptionStruct=n.AddressInputStruct=n.InputStruct=n.NumberInputPropsStruct=n.PasswordInputPropsStruct=n.TextInputPropsStruct=n.GenericInputPropsStruct=n.CheckboxStruct=n.ButtonStruct=n.IconStruct=n.ImageStruct=n.BorderRadiusStruct=n.ElementStruct=n.StringElementStruct=n.KeyStruct=void 0,n.assertJSXElement=n.isJSXElementUnsafe=n.isJSXElement=n.JSXElementStruct=n.RootJSXElementStruct=n.ContainerStruct=n.BoxChildStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("./components/index.cjs"),o=e("../internals/index.cjs"),a=e("../types/index.cjs");function c(e){const t=1===e.length?e[0]:(0,o.nullUnion)(e);return function(e){const t=(0,o.selectiveUnion)((n=>Array.isArray(n)?(0,r.array)((0,r.lazy)((()=>t))):e));return t}((0,r.nullable)((0,o.selectiveUnion)((e=>"boolean"==typeof e?(0,r.boolean)():t))))}function u(e){return(0,r.nullable)((0,o.selectiveUnion)((t=>"boolean"==typeof t?(0,r.boolean)():e)))}function l(e,t={}){return(0,r.object)({type:(0,o.literal)(e),props:(0,r.object)(t),key:(0,r.nullable)(n.KeyStruct)})}n.KeyStruct=(0,o.nullUnion)([(0,r.string)(),(0,r.number)()]),n.StringElementStruct=c([(0,r.string)()]),n.ElementStruct=(0,r.object)({type:(0,r.string)(),props:(0,r.record)((0,r.string)(),i.JsonStruct),key:(0,r.nullable)(n.KeyStruct)}),n.BorderRadiusStruct=(0,o.nullUnion)([(0,o.literal)("none"),(0,o.literal)("medium"),(0,o.literal)("full")]),n.ImageStruct=l("Image",{src:(0,o.svg)(),alt:(0,r.optional)((0,r.string)()),borderRadius:(0,r.optional)(n.BorderRadiusStruct)});const d=(0,o.nullUnion)(Object.values(s.IconName).map((e=>(0,o.literal)(e))));n.IconStruct=l("Icon",{name:d,color:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("default"),(0,o.literal)("primary"),(0,o.literal)("muted")])),size:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("md"),(0,o.literal)("inherit")]))}),n.ButtonStruct=l("Button",{children:c([n.StringElementStruct,n.ImageStruct,n.IconStruct]),name:(0,r.optional)((0,r.string)()),type:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("button"),(0,o.literal)("submit")])),variant:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("primary"),(0,o.literal)("destructive")])),size:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("sm"),(0,o.literal)("md")])),disabled:(0,r.optional)((0,r.boolean)()),loading:(0,r.optional)((0,r.boolean)()),form:(0,r.optional)((0,r.string)())}),n.CheckboxStruct=l("Checkbox",{name:(0,r.string)(),checked:(0,r.optional)((0,r.boolean)()),label:(0,r.optional)((0,r.string)()),variant:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("default"),(0,o.literal)("toggle")])),disabled:(0,r.optional)((0,r.boolean)())}),n.GenericInputPropsStruct=(0,r.object)({name:(0,r.string)(),value:(0,r.optional)((0,r.string)()),placeholder:(0,r.optional)((0,r.string)()),disabled:(0,r.optional)((0,r.boolean)())}),n.TextInputPropsStruct=(0,r.assign)(n.GenericInputPropsStruct,(0,r.object)({type:(0,o.literal)("text")})),n.PasswordInputPropsStruct=(0,r.assign)(n.GenericInputPropsStruct,(0,r.object)({type:(0,o.literal)("password")})),n.NumberInputPropsStruct=(0,r.assign)(n.GenericInputPropsStruct,(0,r.object)({type:(0,o.literal)("number"),min:(0,r.optional)((0,r.number)()),max:(0,r.optional)((0,r.number)()),step:(0,r.optional)((0,r.number)())})),n.InputStruct=function(e,t){return(0,r.object)({type:(0,o.literal)(e),props:(0,o.selectiveUnion)(t),key:(0,r.nullable)(n.KeyStruct)})}("Input",(e=>{if((0,i.isPlainObject)(e)&&(0,i.hasProperty)(e,"type"))switch(e.type){case"text":return n.TextInputPropsStruct;case"password":return n.PasswordInputPropsStruct;case"number":return n.NumberInputPropsStruct;default:return n.GenericInputPropsStruct}return n.GenericInputPropsStruct})),n.AddressInputStruct=l("AddressInput",{name:(0,r.string)(),chainId:i.CaipChainIdStruct,value:(0,r.optional)((0,r.string)()),placeholder:(0,r.optional)((0,r.string)()),disabled:(0,r.optional)((0,r.boolean)()),displayAvatar:(0,r.optional)((0,r.boolean)())}),n.OptionStruct=l("Option",{value:(0,r.string)(),children:(0,r.string)(),disabled:(0,r.optional)((0,r.boolean)())}),n.DropdownStruct=l("Dropdown",{name:(0,r.string)(),value:(0,r.optional)((0,r.string)()),children:c([n.OptionStruct]),disabled:(0,r.optional)((0,r.boolean)())}),n.AddressStruct=l("Address",{address:(0,o.selectiveUnion)((e=>"string"==typeof e&&e.startsWith("0x")?i.HexChecksumAddressStruct:i.CaipAccountIdStruct)),truncate:(0,r.optional)((0,r.boolean)()),displayName:(0,r.optional)((0,r.boolean)()),avatar:(0,r.optional)((0,r.boolean)())}),n.CardStruct=l("Card",{image:(0,r.optional)((0,r.string)()),title:(0,o.selectiveUnion)((e=>"object"==typeof e?n.AddressStruct:(0,r.string)())),description:(0,r.optional)((0,r.string)()),value:(0,r.string)(),extra:(0,r.optional)((0,r.string)())}),n.SelectorOptionStruct=l("SelectorOption",{value:(0,r.string)(),children:n.CardStruct,disabled:(0,r.optional)((0,r.boolean)())}),n.SelectorStruct=l("Selector",{name:(0,r.string)(),title:(0,r.string)(),value:(0,r.optional)((0,r.string)()),children:c([n.SelectorOptionStruct]),disabled:(0,r.optional)((0,r.boolean)())}),n.AssetSelectorStruct=l("AssetSelector",{name:(0,r.string)(),addresses:a.NonEip155CaipAccountIdsMatchedByAddressAndNamespaceStruct,chainIds:(0,r.optional)((0,r.array)(a.NonEip155ChainIdStruct)),value:(0,r.optional)(a.NonEip155AssetTypeStruct),disabled:(0,r.optional)((0,r.boolean)())}),n.RadioStruct=l("Radio",{value:(0,r.string)(),children:(0,r.string)(),disabled:(0,r.optional)((0,r.boolean)())}),n.RadioGroupStruct=l("RadioGroup",{name:(0,r.string)(),value:(0,r.optional)((0,r.string)()),children:c([n.RadioStruct]),disabled:(0,r.optional)((0,r.boolean)())}),n.FileInputStruct=l("FileInput",{name:(0,r.string)(),accept:(0,o.nullUnion)([(0,r.optional)((0,r.array)((0,r.string)()))]),compact:(0,r.optional)((0,r.boolean)()),disabled:(0,r.optional)((0,r.boolean)())});const h=[u((0,r.lazy)((()=>n.BoxChildStruct))),n.InputStruct],f=[n.InputStruct,u((0,r.lazy)((()=>n.BoxChildStruct)))],p=[u((0,r.lazy)((()=>n.BoxChildStruct))),n.InputStruct,u((0,r.lazy)((()=>n.BoxChildStruct)))],m=[n.AssetSelectorStruct,n.AddressInputStruct,n.InputStruct,n.DropdownStruct,n.RadioGroupStruct,n.FileInputStruct,n.CheckboxStruct,n.SelectorStruct];n.FieldChildUnionStruct=(0,o.nullUnion)([...m,...h,...f,...p]);const y=(0,o.selectiveUnion)((e=>{const t=Array.isArray(e);return t&&3===e.length?(0,r.tuple)(p):t&&2===e.length?"Box"===e[0]?.type?(0,r.tuple)(h):(0,r.tuple)(f):(0,o.typedUnion)(m)}));n.FieldStruct=l("Field",{label:(0,r.optional)((0,r.string)()),error:(0,r.optional)((0,r.string)()),children:y}),n.BoldStruct=l("Bold",{children:c([(0,r.string)(),(0,r.lazy)((()=>n.ItalicStruct))])}),n.ItalicStruct=l("Italic",{children:c([(0,r.string)(),(0,r.lazy)((()=>n.BoldStruct))])}),n.FormattingStruct=(0,o.typedUnion)([n.BoldStruct,n.ItalicStruct]),n.AvatarStruct=l("Avatar",{address:i.CaipAccountIdStruct,size:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("sm"),(0,o.literal)("md"),(0,o.literal)("lg")]))}),n.BoxChildrenStruct=c([(0,r.lazy)((()=>n.BoxChildStruct))]),n.BoxStruct=l("Box",{children:n.BoxChildrenStruct,direction:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("horizontal"),(0,o.literal)("vertical")])),alignment:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("start"),(0,o.literal)("center"),(0,o.literal)("end"),(0,o.literal)("space-between"),(0,o.literal)("space-around")])),crossAlignment:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("start"),(0,o.literal)("center"),(0,o.literal)("end")])),center:(0,r.optional)((0,r.boolean)())}),n.FormChildStruct=n.BoxChildrenStruct,n.FormStruct=l("Form",{children:n.FormChildStruct,name:(0,r.string)()});const g=(0,r.refine)(n.ButtonStruct,"FooterButton",(e=>{if("string"==typeof e.props.children||"boolean"==typeof e.props.children||null===e.props.children)return!0;if(Array.isArray(e.props.children)){if(!e.props.children.some((e=>"string"!=typeof e&&"boolean"!=typeof e&&null!==e)))return!0}return"Footer buttons may only contain text."}));function b(e){return(0,r.is)(e,n.JSXElementStruct)}n.SectionStruct=l("Section",{children:n.BoxChildrenStruct,direction:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("horizontal"),(0,o.literal)("vertical")])),alignment:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("start"),(0,o.literal)("center"),(0,o.literal)("end"),(0,o.literal)("space-between"),(0,o.literal)("space-around")]))}),n.FooterChildStruct=(0,o.selectiveUnion)((e=>Array.isArray(e)?(0,r.tuple)([g,g]):g)),n.FooterStruct=l("Footer",{children:n.FooterChildStruct}),n.CopyableStruct=l("Copyable",{value:(0,r.string)(),sensitive:(0,r.optional)((0,r.boolean)())}),n.DividerStruct=l("Divider"),n.HeadingStruct=l("Heading",{children:n.StringElementStruct,size:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("sm"),(0,o.literal)("md"),(0,o.literal)("lg")]))}),n.LinkStruct=l("Link",{href:(0,r.string)(),children:c([n.FormattingStruct,(0,r.string)(),n.IconStruct,n.ImageStruct,n.AddressStruct])}),n.SkeletonStruct=l("Skeleton",{width:(0,r.optional)((0,r.union)([(0,r.number)(),(0,r.string)()])),height:(0,r.optional)((0,r.union)([(0,r.number)(),(0,r.string)()])),borderRadius:(0,r.optional)(n.BorderRadiusStruct)}),n.TextStruct=l("Text",{children:c([(0,o.selectiveUnion)((e=>"string"==typeof e?(0,r.string)():(0,o.typedUnion)([n.BoldStruct,n.ItalicStruct,n.LinkStruct,n.IconStruct,n.SkeletonStruct])))]),alignment:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("start"),(0,o.literal)("center"),(0,o.literal)("end")])),color:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("default"),(0,o.literal)("alternative"),(0,o.literal)("muted"),(0,o.literal)("error"),(0,o.literal)("success"),(0,o.literal)("warning")])),size:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("sm"),(0,o.literal)("md")])),fontWeight:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("regular"),(0,o.literal)("medium"),(0,o.literal)("bold")]))}),n.ValueStruct=l("Value",{value:(0,o.selectiveUnion)((e=>"string"==typeof e?(0,r.string)():n.TextStruct)),extra:(0,o.selectiveUnion)((e=>"string"==typeof e?(0,r.string)():n.TextStruct))}),n.TooltipChildStruct=(0,o.selectiveUnion)((e=>"boolean"==typeof e?(0,r.boolean)():(0,o.typedUnion)([n.TextStruct,n.BoldStruct,n.ItalicStruct,n.LinkStruct,n.ImageStruct,n.IconStruct]))),n.TooltipContentStruct=(0,o.selectiveUnion)((e=>"string"==typeof e?(0,r.string)():(0,o.typedUnion)([n.TextStruct,n.BoldStruct,n.ItalicStruct,n.LinkStruct,n.IconStruct]))),n.TooltipStruct=l("Tooltip",{children:(0,r.nullable)(n.TooltipChildStruct),content:n.TooltipContentStruct}),n.BannerStruct=l("Banner",{children:c([n.TextStruct,n.LinkStruct,n.IconStruct,n.ButtonStruct,n.BoldStruct,n.ItalicStruct,n.SkeletonStruct]),title:(0,r.string)(),severity:(0,r.union)([(0,o.literal)("danger"),(0,o.literal)("info"),(0,o.literal)("success"),(0,o.literal)("warning")])}),n.RowStruct=l("Row",{label:(0,r.string)(),children:(0,o.typedUnion)([n.AddressStruct,n.ImageStruct,n.TextStruct,n.ValueStruct,n.LinkStruct,n.SkeletonStruct]),variant:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("default"),(0,o.literal)("warning"),(0,o.literal)("critical")])),tooltip:(0,r.optional)((0,r.string)())}),n.SpinnerStruct=l("Spinner"),n.BoxChildStruct=(0,o.typedUnion)([n.AddressStruct,n.AssetSelectorStruct,n.AddressInputStruct,n.BoldStruct,n.BoxStruct,n.ButtonStruct,n.CopyableStruct,n.DividerStruct,n.DropdownStruct,n.RadioGroupStruct,n.FieldStruct,n.FileInputStruct,n.FormStruct,n.HeadingStruct,n.InputStruct,n.ImageStruct,n.ItalicStruct,n.LinkStruct,n.RowStruct,n.SpinnerStruct,n.TextStruct,n.TooltipStruct,n.CheckboxStruct,n.CardStruct,n.IconStruct,n.SelectorStruct,n.SectionStruct,n.AvatarStruct,n.BannerStruct,n.SkeletonStruct]),n.ContainerStruct=l("Container",{children:(0,o.selectiveUnion)((e=>Array.isArray(e)?(0,r.tuple)([n.BoxChildStruct,n.FooterStruct]):n.BoxChildStruct)),backgroundColor:(0,r.optional)((0,o.nullUnion)([(0,o.literal)("default"),(0,o.literal)("alternative")]))}),n.RootJSXElementStruct=(0,o.typedUnion)([n.BoxChildStruct,n.ContainerStruct]),n.JSXElementStruct=(0,o.typedUnion)([n.AssetSelectorStruct,n.AddressInputStruct,n.ButtonStruct,n.InputStruct,n.FileInputStruct,n.FieldStruct,n.FormStruct,n.BoldStruct,n.ItalicStruct,n.AddressStruct,n.BoxStruct,n.CopyableStruct,n.DividerStruct,n.HeadingStruct,n.ImageStruct,n.LinkStruct,n.RowStruct,n.SpinnerStruct,n.TextStruct,n.DropdownStruct,n.OptionStruct,n.RadioGroupStruct,n.RadioStruct,n.ValueStruct,n.TooltipStruct,n.CheckboxStruct,n.FooterStruct,n.ContainerStruct,n.CardStruct,n.IconStruct,n.SelectorStruct,n.SelectorOptionStruct,n.SectionStruct,n.AvatarStruct,n.BannerStruct,n.SkeletonStruct]),n.isJSXElement=b,n.isJSXElementUnsafe=function(e){return(0,i.isPlainObject)(e)&&(0,i.hasProperty)(e,"type")&&(0,i.hasProperty)(e,"props")&&(0,i.hasProperty)(e,"key")},n.assertJSXElement=function(e){if(!b(e))throw new Error(`Expected a JSX element, but received ${JSON.stringify(e)}. Please refer to the documentation for the supported JSX elements and their props.`)}},{"../internals/index.cjs":180,"../types/index.cjs":235,"./components/index.cjs":223,"@metamask/superstruct":310,"@metamask/utils":327}],228:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NonEip155AssetTypeStruct=n.NonEip155ChainIdStruct=n.NonEip155CaipAccountIdsMatchedByAddressAndNamespaceStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");n.NonEip155CaipAccountIdsMatchedByAddressAndNamespaceStruct=(0,r.refine)((0,r.array)(i.CaipAccountIdStruct),"Non-EIP-155 Matching Addresses Account ID List",(e=>{const t=e.map((e=>(0,i.parseCaipAccountId)(e)));if(!t.every((({address:e,chain:{namespace:n}})=>e===t[0].address&&n===t[0].chain.namespace)))return"All account IDs must have the same address and namespace.";return!t.some((({chain:{namespace:e}})=>e===i.KnownCaipNamespace.Eip155))||"All account IDs must have non-EIP-155 namespaces."})),n.NonEip155ChainIdStruct=(0,r.refine)(i.CaipChainIdStruct,"Non-EIP-155 Chain ID",(e=>{const{namespace:t}=(0,i.parseCaipChainId)(e);return t!==i.KnownCaipNamespace.Eip155||"Chain ID must not be an EIP-155 chain ID."})),n.NonEip155AssetTypeStruct=(0,r.refine)(i.CaipAssetTypeStruct,"Non-EIP-155 Asset Type",(e=>{const{chain:{namespace:t}}=(0,i.parseCaipAssetType)(e);return t!==i.KnownCaipNamespace.Eip155||"Asset type must not be an EIP-155 asset type."}))},{"@metamask/superstruct":310,"@metamask/utils":327}],229:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],230:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OnAssetsLookupResponseStruct=n.FungibleAssetMetadataStruct=n.AssetIconUrlStruct=n.FungibleAssetUnitStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");n.FungibleAssetUnitStruct=(0,r.object)({name:(0,r.optional)((0,r.string)()),symbol:(0,r.optional)((0,r.string)()),decimals:(0,r.number)()}),n.AssetIconUrlStruct=(0,r.refine)((0,r.string)(),"Asset URL",(e=>{try{const t=new URL(e);return(0,i.assert)("https:"===t.protocol||e.startsWith("data:image/svg+xml;base64,")),!0}catch{return"Invalid URL"}})),n.FungibleAssetMetadataStruct=(0,r.object)({name:(0,r.optional)((0,r.string)()),symbol:(0,r.optional)((0,r.string)()),fungible:(0,r.literal)(!0),iconUrl:n.AssetIconUrlStruct,units:(0,r.size)((0,r.array)(n.FungibleAssetUnitStruct),1,1/0)}),n.OnAssetsLookupResponseStruct=(0,r.object)({assets:(0,r.record)(i.CaipAssetTypeStruct,(0,r.nullable)(n.FungibleAssetMetadataStruct))})},{"@metamask/superstruct":310,"@metamask/utils":327}],231:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./assets-lookup.cjs"),n),i(e("./transaction.cjs"),n),i(e("./user-input.cjs"),n)},{"./assets-lookup.cjs":230,"./transaction.cjs":232,"./user-input.cjs":233}],232:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.SeverityLevel=void 0,function(e){e.Critical="critical"}(r||(n.SeverityLevel=r={}))},{}],233:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UserInputEventStruct=n.FileUploadEventStruct=n.InputChangeEventStruct=n.FormSubmitEventStruct=n.AssetSelectorStateStruct=n.FileStruct=n.ButtonClickEventStruct=n.GenericEventStruct=n.UserInputEventType=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");var s;!function(e){e.ButtonClickEvent="ButtonClickEvent",e.FormSubmitEvent="FormSubmitEvent",e.InputChangeEvent="InputChangeEvent",e.FileUploadEvent="FileUploadEvent"}(s||(n.UserInputEventType=s={})),n.GenericEventStruct=(0,r.object)({type:(0,r.string)(),name:(0,r.optional)((0,r.string)())}),n.ButtonClickEventStruct=(0,r.assign)(n.GenericEventStruct,(0,r.object)({type:(0,r.literal)(s.ButtonClickEvent),name:(0,r.optional)((0,r.string)())})),n.FileStruct=(0,r.object)({name:(0,r.string)(),size:(0,r.number)(),contentType:(0,r.string)(),contents:(0,r.string)()}),n.AssetSelectorStateStruct=(0,r.object)({asset:i.CaipAssetTypeStruct,name:(0,r.string)(),symbol:(0,r.string)()}),n.FormSubmitEventStruct=(0,r.assign)(n.GenericEventStruct,(0,r.object)({type:(0,r.literal)(s.FormSubmitEvent),value:(0,r.record)((0,r.string)(),(0,r.nullable)((0,r.union)([(0,r.string)(),n.FileStruct,(0,r.boolean)(),n.AssetSelectorStateStruct]))),name:(0,r.string)()})),n.InputChangeEventStruct=(0,r.assign)(n.GenericEventStruct,(0,r.object)({type:(0,r.literal)(s.InputChangeEvent),name:(0,r.string)(),value:(0,r.union)([(0,r.string)(),(0,r.boolean)(),n.AssetSelectorStateStruct])})),n.FileUploadEventStruct=(0,r.assign)(n.GenericEventStruct,(0,r.object)({type:(0,r.literal)(s.FileUploadEvent),name:(0,r.string)(),file:(0,r.nullable)(n.FileStruct)})),n.UserInputEventStruct=(0,r.union)([n.ButtonClickEventStruct,n.FormSubmitEventStruct,n.InputChangeEventStruct,n.FileUploadEventStruct])},{"@metamask/superstruct":310,"@metamask/utils":327}],234:[function(e,t,n){},{}],235:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),e("./global.cjs"),e("./images.cjs"),i(e("./caip.cjs"),n),i(e("./handlers/index.cjs"),n),i(e("./methods/index.cjs"),n),i(e("./interface.cjs"),n)},{"./caip.cjs":228,"./global.cjs":229,"./handlers/index.cjs":231,"./images.cjs":234,"./interface.cjs":236,"./methods/index.cjs":239}],236:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ContentType=n.InterfaceContextStruct=n.ComponentOrElementStruct=n.InterfaceStateStruct=n.FormStateStruct=n.StateStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("./handlers/index.cjs"),o=e("../internals/index.cjs"),a=e("../jsx/index.cjs"),c=e("../ui/index.cjs");var u;n.StateStruct=(0,r.union)([s.AssetSelectorStateStruct,s.FileStruct,(0,r.string)(),(0,r.boolean)(),i.CaipAccountIdStruct]),n.FormStateStruct=(0,r.record)((0,r.string)(),(0,r.nullable)(n.StateStruct)),n.InterfaceStateStruct=(0,r.record)((0,r.string)(),(0,r.union)([n.FormStateStruct,(0,r.nullable)(n.StateStruct)])),n.ComponentOrElementStruct=(0,o.selectiveUnion)((e=>(0,i.isObject)(e)&&!(0,i.hasProperty)(e,"props")?c.ComponentStruct:a.RootJSXElementStruct)),n.InterfaceContextStruct=(0,r.record)((0,r.string)(),i.JsonStruct),function(e){e.Insight="Insight",e.Dialog="Dialog",e.Notification="Notification",e.HomePage="HomePage"}(u||(n.ContentType=u={}))},{"../internals/index.cjs":180,"../jsx/index.cjs":224,"../ui/index.cjs":257,"./handlers/index.cjs":231,"@metamask/superstruct":310,"@metamask/utils":327}],237:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.DialogType=void 0,function(e){e.Alert="alert",e.Confirmation="confirmation",e.Prompt="prompt"}(r||(n.DialogType=r={}))},{}],238:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.AuxiliaryFileEncoding=void 0,function(e){e.Base64="base64",e.Hex="hex",e.Utf8="utf8"}(r||(n.AuxiliaryFileEncoding=r={}))},{}],239:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./dialog.cjs"),n),i(e("./get-file.cjs"),n),i(e("./manage-state.cjs"),n),i(e("./notify.cjs"),n)},{"./dialog.cjs":237,"./get-file.cjs":238,"./manage-state.cjs":240,"./notify.cjs":241}],240:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.ManageStateOperation=void 0,function(e){e.ClearState="clear",e.GetState="get",e.UpdateState="update"}(r||(n.ManageStateOperation=r={}))},{}],241:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.NotificationType=void 0,function(e){e.InApp="inApp",e.Native="native"}(r||(n.NotificationType=r={}))},{}],242:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createBuilder=void 0;const r=e("@metamask/utils");n.createBuilder=function(e,t,n=[]){return(...i)=>{if(1===i.length&&(0,r.isPlainObject)(i[0])){const n={...i[0],type:e};return(0,r.assertStruct)(n,t,`Invalid ${e} component`),n}const s=n.reduce(((e,t,n)=>void 0!==i[n]?{...e,[t]:i[n]}:e),{type:e});return(0,r.assertStruct)(s,t,`Invalid ${e} component`),s}}},{"@metamask/utils":327}],243:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsComponent=n.isComponent=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("./components/index.cjs");n.isComponent=function(e){return(0,r.is)(e,s.ComponentStruct)},n.assertIsComponent=function(e){(0,i.assertStruct)(e,s.ComponentStruct,"Invalid component")}},{"./components/index.cjs":251,"@metamask/superstruct":310,"@metamask/utils":327}],244:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.address=n.AddressStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("../../internals/index.cjs"),o=e("../builder.cjs"),a=e("../nodes.cjs");n.AddressStruct=(0,r.assign)(a.LiteralStruct,(0,r.object)({type:(0,s.literal)(a.NodeType.Address),value:i.HexChecksumAddressStruct})),n.address=(0,o.createBuilder)(a.NodeType.Address,n.AddressStruct,["value"])},{"../../internals/index.cjs":180,"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":310,"@metamask/utils":327}],245:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.button=n.ButtonStruct=n.ButtonType=n.ButtonVariant=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");var a,c;!function(e){e.Primary="primary",e.Secondary="secondary"}(a||(n.ButtonVariant=a={})),function(e){e.Button="button",e.Submit="submit"}(c||(n.ButtonType=c={})),n.ButtonStruct=(0,r.assign)(o.LiteralStruct,(0,r.object)({type:(0,i.literal)(o.NodeType.Button),value:(0,r.string)(),variant:(0,r.optional)((0,r.union)([(0,i.enumValue)(a.Primary),(0,i.enumValue)(a.Secondary)])),buttonType:(0,r.optional)((0,r.union)([(0,i.enumValue)(c.Button),(0,i.enumValue)(c.Submit)])),name:(0,r.optional)((0,r.string)())})),n.button=(0,s.createBuilder)(o.NodeType.Button,n.ButtonStruct,["value","buttonType","name","variant"])},{"../../internals/index.cjs":180,"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":310}],246:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.copyable=n.CopyableStruct=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");n.CopyableStruct=(0,r.assign)(o.LiteralStruct,(0,r.object)({type:(0,i.literal)(o.NodeType.Copyable),value:(0,r.string)(),sensitive:(0,r.optional)((0,r.boolean)())})),n.copyable=(0,s.createBuilder)(o.NodeType.Copyable,n.CopyableStruct,["value","sensitive"])},{"../../internals/index.cjs":180,"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":310}],247:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.divider=n.DividerStruct=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");n.DividerStruct=(0,r.assign)(o.NodeStruct,(0,r.object)({type:(0,i.literal)(o.NodeType.Divider)})),n.divider=(0,s.createBuilder)(o.NodeType.Divider,n.DividerStruct)},{"../../internals/index.cjs":180,"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":310}],248:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.form=n.FormStruct=n.FormComponentStruct=void 0;const r=e("@metamask/superstruct"),i=e("./button.cjs"),s=e("./input.cjs"),o=e("../../internals/index.cjs"),a=e("../builder.cjs"),c=e("../nodes.cjs");n.FormComponentStruct=(0,r.union)([s.InputStruct,i.ButtonStruct]),n.FormStruct=(0,r.assign)(c.NodeStruct,(0,r.object)({type:(0,o.literal)(c.NodeType.Form),children:(0,r.array)(n.FormComponentStruct),name:(0,r.string)()})),n.form=(0,a.createBuilder)(c.NodeType.Form,n.FormStruct,["name","children"])},{"../../internals/index.cjs":180,"../builder.cjs":242,"../nodes.cjs":258,"./button.cjs":245,"./input.cjs":252,"@metamask/superstruct":310}],249:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.heading=n.HeadingStruct=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");n.HeadingStruct=(0,r.assign)(o.LiteralStruct,(0,r.object)({type:(0,i.literal)(o.NodeType.Heading),value:(0,r.string)()})),n.heading=(0,s.createBuilder)(o.NodeType.Heading,n.HeadingStruct,["value"])},{"../../internals/index.cjs":180,"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":310}],250:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.image=n.ImageStruct=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");n.ImageStruct=(0,r.assign)(o.NodeStruct,(0,r.object)({type:(0,i.literal)(o.NodeType.Image),value:(0,i.svg)()})),n.image=(0,s.createBuilder)(o.NodeType.Image,n.ImageStruct,["value"])},{"../../internals/index.cjs":180,"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":310}],251:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.PanelStruct=n.panel=n.ComponentStruct=n.ImageStruct=n.image=void 0,i(e("./address.cjs"),n),i(e("./copyable.cjs"),n),i(e("./divider.cjs"),n),i(e("./heading.cjs"),n);var s=e("./image.cjs");Object.defineProperty(n,"image",{enumerable:!0,get:function(){return s.image}}),Object.defineProperty(n,"ImageStruct",{enumerable:!0,get:function(){return s.ImageStruct}});var o=e("./panel.cjs");Object.defineProperty(n,"ComponentStruct",{enumerable:!0,get:function(){return o.ComponentStruct}}),Object.defineProperty(n,"panel",{enumerable:!0,get:function(){return o.panel}}),Object.defineProperty(n,"PanelStruct",{enumerable:!0,get:function(){return o.PanelStruct}}),i(e("./spinner.cjs"),n),i(e("./text.cjs"),n),i(e("./row.cjs"),n),i(e("./button.cjs"),n),i(e("./input.cjs"),n),i(e("./form.cjs"),n)},{"./address.cjs":244,"./button.cjs":245,"./copyable.cjs":246,"./divider.cjs":247,"./form.cjs":248,"./heading.cjs":249,"./image.cjs":250,"./input.cjs":252,"./panel.cjs":253,"./row.cjs":254,"./spinner.cjs":255,"./text.cjs":256}],252:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.input=n.InputStruct=n.InputType=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");var a;!function(e){e.Text="text",e.Number="number",e.Password="password"}(a||(n.InputType=a={})),n.InputStruct=(0,r.assign)(o.LiteralStruct,(0,r.object)({type:(0,i.literal)(o.NodeType.Input),value:(0,r.optional)((0,r.string)()),name:(0,r.string)(),inputType:(0,r.optional)((0,r.union)([(0,i.enumValue)(a.Text),(0,i.enumValue)(a.Password),(0,i.enumValue)(a.Number)])),placeholder:(0,r.optional)((0,r.string)()),label:(0,r.optional)((0,r.string)()),error:(0,r.optional)((0,r.string)())})),n.input=(0,s.createBuilder)(o.NodeType.Input,n.InputStruct,["name","inputType","placeholder","value","label"])},{"../../internals/index.cjs":180,"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":310}],253:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ComponentStruct=n.panel=n.PanelStruct=n.ParentStruct=void 0;const r=e("@metamask/superstruct"),i=e("./address.cjs"),s=e("./button.cjs"),o=e("./copyable.cjs"),a=e("./divider.cjs"),c=e("./form.cjs"),u=e("./heading.cjs"),l=e("./image.cjs"),d=e("./input.cjs"),h=e("./row.cjs"),f=e("./spinner.cjs"),p=e("./text.cjs"),m=e("../../internals/index.cjs"),y=e("../builder.cjs"),g=e("../nodes.cjs");n.ParentStruct=(0,r.assign)(g.NodeStruct,(0,r.object)({children:(0,r.array)((0,r.lazy)((()=>n.ComponentStruct)))})),n.PanelStruct=(0,r.assign)(n.ParentStruct,(0,r.object)({type:(0,m.literal)(g.NodeType.Panel)})),n.panel=(0,y.createBuilder)(g.NodeType.Panel,n.PanelStruct,["children"]),n.ComponentStruct=(0,m.typedUnion)([o.CopyableStruct,a.DividerStruct,u.HeadingStruct,l.ImageStruct,n.PanelStruct,f.SpinnerStruct,p.TextStruct,h.RowStruct,i.AddressStruct,d.InputStruct,c.FormStruct,s.ButtonStruct])},{"../../internals/index.cjs":180,"../builder.cjs":242,"../nodes.cjs":258,"./address.cjs":244,"./button.cjs":245,"./copyable.cjs":246,"./divider.cjs":247,"./form.cjs":248,"./heading.cjs":249,"./image.cjs":250,"./input.cjs":252,"./row.cjs":254,"./spinner.cjs":255,"./text.cjs":256,"@metamask/superstruct":310}],254:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.row=n.RowStruct=n.RowVariant=void 0;const r=e("@metamask/superstruct"),i=e("./address.cjs"),s=e("./image.cjs"),o=e("./text.cjs"),a=e("../../internals/index.cjs"),c=e("../builder.cjs"),u=e("../nodes.cjs");var l;!function(e){e.Default="default",e.Critical="critical",e.Warning="warning"}(l||(n.RowVariant=l={}));const d=(0,r.union)([s.ImageStruct,o.TextStruct,i.AddressStruct]);n.RowStruct=(0,r.assign)(u.LiteralStruct,(0,r.object)({type:(0,a.literal)(u.NodeType.Row),variant:(0,r.optional)((0,r.union)([(0,a.enumValue)(l.Default),(0,a.enumValue)(l.Critical),(0,a.enumValue)(l.Warning)])),label:(0,r.string)(),value:d})),n.row=(0,c.createBuilder)(u.NodeType.Row,n.RowStruct,["label","value","variant"])},{"../../internals/index.cjs":180,"../builder.cjs":242,"../nodes.cjs":258,"./address.cjs":244,"./image.cjs":250,"./text.cjs":256,"@metamask/superstruct":310}],255:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.spinner=n.SpinnerStruct=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");n.SpinnerStruct=(0,r.assign)(o.NodeStruct,(0,r.object)({type:(0,i.literal)(o.NodeType.Spinner)})),n.spinner=(0,s.createBuilder)(o.NodeType.Spinner,n.SpinnerStruct)},{"../../internals/index.cjs":180,"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":310}],256:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.text=n.TextStruct=void 0;const r=e("@metamask/superstruct"),i=e("../../internals/index.cjs"),s=e("../builder.cjs"),o=e("../nodes.cjs");n.TextStruct=(0,r.assign)(o.LiteralStruct,(0,r.object)({type:(0,i.literal)(o.NodeType.Text),value:(0,r.string)(),markdown:(0,r.optional)((0,r.boolean)())})),n.text=(0,s.createBuilder)(o.NodeType.Text,n.TextStruct,["value","markdown"])},{"../../internals/index.cjs":180,"../builder.cjs":242,"../nodes.cjs":258,"@metamask/superstruct":310}],257:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),n.NodeType=void 0,i(e("./components/index.cjs"),n),i(e("./component.cjs"),n);var s=e("./nodes.cjs");Object.defineProperty(n,"NodeType",{enumerable:!0,get:function(){return s.NodeType}})},{"./component.cjs":243,"./components/index.cjs":251,"./nodes.cjs":258}],258:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LiteralStruct=n.NodeStruct=n.NodeType=void 0;const r=e("@metamask/superstruct");var i;!function(e){e.Copyable="copyable",e.Divider="divider",e.Heading="heading",e.Panel="panel",e.Spinner="spinner",e.Text="text",e.Image="image",e.Row="row",e.Address="address",e.Button="button",e.Input="input",e.Form="form"}(i||(n.NodeType=i={})),n.NodeStruct=(0,r.object)({type:(0,r.string)()}),n.LiteralStruct=(0,r.assign)(n.NodeStruct,(0,r.object)({value:(0,r.unknown)()}))},{"@metamask/superstruct":310}],259:[function(e,t,n){t.exports=e("./dist/jsx/jsx-runtime.cjs")},{"./dist/jsx/jsx-runtime.cjs":226}],260:[function(e,t,n){t.exports=e("./dist/jsx/index.cjs")},{"./dist/jsx/index.cjs":224}],261:[function(e,t,n){t.exports={name:"@metamask/snaps-sdk",version:"6.22.0",description:"A library containing the core functionality for building MetaMask Snaps",keywords:["MetaMask","Snaps","Ethereum"],homepage:"https://github.com/MetaMask/snaps/tree/main/packages/snaps-sdk#readme",bugs:{url:"https://github.com/MetaMask/snaps/issues"},repository:{type:"git",url:"https://github.com/MetaMask/snaps.git"},license:"ISC",sideEffects:!1,exports:{:{import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"},require:{types:"./dist/index.d.cts",default:"./dist/index.cjs"}},"./jsx":{import:{types:"./dist/jsx/index.d.mts",default:"./dist/jsx/index.mjs"},require:{types:"./dist/jsx/index.d.cts",default:"./dist/jsx/index.cjs"}},"./jsx-runtime":{import:{types:"./dist/jsx/jsx-runtime.d.mts",default:"./dist/jsx/jsx-runtime.mjs"},require:{types:"./dist/jsx/jsx-runtime.d.cts",default:"./dist/jsx/jsx-runtime.cjs"}},"./jsx-dev-runtime":{import:{types:"./dist/jsx/jsx-dev-runtime.d.mts",default:"./dist/jsx/jsx-dev-runtime.mjs"},require:{types:"./dist/jsx/jsx-dev-runtime.d.cts",default:"./dist/jsx/jsx-dev-runtime.cjs"}},"./package.json":"./package.json"},main:"./dist/index.cjs",module:"./dist/index.mjs",types:"./dist/index.d.cts",files:["dist","jsx.js","jsx-dev-runtime.js","jsx-runtime.js","jsx.d.ts","jsx-dev-runtime.d.ts","jsx-runtime.d.ts"],scripts:{build:"ts-bridge --project tsconfig.build.json --verbose --clean --no-references","changelog:update":"../../scripts/update-changelog.sh @metamask/snaps-sdk","changelog:validate":"../../scripts/validate-changelog.sh @metamask/snaps-sdk",lint:"yarn lint:eslint && yarn lint:misc --check && yarn changelog:validate && yarn lint:dependencies","lint:ci":"yarn lint","lint:dependencies":"depcheck","lint:eslint":"eslint . --cache","lint:fix":"yarn lint:eslint --fix && yarn lint:misc --write","lint:misc":'prettier --no-error-on-unmatched-pattern --log-level warn "**/*.json" "**/*.md" "**/*.html" "!CHANGELOG.md" --ignore-path ../../.gitignore',"publish:preview":"yarn npm publish --tag preview","since-latest-release":"../../scripts/since-latest-release.sh",test:"jest --reporters=jest-silent-reporter","test:clean":"jest --clearCache","test:post":"jest-it-up","test:verbose":"jest --verbose","test:watch":"jest --watch"},dependencies:{"@metamask/key-tree":"^10.1.1","@metamask/providers":"^21.0.0","@metamask/rpc-errors":"^7.0.2","@metamask/superstruct":"^3.2.1","@metamask/utils":"^11.2.0"},devDependencies:{"@lavamoat/allow-scripts":"^3.0.4","@metamask/auto-changelog":"^5.0.1","@ts-bridge/cli":"^0.6.1","@types/jest":"^27.5.1",deepmerge:"^4.2.2",depcheck:"^1.4.7",eslint:"^9.11.0","expect-type":"^0.17.3",jest:"^29.0.2","jest-fetch-mock":"^3.0.3","jest-it-up":"^2.0.0","jest-silent-reporter":"^0.6.0",prettier:"^3.3.3","ts-jest":"^29.1.1",typescript:"~5.3.3"},engines:{node:"^18.16 || >=20"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"}}},{}],262:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isEqual=void 0,n.isEqual=function(e,t){return e.length===t.length&&e.every(((e,n)=>e===t[n]))}},{}],263:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateAuxiliaryFiles=n.encodeAuxiliaryFile=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/utils"),s=e("./base64.cjs"),o=e("./constants.cjs");n.encodeAuxiliaryFile=async function(e,t){if(t===r.AuxiliaryFileEncoding.Base64)return e;const n=await(0,s.decodeBase64)(e);return t===r.AuxiliaryFileEncoding.Utf8?(0,i.bytesToString)(n):(0,i.bytesToHex)(n)},n.validateAuxiliaryFiles=function(e){for(const t of e)(0,i.assert)(t.size<o.MAX_FILE_SIZE,"Static files required by the Snap must be smaller than 64 MB.")}},{"./base64.cjs":264,"./constants.cjs":268,"@metamask/snaps-sdk":177,"@metamask/utils":327}],264:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.decodeBase64=n.encodeBase64=void 0;const r=e("@metamask/utils"),i=e("./bytes.cjs");n.encodeBase64=async function(e){const t=(0,i.getBytes)(e);return"FileReader"in globalThis?await new Promise(((e,n)=>{const r=Object.assign(new FileReader,{onload:()=>e(r.result.replace("data:application/octet-stream;base64,","")),onerror:()=>n(r.error)});r.readAsDataURL(new File([t],"",{type:"application/octet-stream"}))})):(0,r.bytesToBase64)(t)},n.decodeBase64=async function(e){const t=await fetch(`data:application/octet-stream;base64,${e}`);return new Uint8Array(await t.arrayBuffer())}},{"./bytes.cjs":265,"@metamask/utils":327}],265:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getBytes=void 0;const r=e("@metamask/utils"),i=e("./virtual-file/VirtualFile.cjs");n.getBytes=function(e){const t=e instanceof i.VirtualFile?e.value:e;return"string"==typeof t?(0,r.stringToBytes)(t):t}},{"./virtual-file/VirtualFile.cjs":307,"@metamask/utils":327}],266:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.SnapCaveatType=void 0,function(e){e.PermittedDerivationPaths="permittedDerivationPaths",e.PermittedCoinTypes="permittedCoinTypes",e.SnapCronjob="snapCronjob",e.TransactionOrigin="transactionOrigin",e.SignatureOrigin="signatureOrigin",e.RpcOrigin="rpcOrigin",e.KeyringOrigin="keyringOrigin",e.SnapIds="snapIds",e.ChainIds="chainIds",e.LookupMatchers="lookupMatchers",e.MaxRequestTime="maxRequestTime",e.ProtocolSnapScopes="protocolSnapScopes"}(r||(n.SnapCaveatType=r={}))},{}],267:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checksumFiles=n.checksum=void 0;const r=e("@metamask/utils"),i=e("@noble/hashes/sha256"),s=e("./bytes.cjs");async function o(e){const t=(0,s.getBytes)(e);return"crypto"in globalThis&&"object"==typeof globalThis.crypto&&crypto.subtle?.digest?new Uint8Array(await crypto.subtle.digest("SHA-256",t)):(0,i.sha256)(t)}n.checksum=o,n.checksumFiles=async function(e){const t=await Promise.all([...e].sort(((e,t)=>((0,r.assert)(e.path!==t.path,"Tried to sort files with non-unique paths."),e.path<t.path?-1:1))).map((async e=>o(e))));return o((0,r.concatBytes)(t))}},{"./bytes.cjs":265,"@metamask/utils":327,"@noble/hashes/sha256":365}],268:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MAX_FILE_SIZE=void 0,n.MAX_FILE_SIZE=64e6},{}],269:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isCronjobSpecificationArray=n.CronjobSpecificationArrayStruct=n.isCronjobSpecification=n.CronjobSpecificationStruct=n.parseCronExpression=n.CronExpressionStruct=n.CronjobRpcRequestStruct=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("cron-parser");n.CronjobRpcRequestStruct=(0,r.object)({jsonrpc:(0,r.optional)(i.JsonRpcVersionStruct),id:(0,r.optional)(i.JsonRpcIdStruct),method:(0,r.string)(),params:(0,r.optional)(i.JsonRpcParamsStruct)}),n.CronExpressionStruct=(0,r.refine)((0,r.string)(),"CronExpression",(e=>{try{return(0,s.parseExpression)(e),!0}catch{return!1}})),n.parseCronExpression=function(e){const t=(0,r.create)(e,n.CronExpressionStruct);return(0,s.parseExpression)(t)},n.CronjobSpecificationStruct=(0,r.object)({expression:n.CronExpressionStruct,request:n.CronjobRpcRequestStruct}),n.isCronjobSpecification=function(e){try{return(0,r.create)(e,n.CronjobSpecificationStruct),!0}catch{return!1}},n.CronjobSpecificationArrayStruct=(0,r.array)(n.CronjobSpecificationStruct),n.isCronjobSpecificationArray=function(e){try{return(0,r.create)(e,n.CronjobSpecificationArrayStruct),!0}catch{return!1}}},{"@metamask/superstruct":310,"@metamask/utils":327,"cron-parser":444}],270:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.currency=void 0;const r=e("@metamask/superstruct");n.currency=function(e){const t=e.toLowerCase();return(0,r.coerce)((0,r.literal)(t),(0,r.literal)(e.toUpperCase()),(e=>(0,r.create)(e.toLowerCase(),(0,r.literal)(t))))}},{"@metamask/superstruct":310}],271:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.deepClone=void 0;const i=r(e("rfdc"));n.deepClone=(0,i.default)({proto:!1,circles:!1})},{rfdc:545}],272:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_ENDOWMENTS=void 0,n.DEFAULT_ENDOWMENTS=Object.freeze(["atob","btoa","BigInt","console","crypto","Date","Math","setTimeout","clearTimeout","SubtleCrypto","TextDecoder","TextEncoder","URL","URLSearchParams","setInterval","clearInterval","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","isSecureContext","Intl","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array","DataView","ArrayBuffer","AbortController","AbortSignal"])},{}],273:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.getSlip44ProtocolName=n.getSnapDerivationPathName=n.SNAPS_DERIVATION_PATHS=void 0;const i=r(e("@metamask/slip44")),s=e("./array.cjs");function o(e){return"1"===String(e)?"Test Networks":i.default[e]?.name??null}n.SNAPS_DERIVATION_PATHS=[{path:["m","44'","0'"],curve:"ed25519",name:"Test BIP-32 Path (ed25519)"},{path:["m","44'","1'"],curve:"secp256k1",name:"Testnet"},{path:["m","44'","0'"],curve:"secp256k1",name:"Bitcoin Legacy"},{path:["m","49'","0'"],curve:"secp256k1",name:"Bitcoin Nested SegWit"},{path:["m","49'","1'"],curve:"secp256k1",name:"Bitcoin Testnet Nested SegWit"},{path:["m","84'","0'"],curve:"secp256k1",name:"Bitcoin Native SegWit"},{path:["m","84'","1'"],curve:"secp256k1",name:"Bitcoin Testnet Native SegWit"},{path:["m","86'","0'"],curve:"secp256k1",name:"Bitcoin Taproot"},{path:["m","86'","1'"],curve:"secp256k1",name:"Bitcoin Testnet Taproot"},{path:["m","44'","501'"],curve:"ed25519",name:"Solana"},{path:["m","44'","501'","0'","0'"],curve:"ed25519",name:"Solana"},{path:["m","44'","2'"],curve:"secp256k1",name:"Litecoin"},{path:["m","44'","3'"],curve:"secp256k1",name:"Dogecoin"},{path:["m","44'","60'"],curve:"secp256k1",name:"Ethereum"},{path:["m","44'","118'"],curve:"secp256k1",name:"Atom"},{path:["m","44'","145'"],curve:"secp256k1",name:"Bitcoin Cash"},{path:["m","44'","637'"],curve:"ed25519",name:"Aptos"},{path:["m","44'","714'"],curve:"secp256k1",name:"Binance (BNB)"},{path:["m","44'","784'"],curve:"ed25519",name:"Sui"},{path:["m","44'","931'"],curve:"secp256k1",name:"THORChain (RUNE)"},{path:["m","44'","330'"],curve:"secp256k1",name:"Terra (LUNA)"},{path:["m","44'","459'"],curve:"secp256k1",name:"Kava"},{path:["m","44'","529'"],curve:"secp256k1",name:"Secret Network"},{path:["m","44'","397'","0'"],curve:"ed25519",name:"NEAR Protocol"},{path:["m","44'","1'","0'"],curve:"ed25519",name:"Testnet"},{path:["m","44'","472'"],curve:"ed25519",name:"Arweave"},{path:["m","44'","12586'"],curve:"secp256k1",name:"Mina"},{path:["m","44'","242'"],curve:"ed25519",name:"Nimiq"},{path:["m","44'","1729'","0'","0'"],curve:"ed25519",name:"Tezos"},{path:["m","1789'","0'"],curve:"ed25519",name:"Vega"},{path:["m","1852'","1815'"],curve:"ed25519Bip32",name:"Cardano"},{path:["m","44'","508'","0'","0'","0'"],curve:"ed25519",name:"MultiversX"},{path:["m","44'","709'"],curve:"secp256k1",name:"Avail"},{path:["m","44'","626'"],curve:"ed25519",name:"Kadena"},{path:["m","44'","632'"],curve:"ed25519",name:"Massa"}],n.getSnapDerivationPathName=function(e,t){const r=n.SNAPS_DERIVATION_PATHS.find((n=>n.curve===t&&(0,s.isEqual)(n.path,e)));if(r)return r.name;if("secp256k1"===t&&"m"===e[0]&&"44'"===e[1]&&e[2].endsWith("'")){return o(e[2].slice(0,-1))??null}return null},n.getSlip44ProtocolName=o},{"./array.cjs":262,"@metamask/slip44":111}],274:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.STATE_ENCRYPTION_MAGIC_VALUE=n.SIP_6_MAGIC_VALUE=void 0,n.SIP_6_MAGIC_VALUE="1399742832'",n.STATE_ENCRYPTION_MAGIC_VALUE="572232532'"},{}],275:[function(e,t,n){"use strict";var r,i,s,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n},a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(n,"__esModule",{value:!0}),n.unwrapError=n.isWrappedSnapError=n.isSerializedSnapError=n.isSnapError=n.WrappedSnapError=n.SNAP_ERROR_WRAPPER_MESSAGE=n.SNAP_ERROR_WRAPPER_CODE=void 0;const c=e("@metamask/rpc-errors"),u=e("@metamask/snaps-sdk"),l=e("@metamask/utils");n.SNAP_ERROR_WRAPPER_CODE=-31001,n.SNAP_ERROR_WRAPPER_MESSAGE="Wrapped Snap Error";class d extends Error{constructor(e){const t=(0,u.getErrorMessage)(e);super(t),r.set(this,void 0),i.set(this,void 0),s.set(this,void 0),o(this,r,e,"f"),o(this,i,t,"f"),o(this,s,(0,u.getErrorStack)(e),"f")}get name(){return"WrappedSnapError"}get message(){return a(this,i,"f")}get stack(){return a(this,s,"f")}toJSON(){const e=h(a(this,r,"f"))?a(this,r,"f").serialize():(0,c.serializeCause)(a(this,r,"f"));return{code:n.SNAP_ERROR_WRAPPER_CODE,message:n.SNAP_ERROR_WRAPPER_MESSAGE,data:{cause:e}}}serialize(){return this.toJSON()}}function h(e){if((0,l.isObject)(e)&&"serialize"in e&&"function"==typeof e.serialize){const t=e.serialize();return(0,l.isJsonRpcError)(t)&&f(t)}return!1}function f(e){return e.code===u.SNAP_ERROR_CODE&&e.message===u.SNAP_ERROR_MESSAGE}function p(e){return(0,l.isJsonRpcError)(e)&&e.code===n.SNAP_ERROR_WRAPPER_CODE&&e.message===n.SNAP_ERROR_WRAPPER_MESSAGE}function m(e,t,n,r){const i=new c.JsonRpcError(e,t,r);return i.stack=n,i}n.WrappedSnapError=d,r=new WeakMap,i=new WeakMap,s=new WeakMap,n.isSnapError=h,n.isSerializedSnapError=f,n.isWrappedSnapError=p,n.unwrapError=function(e){if(p(e)){if((0,l.isJsonRpcError)(e.data.cause)){if(f(e.data.cause)){const{code:t,message:n,stack:r,data:i}=e.data.cause.data.cause;return[m(t,n,r,i),!0]}const{code:t,message:n,stack:r,data:i}=e.data.cause;return[m(t,n,r,i),!1]}return[m(c.errorCodes.rpc.internal,(0,u.getErrorMessage)(e.data.cause),(0,u.getErrorStack)(e.data.cause)),!1]}if((0,l.isJsonRpcError)(e)){const{code:t,message:n,stack:r,data:i}=e;return[m(t,n,r,i),!1]}return[m(c.errorCodes.rpc.internal,(0,u.getErrorMessage)(e),(0,u.getErrorStack)(e)),!1]}},{"@metamask/rpc-errors":96,"@metamask/snaps-sdk":177,"@metamask/utils":327}],276:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OnAssetHistoricalPriceResponseStruct=n.AssetHistoricalPriceStruct=n.HistoricalPriceStruct=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct"),s=e("../time.cjs");n.HistoricalPriceStruct=(0,r.nonEmptyRecord)((0,i.union)([(0,i.literal)("all"),s.ISO8601DurationStruct]),(0,i.array)((0,i.tuple)([(0,i.number)(),(0,i.string)()]))),n.AssetHistoricalPriceStruct=(0,i.nullable)((0,i.object)({intervals:n.HistoricalPriceStruct,updateTime:(0,i.number)(),expirationTime:(0,i.optional)((0,i.number)())})),n.OnAssetHistoricalPriceResponseStruct=(0,i.object)({historicalPrice:n.AssetHistoricalPriceStruct})},{"../time.cjs":301,"@metamask/snaps-sdk":177,"@metamask/superstruct":310}],277:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OnAssetsConversionResponseStruct=n.AssetConversionStruct=n.MarketDataStruct=n.PricePercentChangeStruct=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("../time.cjs");n.PricePercentChangeStruct=(0,r.nonEmptyRecord)((0,i.union)([(0,i.literal)("all"),o.ISO8601DurationStruct]),(0,i.number)()),n.MarketDataStruct=(0,i.object)({marketCap:(0,i.string)(),totalVolume:(0,i.string)(),circulatingSupply:(0,i.string)(),allTimeHigh:(0,i.string)(),allTimeLow:(0,i.string)(),pricePercentChange:(0,i.optional)(n.PricePercentChangeStruct)}),n.AssetConversionStruct=(0,i.object)({rate:(0,i.string)(),marketData:(0,i.optional)(n.MarketDataStruct),conversionTime:(0,i.number)(),expirationTime:(0,i.optional)((0,i.number)())}),n.OnAssetsConversionResponseStruct=(0,i.object)({conversionRates:(0,i.record)(s.CaipAssetTypeStruct,(0,i.record)(s.CaipAssetTypeStruct,(0,i.nullable)(n.AssetConversionStruct)))})},{"../time.cjs":301,"@metamask/snaps-sdk":177,"@metamask/superstruct":310,"@metamask/utils":327}],278:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.SNAP_EXPORT_NAMES=n.SNAP_EXPORTS=void 0;const r=e("./types.cjs");n.SNAP_EXPORTS={[r.HandlerType.OnRpcRequest]:{type:r.HandlerType.OnRpcRequest,required:!0,validator:e=>"function"==typeof e},[r.HandlerType.OnTransaction]:{type:r.HandlerType.OnTransaction,required:!0,validator:e=>"function"==typeof e},[r.HandlerType.OnCronjob]:{type:r.HandlerType.OnCronjob,required:!0,validator:e=>"function"==typeof e},[r.HandlerType.OnNameLookup]:{type:r.HandlerType.OnNameLookup,required:!0,validator:e=>"function"==typeof e},[r.HandlerType.OnInstall]:{type:r.HandlerType.OnInstall,required:!1,validator:e=>"function"==typeof e},[r.HandlerType.OnUpdate]:{type:r.HandlerType.OnUpdate,required:!1,validator:e=>"function"==typeof e},[r.HandlerType.OnKeyringRequest]:{type:r.HandlerType.OnKeyringRequest,required:!0,validator:e=>"function"==typeof e},[r.HandlerType.OnHomePage]:{type:r.HandlerType.OnHomePage,required:!0,validator:e=>"function"==typeof e},[r.HandlerType.OnSettingsPage]:{type:r.HandlerType.OnSettingsPage,required:!0,validator:e=>"function"==typeof e},[r.HandlerType.OnSignature]:{type:r.HandlerType.OnSignature,required:!0,validator:e=>"function"==typeof e},[r.HandlerType.OnUserInput]:{type:r.HandlerType.OnUserInput,required:!1,validator:e=>"function"==typeof e},[r.HandlerType.OnAssetHistoricalPrice]:{type:r.HandlerType.OnAssetHistoricalPrice,required:!0,validator:e=>"function"==typeof e},[r.HandlerType.OnAssetsLookup]:{type:r.HandlerType.OnAssetsLookup,required:!0,validator:e=>"function"==typeof e},[r.HandlerType.OnAssetsConversion]:{type:r.HandlerType.OnAssetsConversion,required:!0,validator:e=>"function"==typeof e},[r.HandlerType.OnProtocolRequest]:{type:r.HandlerType.OnProtocolRequest,required:!0,validator:e=>"function"==typeof e}},n.SNAP_EXPORT_NAMES=Object.values(r.HandlerType)},{"./types.cjs":285}],279:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OnHomePageResponseStruct=n.OnHomePageResponseWithIdStruct=n.OnHomePageResponseWithContentStruct=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct");n.OnHomePageResponseWithContentStruct=(0,i.object)({content:r.ComponentOrElementStruct}),n.OnHomePageResponseWithIdStruct=(0,i.object)({id:(0,i.string)()}),n.OnHomePageResponseStruct=(0,i.union)([n.OnHomePageResponseWithContentStruct,n.OnHomePageResponseWithIdStruct])},{"@metamask/snaps-sdk":177,"@metamask/superstruct":310}],280:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./asset-historical-price.cjs"),n),i(e("./assets-conversion.cjs"),n),i(e("./exports.cjs"),n),i(e("./home-page.cjs"),n),i(e("./name-lookup.cjs"),n),i(e("./settings-page.cjs"),n),i(e("./signature.cjs"),n),i(e("./transaction.cjs"),n),i(e("./types.cjs"),n)},{"./asset-historical-price.cjs":276,"./assets-conversion.cjs":277,"./exports.cjs":278,"./home-page.cjs":279,"./name-lookup.cjs":281,"./settings-page.cjs":282,"./signature.cjs":283,"./transaction.cjs":284,"./types.cjs":285}],281:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OnNameLookupResponseStruct=n.DomainResolutionResponseStruct=n.AddressResolutionResponseStruct=n.DomainResolutionStruct=n.AddressResolutionStruct=void 0;const r=e("@metamask/superstruct");n.AddressResolutionStruct=(0,r.object)({protocol:(0,r.string)(),resolvedDomain:(0,r.string)()}),n.DomainResolutionStruct=(0,r.object)({protocol:(0,r.string)(),resolvedAddress:(0,r.string)(),domainName:(0,r.string)()}),n.AddressResolutionResponseStruct=(0,r.object)({resolvedDomains:(0,r.size)((0,r.array)(n.AddressResolutionStruct),1,1/0)}),n.DomainResolutionResponseStruct=(0,r.object)({resolvedAddresses:(0,r.size)((0,r.array)(n.DomainResolutionStruct),1,1/0)}),n.OnNameLookupResponseStruct=(0,r.nullable)((0,r.union)([n.AddressResolutionResponseStruct,n.DomainResolutionResponseStruct]))},{"@metamask/superstruct":310}],282:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OnSettingsPageResponseStruct=void 0;const r=e("./home-page.cjs");n.OnSettingsPageResponseStruct=r.OnHomePageResponseStruct},{"./home-page.cjs":279}],283:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OnSignatureResponseStruct=void 0;const r=e("./transaction.cjs");n.OnSignatureResponseStruct=r.OnTransactionResponseStruct},{"./transaction.cjs":284}],284:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OnTransactionResponseStruct=n.OnTransactionResponseWithContentStruct=n.OnTransactionResponseWithIdStruct=n.OnTransactionSeverityResponseStruct=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct");n.OnTransactionSeverityResponseStruct=(0,i.object)({severity:(0,i.optional)((0,i.literal)(r.SeverityLevel.Critical))}),n.OnTransactionResponseWithIdStruct=(0,i.assign)(n.OnTransactionSeverityResponseStruct,(0,i.object)({id:(0,i.string)()})),n.OnTransactionResponseWithContentStruct=(0,i.assign)(n.OnTransactionSeverityResponseStruct,(0,i.object)({content:r.ComponentOrElementStruct})),n.OnTransactionResponseStruct=(0,i.nullable)((0,i.union)([n.OnTransactionResponseWithContentStruct,n.OnTransactionResponseWithIdStruct]))},{"@metamask/snaps-sdk":177,"@metamask/superstruct":310}],285:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0}),n.HandlerType=void 0,function(e){e.OnRpcRequest="onRpcRequest",e.OnSignature="onSignature",e.OnTransaction="onTransaction",e.OnCronjob="onCronjob",e.OnInstall="onInstall",e.OnUpdate="onUpdate",e.OnNameLookup="onNameLookup",e.OnKeyringRequest="onKeyringRequest",e.OnHomePage="onHomePage",e.OnSettingsPage="onSettingsPage",e.OnUserInput="onUserInput",e.OnAssetsLookup="onAssetsLookup",e.OnAssetsConversion="onAssetsConversion",e.OnAssetHistoricalPrice="onAssetHistoricalPrice",e.OnProtocolRequest="onProtocolRequest"}(r||(n.HandlerType=r={}))},{}],286:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getSvgDimensions=n.assertIsSnapIcon=n.SVG_MAX_BYTE_SIZE_TEXT=n.SVG_MAX_BYTE_SIZE=void 0;const r=e("@metamask/utils"),i=e("./svg.cjs");n.SVG_MAX_BYTE_SIZE=1e5,n.SVG_MAX_BYTE_SIZE_TEXT=`${Math.floor(n.SVG_MAX_BYTE_SIZE/1e3)}kb`,n.assertIsSnapIcon=function(e){(0,r.assert)(e.path.endsWith(".svg"),'Expected snap icon to end in ".svg);const t="string"==typeof e.value?(0,r.stringToBytes)(e.value).byteLength:e.value.byteLength;(0,r.assert)(t<=n.SVG_MAX_BYTE_SIZE,`The specified SVG icon exceeds the maximum size of ${n.SVG_MAX_BYTE_SIZE_TEXT}.`),(0,r.assert)((0,i.isSvg)(e.toString()),"Snap icon must be a valid SVG.")},n.getSvgDimensions=function(e){try{const t=(0,i.parseSvg)(e),n=t["@_height"],s=t["@_width"];if(n&&s)return{height:n,width:s};const o=t["@_viewBox"];if(o){const[e,t,n,i]=o.split(" ");if(n&&i){const e=parseInt(n,10),t=parseInt(i,10);return(0,r.assert)(Number.isInteger(e)&&e>0),(0,r.assert)(Number.isInteger(t)&&t>0),{width:e,height:t}}}}catch{throw new Error("Snap icon must be a valid SVG.")}return null}},{"./svg.cjs":300,"@metamask/utils":327}],287:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createWindow=void 0,n.createWindow=async function({uri:e,id:t,sandbox:n=!0,testId:r="snaps-iframe"}){return await new Promise(((i,s)=>{const o=document.createElement("iframe");o.setAttribute("id",t),o.setAttribute("data-testid",r),n&&o.setAttribute("sandbox","allow-scripts"),o.setAttribute("src",e),document.body.appendChild(o),o.addEventListener("load",(()=>{o.contentWindow?i(o.contentWindow):s(new Error(`iframe.contentWindow not present on load for job "${t}".`))}))}))}},{}],288:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./array.cjs"),n),i(e("./auxiliary-files.cjs"),n),i(e("./base64.cjs"),n),i(e("./bytes.cjs"),n),i(e("./caveats.cjs"),n),i(e("./checksum.cjs"),n),i(e("./constants.cjs"),n),i(e("./cronjob.cjs"),n),i(e("./currency.cjs"),n),i(e("./deep-clone.cjs"),n),i(e("./default-endowments.cjs"),n),i(e("./derivation-paths.cjs"),n),i(e("./entropy.cjs"),n),i(e("./errors.cjs"),n),i(e("./handlers/index.cjs"),n),i(e("./iframe.cjs"),n),i(e("./json.cjs"),n),i(e("./json-rpc.cjs"),n),i(e("./localization.cjs"),n),i(e("./logging.cjs"),n),i(e("./manifest/index.cjs"),n),i(e("./path.cjs"),n),i(e("./platform-version.cjs"),n),i(e("./snaps.cjs"),n),i(e("./strings.cjs"),n),i(e("./structs.cjs"),n),i(e("./time.cjs"),n),i(e("./types.cjs"),n),i(e("./ui.cjs"),n),i(e("./url.cjs"),n),i(e("./validation.cjs"),n),i(e("./versions.cjs"),n),i(e("./virtual-file/index.cjs"),n)},{"./array.cjs":262,"./auxiliary-files.cjs":263,"./base64.cjs":264,"./bytes.cjs":265,"./caveats.cjs":266,"./checksum.cjs":267,"./constants.cjs":268,"./cronjob.cjs":269,"./currency.cjs":270,"./deep-clone.cjs":271,"./default-endowments.cjs":272,"./derivation-paths.cjs":273,"./entropy.cjs":274,"./errors.cjs":275,"./handlers/index.cjs":280,"./iframe.cjs":287,"./json-rpc.cjs":289,"./json.cjs":290,"./localization.cjs":291,"./logging.cjs":292,"./manifest/index.cjs":293,"./path.cjs":295,"./platform-version.cjs":296,"./snaps.cjs":297,"./strings.cjs":298,"./structs.cjs":299,"./time.cjs":301,"./types.cjs":302,"./ui.cjs":303,"./url.cjs":304,"./validation.cjs":305,"./versions.cjs":306,"./virtual-file/index.cjs":308}],289:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertIsJsonRpcSuccess=n.isOriginAllowed=n.assertIsKeyringOrigins=n.KeyringOriginsStruct=n.assertIsRpcOrigins=n.RpcOriginsStruct=void 0;const r=e("@metamask/permission-controller"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=(0,i.array)((0,i.refine)((0,i.string)(),"Allowed origin",(e=>!(e.split("*").length-1>2)||'No more than two wildcards ("*") are allowed in an origin specifier.')));function a(e,t){if("*"===e||e===t)return!0;const n=function(e){const t=e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&").replace(/\\\*/gu,".*");return RegExp(`^${t}$`,"u")}(e);return n.test(t)}n.RpcOriginsStruct=(0,i.refine)((0,i.object)({dapps:(0,i.optional)((0,i.boolean)()),snaps:(0,i.optional)((0,i.boolean)()),allowedOrigins:(0,i.optional)(o)}),"RPC origins",(e=>!!Boolean(!0===e.snaps||!0===e.dapps||e.allowedOrigins&&e.allowedOrigins.length>0)||"Must specify at least one JSON-RPC origin.")),n.assertIsRpcOrigins=function(e,t){(0,s.assertStruct)(e,n.RpcOriginsStruct,"Invalid JSON-RPC origins",t)},n.KeyringOriginsStruct=(0,i.object)({allowedOrigins:(0,i.optional)(o)}),n.assertIsKeyringOrigins=function(e,t){(0,s.assertStruct)(e,n.KeyringOriginsStruct,"Invalid keyring origins",t)},n.isOriginAllowed=function(e,t,n){return"metamask"===n||(!!e.allowedOrigins?.some((e=>a(e,n)))||(!(t!==r.SubjectType.Website||!e.dapps)||Boolean(t===r.SubjectType.Snap&&e.snaps)))},n.assertIsJsonRpcSuccess=function(e){if(!(0,s.isJsonRpcSuccess)(e)){if((0,s.isJsonRpcFailure)(e))throw new Error(`JSON-RPC request failed: ${e.error.message}`);throw new Error("Invalid JSON-RPC response.")}}},{"@metamask/permission-controller":79,"@metamask/superstruct":310,"@metamask/utils":327}],290:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonSizeUnsafe=n.parseJson=void 0;const r=e("@metamask/utils");n.parseJson=function(e){return(0,r.getSafeJson)(JSON.parse(e))},n.getJsonSizeUnsafe=function(e){return JSON.stringify(e).length}},{"@metamask/utils":327}],291:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateSnapManifestLocalizations=n.getLocalizedSnapManifest=n.translate=n.TRANSLATION_REGEX=n.getLocalizationFile=n.getValidatedLocalizationFiles=n.LocalizationFileStruct=n.LOCALIZABLE_FIELDS=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct"),s=e("./json.cjs");function o(e,t){const n=t.find((t=>t.locale===e));return n||t.find((e=>"en"===e.locale))}function a(e,t){const r=e.matchAll(n.TRANSLATION_REGEX);return Array.from(r).reduce(((n,[r,i])=>{if(!t)throw new Error(`Failed to translate "${e}": No localization file found.`);const s=t.messages[i.trim()];if(!s)throw new Error(`Failed to translate "${e}": No translation found for "${i.trim()}" in "${t.locale}" file.`);return n.replace(r,s.message)}),e)}function c(e,t,r){const i=o(t,r);return n.LOCALIZABLE_FIELDS.reduce(((e,t)=>{const n=a(e[t],i);return{...e,[t]:n}}),e)}n.LOCALIZABLE_FIELDS=["description","proposedName"],n.LocalizationFileStruct=(0,i.object)({locale:(0,i.string)(),messages:(0,i.record)((0,i.string)(),(0,i.object)({message:(0,i.string)(),description:(0,i.optional)((0,i.string)())}))}),n.getValidatedLocalizationFiles=function(e){for(const t of e)try{t.result=(0,i.create)((0,s.parseJson)(t.toString()),n.LocalizationFileStruct)}catch(e){if(e instanceof i.StructError)throw new Error(`Failed to validate localization file "${t.path}": ${e.message}.`);if(e instanceof SyntaxError)throw new Error(`Failed to parse localization file "${t.path}" as JSON.`);throw e}return e},n.getLocalizationFile=o,n.TRANSLATION_REGEX=/\{\{\s?([a-zA-Z0-9-_\s]+)\s?\}\}/gu,n.translate=a,n.getLocalizedSnapManifest=c,n.validateSnapManifestLocalizations=function(e,t){try{t.filter((e=>"en"!==e.locale)).forEach((n=>{c(e,n.locale,t)})),c(e,"en",t)}catch(e){throw new Error(`Failed to localize Snap manifest: ${(0,r.getErrorMessage)(e)}`)}}},{"./json.cjs":290,"@metamask/snaps-sdk":177,"@metamask/superstruct":310}],292:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.logWarning=n.logError=n.logInfo=n.snapsLogger=void 0;const r=e("@metamask/utils");n.snapsLogger=(0,r.createProjectLogger)("snaps"),n.logInfo=function(e,...t){console.log(e,...t)},n.logError=function(e,...t){console.error(e,...t)},n.logWarning=function(e,...t){console.warn(e,...t)}},{"@metamask/utils":327}],293:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./validation.cjs"),n)},{"./validation.cjs":294}],294:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createSnapManifest=n.assertIsSnapManifest=n.isSnapManifest=n.SnapManifestStruct=n.InitialConnectionsStruct=n.SnapAuxilaryFilesStruct=n.PermissionsStruct=n.EmptyObjectStruct=n.HandlerCaveatsStruct=n.ProtocolScopesStruct=n.MaxRequestTimeStruct=n.MAXIMUM_REQUEST_TIMEOUT=n.MINIMUM_REQUEST_TIMEOUT=n.LookupMatchersStruct=n.ChainIdsStruct=n.SnapIdsStruct=n.SemVerRangeStruct=n.SnapGetBip32EntropyPermissionsStruct=n.Bip32EntropyStruct=n.CurveStruct=n.bip32entropy=n.Bip32PathStruct=n.FORBIDDEN_COIN_TYPES=void 0;const r=e("@metamask/key-tree"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("../array.cjs"),a=e("../cronjob.cjs"),c=e("../entropy.cjs"),u=e("../json-rpc.cjs"),l=e("../snaps.cjs"),d=e("../structs.cjs"),h=e("../types.cjs"),f=[c.SIP_6_MAGIC_VALUE,c.STATE_ENCRYPTION_MAGIC_VALUE];n.FORBIDDEN_COIN_TYPES=[60];const p=n.FORBIDDEN_COIN_TYPES.map((e=>["m","44'",`${e}'`]));n.Bip32PathStruct=(0,i.refine)((0,i.array)((0,i.string)()),"BIP-32 path",(e=>0===e.length?"Path must be a non-empty BIP-32 derivation path array":"m"!==e[0]?'Path must start with "m:e.length<3?"Paths must have a length of at least three.":e.slice(1).some((e=>!(0,r.isValidBIP32PathSegment)(e)))?"Path must be a valid BIP-32 derivation path array.":f.includes(e[1])?`The purpose "${e[1]}" is not allowed for entropy derivation.`:!p.some((t=>(0,o.isEqual)(e.slice(0,t.length),t)))||`The path "${e.join("/")}" is not allowed for entropy derivation.`));n.bip32entropy=e=>(0,i.refine)(e,"BIP-32 entropy",(e=>"ed25519"!==e.curve||!e.path.slice(1).some((e=>!e.endsWith("'")))||"Ed25519 does not support unhardened paths.")),n.CurveStruct=(0,i.enums)(["ed25519","secp256k1","ed25519Bip32"]),n.Bip32EntropyStruct=(0,n.bip32entropy)((0,i.type)({path:n.Bip32PathStruct,curve:n.CurveStruct})),n.SnapGetBip32EntropyPermissionsStruct=(0,i.size)((0,i.array)(n.Bip32EntropyStruct),1,1/0),n.SemVerRangeStruct=(0,i.refine)((0,i.string)(),"SemVer range",(e=>!!(0,s.isValidSemVerRange)(e)||"Expected a valid SemVer range.")),n.SnapIdsStruct=(0,i.refine)((0,i.record)(l.SnapIdStruct,(0,i.object)({version:(0,i.optional)(n.SemVerRangeStruct)})),"SnapIds",(e=>0!==Object.keys(e).length)),n.ChainIdsStruct=(0,i.size)((0,i.array)(s.CaipChainIdStruct),1,1/0),n.LookupMatchersStruct=(0,i.union)([(0,i.object)({tlds:(0,i.size)((0,i.array)((0,i.string)()),1,1/0)}),(0,i.object)({schemes:(0,i.size)((0,i.array)((0,i.string)()),1,1/0)}),(0,i.object)({tlds:(0,i.size)((0,i.array)((0,i.string)()),1,1/0),schemes:(0,i.size)((0,i.array)((0,i.string)()),1,1/0)})]),n.MINIMUM_REQUEST_TIMEOUT=(0,s.inMilliseconds)(5,s.Duration.Second),n.MAXIMUM_REQUEST_TIMEOUT=(0,s.inMilliseconds)(3,s.Duration.Minute),n.MaxRequestTimeStruct=(0,i.size)((0,i.integer)(),n.MINIMUM_REQUEST_TIMEOUT,n.MAXIMUM_REQUEST_TIMEOUT),n.ProtocolScopesStruct=(0,i.record)(s.CaipChainIdStruct,(0,i.object)({methods:(0,i.array)((0,i.string)())})),n.HandlerCaveatsStruct=(0,i.object)({maxRequestTime:(0,i.optional)(n.MaxRequestTimeStruct)}),n.EmptyObjectStruct=(0,i.object)({}),n.PermissionsStruct=(0,i.type)({"endowment:assets":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({scopes:n.ChainIdsStruct}))),"endowment:cronjob":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({jobs:(0,i.optional)(a.CronjobSpecificationArrayStruct)}))),"endowment:ethereum-provider":(0,i.optional)(n.EmptyObjectStruct),"endowment:keyring":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,u.KeyringOriginsStruct)),"endowment:protocol":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({scopes:n.ProtocolScopesStruct}))),"endowment:lifecycle-hooks":(0,i.optional)(n.HandlerCaveatsStruct),"endowment:name-lookup":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({chains:(0,i.optional)(n.ChainIdsStruct),matchers:(0,i.optional)(n.LookupMatchersStruct)}))),"endowment:network-access":(0,i.optional)(n.EmptyObjectStruct),"endowment:page-home":(0,i.optional)(n.HandlerCaveatsStruct),"endowment:rpc":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,u.RpcOriginsStruct)),"endowment:signature-insight":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({allowSignatureOrigin:(0,i.optional)((0,i.boolean)())}))),"endowment:transaction-insight":(0,i.optional)((0,d.mergeStructs)(n.HandlerCaveatsStruct,(0,i.object)({allowTransactionOrigin:(0,i.optional)((0,i.boolean)())}))),"endowment:webassembly":(0,i.optional)(n.EmptyObjectStruct),snap_dialog:(0,i.optional)(n.EmptyObjectStruct),snap_manageState:(0,i.optional)(n.EmptyObjectStruct),snap_manageAccounts:(0,i.optional)(n.EmptyObjectStruct),snap_notify:(0,i.optional)(n.EmptyObjectStruct),snap_getBip32Entropy:(0,i.optional)(n.SnapGetBip32EntropyPermissionsStruct),snap_getBip32PublicKey:(0,i.optional)(n.SnapGetBip32EntropyPermissionsStruct),snap_getBip44Entropy:(0,i.optional)((0,i.size)((0,i.array)((0,i.object)({coinType:(0,i.size)((0,i.integer)(),0,2**32-1)})),1,1/0)),snap_getEntropy:(0,i.optional)(n.EmptyObjectStruct),snap_getLocale:(0,i.optional)(n.EmptyObjectStruct),wallet_snap:(0,i.optional)(n.SnapIdsStruct)}),n.SnapAuxilaryFilesStruct=(0,i.array)((0,i.string)()),n.InitialConnectionsStruct=(0,i.record)((0,i.intersection)([(0,i.string)(),(0,h.uri)()]),(0,i.object)({})),n.SnapManifestStruct=(0,i.object)({version:s.VersionStruct,description:(0,i.size)((0,i.string)(),1,280),proposedName:(0,i.size)((0,i.string)(),1,214),repository:(0,i.optional)((0,i.type)({type:(0,i.size)((0,i.string)(),1,1/0),url:(0,i.size)((0,i.string)(),1,1/0)})),source:(0,i.object)({shasum:s.ChecksumStruct,location:(0,i.object)({npm:(0,i.object)({filePath:(0,i.size)((0,i.string)(),1,1/0),iconPath:(0,i.optional)((0,i.size)((0,i.string)(),1,1/0)),packageName:h.NameStruct,registry:(0,i.union)([(0,i.literal)("https://registry.npmjs.org"),(0,i.literal)("https://registry.npmjs.org/")])})}),files:(0,i.optional)(n.SnapAuxilaryFilesStruct),locales:(0,i.optional)(n.SnapAuxilaryFilesStruct)}),initialConnections:(0,i.optional)(n.InitialConnectionsStruct),initialPermissions:n.PermissionsStruct,manifestVersion:(0,i.literal)("0.1"),platformVersion:(0,i.optional)(s.VersionStruct),$schema:(0,i.optional)((0,i.string)())}),n.isSnapManifest=function(e){return(0,i.is)(e,n.SnapManifestStruct)},n.assertIsSnapManifest=function(e){(0,s.assertStruct)(e,n.SnapManifestStruct,`"${h.NpmSnapFileNames.Manifest}" is invalid`)},n.createSnapManifest=function(e){return(0,i.create)(e,n.SnapManifestStruct)}},{"../array.cjs":262,"../cronjob.cjs":269,"../entropy.cjs":274,"../json-rpc.cjs":289,"../snaps.cjs":297,"../structs.cjs":299,"../types.cjs":302,"@metamask/key-tree":68,"@metamask/superstruct":310,"@metamask/utils":327}],295:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.normalizeRelative=void 0;const r=e("@metamask/utils");n.normalizeRelative=function(e){return(0,r.assert)(!e.startsWith("/")),(0,r.assert)(-1===e.search(/:|\/\//u),`Path "${e}" potentially an URI instead of local relative`),e.startsWith("./")?e.slice(2):e}},{"@metamask/utils":327}],296:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.getPlatformVersion=void 0;const i=r(e("@metamask/snaps-sdk/package.json"));n.getPlatformVersion=function(){return i.default.version}},{"@metamask/snaps-sdk/package.json":261}],297:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.verifyRequestedSnapPermissions=n.isSnapPermitted=n.assertIsValidSnapId=n.isSnapId=n.stripSnapPrefix=n.getSnapPrefix=n.SnapIdStruct=n.SnapIdPrefixStruct=n.HttpSnapIdStruct=n.NpmSnapIdStruct=n.LocalSnapIdStruct=n.BaseSnapIdStruct=n.LOCALHOST_HOSTNAMES=n.validateSnapShasum=n.getSnapChecksum=n.SnapStatusEvents=n.SnapStatus=n.PROPOSED_NAME_REGEX=void 0;const i=e("@metamask/snaps-sdk"),s=e("@metamask/superstruct"),o=e("@metamask/utils"),a=e("@scure/base"),c=r(e("fast-json-stable-stringify")),u=r(e("validate-npm-package-name")),l=e("./caveats.cjs"),d=e("./checksum.cjs"),h=e("./types.cjs");var f,p;function m(e){const t=e.clone();return delete t.result.source.shasum,t.value=(0,c.default)(t.result),t}async function y(e){const{manifest:t,sourceCode:n,svgIcon:r,auxiliaryFiles:i,localizationFiles:s}=e,o=[m(t),n,r,...i,...s].filter((e=>void 0!==e));return a.base64.encode(await(0,d.checksumFiles)(o))}n.PROPOSED_NAME_REGEX=/^(?:[A-Za-z0-9-_]+( [A-Za-z0-9-_]+)*)|(?:(?:@[A-Za-z0-9-*~][A-Za-z0-9-*._~]*\/)?[A-Za-z0-9-~][A-Za-z0-9-._~]*)$/u,function(e){e.Installing="installing",e.Updating="updating",e.Running="running",e.Stopped="stopped",e.Crashed="crashed"}(f||(n.SnapStatus=f={})),function(e){e.Start="START",e.Stop="STOP",e.Crash="CRASH",e.Update="UPDATE"}(p||(n.SnapStatusEvents=p={})),n.getSnapChecksum=y,n.validateSnapShasum=async function(e,t="Invalid Snap manifest: manifest shasum does not match computed shasum."){if(e.manifest.result.source.shasum!==await y(e))throw new Error(t)},n.LOCALHOST_HOSTNAMES=["localhost","127.0.0.1","[::1]"],n.BaseSnapIdStruct=(0,o.definePattern)("Base Snap Id",/^[!-~]*$/u);const g=(0,h.uri)({protocol:(0,s.enums)(["http:","https:"]),hostname:(0,s.enums)(n.LOCALHOST_HOSTNAMES),hash:(0,s.empty)((0,s.string)()),search:(0,s.empty)((0,s.string)())});function b(e){const t=Object.values(h.SnapIdPrefixes).find((t=>e.startsWith(t)));if(void 0!==t)return t;throw new Error(`Invalid or no prefix found for "${e}"`)}n.LocalSnapIdStruct=(0,s.refine)(n.BaseSnapIdStruct,"local Snap Id",(e=>{if(!e.startsWith(h.SnapIdPrefixes.local))return`Expected local snap ID, got "${e}".`;const[t]=(0,s.validate)(e.slice(h.SnapIdPrefixes.local.length),g);return t??!0})),n.NpmSnapIdStruct=(0,s.intersection)([n.BaseSnapIdStruct,(0,h.uri)({protocol:(0,s.literal)(h.SnapIdPrefixes.npm),pathname:(0,s.refine)((0,s.string)(),"package name",(function*(e){const t=e.startsWith("/")?e.slice(1):e,{errors:n,validForNewPackages:r,warnings:i}=(0,u.default)(t);return r||(void 0===n?((0,o.assert)(void 0!==i),yield*i):yield*n),!0})),search:(0,s.empty)((0,s.string)()),hash:(0,s.empty)((0,s.string)())})]),n.HttpSnapIdStruct=(0,s.intersection)([n.BaseSnapIdStruct,(0,h.uri)({protocol:(0,s.enums)(["http:","https:"]),search:(0,s.empty)((0,s.string)()),hash:(0,s.empty)((0,s.string)())})]),n.SnapIdPrefixStruct=(0,s.refine)((0,s.string)(),"Snap ID prefix",(e=>{if(Object.values(h.SnapIdPrefixes).some((t=>e.startsWith(t))))return!0;return`Invalid or no prefix found. Expected Snap ID to start with one of: ${Object.values(h.SnapIdPrefixes).map((e=>`"${e}"`)).join(", ")}, but received: "${e}"`})),n.SnapIdStruct=(0,i.selectiveUnion)((e=>"string"==typeof e&&e.startsWith(h.SnapIdPrefixes.npm)?n.NpmSnapIdStruct:"string"==typeof e&&e.startsWith(h.SnapIdPrefixes.local)?n.LocalSnapIdStruct:n.SnapIdPrefixStruct)),n.getSnapPrefix=b,n.stripSnapPrefix=function(e){return e.replace(b(e),"")},n.isSnapId=function(e){return(0,s.is)(e,n.SnapIdStruct)},n.assertIsValidSnapId=function(e){(0,o.assertStruct)(e,n.SnapIdStruct,"Invalid snap ID")},n.isSnapPermitted=function(e,t){return Boolean((e?.wallet_snap?.caveats?.find((e=>e.type===l.SnapCaveatType.SnapIds))??{}).value?.[t])},n.verifyRequestedSnapPermissions=function(e){(0,o.assert)((0,o.isObject)(e),"Requested permissions must be an object.");const{wallet_snap:t}=e;(0,o.assert)((0,o.isObject)(t),"wallet_snap is missing from the requested permissions.");const{caveats:n}=t;(0,o.assert)(Array.isArray(n)&&1===n.length,"wallet_snap must have a caveat property with a single-item array value.");const[r]=n;(0,o.assert)((0,o.isObject)(r)&&r.type===l.SnapCaveatType.SnapIds&&(0,o.isObject)(r.value),`The requested permissions do not have a valid ${l.SnapCaveatType.SnapIds} caveat.`)}},{"./caveats.cjs":266,"./checksum.cjs":267,"./types.cjs":302,"@metamask/snaps-sdk":177,"@metamask/superstruct":310,"@metamask/utils":327,"@scure/base":369,"fast-json-stable-stringify":497,"validate-npm-package-name":596}],298:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.indent=void 0,n.indent=function(e,t=2){return e.replace(/^/gmu," ".repeat(t))}},{}],299:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mergeStructs=n.createUnion=n.validateUnion=n.getStructErrorMessage=n.getStructFailureMessage=n.getStructErrorPrefix=n.getUnionStructNames=n.getStructFromPath=n.createFromStruct=n.getError=n.arrayToGenerator=n.SnapsStructError=n.named=void 0;const r=e("@metamask/snaps-sdk"),i=e("@metamask/superstruct"),s=e("@metamask/utils"),o=e("chalk"),a=e("./strings.cjs");function c(e,t,n){return n?t(e):e}n.named=function(e,t){return new i.Struct({...t,type:e})};class u extends i.StructError{constructor(e,t,n,r,i,s=!0){super(r,i),this.name="SnapsStructError",this.message=`${t}.\n\n${y(e,[...i()],s)}${n?`\n\n${n}`:""}`}}function*l(e){for(const t of e)yield t}function d({struct:e,prefix:t,suffix:n="",error:r,colorize:i}){return new u(e,t,n,r,(()=>l(r.failures())),i)}function h(e,t){return t.reduce(((t,n)=>(0,s.isObject)(e.schema)&&e.schema[n]?e.schema[n]:t),e)}function f(e,t=!0){return Array.isArray(e.schema)?e.schema.map((({type:e})=>c(e,o.green,t))):null}function p(e,t=!0){return"never"===e.type||0===e.path.length?"":`At path: ${c(e.path.join(),o.bold,t)} — `}function m(e,t,n=!0){const r=c(JSON.stringify(t.value),o.red,n),i=p(t,n);if("union"===t.type){const s=f(h(e,t.path),n);return s?`${i}Expected the value to be one of: ${s.join(", ")}, but received: ${r}.`:`${i}${t.message}.`}if("literal"===t.type){return`${i}${t.message.replace(/the literal `(.+)`,/u,`the value to be \`${c("$1",o.green,n)}\`,`).replace(/, but received: (.+)/u,`, but received: ${c("$1",o.red,n)}`)}.`}if("never"===t.type)return`Unknown key: ${c(t.path.join(),o.bold,n)}, received: ${r}.`;if("size"===t.refinement){return`${i}${t.message.replace(/length between `(\d+)` and `(\d+)`/u,`length between ${c("$1",o.green,n)} and ${c("$2",o.green,n)},`).replace(/length of `(\d+)`/u,`length of ${c("$1",o.red,n)}`).replace(/a array/u,"an array")}.`}return void 0!==t.refinement?`${i}${t.message}.`:`${i}Expected a value of type ${c(t.type,o.green,n)}, but received: ${r}.`}function y(e,t,n=!0){return t.map((t=>(0,a.indent)(`• ${m(e,t,n)}`))).join("\n")}function g(e,t,n,o=!1){(0,s.assert)(t.schema,"Expected a struct with a schema. Make sure to use `union` from `@metamask/snaps-sdk`."),(0,s.assert)(t.schema.length>0,"Expected a non-empty array of structs.");const a=t.schema.map((e=>e.schema[n])),c=(0,i.type)({[n]:(0,r.union)(a)}),[u]=(0,i.validate)(e,c,{coerce:o});if(u)throw new Error(m(c,u.failures()[0],!1));const l=e,d=t.schema.filter((e=>(0,i.is)(l[n],e.schema[n])));(0,s.assert)(d.length>0,"Expected a struct to match the value.");const h=d.map((e=>(0,i.validate)(l,e,{coerce:o}))),f=h.find((([e])=>!e));if(f)return f[1];(0,s.assert)(h[0][0],"Expected at least one error.");const p=h.reduce(((e,[t])=>((0,s.assert)(t,"Expected an error."),t.failures().length<e.failures().length?t:e)),h[0][0]);throw new Error(m(t,p.failures()[0],!1))}n.SnapsStructError=u,n.arrayToGenerator=l,n.getError=d,n.createFromStruct=function(e,t,n,r=""){try{return(0,i.create)(e,t)}catch(e){if(e instanceof i.StructError)throw d({struct:t,prefix:n,suffix:r,error:e});throw e}},n.getStructFromPath=h,n.getUnionStructNames=f,n.getStructErrorPrefix=p,n.getStructFailureMessage=m,n.getStructErrorMessage=y,n.validateUnion=g,n.createUnion=function(e,t,n){return g(e,t,n,!0)},n.mergeStructs=function(...e){const t=i.assign(...e);return new i.Struct({...t,*refiner(t,n){for(const r of e)yield*r.refiner(t,n)}})}},{"./strings.cjs":298,"@metamask/snaps-sdk":177,"@metamask/superstruct":310,"@metamask/utils":327,chalk:407}],300:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isSvg=n.parseSvg=void 0;const r=e("@metamask/utils"),i=e("fast-xml-parser");function s(e){try{const t=e.trim();(0,r.assert)(t.length>0);const n=new i.XMLParser({ignoreAttributes:!1,parseAttributeValue:!0}).parse(t,!0);return(0,r.assert)((0,r.hasProperty)(n,"svg")),(0,r.isObject)(n.svg)?n.svg:{}}catch{throw new Error("Snap icon must be a valid SVG.")}}n.parseSvg=s,n.isSvg=function(e){try{return s(e),!0}catch{return!1}}},{"@metamask/utils":327,"fast-xml-parser":499}],301:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ISO8601DateStruct=n.ISO8601DurationStruct=void 0;const r=e("@metamask/superstruct"),i=e("luxon");n.ISO8601DurationStruct=(0,r.refine)((0,r.string)(),"ISO 8601 duration",(e=>!!i.Duration.fromISO(e).isValid||"Not a valid ISO 8601 duration"));const s=/Z|([+-]\d{2}:?\d{2})$/u;n.ISO8601DateStruct=(0,r.refine)((0,r.string)(),"ISO 8601 date",(e=>i.DateTime.fromISO(e).isValid?!!s.test(e)||"ISO 8601 date must have timezone information":"Not a valid ISO 8601 date"))},{"@metamask/superstruct":310,luxon:520}],302:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WALLET_SNAP_PERMISSION_KEY=n.isValidUrl=n.uri=n.SNAP_STREAM_NAMES=n.SnapIdPrefixes=n.NpmSnapPackageJsonStruct=n.NameStruct=n.NpmSnapFileNames=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils");var s,o,a;!function(e){e.PackageJson="package.json",e.Manifest="snap.manifest.json"}(s||(n.NpmSnapFileNames=s={})),n.NameStruct=(0,r.size)((0,i.definePattern)("Snap Name",/^(?:@[a-z0-9-*~][a-z0-9-*._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u),1,214),n.NpmSnapPackageJsonStruct=(0,r.type)({version:i.VersionStruct,name:n.NameStruct,main:(0,r.optional)((0,r.size)((0,r.string)(),1,1/0)),repository:(0,r.optional)((0,r.type)({type:(0,r.size)((0,r.string)(),1,1/0),url:(0,r.size)((0,r.string)(),1,1/0)}))}),function(e){e.npm="npm:",e.local="local:"}(o||(n.SnapIdPrefixes=o={})),function(e){e.JSON_RPC="jsonRpc",e.COMMAND="command"}(a||(n.SNAP_STREAM_NAMES=a={}));n.uri=(e={})=>(0,r.refine)((0,r.union)([(0,r.string)(),(0,r.instance)(URL)]),"uri",(t=>{try{const n=new URL(t),i=(0,r.type)(e);return(0,r.assert)(n,i),!0}catch{return`Expected URL, got "${t.toString()}".`}})),n.isValidUrl=function(e,t={}){return(0,r.is)(e,(0,n.uri)(t))},n.WALLET_SNAP_PERMISSION_KEY="wallet_snap"},{"@metamask/superstruct":310,"@metamask/utils":327}],303:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.serialiseJsx=n.walkJsx=n.getJsxChildren=n.hasChildren=n.getTotalTextLength=n.validateJsxElements=n.validateAssetSelector=n.validateTextLinks=n.validateLink=n.getJsxElementFromComponent=n.getTextChildren=void 0;const r=e("@metamask/snaps-sdk/jsx-runtime"),i=e("@metamask/snaps-sdk"),s=e("@metamask/snaps-sdk/jsx"),o=e("@metamask/utils"),a=e("marked"),c=e("./url.cjs"),u=5e4,l=["https:","mailto:","metamask:"];function d(e){switch(e){case"primary":return"primary";case"secondary":return"destructive";default:return}}function h(e){return 1===e.length?e[0]:e}function f(e){return e.tokens&&e.tokens.length>0?h(e.tokens.flatMap(m)):e.href}function p(e){return h(e.flatMap(m))}function m(e){switch(e.type){case"link":return(0,r.jsx)(s.Link,{href:e.href,children:f(e)});case"text":return e.text;case"strong":return(0,r.jsx)(s.Bold,{children:p(e.tokens)});case"em":return(0,r.jsx)(s.Italic,{children:p(e.tokens)});default:return null}}function y(e){const t=(0,a.lexer)(e,{gfm:!1}),n=[];return(0,a.walkTokens)(t,(e=>{if("paragraph"===e.type){n.length>0&&n.push("\n\n");const{tokens:t}=e;n.push(...t.flatMap(m))}})),n.filter((e=>null!==e))}function g(e,t,n){try{const r=new URL(e);if((0,o.assert)(l.includes(r.protocol),`Protocol must be one of: ${l.join(", ")}.`),"metamask:"===r.protocol){const t=(0,c.parseMetaMaskUrl)(e);t.snapId&&(0,o.assert)(n(t.snapId),"The Snap being navigated to is not installed.")}else if("mailto:"===r.protocol){const e=r.pathname.split(",");for(const n of e){const e=n.split("@")[1];(0,o.assert)(!e.includes(":"));const r=`https://${e}`;(0,o.assert)(!t(r),"The specified URL is not allowed.")}return}(0,o.assert)(!t(r.href),"The specified URL is not allowed.")}catch(e){throw new Error(`Invalid URL: ${"ERR_ASSERTION"===e?.code?e.message:"Unable to parse URL."}`)}}function b(e,t){const n=t(e);(0,o.assert)(n,`Could not find account for address: ${e}`)}function w(e){const{type:t}=e;switch(t){case i.NodeType.Panel:return e.children.reduce(((e,t)=>e+w(t)),0);case i.NodeType.Row:return w(e.value);case i.NodeType.Text:return e.value.length;default:return 0}}function v(e){return(0,o.hasProperty)(e.props,"children")}function x(e){return Boolean(e)&&!0!==e}function E(e){if(v(e)){if(Array.isArray(e.props.children))return e.props.children.filter(x).flat(1/0);if(e.props.children)return[e.props.children]}return[]}function S(e,t,n=0){if(Array.isArray(e)){for(const r of e){const e=S(r,t,n);if(void 0!==e)return e}return}const r=t(e,n);if(void 0!==r)return r;if((0,o.hasProperty)(e,"props")&&(0,o.isPlainObject)(e.props)&&(0,o.hasProperty)(e.props,"children")){const r=E(e);for(const e of r)if((0,o.isPlainObject)(e)){const r=S(e,t,n+1);if(void 0!==r)return r}}}function A(e){return Object.entries(e).filter((([e])=>"children"!==e)).sort((([e],[t])=>e.localeCompare(t))).map((([e,t])=>{return` ${e}=${n=t,"string"==typeof n?`"${n}"`:`{${JSON.stringify(n)}}`}`;var n})).join("")}n.getTextChildren=y,n.getJsxElementFromComponent=function(e){return function(e){const t=w(e);(0,o.assert)(t<=u,`The text in a Snap UI may not be larger than ${u/1e3} kB.`)}(e),function e(t){switch(t.type){case i.NodeType.Address:return(0,r.jsx)(s.Address,{address:t.value});case i.NodeType.Button:return(0,r.jsx)(s.Button,{name:t.name,variant:d(t.variant),type:t.buttonType,children:t.value});case i.NodeType.Copyable:return(0,r.jsx)(s.Copyable,{value:t.value,sensitive:t.sensitive});case i.NodeType.Divider:return(0,r.jsx)(s.Divider,{});case i.NodeType.Form:return(0,r.jsx)(s.Form,{name:t.name,children:h(t.children.map(e))});case i.NodeType.Heading:return(0,r.jsx)(s.Heading,{children:t.value});case i.NodeType.Image:return(0,r.jsx)(s.Image,{src:t.value});case i.NodeType.Input:return(0,r.jsx)(s.Field,{label:t.label,error:t.error,children:(0,r.jsx)(s.Input,{name:t.name,type:t.inputType,value:t.value,placeholder:t.placeholder})});case i.NodeType.Panel:return(0,r.jsx)(s.Box,{children:h(t.children.map(e))});case i.NodeType.Row:return(0,r.jsx)(s.Row,{label:t.label,variant:t.variant,children:e(t.value)});case i.NodeType.Spinner:return(0,r.jsx)(s.Spinner,{});case i.NodeType.Text:return(0,r.jsx)(s.Text,{children:h(y(t.value))});default:return(0,o.assertExhaustive)(t)}}(e)},n.validateLink=g,n.validateTextLinks=function(e,t,n){const r=function(e){const t=(0,a.lexer)(e,{gfm:!1}),n=[];return(0,a.walkTokens)(t,(e=>{"link"===e.type&&n.push(e)})),n}(e);for(const e of r)g(e.href,t,n)},n.validateAssetSelector=b,n.validateJsxElements=function(e,{isOnPhishingList:t,getSnap:n,getAccountByAddress:r}){S(e,(e=>{switch(e.type){case"Link":g(e.props.href,t,n);break;case"AssetSelector":b(e.props.addresses[0],r)}}))},n.getTotalTextLength=w,n.hasChildren=v,n.getJsxChildren=E,n.walkJsx=S,n.serialiseJsx=function e(t,n=0){if(Array.isArray(t))return t.map((t=>e(t,n))).join("");const r="  ".repeat(n);if("string"==typeof t)return`${r}${t}\n`;if(!t)return"";const{type:i,props:s}=t,a=n>0?"\n":"";if((0,o.hasProperty)(s,"children")){const t=e(s.children,n+1);return`${r}<${i}${A(s)}>\n${t}${r}</${i}>${a}`}return`${r}<${i}${A(s)} />${a}`}},{"./url.cjs":304,"@metamask/snaps-sdk":177,"@metamask/snaps-sdk/jsx":260,"@metamask/snaps-sdk/jsx-runtime":259,"@metamask/utils":327,marked:521}],304:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.parseMetaMaskUrl=n.SNAP_PATHS=n.CLIENT_PATHS=void 0;const r=e("@metamask/utils"),i=e("./snaps.cjs");n.CLIENT_PATHS=["/"],n.SNAP_PATHS=["/home"],n.parseMetaMaskUrl=function(e){const t=new URL(e),{protocol:s}=t;if("metamask:"!==s)throw new Error(`Unable to parse URL. Expected the protocol to be "metamask:", but received "${s}".`);const[o,...a]=t.href.replace("metamask://","").split("/"),c=`/${a.join("/")}`;switch(o){case"client":return(0,r.assert)(n.CLIENT_PATHS.includes(c),`Unable to navigate to "${c}". The provided path is not allowed.`),{authority:o,path:c};case"snap":return function(e){const t="Invalid MetaMask url:",s=(0,i.stripSnapPrefix)(e.slice(1)),o=e.slice(1).startsWith("npm:")?"npm:":"local:",a=s.startsWith("@"),c=s.split("/"),u=`/${c[c.length-1]}`;let l;if("local:"===o){const[e,,...i]=c.slice(0,-1);l=`${e}//${i.join("/")}`,(0,r.assert)(n.SNAP_PATHS.includes(u),`${t} invalid snap path.`)}else l=a?`${c[0]}/${c[1]}`:c[0],(0,r.assert)(a?3===c.length&&n.SNAP_PATHS.includes(u):2===c.length&&n.SNAP_PATHS.includes(u),`${t} invalid snap path.`);const d=`${o}${l}`;return(0,i.assertIsValidSnapId)(d),{authority:"snap",snapId:d,path:u}}(c);default:throw new Error(`Expected "metamask:" URL to start with "client" or "snap", but received "${o}".`)}}},{"./snaps.cjs":297,"@metamask/utils":327}],305:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validateFetchedSnap=void 0;const r=e("./icon.cjs"),i=e("./localization.cjs"),s=e("./manifest/validation.cjs"),o=e("./snaps.cjs");n.validateFetchedSnap=async function(e){(0,s.assertIsSnapManifest)(e.manifest.result),await(0,o.validateSnapShasum)(e),(0,i.validateSnapManifestLocalizations)(e.manifest.result,e.localizationFiles.map((e=>e.result))),e.svgIcon&&(0,r.assertIsSnapIcon)(e.svgIcon)}},{"./icon.cjs":286,"./localization.cjs":291,"./manifest/validation.cjs":294,"./snaps.cjs":297}],306:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.resolveVersionRange=n.getTargetVersion=n.DEFAULT_REQUESTED_SNAP_VERSION=void 0;const r=e("@metamask/superstruct"),i=e("@metamask/utils"),s=e("semver");n.DEFAULT_REQUESTED_SNAP_VERSION="*",n.getTargetVersion=function(e,t){const n=(0,s.maxSatisfying)(e,t);return n||(0,s.maxSatisfying)(e,t,{includePrerelease:!0})},n.resolveVersionRange=function(e){return void 0===e||"latest"===e?[void 0,n.DEFAULT_REQUESTED_SNAP_VERSION]:(0,r.validate)(e,i.VersionRangeStruct)}},{"@metamask/superstruct":310,"@metamask/utils":327,semver:574}],307:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.VirtualFile=void 0;const r=e("@metamask/utils"),i=e("@scure/base"),s=e("../deep-clone.cjs");class o{constructor(e){let t;t="string"==typeof e||e instanceof Uint8Array?{value:e}:e,this.value=t?.value??"",this.result=t?.result??void 0,this.data=t?.data??{},this.path=t?.path??"/"}get size(){return"string"==typeof this.value?this.value.length:this.value.byteLength}toString(e){if("string"==typeof this.value)return(0,r.assert)(void 0===e,"Tried to encode string."),this.value;if(this.value instanceof Uint8Array&&"hex"===e)return(0,r.bytesToHex)(this.value);if(this.value instanceof Uint8Array&&"base64"===e)return i.base64.encode(this.value);return new TextDecoder(e).decode(this.value)}clone(){const e=new o;return"string"==typeof this.value?e.value=this.value:e.value=this.value.slice(0),e.result=(0,s.deepClone)(this.result),e.data=(0,s.deepClone)(this.data),e.path=this.path,e}}n.VirtualFile=o},{"../deep-clone.cjs":271,"@metamask/utils":327,"@scure/base":369}],308:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./VirtualFile.cjs"),n)},{"./VirtualFile.cjs":307}],309:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.StructError=void 0;class r extends TypeError{constructor(e,t){let n;const{message:r,explanation:i,...s}=e,{path:o}=e,a=0===o.length?r:`At path: ${o.join()} -- ${r}`;super(i??a),null!=i&&(this.cause=a),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>n??(n=[e,...t()])}}n.StructError=r},{}],310:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./error.cjs"),n),i(e("./struct.cjs"),n),i(e("./structs/coercions.cjs"),n),i(e("./structs/refinements.cjs"),n),i(e("./structs/types.cjs"),n),i(e("./structs/utilities.cjs"),n)},{"./error.cjs":309,"./struct.cjs":311,"./structs/coercions.cjs":312,"./structs/refinements.cjs":313,"./structs/types.cjs":314,"./structs/utilities.cjs":315}],311:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validate=n.is=n.mask=n.create=n.assert=n.ExactOptionalStruct=n.Struct=void 0;const r=e("./error.cjs"),i=e("./utils.cjs");class s{constructor(e){const{type:t,schema:n,validator:r,refiner:s,coercer:o=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=n,this.entries=a,this.coercer=o,this.validator=r?(e,t)=>{const n=r(e,t);return(0,i.toFailures)(n,t,this,e)}:()=>[],this.refiner=s?(e,t)=>{const n=s(e,t);return(0,i.toFailures)(n,t,this,e)}:()=>[]}assert(e,t){return a(e,this,t)}create(e,t){return c(e,this,t)}is(e){return l(e,this)}mask(e,t){return u(e,this,t)}validate(e,t={}){return d(e,this,t)}}n.Struct=s;const o="EXACT_OPTIONAL";function a(e,t,n){const r=d(e,t,{message:n});if(r[0])throw r[0]}function c(e,t,n){const r=d(e,t,{coerce:!0,message:n});if(r[0])throw r[0];return r[1]}function u(e,t,n){const r=d(e,t,{coerce:!0,mask:!0,message:n});if(r[0])throw r[0];return r[1]}function l(e,t){return!d(e,t)[0]}function d(e,t,n={}){const s=(0,i.run)(e,t,n),o=(0,i.shiftIterator)(s);if(o[0]){return[new r.StructError(o[0],(function*(){for(const e of s)e[0]&&(yield e[0])})),void 0]}return[void 0,o[1]]}n.ExactOptionalStruct=class extends s{constructor(e){super({...e,type:`exact optional ${e.type}`}),this.brand=o}static isExactOptional(e){return(0,i.isObject)(e)&&"brand"in e&&e.brand===o}},n.assert=a,n.create=c,n.mask=u,n.is=l,n.validate=d},{"./error.cjs":309,"./utils.cjs":316}],312:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.trimmed=n.defaulted=n.coerce=void 0;const r=e("../struct.cjs"),i=e("../utils.cjs"),s=e("./types.cjs");function o(e,t,n){return new r.Struct({...e,coercer:(i,s)=>(0,r.is)(i,t)?e.coercer(n(i,s),s):e.coercer(i,s)})}n.coerce=o,n.defaulted=function(e,t,n={}){return o(e,(0,s.unknown)(),(e=>{const r="function"==typeof t?t():t;if(void 0===e)return r;if(!n.strict&&(0,i.isPlainObject)(e)&&(0,i.isPlainObject)(r)){const t={...e};let n=!1;for(const e in r)void 0===t[e]&&(t[e]=r[e],n=!0);if(n)return t}return e}))},n.trimmed=function(e){return o(e,(0,s.string)(),(e=>e.trim()))}},{"../struct.cjs":311,"../utils.cjs":316,"./types.cjs":314}],313:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.refine=n.size=n.pattern=n.nonempty=n.min=n.max=n.empty=void 0;const r=e("../struct.cjs"),i=e("../utils.cjs");function s(e){return e instanceof Map||e instanceof Set?e.size:e.length}function o(e,t,n){return new r.Struct({...e,*refiner(r,s){yield*e.refiner(r,s);const o=n(r,s),a=(0,i.toFailures)(o,s,e,r);for(const e of a)yield{...e,refinement:t}}})}n.empty=function(e){return o(e,"empty",(t=>{const n=s(t);return 0===n||`Expected an empty ${e.type} but received one with a size of \`${n}\``}))},n.max=function(e,t,n={}){const{exclusive:r}=n;return o(e,"max",(n=>r?n<t:n<=t||`Expected a ${e.type} less than ${r?"":"or equal to "}${t} but received \`${n}\``))},n.min=function(e,t,n={}){const{exclusive:r}=n;return o(e,"min",(n=>r?n>t:n>=t||`Expected a ${e.type} greater than ${r?"":"or equal to "}${t} but received \`${n}\``))},n.nonempty=function(e){return o(e,"nonempty",(t=>s(t)>0||`Expected a nonempty ${e.type} but received an empty one`))},n.pattern=function(e,t){return o(e,"pattern",(n=>t.test(n)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${n}"`))},n.size=function(e,t,n=t){const r=`Expected a ${e.type}`,i=t===n?`of \`${t}\``:`between \`${t}\` and \`${n}\``;return o(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=n||`${r} ${i} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:s}=e;return t<=s&&s<=n||`${r} with a size ${i} but received one with a size of \`${s}\``}const{length:s}=e;return t<=s&&s<=n||`${r} with a length ${i} but received one with a length of \`${s}\``}))},n.refine=o},{"../struct.cjs":311,"../utils.cjs":316}],314:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.unknown=n.union=n.type=n.tuple=n.string=n.set=n.regexp=n.record=n.exactOptional=n.optional=n.object=n.number=n.nullable=n.never=n.map=n.literal=n.intersection=n.integer=n.instance=n.func=n.enums=n.date=n.boolean=n.bigint=n.array=n.any=void 0;const r=e("../struct.cjs"),i=e("../utils.cjs"),s=e("./utilities.cjs");function o(){return(0,s.define)("never",(()=>!1))}n.any=function(){return(0,s.define)("any",(()=>!0))},n.array=function(e){return new r.Struct({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${(0,i.print)(e)}`})},n.bigint=function(){return(0,s.define)("bigint",(e=>"bigint"==typeof e))},n.boolean=function(){return(0,s.define)("boolean",(e=>"boolean"==typeof e))},n.date=function(){return(0,s.define)("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${(0,i.print)(e)}`))},n.enums=function(e){const t={},n=e.map((e=>(0,i.print)(e))).join();for(const n of e)t[n]=n;return new r.Struct({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${n}\`, but received: ${(0,i.print)(t)}`})},n.func=function(){return(0,s.define)("func",(e=>"function"==typeof e||`Expected a function, but received: ${(0,i.print)(e)}`))},n.instance=function(e){return(0,s.define)("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${(0,i.print)(t)}`))},n.integer=function(){return(0,s.define)("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${(0,i.print)(e)}`))},n.intersection=function(e){return new r.Struct({type:"intersection",schema:null,*entries(t,n){for(const{entries:r}of e)yield*r(t,n)},*validator(t,n){for(const{validator:r}of e)yield*r(t,n)},*refiner(t,n){for(const{refiner:r}of e)yield*r(t,n)}})},n.literal=function(e){const t=(0,i.print)(e),n=typeof e;return new r.Struct({type:"literal",schema:"string"===n||"number"===n||"boolean"===n?e:null,validator:n=>n===e||`Expected the literal \`${t}\`, but received: ${(0,i.print)(n)}`})},n.map=function(e,t){return new r.Struct({type:"map",schema:null,*entries(n){if(e&&t&&n instanceof Map)for(const[r,i]of n.entries())yield[r,r,e],yield[r,i,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${(0,i.print)(e)}`})},n.never=o,n.nullable=function(e){return new r.Struct({...e,validator:(t,n)=>null===t||e.validator(t,n),refiner:(t,n)=>null===t||e.refiner(t,n)})},n.number=function(){return(0,s.define)("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${(0,i.print)(e)}`))},n.object=function(e){const t=e?Object.keys(e):[],n=o();return new r.Struct({type:"object",schema:e??null,*entries(s){if(e&&(0,i.isObject)(s)){const i=new Set(Object.keys(s));for(const n of t){i.delete(n);const t=e[n];r.ExactOptionalStruct.isExactOptional(t)&&!Object.prototype.hasOwnProperty.call(s,n)||(yield[n,s[n],e[n]])}for(const e of i)yield[e,s[e],n]}},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`,coercer:e=>(0,i.isObject)(e)?{...e}:e})},n.optional=function(e){return new r.Struct({...e,validator:(t,n)=>void 0===t||e.validator(t,n),refiner:(t,n)=>void 0===t||e.refiner(t,n)})},n.exactOptional=function(e){return new r.ExactOptionalStruct(e)},n.record=function(e,t){return new r.Struct({type:"record",schema:null,*entries(n){if((0,i.isObject)(n))for(const r in n){const i=n[r];yield[r,r,e],yield[r,i,t]}},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`})},n.regexp=function(){return(0,s.define)("regexp",(e=>e instanceof RegExp))},n.set=function(e){return new r.Struct({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const n of t)yield[n,n,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${(0,i.print)(e)}`})},n.string=function(){return(0,s.define)("string",(e=>"string"==typeof e||`Expected a string, but received: ${(0,i.print)(e)}`))},n.tuple=function(e){const t=o();return new r.Struct({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const r=Math.max(e.length,n.length);for(let i=0;i<r;i++)yield[i,n[i],e[i]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${(0,i.print)(e)}`})},n.type=function(e){const t=Object.keys(e);return new r.Struct({type:"type",schema:e,*entries(n){if((0,i.isObject)(n))for(const r of t)yield[r,n[r],e[r]]},validator:e=>(0,i.isObject)(e)||`Expected an object, but received: ${(0,i.print)(e)}`,coercer:e=>(0,i.isObject)(e)?{...e}:e})},n.union=function(e){const t=e.map((e=>e.type)).join(" | ");return new r.Struct({type:"union",schema:null,coercer(t){for(const n of e){const[e,r]=n.validate(t,{coerce:!0});if(!e)return r}return t},validator(n,r){const s=[];for(const t of e){const[...e]=(0,i.run)(n,t,r),[o]=e;if(!o?.[0])return[];for(const[t]of e)t&&s.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${(0,i.print)(n)}`,...s]}})},n.unknown=function(){return(0,s.define)("unknown",(()=>!0))}},{"../struct.cjs":311,"../utils.cjs":316,"./utilities.cjs":315}],315:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.pick=n.partial=n.omit=n.lazy=n.dynamic=n.deprecated=n.define=n.assign=void 0;const r=e("../struct.cjs"),i=e("./types.cjs");n.assign=function(...e){const t="type"===e[0]?.type,n=e.map((({schema:e})=>e)),r=Object.assign({},...n);return t?(0,i.type)(r):(0,i.object)(r)},n.define=function(e,t){return new r.Struct({type:e,schema:null,validator:t})},n.deprecated=function(e,t){return new r.Struct({...e,refiner:(t,n)=>void 0===t||e.refiner(t,n),validator:(n,r)=>void 0===n||(t(n,r),e.validator(n,r))})},n.dynamic=function(e){return new r.Struct({type:"dynamic",schema:null,*entries(t,n){const r=e(t,n);yield*r.entries(t,n)},validator:(t,n)=>e(t,n).validator(t,n),coercer:(t,n)=>e(t,n).coercer(t,n),refiner:(t,n)=>e(t,n).refiner(t,n)})},n.lazy=function(e){let t;return new r.Struct({type:"lazy",schema:null,*entries(n,r){t??(t=e()),yield*t.entries(n,r)},validator:(n,r)=>(t??(t=e()),t.validator(n,r)),coercer:(n,r)=>(t??(t=e()),t.coercer(n,r)),refiner:(n,r)=>(t??(t=e()),t.refiner(n,r))})},n.omit=function(e,t){const{schema:n}=e,r={...n};for(const e of t)delete r[e];return"type"===e.type?(0,i.type)(r):(0,i.object)(r)},n.partial=function(e){const t=e instanceof r.Struct,n=t?{...e.schema}:{...e};for(const e in n)n[e]=(0,i.optional)(n[e]);return t&&"type"===e.type?(0,i.type)(n):(0,i.object)(n)},n.pick=function(e,t){const{schema:n}=e,r={};for(const e of t)r[e]=n[e];return"type"===e.type?(0,i.type)(r):(0,i.object)(r)}},{"../struct.cjs":311,"./types.cjs":314}],316:[function(e,t,n){"use strict";function r(e){return"object"==typeof e&&null!==e}function i(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function s(e,t,n,r){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:s,branch:o}=t,{type:a}=n,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${i(r)}\``}=e;return{value:r,type:a,refinement:c,key:s[s.length-1],path:s,branch:o,...e,message:u}}Object.defineProperty(n,"__esModule",{value:!0}),n.run=n.toFailures=n.toFailure=n.shiftIterator=n.print=n.isPlainObject=n.isObject=void 0,n.isObject=r,n.isPlainObject=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},n.print=i,n.shiftIterator=function(e){const{done:t,value:n}=e.next();return t?void 0:n},n.toFailure=s,n.toFailures=function*(e,t,n,i){(function(e){return r(e)&&"function"==typeof e[Symbol.iterator]})(e)||(e=[e]);for(const r of e){const e=s(r,t,n,i);e&&(yield e)}},n.run=function*e(t,n,i={}){const{path:s=[],branch:o=[t],coerce:a=!1,mask:c=!1}=i,u={path:s,branch:o};if(a&&(t=n.coercer(t,u),c&&"type"!==n.type&&r(n.schema)&&r(t)&&!Array.isArray(t)))for(const e in t)void 0===n.schema[e]&&delete t[e];let l="valid";for(const e of n.validator(t,u))e.explanation=i.message,l="not_valid",yield[e,void 0];for(let[d,h,f]of n.entries(t,u)){const n=e(h,f,{path:void 0===d?s:[...s,d],branch:void 0===d?o:[...o,h],coerce:a,mask:c,message:i.message});for(const e of n)e[0]?(l=null===e[0].refinement||void 0===e[0].refinement?"not_valid":"not_refined",yield[e[0],void 0]):a&&(h=e[1],void 0===d?t=h:t instanceof Map?t.set(d,h):t instanceof Set?t.add(h):r(t)&&(void 0!==h||d in t)&&(t[d]=h))}if("not_valid"!==l)for(const e of n.refiner(t,u))e.explanation=i.message,l="not_refined",yield[e,void 0];"valid"===l&&(yield[void 0,t])}},{}],317:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.assertExhaustive=n.assertStruct=n.assert=n.AssertionError=void 0;const r=e("@metamask/superstruct"),i=e("./errors.cjs");function s(e,t){return n=e,Boolean("string"==typeof n?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var n}class o extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}}n.AssertionError=o,n.assert=function(e,t="Assertion failed.",n=o){if(!e){if(t instanceof Error)throw t;throw s(n,t)}},n.assertStruct=function(e,t,n="Assertion failed",a=o){try{(0,r.assert)(e,t)}catch(e){throw s(a,`${n}: ${function(e){return(0,i.getErrorMessage)(e).replace(/\.$/u,"")}(e)}.`)}},n.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},{"./errors.cjs":325,"@metamask/superstruct":310}],318:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.base64=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs");n.base64=(e,t={})=>{const n=t.paddingRequired??!1,s=t.characterSet??"base64";let o,a;return"base64"===s?o=String.raw`[A-Za-z0-9+\/]`:((0,i.assert)("base64url"===s),o=String.raw`[-_A-Za-z0-9]`),a=n?new RegExp(`^(?:${o}{4})*(?:${o}{3}=|${o}{2}==)?$`,"u"):new RegExp(`^(?:${o}{4})*(?:${o}{2,3}|${o}{3}=|${o}{2}==)?$`,"u"),(0,r.pattern)(e,a)}},{"./assert.cjs":317,"@metamask/superstruct":310}],319:[function(e,t,n){(function(t){(function(){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDataView=n.concatBytes=n.valueToBytes=n.base64ToBytes=n.stringToBytes=n.numberToBytes=n.signedBigIntToBytes=n.bigIntToBytes=n.hexToBytes=n.bytesToBase64=n.bytesToString=n.bytesToNumber=n.bytesToSignedBigInt=n.bytesToBigInt=n.bytesToHex=n.assertIsBytes=n.isBytes=void 0;const r=e("@scure/base"),i=e("./assert.cjs"),s=e("./hex.cjs"),o=48,a=58,c=87;const u=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function l(e){return e instanceof Uint8Array}function d(e){(0,i.assert)(l(e),"Value must be a Uint8Array.")}function h(e){if(d(e),0===e.length)return"0x";const t=u(),n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=t[e[r]];return(0,s.add0x)(n.join(""))}function f(e){d(e);const t=h(e);return BigInt(t)}function p(e){if("0x"===e?.toLowerCase?.())return new Uint8Array;(0,s.assertIsHexString)(e);const t=(0,s.remove0x)(e).toLowerCase(),n=t.length%2==0?t:`0${t}`,r=new Uint8Array(n.length/2);for(let e=0;e<r.length;e++){const t=n.charCodeAt(2*e),i=n.charCodeAt(2*e+1),s=t-(t<a?o:c),u=i-(i<a?o:c);r[e]=16*s+u}return r}function m(e){(0,i.assert)("bigint"==typeof e,"Value must be a bigint."),(0,i.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");return p(e.toString(16))}function y(e){(0,i.assert)("number"==typeof e,"Value must be a number."),(0,i.assert)(e>=0,"Value must be a non-negative number."),(0,i.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return p(e.toString(16))}function g(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return m(e);if("number"==typeof e)return y(e);if("string"==typeof e)return e.startsWith("0x")?p(e):g(e);if(l(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}n.isBytes=l,n.assertIsBytes=d,n.bytesToHex=h,n.bytesToBigInt=f,n.bytesToSignedBigInt=function(e){d(e);let t=BigInt(0);for(const n of e)t=(t<<BigInt(8))+BigInt(n);return BigInt.asIntN(8*e.length,t)},n.bytesToNumber=function(e){d(e);const t=f(e);return(0,i.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},n.bytesToString=function(e){return d(e),(new TextDecoder).decode(e)},n.bytesToBase64=function(e){return d(e),r.base64.encode(e)},n.hexToBytes=p,n.bigIntToBytes=m,n.signedBigIntToBytes=function(e,t){(0,i.assert)("bigint"==typeof e,"Value must be a bigint."),(0,i.assert)("number"==typeof t,"Byte length must be a number."),(0,i.assert)(t>0,"Byte length must be greater than 0."),(0,i.assert)(function(e,t){(0,i.assert)(t>0);const n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let n=e;const r=new Uint8Array(t);for(let e=0;e<r.length;e++)r[e]=Number(BigInt.asUintN(8,n)),n>>=BigInt(8);return r.reverse()},n.numberToBytes=y,n.stringToBytes=g,n.base64ToBytes=function(e){return(0,i.assert)("string"==typeof e,"Value must be a string."),r.base64.decode(e)},n.valueToBytes=b,n.concatBytes=function(e){const t=new Array(e.length);let n=0;for(let r=0;r<e.length;r++){const i=b(e[r]);t[r]=i,n+=i.length}const r=new Uint8Array(n);for(let e=0,n=0;e<t.length;e++)r.set(t[e],n),n+=t[e].length;return r},n.createDataView=function(e){if(void 0!==t&&e instanceof t){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}}).call(this)}).call(this,e("buffer").Buffer)},{"./assert.cjs":317,"./hex.cjs":326,"@scure/base":369,buffer:403}],320:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toCaipAssetId=n.toCaipAssetType=n.toCaipAccountId=n.toCaipChainId=n.parseCaipAssetId=n.parseCaipAssetType=n.parseCaipAccountId=n.parseCaipChainId=n.isCaipAssetId=n.isCaipAssetType=n.isCaipTokenId=n.isCaipAssetReference=n.isCaipAssetNamespace=n.isCaipAccountAddress=n.isCaipAccountId=n.isCaipReference=n.isCaipNamespace=n.isCaipChainId=n.KnownCaipNamespace=n.CaipAssetTypeOrIdStruct=n.CaipAssetIdStruct=n.CaipAssetTypeStruct=n.CaipTokenIdStruct=n.CaipAssetReferenceStruct=n.CaipAssetNamespaceStruct=n.CaipAccountAddressStruct=n.CaipAccountIdStruct=n.CaipReferenceStruct=n.CaipNamespaceStruct=n.CaipChainIdStruct=n.CAIP_ASSET_ID_REGEX=n.CAIP_ASSET_TYPE_REGEX=n.CAIP_TOKEN_ID_REGEX=n.CAIP_ASSET_REFERENCE_REGEX=n.CAIP_ASSET_NAMESPACE_REGEX=n.CAIP_ACCOUNT_ADDRESS_REGEX=n.CAIP_ACCOUNT_ID_REGEX=n.CAIP_REFERENCE_REGEX=n.CAIP_NAMESPACE_REGEX=n.CAIP_CHAIN_ID_REGEX=void 0;const r=e("@metamask/superstruct"),i=e("./superstruct.cjs");n.CAIP_CHAIN_ID_REGEX=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,n.CAIP_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,n.CAIP_REFERENCE_REGEX=/^[-_a-zA-Z0-9]{1,32}$/u,n.CAIP_ACCOUNT_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ACCOUNT_ADDRESS_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,n.CAIP_ASSET_NAMESPACE_REGEX=/^[-a-z0-9]{3,8}$/u,n.CAIP_ASSET_REFERENCE_REGEX=/^[-.%a-zA-Z0-9]{1,128}$/u,n.CAIP_TOKEN_ID_REGEX=/^[-.%a-zA-Z0-9]{1,78}$/u,n.CAIP_ASSET_TYPE_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})$/u,n.CAIP_ASSET_ID_REGEX=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})\/(?<tokenId>[-.%a-zA-Z0-9]{1,78})$/u;function s(e){return(0,r.is)(e,n.CaipNamespaceStruct)}function o(e){return(0,r.is)(e,n.CaipReferenceStruct)}function a(e){return(0,r.is)(e,n.CaipAccountAddressStruct)}function c(e){return(0,r.is)(e,n.CaipAssetNamespaceStruct)}function u(e){return(0,r.is)(e,n.CaipAssetReferenceStruct)}function l(e){return(0,r.is)(e,n.CaipTokenIdStruct)}n.CaipChainIdStruct=(0,i.definePattern)("CaipChainId",n.CAIP_CHAIN_ID_REGEX),n.CaipNamespaceStruct=(0,i.definePattern)("CaipNamespace",n.CAIP_NAMESPACE_REGEX),n.CaipReferenceStruct=(0,i.definePattern)("CaipReference",n.CAIP_REFERENCE_REGEX),n.CaipAccountIdStruct=(0,i.definePattern)("CaipAccountId",n.CAIP_ACCOUNT_ID_REGEX),n.CaipAccountAddressStruct=(0,i.definePattern)("CaipAccountAddress",n.CAIP_ACCOUNT_ADDRESS_REGEX),n.CaipAssetNamespaceStruct=(0,i.definePattern)("CaipAssetNamespace",n.CAIP_ASSET_NAMESPACE_REGEX),n.CaipAssetReferenceStruct=(0,i.definePattern)("CaipAssetReference",n.CAIP_ASSET_REFERENCE_REGEX),n.CaipTokenIdStruct=(0,i.definePattern)("CaipTokenId",n.CAIP_TOKEN_ID_REGEX),n.CaipAssetTypeStruct=(0,i.definePattern)("CaipAssetType",n.CAIP_ASSET_TYPE_REGEX),n.CaipAssetIdStruct=(0,i.definePattern)("CaipAssetId",n.CAIP_ASSET_ID_REGEX),n.CaipAssetTypeOrIdStruct=(0,i.definePattern)("CaipAssetTypeOrId",/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32}))\/(?<assetNamespace>[-a-z0-9]{3,8}):(?<assetReference>[-.%a-zA-Z0-9]{1,128})(\/(?<tokenId>[-.%a-zA-Z0-9]{1,78}))?$/u),function(e){e.Bip122="bip122",e.Solana="solana",e.Eip155="eip155",e.Wallet="wallet"}(n.KnownCaipNamespace||(n.KnownCaipNamespace={})),n.isCaipChainId=function(e){return(0,r.is)(e,n.CaipChainIdStruct)},n.isCaipNamespace=s,n.isCaipReference=o,n.isCaipAccountId=function(e){return(0,r.is)(e,n.CaipAccountIdStruct)},n.isCaipAccountAddress=a,n.isCaipAssetNamespace=c,n.isCaipAssetReference=u,n.isCaipTokenId=l,n.isCaipAssetType=function(e){return(0,r.is)(e,n.CaipAssetTypeStruct)},n.isCaipAssetId=function(e){return(0,r.is)(e,n.CaipAssetIdStruct)},n.parseCaipChainId=function(e){const t=n.CAIP_CHAIN_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},n.parseCaipAccountId=function(e){const t=n.CAIP_ACCOUNT_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.parseCaipAssetType=function(e){const t=n.CAIP_ASSET_TYPE_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP asset type.");return{assetNamespace:t.groups.assetNamespace,assetReference:t.groups.assetReference,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.parseCaipAssetId=function(e){const t=n.CAIP_ASSET_ID_REGEX.exec(e);if(!t?.groups)throw new Error("Invalid CAIP asset ID.");return{assetNamespace:t.groups.assetNamespace,assetReference:t.groups.assetReference,tokenId:t.groups.tokenId,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}},n.toCaipChainId=function(e,t){if(!s(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);return`${e}:${t}`},n.toCaipAccountId=function(e,t,r){if(!s(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);if(!a(r))throw new Error(`Invalid "accountAddress", must match: ${n.CAIP_ACCOUNT_ADDRESS_REGEX.toString()}`);return`${e}:${t}:${r}`},n.toCaipAssetType=function(e,t,r,i){if(!s(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);if(!c(r))throw new Error(`Invalid "assetNamespace", must match: ${n.CAIP_ASSET_NAMESPACE_REGEX.toString()}`);if(!u(i))throw new Error(`Invalid "assetReference", must match: ${n.CAIP_ASSET_REFERENCE_REGEX.toString()}`);return`${e}:${t}/${r}:${i}`},n.toCaipAssetId=function(e,t,r,i,a){if(!s(e))throw new Error(`Invalid "namespace", must match: ${n.CAIP_NAMESPACE_REGEX.toString()}`);if(!o(t))throw new Error(`Invalid "reference", must match: ${n.CAIP_REFERENCE_REGEX.toString()}`);if(!c(r))throw new Error(`Invalid "assetNamespace", must match: ${n.CAIP_ASSET_NAMESPACE_REGEX.toString()}`);if(!u(i))throw new Error(`Invalid "assetReference", must match: ${n.CAIP_ASSET_REFERENCE_REGEX.toString()}`);if(!l(a))throw new Error(`Invalid "tokenId", must match: ${n.CAIP_TOKEN_ID_REGEX.toString()}`);return`${e}:${t}/${r}:${i}/${a}`}},{"./superstruct.cjs":335,"@metamask/superstruct":310}],321:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ChecksumStruct=void 0;const r=e("@metamask/superstruct"),i=e("./base64.cjs");n.ChecksumStruct=(0,r.size)((0,i.base64)((0,r.string)(),{paddingRequired:!0}),44,44)},{"./base64.cjs":318,"@metamask/superstruct":310}],322:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createHex=n.createBytes=n.createBigInt=n.createNumber=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs"),s=e("./bytes.cjs"),o=e("./hex.cjs"),a=(0,r.union)([(0,r.number)(),(0,r.bigint)(),(0,r.string)(),o.StrictHexStruct]),c=(0,r.coerce)((0,r.number)(),a,Number),u=(0,r.coerce)((0,r.bigint)(),a,BigInt),l=((0,r.union)([o.StrictHexStruct,(0,r.instance)(Uint8Array)]),(0,r.coerce)((0,r.instance)(Uint8Array),(0,r.union)([o.StrictHexStruct]),s.hexToBytes)),d=(0,r.coerce)(o.StrictHexStruct,(0,r.instance)(Uint8Array),s.bytesToHex);n.createNumber=function(e){try{const t=(0,r.create)(e,c);return(0,i.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof r.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},n.createBigInt=function(e){try{return(0,r.create)(e,u)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},n.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return(0,r.create)(e,l)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},n.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return(0,r.create)(e,d)}catch(e){if(e instanceof r.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},{"./assert.cjs":317,"./bytes.cjs":319,"./hex.cjs":326,"@metamask/superstruct":310}],323:[function(e,t,n){"use strict";var r,i,s=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},o=this&&this.__classPrivateFieldSet||function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};Object.defineProperty(n,"__esModule",{value:!0}),n.FrozenSet=n.FrozenMap=void 0;class a{get size(){return s(this,r,"f").size}[(r=new WeakMap,Symbol.iterator)](){return s(this,r,"f")[Symbol.iterator]()}constructor(e){r.set(this,void 0),o(this,r,new Map(e),"f"),Object.freeze(this)}entries(){return s(this,r,"f").entries()}forEach(e,t){return s(this,r,"f").forEach(((n,r,i)=>e.call(t,n,r,this)))}get(e){return s(this,r,"f").get(e)}has(e){return s(this,r,"f").has(e)}keys(){return s(this,r,"f").keys()}values(){return s(this,r,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}}n.FrozenMap=a;class c{get size(){return s(this,i,"f").size}[(i=new WeakMap,Symbol.iterator)](){return s(this,i,"f")[Symbol.iterator]()}constructor(e){i.set(this,void 0),o(this,i,new Set(e),"f"),Object.freeze(this)}entries(){return s(this,i,"f").entries()}forEach(e,t){return s(this,i,"f").forEach(((n,r,i)=>e.call(t,n,r,this)))}has(e){return s(this,i,"f").has(e)}keys(){return s(this,i,"f").keys()}values(){return s(this,i,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}}n.FrozenSet=c,Object.freeze(a),Object.freeze(a.prototype),Object.freeze(c),Object.freeze(c.prototype)},{}],324:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],325:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.wrapError=n.getErrorMessage=n.isErrorWithStack=n.isErrorWithMessage=n.isErrorWithCode=void 0;const r=e("pony-cause"),i=e("./misc.cjs");function s(e){return"object"==typeof e&&null!==e&&"code"in e}function o(e){return"object"==typeof e&&null!==e&&"message"in e}n.isErrorWithCode=s,n.isErrorWithMessage=o,n.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},n.getErrorMessage=function(e){return o(e)&&"string"==typeof e.message?e.message:(0,i.isNullOrUndefined)(e)?"":String(e)},n.wrapError=function(e,t){if((n=e)instanceof Error||(0,i.isObject)(n)&&"Error"===n.constructor.name){let n;return n=2===Error.length?new Error(t,{cause:e}):new r.ErrorWithCause(t,{cause:e}),s(e)&&(n.code=e.code),n}var n;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}},{"./misc.cjs":331,"pony-cause":526}],326:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.remove0x=n.add0x=n.isValidChecksumAddress=n.getChecksumAddress=n.isValidHexAddress=n.assertIsStrictHexString=n.assertIsHexString=n.isStrictHexString=n.isHexString=n.HexChecksumAddressStruct=n.HexAddressStruct=n.StrictHexStruct=n.HexStruct=void 0;const r=e("@metamask/superstruct"),i=e("@noble/hashes/sha3"),s=e("./assert.cjs"),o=e("./bytes.cjs");function a(e){return(0,r.is)(e,n.HexStruct)}function c(e){return(0,r.is)(e,n.StrictHexStruct)}function u(e){(0,s.assert)((0,r.is)(e,n.HexChecksumAddressStruct),"Invalid hex address.");const t=d(e.toLowerCase()),a=d((0,o.bytesToHex)((0,i.keccak_256)(t)));return`0x${t.split("").map(((e,t)=>{const n=a[t];return(0,s.assert)((0,r.is)(n,(0,r.string)()),"Hash shorter than address."),parseInt(n,16)>7?e.toUpperCase():e})).join("")}`}function l(e){return!!(0,r.is)(e,n.HexChecksumAddressStruct)&&u(e)===e}function d(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}n.HexStruct=(0,r.pattern)((0,r.string)(),/^(?:0x)?[0-9a-f]+$/iu),n.StrictHexStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]+$/iu),n.HexAddressStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-f]{40}$/u),n.HexChecksumAddressStruct=(0,r.pattern)((0,r.string)(),/^0x[0-9a-fA-F]{40}$/u),n.isHexString=a,n.isStrictHexString=c,n.assertIsHexString=function(e){(0,s.assert)(a(e),"Value must be a hexadecimal string.")},n.assertIsStrictHexString=function(e){(0,s.assert)(c(e),'Value must be a hexadecimal string, starting with "0x)},n.isValidHexAddress=function(e){return(0,r.is)(e,n.HexAddressStruct)||l(e)},n.getChecksumAddress=u,n.isValidChecksumAddress=l,n.add0x=function(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`},n.remove0x=d},{"./assert.cjs":317,"./bytes.cjs":319,"@metamask/superstruct":310,"@noble/hashes/sha3":366}],327:[function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(n,"__esModule",{value:!0}),i(e("./assert.cjs"),n),i(e("./base64.cjs"),n),i(e("./bytes.cjs"),n),i(e("./caip-types.cjs"),n),i(e("./checksum.cjs"),n),i(e("./coercers.cjs"),n),i(e("./collections.cjs"),n),i(e("./encryption-types.cjs"),n),i(e("./errors.cjs"),n),i(e("./hex.cjs"),n),i(e("./json.cjs"),n),i(e("./keyring.cjs"),n),i(e("./logging.cjs"),n),i(e("./misc.cjs"),n),i(e("./number.cjs"),n),i(e("./opaque.cjs"),n),i(e("./promise.cjs"),n),i(e("./superstruct.cjs"),n),i(e("./time.cjs"),n),i(e("./transaction-types.cjs"),n),i(e("./versions.cjs"),n)},{"./assert.cjs":317,"./base64.cjs":318,"./bytes.cjs":319,"./caip-types.cjs":320,"./checksum.cjs":321,"./coercers.cjs":322,"./collections.cjs":323,"./encryption-types.cjs":324,"./errors.cjs":325,"./hex.cjs":326,"./json.cjs":328,"./keyring.cjs":329,"./logging.cjs":330,"./misc.cjs":331,"./number.cjs":332,"./opaque.cjs":333,"./promise.cjs":334,"./superstruct.cjs":335,"./time.cjs":336,"./transaction-types.cjs":337,"./versions.cjs":338}],328:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getJsonRpcIdValidator=n.assertIsJsonRpcError=n.isJsonRpcError=n.assertIsJsonRpcFailure=n.isJsonRpcFailure=n.assertIsJsonRpcSuccess=n.isJsonRpcSuccess=n.assertIsJsonRpcResponse=n.isJsonRpcResponse=n.assertIsPendingJsonRpcResponse=n.isPendingJsonRpcResponse=n.JsonRpcResponseStruct=n.JsonRpcFailureStruct=n.JsonRpcSuccessStruct=n.PendingJsonRpcResponseStruct=n.assertIsJsonRpcRequest=n.isJsonRpcRequest=n.assertIsJsonRpcNotification=n.isJsonRpcNotification=n.JsonRpcNotificationStruct=n.JsonRpcRequestStruct=n.JsonRpcParamsStruct=n.JsonRpcErrorStruct=n.JsonRpcIdStruct=n.JsonRpcVersionStruct=n.jsonrpc2=n.getJsonSize=n.getSafeJson=n.isValidJson=n.JsonStruct=n.UnsafeJsonStruct=n.exactOptional=n.object=void 0;const r=e("@metamask/superstruct"),i=e("./assert.cjs"),s=e("./misc.cjs");function o({path:e,branch:t}){const n=e[e.length-1];return(0,s.hasProperty)(t[t.length-2],n)}function a(e){return new r.Struct({...e,type:`optional ${e.type}`,validator:(t,n)=>!o(n)||e.validator(t,n),refiner:(t,n)=>!o(n)||e.refiner(t,n)})}function c(e){if(null===e||"boolean"==typeof e||"string"==typeof e)return!0;if("number"==typeof e&&Number.isFinite(e))return!0;if("object"==typeof e){let t=!0;if(Array.isArray(e)){for(let n=0;n<e.length;n++)if(!c(e[n])){t=!1;break}return t}const n=Object.entries(e);for(let e=0;e<n.length;e++)if("string"!=typeof n[e][0]||!c(n[e][1])){t=!1;break}return t}return!1}function u(e){return(0,r.create)(e,n.JsonStruct)}n.object=e=>(0,r.object)(e),n.exactOptional=a,n.UnsafeJsonStruct=(0,r.define)("JSON",(e=>c(e))),n.JsonStruct=(0,r.coerce)(n.UnsafeJsonStruct,(0,r.refine)((0,r.any)(),"JSON",(e=>(0,r.is)(e,n.UnsafeJsonStruct))),(e=>JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))))),n.isValidJson=function(e){try{return u(e),!0}catch{return!1}},n.getSafeJson=u,n.getJsonSize=function(e){(0,i.assertStruct)(e,n.JsonStruct,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},n.jsonrpc2="2.0",n.JsonRpcVersionStruct=(0,r.literal)(n.jsonrpc2),n.JsonRpcIdStruct=(0,r.nullable)((0,r.union)([(0,r.number)(),(0,r.string)()])),n.JsonRpcErrorStruct=(0,n.object)({code:(0,r.integer)(),message:(0,r.string)(),data:a(n.JsonStruct),stack:a((0,r.string)())}),n.JsonRpcParamsStruct=(0,r.union)([(0,r.record)((0,r.string)(),n.JsonStruct),(0,r.array)(n.JsonStruct)]),n.JsonRpcRequestStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:a(n.JsonRpcParamsStruct)}),n.JsonRpcNotificationStruct=(0,n.object)({jsonrpc:n.JsonRpcVersionStruct,method:(0,r.string)(),params:a(n.JsonRpcParamsStruct)}),n.isJsonRpcNotification=function(e){return(0,r.is)(e,n.JsonRpcNotificationStruct)},n.assertIsJsonRpcNotification=function(e,t){(0,i.assertStruct)(e,n.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",t)},n.isJsonRpcRequest=function(e){return(0,r.is)(e,n.JsonRpcRequestStruct)},n.assertIsJsonRpcRequest=function(e,t){(0,i.assertStruct)(e,n.JsonRpcRequestStruct,"Invalid JSON-RPC request",t)},n.PendingJsonRpcResponseStruct=(0,r.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:(0,r.optional)((0,r.unknown)()),error:(0,r.optional)(n.JsonRpcErrorStruct)}),n.JsonRpcSuccessStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,result:n.JsonStruct}),n.JsonRpcFailureStruct=(0,n.object)({id:n.JsonRpcIdStruct,jsonrpc:n.JsonRpcVersionStruct,error:n.JsonRpcErrorStruct}),n.JsonRpcResponseStruct=(0,r.union)([n.JsonRpcSuccessStruct,n.JsonRpcFailureStruct]),n.isPendingJsonRpcResponse=function(e){return(0,r.is)(e,n.PendingJsonRpcResponseStruct)},n.assertIsPendingJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,n.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",t)},n.isJsonRpcResponse=function(e){return(0,r.is)(e,n.JsonRpcResponseStruct)},n.assertIsJsonRpcResponse=function(e,t){(0,i.assertStruct)(e,n.JsonRpcResponseStruct,"Invalid JSON-RPC response",t)},n.isJsonRpcSuccess=function(e){return(0,r.is)(e,n.JsonRpcSuccessStruct)},n.assertIsJsonRpcSuccess=function(e,t){(0,i.assertStruct)(e,n.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",t)},n.isJsonRpcFailure=function(e){return(0,r.is)(e,n.JsonRpcFailureStruct)},n.assertIsJsonRpcFailure=function(e,t){(0,i.assertStruct)(e,n.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",t)},n.isJsonRpcError=function(e){return(0,r.is)(e,n.JsonRpcErrorStruct)},n.assertIsJsonRpcError=function(e,t){(0,i.assertStruct)(e,n.JsonRpcErrorStruct,"Invalid JSON-RPC error",t)},n.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:n,permitNull:r}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(n||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||r&&null===e)}},{"./assert.cjs":317,"./misc.cjs":331,"@metamask/superstruct":310}],329:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],330:[function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n,"__esModule",{value:!0}),n.createModuleLogger=n.createProjectLogger=void 0;const i=(0,r(e("debug")).default)("metamask");n.createProjectLogger=function(e){return i.extend(e)},n.createModuleLogger=function(e,t){return e.extend(t)}},{debug:445}],331:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.calculateNumberSize=n.calculateStringSize=n.isASCII=n.isPlainObject=n.ESCAPE_CHARACTERS_REGEXP=n.JsonSize=n.getKnownPropertyNames=n.hasProperty=n.isObject=n.isNullOrUndefined=n.isNonEmptyArray=void 0,n.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},n.isNullOrUndefined=function(e){return null==e},n.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)};function r(e){return e.charCodeAt(0)<=127}n.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),n.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},function(e){e[e.Null=4]="Null",e[e.Comma=1]="Comma",e[e.Wrapper=1]="Wrapper",e[e.True=4]="True",e[e.False=5]="False",e[e.Quote=1]="Quote",e[e.Colon=1]="Colon",e[e.Date=24]="Date"}(n.JsonSize||(n.JsonSize={})),n.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,n.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},n.isASCII=r,n.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>r(t)?e+1:e+2),0)+(e.match(n.ESCAPE_CHARACTERS_REGEXP)??[]).length},n.calculateNumberSize=function(e){return e.toString().length}},{}],332:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hexToBigInt=n.hexToNumber=n.bigIntToHex=n.numberToHex=void 0;const r=e("./assert.cjs"),i=e("./hex.cjs");n.numberToHex=e=>((0,r.assert)("number"==typeof e,"Value must be a number."),(0,r.assert)(e>=0,"Value must be a non-negative number."),(0,r.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,i.add0x)(e.toString(16)));n.bigIntToHex=e=>((0,r.assert)("bigint"==typeof e,"Value must be a bigint."),(0,r.assert)(e>=0,"Value must be a non-negative bigint."),(0,i.add0x)(e.toString(16)));n.hexToNumber=e=>{(0,i.assertIsHexString)(e);const t=parseInt(e,16);return(0,r.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};n.hexToBigInt=e=>((0,i.assertIsHexString)(e),BigInt((0,i.add0x)(e)))},{"./assert.cjs":317,"./hex.cjs":326}],333:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],334:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createDeferredPromise=void 0,n.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,n;const r=new Promise(((e,r)=>{t=e,n=r}));return e&&r.catch((e=>{})),{promise:r,resolve:t,reject:n}}},{}],335:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.definePattern=void 0;const r=e("@metamask/superstruct");n.definePattern=function(e,t){return(0,r.define)(e,(e=>"string"==typeof e&&t.test(e)))}},{"@metamask/superstruct":310}],336:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.timeSince=n.inMilliseconds=n.Duration=void 0,function(e){e[e.Millisecond=1]="Millisecond",e[e.Second=1e3]="Second",e[e.Minute=6e4]="Minute",e[e.Hour=36e5]="Hour",e[e.Day=864e5]="Day",e[e.Week=6048e5]="Week",e[e.Year=31536e6]="Year"}(n.Duration||(n.Duration={}));const r=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};n.inMilliseconds=function(e,t){return r(e,"count"),e*t},n.timeSince=function(e){return r(e,"timestamp"),Date.now()-e}},{}],337:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0})},{}],338:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.satisfiesVersionRange=n.gtRange=n.gtVersion=n.assertIsSemVerRange=n.assertIsSemVerVersion=n.isValidSemVerRange=n.isValidSemVerVersion=n.VersionRangeStruct=n.VersionStruct=void 0;const r=e("@metamask/superstruct"),i=e("semver"),s=e("./assert.cjs");n.VersionStruct=(0,r.refine)((0,r.string)(),"Version",(e=>null!==(0,i.valid)(e)||`Expected SemVer version, got "${e}"`)),n.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",(e=>null!==(0,i.validRange)(e)||`Expected SemVer range, got "${e}"`)),n.isValidSemVerVersion=function(e){return(0,r.is)(e,n.VersionStruct)},n.isValidSemVerRange=function(e){return(0,r.is)(e,n.VersionRangeStruct)},n.assertIsSemVerVersion=function(e){(0,s.assertStruct)(e,n.VersionStruct)},n.assertIsSemVerRange=function(e){(0,s.assertStruct)(e,n.VersionRangeStruct)},n.gtVersion=function(e,t){return(0,i.gt)(e,t)},n.gtRange=function(e,t){return(0,i.gtr)(e,t)},n.satisfiesVersionRange=function(e,t){return(0,i.satisfies)(e,t,{includePrerelease:!0})}},{"./assert.cjs":317,"@metamask/superstruct":310,semver:574}],339:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getHash=o,n.createCurve=function(e,t){const n=t=>(0,s.weierstrass)({...e,...o(t)});return{...n(t),create:n}};



© 2023 Quttera Ltd. All rights reserved.