@polkadot/rpc-core 8.3.3-7 → 8.4.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/bundle.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { Observable, publishReplay, refCount } from 'rxjs';
4
4
  import { rpcDefinitions } from '@polkadot/types';
5
- import { assert, hexToU8a, isFunction, isNull, isUndefined, lazyMethod, logger, memoize, objectSpread, u8aToU8a } from '@polkadot/util';
5
+ import { assert, hexToU8a, isFunction, isNull, isUndefined, lazyMethod, logger, memoize, objectSpread, u8aConcat, u8aToU8a } from '@polkadot/util';
6
6
  import { drr, refCountDelay } from "./util/index.js";
7
7
  export { packageInfo } from "./packageInfo.js";
8
8
  export * from "./util/index.js";
@@ -403,7 +403,8 @@ export class RpcCore {
403
403
  const entryNum = entryIndex === -1 ? '' : ` entry ${entryIndex}:`;
404
404
 
405
405
  try {
406
- return registry.createTypeUnsafe(type, [isEmpty ? meta.fallback ? hexToU8a(meta.fallback.toHex()) : undefined : meta.modifier.isOptional ? registry.createTypeUnsafe(type, [input], {
406
+ return registry.createTypeUnsafe(type, [isEmpty ? meta.fallback // For old-style Linkage, we add an empty linkage at the end
407
+ ? type.includes('Linkage<') ? u8aConcat(hexToU8a(meta.fallback.toHex()), new Uint8Array(2)) : hexToU8a(meta.fallback.toHex()) : undefined : meta.modifier.isOptional ? registry.createTypeUnsafe(type, [input], {
407
408
  blockHash,
408
409
  isPedantic: true
409
410
  }) : input], {
package/cjs/bundle.js CHANGED
@@ -465,7 +465,8 @@ class RpcCore {
465
465
  const entryNum = entryIndex === -1 ? '' : ` entry ${entryIndex}:`;
466
466
 
467
467
  try {
468
- return registry.createTypeUnsafe(type, [isEmpty ? meta.fallback ? (0, _util.hexToU8a)(meta.fallback.toHex()) : undefined : meta.modifier.isOptional ? registry.createTypeUnsafe(type, [input], {
468
+ return registry.createTypeUnsafe(type, [isEmpty ? meta.fallback // For old-style Linkage, we add an empty linkage at the end
469
+ ? type.includes('Linkage<') ? (0, _util.u8aConcat)((0, _util.hexToU8a)(meta.fallback.toHex()), new Uint8Array(2)) : (0, _util.hexToU8a)(meta.fallback.toHex()) : undefined : meta.modifier.isOptional ? registry.createTypeUnsafe(type, [input], {
469
470
  blockHash,
470
471
  isPedantic: true
471
472
  }) : input], {
@@ -11,6 +11,6 @@ const packageInfo = {
11
11
  name: '@polkadot/rpc-core',
12
12
  path: typeof __dirname === 'string' ? __dirname : 'auto',
13
13
  type: 'cjs',
14
- version: '8.3.3-7'
14
+ version: '8.4.1'
15
15
  };
16
16
  exports.packageInfo = packageInfo;
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "./cjs/detectPackage.js"
21
21
  ],
22
22
  "type": "module",
23
- "version": "8.3.3-7",
23
+ "version": "8.4.1",
24
24
  "main": "./cjs/index.js",
25
25
  "module": "./index.js",
26
26
  "types": "./index.d.ts",
@@ -96,10 +96,10 @@
96
96
  },
97
97
  "dependencies": {
98
98
  "@babel/runtime": "^7.17.9",
99
- "@polkadot/rpc-augment": "8.3.3-7",
100
- "@polkadot/rpc-provider": "8.3.3-7",
101
- "@polkadot/types": "8.3.3-7",
102
- "@polkadot/util": "^9.1.1",
99
+ "@polkadot/rpc-augment": "8.4.1",
100
+ "@polkadot/rpc-provider": "8.4.1",
101
+ "@polkadot/types": "8.4.1",
102
+ "@polkadot/util": "^9.2.1",
103
103
  "rxjs": "^7.5.5"
104
104
  }
105
105
  }
package/packageInfo.js CHANGED
@@ -5,5 +5,5 @@ export const packageInfo = {
5
5
  name: '@polkadot/rpc-core',
6
6
  path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
7
7
  type: 'esm',
8
- version: '8.3.3-7'
8
+ version: '8.4.1'
9
9
  };