@solana/web3.js 1.7.2 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.browser.esm.js +20 -79
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +21 -84
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +7 -0
- package/lib/index.esm.js +20 -83
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +27191 -27247
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +23 -23
- package/lib/index.iife.min.js.map +1 -1
- package/module.flow.js +7 -0
- package/package.json +1 -1
- package/src/connection.ts +19 -0
package/module.flow.js
CHANGED
|
@@ -1921,6 +1921,13 @@ account: AccountInfo<Buffer | ParsedAccountData>,...
|
|
|
1921
1921
|
*/
|
|
1922
1922
|
getSlotLeader(commitment?: Commitment): Promise<string>;
|
|
1923
1923
|
|
|
1924
|
+
/**
|
|
1925
|
+
* Fetch `limit` number of slot leaders starting from `startSlot`
|
|
1926
|
+
* @param startSlot fetch slot leaders starting from this slot
|
|
1927
|
+
* @param limit number of slot leaders to return
|
|
1928
|
+
*/
|
|
1929
|
+
getSlotLeaders(startSlot: number, limit: number): Promise<Array<PublicKey>>;
|
|
1930
|
+
|
|
1924
1931
|
/**
|
|
1925
1932
|
* Fetch the current status of a signature
|
|
1926
1933
|
*/
|
package/package.json
CHANGED
package/src/connection.ts
CHANGED
|
@@ -2469,6 +2469,25 @@ export class Connection {
|
|
|
2469
2469
|
return res.result;
|
|
2470
2470
|
}
|
|
2471
2471
|
|
|
2472
|
+
/**
|
|
2473
|
+
* Fetch `limit` number of slot leaders starting from `startSlot`
|
|
2474
|
+
*
|
|
2475
|
+
* @param startSlot fetch slot leaders starting from this slot
|
|
2476
|
+
* @param limit number of slot leaders to return
|
|
2477
|
+
*/
|
|
2478
|
+
async getSlotLeaders(
|
|
2479
|
+
startSlot: number,
|
|
2480
|
+
limit: number,
|
|
2481
|
+
): Promise<Array<PublicKey>> {
|
|
2482
|
+
const args = [startSlot, limit];
|
|
2483
|
+
const unsafeRes = await this._rpcRequest('getSlotLeaders', args);
|
|
2484
|
+
const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));
|
|
2485
|
+
if ('error' in res) {
|
|
2486
|
+
throw new Error('failed to get slot leaders: ' + res.error.message);
|
|
2487
|
+
}
|
|
2488
|
+
return res.result;
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2472
2491
|
/**
|
|
2473
2492
|
* Fetch the current status of a signature
|
|
2474
2493
|
*/
|