{"id":28431768,"url":"https://github.com/block/ln-invoice","last_synced_at":"2026-02-10T01:09:49.205Z","repository":{"id":182732449,"uuid":"668459582","full_name":"block/ln-invoice","owner":"block","description":"Parse lightning network payment requests (invoices) in Kotlin.","archived":false,"fork":false,"pushed_at":"2026-01-13T23:09:53.000Z","size":106,"stargazers_count":18,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-24T22:39:06.787Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://block.github.io/ln-invoice/","language":"Kotlin","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/block.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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":"2023-07-19T21:29:52.000Z","updated_at":"2026-01-13T23:09:57.000Z","dependencies_parsed_at":"2024-02-20T07:31:49.479Z","dependency_job_id":"280210d8-85fa-40b6-8af0-37fcb34e5fde","html_url":"https://github.com/block/ln-invoice","commit_stats":null,"previous_names":["cashapp/ln-invoice","block/ln-invoice"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/block/ln-invoice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block%2Fln-invoice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block%2Fln-invoice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block%2Fln-invoice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block%2Fln-invoice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/block","download_url":"https://codeload.github.com/block/ln-invoice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block%2Fln-invoice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29055975,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T20:13:53.544Z","status":"ssl_error","status_checked_at":"2026-02-03T20:13:40.507Z","response_time":96,"last_error":"SSL_read: 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":[],"created_at":"2025-06-05T16:08:19.908Z","updated_at":"2026-02-10T01:09:49.183Z","avatar_url":"https://github.com/block.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"![LN Invoice Logo](./images/ln-invoice-transparent.png)\n\nParse Bitcoin Lightning Network invoices (payment requests) in Kotlin. This library implements decoding of invoices as per\n[BOLT-11: # Invoice Protocol for Lightning Payments](https://github.com/lightning/bolts/blob/master/11-payment-encoding.md#bolt-11-invoice-protocol-for-lightning-payments)\n\n[\u003cimg src=\"https://img.shields.io/nexus/r/app.cash.lninvoice/ln-invoice.svg?label=latest%20release\u0026server=https%3A%2F%2Foss.sonatype.org\"/\u003e](https://central.sonatype.com/namespace/app.cash.lninvoice)\n\n## Getting Started\n\nOn the [Sonatype page for ln-invoice](https://central.sonatype.com/namespace/app.cash.lninvoice), choose the latest version\nof `ln-invoice` and follow the instructions for inclusion in your build tool.\n\n### Parsing a payment request\n\n```kotlin\nconst val sample = \"lnbc25m1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdq\" +\n  \"5vdhkven9v5sxyetpdeessp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygs9q5sqqqqqq\" +\n  \"qqqqqqqqqpqsq67gye39hfg3zd8rgc80k32tvy9xk2xunwm5lzexnvpx6fd77en8qaq424dxgt56cag2dpt359\" +\n  \"k3ssyhetktkpqh24jqnjyw6uqd08sgptq44qu\"\n\nval request: ErrorOr\u003cPaymentRequest\u003e = PaymentRequest.parse(sample)\n```\n\nSee `app.cash.lninvoice.PaymentRequestTest` for more parsing examples, lifted directly from the BOLT-11 spec.\n\nLN-Invoice is functional programming safe by default, using [Quiver](https://github.com/block/quiver)\n(an extension of [Arrow](https://arrow-kt.io/)). If you prefer to deal with thrown exceptions when parsing,\nsimply add `.orThrow()`.\n\n```kotlin\nval request: PaymentRequest = PaymentRequest.parse(sample).orThrow()\n```\n\nFields in `PaymentRequest` instances that contain binary data use \n[Okio's ByteString](https://square.github.io/okio/).\nIf you need this as a byte array, call `.toByteArray()`\n\n```kotlin\nval signature: ByteString = invoice.signature\nval sigBytes: ByteArray = signature.toByteArray()\n```\n\n\n## Documentation\n\nThe [API documentation](https://block.github.io/ln-invoice) is published with each release.\n\n## Changelog\n\nSee a list of changes in each release in the [CHANGELOG](CHANGELOG.md).\n\n## Contributing\n\n### Building\n\n1. Install [Hermit](https://cashapp.github.io/hermit/), the hermetic project tooling tool.\n\n2. Use `gradle` to run all tests locally:\n\n```shell\ngradle build\n```\n\nFor more details on contributing, see the [CONTRIBUTING](CONTRIBUTING.md) guide.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock%2Fln-invoice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblock%2Fln-invoice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock%2Fln-invoice/lists"}