The Miniscript class doesn't seem to derive pubkeys when compiling to bytes:
from io import BytesIO
from embit.descriptor.miniscript import Miniscript
desc_str = "pk(tpubD6NzVbkrYhZ4XgHkCEtfpuZPJDLaLPxu5ZBEtAbub9GcUX1mTS2t3eCnBYbsr3Ya2KGVfoWGNfa65rNS8fx3ssuwAwitJiFN4WPwEUTnqsy/0/3)"
s = BytesIO(desc_str.encode())
desc = Miniscript.read_from(s, taproot=True)
print(desc.compile().hex())
This prints
20f689e19cb157cc096342294b02485cc5d9723a849a36c68a7553fe90020bb53cac
where f689e19cb157cc096342294b02485cc5d9723a849a36c68a7553fe90020bb53c is the pubkey of tpubD6NzVbkrYhZ4XgHkCEtfpuZPJDLaLPxu5ZBEtAbub9GcUX1mTS2t3eCnBYbsr3Ya2KGVfoWGNfa65rNS8fx3ssuwAwitJiFN4WPwEUTnqsy; the correct derived pubkey is c600d12b3e8cd23fbb2318ceca0f5d7f59c28e7b4227c06a04673f4c3d0ec1c6.
For context, I was using that instead of Descriptor because I was trying to compile a single taproot leaf.
The
Miniscriptclass doesn't seem to derive pubkeys when compiling to bytes:This prints
where
f689e19cb157cc096342294b02485cc5d9723a849a36c68a7553fe90020bb53cis the pubkey oftpubD6NzVbkrYhZ4XgHkCEtfpuZPJDLaLPxu5ZBEtAbub9GcUX1mTS2t3eCnBYbsr3Ya2KGVfoWGNfa65rNS8fx3ssuwAwitJiFN4WPwEUTnqsy; the correct derived pubkey isc600d12b3e8cd23fbb2318ceca0f5d7f59c28e7b4227c06a04673f4c3d0ec1c6.For context, I was using that instead of
Descriptorbecause I was trying to compile a single taproot leaf.