Given a the 'kind' of a Simplicity type, return the SHA-256 hash of its associated TMR tag. * This is the "initial value" for computing the type Merkle root for that type. */
| 9 | * This is the "initial value" for computing the type Merkle root for that type. |
| 10 | */ |
| 11 | static sha256_midstate tmrIV(typeName kind) { |
| 12 | switch (kind) { |
| 13 | case ONE: return unitIV; |
| 14 | case SUM: return sumIV; |
| 15 | case PRODUCT: return prodIV; |
| 16 | } |
| 17 | /* Impossible to reach here (unless you call with uninitialized values). */ |
| 18 | SIMPLICITY_UNREACHABLE; |
| 19 | } |
| 20 | |
| 21 | /* Given a well-formed 'type_dag', compute the bitSizes, skips, and type Merkle roots of all subexpressions. |
| 22 | * For all 'i', 0 <= 'i' < 'len', |
no outgoing calls
no test coverage detected