@@ -23,10 +23,10 @@ use crate::{
23
23
js_array_from_fields,
24
24
to_bits_array_le,
25
25
types:: native:: { CurrentNetwork , RecordCiphertextNative } ,
26
+ utilities:: encrypt:: EncryptionToolkilt ,
26
27
} ;
27
28
use snarkvm_console:: prelude:: { FromBytes , Network , ToBits , ToBytes , ToFields } ;
28
29
29
- use crate :: utilities:: encrypt:: EncryptionToolkit ;
30
30
use js_sys:: { Array , Uint8Array } ;
31
31
use std:: { ops:: Deref , str:: FromStr } ;
32
32
use wasm_bindgen:: prelude:: * ;
@@ -131,7 +131,7 @@ impl RecordCiphertext {
131
131
Ok ( js_array_from_fields ! ( & native_fields) )
132
132
}
133
133
134
- /// Decrypt the record ciphertext into plaintext using a record view key
134
+ /// Decrypt the record ciphertext into plaintext using a record view key.
135
135
///
136
136
/// @param {Field} record_vk Record view key used to decrypt the record.
137
137
///
@@ -196,16 +196,16 @@ mod tests {
196
196
197
197
use wasm_bindgen_test:: wasm_bindgen_test;
198
198
199
- const OWNER_PLAINTEXT : & str = r"{
200
- owner: aleo1j7qxyunfldj2lp8hsvy7mw5k8zaqgjfyr72x2gh3x4ewgae8v5gscf5jh3.private,
201
- microcredits: 1500000000000000u64.private,
202
- _nonce: 3077450429259593211617823051143573281856129402760267155982965992208217472983group.public
203
- }" ;
199
+ const NON_OWNER_VIEW_KEY : & str = "AViewKey1e2WyreaH5H4RBcioLL2GnxvHk5Ud46EtwycnhTdXLmXp" ;
204
200
const OWNER_CIPHERTEXT : & str = "record1qyqsqpe2szk2wwwq56akkwx586hkndl3r8vzdwve32lm7elvphh37rsyqyxx66trwfhkxun9v35hguerqqpqzqrtjzeu6vah9x2me2exkgege824sd8x2379scspmrmtvczs0d93qttl7y92ga0k0rsexu409hu3vlehe3yxjhmey3frh2z5pxm5cmxsv4un97q" ;
201
+ const OWNER_PLAINTEXT : & str = r"{
202
+ owner: aleo1j7qxyunfldj2lp8hsvy7mw5k8zaqgjfyr72x2gh3x4ewgae8v5gscf5jh3.private,
203
+ microcredits: 1500000000000000u64.private,
204
+ _nonce: 3077450429259593211617823051143573281856129402760267155982965992208217472983group.public
205
+ }" ;
205
206
const OWNER_VIEW_KEY : & str = "AViewKey1ccEt8A2Ryva5rxnKcAbn7wgTaTsb79tzkKHFpeKsm9NX" ;
206
- const RECORD_VIEW_KEY : & str = "4445718830394614891114647247073357094867447866913203502139893824059966201724field" ;
207
- const NON_OWNER_VIEW_KEY : & str = "AViewKey1e2WyreaH5H4RBcioLL2GnxvHk5Ud46EtwycnhTdXLmXp" ;
208
207
const RECORD_TAG : & str = "1796466189545157638691489609907096471289658804813960182690905095269699169603field" ;
208
+ const RECORD_VIEW_KEY : & str = "4445718830394614891114647247073357094867447866913203502139893824059966201724field" ;
209
209
210
210
// Related material for use in future tests
211
211
const _OWNER_PRIVATE_KEY: & str = "APrivateKey1zkpJkyYRGYtkeHDaFfwsKtUJzia7csiWhfBWPXWhXJzy9Ls" ;
0 commit comments