@@ -316,16 +316,16 @@ class AleoNetworkClient {
316
316
/**
317
317
* Returns the contents of the block at the specified block height.
318
318
*
319
- * @param {number } height
319
+ * @param {number } blockHeight
320
320
* @example
321
321
* const block = networkClient.getBlock(1234);
322
322
*/
323
- async getBlock ( height : number ) : Promise < BlockJSON > {
323
+ async getBlock ( blockHeight : number ) : Promise < BlockJSON > {
324
324
try {
325
- const block = await this . fetchData < BlockJSON > ( "/block/" + height ) ;
325
+ const block = await this . fetchData < BlockJSON > ( "/block/" + blockHeight ) ;
326
326
return block ;
327
327
} catch ( error ) {
328
- throw new Error ( `Error fetching block ${ height } : ${ error } ` ) ;
328
+ throw new Error ( `Error fetching block ${ blockHeight } : ${ error } ` ) ;
329
329
}
330
330
}
331
331
@@ -460,18 +460,18 @@ class AleoNetworkClient {
460
460
/**
461
461
* Returns the committe at the specified block height.
462
462
*
463
- * @param {number } height
463
+ * @param {number } blockHeight
464
464
*
465
465
* @returns {Promise<object> } A javascript object containing the committee
466
466
*
467
467
* @example
468
468
* const committee = await networkClient.getCommitteByBlockHeight(1234);
469
469
*/
470
- async getCommitteeByBlockHeight ( height : number ) : Promise < object > {
470
+ async getCommitteeByBlockHeight ( blockHeight : number ) : Promise < object > {
471
471
try {
472
- return await this . fetchData < object > ( `/committee/${ height } ` ) ;
472
+ return await this . fetchData < object > ( `/committee/${ blockHeight } ` ) ;
473
473
} catch ( error ) {
474
- throw new Error ( `Error fetching committee at height ${ height } : ${ error } ` ) ;
474
+ throw new Error ( `Error fetching committee at height ${ blockHeight } : ${ error } ` ) ;
475
475
}
476
476
}
477
477
@@ -493,9 +493,9 @@ class AleoNetworkClient {
493
493
* Returns the latest block hash.
494
494
*
495
495
* @example
496
- * const latestHash - newtworkClient.getLatestHash ();
496
+ * const latestHash - newtworkClient.getLatestBlockHash ();
497
497
*/
498
- async getLatestHash ( ) : Promise < string > {
498
+ async getLatestBlockHash ( ) : Promise < string > {
499
499
try {
500
500
return String ( await this . fetchData < string > ( "/block/hash/latest" ) ) ;
501
501
} catch ( error ) {
@@ -809,13 +809,13 @@ class AleoNetworkClient {
809
809
/**
810
810
* Returns the transactions present at the specified block height.
811
811
*
812
- * @param {number } height
812
+ * @param {number } blockHeight
813
813
* @example
814
814
* const transactions = networkClient.getTransactions(654);
815
815
*/
816
- async getTransactions ( height : number ) : Promise < Array < ConfirmedTransactionJSON > > {
816
+ async getTransactions ( blockHeight : number ) : Promise < Array < ConfirmedTransactionJSON > > {
817
817
try {
818
- return await this . fetchData < Array < ConfirmedTransactionJSON > > ( "/block/" + height . toString ( ) + "/transactions" ) ;
818
+ return await this . fetchData < Array < ConfirmedTransactionJSON > > ( "/block/" + blockHeight . toString ( ) + "/transactions" ) ;
819
819
} catch ( error ) {
820
820
throw new Error ( `Error fetching transactions: ${ error } ` ) ;
821
821
}
0 commit comments