Transaction

bc309602ecb94cf28f0fba3d4e987a596f5ca4503c8a0db4687cf14ffb0c11bf
Timestamp (utc)
2025-12-28 15:52:36
Fee Paid
0.00001556 BSV
(
0.00001556 BSV
-
0.00000000 BSV
)
Fee Rate
100.2 sat/KB
Version
1
Confirmations
7,995
Size Stats
15,517 B

1 Output

Total Output:
0.00000000 BSV
  • j"19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAutM¯;"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9716],{9716:function(e,t,r){r.d(t,{default:function(){return d}});var s=r(7437),a=r(2265),l=r(9376),o=r(8880),n=r(8559),i=r(92),c=r(3993);function d(e){var t;let{txId:r}=e,d=(0,l.useRouter)();(0,a.useMemo)(()=>(0,o.eD)(d),[d]);let[u,h]=(0,a.useState)(null),[x,m]=(0,a.useState)([]),[p,g]=(0,a.useState)(!0),[b,f]=(0,a.useState)(!1),[w,v]=(0,a.useState)(""),[j,y]=(0,a.useState)(""),[N,S]=(0,a.useState)(!1),[k,I]=(0,a.useState)(!1),[C,P]=(0,a.useState)(!1);(0,a.useEffect)(()=>{r&&"placeholder"!==r&&D(),L()},[r]);let L=async()=>{let e=localStorage.getItem("userAddress");e&&(f(!0),v(e))},D=async()=>{try{g(!0);let e=await n.wS.getPost(r);if(e){h(e);let t=await n.wS.getReplies(r);m(t)}}catch(e){console.error("Error loading post:",e)}finally{g(!1)}},B=async()=>{if(b&&!k){I(!0);try{(await n.wS.likePost(r)).success&&(P(!0),u&&h({...u,likesCount:(u.likesCount||0)+1}))}catch(e){console.error("Error liking post:",e)}finally{I(!1)}}},_=async()=>{if(j.trim()&&!N){S(!0);try{if((await n.wS.createPost("Re: ".concat((null==u?void 0:u.title)||"Reply"),j,[],(null==u?void 0:u.category)||"other","public",[],r)).success){y("");let e=await n.wS.getReplies(r);m(e),alert("Reply published to blockchain!")}}catch(e){console.error("Error posting reply:",e)}finally{S(!1)}}};return p?(0,s.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900",children:[(0,s.jsx)(i.Z,{}),(0,s.jsxs)("div",{className:"max-w-4xl mx-auto px-4 py-20 text-center",children:[(0,s.jsx)("div",{className:"w-12 h-12 border-4 border-purple-500 border-t-transparent rounded-full animate-spin mx-auto mb-4"}),(0,s.jsx)("p",{className:"text-purple-200",children:"Loading post..."})]})]}):u?(0,s.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900",children:[(0,s.jsx)(i.Z,{}),(0,s.jsxs)("div",{className:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[(0,s.jsxs)(c.Z,{href:"/blog",className:"inline-flex items-center gap-2 text-purple-300 hover:text-white mb-8 transition-colors",children:[(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 19l-7-7 7-7"})}),"Back to Blog"]}),(0,s.jsxs)("article",{className:"bg-white/10 backdrop-blur-md rounded-2xl p-8 border border-white/20 mb-8",children:[(0,s.jsxs)("div",{className:"flex flex-wrap gap-2 mb-4",children:[(0,s.jsx)("span",{className:"px-3 py-1 bg-purple-500/20 text-purple-300 text-sm rounded-lg",children:(e=>{let t=n.dY.find(t=>t.value===e);return(null==t?void 0:t.label)||e})(u.category)}),u.tags.map(e=>(0,s.jsxs)("span",{className:"px-3 py-1 bg-white/10 text-purple-200 text-sm rounded-lg",children:["#",e]},e))]}),(0,s.jsx)("h1",{className:"text-4xl font-bold text-white mb-6",children:u.title}),(0,s.jsxs)("div",{className:"flex items-center gap-4 mb-8 pb-8 border-b border-white/20",children:[(0,s.jsx)("div",{className:"w-12 h-12 bg-gradient-to-br from-purple-500 to-blue-600 rounded-full flex items-center justify-center text-white font-bold text-lg",children:(null===(t=u.creatorName)||void 0===t?void 0:t.charAt(0))||u.creator.charAt(0)}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-semibold text-white",children:u.creatorName||"".concat(u.creator.substring(0,12),"...")}),(0,s.jsx)("p",{className:"text-purple-300 text-sm",children:new Date(u.timestamp).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})]}),(0,s.jsx)("div",{className:"prose prose-invert max-w-none",children:u.content.split("\n\n").map((e,t)=>{if(e.startsWith("# "))return(0,s.jsx)("h1",{className:"text-3xl font-bold text-white mt-6 mb-4",children:e.substring(2)},t);if(e.startsWith("## "))return(0,s.jsx)("h2",{className:"text-2xl font-bold text-white mt-5 mb-3",children:e.substring(3)},t);if(e.startsWith("### "))return(0,s.jsx)("h3",{className:"text-xl font-bold text-white mt-4 mb-2",children:e.substring(4)},t);if(e.startsWith("```")){let r=e.split("\n").slice(1,-1).join("\n");return(0,s.jsx)("pre",{className:"bg-black/30 rounded-xl p-4 overflow-x-auto my-4",children:(0,s.jsx)("code",{className:"text-purple-200 font-mono text-sm",children:r})},t)}return(0,s.jsx)("p",{className:"text-purple-100 leading-relaxed mb-4",children:e},t)})}),(0,s.jsxs)("div",{className:"mt-8 pt-8 border-t border-white/20 flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("button",{onClick:B,disabled:!b||k||C,className:"flex items-center gap-2 px-4 py-2 rounded-xl transition-all ".concat(C?"bg-red-500/20 text-red-400":"bg-white/10 text-purple-200 hover:bg-white/20"," disabled:opacity-50"),children:[(0,s.jsx)("svg",{className:"w-5 h-5",fill:C?"currentColor":"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})}),(0,s.jsx)("span",{children:u.likesCount||0})]}),(0,s.jsxs)("span",{className:"flex items-center gap-2 px-4 py-2 bg-white/10 text-purple-200 rounded-xl",children:[(0,s.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),(0,s.jsx)("span",{children:x.length})]})]}),(0,s.jsxs)("a",{href:"https://whatsonchain.com/tx/".concat(u.txId),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-purple-400 hover:text-purple-300 text-sm",children:[(0,s.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})}),"View on Blockchain"]})]})]}),b&&(0,s.jsxs)("div",{className:"bg-white/10 backdrop-blur-md rounded-2xl p-6 border border-white/20 mb-8",children:[(0,s.jsx)("h3",{className:"text-xl font-bold text-white mb-4",children:"Write a Reply"}),(0,s.jsx)("textarea",{value:j,onChange:e=>y(e.target.value),placeholder:"Share your thoughts...",rows:4,className:"w-full px-4 py-3 bg-white/10 border border-white/20 rounded-xl text-white placeholder-purple-300 focus:outline-none focus:border-purple-400 resize-none mb-4"}),(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)("button",{onClick:_,disabled:N||!j.trim(),className:"px-6 py-2 bg-gradient-to-r from-purple-500 to-blue-600 text-white font-semibold rounded-xl hover:shadow-lg transition-all disabled:opacity-50",children:N?"Publishing...":"Publish Reply"})})]}),x.length>0&&(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("h3",{className:"text-2xl font-bold text-white mb-6",children:["Replies (",x.length,")"]}),x.map(e=>{var t;return(0,s.jsxs)("div",{className:"bg-white/5 backdrop-blur-md rounded-xl p-6 border border-white/10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,s.jsx)("div",{className:"w-10 h-10 bg-gradient-to-br from-purple-500 to-blue-600 rounded-full flex items-center justify-center text-white font-bold",children:(null===(t=e.creatorName)||void 0===t?void 0:t.charAt(0))||e.creator.charAt(0)}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-semibold text-white",children:e.creatorName||"".concat(e.creator.substring(0,12),"...")}),(0,s.jsx)("p",{className:"text-purple-300 text-sm",children:new Date(e.timestamp).toLocaleDateString()})]})]}),(0,s.jsx)("p",{className:"text-purple-100",children:e.content})]},e.txId)})]})]})]}):(0,s.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900",children:[(0,s.jsx)(i.Z,{}),(0,s.jsx)("div",{className:"max-w-2xl mx-auto px-4 py-20 text-center",children:(0,s.jsxs)("div",{className:"bg-white/10 backdrop-blur-md rounded-2xl p-12 border border-white/20",children:[(0,s.jsx)("div",{className:"text-6xl mb-6",children:(0,s.jsx)("svg",{className:"w-20 h-20 mx-auto text-purple-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),(0,s.jsx)("h2",{className:"text-3xl font-bold text-white mb-4",children:"Post Not Found"}),(0,s.jsx)("p",{className:"text-purple-200 mb-8",children:"This post may not exist or hasn't been indexed yet."}),(0,s.jsx)(c.Z,{href:"/blog",className:"inline-flex items-center gap-2 px-6 py-3 bg-gradient-to-r from-purple-500 to-blue-600 text-white font-semibold rounded-xl hover:shadow-lg transition-all",children:"Browse All Posts"})]})})]})}},8559:function(e,t,r){r.d(t,{TL:function(){return n},dY:function(){return d},hv:function(){return o},wS:function(){return c}});let s="bsv_blog_posts",a="bsv_blog_drafts";function l(e){return Array.from(new TextEncoder().encode(e)).map(e=>e.toString(16).padStart(2,"0")).join("")}async function o(e){return new Promise((t,r)=>{let s=new FileReader;s.onload=s=>{var a;let l=new Image;l.onload=()=>{let{width:s,height:a}=l;s>1200&&(a=1200*a/s,s=1200),a>800&&(s=800*s/a,a=800);let o=document.createElement("canvas");o.width=s,o.height=a;let n=o.getContext("2d");if(!n){r(Error("Could not get canvas context"));return}n.drawImage(l,0,0,s,a);let i=.8,c=o.toDataURL("image/jpeg",i);for(;c.length>70144&&i>.1;)i-=.1,c=o.toDataURL("image/jpeg",i);let d=c.split(",")[1];t({id:"img_".concat(Date.now(),"_").concat(Math.random().toString(36).substring(7)),data:d,mimeType:"image/jpeg",width:Math.round(s),height:Math.round(a),alt:e.name.replace(/\.[^/.]+$/,"")})},l.onerror=()=>r(Error("Failed to load image")),l.src=null===(a=s.target)||void 0===a?void 0:a.result},s.onerror=()=>r(Error("Failed to read file")),s.readAsDataURL(e)})}function n(e){let t=e.content.length;return e.images&&e.images.forEach(e=>{t+=e.data.length}),Math.ceil(t/4)+500}class i{async getBlogPosts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,t=Date.now();if(this.cachedPosts.length>0&&t-this.lastFetch<this.fetchInterval)return this.cachedPosts.slice(0,e);let r=localStorage.getItem(s);if(r)try{this.cachedPosts=JSON.parse(r),this.lastFetch=t}catch(e){console.error("Error parsing blog cache:",e)}return this.cachedPosts.slice(0,e)}async getPostsByCreator(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return(await this.getBlogPosts(500)).filter(t=>t.creator.toLowerCase()===e.toLowerCase()).slice(0,t)}async getPost(e){return(await this.getBlogPosts(500)).find(t=>t.txId===e)||null}async getReplies(e){return(await this.getBlogPosts(500)).filter(t=>t.replyTo===e)}async searchPosts(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,r=await this.getBlogPosts(500),s=e.toLowerCase();return r.filter(e=>e.title.toLowerCase().includes(s)||e.content.toLowerCase().includes(s)||e.tags.some(e=>e.toLowerCase().includes(s))).slice(0,t)}async createPost(e,t,r,s){var a,o,n,i;let c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"public",d=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[],u=arguments.length>6?arguments[6]:void 0;try{let o=window.yours;if(!o)return{txId:"",success:!1,error:"Yours Wallet not found. Please install it from yours.org"};if(!await o.isConnected())return{txId:"",success:!1,error:"Wallet not connected. Please connect your wallet first."};let n=await o.getAddresses(),i=null==n?void 0:n.bsvAddress;if(!i)return{txId:"",success:!1,error:"Could not get wallet address"};let h={app:"BSV_VIDEO_PLATFORM",type:"blog_post",version:"2.0",title:e.trim(),content:t.trim(),summary:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:280,r=e.replace(/!\[([^\]]*)\]\([^)]+\)/g,"").trim();return r.length<=t?r:r.substring(0,t-3)+"..."}(t.trim()),metaDescription:function(e,t){let r=t.replace(/!\[([^\]]*)\]\([^)]+\)/g,"").trim(),s="".concat(e,". ").concat(r);return s.length<=160?s:s.substring(0,157)+"..."}(e.trim(),t.trim()),creator:i,tags:r.map(e=>e.trim()).filter(e=>e.length>0),category:s,visibility:c,timestamp:Date.now(),...d.length>0?{images:d,featuredImage:null===(a=d[0])||void 0===a?void 0:a.id}:{},...u?{replyTo:u}:{}},x=await o.sendBsv([{satoshis:0,data:[l(JSON.stringify(h))]},{address:i,satoshis:1}]);if(x&&x.txid){let e={txId:x.txid,...h};return this.cachedPosts.unshift(e),this.saveCacheToStorage(),{txId:x.txid,success:!0}}return{txId:"",success:!1,error:"Transaction failed - no txid returned"}}catch(e){if(console.error("Error creating blog post:",e),(null===(o=e.message)||void 0===o?void 0:o.includes("User denied"))||(null===(n=e.message)||void 0===n?void 0:n.includes("rejected")))return{txId:"",success:!1,error:"Transaction cancelled by user"};if(null===(i=e.message)||void 0===i?void 0:i.includes("insufficient"))return{txId:"",success:!1,error:"Insufficient funds. Please add more BSV to your wallet."};return{txId:"",success:!1,error:e.message||"Failed to create post"}}}async likePost(e){try{let t=window.yours;if(!t)return{txId:"",success:!1,error:"Yours Wallet not found"};if(!await t.isConnected())return{txId:"",success:!1,error:"Wallet not connected"};let r=await t.getAddresses(),s=null==r?void 0:r.bsvAddress,a={app:"BSV_VIDEO_PLATFORM",type:"blog_like",targetTxId:e,creator:s,timestamp:Date.now()},o=await t.sendBsv([{satoshis:0,data:[l(JSON.stringify(a))]},{address:s,satoshis:1}]);if(o&&o.txid)return{txId:o.txid,success:!0};return{txId:"",success:!1,error:"Transaction failed"}}catch(e){return{txId:"",success:!1,error:e.message||"Failed to like post"}}}saveDraft(e){let t=this.getDrafts(),r="draft_".concat(Date.now(),"_").concat(Math.random().toString(36).substring(7)),s={...e,id:r,lastSaved:Date.now()};return t.push(s),localStorage.setItem(a,JSON.stringify(t)),r}updateDraft(e,t){let r=this.getDrafts(),s=r.findIndex(t=>t.id===e);s>=0&&(r[s]={...r[s],...t,lastSaved:Date.now()},localStorage.setItem(a,JSON.stringify(r)))}getDrafts(){let e=localStorage.getItem(a);if(e)try{return JSON.parse(e)}catch(e){}return[]}deleteDraft(e){let t=this.getDrafts().filter(t=>t.id!==e);localStorage.setItem(a,JSON.stringify(t))}saveCacheToStorage(){try{localStorage.setItem(s,JSON.stringify(this.cachedPosts.slice(0,500)))}catch(e){console.error("Error saving blog cache:",e)}}addToCache(e){this.cachedPosts.unshift(e),this.saveCacheToStorage()}constructor(){this.cachedPosts=[],this.lastFetch=0,this.fetchInterval=3e4}}let c=new i,d=[{value:"technology",label:"Technology"},{value:"crypto",label:"Crypto & Blockchain"},{value:"tutorial",label:"Tutorial"},{value:"opinion",label:"Opinion"},{value:"news",label:"News & Updates"},{value:"personal",label:"Personal"},{value:"business",label:"Business"},{value:"creative",label:"Creative Writing"},{value:"other",label:"Other"}]}}]);application/javascriptbinary
    https://whatsonchain.com/tx/bc309602ecb94cf28f0fba3d4e987a596f5ca4503c8a0db4687cf14ffb0c11bf