@dmiller @elesh.mistry
I implemented a pipeline as explained above and one of the pipeline steps is “Generate Token” and it’s a JavaScript Snap. The script internally using load(“sldb:///shared/hmac-sha256.js”); load(“sldb:///shared/enc-base64-min.js”) to load dependencies from project’s SLDB.
I downloaded same from internet and added the load scripts to my projects SLDB. I opened the scripts and it’s again internally again using some other dependency scripts. I downloaded them as well and added to the projects SLDB.
Finally, I am getting the following error.
Cannot read property “HmacSHA256” from undefined in sldb:/hmac-sha256.js at line number 16, Resolution: Please fix the script file error at line: 16 column: -1
I understand, hmac-sha256.js is unable to read property HmacSHA256, because it’s not initialized by the time. But, I don’t know how to fix the error. I think it will be helpful if @elesh.mistry can provide all dependency JavaScript files that he added to his projects SLDC for the “Generate Token” JavaScript Snap. Any help on this matter is much appreciated.
Also, is there any other way that I can load dependency JavaScript script files to my JavaScript Snap?