@polkadot/types-codec 7.1.2-1 → 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.
Files changed (131) hide show
  1. package/abstract/AbstractArray.cjs +1 -1
  2. package/abstract/AbstractArray.js +1 -1
  3. package/abstract/AbstractInt.cjs +1 -1
  4. package/abstract/AbstractInt.js +1 -1
  5. package/abstract/index.js +1 -1
  6. package/base/Base.cjs +1 -1
  7. package/base/Base.js +1 -1
  8. package/base/Compact.cjs +1 -1
  9. package/base/Compact.js +1 -1
  10. package/base/DoNotConstruct.cjs +1 -1
  11. package/base/DoNotConstruct.js +1 -1
  12. package/base/Enum.cjs +1 -1
  13. package/base/Enum.js +1 -1
  14. package/base/Int.cjs +1 -1
  15. package/base/Int.js +1 -1
  16. package/base/Null.cjs +1 -1
  17. package/base/Null.js +1 -1
  18. package/base/Option.cjs +1 -1
  19. package/base/Option.js +1 -1
  20. package/base/Result.cjs +1 -1
  21. package/base/Result.js +1 -1
  22. package/base/Tuple.cjs +1 -1
  23. package/base/Tuple.js +1 -1
  24. package/base/UInt.cjs +1 -1
  25. package/base/UInt.js +1 -1
  26. package/base/Vec.cjs +1 -1
  27. package/base/Vec.js +1 -1
  28. package/base/VecAny.cjs +1 -1
  29. package/base/VecAny.js +1 -1
  30. package/base/VecFixed.cjs +1 -1
  31. package/base/VecFixed.js +1 -1
  32. package/base/index.js +1 -1
  33. package/bundle.js +1 -1
  34. package/cjs/dirname.d.ts +6 -0
  35. package/cjs/dirname.js +6 -0
  36. package/cjs/package.json +3 -0
  37. package/detectPackage.cjs +6 -2
  38. package/detectPackage.js +2 -1
  39. package/extended/BTreeMap.cjs +1 -1
  40. package/extended/BTreeMap.js +1 -1
  41. package/extended/BTreeSet.cjs +1 -1
  42. package/extended/BTreeSet.js +1 -1
  43. package/extended/BitVec.cjs +1 -1
  44. package/extended/BitVec.js +1 -1
  45. package/extended/Bytes.cjs +1 -1
  46. package/extended/Bytes.js +1 -1
  47. package/extended/HashMap.cjs +1 -1
  48. package/extended/HashMap.js +1 -1
  49. package/extended/Linkage.cjs +1 -1
  50. package/extended/Linkage.js +1 -1
  51. package/extended/Map.cjs +1 -1
  52. package/extended/Map.js +1 -1
  53. package/extended/Range.cjs +1 -1
  54. package/extended/Range.js +1 -1
  55. package/extended/Type.cjs +1 -1
  56. package/extended/Type.js +1 -1
  57. package/extended/U8aFixed.cjs +1 -1
  58. package/extended/U8aFixed.js +1 -1
  59. package/extended/WrapperOpaque.cjs +1 -1
  60. package/extended/WrapperOpaque.js +1 -1
  61. package/extended/index.js +1 -1
  62. package/index.js +1 -1
  63. package/native/Bool.cjs +1 -1
  64. package/native/Bool.js +1 -1
  65. package/native/Date.cjs +1 -1
  66. package/native/Date.js +1 -1
  67. package/native/Json.cjs +1 -1
  68. package/native/Json.js +1 -1
  69. package/native/Raw.cjs +1 -1
  70. package/native/Raw.js +1 -1
  71. package/native/Set.cjs +1 -1
  72. package/native/Set.js +1 -1
  73. package/native/Struct.cjs +1 -1
  74. package/native/Struct.data.cjs +1 -1
  75. package/native/Struct.data.js +1 -1
  76. package/native/Struct.js +1 -1
  77. package/native/Text.cjs +1 -1
  78. package/native/Text.js +1 -1
  79. package/native/index.js +1 -1
  80. package/package.json +10 -5
  81. package/packageInfo.cjs +1 -1
  82. package/packageInfo.js +1 -1
  83. package/primitive/I128.cjs +1 -1
  84. package/primitive/I128.js +1 -1
  85. package/primitive/I16.cjs +1 -1
  86. package/primitive/I16.js +1 -1
  87. package/primitive/I256.cjs +1 -1
  88. package/primitive/I256.js +1 -1
  89. package/primitive/I32.cjs +1 -1
  90. package/primitive/I32.js +1 -1
  91. package/primitive/I64.cjs +1 -1
  92. package/primitive/I64.js +1 -1
  93. package/primitive/I8.cjs +1 -1
  94. package/primitive/I8.js +1 -1
  95. package/primitive/U128.cjs +1 -1
  96. package/primitive/U128.js +1 -1
  97. package/primitive/U16.cjs +1 -1
  98. package/primitive/U16.js +1 -1
  99. package/primitive/U256.cjs +1 -1
  100. package/primitive/U256.js +1 -1
  101. package/primitive/U32.cjs +1 -1
  102. package/primitive/U32.js +1 -1
  103. package/primitive/U64.cjs +1 -1
  104. package/primitive/U64.js +1 -1
  105. package/primitive/U8.cjs +1 -1
  106. package/primitive/U8.js +1 -1
  107. package/primitive/USize.cjs +1 -1
  108. package/primitive/USize.js +1 -1
  109. package/primitive/index.js +1 -1
  110. package/types/index.js +1 -1
  111. package/utils/compareArray.cjs +1 -1
  112. package/utils/compareArray.js +1 -1
  113. package/utils/compareMap.cjs +1 -1
  114. package/utils/compareMap.js +1 -1
  115. package/utils/compareSet.cjs +1 -1
  116. package/utils/compareSet.js +1 -1
  117. package/utils/decodeU8a.cjs +1 -1
  118. package/utils/decodeU8a.js +1 -1
  119. package/utils/index.js +1 -1
  120. package/utils/mapToTypeMap.cjs +1 -1
  121. package/utils/mapToTypeMap.js +1 -1
  122. package/utils/sanitize.cjs +1 -1
  123. package/utils/sanitize.js +1 -1
  124. package/utils/sortValues.cjs +1 -1
  125. package/utils/sortValues.js +1 -1
  126. package/utils/typeToConstructor.cjs +1 -1
  127. package/utils/typeToConstructor.js +1 -1
  128. package/utils/typesToMap.cjs +1 -1
  129. package/utils/typesToMap.js +1 -1
  130. package/utils/util.cjs +1 -1
  131. package/utils/util.js +1 -1
@@ -9,7 +9,7 @@ var _util = require("@polkadot/util");
9
9
 
10
10
  var _compareArray = require("../utils/compareArray.cjs");
11
11
 
12
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
12
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
13
13
  // SPDX-License-Identifier: Apache-2.0
14
14
 
15
15
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { compactToU8a, u8aConcat, u8aToHex } from '@polkadot/util';
4
4
  import { compareArray } from "../utils/compareArray.js";
@@ -13,7 +13,7 @@ var _classPrivateFieldLooseKey2 = _interopRequireDefault(require("@babel/runtime
13
13
 
14
14
  var _util = require("@polkadot/util");
15
15
 
16
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
16
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
17
17
  // SPDX-License-Identifier: Apache-2.0
18
18
  const DEFAULT_UINT_BITS = 64; // Maximum allowed integer for JS is 2^53 - 1, set limit at 52
19
19
  // In this case however, we always print any >32 as hex
@@ -1,6 +1,6 @@
1
1
  import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
2
2
  import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
3
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
3
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  import { assert, BN, BN_BILLION, BN_HUNDRED, BN_MILLION, BN_QUINTILL, BN_ZERO, bnToBn, bnToHex, bnToU8a, formatBalance, formatNumber, hexToBn, isBn, isHex, isU8a, u8aToBn } from '@polkadot/util';
6
6
  export const DEFAULT_UINT_BITS = 64; // Maximum allowed integer for JS is 2^53 - 1, set limit at 52
package/abstract/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  export { AbstractArray } from "./AbstractArray.js";
4
4
  export { AbstractInt } from "./AbstractInt.js";
package/base/Base.cjs CHANGED
@@ -15,7 +15,7 @@ var _registry = /*#__PURE__*/(0, _classPrivateFieldLooseKey2.default)("registry"
15
15
 
16
16
  var _raw = /*#__PURE__*/(0, _classPrivateFieldLooseKey2.default)("raw");
17
17
 
18
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
18
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
19
19
  // SPDX-License-Identifier: Apache-2.0
20
20
 
21
21
  /**
package/base/Base.js CHANGED
@@ -5,7 +5,7 @@ var _registry = /*#__PURE__*/_classPrivateFieldLooseKey("registry");
5
5
 
6
6
  var _raw = /*#__PURE__*/_classPrivateFieldLooseKey("raw");
7
7
 
8
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
8
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
9
9
  // SPDX-License-Identifier: Apache-2.0
10
10
 
11
11
  /**
package/base/Compact.cjs CHANGED
@@ -15,7 +15,7 @@ var _util = require("@polkadot/util");
15
15
 
16
16
  var _index = require("../utils/index.cjs");
17
17
 
18
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
18
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
19
19
  // SPDX-License-Identifier: Apache-2.0
20
20
  var _Type = /*#__PURE__*/(0, _classPrivateFieldLooseKey2.default)("Type");
21
21
 
package/base/Compact.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
2
2
  import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
3
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
3
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  import { compactFromU8a, compactToU8a, isBigInt, isBn, isNumber, isString } from '@polkadot/util';
6
6
  import { typeToConstructor } from "../utils/index.js";
@@ -13,7 +13,7 @@ var _classPrivateFieldLooseKey2 = _interopRequireDefault(require("@babel/runtime
13
13
 
14
14
  var _neverError = /*#__PURE__*/(0, _classPrivateFieldLooseKey2.default)("neverError");
15
15
 
16
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
16
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
17
17
  // SPDX-License-Identifier: Apache-2.0
18
18
 
19
19
  /**
@@ -3,7 +3,7 @@ import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateF
3
3
 
4
4
  var _neverError = /*#__PURE__*/_classPrivateFieldLooseKey("neverError");
5
5
 
6
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
6
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
7
7
  // SPDX-License-Identifier: Apache-2.0
8
8
 
9
9
  /**
package/base/Enum.cjs CHANGED
@@ -17,7 +17,7 @@ var _index = require("../utils/index.cjs");
17
17
 
18
18
  var _Null = require("./Null.cjs");
19
19
 
20
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
20
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
21
21
  // SPDX-License-Identifier: Apache-2.0
22
22
  function isRustEnum(def) {
23
23
  const defValues = Object.values(def);
package/base/Enum.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
2
2
  import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
3
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
3
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  import { assert, isHex, isNumber, isObject, isString, isU8a, isUndefined, objectProperties, stringCamelCase, stringify, stringPascalCase, u8aConcat, u8aToHex, u8aToU8a } from '@polkadot/util';
6
6
  import { mapToTypeMap, typesToMap } from "../utils/index.js";
package/base/Int.cjs CHANGED
@@ -7,7 +7,7 @@ exports.Int = void 0;
7
7
 
8
8
  var _AbstractInt = require("../abstract/AbstractInt.cjs");
9
9
 
10
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
10
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
11
11
  // SPDX-License-Identifier: Apache-2.0
12
12
 
13
13
  /**
package/base/Int.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { AbstractInt } from "../abstract/AbstractInt.js";
4
4
  /**
package/base/Null.cjs CHANGED
@@ -7,7 +7,7 @@ exports.Null = void 0;
7
7
 
8
8
  var _util = require("@polkadot/util");
9
9
 
10
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
10
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
11
11
  // SPDX-License-Identifier: Apache-2.0
12
12
 
13
13
  /**
package/base/Null.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { isNull } from '@polkadot/util';
4
4
  /**
package/base/Option.cjs CHANGED
@@ -17,7 +17,7 @@ var _index = require("../utils/index.cjs");
17
17
 
18
18
  var _Null = require("./Null.cjs");
19
19
 
20
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
20
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
21
21
  // SPDX-License-Identifier: Apache-2.0
22
22
 
23
23
  /** @internal */
package/base/Option.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
2
2
  import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
3
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
3
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  import { assert, isCodec, isNull, isU8a, isUndefined, u8aToHex } from '@polkadot/util';
6
6
  import { typeToConstructor } from "../utils/index.js";
package/base/Result.cjs CHANGED
@@ -9,7 +9,7 @@ var _util = require("@polkadot/util");
9
9
 
10
10
  var _Enum = require("./Enum.cjs");
11
11
 
12
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
12
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
13
13
  // SPDX-License-Identifier: Apache-2.0
14
14
 
15
15
  /**
package/base/Result.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { assert } from '@polkadot/util';
4
4
  import { Enum } from "./Enum.js";
package/base/Tuple.cjs CHANGED
@@ -17,7 +17,7 @@ var _AbstractArray = require("../abstract/AbstractArray.cjs");
17
17
 
18
18
  var _index = require("../utils/index.cjs");
19
19
 
20
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
20
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
21
21
  // SPDX-License-Identifier: Apache-2.0
22
22
 
23
23
  /** @internal */
package/base/Tuple.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
2
2
  import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
3
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
3
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  import { isFunction, isHex, isString, isU8a, stringify, u8aConcat, u8aToU8a } from '@polkadot/util';
6
6
  import { AbstractArray } from "../abstract/AbstractArray.js";
package/base/UInt.cjs CHANGED
@@ -7,7 +7,7 @@ exports.UInt = void 0;
7
7
 
8
8
  var _AbstractInt = require("../abstract/AbstractInt.cjs");
9
9
 
10
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
10
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
11
11
  // SPDX-License-Identifier: Apache-2.0
12
12
 
13
13
  /**
package/base/UInt.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { AbstractInt } from "../abstract/AbstractInt.js";
4
4
  /**
package/base/Vec.cjs CHANGED
@@ -18,7 +18,7 @@ var _AbstractArray = require("../abstract/AbstractArray.cjs");
18
18
 
19
19
  var _index = require("../utils/index.cjs");
20
20
 
21
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
21
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
22
22
  // SPDX-License-Identifier: Apache-2.0
23
23
  const MAX_LENGTH = 64 * 1024;
24
24
  const l = (0, _util.logger)('Vec');
package/base/Vec.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
2
2
  import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
3
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
3
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  import { assert, compactFromU8a, logger, u8aToU8a } from '@polkadot/util';
6
6
  import { AbstractArray } from "../abstract/AbstractArray.js";
package/base/VecAny.cjs CHANGED
@@ -7,7 +7,7 @@ exports.VecAny = void 0;
7
7
 
8
8
  var _AbstractArray = require("../abstract/AbstractArray.cjs");
9
9
 
10
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
10
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
11
11
  // SPDX-License-Identifier: Apache-2.0
12
12
 
13
13
  /**
package/base/VecAny.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { AbstractArray } from "../abstract/AbstractArray.js";
4
4
  /**
package/base/VecFixed.cjs CHANGED
@@ -19,7 +19,7 @@ var _index = require("../utils/index.cjs");
19
19
 
20
20
  var _Vec = require("./Vec.cjs");
21
21
 
22
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
22
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
23
23
  // SPDX-License-Identifier: Apache-2.0
24
24
 
25
25
  /** @internal */
package/base/VecFixed.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
2
2
  import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
3
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
3
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  import { assert, isU8a, u8aConcat } from '@polkadot/util';
6
6
  import { AbstractArray } from "../abstract/AbstractArray.js";
package/base/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  export { Base } from "./Base.js";
4
4
  export { Compact } from "./Compact.js";
package/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  export { packageInfo } from "./packageInfo.js";
4
4
  export * from "./abstract/index.js";
@@ -0,0 +1,6 @@
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ declare const __dirname: string | undefined;
5
+
6
+ export default __dirname;
package/cjs/dirname.js ADDED
@@ -0,0 +1,6 @@
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ module.exports = typeof __dirname === 'string'
5
+ ? __dirname.replace('/cjs', '')
6
+ : undefined;
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
package/detectPackage.cjs CHANGED
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  var _util = require("@polkadot/util");
4
6
 
7
+ var _dirname2 = _interopRequireDefault(require("./cjs/dirname"));
8
+
5
9
  var _packageInfo = require("./packageInfo.cjs");
6
10
 
7
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
11
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
8
12
  // SPDX-License-Identifier: Apache-2.0
9
- (0, _util.detectPackage)(_packageInfo.packageInfo, typeof __dirname !== 'undefined' && __dirname, []);
13
+ (0, _util.detectPackage)(_packageInfo.packageInfo, typeof _dirname2.default !== 'undefined' && _dirname2.default, []);
package/detectPackage.js CHANGED
@@ -1,5 +1,6 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { detectPackage } from '@polkadot/util';
4
+ import __dirname from "./cjs/dirname.js";
4
5
  import { packageInfo } from "./packageInfo.js";
5
6
  detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, []);
@@ -7,7 +7,7 @@ exports.BTreeMap = void 0;
7
7
 
8
8
  var _Map = require("./Map.cjs");
9
9
 
10
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
10
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
11
11
  // SPDX-License-Identifier: Apache-2.0
12
12
  class BTreeMap extends _Map.CodecMap {
13
13
  static with(keyType, valType) {
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { CodecMap } from "./Map.js";
4
4
  export class BTreeMap extends CodecMap {
@@ -15,7 +15,7 @@ var _util = require("@polkadot/util");
15
15
 
16
16
  var _index = require("../utils/index.cjs");
17
17
 
18
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
18
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
19
19
  // SPDX-License-Identifier: Apache-2.0
20
20
  const l = (0, _util.logger)('BTreeSet');
21
21
  /** @internal */
@@ -1,6 +1,6 @@
1
1
  import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
2
2
  import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
3
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
3
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  import { compactFromU8a, compactToU8a, isHex, isU8a, logger, stringify, u8aConcat, u8aToHex, u8aToU8a } from '@polkadot/util';
6
6
  import { compareSet, decodeU8aVec, sortSet, typeToConstructor } from "../utils/index.js";
@@ -15,7 +15,7 @@ var _util = require("@polkadot/util");
15
15
 
16
16
  var _Raw = require("../native/Raw.cjs");
17
17
 
18
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
18
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
19
19
  // SPDX-License-Identifier: Apache-2.0
20
20
 
21
21
  /** @internal */
@@ -1,6 +1,6 @@
1
1
  import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
2
2
  import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
3
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
3
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  import { assert, compactFromU8a, compactToU8a, isString, u8aConcat, u8aToU8a } from '@polkadot/util';
6
6
  import { Raw } from "../native/Raw.js";
@@ -9,7 +9,7 @@ var _util = require("@polkadot/util");
9
9
 
10
10
  var _Raw = require("../native/Raw.cjs");
11
11
 
12
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
12
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
13
13
  // SPDX-License-Identifier: Apache-2.0
14
14
  // Bytes are used for things like on-chain code, so it has a healthy limit
15
15
  const MAX_LENGTH = 10 * 1024 * 1024;
package/extended/Bytes.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { assert, compactAddLength, compactFromU8a, compactToU8a, isString, isU8a, u8aToU8a } from '@polkadot/util';
4
4
  import { Raw } from "../native/Raw.js"; // Bytes are used for things like on-chain code, so it has a healthy limit
@@ -7,7 +7,7 @@ exports.HashMap = void 0;
7
7
 
8
8
  var _Map = require("./Map.cjs");
9
9
 
10
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
10
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
11
11
  // SPDX-License-Identifier: Apache-2.0
12
12
  class HashMap extends _Map.CodecMap {
13
13
  static with(keyType, valType) {
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { CodecMap } from "./Map.js";
4
4
  export class HashMap extends CodecMap {
@@ -13,7 +13,7 @@ var _Vec = require("../base/Vec.cjs");
13
13
 
14
14
  var _Struct = require("../native/Struct.cjs");
15
15
 
16
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
16
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
17
17
  // SPDX-License-Identifier: Apache-2.0
18
18
  const EMPTY = new Uint8Array();
19
19
  /**
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { Option } from "../base/Option.js";
4
4
  import { Tuple } from "../base/Tuple.js";
package/extended/Map.cjs CHANGED
@@ -21,7 +21,7 @@ var _Struct = require("../native/Struct.cjs");
21
21
 
22
22
  var _index = require("../utils/index.cjs");
23
23
 
24
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
24
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
25
25
  // SPDX-License-Identifier: Apache-2.0
26
26
  const l = (0, _util.logger)('Map');
27
27
  /** @internal */
package/extended/Map.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
2
2
  import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
3
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
3
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  import { compactFromU8a, compactToU8a, isHex, isObject, isU8a, logger, stringify, u8aConcat, u8aToHex, u8aToU8a } from '@polkadot/util';
6
6
  import { AbstractArray } from "../abstract/AbstractArray.js";
@@ -13,7 +13,7 @@ var _classPrivateFieldLooseKey2 = _interopRequireDefault(require("@babel/runtime
13
13
 
14
14
  var _Tuple = require("../base/Tuple.cjs");
15
15
 
16
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
16
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
17
17
  // SPDX-License-Identifier: Apache-2.0
18
18
  var _rangeName = /*#__PURE__*/(0, _classPrivateFieldLooseKey2.default)("rangeName");
19
19
 
package/extended/Range.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import _classPrivateFieldLooseBase from "@babel/runtime/helpers/esm/classPrivateFieldLooseBase";
2
2
  import _classPrivateFieldLooseKey from "@babel/runtime/helpers/esm/classPrivateFieldLooseKey";
3
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
3
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
4
4
  // SPDX-License-Identifier: Apache-2.0
5
5
  import { Tuple } from "../base/Tuple.js";
6
6
 
package/extended/Type.cjs CHANGED
@@ -9,7 +9,7 @@ var _Text = require("../native/Text.cjs");
9
9
 
10
10
  var _index = require("../utils/index.cjs");
11
11
 
12
- // Copyright 2017-2021 @polkadot/types authors & contributors
12
+ // Copyright 2017-2022 @polkadot/types authors & contributors
13
13
  // SPDX-License-Identifier: Apache-2.0
14
14
 
15
15
  /**
package/extended/Type.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { Text } from "../native/Text.js";
4
4
  import { sanitize } from "../utils/index.js";
@@ -9,7 +9,7 @@ var _util = require("@polkadot/util");
9
9
 
10
10
  var _Raw = require("../native/Raw.cjs");
11
11
 
12
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
12
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
13
13
  // SPDX-License-Identifier: Apache-2.0
14
14
 
15
15
  /** @internal */
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { assert, u8aToU8a } from '@polkadot/util';
4
4
  import { Raw } from "../native/Raw.js";
@@ -11,7 +11,7 @@ var _Base = require("../base/Base.cjs");
11
11
 
12
12
  var _index = require("../utils/index.cjs");
13
13
 
14
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
14
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
15
15
  // SPDX-License-Identifier: Apache-2.0
16
16
  function decodeRaw(registry, Type, value) {
17
17
  const Clazz = (0, _index.typeToConstructor)(registry, Type);
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { compactAddLength, compactStripLength, isU8a } from '@polkadot/util';
4
4
  import { Base } from "../base/Base.js";
package/extended/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  export { BitVec } from "./BitVec.js";
4
4
  export { BTreeMap } from "./BTreeMap.js";
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import "./detectPackage.js";
4
4
  export * from "./bundle.js";
package/native/Bool.cjs CHANGED
@@ -7,7 +7,7 @@ exports.bool = void 0;
7
7
 
8
8
  var _util = require("@polkadot/util");
9
9
 
10
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
10
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
11
11
  // SPDX-License-Identifier: Apache-2.0
12
12
 
13
13
  /** @internal */
package/native/Bool.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { isU8a, u8aToHex } from '@polkadot/util';
4
4
  /** @internal */
package/native/Date.cjs CHANGED
@@ -7,7 +7,7 @@ exports.CodecDate = void 0;
7
7
 
8
8
  var _util = require("@polkadot/util");
9
9
 
10
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
10
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
11
11
  // SPDX-License-Identifier: Apache-2.0
12
12
  const BITLENGTH = 64;
13
13
 
package/native/Date.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2017-2021 @polkadot/types-codec authors & contributors
1
+ // Copyright 2017-2022 @polkadot/types-codec authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { BN, bnToBn, bnToHex, bnToU8a, isString, isU8a, u8aToBn } from '@polkadot/util';
4
4
  const BITLENGTH = 64;