input_amount : TWO^32 |- S (Conf TWO^256, Conf TWO^64) */
| 241 | |
| 242 | /* input_amount : TWO^32 |- S (Conf TWO^256, Conf TWO^64) */ |
| 243 | bool simplicity_input_amount(frameItem* dst, frameItem src, const txEnv* env) { |
| 244 | uint_fast32_t i = simplicity_read32(&src); |
| 245 | if (writeBit(dst, i < env->tx->numInputs)) { |
| 246 | asset(dst, &env->tx->input[i].txo.asset); |
| 247 | amt(dst, &env->tx->input[i].txo.amt); |
| 248 | } else { |
| 249 | skipBits(dst, 516); |
| 250 | } |
| 251 | return true; |
| 252 | } |
| 253 | |
| 254 | /* input_script_hash : TWO^32 |- S TWO^256 */ |
| 255 | bool simplicity_input_script_hash(frameItem* dst, frameItem src, const txEnv* env) { |