{"id":28766953,"url":"https://github.com/base/sub-account-demo","last_synced_at":"2025-07-13T08:37:20.856Z","repository":{"id":281236265,"uuid":"940156456","full_name":"base/sub-account-demo","owner":"base","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-12T15:31:51.000Z","size":299,"stargazers_count":4,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-17T12:46:42.042Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://sub-account-demo.vercel.app","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/base.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,"zenodo":null}},"created_at":"2025-02-27T17:49:52.000Z","updated_at":"2025-06-10T04:58:32.000Z","dependencies_parsed_at":"2025-03-07T19:23:18.724Z","dependency_job_id":"c41b1c9a-84e1-471e-8c97-1f687c725988","html_url":"https://github.com/base/sub-account-demo","commit_stats":null,"previous_names":["base/sub-account-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/base/sub-account-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base%2Fsub-account-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base%2Fsub-account-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base%2Fsub-account-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base%2Fsub-account-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/base","download_url":"https://codeload.github.com/base/sub-account-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/base%2Fsub-account-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265110517,"owners_count":23712884,"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":[],"created_at":"2025-06-17T12:37:43.709Z","updated_at":"2025-07-13T08:37:20.847Z","avatar_url":"https://github.com/base.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Coinbase Smart Wallet Sub Accounts Demo\n\nThis is a demo of using Coinbase Smart Wallets with Sub Accounts. View the live version here: [https://sub-account-demo.com](https://sub-account-demo.com)\n\n### The flow of the demo is as follows:\n\n1. Log in or Sign up with your Coinbase Smart Wallet, and connect it to the app.\n2. On connection, the app will request a few permissions to the wallet\n    - To create a Sub Account that is linked to the Coinbase Smart Wallet, that can be used for the app\n    - Permission to spend a certain amount of ETH per day, which creates a [Spend Permission](https://docs.base.org/identity/smart-wallet/features/spend-permissions) on the Coinbase Smart Wallet that is usable by the newly created Sub Account\n3. Once logged in, the app will display a list of trending farcaster posts, each post has a tip button.\n4. When the tip button is clicked, a few things happen:\n    - The app creates a batch transaction that includes 1) approving the Spend Permission that was created during onboarding 2) pulling the ETH from the Coinbase Smart Wallet to the Sub Account 3) sending the ETH to the farcaster user as a tip\n\n    \n## Setup\n\n1. (optional) This demo uses Neynar to fetch live farcaster posts. To run it with live data you'll need a Neynar API key which you can get [here](https://neynar.com/). After signing up, you'll need to create an API key and set the Neynar environment variable in the `.env` file.\n2. (optional) This demo also supports using different signer implementations to power the Sub Accounts. Browser keys are the default, but you can also use [Turnkey](https://www.turnkey.com/) server wallets. To use Turnkey, you'll need to create an account and set the relevant Turnkey environment variables in the `.env` file.\n\n\nThis is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).\n\n## Getting Started\n\nFirst, run the development server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n# or\npnpm dev\n# or\nbun dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) with your browser to see the result.\n\nYou can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.\n\nThis project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.\n\n## Learn More\n\nTo learn more about Next.js, take a look at the following resources:\n\n- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.\n- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.\n\nYou can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!\n\n## Deploy on Vercel\n\nThe easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template\u0026filter=next.js\u0026utm_source=create-next-app\u0026utm_campaign=create-next-app-readme) from the creators of Next.js.\n\nCheck out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbase%2Fsub-account-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbase%2Fsub-account-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbase%2Fsub-account-demo/lists"}