{"id":19178072,"url":"https://github.com/cmdruid/nostr-cl-connect","last_synced_at":"2025-10-12T21:27:46.855Z","repository":{"id":117493252,"uuid":"552052628","full_name":"cmdruid/nostr-cl-connect","owner":"cmdruid","description":"Magically connect to your lightning node using Nostr.","archived":false,"fork":false,"pushed_at":"2022-10-15T22:42:35.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-04T02:51:42.541Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmdruid.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}},"created_at":"2022-10-15T17:54:35.000Z","updated_at":"2023-08-21T18:19:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9b6cfa9-a183-4b4c-9c54-8d4114edc435","html_url":"https://github.com/cmdruid/nostr-cl-connect","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdruid%2Fnostr-cl-connect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdruid%2Fnostr-cl-connect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdruid%2Fnostr-cl-connect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmdruid%2Fnostr-cl-connect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmdruid","download_url":"https://codeload.github.com/cmdruid/nostr-cl-connect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240254946,"owners_count":19772514,"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":"2024-11-09T10:36:52.589Z","updated_at":"2025-10-12T21:27:41.782Z","avatar_url":"https://github.com/cmdruid.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nostr-cl-connect\nMagically connect to your core lightning node using Nostr.\n\n## How to Use\n```bash\n## Clone this repo into your plugin folder.\ncd ~/.lightning/plugins\ngit clone \u003cthis repo url\u003e\n\n## Enter the folder and install dependencies.\ncd nostr-cl-connect\nyarn install || npm install\n\n## Add these configurations to your lightning config file.\nplugin=~/.lightning/plugins/nostr-cl-connect\nrelayUrl=\u003cdomain name your nostr relay, minus the wss://\u003e\nsecretKey=\u003csecret key used to encrypt/tag your traffic\u003e\n```\n\n## Connecting a Client\nSimply install / import the `nostr-emitter` library into your project, and setup a `NostrEmitter` using the same relay and secret key as configured in your plugin. For more information, see https://github.com/cmdruid/nostr-emitter\n\n## Event API\n```js\n/* Use this event to make any RPC call. You will receive \n * a 'response' event with a data object. \n */\n\nemitter.emit('call', [ \n  methodName,  // The name of the RPC call (as a string).\n  methodArgs   // A string, array of strings, or null.\n])\n\nemitter.on('response', (\n  eventParams, // The response object from your node.\n  metaData     // Metadata about the nostr event.\n) =\u003e {\n  // Your function logic goes here.\n})\n\n/* Subscribe to any events from your lightning node. */\nemitter.on('eventName', (\n  eventParams, // The response object from your node.\n  metaData     // Metadata about the nostr event.\n) =\u003e {\n  // Your function logic goes here.\n})\n\n/* List of subscribed events. */\nconst notifications = [\n  'channel_opened',\n  'channel_open_failed',\n  'channel_state_changed',\n  'connect',\n  'disconnect',\n  'invoice_payment',\n  'invoice_creation',\n  'warning',\n  'forward_event',\n  'sendpay_success',\n  'sendpay_failure',\n  'coin_movement',\n  'balance_snapshot',\n  'openchannel_peer_sigs',\n  'shutdown',\n]\n\nconst hooks = [\n  'peer_connected',\n  'commitment_revocation',\n  'db_write',\n  'openchannel',\n  'openchannel2',\n  'htlc_accepted',\n  'custommsg',\n  'onion_message_blinded',\n  'onion_message_ourpath'\n]\n```\n\n## Contributions\nFeel free to contribute!\n\n## Thanks\nSpecial thanks to [@niftynei](https://github.com/niftynei) for helping to squash a silly bug.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmdruid%2Fnostr-cl-connect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmdruid%2Fnostr-cl-connect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmdruid%2Fnostr-cl-connect/lists"}