Using services provided by the SDK to list, buy, and manage tokens
The SDK provides a set of services that you can use to list and buy tokens or modify and cancel a listing. In the following section, we will look into the services provided by the SDK.
For performing list token, buy token, modify listing, or cancel listing services on the marketplace using the SDK, you will need to create an instance of MarketplaceClient
class provided by the SDK. Here is an example of creating a new instance of MarketplaceClient
class using the SDK::
After creating an instance of MarketplaceClient
class, you can utilize various services provided by the MarketplaceClient
class. Here is the complete list of the services and an example function for performing listing a token, buying a token, modifying a listing, and canceling a listing:
Listing a token on the marketplace
You can call the useListTokenService
function provided by the MarketplaceClient
class followed by the setProperties
and execute
methods to list a token on the marketplace. Here is an example call of how you can list a token on the marketplace:
Buying a listed token on the marketplace
You can call the useBuyTokenService
function provided by the MarketplaceClient
class followed by the setProperties
and execute
methods to buy a token on the marketplace. Here is an example call of how you can buy a token on the marketplace:
Modify a listing on the marketplace
You can call the useModifyListingService
function provided by the MarketplaceClient
class followed by the setProperties
and execute
methods to modify an already listed token on the marketplace. Here is an example call of how you can modify a listing on the marketplace:
Cancel a listing on the marketplace
You can call the useCancelListingService
function provided by the MarketplaceClient
class followed by the setProperties
and execute
methods to cancel an already listed token on the marketplace. Here is an example call of how you can cancel a listing on the marketplace:
Last updated