pub fn derive_note_private_key(signature: &[u8]) -> Result<Vec<u8>, JsValue>Expand description
Derive private key (BN254 scalar) deterministically from a Freighter signature for note identity. Used for ZK circuit ownership proofs
This private key is used inside ZK circuits to prove ownership of notes. The corresponding public key is derived via Poseidon2 hash
§Derivation
signature (64 bytes) → SHA-256 → 32-byte BN254 scalar (note private key)§Arguments
signature- Stellar Ed25519 signature from signing “Privacy Pool Spending Key [v1]”
§Returns
32 bytes: Note private key (BN254 scalar, little-endian)