Skip to content

Commit d5dad72

Browse files
committed
#32 address pr comments
1 parent b3f9705 commit d5dad72

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,13 @@ Encrypts a raw hex-encoded message using the BLS threshold encryption from the c
119119

120120
---
121121

122-
### `bite.encryptMessageForCTX(message, scAddress)`
122+
### `bite.encryptMessageForCTX(message, ctxSubmitterAddress)`
123123

124-
Encrypts a raw hex-encoded message specifically for Confidential Transactions (CTX). This is a convenience method that sets the `scAddress` as `AADTE`.
124+
Encrypts a raw hex-encoded message specifically for Confidential Transactions (CTX). This is a convenience method that sets the `scAddress` as `aadTE` - Additional Authentication Data for Threshold Encryption, used to protect user's encrypted data. Address of smart contract that will create CTX with that data should be passed as `ctxSubmitterAddress`. When data is encrypted with `ctxSubmitterAddress` as `aadTE`, only `ctxSubmitterAddress` is allowed to submit CTX to decrypt that data. CTXs submitted by other addresses will be rejected.
125125

126126
- **Parameters**:
127127
- `message`: `string` – A hex string to encrypt (with or without `0x` prefix).
128-
- `scAddress`: `string` – The Smart Contract Address to be used as AADTE.
128+
- `ctxSubmitterAddress`: `string` – The Smart Contract Address to be used as `aadTE`.
129129
- **Returns**: `Promise<string>` – An encrypted hex string in RLP format.
130130

131131
---

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@skalenetwork/bite",
3-
"version": "0.7.1",
3+
"version": "0.8.0",
44
"description": "TS Library to interact with BITE protocol",
55
"homepage": "https://github.com/skalenetwork/bite.ts",
66
"license": "LGPL-3.0-or-later",

src/core/bite.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ export class BITE {
5353
/**
5454
* Encrypt a hex-encoded message using BLS public key for CTX.
5555
* @param message - Hex string (with or without 0x).
56-
* @param scAddress - Smart Contract Address for AADTE.
56+
* @param ctxSubmitterAddress - Smart Contract Address for aadTE.
5757
*/
58-
async encryptMessageForCTX(message: string, scAddress: string): Promise<string> {
58+
async encryptMessageForCTX(message: string, ctxSubmitterAddress: string): Promise<string> {
5959
const committees = await biteRpc.getCommitteesInfo(this.providerURL);
60-
return encrypt.encryptMessage(message, committees, scAddress);
60+
return encrypt.encryptMessage(message, committees, ctxSubmitterAddress);
6161
}
6262

6363
/**

tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The `runSampleBITE2` function performs the following steps:
3737

3838
2. **Encrypted Data Submission**:
3939
* Generates 5 random numbers (range 50-249).
40-
* Encrypts each number using `bite.encryptMessageForCtx(hexValue, contractAddress)`.
40+
* Encrypts each number using `bite.encryptMessageForCTX(hexValue, contractAddress)`.
4141
* Calls `submitEncrypted` on the contract to store these values.
4242

4343
3. **Plaintext Data Submission**:

0 commit comments

Comments
 (0)