PageSourceSearch

https://explorer.xchpool.org/assets/Transaction-CNtUVMIl.js

js xchpool.org collected 2026-10-07 17:56:52 UTC 5,569 bytes, 1 lines download raw bytes

1import{_ as H,u as D,J as V,c as E,a as o,t as s,b as e,d as i,I,h,i as L,w as _,V as j,m as U,n as q,q as M,g as z,j as f,E as P,M as R,o as C,p as x,a1 as k,l as T}from"./index-DSpOtOV2.js";import{a as X}from"./api-DU8JOy1q.js";import{u as F}from"./useAsync-Nqozcwiw.js";import{d as G}from"./csv-tzdrPO8U.js";import{S as y}from"./StatCard-CKH2ItKO.js";import{P as J}from"./Panel-IGJ43Z17.js";import{D as O}from"./DataTable-D7jNAa4s.js";import{_ as K}from"./Badge-85wEqCta.js";import{H as w}from"./HashText-BxNAGeO9.js";import"./Skeleton-Dg_lq2rW.js";import"./CopyButton-5qyln55d.js";/* empty css                                                                 */const Q="qpzry9x8gf2tvdw0s3jn54khce6mua7l",W=[996825010,642813549,513874426,1027748829,705979059],Y=734539939;function Z(d){let a=1;for(const l of d){const p=a>>>25;a=(a&33554431)<<5^l;for(let c=0;c<5;c++)p>>>c&1&&(a^=W[c])}return a>>>0}function ee(d){const a=[];for(const l of d)a.push(l.charCodeAt(0)>>>5);a.push(0);for(const l of d)a.push(l.charCodeAt(0)&31);return a}function ae(d,a,l,p){let c=0,r=0;const m=[],u=(1<<l)-1;for(const t of d)for(c=c<<a|t,r+=a;r>=l;)r-=l,m.push(c>>>r&u);return r>0&&m.push(c<<l-r&u),m}function A(d,a="xch"){if(!d)return"";const l=String(d).replace(/^0x/i,"").toLowerCase();if(!/^[0-9a-f]{64}$/.test(l))return String(d);const p=[];for(let t=0;t<l.length;t+=2)p.push(parseInt(l.slice(t,t+2),16));const c=ae(p,8,5),r=ee(a).concat(c).concat([0,0,0,0,0,0]),m=Z(r)^Y,u=[];for(let t=0;t<6;t++)u.push(m>>>5*(5-t)&31);return a+"1"+c.concat(u).map(t=>Q[t]).join("")}const te={class:"page"},oe={class:"container"},se={class:"page-head"},ne={class:"page-head__text"},le={class:"eyebrow"},ce={class:"mono tx-id"},re={class:"page-head__actions"},ie=["disabled"],de={key:0,class:"alert alert--bad"},ue={class:"row row--between",style:{flex:"1"}},_e={class:"grid grid--stats"},me=["href"],he={class:"card card--pad"},pe={class:"dl"},ve={class:"muted small"},fe={__name:"Transaction",setup(d){const{t:a}=D(),l=R(),{data:p,error:c,loading:r,run:m}=F(n=>X.transaction(n)),u=f(()=>l.params.transaction_id);V(u,n=>{n&&m(n)},{immediate:!0});const t=f(()=>p.value||{}),b=f(()=>(t.value.additions||[]).map((n,v)=>({...n,id:v,address:A(n.puzzle_hash),xch:k(n.amount)}))),S=f(()=>t.value.removals||[]),N=f(()=>S.value.reduce((n,v)=>n+(k(v.amount)||0),0)),$=f(()=>[{key:"address",label:a("v2.payoutAddress"),mono:!0},{key:"xch",label:a("v2.amount"),type:"number",align:"right",format:n=>x(n,6)},{key:"parent_coin_info",label:a("v2.parentCoin"),mono:!0}]);function B(){G(`transaction-${P(u.value,8,0).replace("…","")}.csv`,b.value.map(n=>({address:n.address,amount_xch:n.xch,puzzle_hash:n.puzzle_hash,parent_coin_info:n.parent_coin_info})))}return(n,v)=>(C(),E("div",te,[o("div",oe,[o("div",se,[o("div",ne,[o("p",le,s(e(a)("transactionList-screen.transactionDetailsLabel").replace(/\s*:\s*$/,"")),1),o("h1",ce,s(u.value),1)]),o("div",re,[o("button",{type:"button",class:"btn btn--sm",disabled:!b.value.length,onClick:B},[i(I,{name:"download",size:14}),h(" "+s(e(a)("v2.downloadCsv")),1)],8,ie)])]),e(c)?(C(),E("div",de,[i(I,{name:"alert",class:"alert__icon"}),o("div",ue,[o("span",null,s(e(c).status===404?e(a)("v2.notFound"):e(a)("v2.apiError")),1),o("button",{type:"button",class:"btn btn--sm",onClick:v[0]||(v[0]=g=>e(m)(u.value))},s(e(a)("v2.retry")),1)])])):L("",!0),o("div",_e,[i(y,{label:e(a)("v2.totalAmount","Total amount"),loading:e(r),icon:"coins",tone:"green"},{default:_(()=>[h(s(e(x)(e(k)(t.value.amount),4)),1)]),_:1},8,["label","loading"]),i(y,{label:e(a)("transactionList-screen.confirmedLabel").replace(/\s*:\s*$/,""),loading:e(r),icon:"check",size:"sm"},j({default:_(()=>[i(K,{tone:t.value.confirmed?"good":"warn",dot:""},{default:_(()=>[h(s(t.value.confirmed?e(a)("v2.confirmed"):e(a)("v2.pending")),1)]),_:1},8,["tone"])]),_:2},[t.value.confirmed_at_height?{name:"hint",fn:_(()=>[h(s(e(a)("v2.height"))+" ",1),o("a",{href:e(z).blockUrl(t.value.confirmed_at_height),target:"_blank",rel:"noopener",class:"num"},s(e(T)(t.value.confirmed_at_height)),9,me)]),key:"0"}:void 0]),1032,["label","loading"]),i(y,{label:e(a)("v2.fee"),loading:e(r),icon:"percent"},{default:_(()=>[h(s(e(x)(e(k)(t.value.fee_amount),6)),1)]),_:1},8,["label","loading"]),i(y,{label:e(a)("v2.additions"),loading:e(r),icon:"users"},{hint:_(()=>[h(s(e(a)("v2.removals"))+": "+s(e(T)(S.value.length))+" · "+s(e(x)(N.value,3)),1)]),default:_(()=>[h(s(e(T)(b.value.length)),1)]),_:1},8,["label","loading"])]),o("section",he,[o("dl",pe,[o("dt",null,s(e(a)("transactionList-screen.createdAtTimeLabel").replace(/\s*:\s*$/,"")),1),o("dd",null,[h(s(e(U)(t.value.created_at_time,"longtime"))+" ",1),o("span",ve,"· "+s(e(q)(t.value.created_at_time)),1)]),o("dt",null,s(e(a)("v2.txHash")),1),o("dd",null,[i(w,{value:t.value.name},null,8,["value"])]),o("dt",null,s(e(a)("v2.address")),1),o("dd",null,[t.value.to_puzzle_hash?(C(),M(w,{key:0,value:e(A)(t.value.to_puzzle_hash),link:e(z).addressUrl(e(A)(t.value.to_puzzle_hash))},null,8,["value","link"])):L("",!0)])])]),i(J,{title:e(a)("v2.additions"),description:e(a
1)("v2.payoutAddress"),flush:""},{default:_(()=>[i(O,{columns:$.value,rows:b.value,"sort-key":"xch","row-key":"id","per-page":25,loading:e(r)},{"cell-address":_(({value:g})=>[i(w,{value:g,short:"",head:12,tail:8,link:e(z).addressUrl(g)},null,8,["value","link"])]),"cell-parent_coin_info":_(({value:g})=>[i(w,{value:g,short:"",head:10,tail:6},null,8,["value"])]),_:1},8,["columns","rows","loading"])]),_:1},8,["title","description"])])]))}},Ie=H(fe,[["__scopeId","data-v-886857ed"]]);export{Ie as default};

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.