diff --git a/package-lock.json b/package-lock.json
index b9e84cc..b0e848b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,6 +9,7 @@
"version": "0.1.0",
"license": "MIT",
"dependencies": {
+ "@getalby/bitcoin-connect-react": "^3.6.3",
"@noble/hashes": "^1.6.1",
"@radix-ui/react-alert-dialog": "^1.1.4",
"@radix-ui/react-avatar": "^1.1.2",
@@ -24,6 +25,7 @@
"@radix-ui/react-switch": "^1.1.2",
"@radix-ui/react-tabs": "^1.1.2",
"@radix-ui/react-toast": "^1.2.4",
+ "@webbtc/webln-types": "^3.0.0",
"blurhash": "^2.0.5",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
@@ -2107,6 +2109,92 @@
"resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.8.tgz",
"integrity": "sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig=="
},
+ "node_modules/@getalby/bitcoin-connect": {
+ "version": "3.6.3",
+ "resolved": "https://registry.npmjs.org/@getalby/bitcoin-connect/-/bitcoin-connect-3.6.3.tgz",
+ "integrity": "sha512-mS3hmKGF8P7RH06DFtawc6T738iwz+wGz28XR46tMDKGfZjPrpcCG7R8Wy7n0w1JBgf7Nec79edQ5cDM1Pbrrw==",
+ "dependencies": {
+ "@getalby/lightning-tools": "^5.1.0",
+ "@getalby/sdk": "^3.8.0",
+ "@lightninglabs/lnc-web": "^0.3.2-alpha",
+ "qrcode-generator": "^1.4.4",
+ "zustand": "^4.5.5"
+ }
+ },
+ "node_modules/@getalby/bitcoin-connect-react": {
+ "version": "3.6.3",
+ "resolved": "https://registry.npmjs.org/@getalby/bitcoin-connect-react/-/bitcoin-connect-react-3.6.3.tgz",
+ "integrity": "sha512-tDomhNtXl94Z2YNQa52UpZUfZhdSwLEWgaOg6bCoLEJO0SqemUcKOrIIB/Y6DYm5XliktD7bLtvB4rJoFE74QQ==",
+ "dependencies": {
+ "@getalby/bitcoin-connect": "^3.6.3"
+ },
+ "peerDependencies": {
+ "react": "^18.2.0"
+ }
+ },
+ "node_modules/@getalby/lightning-tools": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmjs.org/@getalby/lightning-tools/-/lightning-tools-5.1.2.tgz",
+ "integrity": "sha512-BwGm8eGbPh59BVa1gI5yJMantBl/Fdps6X4p1ZACnmxz9vDINX8/3aFoOnDlF7yyA2boXWCsReVQSr26Q2yjiQ==",
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "type": "lightning",
+ "url": "lightning:hello@getalby.com"
+ }
+ },
+ "node_modules/@getalby/sdk": {
+ "version": "3.9.0",
+ "resolved": "https://registry.npmjs.org/@getalby/sdk/-/sdk-3.9.0.tgz",
+ "integrity": "sha512-qgNXr4FsX0a+PPvWgb112Q8h1/ov31zVP4LjsDYr5+W0CkrRbW9pQnsHPycVPLB5H8k5WVRRNkxYBBoWIBAwyw==",
+ "dependencies": {
+ "emittery": "^1.0.3",
+ "nostr-tools": "2.9.4"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "type": "lightning",
+ "url": "lightning:hello@getalby.com"
+ }
+ },
+ "node_modules/@getalby/sdk/node_modules/@noble/hashes": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.1.tgz",
+ "integrity": "sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA==",
+ "engines": {
+ "node": ">= 16"
+ },
+ "funding": {
+ "url": "https://paulmillr.com/funding/"
+ }
+ },
+ "node_modules/@getalby/sdk/node_modules/nostr-tools": {
+ "version": "2.9.4",
+ "resolved": "https://registry.npmjs.org/nostr-tools/-/nostr-tools-2.9.4.tgz",
+ "integrity": "sha512-Powumwkp+EWbdK1T8IsEX4daTLQhtWJvitfZ6OP2BdU1jJZvNlUp3SQB541UYw4uc9jgLbxZW6EZSdZoSfIygQ==",
+ "dependencies": {
+ "@noble/ciphers": "^0.5.1",
+ "@noble/curves": "1.2.0",
+ "@noble/hashes": "1.3.1",
+ "@scure/base": "1.1.1",
+ "@scure/bip32": "1.3.1",
+ "@scure/bip39": "1.2.1"
+ },
+ "optionalDependencies": {
+ "nostr-wasm": "v0.1.0"
+ },
+ "peerDependencies": {
+ "typescript": ">=5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "typescript": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@humanfs/core": {
"version": "0.19.1",
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz",
@@ -2237,6 +2325,20 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
+ "node_modules/@lightninglabs/lnc-core": {
+ "version": "0.3.2-alpha",
+ "resolved": "https://registry.npmjs.org/@lightninglabs/lnc-core/-/lnc-core-0.3.2-alpha.tgz",
+ "integrity": "sha512-H6tG+X9txCIdxTR+GPsbImzP2Juo+6Uvq/Ipaijd7xPISzgEU4J4GNE5PEHuIZqbnBo1RmpuXnFG6dmsl3PTzQ=="
+ },
+ "node_modules/@lightninglabs/lnc-web": {
+ "version": "0.3.2-alpha",
+ "resolved": "https://registry.npmjs.org/@lightninglabs/lnc-web/-/lnc-web-0.3.2-alpha.tgz",
+ "integrity": "sha512-3aCBugBf0NzczpJqmHn03Oq2Ju9W5n0+nOdAe+Y/Zhf6YLXdqG1PTJ2J+7TXncpiogfPYDCw95tVQqSi4Zi/ZA==",
+ "dependencies": {
+ "@lightninglabs/lnc-core": "0.3.2-alpha",
+ "crypto-js": "4.2.0"
+ }
+ },
"node_modules/@noble/ciphers": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.5.3.tgz",
@@ -4034,6 +4136,15 @@
"vite": "^4.2.0 || ^5.0.0 || ^6.0.0"
}
},
+ "node_modules/@webbtc/webln-types": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@webbtc/webln-types/-/webln-types-3.0.0.tgz",
+ "integrity": "sha512-aXfTHLKz5lysd+6xTeWl+qHNh/p3qVYbeLo+yDN5cUDmhie2ZoGvkppfWxzbGkcFBzb6dJyQ2/i2cbmDHas+zQ==",
+ "funding": {
+ "type": "lightning",
+ "url": "lightning:hello@getalby.com"
+ }
+ },
"node_modules/acorn": {
"version": "8.14.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz",
@@ -4993,6 +5104,11 @@
"node": ">= 8"
}
},
+ "node_modules/crypto-js": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
+ "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
+ },
"node_modules/crypto-random-string": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
@@ -5226,6 +5342,17 @@
"embla-carousel": "8.5.1"
}
},
+ "node_modules/emittery": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/emittery/-/emittery-1.1.0.tgz",
+ "integrity": "sha512-rsX7ktqARv/6UQDgMaLfIqUWAEzzbCQiVh7V9rhDXp6c37yoJcks12NVD+XPkgl4AEavmNhVfrhGoqYwIsMYYA==",
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sindresorhus/emittery?sponsor=1"
+ }
+ },
"node_modules/emoji-regex": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
@@ -7433,6 +7560,11 @@
"node": ">=6"
}
},
+ "node_modules/qrcode-generator": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/qrcode-generator/-/qrcode-generator-1.4.4.tgz",
+ "integrity": "sha512-HM7yY8O2ilqhmULxGMpcHSF1EhJJ9yBj8gvDEuZ6M+KGJ0YY2hKpnXvRD+hZPLrDVck3ExIGhmPtSdcjC+guuw=="
+ },
"node_modules/qrcode.react": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/qrcode.react/-/qrcode.react-4.2.0.tgz",
@@ -8879,6 +9011,14 @@
}
}
},
+ "node_modules/use-sync-external-store": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.4.0.tgz",
+ "integrity": "sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw==",
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
+ }
+ },
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
@@ -9607,6 +9747,33 @@
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
+ },
+ "node_modules/zustand": {
+ "version": "4.5.6",
+ "resolved": "https://registry.npmjs.org/zustand/-/zustand-4.5.6.tgz",
+ "integrity": "sha512-ibr/n1hBzLLj5Y+yUcU7dYw8p6WnIVzdJbnX+1YpaScvZVF2ziugqHs+LAmHw4lWO9c/zRj+K1ncgWDQuthEdQ==",
+ "dependencies": {
+ "use-sync-external-store": "^1.2.2"
+ },
+ "engines": {
+ "node": ">=12.7.0"
+ },
+ "peerDependencies": {
+ "@types/react": ">=16.8",
+ "immer": ">=9.0.6",
+ "react": ">=16.8"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "immer": {
+ "optional": true
+ },
+ "react": {
+ "optional": true
+ }
+ }
}
}
}
diff --git a/package.json b/package.json
index 00272c9..fb9904e 100644
--- a/package.json
+++ b/package.json
@@ -19,6 +19,7 @@
"preview": "vite preview"
},
"dependencies": {
+ "@getalby/bitcoin-connect-react": "^3.6.3",
"@noble/hashes": "^1.6.1",
"@radix-ui/react-alert-dialog": "^1.1.4",
"@radix-ui/react-avatar": "^1.1.2",
@@ -34,6 +35,7 @@
"@radix-ui/react-switch": "^1.1.2",
"@radix-ui/react-tabs": "^1.1.2",
"@radix-ui/react-toast": "^1.2.4",
+ "@webbtc/webln-types": "^3.0.0",
"blurhash": "^2.0.5",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
diff --git a/src/App.tsx b/src/App.tsx
index 141ca07..ca959b2 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -11,24 +11,27 @@ import { NostrProvider } from './providers/NostrProvider'
import { NoteStatsProvider } from './providers/NoteStatsProvider'
import { RelaySetsProvider } from './providers/RelaySetsProvider'
import { ScreenSizeProvider } from './providers/ScreenSizeProvider'
+import { ZapProvider } from './providers/ZapProvider'
export default function App(): JSX.Element {
return (
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/PageManager.tsx b/src/PageManager.tsx
index 475e9c7..481de5d 100644
--- a/src/PageManager.tsx
+++ b/src/PageManager.tsx
@@ -17,6 +17,7 @@ import {
import ExplorePage from './pages/primary/ExplorePage'
import MePage from './pages/primary/MePage'
import NotificationListPage from './pages/primary/NotificationListPage'
+import { NotificationProvider } from './providers/NotificationProvider'
import { useScreenSize } from './providers/ScreenSizeProvider'
import { routes } from './routes'
@@ -226,28 +227,30 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) {
: 0
}}
>
- {!!secondaryStack.length &&
- secondaryStack.map((item, index) => (
+
+ {!!secondaryStack.length &&
+ secondaryStack.map((item, index) => (
+
+ {item.component}
+
+ ))}
+ {primaryPages.map(({ name, element }) => (
- {item.component}
+ {element}
))}
- {primaryPages.map(({ name, element }) => (
-
- {element}
-
- ))}
+
)
@@ -267,38 +270,40 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) {
currentIndex: secondaryStack.length ? secondaryStack[secondaryStack.length - 1].index : 0
}}
>
-
-
-
-
-
- {primaryPages.map(({ name, element }) => (
-
- {element}
-
- ))}
-
-
- {secondaryStack.map((item, index) => (
-
- {item.component}
+
+
+
+
+
+
+ {primaryPages.map(({ name, element }) => (
+
+ {element}
+
+ ))}
+
+
+ {secondaryStack.map((item, index) => (
+
+ {item.component}
+
+ ))}
+
+
- ))}
-
-
-
+
)
diff --git a/src/components/AboutInfoDialog/index.tsx b/src/components/AboutInfoDialog/index.tsx
index f57e51e..27d699a 100644
--- a/src/components/AboutInfoDialog/index.tsx
+++ b/src/components/AboutInfoDialog/index.tsx
@@ -1,10 +1,13 @@
import { Dialog, DialogContent, DialogTrigger } from '@/components/ui/dialog'
+import { Drawer, DrawerContent, DrawerTrigger } from '@/components/ui/drawer'
+import { CODY_PUBKEY } from '@/constants'
import { useScreenSize } from '@/providers/ScreenSizeProvider'
-import { Drawer, DrawerContent, DrawerTrigger } from '../ui/drawer'
+import { useState } from 'react'
import Username from '../Username'
export default function AboutInfoDialog({ children }: { children: React.ReactNode }) {
const { isSmallScreen } = useScreenSize()
+ const [open, setOpen] = useState(false)
const content = (
<>
@@ -13,12 +16,7 @@ export default function AboutInfoDialog({ children }: { children: React.ReactNod
A beautiful nostr client focused on browsing relay feeds
- Made by{' '}
-
+ Made by
Source code:{' '}
@@ -30,30 +28,26 @@ export default function AboutInfoDialog({ children }: { children: React.ReactNod
>
GitHub
-
-
- If you like this project, you can buy me a coffee ☕️
-
⚡️ codytseng@getalby.com ⚡️
-
-
- Version: v{__APP_VERSION__} ({__GIT_COMMIT__})
+
+ If you like Jumble, please consider giving it a star ⭐
+
>
)
if (isSmallScreen) {
return (
-
+
{children}
- {content}
+ {content}
)
}
return (
-