src/multisig.js
/**
     * partialSignTxn partially signs this transaction and returns a partially-signed multisig transaction,
     * encoded with msgpack as a typed array.
     * @param version multisig version
     * @param threshold multisig threshold
     * @param pks multisig public key list, order is important.
     * @param sk an Algorand secret key to sign with.
     * @returns an encoded, partially signed multisig transaction.
     */
partialSignTxn partially signs this transaction and returns a partially-signed multisig transaction,
encoded with msgpack as a typed array.
@param version multisig version
@param threshold multisig threshold
@param pks multisig public key list, order is important.
@param sk an Algorand secret key to sign with.
@returns an encoded, partially signed multisig transaction.
partialSignTxn partially signs this transaction and returns a partially - signed multisig transaction encoded with msgpack as a typed array . @param version multisig version @param threshold multisig threshold @param pks multisig public key list order is important . @param sk an Algorand secret key to sign with . @returns an encoded partially signed multisig transaction .
partialSignTxn({version, threshold, pks}, sk) {
        if (!this.hasOwnProperty("objForEncoding")) {
            let expectedFromRaw = address.fromMultisigPreImg({version, threshold, pks});
            if (address.encodeAddress(this.from.publicKey) !== address.encodeAddress(expectedFromRaw)) {
                throw ERROR_MULTISIG_BAD_FROM_FIELD;
            }
        }
        let myPk = nacl.keyPairFromSecretKey(sk).publicKey;
        return createMultisigTransaction(
            this.get_obj_for_encoding(),
            {"rawSig": this.rawSignTxn(sk), myPk},
            {version, threshold, pks},
        );
    }
partialSignTxn ( { version , threshold , pks } , sk ) { if ( ! this . hasOwnProperty ( "objForEncoding" ) ) { let expectedFromRaw = address . fromMultisigPreImg ( { version , threshold , pks } ) ; if ( address . encodeAddress ( this . from . publicKey ) !== address . encodeAddress ( expectedFromRaw ) ) { throw ERROR_MULTISIG_BAD_FROM_FIELD ; } } let myPk = nacl . keyPairFromSecretKey ( sk ) . publicKey ; return createMultisigTransaction ( this . get_obj_for_encoding ( ) , { "rawSig" : this . rawSignTxn ( sk ) , myPk } , { version , threshold , pks } , ) ; }
partialSignTxn partially signs this transaction and returns a partially-signed multisig transaction,
 encoded with msgpack as a typed array.
partialSignTxn partially signs this transaction and returns a partially - signed multisig transaction encoded with msgpack as a typed array .
// verify one more time that the from field is correct // get signature verifier