v0.0.29 - Feather firmware: auto-approve sign_event and always return explicit JSON-RPC errors for unhandled/oversized requests

This commit is contained in:
Laan Tungir
2026-05-11 13:43:14 -04:00
parent e4fa743654
commit bd23b674d6
19 changed files with 2514 additions and 222 deletions

View File

@@ -139,14 +139,14 @@ static int bip32_ckd_priv(const secp256k1_context *ctx,
return compute_compressed_pubkey(ctx, child->priv, child->pub);
}
int derive_nostr_key(const uint8_t seed[64], uint8_t privkey[32], uint8_t pubkey[32])
static int derive_nostr_key_internal(const uint8_t seed[64], uint32_t nostr_index, uint8_t privkey[32], uint8_t pubkey[32])
{
static const uint32_t path[5] = {
const uint32_t path[5] = {
44u | BIP32_HARDENED_FLAG,
1237u | BIP32_HARDENED_FLAG,
0u | BIP32_HARDENED_FLAG,
0u,
0u,
nostr_index,
};
secp256k1_context *ctx = NULL;
@@ -212,6 +212,16 @@ int derive_nostr_key(const uint8_t seed[64], uint8_t privkey[32], uint8_t pubkey
return 0;
}
int derive_nostr_key(const uint8_t seed[64], uint8_t privkey[32], uint8_t pubkey[32])
{
return derive_nostr_key_internal(seed, 0u, privkey, pubkey);
}
int derive_nostr_key_index(const uint8_t seed[64], uint32_t nostr_index, uint8_t privkey[32], uint8_t pubkey[32])
{
return derive_nostr_key_internal(seed, nostr_index, privkey, pubkey);
}
int schnorr_sign32(const uint8_t privkey[32], const uint8_t msg32[32], uint8_t sig64[64])
{
secp256k1_context *ctx = NULL;