public function store(array $statements, array $attachments, StoreOptions $opts)
{
$scopes = $opts->getOpt('scopes');
if (!(in_array('all', $scopes) || in_array('statements/write', $scopes))) {
throw new Exceptions\Exception('Unauthorized request.', 401);
}
$id_statements = $this->constructValidStatements($statements, $opts);
$ids = array_keys($id_statements);
$statements = array_values($id_statements);
$this->inserter->insert($statements, $opts);
$this->linker->updateReferences($statements, $opts);
$this->voider->voidStatements($statements, $opts);
$this->attacher->store($attachments, $this->hashes, $opts);
$this->activateStatements($ids, $opts);
return $ids;
}