New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

module-sdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

module-sdk

Module TypeScript SDK

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Module TypeScript SDK

The Module SDK is a TypeScript library that exposes powerful methods to quickly and easily get all your Web3 data. Powered by Modules APIs, Module SDK exposes methods for each and every endpoint that Module provides.

Quickly access information about NFT collections, token holders, collection statistics and much much more!

Information 📖
Some methods have names that differ from their api counterparts on the documentation as a result of consistency for the SDK.

Features ✨
Have a specific feature that you want added? Open a ticket in our discord and we can discuss building it for you!

Feedback/Issues 🤝
We welcome feedback and pull requests! Either open a ticket in our discord or open an issue on the repo and we can look into it!

Getting Started

yarn

yarn add module-sdk

npm

npm i module-sdk

After installing the SDK, import it using the following code

import { Module, ModuleConfig } from "module-sdk";

// Configuration object for the Module SDK. 
const config: ModuleConfig = {
  apiKey: "", // Module API Key. Not required, however rate limits will apply.
};

// Create a new instance of the SDK
const client = new Module(config);

SDK Usage

All methods are exposed through their own classes. There are four usable classes as shown below

import { Module } from "module-sdk";

const client = new Module();

client.eth; // Ethereum Methods

client.nft; // NFT Methods

client.central; // Central Methods

client.metadata; // Metadata Methods

All methods return promises that either resolve or reject depending on the server response. Handle errors accordingly.

try {
await client.eth.getTransaction({} as GetTransaction);
} catch(err) {
console.log(err);
}

Method Documentation

Refer below for information on each classes methods.

Examples

Getting azuki collection info

import { Module } from 'module-sdk';

const client = new Module({apiKey: ''});

const collectionInfo = await client.nft.getCollectionInfo({slug: 'azuki'});

Getting azuki contract abi

import { Module } from 'module-sdk';

const client = new Module({apiKey: ''});

const abi = await client.metadata.getContractABI({contractAddress: '0xed5af388653567af2f388e6224dc7c4b3241c544'});

Keywords

typescript

FAQs

Package last updated on 09 Nov 2022

Did you know?

Socket

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.

Install

Related posts