├── .env ├── .eslintignore ├── .eslintrc.cjs ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ └── lint-check-build.yml ├── .gitignore ├── .npmrc ├── .nvmrc ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── SECURITY.md ├── package.json ├── postcss.config.js ├── src ├── app.css ├── app.d.ts ├── app.html ├── components │ ├── AddConversation.svelte │ ├── AddConversationButton.svelte │ ├── Avatar.svelte │ ├── Banner.svelte │ ├── BoxWrapper.svelte │ ├── Button.svelte │ ├── ChannelStatus.svelte │ ├── Chat.svelte │ ├── ChatInput.svelte │ ├── ChatLoading.svelte │ ├── ChatMessages.svelte │ ├── ChatWindow.svelte │ ├── Connect.svelte │ ├── ConversationRow.svelte │ ├── Conversations.svelte │ ├── ConvoNav.svelte │ ├── ConvoView.svelte │ ├── CopyButton.svelte │ ├── Error.svelte │ ├── FaqItem.svelte │ ├── Footer.svelte │ ├── Header.svelte │ ├── Hero.svelte │ ├── HomeNav.svelte │ ├── HomeView.svelte │ ├── Icon.svelte │ ├── InfoTooltip.svelte │ ├── Link.svelte │ ├── LoadingBars.svelte │ ├── LoadingPing.svelte │ ├── Login.svelte │ ├── Message.svelte │ ├── MessageHistory.svelte │ ├── MessageInfo.svelte │ ├── Node.svelte │ ├── Offline.svelte │ ├── Profile.svelte │ ├── PublicLayout.svelte │ ├── RowItem.svelte │ ├── Settings.svelte │ ├── ShareHandler.svelte │ ├── SharedChannel.svelte │ ├── SyncPing.svelte │ ├── Version.svelte │ ├── Warning.svelte │ ├── Wrapper.svelte │ └── index.ts ├── lib │ ├── buffer.ts │ ├── chat.ts │ ├── crypto.ts │ ├── db.ts │ ├── store.ts │ ├── sync.ts │ ├── tlv.ts │ ├── types.ts │ └── utils.ts ├── routes │ ├── +error.svelte │ ├── +layout.svelte │ ├── +layout.ts │ ├── +page.svelte │ ├── donate │ │ └── +page.svelte │ ├── faq │ │ └── +page.svelte │ ├── license │ │ └── +page.svelte │ └── privacy │ │ └── +page.svelte └── service-worker.ts ├── static ├── CNAME ├── audio │ ├── message.mp3 │ └── notification.mp3 ├── cipherchat.webmanifest ├── favicon.png ├── fonts │ ├── Press_Start_2P │ │ ├── OFL.txt │ │ └── PressStart2P-Regular.ttf │ └── Roboto_Mono │ │ ├── LICENSE.txt │ │ └── RobotoMono-VariableFont_wght.ttf ├── icons │ ├── feather-sprite.svg │ ├── icon.png │ └── pwa │ │ ├── android │ │ ├── android-launchericon-144-144.png │ │ ├── android-launchericon-192-192.png │ │ ├── android-launchericon-48-48.png │ │ ├── android-launchericon-512-512.png │ │ ├── android-launchericon-72-72.png │ │ └── android-launchericon-96-96.png │ │ ├── ios │ │ ├── 100.png │ │ ├── 1024.png │ │ ├── 114.png │ │ ├── 120.png │ │ ├── 128.png │ │ ├── 144.png │ │ ├── 152.png │ │ ├── 16.png │ │ ├── 167.png │ │ ├── 180.png │ │ ├── 192.png │ │ ├── 20.png │ │ ├── 256.png │ │ ├── 29.png │ │ ├── 32.png │ │ ├── 40.png │ │ ├── 50.png │ │ ├── 512.png │ │ ├── 57.png │ │ ├── 58.png │ │ ├── 60.png │ │ ├── 64.png │ │ ├── 72.png │ │ ├── 76.png │ │ ├── 80.png │ │ └── 87.png │ │ ├── maskable │ │ ├── maskable_icon_x128.png │ │ ├── maskable_icon_x192.png │ │ ├── maskable_icon_x384.png │ │ ├── maskable_icon_x48.png │ │ ├── maskable_icon_x512.png │ │ ├── maskable_icon_x72.png │ │ └── maskable_icon_x96.png │ │ └── windows11 │ │ ├── LargeTile.scale-100.png │ │ ├── LargeTile.scale-125.png │ │ ├── LargeTile.scale-150.png │ │ ├── LargeTile.scale-200.png │ │ ├── LargeTile.scale-400.png │ │ ├── SmallTile.scale-100.png │ │ ├── SmallTile.scale-125.png │ │ ├── SmallTile.scale-150.png │ │ ├── SmallTile.scale-200.png │ │ ├── SmallTile.scale-400.png │ │ ├── SplashScreen.scale-100.png │ │ ├── SplashScreen.scale-125.png │ │ ├── SplashScreen.scale-150.png │ │ ├── SplashScreen.scale-200.png │ │ ├── SplashScreen.scale-400.png │ │ ├── Square150x150Logo.scale-100.png │ │ ├── Square150x150Logo.scale-125.png │ │ ├── Square150x150Logo.scale-150.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square150x150Logo.scale-400.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-16.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-20.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-24.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-256.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-30.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-32.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-36.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-40.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-44.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-48.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-60.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-64.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-72.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-80.png │ │ ├── Square44x44Logo.altform-lightunplated_targetsize-96.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-16.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-20.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-24.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-256.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-30.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-32.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-36.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-40.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-44.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-48.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-60.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-64.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-72.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-80.png │ │ ├── Square44x44Logo.altform-unplated_targetsize-96.png │ │ ├── Square44x44Logo.scale-100.png │ │ ├── Square44x44Logo.scale-125.png │ │ ├── Square44x44Logo.scale-150.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.scale-400.png │ │ ├── Square44x44Logo.targetsize-16.png │ │ ├── Square44x44Logo.targetsize-20.png │ │ ├── Square44x44Logo.targetsize-24.png │ │ ├── Square44x44Logo.targetsize-256.png │ │ ├── Square44x44Logo.targetsize-30.png │ │ ├── Square44x44Logo.targetsize-32.png │ │ ├── Square44x44Logo.targetsize-36.png │ │ ├── Square44x44Logo.targetsize-40.png │ │ ├── Square44x44Logo.targetsize-44.png │ │ ├── Square44x44Logo.targetsize-48.png │ │ ├── Square44x44Logo.targetsize-60.png │ │ ├── Square44x44Logo.targetsize-64.png │ │ ├── Square44x44Logo.targetsize-72.png │ │ ├── Square44x44Logo.targetsize-80.png │ │ ├── Square44x44Logo.targetsize-96.png │ │ ├── StoreLogo.scale-100.png │ │ ├── StoreLogo.scale-125.png │ │ ├── StoreLogo.scale-150.png │ │ ├── StoreLogo.scale-200.png │ │ ├── StoreLogo.scale-400.png │ │ ├── Wide310x150Logo.scale-100.png │ │ ├── Wide310x150Logo.scale-125.png │ │ ├── Wide310x150Logo.scale-150.png │ │ ├── Wide310x150Logo.scale-200.png │ │ └── Wide310x150Logo.scale-400.png ├── images │ ├── agplv3.png │ ├── bricks │ │ ├── 0.svg │ │ ├── 1.svg │ │ ├── 2.svg │ │ └── 3.svg │ ├── donate-qr.svg │ ├── logo.png │ ├── og.png │ └── screenshots │ │ ├── 0.webp │ │ └── 1.webp ├── robots.txt ├── videos │ └── lnc-tutorial.webm └── wasm-client │ └── lnc-v0.3.1-alpha.wasm ├── svelte.config.js ├── tailwind.config.js ├── tsconfig.json ├── vite.config.ts └── yarn.lock /.env: -------------------------------------------------------------------------------- 1 | # PUBLIC 2 | PUBLIC_VERSION= 3 | PUBLIC_COMMIT= 4 | PUBLIC_WASM_VERSION=lnc-v0.3.1-alpha -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | # Ignore files for PNPM, NPM and YARN 11 | pnpm-lock.yaml 12 | package-lock.json 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: [ 4 | 'eslint:recommended', 5 | 'plugin:@typescript-eslint/recommended', 6 | 'plugin:svelte/recommended', 7 | 'prettier' 8 | ], 9 | parser: '@typescript-eslint/parser', 10 | plugins: ['@typescript-eslint'], 11 | parserOptions: { 12 | sourceType: 'module', 13 | ecmaVersion: 2020, 14 | extraFileExtensions: ['.svelte'] 15 | }, 16 | env: { 17 | browser: true, 18 | es2017: true, 19 | node: true 20 | }, 21 | overrides: [ 22 | { 23 | files: ['*.svelte'], 24 | parser: 'svelte-eslint-parser', 25 | parserOptions: { 26 | parser: '@typescript-eslint/parser' 27 | } 28 | } 29 | ], 30 | rules: { 31 | '@typescript-eslint/ban-ts-comment': 'warn', 32 | '@typescript-eslint/no-explicit-any': 'warn' 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: [getalby.com/p/secondl1ght] 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | --- 8 | 9 | **Describe the bug** 10 | 11 | **To Reproduce** 12 | 13 | **Expected behavior** 14 | 15 | **Screenshots** 16 | 17 | **Additional context** 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: feature request 6 | assignees: '' 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | 11 | **Describe the solution you'd like** 12 | 13 | **Describe alternatives you've considered** 14 | 15 | **Additional context** 16 | -------------------------------------------------------------------------------- /.github/workflows/lint-check-build.yml: -------------------------------------------------------------------------------- 1 | name: Lint, check, build CI 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | 9 | steps: 10 | - uses: actions/checkout@v3 11 | 12 | - name: install modules 13 | run: yarn 14 | 15 | - name: run lint 16 | run: yarn lint 17 | 18 | - name: run check 19 | run: yarn check 20 | 21 | - name: build app 22 | run: yarn build 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | vite.config.js.timestamp-* 7 | vite.config.ts.timestamp-* 8 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | resolution-mode=highest 3 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/* 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | # Ignore files for PNPM, NPM and YARN 11 | pnpm-lock.yaml 12 | package-lock.json 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": true, 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "printWidth": 100, 6 | "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], 7 | "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] 8 | } 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Cipherchat 2 | 3 | **Encrypted messaging over the bitcoin lightning network.** 4 | 5 | ![image](https://github.com/secondl1ght/cipherchat/assets/85003930/dc7ebeb4-9e84-4aa5-8f86-b0d7687c2b17) 6 | 7 | [secondl1ght@protonmail.com](mailto:secondl1ght@protonmail.com) 8 | 9 | [![Netlify Status](https://api.netlify.com/api/v1/badges/7de7da8a-f171-47c1-8d30-1a4d328bd24a/deploy-status)](https://app.netlify.com/sites/cipherchat/deploys) 10 | 11 | ## Tech Stack 12 | 13 | Cipherchat has minimal dependencies with the main packages being as follows: 14 | 15 | - sveltekit 16 | - typescript 17 | - tailwindcss 18 | - lnc-web 19 | - dexie.js 20 | 21 | A large part of the app is the LNC WASM binary which comes bundled with the application. 22 | 23 | For a full list of dependencies check out the `package.json`. 24 | 25 | ## Browser Requirements 26 | 27 | Cipherchat requires the following browser features to be enabled in order to run the app. These features are standard across all major browsers. However, it is possible that they can be disabled in the browser settings. If you receive warnings about missing these features they will have to be adjusted to continue. 28 | 29 | - Service Workers 30 | - Web Assembly 31 | - Local Storage 32 | - IndexedDB 33 | 34 | ## PWA 35 | 36 | Cipherchat is a Progressive Web App that can be installed on many devices and uses native features. 37 | 38 | ## Self-Hosting 39 | 40 | ### Running Locally 41 | 42 | If you only want to use Cipherchat on your local machine you can follow these steps: 43 | 44 | 1. `git clone` the repository 45 | 2. `cd` into the new directory 46 | 3. run `yarn` to install the packages 47 | 4. run `yarn build` to build the application 48 | 5. run `yarn preview` and the app will be served on `localhost:4173` 49 | 50 | To run in development mode you can skip steps 4 & 5 and instead run `yarn dev` which will serve the app on `localhost:5173`. Note that the Service Worker will be unable to register in dev mode if you are using Firefox because that browser does not support [modules](https://web.dev/articles/es-modules-in-sw). 51 | 52 | ### Deploy Globally 53 | 54 | If you would like to run a publicly accessible instance of Cipherchat that you can access remotely, I would recommend forking the repository and deploying with either [Netlify](https://www.netlify.com/) or [Vercel](https://vercel.com/). 55 | 56 | Both providers offer a free tier and have close to one-click deployments that are very easy to setup and maintain. They will also give you a domain that you can access without having to purchase one yourself. 57 | 58 | Once your instance is deployed you can stay in sync with this master branch and these platforms will auto-deploy new commits. 59 | 60 | You can however use any type of server you'd like to deploy Cipherchat ranging from bare-metal to an easily hosted option. 61 | 62 | ### One-Click Installation 63 | 64 | I plan on releasing Cipherchat on these plug-and-play node app stores: 65 | 66 | - [ ] myNode 67 | - [ ] Start9 Embassy 68 | - [ ] Umbrel 69 | 70 | If there are other app stores you would like to see Cipherchat, please let me know! 71 | 72 | ## Want to be inter-operable? 73 | 74 | Cipherchat uses established standards from the [TLV Record Registry](https://github.com/satoshisstream/satoshis.stream/blob/main/TLV_registry.md). Users of Cipherchat could have conversations with other lightning apps if they follow the convention below for attaching `dest_custom_records` 75 | to [keysend](https://docs.lightning.engineering/lightning-network-tools/lnd/send-messages-with-keysend) payments. 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 |
Cipherchat Keysend Custom Record Scheme
KeyValueAdditional Info
5482373484Keysend PreimagePreimage for the invoice.
34349334Message ContentThe chat text, image, or a random UUID if 'PAYMENT' type.
34349343TimestampWhen the message was created measured in nanoseconds since the unix epoch.
34349337SignatureThe output from signing the: (receiver pubkey + timestamp + message) using the private key counterpart of the public key attached.
34349339Sender's PubkeyThis identifies the node associated with the message.
34349345Content TypeCan be one of: 'TEXT', 'IMAGE', 'PAYMENT'. (Currently images are not yet implemented).
121 | 122 | ## License 123 | 124 | [GNU Affero General Public License v3.0](https://www.gnu.org/licenses/agpl-3.0-standalone.html) 125 | 126 | This program is free software: you can redistribute it and/or modify it under the terms of the 127 | GNU Affero General Public License as published by the Free Software Foundation, either version 128 | 3 of the License, or (at your option) any later version. 129 | 130 | This program is distributed in the hope that it will be useful, but 131 | **WITHOUT ANY WARRANTY**; without even the implied warranty of 132 | **MERCHANTABILITY** or **FITNESS FOR A PARTICULAR PURPOSE**. See the 133 | GNU Affero General Public License for more details. 134 | 135 | --- 136 | 137 | 7JJJJJJJJJJJ 7JJJJJJJ^::: 138 | ?5YYYYYYYYYY. .?YYYJJJJ^^^^ 139 | ?YYYYYYYYYYY????????^^^^^^^: 140 | ?YYYYYYYYJYJ????????^^^^^^^: 141 | ?555YYYY????????????^^^^^^^^ 142 | :~^^?JJJ????????!!!!^^^^.... 143 | !J??????????^^^^^^^^ 144 | .:::~!!!!!!~^^^^.... 145 | :^^^^^^^^^^^ 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | :^^^^^^^ :^^^^^^^ 156 | 5#######. G######B 157 | 5#BBBBBB. G#BBBB#G 158 | 5#BBBBBB. P#BBBB#G 159 | !J??G#BBBBBBY??? 7J?JBBBBBBBBJ??? 160 | P####BBBBBBB####. G###BBBBBBBB###B 161 | 5#BBBBBBBBBBBBBB7~~~~~~~Y5555555!~~~~~~~~~~!Y555555Y!~~~~~~!G#BBBBBBBBBBBB#B 162 | 5#BBBBBBBBBBBBBBJ???????B#######J??????????JB######BJ??????JB#BBBBBBBBBBBB#B 163 | 5#BBBBBBBBBBBBBBJ???????B#BBBBBBJ???????????B#BBBBBBJ???????B#BBBBBBBBBBBB#B 164 | .P#BBBBBBBBBBBBBBYJJJJJJJB#BBBBBBYJJJJJJJJJJJB#BBBBBBYJJJJJJJBBBBBBBBBBBBBB#B. 165 | YBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBG 166 | 5###BBBBBBBBBBBBBBBBP5555555BBBBBBBBBBBBBBBBBBBBBBBBBBBBP5555555BBBBBBBBBBBBBBBB###B 167 | Y#BBBBBB#####BBBBBBB. P#BBBBBBBBBB####BBBBBBBBBB#B. P#BBBBBB####BBBBBB#G 168 | Y#BBBBBBYJJJB#BBBBBB. P#BBBBBBBBBBYJJJBBBBBBBBBB#B. P#BBBBBBYJJJBBBBBB#G 169 | Y#BBBBBB. P####BBB P#BBBBBB###B. G####BBBBB#B P#BB###B G#BBBB#G 170 | ^~~~G#BBBBBB7~~~!7!7G#BB7~~~~~~~G#BBBBBB?!7! ~7!7G#BBBBBB7~~~~~~!G#BB?!!!~~~!B#BBBBBB!~~~ 171 | 5####BBBBBBB##&#. 5#BB########BBBBBB#B P#BBBBBB########BB#G G&###BBBBBBB###B 172 | 5#BBBBBBBBBB!^^^7???G#BBBBBBBBBBBBBBBBBBJ???????????B#BBBBBBBBBBBBBBBBBBJ??7~^^~G#BBBBBBBB#B 173 | 5#BBBBBBBBBB. P####BBBBBBBBBBBBBBBBBBB############BBBBBBBBBBBBBBBBBBBB###B G#BBBBBBBB#B 174 | 5#BBBBBBBBBB5YYYB#BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBYYYYBBBBBBBBBB#B 175 | 5#BBBBBBBBBB####BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB####BBBBBBBBBBBB 176 | !JJJJJJJG#BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBYJJJJJJ? 177 | ~???????G#BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBJ??????7 178 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | All versions. 6 | 7 | ## Reporting a Vulnerability 8 | 9 | Please report all issues to [cipherchat@protonmail.com](mailto:cipherchat@protonmail.com) and I will get back to you as soon as possible. If a legitimate vulnerability is found that requires fixing, some sats may be sent in return. Keeping in mind that this is an open source project without funding. If you could include suggested actions to patch the problem that would also be helpful. Thanks. 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cipherchat", 3 | "description": "Encrypted messaging over the bitcoin lightning network.", 4 | "repository": "https://github.com/secondl1ght/cipherchat", 5 | "author": "secondl1ght ", 6 | "license": "AGPL-3.0", 7 | "version": "1.0.3", 8 | "private": true, 9 | "scripts": { 10 | "dev": "PUBLIC_COMMIT=`git log -n 1 --format=%h` vite dev", 11 | "build": "PUBLIC_COMMIT=`git log -n 1 --format=%h` vite build", 12 | "preview": "vite preview", 13 | "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", 14 | "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", 15 | "lint": "prettier --plugin=prettier-plugin-svelte --plugin=prettier-plugin-tailwindcss --check . && eslint .", 16 | "format": "prettier --plugin=prettier-plugin-svelte --plugin=prettier-plugin-tailwindcss --write ." 17 | }, 18 | "devDependencies": { 19 | "@sveltejs/adapter-auto": "^3.2.0", 20 | "@sveltejs/kit": "^2.5.5", 21 | "@sveltejs/vite-plugin-svelte": "^3.1.0", 22 | "@typescript-eslint/eslint-plugin": "^7.6.0", 23 | "@typescript-eslint/parser": "^7.6.0", 24 | "@zerodevx/svelte-toast": "^0.9.5", 25 | "autoprefixer": "^10.4.19", 26 | "eslint": "8.57.0", 27 | "eslint-config-prettier": "^9.1.0", 28 | "eslint-plugin-svelte": "^2.37.0", 29 | "postcss": "^8.4.38", 30 | "prettier": "^3.2.5", 31 | "prettier-plugin-svelte": "^3.2.3", 32 | "prettier-plugin-tailwindcss": "^0.5.13", 33 | "svelte": "^4.2.14", 34 | "svelte-check": "^3.6.9", 35 | "tailwindcss": "^3.4.3", 36 | "tslib": "^2.6.2", 37 | "typescript": "^5.4.5", 38 | "vite": "^5.2.8" 39 | }, 40 | "type": "module", 41 | "dependencies": { 42 | "@emoji-mart/data": "^1.1.2", 43 | "@lightninglabs/lnc-web": "^0.3.1-alpha", 44 | "buffer": "^6.0.3", 45 | "date-fns": "^3.6.0", 46 | "dexie": "^4.0.4", 47 | "emoji-mart": "^5.5.2", 48 | "linkify-string": "^4.1.3", 49 | "linkifyjs": "^4.1.3", 50 | "numbro": "^2.5.0", 51 | "qr-scanner": "^1.4.2", 52 | "tippy.js": "^6.3.7" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {} 5 | } 6 | }; 7 | -------------------------------------------------------------------------------- /src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | @font-face { 6 | font-family: 'PressStart'; 7 | src: url('/fonts/Press_Start_2P/PressStart2P-Regular.ttf') format('truetype'); 8 | } 9 | 10 | @font-face { 11 | font-family: 'Roboto'; 12 | src: url('/fonts/Roboto_Mono/RobotoMono-VariableFont_wght.ttf') format('truetype'); 13 | } 14 | 15 | @layer base { 16 | html { 17 | font-family: Roboto, sans-serif; 18 | @apply text-base text-body; 19 | } 20 | 21 | ::selection { 22 | @apply bg-button text-header; 23 | } 24 | } 25 | 26 | @layer utilities { 27 | .press-start { 28 | font-family: PressStart, sans-serif; 29 | } 30 | 31 | .center-fixed { 32 | @apply fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2; 33 | } 34 | 35 | /* Hide scrollbar for Chrome, Safari and Opera */ 36 | .hide-scroll::-webkit-scrollbar { 37 | @apply hidden; 38 | } 39 | 40 | /* Hide scrollbar for IE, Edge and Firefox */ 41 | .hide-scroll { 42 | -ms-overflow-style: none; /* IE and Edge */ 43 | scrollbar-width: none; /* Firefox */ 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://kit.svelte.dev/docs/types#app 2 | // for information about these interfaces 3 | declare global { 4 | namespace App { 5 | // interface Error {} 6 | // interface Locals {} 7 | // interface PageData {} 8 | // interface Platform {} 9 | } 10 | } 11 | 12 | export {}; 13 | -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | Cipherchat 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 47 | 48 | 49 | %sveltekit.head% 50 | 51 | 52 | 53 | logo 66 | 67 |
%sveltekit.body%
68 | 69 | 70 | -------------------------------------------------------------------------------- /src/components/AddConversation.svelte: -------------------------------------------------------------------------------- 1 | 31 | 32 |
33 | 36 | 47 | 48 | 67 | 68 | {#if showInfo} 69 |

70 | To start a conversation with another node you need to know it's pubkey. You can discover 71 | pubkeys on a lightning network explorer such as or . 76 |

77 | {/if} 78 |
79 | -------------------------------------------------------------------------------- /src/components/AddConversationButton.svelte: -------------------------------------------------------------------------------- 1 | 5 | 6 | 12 | -------------------------------------------------------------------------------- /src/components/Avatar.svelte: -------------------------------------------------------------------------------- 1 | 16 | 17 |
18 | {#if avatar} 19 | avatar 25 | {:else} 26 |
30 | {pubkey === 'ANON' ? '?' : alias ? alias.charAt(0) : pubkey.charAt(0)} 31 |
32 | {/if} 33 | {#if withButton} 34 | 54 | {/if} 55 |
56 | -------------------------------------------------------------------------------- /src/components/Banner.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 |
8 | {text} 9 |
10 | -------------------------------------------------------------------------------- /src/components/BoxWrapper.svelte: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 |
5 |
6 | -------------------------------------------------------------------------------- /src/components/Button.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 | 47 |
48 | -------------------------------------------------------------------------------- /src/components/ChannelStatus.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 |
20 |

21 |

{channels ?? '-'}

22 |
23 | -------------------------------------------------------------------------------- /src/components/Chat.svelte: -------------------------------------------------------------------------------- 1 | 317 | 318 | 319 | 320 | {#if loading} 321 | 322 | {:else} 323 |
324 | {#if $appView === AppViewState.Home || $innerWidth > 1024} 325 |
326 | 327 |
328 | {/if} 329 | {#if $appView === AppViewState.Convo || $innerWidth > 1024} 330 |
331 | 332 |
333 | {/if} 334 |
335 | {/if} 336 | -------------------------------------------------------------------------------- /src/components/ChatInput.svelte: -------------------------------------------------------------------------------- 1 | 148 | 149 | {#if $conversation} 150 | {#if $showScrollButton} 151 | {#if $conversation.unread} 152 |
156 |
157 |
158 | 159 |
160 |
161 | {/if} 162 | 163 | 171 | {/if} 172 | 173 |
177 |
178 |
183 | 184 | 200 | 201 |