@@ -61,18 +61,20 @@ jobs:
6161 wget $(wget -q -O - ${RELEASE_URL} | jq -r '.assets[] | select(.name | contains("linux-amd64")) | .browser_download_url') -O nak -nv
6262 chmod +x nak
6363
64- echo "running basic tests ..."
64+ echo "printing version ..."
6565 ./nak --version
6666
6767 # generate and manipulate keys
6868 echo "testing key operations..."
6969 SECRET_KEY=$(./nak key generate)
7070 PUBLIC_KEY=$(echo $SECRET_KEY | ./nak key public)
71- echo "generated key pair: $PUBLIC_KEY"
71+ echo "generated key pair: $SECRET_KEY => $ PUBLIC_KEY"
7272
7373 # create events
7474 echo "testing event creation..."
7575 ./nak event -c "hello world"
76+ HELLOWORLD=$(./nak event -c "hello world")
77+ echo " hello world again: $HELLOWORLD"
7678 ./nak event --ts "2 days ago" -c "event with timestamp"
7779 ./nak event -k 1 -t "t=test" -c "event with tag"
7880
@@ -81,10 +83,10 @@ jobs:
8183 NSEC=$(echo $SECRET_KEY | ./nak encode nsec)
8284 echo "encoded nsec: $NSEC"
8385 ./nak encode npub 79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
84- NOTE_ID ="5ae731bbc7711f78513da14927c48cc7143a91e6cad0565fdc4d73b8967a7d59"
85- NOTE1 =$(./nak encode note $NOTE_ID )
86- echo "encoded note1 : $NOTE1 "
87- ./nak decode $NOTE1
86+ EVENT_ID ="5ae731bbc7711f78513da14927c48cc7143a91e6cad0565fdc4d73b8967a7d59"
87+ NEVENT1 =$(./nak encode nevent $EVENT_ID )
88+ echo "encoded nevent1 : $NEVENT1 "
89+ ./nak decode $NEVENT1
8890 ./nak decode npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6
8991
9092 # test event verification
9496 echo $VERIFY_EVENT | ./nak verify
9597
9698 # test PoW
97- echo "testing PoW ..."
99+ echo "testing pow ..."
98100 ./nak event -c "testing pow" --pow 8
99101
100102 # test NIP-49 key encryption/decryption
@@ -103,18 +105,18 @@ jobs:
103105 echo "encrypted key: ${ENCRYPTED_KEY:0:20}..."
104106 DECRYPTED_KEY=$(./nak key decrypt $ENCRYPTED_KEY "testpassword")
105107 if [ "$DECRYPTED_KEY" != "$SECRET_KEY" ]; then
106- echo "nIP -49 encryption/decryption test failed!"
108+ echo "nip -49 encryption/decryption test failed!"
107109 exit 1
108110 fi
109111
110112 # test multi-value tags
111113 echo "testing multi-value tags..."
112- ./nak event --ts "yesterday" -t "e=f59911b561c37c90b01e9e5c2557307380835c83399756f4d62d8167227e420a;wss://relay.example.com;root" -c "Testing multi-value tags"
114+ ./nak event --ts "yesterday" -t "e=f59911b561c37c90b01e9e5c2557307380835c83399756f4d62d8167227e420a;wss://relay.example.com;root" -c "testing multi-value tags"
113115
114116 # test relay operations (with a public relay)
115117 echo "testing relay operations..."
116118 # publish a simple event to a public relay
117- EVENT_JSON=$(./nak event --sec $SECRET_KEY -c "Test from nak smoke test" nos.lol)
119+ EVENT_JSON=$(./nak event --sec $SECRET_KEY -c "test from nak smoke test" nos.lol)
118120 EVENT_ID=$(echo $EVENT_JSON | jq -r .id)
119121 echo "published event ID: $EVENT_ID"
120122
0 commit comments