{"id":47572560,"url":"https://github.com/getAlby/js-sdk","last_synced_at":"2026-04-14T17:00:50.351Z","repository":{"id":103951845,"uuid":"552133534","full_name":"getAlby/js-sdk","owner":"getAlby","description":"JavaScript SDK for the Alby OAuth2 Wallet API and the Nostr Wallet Connect API.","archived":false,"fork":false,"pushed_at":"2026-03-13T16:04:29.000Z","size":1604,"stargazers_count":85,"open_issues_count":35,"forks_count":40,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-03-14T04:35:47.446Z","etag":null,"topics":["bitcoin","javascript","lightning-network","nostr","nostrwalletconnect","oauth2","sdk"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/@getalby/sdk","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getAlby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-10-15T22:33:27.000Z","updated_at":"2026-03-13T16:04:34.000Z","dependencies_parsed_at":"2026-02-13T12:02:47.509Z","dependency_job_id":null,"html_url":"https://github.com/getAlby/js-sdk","commit_stats":{"total_commits":317,"total_committers":11,"mean_commits":"28.818181818181817","dds":0.5678233438485805,"last_synced_commit":"bb3911fec29b591a9d5e9f43eac2890cdf685ce5"},"previous_names":["getalby/js-sdk"],"tags_count":57,"template":false,"template_full_name":null,"purl":"pkg:github/getAlby/js-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getAlby%2Fjs-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getAlby%2Fjs-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getAlby%2Fjs-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getAlby%2Fjs-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getAlby","download_url":"https://codeload.github.com/getAlby/js-sdk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getAlby%2Fjs-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31806209,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","javascript","lightning-network","nostr","nostrwalletconnect","oauth2","sdk"],"created_at":"2026-03-30T21:00:21.932Z","updated_at":"2026-04-14T17:00:50.346Z","avatar_url":"https://github.com/getAlby.png","language":"TypeScript","funding_links":[],"categories":["Libraries"],"sub_categories":["Client reviews and/or comparisons"],"readme":"# Alby JS SDK\n\n## Introduction\n\nBuild zero-custody bitcoin payments into apps with a few lines of code.\n\nThis JavaScript SDK is for interacting with a bitcoin lightning wallet via Nostr Wallet Connect or the Alby Wallet API.\n\nBefore you start coding, look at example scenarios in our **[Developer Sandbox](https://sandbox.albylabs.com/)**\n\n## 🤖 🚀 ⚡ For Developers using Agents / LLMs / Vibe Coding\n\nSkip the rest of this README and use the [Alby Bitcoin Builder Skill](https://github.com/getAlby/builder-skill) instead. It will handle the rest!\n\n## Manual Installation\n\n```bash\nnpm install @getalby/sdk\n```\n\nor\n\n```bash\nyarn add @getalby/sdk\n```\n\nor for use without any build tools:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import {\n    LN /* or NWCClient, or NostrWebLNProvider */,\n  } from \"https://esm.sh/@getalby/sdk@7.0.0\"; // jsdelivr.net, skypack.dev also work\n\n  // ... then use the SDK as normal (see below)\n\u003c/script\u003e\n```\n\n## Lightning Network Client (LN) Documentation\n\nQuickly get started adding lightning payments to your app.\n\n\u003e The easiest way to provide credentials is with an [NWC connection secret](https://nwc.dev). Get one in minutes by connecting to [Alby Hub](https://albyhub.com/), [coinos](https://coinos.io/apps/new), [Primal](https://primal.net/downloads), [lnwallet.app](https://lnwallet.app/), [Yakihonne](https://yakihonne.com/), [or other NWC-enabled wallets](https://github.com/getAlby/awesome-nwc?tab=readme-ov-file#nwc-wallets).\n\nFor example, to make a payment:\n\n```js\nimport { LN, USD } from \"@getalby/sdk/lnclient\";\nconst credentials = \"nostr+walletconnect://...\"; // the NWC connection credentials\nawait new LN(credentials).pay(\"lnbc...\"); // pay a lightning invoice\nawait new LN(credentials).pay(\"hello@getalby.com\", USD(1)); // or pay $1 USD to a lightning address\n```\n\nOr to request to receive a payment:\n\n```js\nconst request = await new LN(credentials).requestPayment(USD(1.0));\n// give request.invoice to someone...\nrequest.onPaid(giveAccess);\n```\n\n[Read more](./docs/lnclient.md)\n\nFor more flexibility you can access the underlying NWC wallet directly. Continue to read the Nostr Wallet Connect documentation below.\n\n## Nostr Wallet Connect Documentation\n\n[Nostr Wallet Connect](https://nwc.dev) is an open protocol enabling applications to interact with bitcoin lightning wallets. It allows users to connect their existing wallets to your application allowing developers to easily integrate bitcoin lightning functionality.\n\nFor apps, see [NWC client and NWA client documentation](./docs/nwc.md)\n\nFor wallet services, see [NWC wallet service documentation](./docs/nwc-wallet-service.md)\n\n## Alby Wallet API Documentation\n\nThe [Alby OAuth API](https://guides.getalby.com/alby-wallet-api/reference/getting-started) allows you to integrate bitcoin lightning functionality provided by the Alby Wallet into your applications, with the Alby Wallet API. Send \u0026 receive payments, create invoices, setup payment webhooks, access Podcasting 2.0 and more!\n\n[Read more](./docs/oauth.md)\n\n### NodeJS\n\n#### Fetch\n\n**This library relies on a global fetch() function which will work in browsers and node v18.x or newer.** (In older versions you have to use a polyfill.)\n\n#### Websocket polyfill\n\nTo use this on Node.js you first must install `websocket-polyfill@0.0.3` and import it:\n\n```js\nimport \"websocket-polyfill\";\n// or: require('websocket-polyfill');\n```\n\n## WebLN Documentation\n\nThe JS SDK also has some implementations for [WebLN](https://webln.guide).\nSee the [NostrWebLNProvider documentation](./docs/nwc.md) and [OAuthWebLNProvider documentation](./docs/oauth.md).\n\n## More Documentation\n\nRead the [auto-generated documentation](https://getalby.github.io/js-sdk/modules.html)\n\n## Need help?\n\nWe are happy to help, please contact us or create an issue.\n\n- [Twitter: @getAlby](https://twitter.com/getAlby)\n- [Telegram Community Chat](https://t.me/getAlby)\n- e-mail to support@getalby.com\n- [bitcoin.design](https://bitcoin.design/) Slack community [#lightning-browser-extension](https://bitcoindesign.slack.com/archives/C02591ADXM2)\n- Read the [Alby developer guide](https://guides.getalby.com/developer-guide) to better understand how Alby packages and APIs can be used to power your app.\n\n## Thanks\n\nThe client and the setup is inspired and based on the [twitter-api-typescript-sdk](https://github.com/twitterdev/twitter-api-typescript-sdk).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FgetAlby%2Fjs-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FgetAlby%2Fjs-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FgetAlby%2Fjs-sdk/lists"}