Skip to content

Verification and Signing Keys Bug #184

Closed
@bluekapo

Description

@bluekapo

Greetings!

I'm trying to sign a transaction with keys I got from an HDWallet. I need to sign it with stake and spend (payment) keys. So I get vkeys like (wallet is HDWallet object):
Stake:

hdwallet_stake = wallet.derive_from_path("m/1852'/1815'/0'/2/0")
stake_public_key = hdwallet_stake.public_key
stake_vk = StakeVerificationKey.from_primitive(stake_public_key)

Spend:

hdwallet_spend = wallet.derive_from_path("m/1852'/1815'/0'/0/0")
spend_public_key = hdwallet_spend.public_key
spend_vk = PaymentVerificationKey.from_primitive(spend_public_key)

The vkeys I got above are exactly the ones I need (their hashes are the same hashes that can be found in the RequiredSigners of a transaction)

After that I get signing keys:
spend_sk = SigningKey.from_primitive(spend_public_key)
stake_sk = SigningKey.from_primitive(stake_public_key)

Signing transaction with this set of keys results in InvalidWitnessUTXOW error on submit.

I tried to get back vkeys from skeys to compare it:

spend_vk_2 = PaymentVerificationKey.from_signing_key(spend_sk)
stake_vk_2 = StakeVerificationKey.from_signing_key(stake_sk)

spend_vk and spend_vk_2 as well as stake_vk and stake_vk_2 hashes are completely different.

I've tried to change Signing key to extended version or to StakeSigningKey/PaymentSigningKey and to me it didn't make any changes.

I would also like to get in touch with Jerry, if it's possible, to ask a few questions about cardano and this library as well as kindly ask for a helping hand with one of my projects.

I can give all the needed information.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions