Trying to get LogicSigAccount from algodClient.compile(sig)

46 Views Asked by At

Using the JavaScript SDK for Algorand.

Does anyone know how to go from algodClient.compile(sig) to a LogicSigAccount?

I can do it using the Python SDK, but I can't seem to translate it to JS. Here's the python in case that's useful: lsig = LogicSigAccount(base64.decodebytes(response["result"].encode()))

1

There are 1 best solutions below

0
On BEST ANSWER

Try something like this:

const lsig = new algosdk.LogicSigAccount(
        new Uint8Array(Buffer.from(compiledSig.result, "base64"))
      );