I want to lock a UTXO for 90 days.

My Binary is:


And my sequence is: 533B40

When I decode the witness script with bitcoin-cli decodescript I can see 4209491. Where 4209491 comes from?


It's seems that the 533B40 convert into little endian and the convert into base 10

printf 533B40 | tac -rs .. 

Then convert in base 2

echo "ibase=16; obase=2; 403B53" | bc

And then in base10

echo "ibase=2;10000000011101101010011" | bc

why decodescript has this behaviour?


decodescript has this behavior because integers in Bitcoin are little endian. So decodescript is telling you what number the script interpreter would use when it processes your script.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.