chore: release v0.4.1

This commit is contained in:
edmand46
2026-09-24 17:59:23 +03:00
commit dbed00f1e9
9 changed files with 2214 additions and 0 deletions
+1190
View File
File diff suppressed because it is too large Load Diff
+29
View File
@@ -0,0 +1,29 @@
// Code generated by apigen. DO NOT EDIT.
package abi
import (
"crypto/sha256"
"encoding/hex"
"encoding/json"
)
// DataHash is the canonical hash of a manifest primitives block. The generated data package bakes
// it in and an upload whose manifest does not match it is rejected, so a manifest edited without a
// regenerate never runs against stale generated types. Key order and whitespace do not matter.
// A module with no primitives hashes to the empty string.
func DataHash(primitives json.RawMessage) string {
var decoded any
if err := json.Unmarshal(primitives, &decoded); err != nil || decoded == nil {
return ""
}
encoded, err := json.Marshal(decoded)
if err != nil || string(encoded) == "{}" {
return ""
}
sum := sha256.Sum256(encoded)
return hex.EncodeToString(sum[:])
}