{"id":26518875,"url":"https://github.com/soldapper/mcswap-shop","last_synced_at":"2025-03-21T10:16:06.490Z","repository":{"id":282960817,"uuid":"944741416","full_name":"SolDapper/mcswap-shop","owner":"SolDapper","description":"McSwap Shop Module","archived":false,"fork":false,"pushed_at":"2025-03-17T21:46:37.000Z","size":398,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T22:21:28.695Z","etag":null,"topics":["decentralized","marketplace","nft","solana","trustless"],"latest_commit_sha":null,"homepage":"https://mcswap.xyz","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SolDapper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-07T22:09:53.000Z","updated_at":"2025-03-17T21:55:48.000Z","dependencies_parsed_at":"2025-03-17T23:31:15.043Z","dependency_job_id":null,"html_url":"https://github.com/SolDapper/mcswap-shop","commit_stats":null,"previous_names":["soldapper/mcswap-shop"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolDapper%2Fmcswap-shop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolDapper%2Fmcswap-shop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolDapper%2Fmcswap-shop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolDapper%2Fmcswap-shop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SolDapper","download_url":"https://codeload.github.com/SolDapper/mcswap-shop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244776353,"owners_count":20508507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["decentralized","marketplace","nft","solana","trustless"],"created_at":"2025-03-21T10:16:05.468Z","updated_at":"2025-03-21T10:16:06.481Z","avatar_url":"https://github.com/SolDapper.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mcswap-shop\nThis module will embed a Solana NFT storefront into an existing application. Listings are powered by the native Solana programs of the McSwap Trustless Escrow Protocol. This module makes use of the [mcswap-sdk](https://github.com/SolDapper/mcswap-sdk) to directly integrate with the protocol.\n\n![mcswap shop](https://repository-images.githubusercontent.com/944741416/d30f1c19-99a5-479f-ab66-ba9ab5d4c6e5)\n\n![powered by solana](http://mcswap.xyz/gh/stacked-color.svg)\n\n## install\n```javascript\nnpm i mcswap-shop\n```\n\n## html\n```html\n\u003cdiv id=\"my-market\"\u003e\u003c/div\u003e\n```\n\n## usage\n```javascript\nimport shop from \"mcswap-shop\";\nimport \"mcswap-shop/src/colors/green-shop.css\";\nconst myshop = new shop(process.env.RPC);\nmyshop.init({\n  id: \"my-market\",\n  name: \"McSwap Shop\",\n  logo: \"\",\n  logo_link: \"\",\n  priority: \"Low\",\n  default_sort: \"Newest First\",\n  default_display: \"All Listings\",\n  text_intro: \"Initializing Demo\",\n  text_buy: \"Buy Me\",\n  master_settings: true,\n  enable_new_listings: true,\n  enable_edit_sort: true,\n  enable_edit_display: true,\n  fee_create: 0,\n  fee_execute: 0,\n  treasury: \"\",\n  enable_edit_core: true,\n  enable_edit_nft: true,\n  enable_edit_pnft: true,\n  enable_edit_cnft: true,\n  core_display: true,\n  nft_display: true,\n  pnft_display: true,\n  cnft_display: true,\n  collections_display: true,\n  enable_edit_collections: true,\n  collections: \"6Gfz6beNCcP8P7vrMyN2AFtsuv8rkVszSJ8xoP4zQyaR,ACy3ZVXcch8mZXUtRVqsJfa2DhFHxnUJpBb4oeN9tZsX,BL8ocmGmaEiM73JYjAAhgAmHPbtuY3CThYem9g4N5PqQ,BTJPWLW7DLQWpm2TNNEByAM5a1E1AGJp4h43czo9YBLc,Cq2BNRoE5RqyqSmACDQLx4ivp3MgmePwd2mdroZ5hmom,H3mnaqNFFNwqRfEiWFsRTgprCvG4tYFfmNezGEVnaMuQ\",\n  sellers_display: true,\n  enable_edit_sellers: true,\n  sellers: \"7Z3LJB2rxV4LiRBwgwTcufAWxnFTVJpcoCMiCo8Z5Ere,2jcih7dUFmEQfMUXQQnL2Fkq9zMqj4jwpHqvRVe3gGLL\",\n  shop_styler: {\n    shop:{\n      \"background\": \"#1a1a1a\",\n      \"background-repeat\": \"no-repeat\",\n      \"background-size\": \"cover\",\n      \"background-position\": \"center\"\n    },\n    wrapper:{\n      // \"background\": \"#000000eb\"\n    },\n    header:{\n      \"color\": \"#fff\"\n    },\n    titles:{\n      \"color\": \"#fff\"\n    },\n    details:{\n      \"color\": \"#1367d4\",\n    },\n    labels:{\n      \"color\": \"#1367d4\",\n    }\n  }\n});\n```\n\n## notes\nIf you're using a wallet connector other than [mcswap-connector](https://github.com/SolDapper/mcswap-connector)...\n\nTo allow your shop to update it's display to include the \"Delist\" button on assets listed by the connected wallet, and disabling the Buy button for those assets be sure to set:\n```javascript\nwindow.mcswap = provider; // after your wallet connects\n```\n```javascript\nwindow.mcswap = false; // after your wallet disconnects\n```\n\nIf you're already using the `mcswap-connector` then `window.mcswap` is set for you. And you can also access the current provider object from any scope with:\n```javascript\nconst provider = window.mcswap;\n```\n\n## config options\n\n| **Parameter**         |    **Type**     |      **Default**      | **Description**                           |\n| :-----------------------|----------------:|:----------------------|:---------------------------------------------------|\n| id                      | string          |  false                |  id of the html element that will be your shop     |\n| name                    | string          |  McSwap Shop          |  the display name for this shop                    |\n| logo                    | url             |  false                |  relative or full path to your logo                |\n| logo_link               | url             |  #                    |  url to open when the logo is clicked              |\n| priority                | string          |  Low                  |  default priority fee level for transactions       |\n| default_sort            | string          |  Newest First         |  default ordering for listings                     |\n| default_display         | string          |  All Listings         |  default listings filter                           |\n| text_intro              | string          |  Initializing Shop    |  displayed when the shop element is loading        |\n| text_buy                | string          |  Buy Me               |  the text of the \"Buy Me\" buttons for listings     |\n| master_settings         | bool            |  true                 |  show the settings gear icon button (recommended)  |\n| enable_new_listings     | bool            |  true                 |  allow users to create new listings (recommended)  |\n| enable_edit_sort        | bool            |  true                 |  allow users to sort listings (recommended)        |\n| enable_edit_display     | bool            |  true                 |  allow users to filter listings (recommended)      |\n| fee_create              | float           |  0                    |  optional sol fee for creating listings here       |\n| fee_execute             | float           |  0                    |  optional sol fee for buying listings here         |\n| treasury                | string          |  false                |  wallet address for optional fee collection        |\n| enable_edit_core        | bool            |  true                 |  allow user to use core asset checkbox             |\n| enable_edit_nft         | bool            |  true                 |  allow user to use nft asset checkbox              |\n| enable_edit_pnft        | bool            |  true                 |  allow user to use pnft asset checkbox             |\n| enable_edit_cnft        | bool            |  true                 |  allow user to use cnft asset checkbox             |\n| core_display            | bool            |  true                 |  default state of core checkbox                    |\n| nft_display             | bool            |  true                 |  default state of nft checkbox                     |\n| pnft_display            | bool            |  true                 |  default state of pnft checkbox                    |\n| cnft_display            | bool            |  true                 |  default state of cnft checkbox                    |\n| collections_display     | bool            |  true                 |  display \"Collections\" module in the settings      |\n| enable_edit_collections | bool            |  true                 |  allow users to add collection addresses           |\n| collections             | csv             |  \"\"                   |  comma seperated collection addresses to support   |\n| sellers_display         | bool            |  true                 |  display \"Sellers\" module in the settings          |\n| enable_edit_sellers     | bool            |  true                 |  allow users to add seller wallets                 |\n| sellers                 | csv             |  \"\"                   |  comma seperated seller wallets support            |\n| shop_styler             | obj             |  false                |  see below                                         |\n\n### shop_styler\nThe shop_styler object lets you add css to fine tune your shop's color scheme\n```javascript\n  {\n    shop:{\n      \"background\": \"#1a1a1a\",\n      \"background-repeat\": \"no-repeat\",\n      \"background-size\": \"cover\",\n      \"background-position\": \"center\", // add css style to your shop background\n    },\n    wrapper:{\n      // \"background\": \"#000000eb\" // optional layer between background and shop content\n    },\n    header:{\n      \"color\": \"#fff\", // page name color\n    },\n    titles:{\n      \"color\": \"#fff\", // listing title color\n    },\n    details:{\n      \"color\": \"#1367d4\", // listing price color \n    },\n    labels:{\n      \"color\": \"#1367d4\", // settings page label color\n    }\n  }\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoldapper%2Fmcswap-shop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoldapper%2Fmcswap-shop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoldapper%2Fmcswap-shop/lists"}