Changed i -> index in Transaction.prototype.sign