@@ -27,11 +27,8 @@ interface ShutterDecryptionKeyData {
2727 */
2828async function fetchShutterData ( decryptionTimestamp : number ) : Promise < ShutterApiMessageData > {
2929 try {
30- console . log ( `Sending request to Shutter API with decryption timestamp: ${ decryptionTimestamp } ` ) ;
31-
3230 // Generate a random identity prefix
3331 const identityPrefix = generateRandomBytes32 ( ) ;
34- console . log ( `Generated identity prefix: ${ identityPrefix } ` ) ;
3532
3633 const response = await fetch ( "https://shutter-api.shutter.network/api/register_identity" , {
3734 method : "POST" ,
@@ -46,7 +43,6 @@ async function fetchShutterData(decryptionTimestamp: number): Promise<ShutterApi
4643 } ) ;
4744
4845 // Log the response status
49- console . log ( `API response status: ${ response . status } ` ) ;
5046
5147 // Get the response text
5248 const responseText = await response . text ( ) ;
@@ -81,8 +77,6 @@ async function fetchShutterData(decryptionTimestamp: number): Promise<ShutterApi
8177 * @returns Promise with the decryption key data
8278 */
8379async function fetchDecryptionKey ( identity : string ) : Promise < ShutterDecryptionKeyData > {
84- console . log ( `Fetching decryption key for identity: ${ identity } ` ) ;
85-
8680 const response = await fetch ( `https://shutter-api.shutter.network/api/get_decryption_key?identity=${ identity } ` , {
8781 method : "GET" ,
8882 headers : {
@@ -160,7 +154,6 @@ export async function encrypt(
160154 const decryptionTimestamp = Math . floor ( Date . now ( ) / 1000 ) + decryptionDelay ;
161155
162156 // Fetch encryption data from Shutter API
163- console . log ( `Fetching encryption data for decryption at timestamp ${ decryptionTimestamp } ...` ) ;
164157 const shutterData = await fetchShutterData ( decryptionTimestamp ) ;
165158
166159 // Extract the eon key and identity from the response and ensure they have the correct format
@@ -173,10 +166,6 @@ export async function encrypt(
173166 // Generate a random sigma
174167 const sigmaHex = generateRandomBytes32 ( ) ;
175168
176- console . log ( "Eon Key:" , eonKeyHex ) ;
177- console . log ( "Identity:" , identityHex ) ;
178- console . log ( "Sigma:" , sigmaHex ) ;
179-
180169 // Encrypt the message
181170 const encryptedCommitment = await encryptData ( msgHex , identityHex , eonKeyHex , sigmaHex ) ;
182171
@@ -192,7 +181,6 @@ export async function encrypt(
192181export async function decrypt ( encryptedMessage : string , identity : string ) : Promise < string > {
193182 // Fetch the decryption key
194183 const decryptionKeyData = await fetchDecryptionKey ( identity ) ;
195- console . log ( "Decryption key:" , decryptionKeyData . decryption_key ) ;
196184
197185 // Ensure the decryption key is properly formatted
198186 const decryptionKey = ensureHexString ( decryptionKeyData . decryption_key ) ;
0 commit comments