Files
nostr_core_lib/tests
Laan Tungir d575e8cdbc Add 10 high-level algorithm-verb wrappers to nostr_signer_t
The high-level nostr_signer_t API only covered 6 of n_signer's 16 verbs
(the Nostr protocol verbs + derive_hmac). The other 10 (get_info,
get_public_key algorithm-based, sign, verify, encapsulate, decapsulate,
derive_shared_secret, otp encrypt/decrypt, mine_event) had no library
wrapper — clients had to drop down to the low-level nsigner_client_call
and hand-build cJSON params.

This adds typed wrappers for all 10:
- nostr_signer_get_info
- nostr_signer_get_public_key_alg
- nostr_signer_sign / nostr_signer_verify
- nostr_signer_encapsulate / nostr_signer_decapsulate
- nostr_signer_derive_shared_secret
- nostr_signer_otp_encrypt / nostr_signer_otp_decrypt
- nostr_signer_mine_event

The local backend returns NOSTR_ERROR_NOT_SUPPORTED for all 10 (they
require signer-side PQ crypto / OTP pads / key derivation the local
backend doesn't hold). The remote nsigner backend builds the correct
wire params and parses the result.

Also adds NOSTR_ERROR_NOT_SUPPORTED (-40) to nostr_common.h.

Tests: 2 new tests in nsigner_client_test.c — local-backend
NOT_SUPPORTED check for all 10 verbs, and a mock-transport test
verifying nostr_signer_sign emits the correct wire request. 8/8 pass.
2026-08-06 09:54:50 -04:00
..
2026-03-19 09:01:11 -04:00
2025-09-02 12:36:52 -04:00
2025-08-19 11:24:48 -04:00
2025-09-05 13:42:03 -04:00
2026-03-19 09:01:11 -04:00
2026-03-19 09:01:11 -04:00
2025-08-19 11:24:48 -04:00