1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a08f3e-2ddd-7230-9d8c-37a805bd5085")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4271],{20063:(t,e,n)=>{var a=n(47260);n.o(a,"notFound")&&n.d(e,{notFound:function(){return a.notFound}}),n.o(a,"usePathname")&&n.d(e,{usePathname:function(){return a.usePathname}}),n.o(a,"useRouter")&&n.d(e,{useRouter:function(){return a.useRouter}}),n.o(a,"useSearchParams")&&n.d(e,{useSearchParams:function(){return a.useSearchParams}})},63374:(t,e,n)=>{n.d(e,{G:()=>w});var a=n(99776),r=n(73409),o=n(48299);async function s(t,e={}){return(await (0,o.r)(t,e)).extend(r.D)}var i=n(47575),c=n(12115),u=n(75575),d=n(3063),l=n(99941),h=n(86475);function w(){var t,e,n,r;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{query:w={},...f}=o,m=(0,h.U)(f),p=(0,a.jE)(),{address:y,connector:T,status:g}=(0,d.F)({config:m}),C=(0,l.i)({config:m}),v=null!=(t=o.connector)?t:T,{queryKey:q,...S}=function(t,e={}){return{gcTime:0,async queryFn({queryKey:n}){let{connector:a}=e,{connectorUid:r,scopeKey:o,...i}=n[1];return s(t,{...i,connector:a})},queryKey:function(t={}){let{connector:e,...n}=t;return["walletClient",{...(0,i.xO)(n),connectorUid:e?.uid}]}(e)}}(m,{...o,chainId:null!=(e=o.chainId)?e:C,connector:null!=(n=o.connector)?n:T}),P=!!(("connected"===g||"reconnecting"===g&&(null==v?void 0:v.getProvider))&&(null==(r=w.enabled)||r)),b=(0,c.useRef)(y);return(0,c.useEffect)(()=>{let t=b.current;!y&&t?(p.removeQueries({queryKey:q}),b.current=void 0):y!==t&&(p.invalidateQueries({queryKey:q}),b.current=y)},[y,p]),(0,u.IT)({...w,...S,queryKey:q,enabled:P,staleTime:1/0})}},73409:(t,e,n)=>{n.d(e,{D:()=>H});var a=n(47666),r=n(35471),o=n(34561);async function s(t,{chain:e}){let{id:n,name:a,nativeCurrency:r,rpcUrls:s,blockExplorers:i}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:(0,o.cK)(n),chainName:a,nativeCurrency:r,rpcUrls:s.default.http,blockExplorerUrls:i?Object.values(i).map(({url:t})=>t):void 0}]},{dedupe:!0,retryCount:0})}var i=n(6867),c=n(37219),u=n(77608);async function d(t){return t.account?.type==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(t=>(0,u.o)(t))}var l=n(81128),h=n(97152);async function w(t,e={}){let{account:n=t.account,chainId:a}=e,r=n?(0,h.J)(n):void 0,s=a?[r?.address,[(0,o.cK)(a)]]:[r?.address],i=await t.request({method:"wallet_getCapabilities",params:s}),c={};for(let[t,e]of Object.entries(i))for(let[n,a]of(c[Number(t)]={},Object.entries(e)))"addSubAccount"===n&&(n="unstable_addSubAccount"),c[Number(t)][n]=a;return"number"==typeof a?c[a]:c}async function f(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}var m=n(7799),p=n(31063);async function y(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(t=>(0,u.b)(t))}async function T(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}var g=n(55794),C=n(72757),v=n(42937);async function q(t,e){let{chain:n=t.chain}=e,a=e.timeout??Math.max((n?.blockTime??0)*3,5e3),r=await (0,C.T)(t,g.yM,"sendCalls")(e);return await (0,C.T)(t,v.c,"waitForCallsStatus")({...e,id:r.id,timeout:a})}var S=n(72707),P=n(96176),b=n(64664),R=n(13933),_=n(50879),A=n(84718),I=n(26767),M=n(40290),E=n(60655),z=n(44332),x=n(74750),F=n(20390),N=n(58623),k=n(52497);let D=new F.A(128);async function J(t,e){let n,{account:a=t.account,assertChainId:o=!0,chain:s=t.chain,accessList:i,authorizationList:c,blobs:u,data:d,dataSuffix:l="string"==typeof t.dataSuffix?t.dataSuffix:t.dataSuffix?.value,gas:w,gasPrice:f,maxFeePerBlobGas:m,maxFeePerGas:y,maxPriorityFeePerGas:T,nonce:g,pollingInterval:v,throwOnReceiptRevert:q,type:S,value:F,...J}=e,O=e.timeout??Math.max((s?.blockTime??0)*3,5e3);if(void 0===a)throw new b.T({docsPath:"/docs/actions/wallet/sendTransactionSync"});let U=a?(0,h.J)(a):null;try{(0,N.c)(e);let a=await (async()=>e.to?e.to:null!==e.to&&c&&c.length>0?await (0,A.g)({authorization:c[0]}).catch(()=>{throw new R.C("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(U?.type==="json-rpc"||null===U){let e;null!==s&&(e=await (0,C.T)(t,r.T,"getChainId")({}),o&&(0,I.v)({currentChainId:e,chain:s}));let n=t.chain?.formatters?.transactionRequest?.format,h=(n||x.Bv)({...(0,z.o)(J,{format:n}),accessList:i,account:U,authorizationList:c,blobs:u,chainId:e,data:l?(0,M.xW)([d??"0x",l]):d,gas:w,gasPrice:f,maxFeePerBlobGas:m,maxFeePerGas:y,maxPriorityFeePerGas:T,nonce:g,to:a,type:S,value:F},"sendTransaction"),p=D.get(t.uid),P=p?"wallet_sendTransaction":"eth_sendTransaction",b=await (async()=>{try{return await t.request({method:P,params:[h]},{retryCount:0})}catch(e){if(!1===p)throw e;if("InvalidInputRpcError"===e.name||"InvalidParamsRpcError"===e.name||"MethodNotFoundRpcError"===e.name||"MethodNotSupportedRpcError"===e.name)return await t.request({method:"wallet_sendTransaction",params:[h]},{retryCount:0}).then(e=>(D.set(t.uid,!0),e)).catch(n=>{if("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name)throw D.set(t.uid,!1),e;throw n});throw e}})(),R=await (0,C.T)(t,k.n,"waitForTransactionReceipt")({checkReplacement:!1,hash:b,pollingInterval:v,timeout:O});if(q&&"reverted"===R.status)throw new _.Sq({receipt:R});return R}if(U?.type==="local"){if(U.nonceManager&&void 0===g){let e=J.chainId,a=await (async()=>"number"==typeof e?e:s?s.id:(0,C.T)(t,r.T,"getChainId")({}))();n={address:U.address,chainId:a}}let o=await (0,C.T)(t,p.ft,"prepareTransactionRequest")({account:U,accessList:i,authorizationList:c,blobs:u,chain:s,data:l?(0,M.xW)([d??"0x",l]):d,gas:w,gasPrice:f,maxFeePerBlobGas:m,maxFeePerGas:y,maxPriorityFeePerGas:T,nonce:g,nonceManager:U.nonceManager,parameters:[...p.MM,"sidecars"],type:S,value:F,...J,to:a}),h=s?.serializers?.transaction,v=await U.signTransaction(o,{serializer:h});return await (0,C.T)(t,P.s,"sendRawTransactionSync")({serializedTransaction:v,throwOnReceiptRevert:q,timeout:e.timeout})}if(U?.type==="smart")throw new b.Z({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new b.Z({docsPath:"/docs/actions/wallet/sendTransactionSync",type:U?.type})}catch(t){if(t instanceof b.Z)throw t;throw!n||t instanceof _.Sq||U?.nonceManager?.reset(n),(0,E.p)(t,{...e,account:U,chain:e.chain||void 0})}}async function O(t,e){let{id:n}=e;await t.request({method:"wallet_showCallsStatus",params:[n]})}async function U(t,e){let{account:n=t.account}=e;if(!n)throw new b.T({docsPath:"/docs/eip7702/signAuthorization"});let a=(0,h.J)(n);if(!a.signAuthorization)throw new b.Z({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:a.type});let r=await (0,m.h)(t,e);return a.signAuthorization(r)}var j=n(36369);async function K(t,e){let{account:n=t.account,chain:a=t.chain,...s}=e;if(!n)throw new b.T({docsPath:"/docs/actions/wallet/signTransaction"});let i=(0,h.J)(n);(0,N.c)({account:i,...e});let c=await (0,C.T)(t,r.T,"getChainId")({});null!==a&&(0,I.v)({currentChainId:c,chain:a});let u=a?.formatters||t.chain?.formatters,d=u?.transactionRequest?.format||x.Bv;return i.signTransaction?i.signTransaction({...s,account:i,chainId:c},{serializer:t.chain?.serializers?.transaction}):await t.request({method:"eth_signTransaction",params:[{...d({...s,account:i},"signTransaction"),chainId:(0,o.cK)(c),from:i.address}]},{retryCount:0})}var Z=n(81958);async function L(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,o.cK)(e)}]},{retryCount:0})}async function B(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}var Q=n(30931),W=n(93527);async function $(t,e){return $.internal(t,c.v,"sendTransaction",e)}async function G(t,e){return $.internal(t,J,"sendTransactionSync",e)}function H(t){return{addChain:e=>s(t,e),deployContract:e=>(function(t,e){let{abi:n,args:a,bytecode:r,...o}=e,s=(0,i.m)({abi:n,args:a,bytecode:r});return(0,c.v)(t,{...o,...o.authorizationList?{to:null}:{},data:s})})(t,e),fillTransaction:e=>(0,a.a)(t,e),getAddresses:()=>d(t),getCallsStatus:e=>(0,l.k)(t,e),getCapabilities:e=>w(t,e),getChainId:()=>(0,r.T)(t),getPermissions:()=>f(t),prepareAuthorization:e=>(0,m.h)(t,e),prepareTransactionRequest:e=>(0,p.ft)(t,e),requestAddresses:()=>y(t),requestPermissions:e=>T(t,e),sendCalls:e=>(0,g.yM)(t,e),sendCallsSync:e=>q(t,e),sendRawTransaction:e=>(0,S.L)(t,e),sendRawTransactionSync:e=>(0,P.s)(t,e),sendTransaction:e=>(0,c.v)(t,e),sendTransactionSync:e=>J(t,e),showCallsStatus:e=>O(t,e),signAuthorization:e=>U(t,e),signMessage:e=>(0,j.l)(t,e),signTransaction:e=>K(t,e),signTypedData:e=>(0,Z.C)(t,e),switchChain:e=>L(t,e),waitForCallsStatus:e=>(0,v.c)(t,e),watchAsset:e=>B(t,e),writeContract:e=>$(t,e),writeContractSync:e=>G(t,e)}}($||($={})).internal=async function(t,e,n,a){let{abi:r,account:o=t.account,address:s,args:i,functionName:c,...u}=a;if(void 0===o)throw new b.T({docsPath:"/docs/contract/writeContract"});let d=o?(0,h.J)(o):null,l=(0,Q.p)({abi:r,args:i,functionName:c});try{return await (0,C.T)(t,e,n)({data:l,to:s,account:d,...u})}catch(t){throw(0,W.j)(t,{abi:r,address:s,args:i,docsPath:"/docs/contract/writeContract",functionName:c,sender:d?.address})}}},81958:(t,e,n)=>{n.d(e,{C:()=>s});var a=n(97152),r=n(64664),o=n(57001);async function s(t,e){let{account:n=t.account,domain:s,message:i,primaryType:c}=e;if(!n)throw new r.T({docsPath:"/docs/actions/wallet/signTypedData"});let u=(0,a.J)(n),d={EIP712Domain:(0,o.H4)({domain:s}),...e.types};if((0,o.$$)({domain:s,message:i,primaryType:c,types:d}),u.signTypedData)return u.signTypedData({domain:s,message:i,primaryType:c,types:d});let l=(0,o.v8)({domain:s,message:i,primaryType:c,types:d});return t.request({method:"eth_signTypedData_v4",params:[u.address,l]},{retryCount:0})}}}]); 2//# chunkId=01a08f3e-2ddd-7230-9d8c-37a805bd5085
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.