pub fn output_null_datum(
a: u32,
b: u32,
) -> Option<Option<Either<(u2, u256), Either<u1, u4>>>>
Expand description
Return the b
-th entry of a null data (OP_RETURN
) output at index a
.
- Return
Some(Some(Right(Right(x-1))))
if the entry isOP_x
forx
in the range 1..=16. - Return
Some(Some(Right(Left(0))))
if the entry isOP_1NEGATE
. - Return
Some(Some(Right(Left(1))))
if the entry isOP_RESERVED
. - Return
Some(Some(Left((x, hash))))
if the entry is pushed data.hash
is the SHA256 hash of the data pushed andx
indicates how the data was pushed:x == 0
means the push was an immediate 0 to 75 bytes.x == 1
means the push was anOP_PUSHDATA1
.x == 2
means the push was anOP_PUSHDATA2
.x == 3
means the push was anOP_PUSHDATA4
.
- Return
Some(None)
if the null data has fewer thanb
entries. - Return
None
if the output is not a null data output.
Use this jet to read peg-out data from an output.
ยงCost
87 mWU (milli weight units)