@@ -145,10 +145,10 @@ impl EncryptionToolkit {
145
145
146
146
/// Generates a transition view key from the view key and the transition public key.
147
147
///
148
- /// @param {ViewKey} view_key The view key to use for generating the transition view key .
149
- /// @param {Group} tpk The transition public key to use for generating the transition view key .
148
+ /// @param {ViewKey} view_key The view key of the account that generated the transition.
149
+ /// @param {Group} tpk The transition public key.
150
150
///
151
- /// @returns {Field} The generated transition view key.
151
+ /// @returns {Field} The transition view key.
152
152
#[ wasm_bindgen( js_name = "generateTvk" ) ]
153
153
pub fn generate_tvk ( view_key : & ViewKey , tpk : & Group ) -> Field {
154
154
tpk. scalar_multiply ( & view_key. to_scalar ( ) ) . to_x_coordinate ( )
@@ -157,10 +157,10 @@ impl EncryptionToolkit {
157
157
/// Creates a record view key from the view key. This can be later be used to decrypt a
158
158
// record without revealing an account's view key.
159
159
///
160
- /// @param {ViewKey} view_key The view key to use for generating the record view key .
161
- /// @param {RecordCiphertext} record_ciphertext The record ciphertext to use for generating the record view key.
160
+ /// @param {ViewKey} view_key The view key of the owner of the record.
161
+ /// @param {RecordCiphertext} record_ciphertext The record ciphertext used to derive the record view key.
162
162
///
163
- /// @returns {Field} The generated record view key.
163
+ /// @returns {Field} The record view key.
164
164
#[ wasm_bindgen( js_name = "generateRecordViewKey" ) ]
165
165
pub fn generate_record_view_key ( view_key : & ViewKey , record_ciphertext : & RecordCiphertext ) -> Result < Field , String > {
166
166
let record_nonce = record_ciphertext. nonce ( ) ;
@@ -170,7 +170,7 @@ impl EncryptionToolkit {
170
170
/// Decrypts a record ciphertext using the record view key. Decryption only succeeds
171
171
/// if the record view key was generated from the view key of the record owner.
172
172
///
173
- /// @param {Field} record_vk The record view key to use for decryption .
173
+ /// @param {Field} record_vk The record view key.
174
174
/// @param {RecordCiphertext} record_ciphertext The record ciphertext to decrypt.
175
175
///
176
176
/// @returns {RecordPlaintext} The decrypted record plaintext.
@@ -193,7 +193,7 @@ impl EncryptionToolkit {
193
193
/// can only be decrypted if the transition view key was generated by the transaction signer.
194
194
///
195
195
/// @param {Transition} transition The transition to decrypt.
196
- /// @param {Field} transition_vk The transition view key to use for decryption .
196
+ /// @param {Field} transition_vk The transition view key.
197
197
///
198
198
/// @returns {Transition} The decrypted transition.
199
199
#[ wasm_bindgen( js_name = "decryptTransitionWithVk" ) ]
0 commit comments