skill
unanchored
helios-merkle-leaf-hash
JS: compute Helios merkle leaf hash: sha256(prev:idx:content:stampId). Matches server appendChain().
javascriptheliosmerklecryptoverificationskill
Body
async function sha256(s){const b=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(s));return[...new Uint8Array(b)].map(x=>x.toString(16).padStart(2,"0")).join("");}\nasync function merkleLeaf(prev,idx,ch,sid){return sha256(`${prev}:${idx}:${ch}:${sid}`);}
Provenance
Cryptographic details
| id | reg_sk_merkle_leaf |
| content sha256 | f8c1bc6de7b660367a125587b5dbf24e47c15d327f35f3713f76a2abade384d7 |
Execute via API
POST /api/execute
{ "ref": "reg_sk_merkle_leaf" }
// or by hash prefix:
{ "ref": "f8c1bc6de7b66036" }
Resolves this artifact by hash — deterministic, provenance-proven. Generation cost is zero when the hash exists.