@cometh/marketplace-sdk - v2.2.9

@cometh/marketplace-sdk

This is a TypeScript SDK for interacting with the Marketplace API. It simplifies the process of making requests to the API by providing convenient methods for various operations related to NFTs and their orders. It also provides all the necessary Typescript typing you might need.

The possible operations include registering new collections, searching for assets, creating and searching orders, analyzing your marketplace palce statistics etc...

To add the @cometh/marketplace-sdk to your project, you can use npm or yarn:

npm install @cometh/marketplace-sdk
yarn add @cometh/marketplace-sdk

After installation, you can import MarketplaceSdk from the SDK in your TypeScript code:

import { MarketplaceSdk } from '@cometh/marketplace-sdk';

Create an instance of MarketplaceSdk and call its methods to interact with the Marketplace API.

const networkApiUrl = 'https://api.marketplace.prod.core.cometh.tech/v1/doc'

const marketplaceSdk = new MarketplaceSdk({
BASE: networkApiUrl,
HEADERS: {
apikey: 'YOUR_API_KEY'
}
})

Once initialized, the SDK is ready to be used.

const assetsSearch = await marketplaceSdk.asset.searchAssets({
owner: userAddress,
contractAddress: MY_COLLECTION_ADDRESS
})