@dedot/api 1.0.1 → 1.0.2

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.
@@ -30,9 +30,8 @@ class CheckMortality extends SignedExtension_js_1.SignedExtension {
30
30
  return this.#getSigningHeaderViaLegacyRpc();
31
31
  }
32
32
  async #getSigningHeaderRpcV2() {
33
- const api = this.client;
34
33
  // TODO similar to the legacy, we should account for the case finality is lagging behind
35
- const finalizedBlock = await api.chainHead.finalizedBlock();
34
+ const finalizedBlock = await this.client.block.finalized();
36
35
  return {
37
36
  hash: finalizedBlock.hash,
38
37
  number: finalizedBlock.number,
@@ -27,9 +27,8 @@ export class CheckMortality extends SignedExtension {
27
27
  return this.#getSigningHeaderViaLegacyRpc();
28
28
  }
29
29
  async #getSigningHeaderRpcV2() {
30
- const api = this.client;
31
30
  // TODO similar to the legacy, we should account for the case finality is lagging behind
32
- const finalizedBlock = await api.chainHead.finalizedBlock();
31
+ const finalizedBlock = await this.client.block.finalized();
33
32
  return {
34
33
  hash: finalizedBlock.hash,
35
34
  number: finalizedBlock.number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/api",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A delightful JavaScript/TypeScript client for Polkadot & Substrate",
5
5
  "author": "Thang X. Vu <thang@dedot.dev>",
6
6
  "homepage": "https://dedot.dev",
@@ -13,13 +13,13 @@
13
13
  "type": "module",
14
14
  "sideEffects": false,
15
15
  "dependencies": {
16
- "@dedot/codecs": "1.0.1",
17
- "@dedot/providers": "1.0.1",
18
- "@dedot/runtime-specs": "1.0.1",
19
- "@dedot/shape": "1.0.1",
20
- "@dedot/storage": "1.0.1",
21
- "@dedot/types": "1.0.1",
22
- "@dedot/utils": "1.0.1"
16
+ "@dedot/codecs": "1.0.2",
17
+ "@dedot/providers": "1.0.2",
18
+ "@dedot/runtime-specs": "1.0.2",
19
+ "@dedot/shape": "1.0.2",
20
+ "@dedot/storage": "1.0.2",
21
+ "@dedot/types": "1.0.2",
22
+ "@dedot/utils": "1.0.2"
23
23
  },
24
24
  "scripts": {
25
25
  "build": "tsc --project tsconfig.build.json && tsc --project tsconfig.build.cjs.json",
@@ -48,7 +48,7 @@
48
48
  "node": ">=18"
49
49
  },
50
50
  "license": "Apache-2.0",
51
- "gitHead": "f9f1bd894a76672675008e1f94d4f98422e9655e",
51
+ "gitHead": "dd12c2407c1c3aa72928039b563e9e4e8b532ae3",
52
52
  "module": "./index.js",
53
53
  "types": "./index.d.ts"
54
54
  }