Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

support lnurl fallback scheme. #302

Merged
merged 7 commits into from
Oct 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![Chat](https://img.shields.io/badge/chat-on%20Telegram-blue?style=flat-square)](https://t.me/Shockwallet)
[![Twitter Follow](https://img.shields.io/twitter/follow/ShockBTC?style=flat-square)](https://twitter.com/shockbtc)

![Banner](https://pbs.twimg.com/profile_banners/971667736978972673/1598594052)
Shockwallet connects to your remote Lightning node, it overlays [graph user nodes](https://gun.eco/) for a decentralized social network.

Running a Shockwallet node requires the [Shock API](https://github.com/shocknet/api) backend, and [LND](https://github.com/lightningnetwork/lnd)
Expand All @@ -14,27 +15,25 @@ Running a Shockwallet node requires the [Shock API](https://github.com/shocknet/


- [X] Basic LND Channel and Peer Management
- [X] Fee Control
- [X] Fee Control from [mempool.space](https://github.com/mempool/mempool) source
- [X] LNURL-Pay, Withdraw and Channel
- [X] Social Personas
- [X] Social Personas, Presence Indication and Feeds
- [X] E2EEncrypted Chat/Messaging
- [X] Automatic Seed and Channel Backup
- [X] E2EEncrypted Chat Messaging
- [X] Online Presence Indication
- [X] Sender-Initiated Payments
- [X] Provider-less Notifications
- [X] Node-Disconnected Notification Settings
- [X] LND 10 with Keysend & Multi-Shard Payments
- [X] Liquidity Pre-Checks
- [X] Sender-Initiated Payments (Keysend-less)
- [X] Provider-less Notifications with node monitor (Android only)
- [X] LND 11 with Keysend & MPP (sharded payments)
- [X] Invoice liquidity intercept
- [X] Torrent Content Streaming
- [X] Torrent Publishing and Seed Service
- [X] Guest Webclient (prototype)
- [ ] Advanced Coin Control
- [ ] Advanced Coin Control and PSBT
- [ ] Advanced Channel Management
- [ ] Automatic Swaps
- [ ] Portable LNURL-Auth Keyring


## [Download Android APK](https://github.com/shocknet/wallet/releases/download/untagged-e06d5aabe676fed3731b/APK-RELEASE.apk)
## [Download Android APK](https://github.com/shocknet/wallet/releases/download/2020.09.12/app-release.apk)

_Node installer available at [shocknet/Wizard](https://github.com/shocknet/wizard)_

Expand Down
14 changes: 11 additions & 3 deletions app/services/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ export const isLightningPubKey = data => lnPubKey.test(data)
export const isShockPubKey = data => data.startsWith('$$__SHOCKWALLET__USER__')

/** @param {string} data */
export const isLNURL = data => data.startsWith('LNURL')
export const findlnurl = data => {
var res = /^(http.*[&?]lightning=)?((lnurl)([0-9]{1,}[a-z0-9]+){1})/.exec(data.toLowerCase());
if (res) {
return res[2];
}
return null;
}

/**
* @typedef {object} ExtractedBTCAddress
Expand Down Expand Up @@ -114,10 +120,12 @@ export default data => {
pk: cleanData,
}
}
if (isLNURL(cleanData)) {

const found = findlnurl(cleanData)
if (found) {
return {
type: 'lnurl',
lnurl: cleanData,
lnurl: found,
}
}
return { type: 'unknown' }
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"build:release:delete-bad-res": "find android/app/src/main/res/drawable-* -type f -not -name 'launch_screen.png' -delete"
},
"dependencies": {
"@react-native-community/async-storage": "^1.8.1",
"@react-native-community/async-storage": "^1.12.1",
"@react-native-community/masked-view": "^0.1.10",
"@react-native-community/netinfo": "2.x.x",
"@tradle/react-native-http": "^2.0.0",
Expand Down
23 changes: 14 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1135,14 +1135,12 @@
tslib "^1.10.0"
webcrypto-core "^1.0.14"

"@react-native-community/async-storage@^1.6.1":
version "1.6.2"
resolved "https://registry.yarnpkg.com/@react-native-community/async-storage/-/async-storage-1.6.2.tgz#a19ca7149c4dfe8216f2330e6b1ebfe2d075ef92"

"@react-native-community/async-storage@^1.8.1":
version "1.8.1"
resolved "https://registry.npm.taobao.org/@react-native-community/async-storage/download/@react-native-community/async-storage-1.8.1.tgz#c93e69dcf948667b207e409b8039b7edf199159b"
integrity sha1-yT5p3PlIZnsgfkCbgDm37fGZFZs=
"@react-native-community/async-storage@^1.12.1", "@react-native-community/async-storage@^1.6.1":
version "1.12.1"
resolved "https://registry.yarnpkg.com/@react-native-community/async-storage/-/async-storage-1.12.1.tgz#25f821b4f6b13abe005ad67e47c6f1cee9f27b24"
integrity sha512-70WGaH3PKYASi4BThuEEKMkyAgE9k7VytBqmgPRx3MzJx9/MkspwqJGmn3QLCgHLIFUgF1pit2mWICbRJ3T3lg==
dependencies:
deep-assign "^3.0.0"

"@react-native-community/cli-debugger-ui@^3.0.0":
version "3.0.0"
Expand Down Expand Up @@ -3406,6 +3404,13 @@ dedent@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c"

deep-assign@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/deep-assign/-/deep-assign-3.0.0.tgz#c8e4c4d401cba25550a2f0f486a2e75bc5f219a2"
integrity sha512-YX2i9XjJ7h5q/aQ/IM9PEwEnDqETAIYbggmdDB3HLTlSgo1CxPsj6pvhPG68rq6SVE0+p+6Ywsm5fTYNrYtBWw==
dependencies:
is-obj "^1.0.0"

deep-equal@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a"
Expand Down Expand Up @@ -5100,7 +5105,7 @@ is-number@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"

is-obj@^1.0.1:
is-obj@^1.0.0, is-obj@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f"

Expand Down