Decode a Bitcoin specific jet from 'stream' into 'node'. * All jets begin with a bit prefix of '1' which needs to have already been consumed from the 'stream'. * Returns 'SIMPLICITY_ERR_DATA_OUT_OF_RANGE' if the stream's prefix doesn't match any valid code for a jet. * Returns 'SIMPLICITY_ERR_BITSTRING_EOF' if not enough bits are available in the 'stream'. * In the above error cases, 'dag' may
| 99 | * NULL != stream |
| 100 | */ |
| 101 | simplicity_err simplicity_bitcoin_decodeJet(dag_node* node, bitstream* stream) { |
| 102 | jetName name; |
| 103 | simplicity_err error = decodePrimitive(&name, stream); |
| 104 | if (!IS_OK(error)) return error; |
| 105 | *node = jetNode(name); |
| 106 | return SIMPLICITY_NO_ERROR; |
| 107 | } |
nothing calls this directly
no test coverage detected