output_nonce : TWO^32 |- S (S (Conf TWO^256)) */
| 401 | |
| 402 | /* output_nonce : TWO^32 |- S (S (Conf TWO^256)) */ |
| 403 | bool simplicity_output_nonce(frameItem* dst, frameItem src, const txEnv* env) { |
| 404 | uint_fast32_t i = simplicity_read32(&src); |
| 405 | if (writeBit(dst, i < env->tx->numOutputs)) { |
| 406 | nonce(dst, &env->tx->output[i].nonce); |
| 407 | } else { |
| 408 | skipBits(dst, 259); |
| 409 | } |
| 410 | return true; |
| 411 | } |
| 412 | |
| 413 | /* output_script_hash : TWO^32 |- S TWO^256 */ |
| 414 | bool simplicity_output_script_hash(frameItem* dst, frameItem src, const txEnv* env) { |