@alembic/nft-api-sdk
v1.1.6
Published
SDK to use alembic NFT API
Downloads
67
Readme
@alembic/nft-api-sdk
This is a TypeScript SDK for interacting with the NFT API. It simplifies the process of making requests to the API by providing convenient methods for various operations related to NFTs (Non-Fungible Tokens). These operations include managing and searching for assets, handling collections, and analyzing NFT data.
SDK Reference documentation
API reference documentation
Alembic documentation
Installation
To add the @alembic/nft-api-sdk to your project, you can use npm or yarn:
npm install @alembic/nft-api-sdk
yarn add @alembic/nft-api-sdk
Usage
After installation, you can import NftApi
from the SDK in your TypeScript code:
import { NftApi } from '@alembic/nft-api-sdk';
Create an instance of NftApi
and call its methods to interact with the NFT API.
const nftApi = new NftApi();
// Getting all collections
const collections = await nftApi.collection.getCollections();
console.log(collections);
// Search for assets using the `searchAssets` method of the `AssetService`
const filters = { /* your search criteria */ };
const assets = await nftApi.asset.searchAssets(filters);
console.log(assets);
// Get specific collection info
const collectionInfo = await nftApi.collection.getCollection('your_contract_address');
console.log(collectionInfo);