Socket
Socket
Sign inDemoInstall

moralis

Package Overview
Dependencies
Maintainers
7
Versions
342
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moralis - npm Package Compare versions

Comparing version 2.7.1 to 2.7.2

34

package.json
{
"name": "moralis",
"author": "Moralis",
"version": "2.7.1",
"version": "2.7.2",
"license": "MIT",
"private": false,
"keywords": [
"ethereum",
"binance",
"avalanche",
"fantom",
"solana",
"nft",
"dapps",
"blockchain",
"crypto",
"web3",
"evm",
"eth",
"smart-contracts",
"contracts"
],
"main": "./lib/index.js",

@@ -46,12 +62,12 @@ "types": "./lib/index.d.ts",

"dependencies": {
"@moralisweb3/auth": "^2.7.1",
"@moralisweb3/core": "^2.7.1",
"@moralisweb3/streams": "^2.7.1",
"@moralisweb3/api-utils": "^2.7.1",
"@moralisweb3/evm-api": "^2.7.1",
"@moralisweb3/evm-utils": "^2.7.1",
"@moralisweb3/sol-api": "^2.7.1",
"@moralisweb3/sol-utils": "^2.7.1",
"@moralisweb3/auth": "^2.7.2",
"@moralisweb3/core": "^2.7.2",
"@moralisweb3/streams": "^2.7.2",
"@moralisweb3/api-utils": "^2.7.2",
"@moralisweb3/evm-api": "^2.7.2",
"@moralisweb3/evm-utils": "^2.7.2",
"@moralisweb3/sol-api": "^2.7.2",
"@moralisweb3/sol-utils": "^2.7.2",
"@moralisweb3/streams-typings": "^1.0.5"
}
}

@@ -1,3 +0,224 @@

# Moralis umbrella package
<div align="center">
<a align="center" href="https://moralis.io" target="_blank">
<img src="./assets/moralis-logo.svg" alt="Moralis JS SDK" height=200/>
</a>
<h1 align="center">Moralis SDK (JavaScript / TypeScript)</h1>
<a href="https://discord.gg/moralis" target="_blank">
<img alt="Join the Moralis DAO on Discord" src="https://img.shields.io/discord/819584798443569182?color=7289DA&label=Discord&logo=discord&logoColor=ffffff">
</a>
<a href="https://docs.moralis.io" target="_blank">
<img alt="Check the docs" src="https://img.shields.io/badge/Docs-Full Documentation-21BF96?style=flat&logo=gitbook&logoColor=ffffff">
</a>
<a href="https://forum.moralis.io" target="_blank">
<img alt="Discourse posts" src="https://img.shields.io/discourse/posts?color=B7E803&label=Forum&logo=discourse&server=https%3A%2F%2Fforum.moralis.io">
</a><br/>
<img alt="npm" src="https://img.shields.io/npm/v/moralis?label=version">
<img src="https://img.shields.io/github/last-commit/MoralisWeb3/Moralis-JS-SDK">
<img src="https://img.shields.io/bundlephobia/minzip/moralis">
<img src="https://img.shields.io/npm/types/moralis">
<p>
</p>
<p>
A library that gives you access to the powerful Moralis Server backend from your JavaScript app.
</p>
<br/>
</div>
This package includes all moralis packages
---
> **⚠ WARNING**: This library is dedicated to back-end projects only. You **should NOT** use this library for a front-end project. Keep your API key secret and don't disclose it.
**Features**:
- Web3 authentication
- Make **Evm api** and **Solana api** calls
- Consistent data types and utilities
- **Modular** package: include only what you need
- Fully **Typescript** ready out-of-the box
... and much more. Check out the [official Moralis docs](https://docs.moralis.io/) for more details.
# 🚀 Quick start
If you're new to Moralis, check the [quickstart guide in the official docs](https://docs.moralis.io/docs/quickstart) on how to get started.
If you're already familiar with Moralis and have your server set up. Then follow along to connect your SDK:
## 1. Install Moralis
The easiest way to integrate the Moralis SDK into your JavaScript project is through the npm module.
Install the package via `npm`:
```shell
npm install moralis
```
or `yarn`:
```shell
yarn add moralis
```
Import Moralis:
```js
import Moralis from 'moralis';
```
## 2. Initialize Moralis
After your dependency is added, you simply need to initialize moralis via the `start` method:
```javascript
Moralis.start({
apiKey: 'YOUR_API_KEY',
});
```
After that you can use any Moralis functionalities as described in our [extensive docs](https://docs.moralis.io)
# ⭐️ Star us
If this JS SDK helps you build your dapps faster - please star this project on [Github](https://github.com/MoralisWeb3/Moralis-JS-SDK), every star makes us very happy!
# 🤝 Need help
If you need help with setting up the boilerplate or have other questions - don't hesitate to write in our community forum and we will check asap. [Forum link](https://forum.moralis.io). The best thing about this SDK is the super active community ready to help at any time! We help each other.
# 🧭 Table of Contents
- [🚀 Quick start](#-quick-start)
- [1. Install Moralis](#1-install-moralis)
- [2. Initialize Moralis](#2-initialize-moralis)
- [⭐️ Star us](#️-star-us)
- [🤝 Need help](#-need-help)
- [🧭 Table of Contents](#-table-of-contents)
- [⚙️ Configuration](#️-configuration)
- [👩‍🔬 Advanced setup](#-advanced-setup)
- [1. Install the dependencies](#1-install-the-dependencies)
- [📦 Packages](#-packages)
- [Umbrella package](#umbrella-package)
- [Core module](#core-module)
- [API modules](#api-modules)
- [Other](#other)
- [🧙‍♂️ Community](#️-community)
# ⚙️ Configuration
When calling `Moralis.start`, you can include a configuration object.
# 👩‍🔬 Advanced setup
It's possible to install all functionalities of Moralis by installing `moralis` as a dependency. But, you may choose to only install certain modules (as listed below).
## 1. Install the dependencies
Instead of installing `moralis` you can need to install the packages that you want to use. You always need to install the `@moralisweb3/core` package. For example:
```shell
yarn add @moralisweb3/core @moralisweb3/evm @moralisweb3/evm-api @moralisweb3/evm-wallet-connect-connector
```
Then at the top of your code (before any interaction with Moralis), you need to register the modules to the core package
```javascript
import MoralisCore from '@moralisweb3/core';
import MoralisEvmApi from '@moralisweb3/evm-api';
const core = MoralisCore.create();
// Register all imported modules to the @moralisweb3/core module
core.registerModules([MoralisEvmApi]);
```
Then, initialize the app the same way as when using the umbrella `moralis` package. You only need to provide configuration that is required by the packages. So if you don't include an api package, then you might not need to include the apiKey.
```javascript
core.start({
apiKey: 'YOUR_API_KEY',
// ...and any other configuration
});
```
Now you can use any functionality from the installed modules. The only difference is that you need to call in your code:
```ts
import MoralisEvmApi from '@moralisweb3/evm-api';
const evmApi = core.getModule<MoralisEvmApi>(MoralisEvmApi.moduleName);
evmApi.block.getBlock();
```
Instead of
```javascript
import Moralis from 'moralis';
Moralis.EvmApi.block.getBlock();
```
Of course you are free to combine the modules in a single object, and use that in your dapp.
```javascript
// moralis.ts
import { MoralisCore } from '@moralisweb3/core';
import EvmApi from '@moralisweb3/evm-api';
const core = MoralisCore.create();
const evmApi = EvmApi.create(core);
core.registerModules([evmApi]);
export const Moralis = {
EvmApi: evmApi,
};
// app.ts
import { Moralis } from './moralis/';
Moralis.EvmApi.block.getBlock();
```
# 📦 Packages
## Umbrella package
| package | Changelog | Description |
| ------- | --------- | ---------------------------------------------------------------- |
| [moralis](https://www.npmjs.com/package/moralis) | [CHANGELOG.md](https://github.com/MoralisWeb3/Moralis-JS-SDK/blob/main/packages/moralis/CHANGELOG.md) | Umbrella package that includes all packages and initializes them |
## Core module
The core module is required in all applications. It will handle global dependencies and communications between other packages.
| package | Changelog | Description |
| ---------------------------------------------- |--------- | ------------------------------------------------------------------------------------ |
| [@moralisweb3/core](https://www.npmjs.com/package/@moralisweb3/core) | [CHANGELOG.md](https://github.com/MoralisWeb3/Moralis-JS-SDK/blob/main/packages/core/CHANGELOG.md) | Core logic, responsible for core logic and sharing state and events between packages |
## Utilities
| package | Changelog | Description |
| ---------------------------------------------------- | --------- | ----------- |
| [@moralisweb3/evm-utils](https://www.npmjs.com/package/@moralisweb3/evm-utils) | [CHANGELOG.md](https://github.com/MoralisWeb3/Moralis-JS-SDK/blob/main/packages/evmApi/CHANGELOG.md) | Utility functions and datatypes for EVM chains. |
| [@moralisweb3/sol-utils](https://www.npmjs.com/package/@moralisweb3/sol-utils) | [CHANGELOG.md](https://github.com/MoralisWeb3/Moralis-JS-SDK/blob/main/packages/solApi/CHANGELOG.md) | Utility functions and datatypes for Solana networks. |
| [@moralisweb3/api-utils](https://www.npmjs.com/package/@moralisweb3/api-utils) | [CHANGELOG.md](https://github.com/MoralisWeb3/Moralis-JS-SDK/blob/main/packages/apiUtils/CHANGELOG.md) | Generic functions, used in all api logic within the SDK. |
## Moralis functionalities
| package | Changelog | Description |
| ---------------------------------------------------- | --------- | ----------- |
| [@moralisweb3/evm-api](https://www.npmjs.com/package/@moralisweb3/evm-api) | [CHANGELOG.md](https://github.com/MoralisWeb3/Moralis-JS-SDK/blob/main/packages/evmApi/CHANGELOG.md) | Fetch data from an EVM chain |
| [@moralisweb3/sol-api](https://www.npmjs.com/package/@moralisweb3/sol-api) | [CHANGELOG.md](https://github.com/MoralisWeb3/Moralis-JS-SDK/blob/main/packages/solApi/CHANGELOG.md) | Fetch data from a Solana network |
| [@moralisweb3/auth](https://www.npmjs.com/package/@moralisweb3/auth) | [CHANGELOG.md](https://github.com/MoralisWeb3/Moralis-JS-SDK/blob/main/packages/auth/CHANGELOG.md) | Handle authentication |
## Other
| package | Changelog | Description |
| ---------------------------------------------------- | --------- | ----------- |
| [@moralisweb3/eslint-config](./packages/eslintConfig) | - | Eslint configuration that is used within Moralis |
# 🧙‍♂️ Community
- [Discord](https://discord.gg/moralis)
- [Forum](https://forum.moralis.io)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc