{"id":49850051,"url":"https://github.com/midnightntwrk/midnight-tip-jar","last_synced_at":"2026-05-14T15:04:01.069Z","repository":{"id":346538807,"uuid":"1190469079","full_name":"midnightntwrk/midnight-tip-jar","owner":"midnightntwrk","description":"A Midnight tip jar example DApp","archived":false,"fork":false,"pushed_at":"2026-03-24T10:07:17.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-25T11:48:59.191Z","etag":null,"topics":["compact","midnightntwrk"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/midnightntwrk.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-24T10:07:15.000Z","updated_at":"2026-03-24T10:36:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/midnightntwrk/midnight-tip-jar","commit_stats":null,"previous_names":["midnightntwrk/midnight-tip-jar"],"tags_count":null,"template":false,"template_full_name":"midnightntwrk/midnight-template-repo","purl":"pkg:github/midnightntwrk/midnight-tip-jar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midnightntwrk%2Fmidnight-tip-jar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midnightntwrk%2Fmidnight-tip-jar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midnightntwrk%2Fmidnight-tip-jar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midnightntwrk%2Fmidnight-tip-jar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/midnightntwrk","download_url":"https://codeload.github.com/midnightntwrk/midnight-tip-jar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midnightntwrk%2Fmidnight-tip-jar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33030380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["compact","midnightntwrk"],"created_at":"2026-05-14T15:03:56.172Z","updated_at":"2026-05-14T15:04:01.050Z","avatar_url":"https://github.com/midnightntwrk.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Midnight Tip Jar\n\nA minimal tip jar on [Midnight Network](https://midnight.network) — connect a Lace wallet, read balances, and send NIGHT transfers using the DApp Connector API.\n\n## Prerequisites\n\n- **Node.js** v18+\n- **[Lace wallet](https://chromewebstore.google.com/detail/lace/gafhhkghbfjjkeiendhlofajokpaflmk)** installed in Chrome\n- Lace configured for **preprod** with tNight from the [faucet](https://faucet.preprod.midnight.network)\n\n## Quick Start\n\n```bash\nnpm install\nnpm run dev\n```\n\nOpen `http://localhost:5173`, connect your wallet, and send a tip.\n\n## Configuration\n\nEdit `src/config.ts` and set the recipient address:\n\n```ts\nexport const RECIPIENT = 'mn_addr_preprod1...'; // your unshielded address\n```\n\n## Tutorial\n\nWant to build this from scratch? See [TUTORIAL.md](TUTORIAL.md) for a step-by-step guide covering wallet detection, balance reading, and token transfers.\n\n## Project Structure\n\n```\nsrc/\n├── config.ts     # Network, recipient, UI settings\n├── main.tsx      # Entry point\n├── App.tsx       # Wallet logic and UI\n└── App.css       # Styles\n```\n\n## What's Next\n\nThis repo covers the basics — connecting a wallet and transferring tokens. Here are some ideas to extend it:\n\n- **Name-based tipping with MidNS** — Integrate [Midnames](https://midnames.com) to resolve human-readable names to wallet addresses. A blog or video site embeds `?name=jay.midnight` in the tip button, the app resolves it through MidNS, and the transfer just works. Creators register once — every site can resolve them without hardcoding addresses.\n- **Dynamic recipient via URL** — Read the recipient from a query parameter (`?to=mn_addr_preprod1...`) so a single deployment serves multiple creators without a name service dependency.\n- **Shielded transfers** — Switch from unshielded to shielded transfers for sender privacy. Use `kind: 'shielded'` with a `shield-addr` recipient and `getShieldedBalances()`.\n- **Tip history** — Use `getTxHistory()` from the DApp Connector API to show recent transactions in the UI.\n- **Multi-recipient splitting** — Pass multiple entries in the `makeTransfer` array to split a tip across several addresses in one transaction.\n- **On-chain tip counter** — Deploy a Compact contract that increments a counter each time a tip is sent, giving creators a verifiable on-chain tip count without revealing amounts.\n\n## Related Resources\n\n- [React wallet connect how-to](https://docs.midnight.network/how-to/react-wallet-connect) — covers wallet connection (this repo extends it with transfers)\n- [DApp Connector API reference](https://docs.midnight.network/develop/reference/midnight-api/dapp-connector/)\n- [Preprod faucet](https://faucet.preprod.midnight.network)\n- [Midnames](https://midnames.com) — decentralized name service for Midnight\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidnightntwrk%2Fmidnight-tip-jar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmidnightntwrk%2Fmidnight-tip-jar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidnightntwrk%2Fmidnight-tip-jar/lists"}