Migrated n_signer verb names to nostr_ prefix (sign_event→nostr_sign_event, get_public_key→nostr_get_public_key, nip04_*→nostr_nip04_*, nip44_*→nostr_nip44_*)

This commit is contained in:
Laan Tungir
2026-07-20 18:33:15 -04:00
parent 8baa6679b9
commit 17687a755b
3 changed files with 41 additions and 24 deletions

View File

@@ -172,6 +172,16 @@ docker run --rm \
ccache gcc $CFLAGS -c "$src" -o "$obj"
done
# Prune stale object files whose source no longer exists (prevents
# multiple-definition link errors after files are moved/renamed).
while IFS= read -r stale_obj; do
src="${stale_obj#.build-static/obj/}"
src="${src%.o}"
if [[ ! -f "$src" ]]; then
rm -f "$stale_obj"
fi
done < <(find .build-static/obj -name "*.o" -print | sort)
CURL_LDFLAGS="$(pkg-config --libs --static libcurl)"
OBJS=$(find .build-static/obj -name "*.o" -print | sort)

View File

@@ -0,0 +1,7 @@
{
"folders": [
{
"path": "."
}
]
}

View File

@@ -1051,7 +1051,7 @@ int nsigner_get_public_key(const char *socket_name, const nt_nsigner_selector_t
return NT_NSIGNER_E_IO;
}
rc = nsigner_call_string_method(socket_name, selector, "get_public_key", NULL, 0, &result);
rc = nsigner_call_string_method(socket_name, selector, "nostr_get_public_key", NULL, 0, &result);
if (rc != NT_NSIGNER_OK) {
return rc;
}
@@ -1076,7 +1076,7 @@ int nsigner_sign_event(const char *socket_name, const nt_nsigner_selector_t *sel
}
args[0] = unsigned_event_json;
return nsigner_call_string_method(socket_name, selector, "sign_event", args, 1, signed_event_json_out);
return nsigner_call_string_method(socket_name, selector, "nostr_sign_event", args, 1, signed_event_json_out);
}
int nsigner_nip04_encrypt(const char *socket_name, const nt_nsigner_selector_t *selector,
@@ -1089,7 +1089,7 @@ int nsigner_nip04_encrypt(const char *socket_name, const nt_nsigner_selector_t *
args[0] = peer_pub_hex;
args[1] = plaintext;
return nsigner_call_string_method(socket_name, selector, "nip04_encrypt", args, 2, cipher_out);
return nsigner_call_string_method(socket_name, selector, "nostr_nip04_encrypt", args, 2, cipher_out);
}
int nsigner_nip04_decrypt(const char *socket_name, const nt_nsigner_selector_t *selector,
@@ -1102,7 +1102,7 @@ int nsigner_nip04_decrypt(const char *socket_name, const nt_nsigner_selector_t *
args[0] = peer_pub_hex;
args[1] = ciphertext;
return nsigner_call_string_method(socket_name, selector, "nip04_decrypt", args, 2, plain_out);
return nsigner_call_string_method(socket_name, selector, "nostr_nip04_decrypt", args, 2, plain_out);
}
int nsigner_nip44_encrypt(const char *socket_name, const nt_nsigner_selector_t *selector,
@@ -1115,7 +1115,7 @@ int nsigner_nip44_encrypt(const char *socket_name, const nt_nsigner_selector_t *
args[0] = peer_pub_hex;
args[1] = plaintext;
return nsigner_call_string_method(socket_name, selector, "nip44_encrypt", args, 2, cipher_out);
return nsigner_call_string_method(socket_name, selector, "nostr_nip44_encrypt", args, 2, cipher_out);
}
int nsigner_nip44_decrypt(const char *socket_name, const nt_nsigner_selector_t *selector,
@@ -1128,7 +1128,7 @@ int nsigner_nip44_decrypt(const char *socket_name, const nt_nsigner_selector_t *
args[0] = peer_pub_hex;
args[1] = ciphertext;
return nsigner_call_string_method(socket_name, selector, "nip44_decrypt", args, 2, plain_out);
return nsigner_call_string_method(socket_name, selector, "nostr_nip44_decrypt", args, 2, plain_out);
}
int nsigner_session_open_url(const char *url) {
@@ -1154,7 +1154,7 @@ int nsigner_session_get_public_key(int *fd_inout,
return NT_NSIGNER_E_IO;
}
rc = nsigner_call_string_method_url_session(fd_inout, url, selector, auth, "get_public_key", NULL, 0, &result);
rc = nsigner_call_string_method_url_session(fd_inout, url, selector, auth, "nostr_get_public_key", NULL, 0, &result);
if (rc != NT_NSIGNER_OK) {
return rc;
}
@@ -1183,7 +1183,7 @@ int nsigner_session_sign_event(int *fd_inout,
}
args[0] = unsigned_event_json;
return nsigner_call_string_method_url_session(fd_inout, url, selector, auth, "sign_event", args, 1, signed_event_json_out);
return nsigner_call_string_method_url_session(fd_inout, url, selector, auth, "nostr_sign_event", args, 1, signed_event_json_out);
}
int nsigner_session_nip04_encrypt(int *fd_inout,
@@ -1201,7 +1201,7 @@ int nsigner_session_nip04_encrypt(int *fd_inout,
args[0] = peer_pub_hex;
args[1] = plaintext;
return nsigner_call_string_method_url_session(fd_inout, url, selector, auth, "nip04_encrypt", args, 2, cipher_out);
return nsigner_call_string_method_url_session(fd_inout, url, selector, auth, "nostr_nip04_encrypt", args, 2, cipher_out);
}
int nsigner_session_nip04_decrypt(int *fd_inout,
@@ -1219,7 +1219,7 @@ int nsigner_session_nip04_decrypt(int *fd_inout,
args[0] = peer_pub_hex;
args[1] = ciphertext;
return nsigner_call_string_method_url_session(fd_inout, url, selector, auth, "nip04_decrypt", args, 2, plain_out);
return nsigner_call_string_method_url_session(fd_inout, url, selector, auth, "nostr_nip04_decrypt", args, 2, plain_out);
}
int nsigner_session_nip44_encrypt(int *fd_inout,
@@ -1237,7 +1237,7 @@ int nsigner_session_nip44_encrypt(int *fd_inout,
args[0] = peer_pub_hex;
args[1] = plaintext;
return nsigner_call_string_method_url_session(fd_inout, url, selector, auth, "nip44_encrypt", args, 2, cipher_out);
return nsigner_call_string_method_url_session(fd_inout, url, selector, auth, "nostr_nip44_encrypt", args, 2, cipher_out);
}
int nsigner_session_nip44_decrypt(int *fd_inout,
@@ -1255,7 +1255,7 @@ int nsigner_session_nip44_decrypt(int *fd_inout,
args[0] = peer_pub_hex;
args[1] = ciphertext;
return nsigner_call_string_method_url_session(fd_inout, url, selector, auth, "nip44_decrypt", args, 2, plain_out);
return nsigner_call_string_method_url_session(fd_inout, url, selector, auth, "nostr_nip44_decrypt", args, 2, plain_out);
}
int nsigner_get_public_key_url(const char *url, const nt_nsigner_selector_t *selector,
@@ -1268,7 +1268,7 @@ int nsigner_get_public_key_url(const char *url, const nt_nsigner_selector_t *sel
return NT_NSIGNER_E_IO;
}
rc = nsigner_call_string_method_url(url, selector, auth, "get_public_key", NULL, 0, &result);
rc = nsigner_call_string_method_url(url, selector, auth, "nostr_get_public_key", NULL, 0, &result);
if (rc != NT_NSIGNER_OK) {
return rc;
}
@@ -1294,7 +1294,7 @@ int nsigner_sign_event_url(const char *url, const nt_nsigner_selector_t *selecto
}
args[0] = unsigned_event_json;
return nsigner_call_string_method_url(url, selector, auth, "sign_event", args, 1, signed_event_json_out);
return nsigner_call_string_method_url(url, selector, auth, "nostr_sign_event", args, 1, signed_event_json_out);
}
int nsigner_nip04_encrypt_url(const char *url, const nt_nsigner_selector_t *selector,
@@ -1308,7 +1308,7 @@ int nsigner_nip04_encrypt_url(const char *url, const nt_nsigner_selector_t *sele
args[0] = peer_pub_hex;
args[1] = plaintext;
return nsigner_call_string_method_url(url, selector, auth, "nip04_encrypt", args, 2, cipher_out);
return nsigner_call_string_method_url(url, selector, auth, "nostr_nip04_encrypt", args, 2, cipher_out);
}
int nsigner_nip04_decrypt_url(const char *url, const nt_nsigner_selector_t *selector,
@@ -1322,7 +1322,7 @@ int nsigner_nip04_decrypt_url(const char *url, const nt_nsigner_selector_t *sele
args[0] = peer_pub_hex;
args[1] = ciphertext;
return nsigner_call_string_method_url(url, selector, auth, "nip04_decrypt", args, 2, plain_out);
return nsigner_call_string_method_url(url, selector, auth, "nostr_nip04_decrypt", args, 2, plain_out);
}
int nsigner_nip44_encrypt_url(const char *url, const nt_nsigner_selector_t *selector,
@@ -1336,7 +1336,7 @@ int nsigner_nip44_encrypt_url(const char *url, const nt_nsigner_selector_t *sele
args[0] = peer_pub_hex;
args[1] = plaintext;
return nsigner_call_string_method_url(url, selector, auth, "nip44_encrypt", args, 2, cipher_out);
return nsigner_call_string_method_url(url, selector, auth, "nostr_nip44_encrypt", args, 2, cipher_out);
}
int nsigner_nip44_decrypt_url(const char *url, const nt_nsigner_selector_t *selector,
@@ -1350,7 +1350,7 @@ int nsigner_nip44_decrypt_url(const char *url, const nt_nsigner_selector_t *sele
args[0] = peer_pub_hex;
args[1] = ciphertext;
return nsigner_call_string_method_url(url, selector, auth, "nip44_decrypt", args, 2, plain_out);
return nsigner_call_string_method_url(url, selector, auth, "nostr_nip44_decrypt", args, 2, plain_out);
}
int nsigner_qrexec_get_public_key(const char *target_qube,
@@ -1366,7 +1366,7 @@ int nsigner_qrexec_get_public_key(const char *target_qube,
}
rc = nsigner_qrexec_call_string_method(target_qube, service_name, selector,
"get_public_key", NULL, 0, &result);
"nostr_get_public_key", NULL, 0, &result);
if (rc != NT_NSIGNER_OK) {
return rc;
}
@@ -1395,7 +1395,7 @@ int nsigner_qrexec_sign_event(const char *target_qube,
args[0] = unsigned_event_json;
return nsigner_qrexec_call_string_method(target_qube, service_name, selector,
"sign_event", args, 1, signed_event_json_out);
"nostr_sign_event", args, 1, signed_event_json_out);
}
int nsigner_qrexec_nip04_encrypt(const char *target_qube,
@@ -1413,7 +1413,7 @@ int nsigner_qrexec_nip04_encrypt(const char *target_qube,
args[0] = peer_pub_hex;
args[1] = plaintext;
return nsigner_qrexec_call_string_method(target_qube, service_name, selector,
"nip04_encrypt", args, 2, cipher_out);
"nostr_nip04_encrypt", args, 2, cipher_out);
}
int nsigner_qrexec_nip04_decrypt(const char *target_qube,
@@ -1431,7 +1431,7 @@ int nsigner_qrexec_nip04_decrypt(const char *target_qube,
args[0] = peer_pub_hex;
args[1] = ciphertext;
return nsigner_qrexec_call_string_method(target_qube, service_name, selector,
"nip04_decrypt", args, 2, plain_out);
"nostr_nip04_decrypt", args, 2, plain_out);
}
int nsigner_qrexec_nip44_encrypt(const char *target_qube,
@@ -1449,7 +1449,7 @@ int nsigner_qrexec_nip44_encrypt(const char *target_qube,
args[0] = peer_pub_hex;
args[1] = plaintext;
return nsigner_qrexec_call_string_method(target_qube, service_name, selector,
"nip44_encrypt", args, 2, cipher_out);
"nostr_nip44_encrypt", args, 2, cipher_out);
}
int nsigner_qrexec_nip44_decrypt(const char *target_qube,
@@ -1467,5 +1467,5 @@ int nsigner_qrexec_nip44_decrypt(const char *target_qube,
args[0] = peer_pub_hex;
args[1] = ciphertext;
return nsigner_qrexec_call_string_method(target_qube, service_name, selector,
"nip44_decrypt", args, 2, plain_out);
"nostr_nip44_decrypt", args, 2, plain_out);
}