Installing Marketplace SDK Packages
Marketplace SDK is modular, allowing you to install only the necessary packages. To get started, install the@0xsequence/marketplace-sdk core package, as well as install other dependencies necessary dependencies.
Setting Up your Dapp
To utilize the core marketplace-sdk wrapper to interact with your marketplace from your application, follow these steps:Verify If Your Web SDK Is Correctly Integrated
Ensuring that your Web SDK is properly integrated is crucial before getting started with Marketplace SDK. To verify this, simply check if you can log in and log out successfully.
Create a Config
Next, a configuration variable for Marketplace SDK will need to be created. In this file, we will define and manage essential configuration settings for our Marketplace SDK, including environment variables. This centralized approach ensures that configuration values are easily accessible and maintainable.
config.ts
Create an SSR Client
Next, a Ssr Client for Marketplace SDK will need to be created. This SSR Client serves as an entry point for initializing the marketplace SDK on the Next.js server, enabling efficient data fetching and configuration setup before rendering the UI.
Understanding the SSR Client
The SSR Client allows you to access key marketplace data and configurations, which are essential for properly initializing the SDK on the server side. The following data can be retrieved:This setup ensures a seamless integration of the marketplace SDK with server-side rendering, improving performance and user experience.ssrClient.ts
Add the Marketplace SDK Providers Alongside Your Web SDK Providers
Open your
Providers.tsx file, where the Web SDK is configured, and integrate the Marketplace SDK providers.Done
Congratulations! Now you’re ready to explore the available hooks in our Marketplace SDK. Interested? Check out the Marketplace SDK hooks documentation to learn more.