{"id":14968435,"url":"https://github.com/moralisweb3/moralis-js-sdk","last_synced_at":"2025-05-15T05:07:17.418Z","repository":{"id":37003914,"uuid":"407542201","full_name":"MoralisWeb3/Moralis-JS-SDK","owner":"MoralisWeb3","description":"Moralis Official Javascript SDK","archived":false,"fork":false,"pushed_at":"2024-10-02T08:00:43.000Z","size":2247217,"stargazers_count":381,"open_issues_count":9,"forks_count":263,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-05-12T00:13:24.728Z","etag":null,"topics":["avalanche","binance","blockchain","contracts","crypto","dapps","eth","ethereum","evm","fantom","moralis","nft","smart-contracts","solana","web3","web3js"],"latest_commit_sha":null,"homepage":"https://docs.moralis.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MoralisWeb3.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-17T13:01:58.000Z","updated_at":"2025-04-25T05:27:22.000Z","dependencies_parsed_at":"2023-01-17T13:01:49.896Z","dependency_job_id":"f11e26a2-1db6-42af-84b4-8b0ddd74c28e","html_url":"https://github.com/MoralisWeb3/Moralis-JS-SDK","commit_stats":{"total_commits":2135,"total_committers":50,"mean_commits":42.7,"dds":0.7269320843091335,"last_synced_commit":"71d2b43315015600f65e7be1dea954c9d0ae31bb"},"previous_names":[],"tags_count":2025,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoralisWeb3%2FMoralis-JS-SDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoralisWeb3%2FMoralis-JS-SDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoralisWeb3%2FMoralis-JS-SDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MoralisWeb3%2FMoralis-JS-SDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MoralisWeb3","download_url":"https://codeload.github.com/MoralisWeb3/Moralis-JS-SDK/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276447,"owners_count":22043867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["avalanche","binance","blockchain","contracts","crypto","dapps","eth","ethereum","evm","fantom","moralis","nft","smart-contracts","solana","web3","web3js"],"created_at":"2024-09-24T13:39:54.278Z","updated_at":"2025-05-15T05:07:12.408Z","avatar_url":"https://github.com/MoralisWeb3.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n  CAUTION: This file is automatically generated. Do not edit it manually!\n  To adjust it, change the sdk-readme code generator or its template\n--\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003ca align=\"center\" href=\"https://moralis.io\" target=\"_blank\"\u003e\n      \u003cimg src=\"https://github.com/MoralisWeb3/Moralis-JS-SDK/raw/main/assets/moralis-logo.svg\" alt=\"Moralis JS SDK\" height=200/\u003e\n    \u003c/a\u003e\n    \u003ch1 align=\"center\"\u003eMoralis SDK (JavaScript / TypeScript)\u003c/h1\u003e\n    \u003ca href=\"https://discord.gg/moralis\" target=\"_blank\"\u003e\n      \u003cimg alt=\"Join the Moralis DAO on Discord\" src=\"https://img.shields.io/discord/819584798443569182?color=7289DA\u0026label=Discord\u0026logo=discord\u0026logoColor=ffffff\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://docs.moralis.io\" target=\"_blank\"\u003e\n      \u003cimg alt=\"Check the docs\" src=\"https://img.shields.io/badge/Docs-Full Documentation-21BF96?style=flat\u0026logo=gitbook\u0026logoColor=ffffff\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://forum.moralis.io\" target=\"_blank\"\u003e\n      \u003cimg alt=\"Discourse posts\" src=\"https://img.shields.io/discourse/posts?color=B7E803\u0026label=Forum\u0026logo=discourse\u0026server=https%3A%2F%2Fforum.moralis.io\"\u003e\n    \u003c/a\u003e\u003cbr/\u003e\n    \u003ca href=\"https://www.npmjs.com/package/moralis\"\u003e\u003cimg alt=\"npm\" src=\"https://img.shields.io/npm/v/moralis?label=version\"\u003e\u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/github/last-commit/MoralisWeb3/Moralis-JS-SDK\"\u003e\n    \u003cimg src=\"https://img.shields.io/bundlephobia/minzip/moralis\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/types/moralis\"\u003e\n  \u003cp\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n    The most powerful Web3 library for your backend in Javascript and Typescript.\n  \u003c/p\u003e\n  \u003cbr/\u003e\n\u003c/div\u003e\n\n---\n\n**Features**:\n\n- Web3 authentication\n- Make **Evm API** and **Solana API** calls\n- Subscribe to real-time blockchain updates via **Streams**\n- Consistent data types and utilities\n- **Modular** package: include only what you need\n- Fully **Typescript** ready out-of-the box\n\n... and much more. Check the [official Moralis docs](https://docs.moralis.io/) for more details.\n\n# 🚀 Quick start\n\nIf you're new to Moralis, check the [quickstart guide in the official docs](https://docs.moralis.io/docs/quickstart) on how to get started.\n\nIf you're already familiar with Moralis and have your server set up. Then follow along to connect your SDK:\n\n## 1. Install Moralis\n\nThe easiest way to integrate the Moralis SDK into your JavaScript project is through the npm module.\n\nInstall the package via `npm`:\n\n```shell\nnpm install moralis\n```\n\nor `yarn`:\n\n```shell\nyarn add moralis\n```\n\nImport Moralis:\n\n```js\nimport Moralis from 'moralis';\n```\n\n## 2. Initialize Moralis\n\nAfter your dependency is added, you simply need to initialize moralis via the `start` method:\n\n\u003e **⚠️ Warning**: Make sure to keep your api key private\n\n```javascript\nMoralis.start({\n  apiKey: 'YOUR_API_KEY',\n});\n```\n\nAfter that you can use any Moralis functionalities as described in our [extensive docs](https://docs.moralis.io)\n\n# ⭐️ Star us\n\nIf this JS SDK helps you build your dapps faster - please star this project, every star makes us very happy!\n\n# 🤝 Need help\n\nIf 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.\n\n# 🧭 Table of Contents\n\n- [🚀 Quick start](#-quick-start)\n  - [1. Install Moralis](#1-install-moralis)\n  - [2. Initialize Moralis](#2-initialize-moralis)\n- [⭐️ Star us](#️-star-us)\n- [🤝 Need help](#-need-help)\n- [🧭 Table of Contents](#-table-of-contents)\n- [⚙️ Configuration](#️-configuration)\n- [👩‍🔬 Advanced setup](#-advanced-setup)\n  - [1. Install the dependencies](#1-install-the-dependencies)\n- [📦 Packages](#-packages)\n- [🧙‍♂️ Community](#️-community)\n\n# ⚙️ Configuration\n\nWhen calling `Moralis.start`, you can include a configuration object.\n\n# 👩‍🔬 Advanced setup\n\nIt'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).\n\n## 1. Install the dependencies\n\nInstead of installing `moralis` you can need to install the packages that you want to use. You always need to install the `@moralisweb3/common-core` package. For example:\n\n```shell\nyarn add @moralisweb3/common-core @moralisweb3/evm-api\n```\n\nThen at the top of your code (before any interaction with Moralis), you need to register the modules to the core package\n\n```javascript\nimport { Core } from '@moralisweb3/common-core';\nimport { EvmApi } from '@moralisweb3/evm-api';\n\nconst core = Core.create();\n// Register all imported modules to the @moralisweb3/common-core module\ncore.registerModules([EvmApi]);\n```\n\nThen, 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.\n\n```javascript\ncore.start({\n  apiKey: 'YOUR_API_KEY',\n  // ...and any other configuration\n});\n```\n\nNow you can use any functionality from the installed modules. The only difference is that you need to call in your code:\n\n```ts\nimport { EvmApi } from '@moralisweb3/evm-api';\n\nconst evmApi = core.getModule\u003cEvmApi\u003e(EvmApi.moduleName);\nevmApi.block.getBlock();\n```\n\nInstead of\n\n```javascript\nimport Moralis from 'moralis';\n\nMoralis.EvmApi.block.getBlock();\n```\n\nOf course you are free to combine the modules in a single object, and use that in your dapp.\n\n```javascript\n// moralis.ts\nimport { Core } from '@moralisweb3/common-core';\nimport { EvmApi } from '@moralisweb3/evm-api';\n\nconst core = Core.create();\nconst evmApi = EvmApi.create(core);\ncore.registerModules([evmApi]);\n\nexport const Moralis = {\n  EvmApi: evmApi,\n};\n\n// app.ts\nimport { Moralis } from './moralis/';\n\nMoralis.EvmApi.block.getBlock();\n```\n\n# 📦 Packages\n\n## Main modules\n\nThe main modules of the SDK\n\n| package                               | changelog                               | description                                                                                 |\n| ------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------- |\n| [moralis](packages/moralis/README.md) | [CHANGELOG.md](packages/moralis/CHANGELOG.md) | The main package of Moralis containing all features. You probably are looking for this one. |\n\n## Integrations\n\nIntegrations with frameworks and services\n\n| package                                                     | changelog                                   | description                            |\n| ----------------------------------------------------------- | ------------------------------------------- | -------------------------------------- |\n| [@moralisweb3/next](packages/next/README.md)                | [CHANGELOG.md](packages/next/CHANGELOG.md)        | Integration of Moralis in NextJs       |\n| [@moralisweb3/parse-server](packages/parseServer/README.md) | [CHANGELOG.md](packages/parseServer/CHANGELOG.md) | Integration of Moralis in parse-server |\n\n## Features\n\nFeature modules. Only use these directly for advanced use-cases, the prefered way is to use these features via the umbrella package \u0026quot;moralis\u0026quot;\n\n| package                                            | changelog                               | description                                                 |\n| -------------------------------------------------- | --------------------------------------- | ----------------------------------------------------------- |\n| [@moralisweb3/auth](packages/auth/README.md)       | [CHANGELOG.md](packages/auth/CHANGELOG.md)    | Authenticate via web3                                       |\n| [@moralisweb3/evm-api](packages/evmApi/README.md)  | [CHANGELOG.md](packages/evmApi/CHANGELOG.md)  | Make calls to the Evm blockchain via Moralis Evm Apis       |\n| [@moralisweb3/sol-api](packages/solApi/README.md)  | [CHANGELOG.md](packages/solApi/CHANGELOG.md)  | Make calls to the Solana blockchain via Moralis Solana Apis |\n| [@moralisweb3/streams](packages/streams/README.md) | [CHANGELOG.md](packages/streams/CHANGELOG.md) | Subscribe to realtime data from the blockchain              |\n\n## Core modules\n\nCore modules are the building blocks of Moralis.\n\n| package                                                    | changelog                                   | description                       |\n| ---------------------------------------------------------- | ------------------------------------------- | --------------------------------- |\n| [@moralisweb3/common-core](packages/common/core/README.md) | [CHANGELOG.md](packages/common/core/CHANGELOG.md) | All core logic related to the SDK |\n\n## Utilities\n\nUtilities, types, operations and datatypes related used by other modules.\n\n| package                                                                     | changelog                                           | description                                                   |\n| --------------------------------------------------------------------------- | --------------------------------------------------- | ------------------------------------------------------------- |\n| [@moralisweb3/api-utils](packages/apiUtils/README.md)                       | [CHANGELOG.md](packages/apiUtils/CHANGELOG.md)            | Utilities and types to handle logic for api calls             |\n| [@moralisweb3/client-api-utils](packages/client/apiUtils/README.md)         | [CHANGELOG.md](packages/client/apiUtils/CHANGELOG.md)     | Client-side utilities for api calls                           |\n| [@moralisweb3/client-evm-api](packages/client/evmApi/README.md)             | [CHANGELOG.md](packages/client/evmApi/CHANGELOG.md)       | Client-side logic for making Evm Api calls                    |\n| [@moralisweb3/client-sol-api](packages/client/solApi/README.md)             | [CHANGELOG.md](packages/client/solApi/CHANGELOG.md)       | Client-side logic for making Solana Api calls                 |\n| [@moralisweb3/common-aptos-utils](packages/common/aptosUtils/README.md)     | [CHANGELOG.md](packages/common/aptosUtils/CHANGELOG.md)   | Utilities, operations, datatypes and types related to Aptos   |\n| [@moralisweb3/common-auth-utils](packages/common/authUtils/README.md)       | [CHANGELOG.md](packages/common/authUtils/CHANGELOG.md)    | Utilities, operations, datatypes, and types related to Auth   |\n| [@moralisweb3/common-evm-utils](packages/common/evmUtils/README.md)         | [CHANGELOG.md](packages/common/evmUtils/CHANGELOG.md)     | Utilities, operations, datatypes and types related to Evm     |\n| [@moralisweb3/common-sol-utils](packages/common/solUtils/README.md)         | [CHANGELOG.md](packages/common/solUtils/CHANGELOG.md)     | Utilities, operations, datatypes and types related to Solana  |\n| [@moralisweb3/common-streams-utils](packages/common/streamsUtils/README.md) | [CHANGELOG.md](packages/common/streamsUtils/CHANGELOG.md) | Utilities, operations, datatypes and types related to Streams |\n\n## Tools\n\nStand-alone tools and utilities\n\n| package                                                       | changelog                                   | description                                                     |\n| ------------------------------------------------------------- | ------------------------------------------- | --------------------------------------------------------------- |\n| [@moralisweb3/eslint-config](packages/eslintConfig/README.md) | [CHANGELOG.md](packages/eslintConfig/CHANGELOG.md) | Eslint rules, used within the Moralis SDK and its demo projects |\n\n\n\n# 🧙‍♂️ Community\n\n- [Discord](https://discord.gg/moralis)\n- [Forum](https://forum.moralis.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoralisweb3%2Fmoralis-js-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoralisweb3%2Fmoralis-js-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoralisweb3%2Fmoralis-js-sdk/lists"}