@dedot/api 0.18.1 → 0.18.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.
@@ -114,6 +114,12 @@ class BaseSubmittableExtrinsic extends codecs_1.Extrinsic {
114
114
  const atApi = (await this.client.at(hash));
115
115
  return await atApi.query.system.events();
116
116
  }
117
+ toU8a() {
118
+ if (this.#alterTx) {
119
+ return (0, utils_1.hexToU8a)(this.#alterTx);
120
+ }
121
+ return super.toU8a();
122
+ }
117
123
  toHex() {
118
124
  return this.#alterTx || super.toHex();
119
125
  }
@@ -21,6 +21,7 @@ export declare abstract class BaseSubmittableExtrinsic extends Extrinsic impleme
21
21
  send(): TxHash;
22
22
  send(callback: Callback): TxUnsub;
23
23
  protected getSystemEventsAt(hash: BlockHash): Promise<FrameSystemEventRecord[]>;
24
+ toU8a(): Uint8Array;
24
25
  toHex(): HexString;
25
26
  }
26
27
  export {};
@@ -1,5 +1,5 @@
1
1
  import { Extrinsic } from '@dedot/codecs';
2
- import { DedotError, isFunction, toHex, u8aToHex } from '@dedot/utils';
2
+ import { DedotError, hexToU8a, isFunction, toHex, u8aToHex } from '@dedot/utils';
3
3
  import { ExtraSignedExtension } from '../extensions/index.js';
4
4
  import { fakeSigner } from './fakeSigner.js';
5
5
  import { isKeyringPair, signRawMessage, txDefer } from './utils.js';
@@ -111,6 +111,12 @@ export class BaseSubmittableExtrinsic extends Extrinsic {
111
111
  const atApi = (await this.client.at(hash));
112
112
  return await atApi.query.system.events();
113
113
  }
114
+ toU8a() {
115
+ if (this.#alterTx) {
116
+ return hexToU8a(this.#alterTx);
117
+ }
118
+ return super.toU8a();
119
+ }
114
120
  toHex() {
115
121
  return this.#alterTx || super.toHex();
116
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dedot/api",
3
- "version": "0.18.1",
3
+ "version": "0.18.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": "0.18.1",
17
- "@dedot/providers": "0.18.1",
18
- "@dedot/runtime-specs": "0.18.1",
19
- "@dedot/shape": "0.18.1",
20
- "@dedot/storage": "0.18.1",
21
- "@dedot/types": "0.18.1",
22
- "@dedot/utils": "0.18.1"
16
+ "@dedot/codecs": "0.18.2",
17
+ "@dedot/providers": "0.18.2",
18
+ "@dedot/runtime-specs": "0.18.2",
19
+ "@dedot/shape": "0.18.2",
20
+ "@dedot/storage": "0.18.2",
21
+ "@dedot/types": "0.18.2",
22
+ "@dedot/utils": "0.18.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": "3ffda568232b50a3993d13c6ccac2894b0759dd7",
51
+ "gitHead": "ed3c658d49d7fd9d9dc1befd1c838edc4656d317",
52
52
  "module": "./index.js",
53
53
  "types": "./index.d.ts"
54
54
  }