Creating policy script key from existing CLI keyHash and slot

Hi HeptaSean,

Hope you are doing well. If I remember correctly, you are the one who once helped me with a similar issue before.

To answer your questions:-

  1. I don’t actually wanna set an expiriy date, I just don’t know whether it’s possible to generate a policy ID without an expiry slot. I am planning to use this policy ID and script for minting NFTs and I am actually ok if the policy ID gets locked after a certain slot.

  2. Previously I have generated a policy.skey and policy.vkey and then generated the keyHash with the following command

cardano-cli address key-hash --payment-verification-key-file policy.vkey

Then I created a policy.script with the keyHash (sample given in the question) and ran the following command to generate a policy ID.

cardano-cli transaction policyid --script-file policy.script > policyID

Now, I am trying to develop a multi-sig minting app with cardano-serialization-lib which will use my CLI generated policy ID to sign the transaction. However, cardano-serialization-lib requires a policyID and policyScript to build and sign a transaction. So I followed your instruction here to generate the policyScript.

It all went right, but when I submitted the transaction, I was getting the error I mentioned in the question. I can show you the code of my frontend and backend service if you want to.

Regards