Candy Shop
  • 🍭Candy Shop
    • About Candy Shop
    • Why Candy Shop
    • Features & Services
    • Roadmap
    • Partnership
    • Team
  • 🛫SDK (For Developers)
    • Introduction
    • Solana
      • Creating Your Shop
      • Marketplace
      • Mint NFT
      • Edition Drop
      • Auctions
      • Credit Card Payments
      • Testing Your Shop
      • FAQ
    • Ethereum / Polygon
      • Creating Your Shop
      • Marketplace
      • FAQ
  • 🏝️No Code (For Everyone)
    • 🚧Coming soon...
  • 🧩Fractionalization
    • Introduction
    • How to Trade Fractions
    • Fees
    • FAQ
  • 💎Tokenomics
    • Notice & Disclaimer
    • The Token: LQN
  • 💼Legal
    • Candy Shop API Terms of Service
    • Privacy Policy
Powered by GitBook
On this page
  • Create Candy Shop
  • Install Candy Shop
  • Use Candy Shop
  1. SDK (For Developers)
  2. Solana

Creating Your Shop

PreviousSolanaNextMarketplace

Last updated 2 years ago

This gives you different shop configurations out of the box. You can also check out the in the Github repo and its deployed version .

Create Candy Shop

You can create and configure your Candy Shop through the admin panel, including the following:

  • Create a shop with SOL or an SPL token as transaction currency

  • Deposit syrup, a small budget to maintain your shop (e.g. gas fees for on-chain account space allocation)

  • Restrict NFT collections that can be bought and sold on your shop

  • Claim share of transaction fees from your shop

Install Candy Shop

npm install @liqnft/candy-shop

or

yarn add @liqnft/candy-shop

Use Candy Shop

Create a CandyShop instance in your code base to use Candy Shop.

const candyShop = await CandyShop.initSolCandyShop({
  shopCreatorAddress: "6MfPdYNQNnvkYcFvcSK6w6magR6z25Ay2iaYFfYY1xfw", // Candy Shop owner address
  treasuryMint: "So11111111111111111111111111111111111111112", // Candy Shop transaction currency
  programId: "csbMUULiQfGjT8ezT16EoEBaiarS6VWRevTw1JMydrS", // Candy Shop program ID
  env: 'devnet', // mainnet, devnet
  settings: settings // (optional) additional shop settings
});

Additional Settings

You may pass an additional settings object to customize your shop:

  • priceDecimals: number

    • number of decimals to display for price numbers (default is 3)

  • volumeDecimals: number

    • number of decimals to display for volume numbers (default is 1)

  • connectionUrl: string

  • connectionConfig: object

    • your connection node url configuration

Default settings

const settings = {
  priceDecimals: 3,
  volumeDecimals: 1,
  mainnetConnectionUrl: 'https://ssc-dao.genesysgo.net/',
  connectionConfig: {
    httpHeaders: {
      '[NODE_SPECIFIC_HEADERS]': '[VALUE]'
    }
  }
};

your mainnet connection node url (default is ). We encourage projects to use their own node provider. We discovered that in non-US region sometimes the node returns 429 rate limit error.

🛫
starter repo
example
here
My Shop
https://api.mainnet-beta.solana.com