{"id":30662599,"url":"https://github.com/shocknet/clink-demo","last_synced_at":"2025-08-31T16:39:36.186Z","repository":{"id":255910463,"uuid":"853479494","full_name":"shocknet/clink-demo","owner":"shocknet","description":"CLINK Playground","archived":false,"fork":false,"pushed_at":"2025-08-15T21:35:35.000Z","size":1579,"stargazers_count":3,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-26T09:46:20.938Z","etag":null,"topics":["bitcoin","lightning","lightning-network","nostr","p2p","payments"],"latest_commit_sha":null,"homepage":"https://clinkme.dev","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shocknet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["shocknet"]}},"created_at":"2024-09-06T18:33:39.000Z","updated_at":"2025-08-15T21:35:38.000Z","dependencies_parsed_at":"2025-05-18T22:54:15.609Z","dependency_job_id":"a7409f75-fcff-4827-99da-b8ee34d95576","html_url":"https://github.com/shocknet/clink-demo","commit_stats":null,"previous_names":["shocknet/nip69-demo","shocknet/clink-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shocknet/clink-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shocknet%2Fclink-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shocknet%2Fclink-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shocknet%2Fclink-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shocknet%2Fclink-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shocknet","download_url":"https://codeload.github.com/shocknet/clink-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shocknet%2Fclink-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273010876,"owners_count":25030367,"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-31T02:00:09.071Z","response_time":79,"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":["bitcoin","lightning","lightning-network","nostr","p2p","payments"],"created_at":"2025-08-31T16:39:31.818Z","updated_at":"2025-08-31T16:39:36.176Z","avatar_url":"https://github.com/shocknet.png","language":"HTML","funding_links":["https://github.com/sponsors/shocknet"],"categories":[],"sub_categories":[],"readme":"# CLINK Demo Client\n\nA minimal web demo built with the [@shocknet/clink-sdk](https://www.npmjs.com/package/@shocknet/clink-sdk).\n\nIt showcases the three core interactions defined by **CLINK** (Common Lightning Interface for Nostr Keys):\n\n1. **Lightning-address discovery** – map an \u003ccode\u003euser@domain\u003c/code\u003e NIP-05 identifier to a \u003ccode\u003eclink_offer\u003c/code\u003e string.\n2. **Offers (`noffer`)** – ask a remote node for a fresh BOLT-11 invoice over Nostr.\n3. **Debits (`ndebit`)** – authorise a remote node to pay a BOLT-11 invoice from your wallet.\n\nEverything flows through Nostr – no HTTP callbacks, WebSockets or Tor-like onion-messages are required.\n\n---\n\n## Running locally\n\n```bash\n# in the clink-demo directory\nnpm install      # first time only\nnpm start        # opens http://localhost:8787\n```\n\nBuild a static bundle:\n\n```bash\nnpm run build    # output in dist/\n```\n\n---\n\n## How to use\n\n### 1. Address checker\n\n• Open the page (it defaults to \u003ccode\u003eindex.html\u003c/code\u003e).  \n• Enter a Lightning Address like \u003ccode\u003ebob@example.com\u003c/code\u003e.  \n• Click **Check Address**.  \n\nThe demo fetches \u003ccode\u003ehttps://example.com/.well-known/nostr.json?name=bob\u003c/code\u003e and reports whether it contains a `clink_offer` entry.\n\n### 2. Generate an invoice from an **Offer**\n\n• Still on \u003ccode\u003eindex.html\u003c/code\u003e, paste a `noffer` string (or use the default).  \n• Click **Decode Offer** → **Get Invoice**.  \n\nThe SDK signs and sends a `noffer_request` event with an ephemeral key cached in `localStorage`. Once the provider replies the BOLT-11 is displayed and rendered as a QR code.\n\n### 3. Pay an invoice with a **Debit**\n\n• Navigate to \u003ccode\u003edebit.html\u003c/code\u003e.  \n• Paste an `ndebit` string (generated by a CLINK-capable wallet like **ShockWallet**).  \n• Paste a BOLT-11 to be paid.  \n• Click **Pay Invoice**.\n\nThe SDK builds an `ndebit_payment_request` event, signs it, and waits for the provider's reply.\n\n---\n\n## Project layout\n\n```\nclink-demo\n│\n├── src/               # TypeScript, HTML \u0026 CSS sources\n│   ├── index.ts       # Address checker + Offer flow\n│   ├── debit.ts       # Debit flow\n│   ├── utils.ts       # localStorage-backed client key helper\n│   └── styles.css\n├── dist/              # Compiled output (to verify demo)\n├── webpack.config.js  # Build pipeline\n└── tsconfig.json\n```\n\n---\n\n## Contributing\n\nPRs and issues welcome. Protocol discussions live in the main [CLINK repository](https://github.com/shocknet/clink).\n\n---\n\n## License\n\nMIT\n\n## Links\n\n- [CLINK Specification](https://github.com/shocknet/clink)\n- [CLINK Enabled Node](https://github.com/shocknet/Lightning.Pub)\n- [CLINK Enabled Wallet](https://shockwallet.app)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshocknet%2Fclink-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshocknet%2Fclink-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshocknet%2Fclink-demo/lists"}