-
-
Notifications
You must be signed in to change notification settings - Fork 128
Update NDK to v2.12.2 #2041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Update NDK to v2.12.2 #2041
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/usr/bin/env bash | ||
|
||
# https://github.com/nostr-protocol/nips/blob/master/57.md | ||
set -e | ||
|
||
# test user with attached wallet | ||
# TODO: attach wallet to test01 via psql if not already attached? | ||
USERNAME=test01 | ||
|
||
# XXX this should match NOSTR_PRIVATE_KEY in .env.development | ||
NOSTR_PRIVATE_KEY=5f30b7e7714360f51f2be2e30c1d93b7fdf67366e730658e85777dfcc4e4245f | ||
NOSTR_PUBLIC_KEY=$(nak key public $NOSTR_PRIVATE_KEY) | ||
|
||
SINCE=$(date +%s) | ||
|
||
function create_event() { | ||
nak event -k 9734 \ | ||
--tag p=$NOSTR_PUBLIC_KEY \ | ||
--tag 'relays=wss://relay.primal.net' \ | ||
--tag amount=100000 | ||
} | ||
|
||
function url_encode() { | ||
cat - | jq -sRr @uri | ||
} | ||
|
||
function test_exit() { | ||
if [ $1 -eq 0 ]; then | ||
echo "worker publishes nip-57 zap receipts: PASSED" | ||
else | ||
echo "worker publishes nip-57 zap receipts: FAILED" | ||
fi | ||
exit $1 | ||
} | ||
|
||
create_event | nak verify | ||
|
||
# create a zap request event (kind 9734) | ||
EVENT="$(create_event)" | ||
|
||
echo "generated zap request event:" | ||
echo "$EVENT" | jq | ||
|
||
echo $EVENT | nak verify | ||
|
||
# XXX make sure amount is higher than dust limit of receiver's wallet | ||
echo -n "sending zap request event LNURL endpoint ... " | ||
PR=$(curl -s "http://localhost:3000/api/lnurlp/$USERNAME/pay?amount=100000&nostr=$(echo $EVENT | url_encode)" | jq -r .pr) | ||
echo "OK" | ||
|
||
[ "$PR" == "null" ] && echo "error: LNURL endpoint did not return bolt11" && test_exit 1 | ||
echo $PR | ||
|
||
sndev fund --cln $PR | ||
|
||
# subscribe to zap receipt event (kind 9735) | ||
echo -n "waiting for zap receipt event ... " | ||
sleep 3 | ||
PR2=$(nak -q req -k 9735 -p $NOSTR_PUBLIC_KEY --limit 1 wss://relay.primal.net | jq -r '.tags[] | select(.[0] == "bolt11") | .[1]') | ||
echo "OK" | ||
|
||
[ "$PR" == "$PR2" ] && test_exit 0 || test_exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unfortunately required even though it's supposed to be a peer dependency of ndk-wallet (which is itself a peer dependency).
If I don't install this, the app fails to start: