Last version before deleting Makefile and CmakeLists.txt

This commit is contained in:
2025-08-15 16:32:59 -04:00
parent 6014a250dd
commit 8ed9262c65
79 changed files with 2908 additions and 502 deletions

View File

@@ -1,40 +0,0 @@
=== NOSTR WebSocket Debug Log Started ===
[10:59:17.573] SEND nostr.mom:443: ["REQ", "sync_0_1755183556", {
"kinds": [1],
"limit": 1
}]
[10:59:17.726] RECV nostr.mom:443: ["EVENT","sync_0_1755183556",{"content":"#kinostr #odysee #onepunchman\n\nhttps://odysee.com/@AllOverTheFilms:6/One-Punch-Man-(Season-1)---Episode-02--English-Sub-:f\n\n https://blossom.primal.net/77c18e2d7c0da3169baa9bf9161462e12f6f1e569a0863341df33c55ca41f425.jpg \n\nnostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq32amnwvaz7tmjv4kxz7fwv3sk6atn9e5k7tcqypwdt7q993nerey8nu8ymwgngewhz82ltlsvp2ueqjwxqex95w26yja9ph4 ","created_at":1755183592,"id":"e728318c90e8afd0b8769188260a3960ed9d6425d35f0768bd6e60dfcf21f626","kind":1,"pubkey":"362ebffa895acb0aa4ec2f11959b1c233aec2275f61b3beee19b1b6e492e2719","sig":"930d967dcb413eb02d6326778cdcc291cda10e376e0916d28d422759aa62288dbadc1722f4eccde54be87aa203d70f3ac733cef794b952f1965f43dbacedd1da","tags":[["t","kinostr"],["t","odysee"],["t","onepunchman"],["p","5cd5f8052c6791e4879f0e4db913465d711d5f5fe0c0ab99049c6064c5a395a2","wss://nos.lol/","mention"]]}]
[10:59:17.726] SEND nostr.mom:443: ["CLOSE", "sync_0_1755183556"]
=== NOSTR WebSocket Debug Log Started ===
[12:00:03.609] SEND nostr.mom:443: ["REQ", "sync_0_1755187202", {
"kinds": [1],
"limit": 1
}]
[12:00:03.762] RECV nostr.mom:443: ["EVENT","sync_0_1755187202",{"content":"Hi.\n\nFor some job ads we get help from third party services during the first screening process, as it often happens that we receive thousands of applications and it becomes complex to handle them by hand one by one.\n\nIf you think there was an error, please email jobs@relai.app","created_at":1755187188,"id":"d0a6c2d9d20c97b12375d55370bbd778d064decf5c60e2815d7b3fc1683b4b27","kind":1,"pubkey":"80043aa9b23b0d1511b49618cfc48be1ab4b7df95a13a2289b9336df7c1be3b6","sig":"2917afcea4497dc14bb31a8966ee6e1a2f04f5e242c439584f172e6a3b6067412384ea5dc66c1e366100333ca20cc0b59e3919de392a4da4ae62c255711edd00","tags":[["e","a46f5b47ba44568554ef946df7b84b54156e97e9fb37f44c5575df73a7750fc7","","root"],["p","cf7ad05f8e99de8eadbbfbd5ca1c0f9b75499bce07074966b277688ca5e1d726"]]}]
[12:00:03.762] SEND nostr.mom:443: ["CLOSE", "sync_0_1755187202"]
=== NOSTR WebSocket Debug Log Started ===
[12:45:51.209] SEND nostr.mom:443: ["REQ", "sync_0_1755189950", {
"kinds": [1],
"limit": 1
}]
[12:45:51.362] RECV nostr.mom:443: ["EVENT","sync_0_1755189950",{"content":"It is getting pretty bad outside. Smells like a campfire and ash is falling. It is supposed to rain today... https://image.nostr.build/b9a5f0e4c0f1b53e04dbdc3b13e687beb8ee5f8d003734cbe963c87e8fcfe3f0.jpg","created_at":1755189940,"id":"3f13cc0b3b267a8af31250b2fafad480293baaad84ff12d3ce7242bdd355be6d","kind":1,"pubkey":"101a112c8adc2e69e0003114ff1c1d36b7fcde06d84d47968e599d558721b0df","sig":"0733af7fc26271f8bfa2c4f2e54eafe6984a73f3619a8941acd57b31a9ad4805c20c44e361b7a745f52e2859675323962ddd2c9fe0e4a73faa498d36958e395d","tags":[["r","https://image.nostr.build/b9a5f0e4c0f1b53e04dbdc3b13e687beb8ee5f8d003734cbe963c87e8fcfe3f0.jpg"],["imeta","url https://image.nostr.build/b9a5f0e4c0f1b53e04dbdc3b13e687beb8ee5f8d003734cbe963c87e8fcfe3f0.jpg","x f32764ccb275b93b897b01b87000a3ac1811c0fee3d9cc1046c2254fc8f9dac2","size 369085","m image/jpeg","dim 1512x2016","blurhash _lHBrP-;Rjt7a}WBj[_4%MRjt7j[WBj[^+t7Rjj[j[azoLR,WBWBWCj[ofofRjRjWBayayj[j[RjWBs:ofWBfPj[bHofofofWBfQfQt6j[j[ofayazayWVayayfQj[j[ay","ox f32764ccb275b93b897b01b87000a3ac1811c0fee3d9cc1046c2254fc8f9dac2","alt "]]}]
[12:45:51.362] SEND nostr.mom:443: ["CLOSE", "sync_0_1755189950"]
=== NOSTR WebSocket Debug Log Started ===
[19:11:31.192] SEND nostr.mom:443: ["REQ", "sync_0_1755213090", {
"kinds": [1],
"limit": 1
}]
[19:11:31.346] RECV nostr.mom:443: ["EVENT","sync_0_1755213090",{"content":"When you finally find a way to protect your money from inflation everything changes.\n\nYou don't have to constantly be looking to take risks to invest your money so that it doesn't lose value anymore because now it will keep its value.\n\nBitcoin is the last frontier of money, because its value will increase faster than any other money or investment you can make because it is global and extremely rare.\n\nBitcoin is not only money that protects you, but when you have bitcoin it changes your mindset from a poverty mindset to a wealth mindset.\n\nWhen you have bitcoin you start to think differently because it gives you your time back, every time its value goes up, the more time you have to plan your long-term life.","created_at":1755213082,"id":"b70ef3a737a4cc4b909d24018e01b3264419d8b62f189a8c36b2954134b52839","kind":1,"pubkey":"ad558fb5cbf53d44f00b1f73ebb976ce7e4cb425b6b3739a4096bca3c3f355a8","sig":"91271f6e45023b0d16464e8898b16c42f2ae605a67766d522a0375ee303c4e3229fa43154b7e164fdab74e387ccd9f5060aff9d1e21a80eb8fab72154c8b11b1","tags":[]}]
[19:11:31.346] SEND nostr.mom:443: ["CLOSE", "sync_0_1755213090"]
=== NOSTR WebSocket Debug Log Started ===
[19:15:31.278] SEND nostr.mom:443: ["REQ", "sync_0_1755213330", {
"kinds": [1],
"limit": 1
}]
[19:15:31.497] RECV nostr.mom:443: ["EVENT","sync_0_1755213330",{"content":"Quando eu pego um nota de dinheiro fiat, não pergunto se já passou na mão de assaltante.","created_at":1755213319,"id":"c8b875c54cf88745a7c75200b4d1f0a019561d289178dd1125e34c51a6e5b6d2","kind":1,"pubkey":"80c362d7c048f68f4e0991227e0c28f740c48fb95b5d8aac7233343671cef439","sig":"7cf9fe7908b9cae5ba4d44494874d34a59587b05b6e996cdf0f54a39fa36e08affbd69cbebea855910ea68b16fa2b2574fbd37a1790f5b7031195aaea5e7d124","tags":[["e","0a8093c0825679dcde7159a8af509b5ef818d5fc1049af582e012803d608a08f","","root"],["p","0153d742cf537c94e2bef9541cf3b02140a8a3b3641efe813d418451a2d44479"]]}]
[19:15:31.497] SEND nostr.mom:443: ["CLOSE", "sync_0_1755213330"]

View File

@@ -1,85 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../nostr_core/nostr_core.h"
void hex_to_bytes(const char* hex_str, unsigned char* bytes) {
size_t len = strlen(hex_str);
for (size_t i = 0; i < len; i += 2) {
sscanf(hex_str + i, "%2hhx", &bytes[i / 2]);
}
}
int test_simple(void) {
printf("=== SIMPLE TEST ===\n");
const char* sk1_hex = "91ba716fa9e7ea2fcbad360cf4f8e0d312f73984da63d90f524ad61a6a1e7dbe";
const char* sk2_hex = "96f6fa197aa07477ab88f6981118466ae3a982faab8ad5db9d5426870c73d220";
const char* pk1_hex = "b38ce15d3d9874ee710dfabb7ff9801b1e0e20aace6e9a1a05fa7482a04387d1";
const char* pk2_hex = "dcb33a629560280a0ee3b6b99b68c044fe8914ad8a984001ebf6099a9b474dc3";
const char* plaintext = "test";
unsigned char sk1[32], sk2[32], pk1[32], pk2[32];
hex_to_bytes(sk1_hex, sk1);
hex_to_bytes(sk2_hex, sk2);
hex_to_bytes(pk1_hex, pk1);
hex_to_bytes(pk2_hex, pk2);
char encrypted[NOSTR_NIP04_MAX_ENCRYPTED_SIZE];
int result = nostr_nip04_encrypt(sk1, pk2, plaintext, encrypted, sizeof(encrypted));
if (result != NOSTR_SUCCESS) {
printf("❌ ENCRYPTION FAILED\n");
return 0;
}
printf("✅ Encryption: PASS\n");
char decrypted[NOSTR_NIP04_MAX_PLAINTEXT_SIZE];
result = nostr_nip04_decrypt(sk2, pk1, encrypted, decrypted, sizeof(decrypted));
if (result != NOSTR_SUCCESS) {
printf("❌ DECRYPTION FAILED\n");
return 0;
}
printf("✅ Decryption: PASS\n");
return 1;
}
int main(void) {
printf("=== DEBUG SEGFAULT TEST ===\n");
if (nostr_init() != NOSTR_SUCCESS) {
printf("ERROR: Failed to initialize NOSTR library\n");
return 1;
}
printf("✅ Library initialized\n");
// Test 1
if (!test_simple()) {
printf("❌ Test 1 FAILED\n");
return 1;
}
printf("✅ Test 1 PASSED\n");
// Test 2 - same as test 1
if (!test_simple()) {
printf("❌ Test 2 FAILED\n");
return 1;
}
printf("✅ Test 2 PASSED\n");
// Test 3 - same as test 1
if (!test_simple()) {
printf("❌ Test 3 FAILED\n");
return 1;
}
printf("✅ Test 3 PASSED\n");
printf("✅ ALL TESTS PASSED - No segfault!\n");
nostr_cleanup();
return 0;
}

Binary file not shown.

View File

@@ -1,7 +0,0 @@
#include <stdio.h>
#include "../nostr_core/nostr_core.h"
int main(void) {
printf("Header included successfully\n");
return 0;
}

Binary file not shown.

Binary file not shown.

View File

@@ -1,6 +0,0 @@
#include <stdio.h>
int main(void) {
printf("Hello from minimal test\n");
return 0;
}

Binary file not shown.

View File

@@ -8,7 +8,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "../nostr_core/nostr_core.h"
#include "../nostr_core/nip005.h"
// Test helper function
void print_test_result(const char* test_name, int result) {

BIN
tests/old/http_test Executable file

Binary file not shown.

View File

@@ -1,5 +1,5 @@
#include <stdio.h>
#include "../nostr_core/nostr_core.h"
#include "../nostr_core/nip001.h"
int main(void) {
printf("Testing basic library initialization...\n");