From fa1b8f7979cde199ff21d5a89e2be111f2551958 Mon Sep 17 00:00:00 2001 From: andrea Date: Wed, 12 Feb 2025 14:48:00 -0800 Subject: [PATCH] WASM: rename `randomized_public_key` to `randomized_public_key_pair` This method returns a struct which also has a `randomized_public_key` method, which results in code like this: ```rs let r = x.randomized_public_key(); let p = r.randomized_public_key(); ``` ... which is very ambiguous/confusing. With this PR, the above code becomes: ```rs let r = x.randomized_public_key_pair(); let p = r.randomized_public_key(); ``` --- ironfish-rust-wasm/src/keys/view_keys.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ironfish-rust-wasm/src/keys/view_keys.rs b/ironfish-rust-wasm/src/keys/view_keys.rs index 2e59d3d6f3..1b084dc589 100644 --- a/ironfish-rust-wasm/src/keys/view_keys.rs +++ b/ironfish-rust-wasm/src/keys/view_keys.rs @@ -150,7 +150,7 @@ impl ViewKey { self.0.nullifier_deriving_key.into() } - #[wasm_bindgen(js_name = randomizedPublicKey)] + #[wasm_bindgen(js_name = randomizedPublicKeyPair)] pub fn randomized_public_key_pair(&self) -> RandomizedPublicKeyPair { let (r, s) = self.0.randomized_public_key(thread_rng()); RandomizedPublicKeyPair::new(r.into(), s.into())