Skip to content

Commit 673b88a

Browse files
author
Damien LACHAUME / PALO-IT
committed
Rename 'transaction_set' into 'transaction_commitment'
1 parent 846b183 commit 673b88a

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

mithril-client-wasm/src/client_wasm.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -220,9 +220,9 @@ impl MithrilUnstableClient {
220220
}
221221
}
222222

223-
/// Call the client for the list of available Cardano transactions sets
223+
/// Call the client for the list of available Cardano transactions commitments
224224
#[wasm_bindgen]
225-
pub async fn list_cardano_transaction_sets(&self) -> WasmResult {
225+
pub async fn list_cardano_transactions_commitments(&self) -> WasmResult {
226226
let result = self
227227
.client
228228
.cardano_transaction_proof()
@@ -233,9 +233,9 @@ impl MithrilUnstableClient {
233233
Ok(serde_wasm_bindgen::to_value(&result)?)
234234
}
235235

236-
/// Call the client to get a Cardano transactions set from a hash
236+
/// Call the client to get a Cardano transactions commitment from a hash
237237
#[wasm_bindgen]
238-
pub async fn get_cardano_transaction_set(&self, hash: &str) -> WasmResult {
238+
pub async fn get_cardano_transactions_commitment(&self, hash: &str) -> WasmResult {
239239
let result = self
240240
.client
241241
.cardano_transaction_proof()
@@ -493,12 +493,12 @@ mod tests {
493493
}
494494

495495
#[wasm_bindgen_test]
496-
async fn list_cardano_transaction_sets_should_return_value_convertible_in_rust_type() {
496+
async fn list_cardano_transactions_commitments_should_return_value_convertible_in_rust_type() {
497497
let cardano_tx_sets_js_value = get_mithril_client()
498498
.unstable
499-
.list_cardano_transaction_sets()
499+
.list_cardano_transactions_commitments()
500500
.await
501-
.expect("list_cardano_transaction_sets should not fail");
501+
.expect("list_cardano_transactions_commitments should not fail");
502502
let cardano_tx_sets = serde_wasm_bindgen::from_value::<Vec<CardanoTransactionCommitment>>(
503503
cardano_tx_sets_js_value,
504504
)
@@ -512,12 +512,12 @@ mod tests {
512512
}
513513

514514
#[wasm_bindgen_test]
515-
async fn get_cardano_transaction_set_should_return_value_convertible_in_rust_type() {
515+
async fn get_cardano_transactions_commitment_should_return_value_convertible_in_rust_type() {
516516
let cardano_tx_set_js_value = get_mithril_client()
517517
.unstable
518-
.get_cardano_transaction_set(test_data::ctx_commitment_hashes()[0])
518+
.get_cardano_transactions_commitment(test_data::ctx_commitment_hashes()[0])
519519
.await
520-
.expect("get_cardano_transaction_set should not fail");
520+
.expect("get_cardano_transactions_commitment should not fail");
521521
let cardano_tx_set =
522522
serde_wasm_bindgen::from_value::<CardanoTransactionCommitment>(cardano_tx_set_js_value)
523523
.expect("conversion should not fail");
@@ -526,12 +526,12 @@ mod tests {
526526
}
527527

528528
#[wasm_bindgen_test]
529-
async fn get_cardano_transaction_set_should_fail_with_unknown_digest() {
529+
async fn get_cardano_transactions_commitment_should_fail_with_unknown_digest() {
530530
get_mithril_client()
531531
.unstable
532-
.get_cardano_transaction_set("whatever")
532+
.get_cardano_transactions_commitment("whatever")
533533
.await
534-
.expect_err("get_cardano_transaction_set should fail");
534+
.expect_err("get_cardano_transactions_commitment should fail");
535535
}
536536

537537
#[wasm_bindgen_test]

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ if (aggregator_capabilities.includes("CardanoTransactions")) {
136136

137137
let ctx_sets;
138138
test_number++;
139-
await run_test("list_cardano_transactions_sets", test_number, async () => {
140-
ctx_sets = await client.unstable.list_cardano_transaction_sets();
139+
await run_test("list_cardano_transactions_commitments", test_number, async () => {
140+
ctx_sets = await client.unstable.list_cardano_transactions_commitments();
141141
console.log("cardano_transactions_sets", ctx_sets);
142142
});
143143

144144
test_number++;
145-
await run_test("get_cardano_transaction_set", test_number, async () => {
146-
const ctx_set = await client.unstable.get_cardano_transaction_set(ctx_sets[0].hash);
145+
await run_test("get_cardano_transactions_commitment", test_number, async () => {
146+
const ctx_set = await client.unstable.get_cardano_transactions_commitment(ctx_sets[0].hash);
147147
console.log("cardano_transaction_set", ctx_set);
148148
});
149149

@@ -155,7 +155,7 @@ if (aggregator_capabilities.includes("CardanoTransactions")) {
155155
await run_test("get_cardano_transaction_proof", test_number, async () => {
156156
ctx_proof = await client.unstable.get_cardano_transaction_proofs(transactions_hashes_to_certify);
157157
console.log(
158-
"got proof for txs: ", ctx_proof.transactions_hashes,
158+
"got proof for transactions: ", ctx_proof.transactions_hashes,
159159
"\nnon_certified_transactions: ", ctx_proof.non_certified_transactions
160160
);
161161
});

mithril-client/src/cardano_transaction_proof_client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ mod tests {
195195
}
196196

197197
#[tokio::test]
198-
async fn get_cardano_transaction_commitment_list() {
198+
async fn get_cardano_transactions_commitment_list() {
199199
let message = fake_messages();
200200
let mut http_client = MockAggregatorHTTPClient::new();
201201
http_client
@@ -210,7 +210,7 @@ mod tests {
210210
}
211211

212212
#[tokio::test]
213-
async fn get_cardano_transaction_commitment() {
213+
async fn get_cardano_transactions_commitment() {
214214
let mut http_client = MockAggregatorHTTPClient::new();
215215
let message = CardanoTransactionCommitment {
216216
merkle_root: "mk-123".to_string(),

0 commit comments

Comments
 (0)