File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -306,11 +306,11 @@ export class PoolErc20Service {
306306 } ;
307307 }
308308
309+ /**
310+ * @deprecated use {@link Erc20Note.toSolidityNoteInput} instead
311+ */
309312 async toNoteInput ( note : Erc20Note ) {
310- return {
311- noteHash : await note . hash ( ) ,
312- encryptedNote : await note . encrypt ( ) ,
313- } ;
313+ return await note . toSolidityNoteInput ( ) ;
314314 }
315315
316316 private async getEmittedNotes ( secretKey : string ) {
@@ -381,6 +381,13 @@ export class Erc20Note {
381381 } ;
382382 }
383383
384+ async toSolidityNoteInput ( ) {
385+ return {
386+ noteHash : await this . hash ( ) ,
387+ encryptedNote : await this . encrypt ( ) ,
388+ } ;
389+ }
390+
384391 async serialize ( ) : Promise < bigint [ ] > {
385392 const amount = await this . amount . toNoir ( ) ;
386393 return [
@@ -409,7 +416,7 @@ export class Erc20Note {
409416 } ) ;
410417 }
411418
412- async hash ( ) {
419+ async hash ( ) : Promise < string > {
413420 return ( await poseidon2Hash ( await this . serialize ( ) ) ) . toString ( ) ;
414421 }
415422
You can’t perform that action at this time.
0 commit comments