@@ -155,17 +155,7 @@ Decrypts the given ciphertext using RSA-OAEP with the provided private key.
155155
156156### Input text decryption/encryption and Signing
157157
158- ### 1. ` decryptValue(ctAmount: bigint, userKey: string) `
159-
160- Decrypts the given ciphertext amount using the user's key.
161-
162- - ** Parameters** :
163- - ` ctAmount ` : Ciphertext amount in ` bigint ` .
164- - ` userKey ` : User's key in hexadecimal format.
165- - ** Returns** :
166- - Decrypted value as an integer.
167-
168- ### 2. ` sign(message: string, privateKey: string) `
158+ ### 1. ` sign(message: string, privateKey: string) `
169159
170160Signs the given message using the provided private key.
171161
@@ -175,7 +165,7 @@ Signs the given message using the provided private key.
175165- ** Returns** :
176166 - Signature as a concatenation of ` r ` , ` s ` , and ` v ` values.
177167
178- ### 3 . ` signInputText(wallet: BaseWallet, userKey: string, contractAddress: string , functionSelector: string, ct: Buffer) `
168+ ### 2 . ` signInputText(wallet: BaseWallet, userKey: string, contractAddress: string , functionSelector: string, ct: Buffer) `
179169
180170Signs the given message using the provided private key.
181171
@@ -188,7 +178,7 @@ Signs the given message using the provided private key.
188178- ** Returns** :
189179 - ` signature ` : The generated signature.
190180
191- ### 4 .` buildInputText(plaintext: bigint, sender: { wallet: BaseWallet; userKey: string }, contractAddress: string, functionSelector: string) `
181+ ### 3 .` buildInputText(plaintext: bigint, sender: { wallet: BaseWallet; userKey: string }, contractAddress: string, functionSelector: string) `
192182
193183Builds input text by encrypting the plaintext and signing it.
194184** Parameters:**
@@ -203,7 +193,7 @@ Builds input text by encrypting the plaintext and signing it.
203193- ` intCipherText ` : The integer representation of the ciphertext.
204194- ` signature ` : The generated signature.
205195
206- ### 5 .` buildStringInputText((plaintext: string, sender: { wallet: BaseWallet; userKey: string }, contractAddress: string, functionSelector: string) `
196+ ### 4 .` buildStringInputText((plaintext: string, sender: { wallet: BaseWallet; userKey: string }, contractAddress: string, functionSelector: string) `
207197
208198Builds input text by encrypting the plaintext and signing it.
209199** Parameters:**
@@ -218,6 +208,32 @@ Builds input text by encrypting the plaintext and signing it.
218208- ` intCipherText ` : The integer representation of the ciphertext.
219209- ` signature ` : The generated signature.
220210
211+ ### 5. ` decryptUint(ciphertext: bigint, userKey: string) `
212+
213+ Decrypts a value stored in a contract using a user key.
214+
215+ ** Parameters:**
216+
217+ - ` ciphertext ` : The value to be decrypted.
218+ - ` userKey ` : The user's AES key.
219+
220+ ** Returns:**
221+
222+ - ` result ` : The decrypted value.
223+
224+ ### 6. ` decryptString(ciphertext: Array<bigint>, userKey: string) `
225+
226+ Decrypts a value stored in a contract using a user key.
227+
228+ ** Parameters:**
229+
230+ - ` ciphertext ` : The value to be decrypted.
231+ - ` userKey ` : The user's AES key.
232+
233+ ** Returns:**
234+
235+ - ` result ` : The decrypted value.
236+
221237# ether_utils.ts
222238
223239This TypeScript library, ` ethers_utils.ts ` , provides ethers functionality to interact with the COTI-v2 network. Below is
@@ -365,33 +381,7 @@ Checks if the provided gas units are sufficient for the transaction.
365381- ` valid ` : Boolean indicating if the gas units are sufficient.
366382- ` gas_estimate ` : The estimated gas units.
367383
368- ### 13. ` decryptUint(ciphertext: bigint, userKey: string) `
369-
370- Decrypts a value stored in a contract using a user key.
371-
372- ** Parameters:**
373-
374- - ` ciphertext ` : The value to be decrypted.
375- - ` userKey ` : The user's AES key.
376-
377- ** Returns:**
378-
379- - ` result ` : The decrypted value.
380-
381- ### 14. ` decryptString(ciphertext: Array<bigint>, userKey: string) `
382-
383- Decrypts a value stored in a contract using a user key.
384-
385- ** Parameters:**
386-
387- - ` ciphertext ` : The value to be decrypted.
388- - ` userKey ` : The user's AES key.
389-
390- ** Returns:**
391-
392- - ` result ` : The decrypted value.
393-
394- ### 15.` isProviderConnected(provider: Provider) `
384+ ### 13.` isProviderConnected(provider: Provider) `
395385
396386Checks if the Web3 instance is connected.
397387
@@ -403,7 +393,7 @@ Checks if the Web3 instance is connected.
403393
404394- ` connected ` : Boolean indicating if Web3 is connected.
405395
406- ### 16 . ` getNativeBalance(address: string, provider: Provider) `
396+ ### 14 . ` getNativeBalance(address: string, provider: Provider) `
407397
408398Retrieves the native balance of an address in Ether.
409399
0 commit comments