@polkadot/types-codec 10.9.1 → 10.11.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.
Files changed (86) hide show
  1. package/abstract/Array.js +4 -0
  2. package/abstract/Base.js +5 -0
  3. package/abstract/Int.js +7 -0
  4. package/abstract/Object.js +5 -0
  5. package/base/Compact.js +6 -0
  6. package/base/DoNotConstruct.js +4 -0
  7. package/base/Enum.d.ts +1 -3
  8. package/base/Enum.js +20 -12
  9. package/base/Null.js +6 -3
  10. package/base/Option.js +7 -1
  11. package/base/Tuple.d.ts +1 -3
  12. package/base/Tuple.js +1 -0
  13. package/base/Vec.js +1 -0
  14. package/base/VecFixed.js +1 -0
  15. package/cjs/abstract/Array.js +4 -0
  16. package/cjs/abstract/Base.js +5 -0
  17. package/cjs/abstract/Int.js +7 -0
  18. package/cjs/abstract/Object.js +5 -0
  19. package/cjs/base/Compact.js +6 -0
  20. package/cjs/base/DoNotConstruct.js +4 -0
  21. package/cjs/base/Enum.js +20 -12
  22. package/cjs/base/Null.js +6 -3
  23. package/cjs/base/Option.js +7 -1
  24. package/cjs/base/Tuple.js +1 -0
  25. package/cjs/base/Vec.js +1 -0
  26. package/cjs/base/VecFixed.js +1 -0
  27. package/cjs/extended/BTreeSet.js +5 -0
  28. package/cjs/extended/BitVec.js +3 -1
  29. package/cjs/extended/Map.js +7 -0
  30. package/cjs/extended/OptionBool.js +1 -1
  31. package/cjs/extended/Range.js +1 -0
  32. package/cjs/extended/WrapperKeepOpaque.js +3 -0
  33. package/cjs/native/Bool.js +5 -2
  34. package/cjs/native/Date.js +4 -1
  35. package/cjs/native/Float.js +6 -0
  36. package/cjs/native/Json.js +5 -1
  37. package/cjs/native/Raw.js +4 -0
  38. package/cjs/native/Set.js +27 -23
  39. package/cjs/native/Struct.js +14 -10
  40. package/cjs/native/Text.js +5 -1
  41. package/cjs/packageInfo.js +1 -1
  42. package/cjs/primitive/F32.js +2 -5
  43. package/cjs/primitive/F64.js +2 -5
  44. package/cjs/primitive/I128.js +2 -5
  45. package/cjs/primitive/I16.js +2 -5
  46. package/cjs/primitive/I256.js +2 -5
  47. package/cjs/primitive/I32.js +2 -5
  48. package/cjs/primitive/I64.js +2 -5
  49. package/cjs/primitive/I8.js +2 -5
  50. package/cjs/primitive/U128.js +2 -5
  51. package/cjs/primitive/U16.js +2 -5
  52. package/cjs/primitive/U256.js +2 -5
  53. package/cjs/primitive/U32.js +2 -5
  54. package/cjs/primitive/U64.js +2 -5
  55. package/cjs/primitive/U8.js +2 -5
  56. package/extended/BTreeSet.js +5 -0
  57. package/extended/BitVec.js +3 -1
  58. package/extended/Map.js +7 -0
  59. package/extended/OptionBool.js +1 -1
  60. package/extended/Range.js +1 -0
  61. package/extended/WrapperKeepOpaque.js +3 -0
  62. package/native/Bool.js +5 -2
  63. package/native/Date.js +4 -1
  64. package/native/Float.js +6 -0
  65. package/native/Json.js +5 -1
  66. package/native/Raw.js +4 -0
  67. package/native/Set.js +27 -23
  68. package/native/Struct.d.ts +1 -1
  69. package/native/Struct.js +14 -10
  70. package/native/Text.js +5 -1
  71. package/package.json +5 -5
  72. package/packageInfo.js +1 -1
  73. package/primitive/F32.js +2 -5
  74. package/primitive/F64.js +2 -5
  75. package/primitive/I128.js +2 -5
  76. package/primitive/I16.js +2 -5
  77. package/primitive/I256.js +2 -5
  78. package/primitive/I32.js +2 -5
  79. package/primitive/I64.js +2 -5
  80. package/primitive/I8.js +2 -5
  81. package/primitive/U128.js +2 -5
  82. package/primitive/U16.js +2 -5
  83. package/primitive/U256.js +2 -5
  84. package/primitive/U32.js +2 -5
  85. package/primitive/U64.js +2 -5
  86. package/primitive/U8.js +2 -5
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "bugs": "https://github.com/polkadot-js/api/issues",
4
4
  "description": "Implementation of the SCALE codec",
5
5
  "engines": {
6
- "node": ">=16"
6
+ "node": ">=18"
7
7
  },
8
8
  "homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-codec#readme",
9
9
  "license": "Apache-2.0",
@@ -18,7 +18,7 @@
18
18
  "./cjs/detectPackage.js"
19
19
  ],
20
20
  "type": "module",
21
- "version": "10.9.1",
21
+ "version": "10.11.1",
22
22
  "main": "./cjs/index.js",
23
23
  "module": "./index.js",
24
24
  "types": "./index.d.ts",
@@ -516,8 +516,8 @@
516
516
  }
517
517
  },
518
518
  "dependencies": {
519
- "@polkadot/util": "^12.3.1",
520
- "@polkadot/x-bigint": "^12.3.1",
521
- "tslib": "^2.5.3"
519
+ "@polkadot/util": "^12.6.1",
520
+ "@polkadot/x-bigint": "^12.6.1",
521
+ "tslib": "^2.6.2"
522
522
  }
523
523
  }
package/packageInfo.js CHANGED
@@ -1 +1 @@
1
- export const packageInfo = { name: '@polkadot/types-codec', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '10.9.1' };
1
+ export const packageInfo = { name: '@polkadot/types-codec', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '10.11.1' };
package/primitive/F32.js CHANGED
@@ -5,9 +5,6 @@ import { Float } from '../native/Float.js';
5
5
  * A 32-bit float
6
6
  */
7
7
  export class f32 extends Float.with(32) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__FloatType = 'f32';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __FloatType = 'f32';
13
10
  }
package/primitive/F64.js CHANGED
@@ -5,9 +5,6 @@ import { Float } from '../native/Float.js';
5
5
  * A 64-bit float
6
6
  */
7
7
  export class f64 extends Float.with(64) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__FloatType = 'f64';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __FloatType = 'f64';
13
10
  }
package/primitive/I128.js CHANGED
@@ -5,9 +5,6 @@ import { Int } from '../base/Int.js';
5
5
  * A 128-bit signed integer
6
6
  */
7
7
  export class i128 extends Int.with(128) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__IntType = 'i128';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __IntType = 'i128';
13
10
  }
package/primitive/I16.js CHANGED
@@ -5,9 +5,6 @@ import { Int } from '../base/Int.js';
5
5
  * A 16-bit signed integer
6
6
  */
7
7
  export class i16 extends Int.with(16) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__IntType = 'i16';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __IntType = 'i16';
13
10
  }
package/primitive/I256.js CHANGED
@@ -5,9 +5,6 @@ import { Int } from '../base/Int.js';
5
5
  * A 256-bit signed integer
6
6
  */
7
7
  export class i256 extends Int.with(256) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__IntType = 'i256';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __IntType = 'i256';
13
10
  }
package/primitive/I32.js CHANGED
@@ -5,9 +5,6 @@ import { Int } from '../base/Int.js';
5
5
  * A 32-bit signed integer
6
6
  */
7
7
  export class i32 extends Int.with(32) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__IntType = 'i32';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __IntType = 'i32';
13
10
  }
package/primitive/I64.js CHANGED
@@ -5,9 +5,6 @@ import { Int } from '../base/Int.js';
5
5
  * A 64-bit signed integer
6
6
  */
7
7
  export class i64 extends Int.with(64) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__IntType = 'i64';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __IntType = 'i64';
13
10
  }
package/primitive/I8.js CHANGED
@@ -5,9 +5,6 @@ import { Int } from '../base/Int.js';
5
5
  * An 8-bit signed integer
6
6
  */
7
7
  export class i8 extends Int.with(8) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__IntType = 'i8';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __IntType = 'i8';
13
10
  }
package/primitive/U128.js CHANGED
@@ -5,9 +5,6 @@ import { UInt } from '../base/UInt.js';
5
5
  * A 128-bit unsigned integer
6
6
  */
7
7
  export class u128 extends UInt.with(128) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__UIntType = 'u128';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __UIntType = 'u128';
13
10
  }
package/primitive/U16.js CHANGED
@@ -5,9 +5,6 @@ import { UInt } from '../base/UInt.js';
5
5
  * A 16-bit unsigned integer
6
6
  */
7
7
  export class u16 extends UInt.with(16) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__UIntType = 'u16';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __UIntType = 'u16';
13
10
  }
package/primitive/U256.js CHANGED
@@ -5,9 +5,6 @@ import { UInt } from '../base/UInt.js';
5
5
  * A 256-bit unsigned integer
6
6
  */
7
7
  export class u256 extends UInt.with(256) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__UIntType = 'u256';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __UIntType = 'u256';
13
10
  }
package/primitive/U32.js CHANGED
@@ -5,9 +5,6 @@ import { UInt } from '../base/UInt.js';
5
5
  * A 32-bit unsigned integer
6
6
  */
7
7
  export class u32 extends UInt.with(32) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__UIntType = 'u32';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __UIntType = 'u32';
13
10
  }
package/primitive/U64.js CHANGED
@@ -5,9 +5,6 @@ import { UInt } from '../base/UInt.js';
5
5
  * A 64-bit unsigned integer
6
6
  */
7
7
  export class u64 extends UInt.with(64) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__UIntType = 'u64';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __UIntType = 'u64';
13
10
  }
package/primitive/U8.js CHANGED
@@ -5,9 +5,6 @@ import { UInt } from '../base/UInt.js';
5
5
  * An 8-bit unsigned integer
6
6
  */
7
7
  export class u8 extends UInt.with(8) {
8
- constructor() {
9
- super(...arguments);
10
- // NOTE without this, we cannot properly determine extensions
11
- this.__UIntType = 'u8';
12
- }
8
+ // NOTE without this, we cannot properly determine extensions
9
+ __UIntType = 'u8';
13
10
  }