cyclops
cyclops

Reputation: 118

Trying to get LogicSigAccount from algodClient.compile(sig)

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()))

Upvotes: 3

Views: 44

Answers (1)

shallowporcupine
shallowporcupine

Reputation: 200

Try something like this:

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

Upvotes: 3

Related Questions