Thanks, Fabrice. It seems that the msgpack conversion software I was using wasn’t working for the reasons you mentioned. I don’t know about “msgpacktool” – is that part of goal? I looked in the Ubuntu 20.04 repo and didn’t find it.
In any case, I now have my script rewritten using the Python SDK and it works. I am able to generate a transaction, take it offline to sign, and send it (at least on testnet – I assume it will work on mainnet but I haven’t tested it yet).
However, I now have a bit of a problem with the Python SDK. I am able to do everything with Purestake but I would like to make my offline signing script available as GPL software on GitHub, and to do that it would be much better if I could use the Algoexplorer API because it doesn’t require registration or a token.
The problem is this: the Python SDK won’t let me use the Algoexplorer API because Algoexplorer doesn’t require a token, but the SDK class for making GET and POST requests requires you to enter a token. The class is “AlgodClient(algod_token, algod_address, headers=None)” and the “algod_token” is a required positional parameter – if omitted it gives an error. If you set the variable to “None” it gives you a type error:
TypeError: expected string or bytes-like object
If you try to just put some value into it like “A” to make it happy the server returns a 404 Forbidden errror.
So AlgodClient will let me use the API of Purestake because that requires a token, but it appears that it doesn’t allow you to use Algoexplorer API, which seems pretty odd.
Do I need to modify the class myself? I considered doing it but that doesn’t seem like a very reasonable solution and I am only a beginner with Python anyway.
Thanks very much for your help!