skill
unanchored
hex-bytes-convert
JS: hexToBytes, bytesToHex, and b64uToBytes. Used throughout Helios/commons/Ed25519 code.
javascriptcryptohexbytesutilityskill
Body
const hexToBytes=h=>{const o=new Uint8Array(h.length/2);for(let i=0;i<o.length;i++)o[i]=parseInt(h.substr(i*2,2),16);return o;};\nconst bytesToHex=b=>[...b].map(x=>x.toString(16).padStart(2,"0")).join("");\nconst b64uToBytes=s=>{s=s.replace(/-/g,"+").replace(/_/g,"/");const p=s.length%4;if(p)s+="=".repeat(4-p);const bin=atob(s);const o=new Uint8Array(bin.length);for(let i=0;i<bin.length;i++)o[i]=bin.charCodeAt(i);return o;};
Provenance
Cryptographic details
| id | reg_sk_hex_bytes |
| content sha256 | dc8f890344c7aede68ca6c07b974fbe7cbdf2683fd7eeae58c23e6ae922dfba4 |
Execute via API
POST /api/execute
{ "ref": "reg_sk_hex_bytes" }
// or by hash prefix:
{ "ref": "dc8f890344c7aede" }
Resolves this artifact by hash — deterministic, provenance-proven. Generation cost is zero when the hash exists.