@solana/web3.js 1.25.1 → 1.26.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 +15 -0
- package/lib/index.browser.esm.js.map +1 -1
- package/lib/index.cjs.js +15 -0
- package/lib/index.cjs.js.map +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.esm.js +15 -0
- package/lib/index.esm.js.map +1 -1
- package/lib/index.iife.js +15 -0
- package/lib/index.iife.js.map +1 -1
- package/lib/index.iife.min.js +1 -1
- package/lib/index.iife.min.js.map +1 -1
- package/module.flow.js +5 -0
- package/package.json +1 -1
- package/src/connection.ts +12 -0
package/lib/index.browser.esm.js
CHANGED
|
@@ -4817,6 +4817,21 @@ class Connection {
|
|
|
4817
4817
|
|
|
4818
4818
|
return res.result;
|
|
4819
4819
|
}
|
|
4820
|
+
/**
|
|
4821
|
+
* Fetch the genesis hash
|
|
4822
|
+
*/
|
|
4823
|
+
|
|
4824
|
+
|
|
4825
|
+
async getGenesisHash() {
|
|
4826
|
+
const unsafeRes = await this._rpcRequest('getGenesisHash', []);
|
|
4827
|
+
const res = create(unsafeRes, jsonRpcResult(string()));
|
|
4828
|
+
|
|
4829
|
+
if ('error' in res) {
|
|
4830
|
+
throw new Error('failed to get genesis hash: ' + res.error.message);
|
|
4831
|
+
}
|
|
4832
|
+
|
|
4833
|
+
return res.result;
|
|
4834
|
+
}
|
|
4820
4835
|
/**
|
|
4821
4836
|
* Fetch a processed block from the cluster.
|
|
4822
4837
|
*/
|