Function signTransaction

  • signTransaction takes an object with either payment or key registration fields and a secret key and returns a signed blob.

    Payment transaction fields: from, to, amount, fee, firstValid, lastValid, genesisHash, note(optional), GenesisID(optional), closeRemainderTo(optional)

    Key registration fields: fee, firstValid, lastValid, voteKey, selectionKey, voteFirst, voteLast, voteKeyDilution, genesisHash, note(optional), GenesisID(optional)

    If flatFee is not set and the final calculated fee is lower than the protocol minimum fee, the fee will be increased to match the minimum.

    Parameters

    • txn: Transaction

      object with either payment or key registration fields

    • sk: Uint8Array

      Algorand Secret Key

    Returns {
        blob: Uint8Array;
        txID: string;
    }

    object contains the binary signed transaction and its txID

    • blob: Uint8Array
    • txID: string

Generated using TypeDoc