
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
prefetched.json) for future and boosts the retrieval performancenpm i optimade --save
yarn add optimade
CDN: UNPKG |
jsDelivr (available as
window.optimade)
If you are not using ES6 or CDN, add to your HTML just before closing the
body tag:
<script src="/path/to/optimade/dist/index.js"></script>
<!-- OR -->
<script type="module" src="/path/to/optimade/dist/index.mjs"></script>
The code is generally isomorphic, however one should additionally take care of
downloading the cache or setting the CORS policy for the browsers. Concerning
the CORS, the Optimade class constructor accepts the corsProxyUrl parameter,
pointing to a running cors-anywhere proxy instance. This will be valid
until all the Optimade providers are supplying the header
Access-Control-Allow-Origin $http_origin in their responses. For the
server-side environment this is not required.
const optimadeClient = new Optimade({
providersUrl: "https://providers.optimade.org/providers.json",
});
console.log(optimadeClient.providers); // { [id: string]: Provider }[]
const providersMap = await optimadeClient.getProviders(); // { [id: string]: Provider }[]
const providerIds = Object.keys(providersMap); // string[]
const results = await optimadeClient.getStructuresAll({
providers: Provider[],
filter: YOUR_OPTIMADE_QUERY,
}); // [StructuresResponse[], Provider][]
Importing depends on your environment. See also the examples folder. The
.html examples are suited for the browser environment, the .js examples are
suited for the server environment.
import prefetched from 'optimade/dist/prefetched.json';
const optimadeClient = new Optimade({
providersUrl: "https://providers.optimade.org/providers.json",
});
optimadeClient.providers = prefetched.providers;
optimadeClient.apis = prefetched.apis;
const results = await optimadeClient.getStructuresAll({
providers: Provider[],
filter: YOUR_OPTIMADE_QUERY,
page: number,
limit: number,
offset: number,
batch: true
}); // [StructuresResponse[], Provider][]
See also the demo folder.
MIT © Pavel Malyshev and Alexander Volkov, Tilde Materials Informatics
FAQs
Aggregating Optimade client for the online materials databases
The npm package optimade receives a total of 32 weekly downloads. As such, optimade popularity was classified as not popular.
We found that optimade demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.

Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.

Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.