{"id":19001438,"url":"https://github.com/bumi/lnurl-ruby","last_synced_at":"2025-06-18T06:38:58.615Z","repository":{"id":56881738,"uuid":"262137484","full_name":"bumi/lnurl-ruby","owner":"bumi","description":"LNURL tools for Ruby","archived":false,"fork":false,"pushed_at":"2024-08-05T13:24:17.000Z","size":21,"stargazers_count":10,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-27T21:45:14.569Z","etag":null,"topics":["bitcoin","lightning","lightning-network","lnurl"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/bumi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2020-05-07T19:13:32.000Z","updated_at":"2024-11-23T19:50:25.000Z","dependencies_parsed_at":"2024-08-05T15:40:07.160Z","dependency_job_id":null,"html_url":"https://github.com/bumi/lnurl-ruby","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"780481c1f003077084f533787c1eb7b0bd9b6a3e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bumi/lnurl-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumi%2Flnurl-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumi%2Flnurl-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumi%2Flnurl-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumi%2Flnurl-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bumi","download_url":"https://codeload.github.com/bumi/lnurl-ruby/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bumi%2Flnurl-ruby/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260506668,"owners_count":23019419,"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":["bitcoin","lightning","lightning-network","lnurl"],"created_at":"2024-11-08T18:11:10.226Z","updated_at":"2025-06-18T06:38:53.595Z","avatar_url":"https://github.com/bumi.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LNURL tools for Ruby\n\nLNURL is a protocol for interaction between Lightning wallets and third-party services.\n\nThis gem provides helpers to work with LNURLs from Ruby.\n\n\n## Links:\n\n* [LNURL: Lightning Network UX protocol RFC](https://github.com/btcontract/lnurl-rfc)\n* [Awesome LNURL - a curated list with things related to LNURL](https://github.com/fiatjaf/awesome-lnurl)\n* [LNURL pay flow](https://xn--57h.bigsun.xyz/lnurl-pay-flow.txt)\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'lnurl'\n```\n\nOr install it yourself as:\n\n    $ gem install lnurl\n\n## Usage\n\n### Encoding\n\n```ruby\nlnurl = Lnurl.new('https://lnurl.com/pay')\nputs lnurl.to_bech32 # =\u003e LNURL1DP68GURN8GHJ7MRWW4EXCTNRDAKJ7URP0YVM59LW\n```\n\n### Decoding\n\n```ruby\nLnurl.valid?('nolnurl') #=\u003e false\n\nlnurl = Lnurl.decode('LNURL1DP68GURN8GHJ7MRWW4EXCTNRDAKJ7URP0YVM59LW')\nlnurl.uri # =\u003e #\u003cURI::HTTPS https://lnurl.com/pay\u003e\n```\n\nBy default we accept long LNURLs but you can configure a custom max length:\n```ruby\nlnurl = Lnurl.decode(a_short_lnurl, 90)\n```\n\n### [Lightning Address](https://github.com/andrerfneves/lightning-address)\n\n```ruby\nlnurl = Lnurl.from_lightning_address('user@lnurl.com')\nlnurl.uri # =\u003e #\u003cURI::HTTPS https://lnurl.com/.well-known/lnurlp/user\u003e\n```\n\n### LNURL responses\n\n```ruby\nlnurl = Lnurl.decode('LNURL1DP68GURN8GHJ7MRWW4EXCTNRDAKJ7URP0YVM59LW')\nresponse = lnurl.response # =\u003e #\u003cLnurl::LnurlResponse status=\"OK\" ...\nresponse.status # =\u003e OK / ERROR\nresponse.callback # =\u003e https://...\nresponse.tag # =\u003e payRequest\nresponse.maxSendable # =\u003e 100000000\nresponse.minSendable # =\u003e 1000\nresponse.metadata # =\u003e [...]\n\ninvoice = response.request_invoice(amount: 100000) # (amount in msats) #\u003cLnurl::InvoiceResponse status=\"OK\"\n# or:\ninvoice = lnurl.request_invoice(amount: 100000) # (amount in msats)\n\ninvoice.status # =\u003e OK / ERROR\ninvoice.pr # =\u003e lntb20u1p0tdr7mpp...\ninvoice.successAction # =\u003e {...}\ninvoice.routes # =\u003e [...]\n\n```\n\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/bumi/lnurl-ruby.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbumi%2Flnurl-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbumi%2Flnurl-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbumi%2Flnurl-ruby/lists"}