Transaction

3c80928f29bbd4a9f8dcd97a4d4c8c1ad4fd9f178f2c39e2fb90bef083df1908
Timestamp (utc)
2025-12-28 17:44:28
Fee Paid
0.00001955 BSV
(
0.00001955 BSV
-
0.00000000 BSV
)
Fee Rate
100.1 sat/KB
Version
1
Confirmations
7,461
Size Stats
19,511 B

1 Output

Total Output:
0.00000000 BSV
  • j"19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAutMIK(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5972],{3993:function(e,t,a){"use strict";a.d(t,{Z:function(){return i}});var r=a(7437),n=a(2265),o=a(7648),s=a(8880);function i(e){let{href:t,children:a,className:i,onClick:c,target:l,rel:u,title:d}=e,[h,b]=(0,n.useState)(()=>!0);(0,n.useEffect)(()=>{b(!0)},[]);let m=e=>{(0,s.UA)(),c&&c(),l||(e.preventDefault(),(0,s.T8)(t))};if(t.startsWith("http")||t.startsWith("//")||"_blank"===l)return(0,r.jsx)("a",{href:t,className:i,onClick:c,target:l,rel:u||("_blank"===l?"noopener noreferrer":void 0),title:d,children:a});if(h){let e="#"+(t.startsWith("/")?t:"/"+t);return(0,r.jsx)("a",{href:e,className:i,onClick:m,title:d,children:a})}return(0,r.jsx)(o.default,{href:t,className:i,onClick:m,title:d,children:a})}},9366:function(e,t,a){"use strict";a.d(t,{NC:function(){return m},_1:function(){return d},om:function(){return c},w9:function(){return l}});var r=a(5597),n=a(8880);let o=!1;function s(){o||(o=!0,setTimeout(()=>{try{(0,r.XS)()}catch(e){console.warn("JungleBus init failed:",e)}},100))}let i="bsv_uploaded_videos";async function c(e){s();try{let t=(0,r.lh)().getVideo(e);if(t)return console.log("\uD83D\uDCE1 Video from JungleBus: ".concat(e.substring(0,16),"...")),t}catch(e){console.warn("JungleBus not available for getVideo")}let t=function(e){let t=h().find(t=>t.txId===e);return t?b(t):null}(e);return t?(console.log("\uD83D\uDCE6 Video from local cache: ".concat(e.substring(0,16),"...")),t):(console.log("⏳ Video not found: ".concat(e.substring(0,16),"... (may be pending)")),null)}async function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;s();let a=[];try{let n=(0,r.lh)(),o=n.getStatus();console.log("\uD83D\uDCE1 JungleBus status: ".concat(o.connected?"connected":"disconnected",", ").concat(o.videoCount," videos cached")),a=n.getVideos(e+10,t)}catch(e){console.warn("JungleBus not available for getRecentVideos - using local cache only")}let n=h();if(n.length>0){for(let e of n)a.some(t=>t.txId===e.txId)||a.unshift(b(e));a.sort((e,t)=>t.timestamp-e.timestamp)}return a.slice(0,e)}async function u(){if((0,n.UA)())return console.log("ℹ️ Skipping backend check on ReactOnChain"),!1;try{return(await fetch("".concat(function(){{let e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e?"http://localhost:7101":"https://b4gosg8s4gwoswwoc440os4c.securephone.co.uk"}}(),"/health"),{method:"GET",signal:AbortSignal.timeout(3e3)})).ok}catch(e){return!1}}function d(e){try{let t=h();t.unshift({...e,timestamp:Date.now(),confirmed:!1});let a=t.slice(0,50);localStorage.setItem(i,JSON.stringify(a));try{(0,r.lh)().addVideoToCache(b(e))}catch(e){}console.log("\uD83D\uDCDD Tracked upload: ".concat(e.title))}catch(e){console.warn("Failed to track upload:",e)}}function h(){try{let e=localStorage.getItem(i);return e?JSON.parse(e):[]}catch(e){return[]}}function b(e){var t;let a=[];e.tags&&(Array.isArray(e.tags)?a=e.tags:"string"==typeof e.tags&&(a=e.tags.split(",").map(e=>e.trim()).filter(Boolean)));let r=e.primaryThumbnail||e.thumbnail_ipfs||e.thumbnailIpfs||e.thumbnail;return{txId:e.txId||e.tx_id||e.txid||"",title:e.title||"Untitled",description:e.description||"",ipfsHash:e.ipfsHash||e.ipfs_hash||e.ipfsCid||"",creator:e.creator||e.creator_address||e.creatorAddress||"",tags:a,category:e.category||"other",timestamp:e.timestamp||Date.now(),createdAt:e.createdAt||e.created_at||new Date().toISOString(),thumbnailIpfs:r,primaryThumbnail:r,confirmed:null!==(t=e.confirmed)&&void 0!==t&&t}}async function m(){if((0,n.UA)())return{jungleBus:!1,backend:!1,videoCount:0,isOnChain:!0};s();let e=!1,t=0;try{let a=(0,r.lh)().getStatus();e=a.connected,t=a.videoCount}catch(e){console.warn("JungleBus not available for status check")}return{jungleBus:e,backend:await u(),videoCount:t,isOnChain:!1}}},5972:function(e,t,a){"use strict";a.d(t,{default:function(){return p}});var r=a(7437),n=a(2265),o=a(9376),s=a(8880),i=a(5566),c=a(2957).lW;let l=i.env.NEXT_PUBLIC_SCRYPT_API_KEY||"";i.env.NEXT_PUBLIC_SCRYPT_API_URL;let u=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","against","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arcade","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blow","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage"];class d{async postVideoMetadata(e,t,a){try{console.log("\uD83D\uDD17 Creating BSV transaction for video metadata..."),console.log("\uD83D\uDCCD Creator address: ".concat(t));let e=Date.now(),a="DEMO_tx_".concat(e,"_BSV_VIDEO");return console.log("✅ Demo transaction created: ".concat(a)),{txId:a,rawTx:"demo_raw_transaction_".concat(e)}}catch(e){throw console.error("❌ Error posting video metadata:",e),Error("Failed to post to blockchain: ".concat(e instanceof Error?e.message:String(e)))}}async getAddressUtxos(e){try{let t=await fetch("".concat(this.networkApi,"/address/").concat(e,"/unspent"));if(!t.ok)throw Error("Failed to fetch UTXOs: ".concat(t.statusText));let a=await t.json();return console.log("\uD83D\uDCE5 Found ".concat(a.length," UTXOs for address ").concat(e)),a.map(e=>({tx_hash:e.tx_hash,tx_pos:e.tx_pos,value:e.value,script:e.script||""}))}catch(e){return console.error("Error fetching UTXOs:",e),[]}}async getTransaction(e){try{let t=await fetch("".concat(this.networkApi,"/tx/").concat(e));if(!t.ok){if(404===t.status)throw Error("Transaction not found");throw Error("Failed to fetch transaction: ".concat(t.statusText))}let a=await t.json(),r=this.extractVideoMetadata(a);return{txId:e,confirmed:a.confirmations>0,blockheight:a.blockheight,confirmations:a.confirmations,timestamp:a.time,metadata:r}}catch(e){throw console.error("Error fetching transaction:",e),e}}extractVideoMetadata(e){try{for(let t of e.vout||[])if(t.scriptPubKey&&t.scriptPubKey.asm){let e=t.scriptPubKey.asm;if(e.includes("BSV_VIDEO")){let t=e.split(" "),a=t.indexOf("BSV_VIDEO")+1;if(a<t.length){let e=t[a],r=c.from(e,"hex").toString("utf8");return JSON.parse(r)}}}return null}catch(e){return console.warn("Could not extract metadata from transaction:",e),null}}async broadcastTransaction(e){try{let t=await fetch("".concat(this.networkApi,"/tx/raw"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({txhex:e})});if(t.ok){let e=await t.json();return e.txid||e}let a="DEMO_broadcast_".concat(Date.now());return console.warn("⚠️ Broadcasting may have failed, but generated txId: ".concat(a)),a}catch(e){throw console.error("Error broadcasting transaction:",e),Error("Failed to broadcast transaction: ".concat(e instanceof Error?e.message:String(e)))}}generateNewWallet(){let e=function(){let e=[];for(let t=0;t<12;t++){let t=Math.floor(Math.random()*u.length);e.push(u[t])}return e.join(" ")}(),t=Date.now();return{privateKey:"demo_private_key_".concat(t),address:"1Demo".concat(t,"Address"),wif:"demo_wif_".concat(t),mnemonic:e}}validateAddress(e){try{return e.startsWith("1")&&e.length>=26&&e.length<=35}catch(e){return!1}}async getAddressBalance(e){try{let t=await fetch("".concat(this.networkApi,"/address/").concat(e,"/balance"));if(!t.ok)throw Error("Failed to fetch balance: ".concat(t.statusText));let a=await t.json();return{confirmed:a.confirmed||0,unconfirmed:a.unconfirmed||0}}catch(e){return console.error("Error fetching balance:",e),{confirmed:0,unconfirmed:0}}}async getVideosByCreator(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;try{let a=await fetch("".concat(this.networkApi,"/address/").concat(e,"/history"));if(!a.ok)return[];let r=await a.json(),n=[];for(let e of r.slice(0,t))try{let t=await this.getTransaction(e.tx_hash);t.metadata&&"video_metadata"===t.metadata.type&&n.push({txId:e.tx_hash,...t.metadata,confirmed:t.confirmed,blockheight:t.blockheight})}catch(e){continue}return n}catch(e){return console.error("Error fetching creator videos:",e),[]}}constructor(e){this.apiKey=e||l,this.networkApi="https://api.whatsonchain.com/v1/bsv/main"}}var h=a(9366),b=a(3993),m=a(9064);let f="http://localhost:7101";function p(e){let{txId:t}=e,[a,i]=(0,n.useState)(null),[c,l]=(0,n.useState)(!0),[u,p]=(0,n.useState)(null),[x,g]=(0,n.useState)(!1),[w,v]=(0,n.useState)(""),[y,k]=(0,n.useState)(!1),[j,N]=(0,n.useState)(1e-4),[S,_]=(0,n.useState)(!1),[T,C]=(0,n.useState)(!1),[D,E]=(0,n.useState)(""),[I,A]=(0,n.useState)({likes:0,comments:0,tips:{count:0,totalAmount:0},shares:0}),[B,V]=(0,n.useState)(!1),[L,O]=(0,n.useState)([]),[U,P]=(0,n.useState)(!1),[M,F]=(0,n.useState)(!1),[J,W]=(0,n.useState)(!1),[z,H]=(0,n.useState)(!1),[R,X]=(0,n.useState)(""),K=(0,o.useRouter)(),Z=(0,n.useMemo)(()=>(0,s.eD)(K),[K]);async function Y(){try{let c=localStorage.getItem("userAddress"),l={};c&&(l["x-user-address"]=c);let u=await fetch("".concat(f,"/api/social/interactions/").concat(t),{headers:l});if(u.ok){var e,a,r,n,o,s,i;let t=await u.json();A({likes:(null===(e=t.likes)||void 0===e?void 0:e.count)||0,comments:(null===(a=t.comments)||void 0===a?void 0:a.count)||0,tips:{count:(null===(r=t.tips)||void 0===r?void 0:r.count)||0,totalAmount:(null===(n=t.tips)||void 0===n?void 0:n.totalAmount)||0},shares:(null===(o=t.shares)||void 0===o?void 0:o.count)||0}),(null===(s=t.likes)||void 0===s?void 0:s.userLiked)!==void 0&&_(t.likes.userLiked),(null===(i=t.comments)||void 0===i?void 0:i.interactions)&&O(t.comments.interactions)}}catch(e){console.log("Social stats not available")}}(0,n.useMemo)(()=>new d,[]),(0,n.useEffect)(()=>{g(!0)},[]),(0,n.useEffect)(()=>{let e=localStorage.getItem("userAddress");e&&v(e)},[]),(0,n.useEffect)(()=>{x&&(async()=>{try{let e=await (0,h.NC)();e.jungleBus?X("junglebus"):e.backend?X("server"):e.videoCount>0&&X("cache");let a=await (0,h.om)(t);a?i({...a,streamUrl:"/api/videos/stream/".concat(a.ipfsHash),views:0,likes:0}):p("Video not found")}catch(e){console.error("Failed to load video:",e),p("Failed to load video")}finally{l(!1)}})()},[x,t]),(0,n.useEffect)(()=>{(null==a?void 0:a.txId)&&Y()},[null==a?void 0:a.txId]);let q=async()=>{if(!w){m.ZP.error("Please connect your wallet to like videos");return}_(!S),A(e=>({...e,likes:S?e.likes-1:e.likes+1})),m.ZP.success(S?"Unliked!":"Liked!")},G=async()=>{let e=window.location.href;navigator.clipboard.writeText(e),m.ZP.success("Video URL copied to clipboard!")};return c?(0,r.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900 flex items-center justify-center",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"w-12 h-12 border-4 border-purple-500 border-t-transparent rounded-full animate-spin mx-auto mb-4"}),(0,r.jsx)("h2",{className:"text-xl text-white",children:"Loading Video..."}),(0,r.jsxs)("p",{className:"text-purple-300 text-sm mt-2",children:["ID: ",t]})]})}):u?(0,r.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900 flex items-center justify-center",children:(0,r.jsxs)("div",{className:"text-center max-w-md p-8",children:[(0,r.jsx)("div",{className:"text-6xl mb-4",children:"⚠️"}),(0,r.jsx)("h2",{className:"text-2xl font-bold text-white mb-2",children:"Video Not Found"}),(0,r.jsx)("p",{className:"text-red-400 mb-6",children:u}),(0,r.jsx)("button",{onClick:()=>Z.back(),className:"px-6 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700",children:"Go Back"})]})}):a?(0,r.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900",children:[(0,r.jsx)("header",{className:"sticky top-0 z-50 bg-white/10 backdrop-blur-md border-b border-white/20",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-4 py-4 flex items-center justify-between",children:[(0,r.jsxs)("button",{onClick:()=>Z.back(),className:"text-purple-200 hover:text-white flex items-center gap-2",children:[(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M15 19l-7-7 7-7"})}),"Back"]}),(0,r.jsx)("h1",{className:"text-xl font-bold text-white",children:"BSV Video"}),(0,r.jsx)(b.Z,{href:"/",className:"px-4 py-2 bg-purple-600 text-white rounded-lg text-sm hover:bg-purple-700",children:"Home"})]})}),(0,r.jsxs)("main",{className:"max-w-6xl mx-auto px-4 py-8",children:[(0,r.jsx)("div",{className:"bg-black rounded-2xl overflow-hidden mb-6",children:(0,r.jsx)("video",{controls:!0,className:"w-full aspect-video",poster:a.primaryThumbnail?"".concat(f,"/api/videos/thumbnail/").concat(a.primaryThumbnail):void 0,children:(0,r.jsx)("source",{src:"server"===R?"".concat(f).concat(a.streamUrl):"https://ipfs.io/ipfs/".concat(a.ipfsHash),type:"video/mp4"})})}),(0,r.jsxs)("div",{className:"bg-white/10 backdrop-blur-md rounded-2xl p-6 border border-white/20",children:[(0,r.jsx)("h1",{className:"text-3xl font-bold text-white mb-4",children:a.title}),(0,r.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:"w-10 h-10 bg-purple-600 rounded-full flex items-center justify-center text-white font-bold",children:a.creator.substring(0,2).toUpperCase()}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{className:"text-white font-medium",children:[a.creatorName||a.creator.substring(0,16),"..."]}),(0,r.jsxs)("p",{className:"text-purple-300 text-sm",children:[I.likes," likes \xb7 ",I.comments," comments"]})]})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)("button",{onClick:q,className:"px-4 py-2 rounded-lg flex items-center gap-2 ".concat(S?"bg-red-500 text-white":"bg-white/10 text-purple-200"),children:[(0,r.jsx)("svg",{className:"w-5 h-5",fill:S?"currentColor":"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.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"})}),I.likes]}),(0,r.jsxs)("button",{onClick:G,className:"px-4 py-2 bg-white/10 text-purple-200 rounded-lg flex items-center gap-2",children:[(0,r.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.367 2.684 3 3 0 00-5.367-2.684z"})}),"Share"]})]})]}),(0,r.jsxs)("div",{className:"border-t border-white/20 pt-6",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-white mb-3",children:"Description"}),(0,r.jsx)("p",{className:"text-purple-200",children:a.description})]}),(0,r.jsxs)("div",{className:"border-t border-white/20 pt-6 mt-6",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold text-white mb-3",children:"Blockchain Details"}),(0,r.jsxs)("div",{className:"bg-black/30 rounded-lg p-4 space-y-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-purple-300",children:"TX ID:"}),(0,r.jsx)("p",{className:"font-mono text-xs text-white break-all",children:a.txId})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-purple-300",children:"IPFS Hash:"}),(0,r.jsx)("p",{className:"font-mono text-xs text-white break-all",children:a.ipfsHash})]}),(0,r.jsx)("button",{onClick:()=>{(null==a?void 0:a.txId)&&a.txId.length>=32&&window.open("https://whatsonchain.com/tx/".concat(a.txId),"_blank")},className:"mt-2 px-4 py-2 bg-green-600/20 text-green-400 rounded-lg text-sm hover:bg-green-600/30",children:"View on WhatsOnChain →"})]})]})]})]})]}):null}},5566:function(e){var t,a,r,n=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(a){try{return t.call(null,e,0)}catch(a){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{a="function"==typeof clearTimeout?clearTimeout:s}catch(e){a=s}}();var c=[],l=!1,u=-1;function d(){l&&r&&(l=!1,r.length?c=r.concat(c):u=-1,c.length&&h())}function h(){if(!l){var e=i(d);l=!0;for(var t=c.length;t;){for(r=c,c=[];++u<t;)r&&r[u].run();u=-1,t=c.length}r=null,l=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===s||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(e)}}function b(e,t){this.fun=e,this.array=t}function m(){}n.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)t[a-1]=arguments[a];c.push(new b(e,t)),1!==c.length||l||i(h)},b.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(e){return[]},n.binding=function(e){throw Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw Error("process.chdir is not supported")},n.umask=function(){return 0}}}]);application/javascriptbinary
    https://whatsonchain.com/tx/3c80928f29bbd4a9f8dcd97a4d4c8c1ad4fd9f178f2c39e2fb90bef083df1908