{"id":19289839,"url":"https://github.com/suiware/mersui","last_synced_at":"2025-08-25T15:06:36.029Z","repository":{"id":261894519,"uuid":"885646566","full_name":"suiware/mersui","owner":"suiware","description":"Simple \"Buy Me a Coffee\" React button with payments in SUI","archived":false,"fork":false,"pushed_at":"2024-12-11T16:00:19.000Z","size":383,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T11:16:41.583Z","etag":null,"topics":["buy-me-a-coffee","component-library","react","sui"],"latest_commit_sha":null,"homepage":"https://mersui.xyz","language":"TypeScript","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/suiware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-09T02:52:07.000Z","updated_at":"2024-12-18T15:34:36.000Z","dependencies_parsed_at":"2024-11-09T04:27:46.496Z","dependency_job_id":"329147df-dd46-4e8e-b450-c3646cc7b51d","html_url":"https://github.com/suiware/mersui","commit_stats":null,"previous_names":["suiware/mersui-widget","suiware/mersui"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/suiware/mersui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suiware%2Fmersui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suiware%2Fmersui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suiware%2Fmersui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suiware%2Fmersui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suiware","download_url":"https://codeload.github.com/suiware/mersui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suiware%2Fmersui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272084826,"owners_count":24870584,"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","status":"online","status_checked_at":"2025-08-25T02:00:12.092Z","response_time":1107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["buy-me-a-coffee","component-library","react","sui"],"created_at":"2024-11-09T22:17:19.910Z","updated_at":"2025-08-25T15:06:35.981Z","avatar_url":"https://github.com/suiware.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MerSui\n[![npm version](https://badge.fury.io/js/mersui.svg)](https://badge.fury.io/js/mersui)\n[![Bundlephobia Minified Size](https://badgen.net/bundlephobia/min/mersui)](https://bundlephobia.com/result?p=mersui)\n[![Discord chat](https://img.shields.io/discord/1237259509366521866.svg?logo=discord\u0026style=flat-square)](https://discord.com/invite/HuDPpXz4Hx)\n\nSimple \"Buy Me a Coffee\" React button with payments in SUI.  \nNo intermediaries, you receive donations directly to your Sui address.\n\n## Demo\n\n[mersui.xyz](https://mersui.xyz)\n\n## Installation\n\n```bash\npnpm add mersui || yarn add mersui || npm install mersui\n```\n\n## Usage\n\nFirst of all, wrap your main app component into the `MerSuiProvider` component.\n\n```tsx\nimport { MerSuiProvider } from \"mersui\";\n\nfunction App() {\n  return (\n    \u003cMerSuiProvider\u003e\n      \u003cYourApp /\u003e\n    \u003c/MerSuiProvider\u003e\n  );\n}\n```\n\nThen, use the `MerSuiWidget` component to render the button.\n\n```tsx\nimport { MerSuiWidget } from \"mersui\";\n\nfunction App() {\n  return (\n    \u003cdiv\u003e\n      \u003cMerSuiWidget recipientAddress=\"0x...\" /\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\nEnjoy!\n\n### Props\n\n| Prop                | Type     | Default | Description |\n| ------------------- | -------- | ------- | ----------- |\n| recipientAddress    | string   | -       | Sui address of the recipient |\n| amount              | number   | 3       | Optional amount in USD |\n| buttonLabel         | string   | MerSui  | Optional button label |\n| containerClassName  | string   | -       | Optional class name for the button container |\n| buttonClassName     | string   | -       | Optional class name for the button |\n| statusClassName     | string   | -       | Optional class name for the status message. The `status-success` and `status-error` classes are automatically added for your convenience. |\n\n## Pyth integration\n\nMerSui uses [Pyth's Sponsored Feed for SUI/USD](https://docs.pyth.network/price-feeds/sponsored-feeds/sui) to properly calculate the transaction amount in SUI. \nSee [lib/MerSuiWidget.tsx/fetchSuiPrice](/lib/components/MerSuiWidget.tsx#L184).\n\n## Known issues\n\n- Next.js: Global CSS cannot be imported from within node_modules https://github.com/vercel/next.js/issues/19936\n\n## Development\n\nThe `lib` folder contains the source code of the library.\n\nThe `src` folder contains a demo app that you can use to play with the library locally.\n\nBut before that, you need to set up the environment variables:\n\n```\n# .env.local\nVITE_RECIPIENT_ADDRESS=0x...\n```\n\nThen, run the development server:\n\n```bash\npnpm dev\n```\n\n## Build the library\n\n```bash\npnpm build\n```\n\n## License \u0026 copyright\n\nCopyright (c) 2024 Konstantin Komelin\n\nLicensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuiware%2Fmersui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuiware%2Fmersui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuiware%2Fmersui/lists"}