PageSourceSearch

https://stackstream.vercel.app/_next/static/chunks/2133-f5b439bd663bde22.js

js stackstream.vercel.app collected 2026-10-03 07:47:53 UTC 7,477 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2133],{3701:(e,t,r)=>{r.d(t,{Y:()=>i,Z:()=>o});var n=r(4109),a=r(526);function i(e){let t=(0,n.I)({queryKey:["token-metadata",e],queryFn:()=>(0,a.zr)(e),enabled:!!e,staleTime:36e5,refetchOnWindowFocus:!1,retry:1});return{token:t.data??null,isLoading:t.isLoading,isError:t.isError}}function o(e){let t=Array.from(new Set(e.filter(Boolean)));return(0,n.I)({queryKey:["token-metadata",t],queryFn:async()=>Object.fromEntries((await Promise.all(t.map(async e=>[e,await (0,a.zr)(e)]))).filter(e=>null!==e[1])),enabled:t.length>0,staleTime:36e5,refetchOnWindowFocus:!1,retry:1}).data??{}}},56090:(e,t,r)=>{function n(e){return"object"==typeof e&&null!==e?e:{message:String(e)}}function a(e){let t=n(e);return -31001===t.code||-32e3===t.code||/cancel|rejected|denied/i.test(t.message??"")}function i(e){let t=n(e);return -31e3===t.code||/did not return a response/i.test(t.message??"")}function o(e){return/no installed stacks wallet/i.test(n(e).message??"")}function s(e){let t=n(e),r=t.message?.slice(0,140)??"Unknown error";return void 0!==t.code?`${r} (code ${t.code})`:r}function c(e){return/module factory|ChunkLoadError|Loading chunk|Failed to fetch dynamically imported module|Importing a module script failed/i.test(n(e).message??"")}r.d(t,{Bz:()=>s,NC:()=>o,cT:()=>a,pJ:()=>c,xq:()=>i})},60529:(e,t,r)=>{r.d(t,{p:()=>o});var n=r(95155),a=r(12115),i=r(40980);let o=(0,a.forwardRef)(({className:e,label:t,error:r,hint:a,id:o,...s},c)=>{let d=o||t?.toLowerCase().replace(/\s+/g,"-");return(0,n.jsxs)("div",{className:"space-y-1.5",children:[t&&(0,n.jsx)("label",{htmlFor:d,className:"block text-sm font-medium text-zinc-300",children:t}),(0,n.jsx)("input",{ref:c,id:d,className:(0,i.cn)("w-full rounded-xl border bg-surface-2 px-4 py-2.5 text-sm text-zinc-100","placeholder:text-zinc-600","transition-colors duration-200","focus:outline-none focus:ring-2 focus:ring-brand-500/40 focus:border-brand-500/50",r?"border-red-500/50":"border-border",e),...s}),r&&(0,n.jsx)("p",{className:"text-xs text-red-400",children:r}),a&&!r&&(0,n.jsx)("p",{className:"text-xs text-zinc-600",children:a})]})});o.displayName="Input"},71656:(e,t,r)=>{r.d(t,{n:()=>d});var n=r(12115),a=r(35625),i=r(66609),o=r(43901),s=r(43770),c=r(56090);
1function d(){let[e,t]=(0,n.useState)("idle"),[d,l]=(0,n.useState)(null),[u,f]=(0,n.useState)(null),m=(0,a.jE)();return{execute:(0,n.useCallback)(async e=>{t("pending"),f(null),l(null);let n=i.o.loading("Confirm the transaction in your wallet…");try{let{request:a}=await Promise.all([r.e(7436),r.e(1481)]).then(r.bind(r,67436)),d={contract:`${e.contractAddress}.${e.contractName}`,functionName:e.functionName,functionArgs:e.functionArgs,network:e.network,postConditions:e.postConditions??[],postConditionMode:e.postConditionMode===o.FN.Allow?"allow":"deny"},u=await a("stx_callContract",d).catch(async e=>{if((0,c.cT)(e))throw Error("cancelled");if((0,c.xq)(e))return a("stx_callContract",d).catch(e=>{if((0,c.cT)(e))throw Error("cancelled");throw e});throw e}),g=u?.txid;if(!g)throw Error("Wallet returned no transaction id");let b=g.startsWith("0x")?g:`0x${g}`;l(b),t("confirming"),i.o.loading("Submitted — waiting for on-chain confirmation (~5–15s)",{id:n});let h=await (0,s.gs)(b,{interval:5e3,timeout:6e5});if(h.confirmed)return t("success"),i.o.dismiss(n),await m.refetchQueries({queryKey:["sender-streams"],type:"active"}),await m.refetchQueries({queryKey:["recipient-streams"],type:"active"}),m.refetchQueries({queryKey:["stream"],type:"active"}),m.refetchQueries({queryKey:["stream-nonce"],type:"active"}),m.refetchQueries({queryKey:["token-balance"],type:"active"}),{confirmed:!0,txId:b,status:h.status};{let e;if("timeout"===h.status)e="Transaction timed out waiting for confirmation";else if("abort_by_post_condition"===h.status)e="Transaction failed: a post-condition was not met (token transfer rejected)";else if(h.errorCode){let t=(0,s.iR)(h.errorCode);e=t?`Transaction failed: ${t}`:`Transaction failed on-chain (error ${h.errorCode})`}else e=`Transaction failed on-chain: ${h.status}`;return f(e),t("error"),i.o.dismiss(n),{confirmed:!1,txId:b,status:h.status,errorCode:h.errorCode,errorRepr:h.errorRepr}}}catch(e){if(i.o.dismiss(n),e?.message==="cancelled")return t("idle"),null;if((0,c.pJ)(e))return i.o.info("StackStream was updated — refreshing…"),setTimeout(()=>window.location.reload(),800),null;return f((0,c.Bz)(e)),t("error"),null}},[m]),status:e,txId:d,error:u,reset:(0,n.useCallback)(()=>{t("idle"),l(null),f(null)},[]),isPending:"pending"===e,isConfirming:"confirming"===e,isWorking:"pending"===e||"confirming"===e}}},89239:(e,t,r)=>{r.d(t,{$:()=>c});var n=r(95155),a=r(12115),i=r(40980);let o={primary:"bg-brand-500 text-white hover:bg-brand-600 active:bg-brand-700 shadow-lg shadow-brand-500/20",secondary:"bg-surface-3 text-zinc-100 hover:bg-surface-4 border border-border",ghost:"text-zinc-400 hover:text-zinc-100 hover:bg-surface-3",danger:"bg-red-500/10 text-red-400 hover:bg-red-500/20 border border-red-500/20",outline:"border border-border text-zinc-300 hover:bg-surface-3 hover:text-zinc-100"},s={sm:"px-3 py-1.5 text-xs rounded-lg",md:"px-4 py-2 text-sm rounded-xl",lg:"px-6 py-3 text-base rounded-xl"},c=(0,a.forwardRef)(({className:e,variant:t="primary",size:r="md",loading:a,disabled:c,children:d,...l},u)=>(0,n.jsxs)("button",{ref:u,disabled:c||a,className:(0,i.cn)("inline-flex items-center justify-center gap-2 font-medium transition-all duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/50","disabled:opacity-50 disabled:cursor-not-allowed",o[t],s[r],e),...l,children:[a&&(0,n.jsxs)("svg",{className:"animate-spin h-4 w-4",viewBox:"0 0 24 24",fill:"none",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,n.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),d]}));c.displayName="Button"},89407:(e,t,r)=>{r.d(t,{a:()=>c});var n=r(4109),a=r(43770),i=r(99637),o=r(48884),s=r(12115);function c(){let e=(0,i.C)(e=>e.setCurrentBlockHeight),t=(0,i.C)(e=>e.currentBlockHeight),r=(0,n.I)({queryKey:["block-height"],queryFn:a.getCurrentBlockHeight,refetchInterval:o._F});return(0,s.useEffect)(()=>{r.data&&r.data!==t&&e(r.data)},[r.data,t,e]),{blockHeight:r.data??t,isLoading:r.isLoading}}},95620:(e,t,r)=>{r.d(t,{n:()=>s});var n=r(4109),a=r(43770),i=r(97491),o=r(48884);function s(e){let t=(0,i.G)(e=>e.address),r=e??{contractId:o.CM.contractId,assetName:o.CM.assetName,decimals:o.CM.decimals,symbol:o.CM.symbol,curated:!0},s=(0,n.I)({queryKey:["token-balance",t,r.contractId,r.assetName],queryFn:()=>(0,a.kb)(t,r.contractId,r),enabled:!!t,refetchInterval:o.zM});return{balance:s.data??0n,isLoading:s.isLoading,refetch:s.refetch}}r(3701)},97491:(e,t,r)=>{r.d(t,{G:()=>i});var n=r(1934),a=r(31692);let i=(0,n.v)()((0,a.Zr)(e=>({address:null,isConnected:!1,isConnecting:!1,setAddress:t=>e({address:t,isConnected:!0,isConnecting:!1}),disconnect:()=>e({address:null,isConnected:!1,isConnecting:!1}),setConnecting:t=>e({isConnecting:t})}),{name:"stackstream-wallet",partialize:e=>({address:e.address,isConnected:e.isConnected})}))},99637:(e,t,r)=>{r.d(t,{C:()=>n});let n=(0,r(1934).v)()(e=>({currentBlockHeight:0,setCurrentBlockHeight:t=>e({currentBlockHeight:t}),sidebarOpen:!0,setSidebarOpen:t=>e({sidebarOpen:t}),toggleSidebar:()=>e(e=>({sidebarOpen:!e.sidebarOpen}
1))}))}}]);

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.