Skip to content

Commit ee35032

Browse files
author
Damien LACHAUME / PALO-IT
committed
fix: rename function and typos after review
1 parent b1299a3 commit ee35032

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

.github/workflows/test-client.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ jobs:
197197
run: |
198198
echo "AGGREGATOR_ENDPOINT=${{ inputs.aggregator_endpoint }}" > ./www-test/.env
199199
echo "GENESIS_VERIFICATION_KEY=$(curl -s ${{ inputs.genesis_verification_key }})" >> ./www-test/.env
200-
echo "TRANSACTIONS_HASHES_TO_CERTIFY=$(curl -s ${{ inputs.transactions_hashes_to_certify }})" >> ./www-test/.env
200+
echo "TRANSACTIONS_HASHES_TO_CERTIFY=${{ inputs.transactions_hashes_to_certify }}" >> ./www-test/.env
201201
202202
- name: Start the server
203203
working-directory: mithril-client-wasm

docs/website/root/glossary.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ A Cardano key pair is an asymmetric key pair used to identify a [stake pool oper
2626

2727
## Cardano transaction
2828

29-
A Cardano transaction proof is a cryptographic proof that a set of Cardano transactions is included in the global Cardano transactions set. It is generated unpon request using a [Mithril client](#mithril-client) and is tied to a [certificate](#certificate).
29+
A Cardano transaction proof is a cryptographic proof that a sub-set of Cardano transactions is included in the Cardano transactions set. It is generated upon request from a [Mithril client](#mithril-client) and is signed by a [certificate](#certificate).
3030

31-
A Cardano transaction commitment is stamp that state how much of the global Cardano transactions sets a [Mithril aggregator](#mithril-aggregator) is aware of, only for those transactions a Cardano transaction proof can be generated.
31+
A Cardano transactions set commitment represents, in a succinct way, the Cardano transactions set that was signed by Mithril at a given [Beacon](#beacon).
3232

3333
## Certificate
3434

docs/website/root/manual/developer-docs/nodes/mithril-client-library-wasm.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Mithril client library WASM can be used by Javascript developers to use the Mith
1414
It is responsible for handling the different types of data certified by Mithril, and available through a Mithril aggregator:
1515
- [**Snapshot**](../../../glossary.md#snapshot): list and get.
1616
- [**Mithril stake distribution**](../../../glossary.md#stake-distribution): list and get.
17-
- [**Cardano transaction**](../../../glossary.md#cardano-transaction): list & get commitment, get proofs
17+
- [**Cardano transaction**](../../../glossary.md#cardano-transaction): list & get commitments, get proofs
1818
- [**Certificate**](../../../glossary.md#certificate): list, get, and chain validation.
1919

2020
:::
@@ -124,7 +124,7 @@ console.log("Proof certificate hash", proof.certificate_hash);
124124
let proof_certificate = await client.verify_certificate_chain(proof.certificate_hash);
125125
console.log("verify_certificate_chain OK, last_certificate_from_chain:", proof_certificate);
126126

127-
let valid_cardano_transaction_proof = await client.unstable.compute_cardano_transaction_proof_message(proof, proof_certificate);
127+
let valid_cardano_transaction_proof = await client.unstable.verify_cardano_transaction_proof_then_compute_message(proof, proof_certificate);
128128
console.log("valid_cardano_transaction_proof:", valid_cardano_transaction_proof);
129129
```
130130

mithril-client-wasm/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* The different types of available data certified by Mithril are:
88
* Snapshot: list and get.
99
* Mithril stake distribution: list and get.
10-
* Cardano transactions proofs: list & get commitment, get proofs
10+
* Cardano transactions: list & get commitments, get proofs
1111
* Certificate: list, get, and chain validation.
1212

1313
## Installation

mithril-client-wasm/src/client_wasm.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ impl MithrilUnstableClient {
275275
Ok(result)
276276
}
277277

278-
/// Call the client to compute a cardano transaction proof message
278+
/// Call the client to verify a cardano transaction proof and compute a message
279279
#[wasm_bindgen]
280-
pub async fn compute_cardano_transaction_proof_message(
280+
pub async fn verify_cardano_transaction_proof_then_compute_message(
281281
&self,
282282
cardano_transaction_proof: CardanoTransactionsProofs,
283283
certificate: JsValue,
@@ -552,7 +552,7 @@ mod tests {
552552

553553
client
554554
.unstable
555-
.compute_cardano_transaction_proof_message(tx_proof, certificate)
555+
.verify_cardano_transaction_proof_then_compute_message(tx_proof, certificate)
556556
.await
557557
.expect("Compute tx proof message for matching cert failed");
558558
}

mithril-client-wasm/www-test/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ if (aggregator_capabilities.includes("CardanoTransactions")) {
172172
let ctx_proof_message;
173173
test_number++;
174174
await run_test(
175-
"compute_cardano_transaction_proof_message",
175+
"verify_cardano_transaction_proof_then_compute_message",
176176
test_number,
177177
async () => {
178178
ctx_proof_message =
179-
await client.unstable.compute_cardano_transaction_proof_message(ctx_proof, proof_certificate);
179+
await client.unstable.verify_cardano_transaction_proof_then_compute_message(ctx_proof, proof_certificate);
180180
console.log(
181-
"compute_cardano_transaction_proof_message",
181+
"verify_cardano_transaction_proof_then_compute_message",
182182
ctx_proof_message
183183
);
184184
}

mithril-client-wasm/www/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ displayMessageInDOM("Result", "certificate chain verified ✓");
8484
console.log("verify_certificate_chain OK, last_certificate_from_chain:", proof_certificate);
8585

8686
displayStepInDOM(10, "Validating Cardano transaction proof message...");
87-
let valid_cardano_transaction_proof = await client.unstable.compute_cardano_transaction_proof_message(proof, proof_certificate);
87+
let valid_cardano_transaction_proof = await client.unstable.verify_cardano_transaction_proof_then_compute_message(proof, proof_certificate);
8888
displayMessageInDOM("Result", "Cardano transaction proof message validated ✓");
8989
console.log("valid_cardano_transaction_proof:", valid_cardano_transaction_proof);

0 commit comments

Comments
 (0)