input_pegin : TWO^32 |- S (S TWO^256) */
| 204 | |
| 205 | /* input_pegin : TWO^32 |- S (S TWO^256) */ |
| 206 | bool simplicity_input_pegin(frameItem* dst, frameItem src, const txEnv* env) { |
| 207 | uint_fast32_t i = simplicity_read32(&src); |
| 208 | if (writeBit(dst, i < env->tx->numInputs)) { |
| 209 | if (writeBit(dst, env->tx->input[i].isPegin)) { |
| 210 | writeHash(dst, &env->tx->input[i].pegin); |
| 211 | } else { |
| 212 | skipBits(dst, 256); |
| 213 | } |
| 214 | } else { |
| 215 | skipBits(dst, 257); |
| 216 | } |
| 217 | return true; |
| 218 | } |
| 219 | |
| 220 | /* input_prev_outpoint : TWO^32 |- S (TWO^256 * TWO^32) */ |
| 221 | bool simplicity_input_prev_outpoint(frameItem* dst, frameItem src, const txEnv* env) { |