@polkadot/types-codec 7.1.2-4 → 7.1.2-5
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/abstract/AbstractArray.cjs +1 -1
- package/abstract/AbstractArray.js +1 -1
- package/abstract/AbstractInt.cjs +1 -1
- package/abstract/AbstractInt.js +1 -1
- package/abstract/index.js +1 -1
- package/base/Base.cjs +1 -1
- package/base/Base.js +1 -1
- package/base/Compact.cjs +1 -1
- package/base/Compact.js +1 -1
- package/base/DoNotConstruct.cjs +1 -1
- package/base/DoNotConstruct.js +1 -1
- package/base/Enum.cjs +1 -1
- package/base/Enum.js +1 -1
- package/base/Int.cjs +1 -1
- package/base/Int.js +1 -1
- package/base/Null.cjs +1 -1
- package/base/Null.js +1 -1
- package/base/Option.cjs +1 -1
- package/base/Option.js +1 -1
- package/base/Result.cjs +1 -1
- package/base/Result.js +1 -1
- package/base/Tuple.cjs +1 -1
- package/base/Tuple.js +1 -1
- package/base/UInt.cjs +1 -1
- package/base/UInt.js +1 -1
- package/base/Vec.cjs +1 -1
- package/base/Vec.js +1 -1
- package/base/VecAny.cjs +1 -1
- package/base/VecAny.js +1 -1
- package/base/VecFixed.cjs +1 -1
- package/base/VecFixed.js +1 -1
- package/base/index.js +1 -1
- package/bundle.js +1 -1
- package/cjs/dirname.d.ts +1 -1
- package/cjs/dirname.js +1 -1
- package/detectPackage.cjs +1 -1
- package/detectPackage.js +1 -1
- package/extended/BTreeMap.cjs +1 -1
- package/extended/BTreeMap.js +1 -1
- package/extended/BTreeSet.cjs +1 -1
- package/extended/BTreeSet.js +1 -1
- package/extended/BitVec.cjs +1 -1
- package/extended/BitVec.js +1 -1
- package/extended/Bytes.cjs +1 -1
- package/extended/Bytes.js +1 -1
- package/extended/HashMap.cjs +1 -1
- package/extended/HashMap.js +1 -1
- package/extended/Linkage.cjs +1 -1
- package/extended/Linkage.js +1 -1
- package/extended/Map.cjs +1 -1
- package/extended/Map.js +1 -1
- package/extended/Range.cjs +1 -1
- package/extended/Range.js +1 -1
- package/extended/Type.cjs +1 -1
- package/extended/Type.js +1 -1
- package/extended/U8aFixed.cjs +1 -1
- package/extended/U8aFixed.js +1 -1
- package/extended/WrapperOpaque.cjs +1 -1
- package/extended/WrapperOpaque.js +1 -1
- package/extended/index.js +1 -1
- package/index.js +1 -1
- package/native/Bool.cjs +1 -1
- package/native/Bool.js +1 -1
- package/native/Date.cjs +1 -1
- package/native/Date.js +1 -1
- package/native/Json.cjs +1 -1
- package/native/Json.js +1 -1
- package/native/Raw.cjs +1 -1
- package/native/Raw.js +1 -1
- package/native/Set.cjs +1 -1
- package/native/Set.js +1 -1
- package/native/Struct.cjs +1 -1
- package/native/Struct.data.cjs +1 -1
- package/native/Struct.data.js +1 -1
- package/native/Struct.js +1 -1
- package/native/Text.cjs +1 -1
- package/native/Text.js +1 -1
- package/native/index.js +1 -1
- package/package.json +4 -4
- package/packageInfo.cjs +1 -1
- package/packageInfo.js +1 -1
- package/primitive/I128.cjs +1 -1
- package/primitive/I128.js +1 -1
- package/primitive/I16.cjs +1 -1
- package/primitive/I16.js +1 -1
- package/primitive/I256.cjs +1 -1
- package/primitive/I256.js +1 -1
- package/primitive/I32.cjs +1 -1
- package/primitive/I32.js +1 -1
- package/primitive/I64.cjs +1 -1
- package/primitive/I64.js +1 -1
- package/primitive/I8.cjs +1 -1
- package/primitive/I8.js +1 -1
- package/primitive/U128.cjs +1 -1
- package/primitive/U128.js +1 -1
- package/primitive/U16.cjs +1 -1
- package/primitive/U16.js +1 -1
- package/primitive/U256.cjs +1 -1
- package/primitive/U256.js +1 -1
- package/primitive/U32.cjs +1 -1
- package/primitive/U32.js +1 -1
- package/primitive/U64.cjs +1 -1
- package/primitive/U64.js +1 -1
- package/primitive/U8.cjs +1 -1
- package/primitive/U8.js +1 -1
- package/primitive/USize.cjs +1 -1
- package/primitive/USize.js +1 -1
- package/primitive/index.js +1 -1
- package/types/index.js +1 -1
- package/utils/compareArray.cjs +1 -1
- package/utils/compareArray.js +1 -1
- package/utils/compareMap.cjs +1 -1
- package/utils/compareMap.js +1 -1
- package/utils/compareSet.cjs +1 -1
- package/utils/compareSet.js +1 -1
- package/utils/decodeU8a.cjs +1 -1
- package/utils/decodeU8a.js +1 -1
- package/utils/index.js +1 -1
- package/utils/mapToTypeMap.cjs +1 -1
- package/utils/mapToTypeMap.js +1 -1
- package/utils/sanitize.cjs +1 -1
- package/utils/sanitize.js +1 -1
- package/utils/sortValues.cjs +1 -1
- package/utils/sortValues.js +1 -1
- package/utils/typeToConstructor.cjs +1 -1
- package/utils/typeToConstructor.js +1 -1
- package/utils/typesToMap.cjs +1 -1
- package/utils/typesToMap.js +1 -1
- package/utils/util.cjs +1 -1
- package/utils/util.js +1 -1
package/primitive/I128.cjs
CHANGED
package/primitive/I128.js
CHANGED
package/primitive/I16.cjs
CHANGED
package/primitive/I16.js
CHANGED
package/primitive/I256.cjs
CHANGED
package/primitive/I256.js
CHANGED
package/primitive/I32.cjs
CHANGED
package/primitive/I32.js
CHANGED
package/primitive/I64.cjs
CHANGED
package/primitive/I64.js
CHANGED
package/primitive/I8.cjs
CHANGED
package/primitive/I8.js
CHANGED
package/primitive/U128.cjs
CHANGED
package/primitive/U128.js
CHANGED
package/primitive/U16.cjs
CHANGED
package/primitive/U16.js
CHANGED
package/primitive/U256.cjs
CHANGED
package/primitive/U256.js
CHANGED
package/primitive/U32.cjs
CHANGED
package/primitive/U32.js
CHANGED
package/primitive/U64.cjs
CHANGED
package/primitive/U64.js
CHANGED
package/primitive/U8.cjs
CHANGED
package/primitive/U8.js
CHANGED
package/primitive/USize.cjs
CHANGED
package/primitive/USize.js
CHANGED
package/primitive/index.js
CHANGED
package/types/index.js
CHANGED
package/utils/compareArray.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var _util = require("@polkadot/util");
|
|
|
9
9
|
|
|
10
10
|
var _util2 = require("./util.cjs");
|
|
11
11
|
|
|
12
|
-
// Copyright 2017-
|
|
12
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
13
13
|
// SPDX-License-Identifier: Apache-2.0
|
|
14
14
|
// NOTE These are used internally and when comparing objects, expects that
|
|
15
15
|
// when the second is an Codec[] that the first has to be as well
|
package/utils/compareArray.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2017-
|
|
1
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { isUndefined } from '@polkadot/util';
|
|
4
4
|
import { hasEq } from "./util.js"; // NOTE These are used internally and when comparing objects, expects that
|
package/utils/compareMap.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var _util = require("@polkadot/util");
|
|
|
9
9
|
|
|
10
10
|
var _util2 = require("./util.cjs");
|
|
11
11
|
|
|
12
|
-
// Copyright 2017-
|
|
12
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
13
13
|
// SPDX-License-Identifier: Apache-2.0
|
|
14
14
|
function hasMismatch(a, b) {
|
|
15
15
|
return (0, _util.isUndefined)(a) || ((0, _util2.hasEq)(a) ? !a.eq(b) : a !== b);
|
package/utils/compareMap.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2017-
|
|
1
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { isObject, isUndefined } from '@polkadot/util';
|
|
4
4
|
import { hasEq } from "./util.js";
|
package/utils/compareSet.cjs
CHANGED
|
@@ -7,7 +7,7 @@ exports.compareSet = compareSet;
|
|
|
7
7
|
|
|
8
8
|
var _util = require("@polkadot/util");
|
|
9
9
|
|
|
10
|
-
// Copyright 2017-
|
|
10
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
11
11
|
// SPDX-License-Identifier: Apache-2.0
|
|
12
12
|
function compareSetArray(a, b) {
|
|
13
13
|
// equal number of entries and each entry in the array should match
|
package/utils/compareSet.js
CHANGED
package/utils/decodeU8a.cjs
CHANGED
|
@@ -8,7 +8,7 @@ exports.decodeU8aVec = decodeU8aVec;
|
|
|
8
8
|
|
|
9
9
|
var _util = require("@polkadot/util");
|
|
10
10
|
|
|
11
|
-
// Copyright 2017-
|
|
11
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
12
12
|
// SPDX-License-Identifier: Apache-2.0
|
|
13
13
|
function formatFailure(error, type, u8a, key) {
|
|
14
14
|
return `decodeU8a: failed at ${(0, _util.u8aToHex)(u8a)}…${key ? ` on ${key}` : ''}${type ? `: ${type}` : ''}:: ${error.message}`;
|
package/utils/decodeU8a.js
CHANGED
package/utils/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2017-
|
|
1
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
export { compareArray } from "./compareArray.js";
|
|
4
4
|
export { compareMap } from "./compareMap.js";
|
package/utils/mapToTypeMap.cjs
CHANGED
|
@@ -7,7 +7,7 @@ exports.mapToTypeMap = mapToTypeMap;
|
|
|
7
7
|
|
|
8
8
|
var _typeToConstructor = require("./typeToConstructor.cjs");
|
|
9
9
|
|
|
10
|
-
// Copyright 2017-
|
|
10
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
11
11
|
// SPDX-License-Identifier: Apache-2.0
|
|
12
12
|
|
|
13
13
|
/**
|
package/utils/mapToTypeMap.js
CHANGED
package/utils/sanitize.cjs
CHANGED
|
@@ -14,7 +14,7 @@ exports.removePairOf = removePairOf;
|
|
|
14
14
|
exports.removeTraits = removeTraits;
|
|
15
15
|
exports.removeWrap = removeWrap;
|
|
16
16
|
exports.sanitize = sanitize;
|
|
17
|
-
// Copyright 2017-
|
|
17
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
18
18
|
// SPDX-License-Identifier: Apache-2.0
|
|
19
19
|
const BOUNDED = ['BTreeMap', 'BTreeSet', 'HashMap', 'Vec'];
|
|
20
20
|
const ALLOWED_BOXES = BOUNDED.concat(['Compact', 'DoNotConstruct', 'Int', 'Linkage', 'Range', 'RangeInclusive', 'Result', 'Option', 'UInt', 'WrapperOpaque']);
|
package/utils/sanitize.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2017-
|
|
1
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
const BOUNDED = ['BTreeMap', 'BTreeSet', 'HashMap', 'Vec'];
|
|
4
4
|
const ALLOWED_BOXES = BOUNDED.concat(['Compact', 'DoNotConstruct', 'Int', 'Linkage', 'Range', 'RangeInclusive', 'Result', 'Option', 'UInt', 'WrapperOpaque']);
|
package/utils/sortValues.cjs
CHANGED
|
@@ -9,7 +9,7 @@ exports.sortSet = sortSet;
|
|
|
9
9
|
|
|
10
10
|
var _util = require("@polkadot/util");
|
|
11
11
|
|
|
12
|
-
// Copyright 2017-
|
|
12
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
13
13
|
// SPDX-License-Identifier: Apache-2.0
|
|
14
14
|
|
|
15
15
|
/** @internal **/
|
package/utils/sortValues.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2017-
|
|
1
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { bnToBn, isBigInt, isBn, isFunction, isNumber, stringify } from '@polkadot/util';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ exports.typeToConstructor = typeToConstructor;
|
|
|
7
7
|
|
|
8
8
|
var _util = require("@polkadot/util");
|
|
9
9
|
|
|
10
|
-
// Copyright 2017-
|
|
10
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
11
11
|
// SPDX-License-Identifier: Apache-2.0
|
|
12
12
|
function typeToConstructor(registry, type) {
|
|
13
13
|
return (0, _util.isString)(type) ? registry.createClassUnsafe(type) : type;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright 2017-
|
|
1
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { isString } from '@polkadot/util';
|
|
4
4
|
export function typeToConstructor(registry, type) {
|
package/utils/typesToMap.cjs
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.typesToMap = typesToMap;
|
|
7
7
|
|
|
8
|
-
// Copyright 2017-
|
|
8
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
9
9
|
// SPDX-License-Identifier: Apache-2.0
|
|
10
10
|
function typesToMap(registry, Types) {
|
|
11
11
|
const entries = Object.entries(Types);
|
package/utils/typesToMap.js
CHANGED
package/utils/util.cjs
CHANGED
|
@@ -7,7 +7,7 @@ exports.hasEq = hasEq;
|
|
|
7
7
|
|
|
8
8
|
var _util = require("@polkadot/util");
|
|
9
9
|
|
|
10
|
-
// Copyright 2017-
|
|
10
|
+
// Copyright 2017-2022 @polkadot/types-codec authors & contributors
|
|
11
11
|
// SPDX-License-Identifier: Apache-2.0
|
|
12
12
|
function hasEq(o) {
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
package/utils/util.js
CHANGED