@@ -46,7 +46,11 @@ console.log("aggregator_endpoint: ", aggregator_endpoint);
46
46
console . log ( "aggregator_capabilities: " , aggregator_capabilities ) ;
47
47
48
48
await run_test ( "constructor" , test_number , async ( ) => {
49
- client = new MithrilClient ( aggregator_endpoint , genesis_verification_key ) ;
49
+ client = new MithrilClient ( aggregator_endpoint , genesis_verification_key , {
50
+ // The following option activates the unstable features of the client.
51
+ // Unstable features will trigger an error if this option is not set.
52
+ unstable : true ,
53
+ } ) ;
50
54
} ) ;
51
55
52
56
let snapshots ;
@@ -117,13 +121,13 @@ if (aggregator_capabilities.includes("CardanoTransactions")) {
117
121
let ctx_sets ;
118
122
test_number ++ ;
119
123
await run_test ( "list_cardano_transactions_snapshots" , test_number , async ( ) => {
120
- ctx_sets = await client . unstable . list_cardano_transactions_snapshots ( ) ;
124
+ ctx_sets = await client . list_cardano_transactions_snapshots ( ) ;
121
125
console . log ( "cardano_transactions_sets" , ctx_sets ) ;
122
126
} ) ;
123
127
124
128
test_number ++ ;
125
129
await run_test ( "get_cardano_transactions_snapshot" , test_number , async ( ) => {
126
- const ctx_set = await client . unstable . get_cardano_transactions_snapshot ( ctx_sets [ 0 ] . hash ) ;
130
+ const ctx_set = await client . get_cardano_transactions_snapshot ( ctx_sets [ 0 ] . hash ) ;
127
131
console . log ( "cardano_transaction_set" , ctx_set ) ;
128
132
} ) ;
129
133
@@ -133,9 +137,7 @@ if (aggregator_capabilities.includes("CardanoTransactions")) {
133
137
let ctx_proof ;
134
138
test_number ++ ;
135
139
await run_test ( "get_cardano_transaction_proof" , test_number , async ( ) => {
136
- ctx_proof = await client . unstable . get_cardano_transaction_proofs (
137
- transactions_hashes_to_certify ,
138
- ) ;
140
+ ctx_proof = await client . get_cardano_transaction_proofs ( transactions_hashes_to_certify ) ;
139
141
console . log (
140
142
"got proof for transactions: " ,
141
143
ctx_proof . transactions_hashes ,
@@ -157,11 +159,10 @@ if (aggregator_capabilities.includes("CardanoTransactions")) {
157
159
"verify_cardano_transaction_proof_then_compute_message" ,
158
160
test_number ,
159
161
async ( ) => {
160
- ctx_proof_message =
161
- await client . unstable . verify_cardano_transaction_proof_then_compute_message (
162
- ctx_proof ,
163
- proof_certificate ,
164
- ) ;
162
+ ctx_proof_message = await client . verify_cardano_transaction_proof_then_compute_message (
163
+ ctx_proof ,
164
+ proof_certificate ,
165
+ ) ;
165
166
console . log ( "verify_cardano_transaction_proof_then_compute_message" , ctx_proof_message ) ;
166
167
} ,
167
168
) ;
@@ -181,14 +182,14 @@ if (aggregator_capabilities.includes("CardanoStakeDistribution")) {
181
182
let cardano_stake_distributions ;
182
183
test_number ++ ;
183
184
await run_test ( "list_cardano_stake_distributions" , test_number , async ( ) => {
184
- cardano_stake_distributions = await client . unstable . list_cardano_stake_distributions ( ) ;
185
+ cardano_stake_distributions = await client . list_cardano_stake_distributions ( ) ;
185
186
console . log ( "cardano_stake_distributions" , cardano_stake_distributions ) ;
186
187
} ) ;
187
188
188
189
let cardano_stake_distribution ;
189
190
test_number ++ ;
190
191
await run_test ( "get_cardano_stake_distribution" , test_number , async ( ) => {
191
- cardano_stake_distribution = await client . unstable . get_cardano_stake_distribution (
192
+ cardano_stake_distribution = await client . get_cardano_stake_distribution (
192
193
cardano_stake_distributions [ 0 ] . hash ,
193
194
) ;
194
195
console . log ( "cardano_stake_distribution" , cardano_stake_distribution ) ;
@@ -198,8 +199,7 @@ if (aggregator_capabilities.includes("CardanoStakeDistribution")) {
198
199
await run_test ( "get_cardano_stake_distribution_by_epoch" , test_number , async ( ) => {
199
200
let epoch = BigInt ( cardano_stake_distributions [ 0 ] . epoch ) ;
200
201
201
- cardano_stake_distribution =
202
- await client . unstable . get_cardano_stake_distribution_by_epoch ( epoch ) ;
202
+ cardano_stake_distribution = await client . get_cardano_stake_distribution_by_epoch ( epoch ) ;
203
203
console . log ( "cardano_stake_distribution by epoch" , cardano_stake_distribution ) ;
204
204
} ) ;
205
205
@@ -220,11 +220,10 @@ if (aggregator_capabilities.includes("CardanoStakeDistribution")) {
220
220
let cardano_stake_distribution_message ;
221
221
test_number ++ ;
222
222
await run_test ( "compute_cardano_stake_distribution_message" , test_number , async ( ) => {
223
- cardano_stake_distribution_message =
224
- await client . unstable . compute_cardano_stake_distribution_message (
225
- certificate ,
226
- cardano_stake_distribution ,
227
- ) ;
223
+ cardano_stake_distribution_message = await client . compute_cardano_stake_distribution_message (
224
+ certificate ,
225
+ cardano_stake_distribution ,
226
+ ) ;
228
227
console . log ( "cardano_stake_distribution_message" , cardano_stake_distribution_message ) ;
229
228
} ) ;
230
229
0 commit comments