Financial Contracts With Marlowe Pub KeyHash Question


I’ve been looking to integrate smart contracts into my app and I came across this passage on the Marlowe site:

A Party is represented as either a public key hash or a role name.

data Party = PK PubKeyHash | Role TokenName

“In order to progress a Marlowe contract, a party must provide an evidence. ***For PK party that would be a valid signature of a transaction signed by a private key of a public key that hashes to party’s PubKeyHash, similarly to Bitcoin’s Pay to Public Key Hash mechanism.***For a Role party the evidence is spending a role token within the same transaction, usually to the same owner.”


So to clarify, I need to get the wallet’s public key and then turn that into a Pub KeyHash through sha-2 and then RIPEMD-160? Then I can use that in the Marlowe contracts?strong text


Actually, the key’s address includes a Bech32-encoded representation of the public key hash. See “Miscellaneous” in CIP-5. The cardano-address address inspect command extracts the public key hash, calling it spending_key_hash.

1 Like

You’re amazing, thanks a lot I’ll try this out!