How to use the algosdk.makeLogicSig function in algosdk

To help you get started, we’ve selected a few algosdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PureStake / api-examples / javascript-examples / logicSig.js View on Github external
(async () => {
    //Get the relevant params from the algod
    let params = await algodclient.getTransactionParams().do();

    // move the TEAL  program into Uint8Array
    let program = new Uint8Array(Buffer.from("ASABASI=", "base64"));
    let lsig = algosdk.makeLogicSig(program);
    lsig.sign(recoveredAccount.sk);


    //create a transaction
    let txn = {
        "from": recoveredAccount.addr,
        "to": "SOEI4UA72A7ZL5P25GNISSVWW724YABSGZ7GHW5ERV4QKK2XSXLXGXPG5Y",
        "fee": params.fee,
        "amount": 100000,
        "firstRound": params.firstRound,
        "lastRound": params.lastRound,
        "genesisID": params.genesisID,
        "genesisHash": params.genesisHash,
    };