PageSourceSearch

https://toolbreezy.com/_next/static/chunks/73657-c9358f76d9846891.js

js toolbreezy.com collected 2026-09-24 14:57:47 UTC 41,173 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[73657],{73657:(e,t,s)=>{s.r(t),s.d(t,{default:()=>G});var n=s(95155),a=s(12115),r=s(97003),o=s(90235),i=s(67001),l=s(33534),d=s(16110),c=s(14014);let h=[{id:"bitcoin",label:"Bitcoin",spec:"Bitcoin Core base58.cpp, also used by IPFS, Solana and Monero",chars:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",blurb:"Digits first, then letters with the four lookalikes taken out. What almost everything means by Base58."},{id:"ripple",label:"Ripple (XRPL)",spec:"XRPL's base58 dictionary",chars:"rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz",blurb:"The same 58 characters shuffled into a different order, which is why every XRP address starts with r."}],u=h[0].chars.length,m=new Map(h.map(e=>[e.id,e])),p=new Map(h.map(e=>[e.id,new Map([...e.chars].map((e,t)=>[e,t]))])),x=(()=>{let e=new Set(h.flatMap(e=>[...e.chars]));return[..."0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"].filter(t=>!e.has(t)).join("")})(),f={0:["o"],O:["o"],I:["1","i","L"],l:["1","i","L"]};function g(e){let t=m.get(e);if(!t)throw Error(`Unknown base58 alphabet: ${e}`);return t}(()=>{let e=h.map(e=>new Set(e.chars));for(let[t,s]of(h.forEach((t,s)=>{if(t.chars.length!==u)throw Error(`base58: ${t.id} has ${t.chars.length} characters, not ${u}`);if(e[s].size!==u)throw Error(`base58: ${t.id} repeats a character`);if(s>0&&[...e[0]].some(t=>!e[s].has(t)))throw Error(`base58: ${t.id} is not a permutation of the same character set`)}),Object.entries(f))){if(!x.includes(t))throw Error(`base58: ${t} is not an omitted character`);for(let t of s)if(!e[0].has(t))throw Error(`base58: lookalike target ${t} is not in the alphabet`)}})();let b=Math.log(256)/Math.log(u);function y(e,t){let s=g(t).chars,n=0;for(;n<e.length&&0===e[n];)n++;let a=[];for(let t=n;t<e.length;t++){let s=e[t];for(let e=0;e<a.length;e++)s+=256*a[e],a[e]=s%u,s=s/u|0;for(;s>0;)a.push(s%u),s=s/u|0}let r=s[0].repeat(n);for(let e=a.length-1;e>=0;e--)r+=s[a[e]];return r}function w(e){let t=e.replace(/\s+/g,"");return{text:t,whitespaceRemoved:e.length-t.length}}let v=new Uint8Array(0);function k(e,t){let s=g(t),n=w(e),a=n.text,r={id:t,ok:!0,reason:"",bytes:v,normalized:a,whitespaceRemoved:n.whitespaceRemoved,badChar:null,badPosition:0,omitted:!1};if(!a)return r;let o=p.get(t),i=n.whitespaceRemoved>0,l=0;for(;l<a.length&&a[l]===s.chars[0];)l++;let d=[];for(let e=l;e<a.length;e++){let t=a[e],s=o.get(t);if(void 0===s){let s=x.includes(t);return{...r,ok:!1,badChar:t,badPosition:e+1,omitted:s,reason:s?`"${t}" at position ${e+1}${i?" once the spacing comes out":""} is one of the ${x.length} characters (${x.split("").join(" ")}) that no Base58 ordering contains, on purpose.`:`"${t}" at position ${e+1}${i?" once the spacing comes out":""} is not a Base58 character at all.`}}let n=s;for(let e=0;e<d.length;e++)n+=d[e]*u,d[e]=255&n,n>>=8;for(;n>0;)d.push(255&n),n>>=8}let c=new Uint8Array(l+d.length);for(let e=0;e<d.length;e++)c[l+e]=d[d.length-1-e];return{...r,bytes:c}}function j(){return void 0!==globalThis.crypto&&void 0!==globalThis.crypto.subtle}async function N(e){let t=await crypto.subtle.digest("SHA-256",(0,c.XA)(e));return new Uint8Array(await crypto.subtle.digest("SHA-256",t))}function S(e){return 32===e.length?{title:"32 bytes with no checksum is the shape of a Solana address",detail:"Solana and Monero write raw Base58 with no checksum on the end, so there is nothing here to verify. The length and the characters are all this page can confirm, and a typo in one of these is undetectable by any tool that only looks at the string."}:34===e.length&&18===e[0]&&32===e[1]?{title:"This is an IPFS CIDv0",detail:'The two leading bytes 0x12 and 0x20 say "SHA-256, 32 bytes long", which is why every CIDv0 starts with Qm. It carries no Base58Check checksum, but the content hash itself is the integrity check.'}:null}let $={available:!1,applicable:!0,ok:!1,reason:"",body:v,found:v,expected:v};async function T(e){if(!j())return{...$,reason:"Checksum verification needs a secure connection, so it did not run. Encoding and decoding still work."};if(e.length<=4)return{...$,available:!0,reason:`Base58Check carries 4 checksum bytes on the end plus at least one version byte, and this decodes to ${e.length}.`};if(S(e))return{...$,available:!0,applicable:!1,reason:"This format carries no checksum, so there is nothing here to verify."};let t=e.subarray(0,e.length-4),s=e.subarray(e.length-4),n=(await N(t)).subarray(0,4),a=s.every((e,t)=>e===n[t]);return{available:!0,applicable:!0,ok:a,reason:a?"":"The four trailing bytes are not what this payload hashes to, so a character is wrong.",body:t,found:s,expected:n}}async function B(e,t){let s=(await N(e)).subarray(0,4),n=new Uint8Array(e.length+4);return n.set(e,0),n.set(s,e.length),y(n,t)}async function C(e,t){let s=k(e,t);if(!s.ok||s.bytes.length<=4)return!1;let n=s.bytes.subarray(0,s.bytes.length-4),a=s.bytes.subarray(s.bytes.length-4),r=(await N(n)).subarray(0,4);return a.every((e,t)=>e===r[t])}let L=["an extra character that should not be there","a missing character","two or more wrong characters at once"],A=e=>({ran:!1,reason:e,mode:"sweep",candidates:0,skipped:0,positionsSearched:0,positionsTotal:0,searched:[],notSearched:L,found:[]});async function M(e,t,s){if(!j())return A("Finding a typo means recomputing the checksum, which needs a secure connection.");let n=w(e).text;if(!n)return A("Nothing to check yet.");let a=g(t).chars,r=[];for(let e=0;e<n.length;e++){let t=n[e];a.includes(t)||r.push({c:t,i:e})}if(r.length>0){if(r.length>2)return{...A(`${r.length} characters here are not in any Base58 alphabet, which is more than a typo. This looks like a different encoding rather than a mistyped Base58 string.`),positionsTotal:n.length};let e=r.map(({c:e})=>f[e]??[]);if(e.some(e=>0===e.length))return{...A(`"${r.find(({c:e})=>0===(f[e]??[]).length).c}" is not a Base58 character and has no obvious lookalike, so there is nothing sensible to try in its place.`),positionsTotal:n.length};let s=[],o=(t,n)=>{if(t===r.length)return;let{c:a,i}=r[t];for(let l of e[t]){let e=n.slice(0,i)+l+n.slice(i+1);t===r.length-1?s.push({kind:"lookalike",position:i+1,from:a,to:l,text:e}):o(t+1,e)}};o(0,n);let i=[];for(let e of s)await C(e.text,t)&&i.push(e);if(i.length>0)return{ran:!0,reason:"",mode:"lookalike",candidates:s.length,skipped:0,positionsSearched:r.length,positionsTotal:n.length,searched:[`the ${x.split("").join(", ")} lookalikes at the ${1===r.length?"one position":`${r.length} positions`} that cannot decode`],notSearched:["every other position, which decoded fine",...L],found:i};let l=[],d=(e,t)=>{if(e===r.length)return;let{c:s,i:n}=r[e];for(let o of a){let a=t.slice(0,n)+o+t.slice(n+1);e===r.length-1?l.push({kind:"substitution",position:n+1,from:s,to:o,text:a}):d(e+1,a)}};d(0,n);let c=[];for(let e=0;e<l.length;e+=256){let s=l.slice(e,e+256);(await Promise.all(s.map(e=>
1C(e.text,t)))).forEach((e,t)=>{e&&c.push(s[t])})}return{ran:!0,reason:"",mode:"lookalike",candidates:s.length+l.length,skipped:0,positionsSearched:r.length,positionsTotal:n.length,searched:[`every one of the ${u} Base58 characters at the ${1===r.length?"one position":`${r.length} positions`} that cannot decode, after the ${x.split("").join(", ")} lookalikes found nothing`],notSearched:["every other position, which decoded fine",...L],found:c}}let o=k(n,t);if(o.bytes.length<6||o.bytes.length>128)return{...A(`This decodes to ${o.bytes.length} bytes, and Base58Check strings run from 6 to 128. Searching for a typo in something that is not Base58Check would only produce a coincidence.`),positionsTotal:n.length};let i=[],l=0,d=0;for(let e=0;e<n.length;e++){let t=n[e];if(i.length+(u-1)>s){d+=u-1;continue}for(let s of(l++,a))s!==t&&i.push({kind:"substitution",position:e+1,from:t,to:s,text:n.slice(0,e)+s+n.slice(e+1)})}for(let e=0;e+1<n.length;e++){let t=n[e],a=n[e+1];if(t!==a){if(i.length>=s){d++;continue}i.push({kind:"transposition",position:e+1,from:t+a,to:a+t,text:n.slice(0,e)+a+t+n.slice(e+2)})}}let c=[];for(let e=0;e<i.length;e+=256){let s=i.slice(e,e+256);(await Promise.all(s.map(e=>C(e.text,t)))).forEach((e,t)=>{e&&c.push(s[t])})}return{ran:!0,reason:"",mode:"sweep",candidates:i.length,skipped:d,positionsSearched:l,positionsTotal:n.length,searched:["one wrong character in any position","two neighboring characters swapped"],notSearched:L,found:c}}let E=[{key:"p2pkh",version:[0],payloadBytes:20,label:"Bitcoin mainnet address",note:"A legacy P2PKH address, holding a 20 byte hash of a public key."},{key:"p2sh",version:[5],payloadBytes:20,label:"Bitcoin mainnet script address",note:"A P2SH address, where the 20 bytes hash a script rather than a single key. Multisig lives here."},{key:"p2pkh-test",version:[111],payloadBytes:20,label:"Bitcoin testnet address",note:"The testnet twin of a legacy address. Sending real coins to one loses them."},{key:"p2sh-test",version:[196],payloadBytes:20,label:"Bitcoin testnet script address",note:"The testnet twin of a script address."},{key:"wif",version:[128],payloadBytes:32,label:"Mainnet private key (WIF, uncompressed)",note:"A raw 32 byte private key. Anyone holding this string can spend the coins behind it."},{key:"wif-c",version:[128],payloadBytes:33,suffix:1,label:"Mainnet private key (WIF, compressed)",note:"The same 32 byte key with a 0x01 byte on the end, which says the public key it belongs to is written in compressed form."},{key:"wif-test",version:[239],payloadBytes:32,label:"Testnet private key (WIF, uncompressed)",note:"The testnet form of a raw private key."},{key:"wif-test-c",version:[239],payloadBytes:33,suffix:1,label:"Testnet private key (WIF, compressed)",note:"The testnet form, with the compressed marker byte."},{key:"xpub",version:[4,136,178,30],payloadBytes:74,label:"Extended public key",note:"A BIP32 extended public key. It cannot spend, but it can derive every address in the branch below it, so it is still worth keeping private."},{key:"xprv",version:[4,136,173,228],payloadBytes:74,label:"Extended private key",note:"A BIP32 extended private key, which controls every address below it. This is the whole wallet."},{key:"tpub",version:[4,53,135,207],payloadBytes:74,label:"Extended public key (testnet)",note:"The testnet form of an extended public key."},{key:"tprv",version:[4,53,131,148],payloadBytes:74,label:"Extended private key (testnet)",note:"The testnet form of an extended private key."}],P=[0,64,128,192,255],R=null;function z(e,t){for(let s of t)if(e.length===s.totalBytes&&s.version.every((t,s)=>e[s]===t)){let t=E.find(e=>e.key===s.key);if(void 0!==t.suffix&&e[s.version.length+s.payloadBytes-1]!==t.suffix)continue;return s}return null}var I=s(27784),D=s(25016),F=s(81322),O=s(14827);let U="1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",W="tb-base58-prefs",J="tb-base58-recent",H=new TextEncoder,Q=new TextDecoder,_=new Uint8Array(0),V=[{id:"decode",label:"Decode and check"},{id:"encode",label:"Encode"},{id:"build",label:"Build a Base58Check"}],X="h-9 w-full rounded-md border border-input bg-background px-3 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",K=(e,t,s=`${t}s`)=>
1`${e.toLocaleString()} ${1===e?t:s}`;function q({children:e,tone:t="warn"}){return(0,n.jsx)("p",{className:(0,D.cn)("rounded-md border px-3 py-2 text-xs","warn"===t?"border-yellow-500/50 bg-yellow-500/10 text-yellow-900 dark:text-yellow-200":"border-border bg-muted/50 text-muted-foreground"),children:e})}function G(){let[e,t]=(0,a.useState)("decode"),[s,m]=(0,a.useState)(U),[p,f]=(0,a.useState)("bitcoin"),[w,v]=(0,a.useState)("text"),[N,$]=(0,a.useState)(null),[C,L]=(0,a.useState)(""),[A,G]=(0,a.useState)(null),[Y,Z]=(0,a.useState)(!1),ee=(0,a.useRef)(null),et=(0,a.useRef)(0),[es,en]=(0,a.useState)("00"),[ea,er]=(0,a.useState)("62e907b15cbf27d5425399ebf6f0fb50ebb88f18"),[eo,ei]=(0,a.useState)(""),[el,ed]=(0,a.useState)(_),[ec,eh]=(0,a.useState)([]),[eu,em]=(0,a.useState)(null),[ep,ex]=(0,a.useState)(null),[ef,eg]=(0,a.useState)(!1),[eb,ey]=(0,a.useState)(!1),[ew,ev]=(0,a.useState)([]),ek=(0,a.useRef)(""),ej=(0,a.useMemo)(()=>j(),[]);(0,a.useEffect)(()=>{let e=!0;return(!R&&(R=(async()=>{if(!j())return[];let e=[];for(let t of E){let s=[];for(let e of P){let n=new Uint8Array(t.payloadBytes).fill(e);void 0!==t.suffix&&(n[n.length-1]=t.suffix);let a=new Uint8Array([...t.version,...n]);s.push(await B(a,"bitcoin"))}let n=s[0];for(let e of s){let t=0;for(;t<n.length&&t<e.length&&n[t]===e[t];)t++;n=n.slice(0,t)}let a=g("bitcoin").chars,r=[...new Set(s.map(e=>e[0]))].sort((e,t)=>a.indexOf(e)-a.indexOf(t)).join(""),o=s.map(e=>e.length);e.push({key:t.key,version:t.version,label:t.label,note:t.note,payloadBytes:t.payloadBytes,suffix:t.suffix,totalBytes:t.ver
1sion.length+t.payloadBytes+4,prefix:n,firstChars:r,minLength:Math.min(...o),maxLength:Math.max(...o)})}return e})()),R).then(t=>{e&&eh(t)}),()=>{e=!1}},[]),(0,a.useEffect)(()=>{let e=new URLSearchParams(window.location.search),s=!1,n=e.get("alphabet");n&&h.some(e=>e.id===n)&&(f(n),s=!0);let a=e.get("mode");a&&V.some(e=>e.id===a)&&t(a);try{if(!s){let e=JSON.parse(window.localStorage.getItem(W)||"null");e&&(e.alpha&&h.some(t=>t.id===e.alpha)&&f(e.alpha),!0===e.remember&&ey(!0))}let e=JSON.parse(window.localStorage.getItem(J)||"[]");Array.isArray(e)&&ev(e.slice(0,8))}catch{}},[]),(0,I.Vd)(W,()=>JSON.stringify({alpha:p,remember:eb}),[p,eb]);let eN=(0,a.useMemo)(()=>{let e=s.length>12e3;return{text:e?s.slice(0,12e3):s,truncated:e,dropped:e?s.length-12e3:0}},[s]),eS=eN.text.trim().length>0||null!==N,e$=(0,a.useMemo)(()=>{var t;return"decode"===e?(t=eN.text,h.map(e=>k(t,e.id))):[]},[e,eN.text]),eT=(0,a.useMemo)(()=>e$.find(e=>e.id===p)??null,[e$,p]),eB=eT?.ok?eT.bytes:_,eC=(0,a.useRef)(0);(0,a.useEffect)(()=>{let t=++eC.current;if("decode"!==e||0===eB.length)return void em(null);T(eB).then(e=>{t===eC.current&&em(e)})},[e,eB]);let eL=(0,a.useMemo)(()=>eu?.ok?z(eB,ec):null,[eu,eB,ec]),eA=(0,a.useRef)(0);(0,a.useEffect)(()=>{let t=++eA.current;ex(null);let s=null!==eT&&!eT.ok&&eT.omitted,n=null!==eu&&eu.available&&eu.applicable&&!eu.ok;if("decode"!==e||!eS||!s&&!n)return void eg(!1);eg(!0);let a=window.setTimeout(()=>{M(eN.text,p,8e3).then(e=>{t===eA.current&&(ex(e),eg(!1))})},300);return()=>window.clearTimeout(a)},[e,eS,eT,eu,eN.text,p]);let eM=(0,a.useMemo)(()=>{if("encode"!==e)return{bytes:_,error:null,refused:0};let t=N?{bytes:N,error:null}:"hex"===w?(0,c._Q)(eN.text):{bytes:H.encode(eN.text),error:null};if(t.error)return{bytes:_,error:t.error,refused:0};let s=t.bytes.length>8192;return{bytes:s?t.bytes.subarray(0,8192):t.bytes,error:null,refused:s?t.bytes.length-8192:0}},[e,N,w,eN.text]),eE=(0,a.useMemo)(()=>"encode"!==e||eM.error||0===eM.bytes.length?[]:h.map(e=>({a:e,text:y(eM.bytes,e.id)})),[e,eM]),eP=eE.find(e=>e.a.id===p)?.text??"",eR=(0,a.useMemo)(()=>{let e=(0,c._Q)(es),t=(0,c._Q)(ea);return{v:e,p:t,error:e.error??t.error}},[es,ea]),ez=(0,a.useRef)(0);(0,a.useEffect)(()=>{let t=++ez.current;if("build"!==e||eR.error||0===eR.v.bytes.length){ei(""),ed(_);return}let s=new Uint8Array(eR.v.bytes.length+eR.p.bytes.length);s.set(eR.v.bytes,0),s.set(eR.p.bytes,eR.v.bytes.length),B(s,p).then(async e=>{if(t!==ez.current)return;ei(e);let s=k(e,p),n=await T(s.bytes);t===ez.current&&ed(n.expected)})},[e,eR,p]);let eI=(0,a.useMemo)(()=>eo?z(k(eo,p).bytes,ec):null,[eo,p,ec]),eD=(0,a.useMemo)(()=>Q.decode(eB),[eB]),eF=(0,a.useMemo)(()=>(0,c.w4)(eB),[eB]),eO=(0,a.useMemo)(()=>(0,c.ek)(eB,512),[eB]),eU=(0,a.useMemo)(()=>"decode"===e&&eS?function(e){let t=e.trim();if(!t)return[];let s=[],n=t.toLowerCase(),a=/^(bcrt1|bc1|tb1)/.exec(n);if(a&&t.length>=14&&[...n.slice(a[0].length)].every(e=>"qpzry9x8gf2tvdw0s3jn54khce6mua7l".includes(e)))return s.push({tone:"warn",settled:!0,title:"This is a Bech32 address, not Base58",detail:"Addresses beginning bc1 are SegWit, and they use a completely different alphabet with a completely different checksum. This tool cannot decode one and will not pretend to. The address is not broken, it just is not Base58."}),s;if(/^0x[0-9a-fA-F]{40}$/.test(t))return s.push({tone:"warn",settled:!0,title:"This is an Ethereum address",detail:"Forty hex digits after 0x is an Ethereum account, which is plain hex rather than Base58. Its own checksum lives in the mix of upper and lower case letters."}),s;if(/[+/=]/.test(t)){let e=t.includes("=")&&!/[+/]/.test(t)?"Base32 or Base64":"Base64";s.push({tone:"warn",title:`This looks like ${e}, not Base58`,detail:`Base58 has no +, no / and no = anywhere in it, because it has no padding and no block size. A string carrying those is ${e}.`,sendTo:t.includes("+")||t.includes("/")?{slug:"base64-encode-decode",label:"the Base64 encoder and decoder"}:{slug:"base32-encode-decode",label:"the Base32 encoder and decoder"}})}return s}(eN.text):[],[e,eS,eN.text]),eW=eU.some(e=>!0===e.settled),eJ=(0,a.useMemo)(()=>eu?function(e,t,s){let n=[];if(0===e.length)return n;if(s&&t.ok&&n.push({tone:s.key.startsWith("wif")||"xprv"===s.key||"tprv"===s.key?"warn":"info",title:s.label,detail
1:`${s.note} The checksum passes, so no character is mistyped. That is all a checksum can tell you: it says nothing about whether this address exists, holds anything, or is the one you meant.`}),!t.ok){let t=S(e);t&&n.push({tone:32===e.length?"warn":"info",...t})}return t.available&&t.ok&&!s&&n.push({tone:"info",title:"A valid Base58Check string of an unfamiliar kind",detail:`The checksum passes over ${e.length-4} bytes, so the string is intact, but the version byte 0x${e[0].toString(16).padStart(2,"0")} with this length is not one of the kinds named below. Plenty of chains use their own version bytes.`}),n}(eB,eu,eL):[],[eu,eB,eL]),eH=(0,I.y1)("decode"===e&&eu?.available&&eB.length>0?`${eu.ok}:${eB.length}:${(0,c.nj)(eB.subarray(0,4))}`:null);(0,a.useEffect)(()=>{if(!eH||!eb||"decode"!==e||!eu?.available||0===eB.length)return;let t=`${eu.ok}:${eB.length}:${(0,c.nj)(eB.subarray(0,4))}`;if(t===ek.current)return;let s={k:eL?eL.label:eu.applicable?eu.ok?"Valid Base58Check":"Checksum failed":"No checksum to check",b:eB.length,ok:eu.ok,t:Date.now()},n=window.setTimeout(()=>{ek.current=t,ev(e=>{let t=[s,...e].slice(0,8);try{window.localStorage.setItem(J,JSON.stringify(t))}catch{}return t})},1500);return()=>window.clearTimeout(n)},[eb,e,eu,eB,eL,eH]);let eQ=(0,a.useCallback)(async t=>{let s=++et.current;try{if("encode"===e){let e=t.size>8192,n=await (e?t.slice(0,8192):t).arrayBuffer();if(s!==et.current)return;$(new Uint8Array(n)),L(t.name),G(e?`${t.name} is ${t.size.toLocaleString()} bytes. The first ${8192..toLocaleString()} were encoded and ${(t.size-8192).toLocaleString()} bytes were refused, because Base58 encoding gets slow in a way that would lock up this page.`:null);return}let n=t.size>12e3,a=(0,F.R)(await (n?t.slice(0,12e3):t).arrayBuffer()),r=a.text;if(s!==et.current)return;$(null),L(""),m(r),G(""!==a.note?a.note:n?`${t.name} is ${t.size.toLocaleString()} bytes. The first ${12e3.toLocaleString()} were read and ${(t.size-12e3).toLocaleString()} bytes were refused, so everything below covers only the part that fit.`:null)}catch{s===et.current&&G(`${t.name} could not be read.`)}},[e]),e_=()=>{et.current++,$(null),L(""),G(null),ee.current&&(ee.current.value="")};function eV(e){N&&e_(),m(e)}function eX(e,t,s){(0,O.WN)(new Blob([t],{type:s}),e)}let eK=(0,a.useCallback)(()=>{let t=new URLSearchParams;return t.set("alphabet",p),t.set("mode",e),t},[p,e]),eq=g(p),eG=ep?.found.length===1?ep.found[0]:null;return(0,n.jsxs)("div",{className:"space-y-5",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("div",{className:"flex flex-wrap gap-2",children:V.map(s=>(0,n.jsx)(r.$,{type:"button",variant:e===s.id?"default":"outline",onClick:()=>{e_(),t(s.id)},children:s.label},s.id))}),"build"!==e&&(0,n.jsx)(r.$,{type:"button",variant:"ghost",onClick:function(){e_(),"decode"===e?(m(eT?.ok?(0,c.nj)(eT.bytes):""),v("hex"),t("encode")):(m(eP),t("decode"))},children:"Swap"}),"build"!==e&&(0,n.jsx)(r.$,{type:"button",variant:"ghost",onClick:()=>{e_(),m("")},children:"Clear"}),"decode"===e&&(0,n.jsx)(r.$,{type:"button",variant:"ghost",onClick:()=>eV(U),children:"Load sample"})]}),!ej&&(0,n.jsx)(q,{children:"Checksum verification needs a secure connection and this page is not on one, so it did not run and the typo finder is switched off. Encoding and decoding still work. Nothing below is claiming a string is valid, because nothing checked it."}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)(o.J,{children:"Alphabet"}),(0,n.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:h.map(t=>{let s=e$.find(e=>e.id===t.id),a=p===t.id;return(0,n.jsxs)("button",{type:"button",onClick:()=>f(t.id),"aria-pressed":a,className:(0,D.cn)("rounded-lg border p-3 text-left transition-colors",a?"border-primary bg-primary/5":"hover:bg-muted/50"),children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("span",{className:"text-sm font-semibold",children:t.label}),"decode"===e&&eS&&s&&(0,n.jsx)("span",{className:(0,D.cn)("shrink-0 rounded px-1.5 py-0.5 text-[11px] font-medium",s.ok?"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400":"bg-destructive/15 text-destructive"),children:s.ok?K(s.bytes.length,"byte"):"will not decode"})]}),(0,n.jsx)("div",{className:"mt-1 break-all font-mono text-[11px] text-muted-foreground",children:t.chars}),(0,n.jsx)("div",{className:"mt-1 text-xs text-muted-foreground",children:t.blurb})]},t.id)})})]}),"build"===e?(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[1fr_3fr]",children:[(0,n.jsxs)("div",{className:"space-y-1.5",children:[(0,n.jsx)(o.J,{htmlFor:"b58-version",children:"Version bytes (hex)"}),(0,n.jsx)("input",{id:"b58-version",className:(0,D.cn)(X,"font-mono"),value:es,spellCheck:!1,autoComplete:"off",onChange:e=>en(e.target.value)})]}),(0,n.jsxs)("div",{className:"space-y-1.5",children:[(0,n.jsx)(o.J,{htmlFor:"b58-payload",children:"Payload (hex)"}),(0,n.jsx)("input",{id:"b58-payload",className:(0,D.cn)(X,"font-mono"),value:ea,spellCheck:!1,autoComplete:"off",onChange:e=>er(e.target.value)})]})]}),ec.length>0&&(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5",children:ec.map(e=>(0,n.jsx)(r.$,{type:"button",size:"sm",variant:"outline",onClick:()=>{en(e.version.map(e=>e.toString(16).padStart(2,"0")).join("")),er(t=>{let s=(0,c._Q)(t).bytes,n=new Uint8Array(e.payloadBytes);return n.set(s.subarray(0,Math.min(s.length,e.payloadBytes))),void 0!==e.suffix&&(n[n.length-1]=e.suffix),(0,c.nj)(n)})},children:e.label},e.key))}),eR.error&&(0,n.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:eR.error}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsxs)(o.J,{htmlFor:"b58-built",children:["Base58Check (",eq.label,")"]}),(0,n.jsx)(d.i,{value:eo,describe:"the built string"})]}),(0,n.jsx)(i.T,{id:"b58-built",readOnly:!0,rows:2,value:eo,className:"break-all font-mono text-sm"}),eo&&(0,n.jsxs)("div",{className:"rounded-lg border bg-muted/40 p-3 text-xs text-muted-foreground",children:[(0,n.jsxs)("p",{children:["Checksum computed for you:"," ",(0,n.jsx)("span",{className:"font-mono text-foreground",children:(0,c.nj)(el," ")}),", the first"," ",4," bytes of SHA-256 run twice over the version bytes and payload together. Those four bytes are appended before the whole thing is encoded, which is the only difference between Base58 and Base58Check."]}),(0,n.jsxs)("p",{className:"mt-1",children:[eo.length.toLocaleStr
1ing()," characters from"," ",K(eR.v.bytes.length+eR.p.bytes.length+4,"byte"),eI?`. That is the shape of a ${eI.label}.`:". No named kind matches this version and length, which is fine if you are testing your own format."]})]})]}),!ej&&(0,n.jsx)(q,{children:"Building needs the same hashing the check does, so it is unavailable here too."})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"space-y-1.5",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)(o.J,{htmlFor:"b58-input",children:"decode"===e?"Base58 to decode":"hex"===w?"Hex bytes to encode":"Text to encode"}),"encode"===e&&(0,n.jsx)("div",{className:"flex gap-1",children:["text","hex"].map(e=>(0,n.jsx)(r.$,{type:"button",size:"sm",variant:w===e?"secondary":"ghost",onClick:()=>v(e),children:"text"===e?"Text":"Hex"},e))})]}),(0,n.jsx)("div",{onDragOver:e=>{e.preventDefault(),Z(!0)},onDragLeave:()=>Z(!1),onDrop:e=>{e.preventDefault(),Z(!1);let t=e.dataTransfer.files?.[0];t&&eQ(t)},onPaste:e=>{let t=e.clipboardData.files?.[0];t&&(e.preventDefault(),eQ(t))},className:(0,D.cn)("rounded-md",Y&&"ring-2 ring-primary"),children:(0,n.jsx)(i.T,{id:"b58-input",value:N?"":s,onChange:e=>eV(e.target.value),rows:3,spellCheck:!1,autoComplete:"off",placeholder:N?"":"decode"===e?"Paste an address, a key or any Base58 string, or drop a text file here":"hex"===w?"00 62e907b1..., or 0x62e907b1":"Type anything, or drop a file here",className:"break-all font-mono text-sm"})}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,n.jsx)("input",{ref:ee,type:"file",className:"sr-only",onChange:e=>{let t=e.target.files?.[0];t&&eQ(t)}}),(0,n.jsx)(r.$,{type:"button",variant:"outline",size:"sm",onClick:()=>ee.current?.click(),children:"Choose a file"}),(0,n.jsx)("span",{children:"or drag one into the box, or paste it. Nothing is uploaded."}),N&&(0,n.jsxs)("span",{className:"flex items-center gap-2 font-medium text-foreground",children:[C," (",K(N.length,"byte"),")",(0,n.jsx)(r.$,{type:"button",variant:"ghost",size:"sm",onClick:e_,children:"Remove"})]})]}),eN.truncated&&(0,n.jsxs)(q,{children:["The first ",12e3.toLocaleString()," characters were used and"," ",eN.dropped.toLocaleString()," were refused, so everything below covers only the part that fit."]}),eM.refused>0&&(0,n.jsxs)(q,{children:[eM.refused.toLocaleString()," bytes were refused. Only the first"," ",8192..toLocaleString()," were encoded."]}),A&&(0,n.jsx)(q,{children:A}),eM.error&&(0,n.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:eM.error})]}),"decode"===e?(0,n.jsxs)("div",{className:"space-y-4",children:[eU.map(e=>(0,n.jsxs)("div",{className:(0,D.cn)("rounded-lg border p-4 text-sm","warn"===e.tone?"border-yellow-500/50 bg-yellow-500/10":"border-border bg-muted/40"),children:[(0,n.jsx)("h2",{className:"text-sm font-semibold",children:e.title}),(0,n.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e.detail}),e.sendTo&&(0,n.jsxs)("a",{className:"mt-2 inline-block text-xs font-medium text-primary underline",href:`/security/${e.sendTo.slug}/`,children:["Open ",e.sendTo.label]})]},e.title)),eS&&!eW&&(0,n.jsxs)("div",{className:"space-y-3 rounded-lg border border-primary/40 p-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"text-sm font-semibold",children:"Checksum"}),(0,n.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["The last ",4," bytes of a Base58Check string are SHA-256 run twice over everything before them. That is what catches a mistyped address, and it is the whole reason this encoding exists."]})]}),eT&&!eT.ok?(0,n.jsx)("p",{className:"rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive",children:eT.reason}):eu?eu.available?eu.applicable?eu.ok?(0,n.jsxs)("div",{className:"rounded-md border border-emerald-500/40 bg-emerald-500/5 p-3 text-sm",children:[(0,n.jsx)("p",{className:"font-semibold text-emerald-700 dark:text-emerald-400",children:"The checksum passes. No character is mistyped."}),(0,n.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"That is the only thing it proves. It c
1annot tell you the address exists, holds anything, or belongs to who you think, and this page cannot look anything up to find out. Address poisoning works by sending you a perfectly valid address that simply is not the one you meant, so check the characters against the source you trust as well."})]}):(0,n.jsxs)("div",{className:"rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm",children:[(0,n.jsx)("p",{className:"font-semibold text-destructive",children:"The checksum does not match, so something in this string is wrong."}),ef&&(0,n.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Looking for the character that broke it."})]}):(0,n.jsxs)("p",{className:"rounded-md border p-3 text-sm",children:[eu.reason," The length and the characters are all this page can confirm, so read the kinds below rather than looking for a green tick that does not exist for this format."]}):(0,n.jsxs)("p",{className:"rounded-md border border-yellow-500/50 bg-yellow-500/10 p-3 text-sm",children:[eu.reason," It has NOT passed and it has NOT failed, because it never ran."]}):(0,n.jsx)("p",{className:"text-sm text-muted-foreground",children:"Reading it now."}),ep?.ran&&(0,n.jsxs)("div",{className:"space-y-2",children:[eG?(0,n.jsxs)("div",{className:"rounded-md border border-emerald-500/40 bg-emerald-500/5 p-3",children:[(0,n.jsx)("p",{className:"text-sm font-semibold",children:"transposition"===eG.kind?`Positions ${eG.position} and ${eG.position+1} are the wrong way round. They read ${eG.from} and should read ${eG.to}.`:`Position ${eG.position} reads ${eG.from}. It should be ${eG.to}.`}),(0,n.jsxs)("p",{className:"mt-1 break-all font-mono text-xs",children:[eG.text.slice(0,eG.position-1),(0,n.jsx)("span",{className:"rounded bg-emerald-500/30 px-0.5 font-bold",children:eG.text.slice(eG.position-1,eG.position+ +("transposition"===eG.kind))}),eG.text.slice(eG.position+ +("transposition"===eG.kind))]}),(0,n.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["That correction makes the checksum pass. With ",4," check bytes it is the only single change out of"," ",ep.candidates.toLocaleString()," tried that does, so it is almost certainly what you meant. Compare it with your source before you use it."]}),(0,n.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2",children:[(0,n.jsx)(r.$,{type:"button",size:"sm",onClick:()=>eV(eG.text),children:"Use the corrected string"}),(0,n.jsx)(d.i,{value:eG.text,describe:"the corrected string"})]})]}):ep.found.length>1?(0,n.jsxs)("div",{className:"rounded-md border p-3",children:[(0,n.jsxs)("p",{className:"text-sm font-semibold",children:[ep.found.length," different single changes make the checksum pass, so this one is genuinely ambiguous."]}),(0,n.jsx)("ul",{className:"mt-1 space-y-1 text-xs text-muted-foreground",children:ep.found.slice(0,6).map(e=>(0,n.jsxs)("li",{className:"font-mono",children:["position ",e.position,": ",e.from," to ",e.to]},`${e.position}-${e.to}`))})]}):(0,n.jsx)("p",{className:"rounded-md border p-3 text-sm",children:"No single-character fix was found, so this needs two or more corrections or it is not a Base58Check string at all."}),(0,n.jsxs)("div",{className:"rounded-md border bg-muted/40 p-3 text-xs text-muted-foreground",children:[(0,n.jsxs)("p",{children:["Searched ",ep.candidates.toLocaleString()," candidates across"," ",ep.positionsSearched.toLocaleString()," of"," ",ep.positionsTotal.toLocaleString()," positions:"," ",ep.searched.join(", "),".",ep.skipped>0?` ${ep.skipped.toLocaleString()} candidates were skipped because the string is long, so this answer may be incomplete.`:""]}),(0,n.jsxs)("p",{className:"mt-1",children:["NOT searched: ",ep.notSearched.join(", "),". A missing or extra character shifts everything after it, and that search is no longer small enough to trust."]})]})]}),ep&&!ep.ran&&ep.reason&&(0,n.jsx)("p",{className:"rounded-md border bg-muted/40 p-3 text-xs text-muted-foreground",children:ep.reason}),eu?.available&&eu.body.length>0&&(0,n.jsx)("div",{className:"overflow-x-auto rounded-md border bg-muted/30 p-3",children:(0,n.jsx)("table",{className:"w-full text-left text-xs",children:(0,n.jsxs)("tbody",{className:"font-mono",children:[(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"pr-3 text-muted-foreground",children:"version"}),(0,n.jsx)("td",{className:"break-all",children:(0,c.nj)(eu.body.subarray(0,eL?eL.version.length:1)," ")}
1)]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"pr-3 align-top text-muted-foreground",children:"payload"}),(0,n.jsx)("td",{className:"break-all",children:(0,c.nj)(eu.body.subarray(eL?eL.version.length:1)," ")})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"pr-3 text-muted-foreground",children:"checksum in the string"}),(0,n.jsx)("td",{className:(0,D.cn)("break-all",!eu.ok&&"text-destructive"),children:(0,c.nj)(eu.found," ")})]}),(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"pr-3 text-muted-foreground",children:"checksum it should be"}),(0,n.jsx)("td",{className:(0,D.cn)("break-all",!eu.ok&&"text-emerald-700 dark:text-emerald-400"),children:(0,c.nj)(eu.expected," ")})]})]})})})]}),eJ.map(e=>(0,n.jsxs)("div",{className:(0,D.cn)("rounded-lg border p-4 text-sm","warn"===e.tone?"border-yellow-500/50 bg-yellow-500/10":"border-border bg-muted/40"),children:[(0,n.jsx)("h2",{className:"text-sm font-semibold",children:e.title}),(0,n.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:e.detail})]},e.title)),eB.length>0&&(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsxs)(o.J,{htmlFor:"b58-bytes",children:["The bytes (",K(eB.length,"byte"),")"]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(d.i,{value:(0,c.nj)(eB),describe:"the hex"}),(0,n.jsx)(r.$,{type:"button",variant:"outline",size:"sm",onClick:()=>eX("decoded.txt",(0,c.nj)(eB),"text/plain"),children:"Download"})]})]}),(0,n.jsx)(i.T,{id:"b58-bytes",readOnly:!0,rows:2,value:(0,c.nj)(eB," "),className:"break-all font-mono text-xs"}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("p",{className:"mb-1 text-xs text-muted-foreground",children:["Read as text",eF>0?`, though ${K(eF,"byte")} here have no text form, so this is mostly noise`:""]}),(0,n.jsx)(i.T,{readOnly:!0,rows:2,value:eD,className:"break-all font-mono text-xs"})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("p",{className:"mb-1 text-xs text-muted-foreground",children:["Byte dump",eB.length>512?`, first ${512..toLocaleString()} bytes, ${(eB.length-512).toLocaleString()} not shown`:""]}),(0,n.jsx)("pre",{className:"overflow-x-auto rounded-md border bg-muted/30 p-3 font-mono text-[11px] leading-relaxed",children:eO})]}),eT&&eT.whitespaceRemoved>0&&(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:[K(eT.whitespaceRemoved,"space or line break","spaces and line breaks")," ","came out before decoding, so the positions above count the tidied string."]})]})]}):(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsxs)(o.J,{htmlFor:"b58-enc",children:["Base58 (",eq.label,")"]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(d.i,{value:eP,describe:"the Base58"}),(0,n.jsx)(r.$,{type:"button",variant:"outline",size:"sm",disabled:!eP,onClick:()=>eX("encoded.txt",eP,"text/plain"),children:"Download"})]})]}),(0,n.jsx)(i.T,{id:"b58-enc",readOnly:!0,rows:3,value:eP,className:"break-all font-mono text-sm"}),eE.length>0&&(0,n.jsxs)("div",{className:"space-y-2 rounded-lg border border-primary/40 p-4",children:[(0,n.jsx)("h2",{className:"text-sm font-semibold",children:"The same bytes in both orderings"}),(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:"Same input, two completely different strings. This is why a decoder that assumes one ordering hands you nonsense from the other, with no error to warn you."}),eE.map(({a:e,text:t})=>(0,n.jsxs)("div",{className:"rounded-md border bg-muted/30 p-2",children:[(0,n.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[(0,n.jsx)("span",{className:"text-xs font-semibold",children:e.label}),(0,n.jsx)("span",{className:"text-xs text-muted-foreground",children:K(t.length,"character")})]}),(0,n.jsx)("p",{className:"mt-1 break-all font-mono text-xs",children:t.length>128?`${t.slice(0,128)}...`:t})]},e.id))]}),eM.bytes.length>0&&(0,n.jsxs)("div",{className:"flex flex-wrap gap-x-6 gap-y-1 rounded-lg border bg-muted/40 p-3 text-xs text-muted-foreground",children:[(0,n.jsxs)("span",{children:["Payload"," ",(0,n.jsx)("span",{className:"font-mono text-foreground",children:K(eM.bytes.length,"byte")})]}),(0,n.jsxs)("span",{children:["Base58 ",(0,n.jsx)("span",{className:"font-mono text-foreground",children:eP.length.toLocaleStr
1ing()})," ","characters"]}),(0,n.jsxs)("span",{children:["Base64"," ",(0,n.jsx)("span",{className:"font-mono text-foreground",children:Math.ceil(4*eM.bytes.length/3).toLocaleString()})," ","characters"]}),(0,n.jsxs)("span",{children:["Base58 averages ",b.toFixed(3)," characters per byte, and it is an average rather than a rule, so the same byte count can come out at two different lengths."]})]})]})]}),ec.length>0&&(0,n.jsxs)("div",{className:"space-y-2 rounded-lg border p-4",children:[(0,n.jsx)("h2",{className:"text-sm font-semibold",children:"What the first character tells you"}),(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:"Every row here was produced by encoding a real, correctly checksummed sample rather than copied from a table, which is why the lengths are ranges where a range is the truth. A version 0x00 address is not always 34 characters: leading zero bytes in the hash turn into leading 1s and shorten it."}),(0,n.jsx)("div",{className:"overflow-x-auto",children:(0,n.jsxs)("table",{className:"w-full min-w-[34rem] text-left text-xs",children:[(0,n.jsx)("thead",{className:"text-muted-foreground",children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("th",{className:"py-1 pr-3 font-medium",children:"Starts with"}),(0,n.jsx)("th",{className:"py-1 pr-3 font-medium",children:"Version"}),(0,n.jsx)("th",{className:"py-1 pr-3 font-medium",children:"Length"}),(0,n.jsx)("th",{className:"py-1 font-medium",children:"What it is"})]})}),(0,n.jsx)("tbody",{children:ec.map(e=>(0,n.jsxs)("tr",{className:(0,D.cn)("border-t",eL?.key===e.key&&"bg-primary/10 font-medium"),children:[(0,n.jsx)("td",{className:"py-1 pr-3 font-mono",children:e.prefix||[...e.firstChars].join(" or ")}),(0,n.jsx)("td",{className:"py-1 pr-3 font-mono",children:e.version.map(e=>e.toString(16).padStart(2,"0")).join("")}),(0,n.jsx)("td",{className:"py-1 pr-3 font-mono",children:e.minLength===e.maxLength?e.minLength:`${e.minLength} to ${e.maxLength}`}),(0,n.jsx)("td",{className:"py-1",children:e.label})]},e.key))})]})}),(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:["The two private key rows share version ",`0x${"80".padStart(2,"0")}`," and differ by a single 0x01 byte on the END of the payload, not by their version byte. That one byte is the whole reason some private keys start with 5 and others start with K or L."]})]}),(0,n.jsxs)("div",{className:"rounded-lg border p-4",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("h2",{className:"text-sm font-semibold",children:"Remember what I checked"}),(0,n.jsx)(r.$,{type:"button",variant:eb?"default":"outline",size:"sm",onClick:()=>ey(e=>!e),children:eb?"On":"Off"})]}),(0,n.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:"Off by default, on purpose. People paste wallet material into this box, and a list on your own machine is still a list. Switched on it keeps the verdict only, never the string: what kind it was, how many bytes, and whether the checksum passed."}),eb&&ew.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("ul",{className:"mt-2 space-y-1 text-xs text-muted-foreground",children:ew.map((e,t)=>(0,n.jsxs)("li",{className:"font-mono",children:[e.ok?"pass":"FAIL"," \xb7 ",e.k," \xb7 ",e.b," bytes \xb7 ",function(e){let t=Math.max(0,Math.round((Date.now()-e)/1e3));return t<60?"just now":t<3600?`${Math.round(t/60)} min ago`:t<86400?`${Math.round(t/3600)} h ago`:`${Math.round(t/86400)} d ago`}(e.t)]},`${e.t}-${t}`))}),(0,n.jsx)(r.$,{type:"button",variant:"ghost",size:"sm",className:"mt-2",onClick:()=>{ev([]),ek.current="";try{window.localStorage.removeItem(J)}catch{}},children:"Clear the list"})]})]}),(0,n.jsx)(l.ToolActions,{getParams:eK,title:"Base58 Encode / Decode"}),(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:"Everything here runs on this page. Nothing you paste or drop is uploaded, and the share link carries only your alphabet and mode, never the string. Worth saying plainly though: Base58 is an encoding, not encryption. Anyone holding the string holds the data, so a private key pasted into any tool, this one included, is best treated as exposed."}),(0,n.jsxs)("p",{className:"text-xs text-muted-foreground",children:["No Base58 ordering contains ",x.split("").join(", "),", which is exactly ",x.length," ","characters out of the ",u+x.length," you could write, left out so a person copying by eye cannot confuse them. Type one of them here and this page treats it as a clue rather than an error."]})]})}}}]);

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.