@@ -94,10 +94,11 @@ broadcast_channel.onmessage = (e) => {
94
94
95
95
await initMithrilClient ();
96
96
97
- let client = await new MithrilClient (
98
- aggregator_endpoint,
99
- genesis_verification_key,
100
- );
97
+ let client = new MithrilClient (aggregator_endpoint, genesis_verification_key, {
98
+ // The following option activates the unstable features of the client.
99
+ // Unstable features will trigger an error if this option is not set.
100
+ unstable: true ,
101
+ });
101
102
let mithril_stake_distributions_list =
102
103
await client .list_mithril_stake_distributions ();
103
104
console .log (" stake distributions:" , mithril_stake_distributions_list);
@@ -187,7 +188,7 @@ wget -q -O - https://aggregator.pre-release-preview.api.mithril.network/aggregat
187
188
:::
188
189
189
190
``` js
190
- const proof = await client .unstable . get_cardano_transaction_proofs ([
191
+ const proof = await client .get_cardano_transaction_proofs ([
191
192
" CARDANO_TRANSACTION_HASH_1" ,
192
193
" CARDANO_TRANSACTION_HASH_2" ,
193
194
]);
@@ -203,7 +204,7 @@ console.log(
203
204
);
204
205
205
206
let valid_cardano_transaction_proof =
206
- await client .unstable . verify_cardano_transaction_proof_then_compute_message (
207
+ await client .verify_cardano_transaction_proof_then_compute_message (
207
208
proof,
208
209
proof_certificate,
209
210
);
@@ -233,11 +234,11 @@ wget -q -O - https://aggregator.testing-preview.api.mithril.network/aggregator |
233
234
234
235
``` js
235
236
let cardano_stake_distributions_list =
236
- await client .unstable . list_cardano_stake_distributions ();
237
+ await client .list_cardano_stake_distributions ();
237
238
console .log (" cardano stake distributions:" , cardano_stake_distributions_list);
238
239
239
240
let last_cardano_stake_distribution =
240
- await client .unstable . get_cardano_stake_distribution (
241
+ await client .get_cardano_stake_distribution (
241
242
cardano_stake_distributions_list[0 ].hash ,
242
243
);
243
244
console .log (
@@ -259,7 +260,7 @@ console.log(
259
260
);
260
261
261
262
let cardano_stake_distribution_message =
262
- await client .unstable . compute_cardano_stake_distribution_message (
263
+ await client .compute_cardano_stake_distribution_message (
263
264
certificate,
264
265
last_cardano_stake_distribution,
265
266
);
0 commit comments