Goal clerk sign --logic-sig

What does "goal clerk compile --logic-sig " requires as argument? It requires a filename all right, but NOT fname.teal.tok.

fname.teal.tok: decode failed, msgp: attempted to decode type "int" with method for "array"

I don’t think --logic-sig is a valid argument for goal clerk compile.
What exact command did you type?
What were you trying to achieve?

Sorry, correction: goal clerk sign --logic-sig fname

I am trying to use fname.teal.tok, not the ususal “-p fname.teal” solution, because after
‘algodclient.compile(data).do();’ (JS) only the compiled TEAL format is available – in b64 coding.

ANd yes, I know, how to sign a txn from the API, my question is, can I use the compiled TEAL
program somehow in the command line command “goal clerk sign”?

It looks like the best solution might be to decompile the TEAL script goal clerk compile -D test.teal.tok > test.teal and then use goal clerk sign --program test.teal.

Hi, I am getting this same error:

authfile.lsig: decode failed, msgp: attempted to decode type “int” with method for “array”

I have written a signed LogicSigAccount program bytes into a file (my_lsig.lsig.logic). I want to use the file as an Lsig in a goal transaction. Where have I gone wrong? I would also like to be able to read this file into the SDK and use it as the lsig in a LogicSigTransaction (without having to compile, sign it again).

If anyone could help it would be greatly appreciated.

Thanks

With command line tools like goal, use Fabrice’s solution.
With SDK’s you can use the compiled code. E.g. in GitHub - AlgoRealm/algorealm: Claim the 👑 Crown and the đŸȘ„ Sceptre of Algorand Realm the Python program https://github.com/cusma/algorealm/blob/main/algorealm.py uses ALGOREALM_LAW and ALGOREALM_LAW_LSIG programatically.

1 Like