@polkadot/types-codec 10.0.1 → 10.1.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 (171) hide show
  1. package/abstract/Array.d.ts +1 -1
  2. package/abstract/Array.js +0 -4
  3. package/abstract/Base.d.ts +1 -1
  4. package/abstract/Base.js +18 -19
  5. package/abstract/Int.d.ts +1 -1
  6. package/abstract/Int.js +11 -14
  7. package/abstract/Object.d.ts +1 -1
  8. package/abstract/Object.js +0 -5
  9. package/abstract/index.d.ts +3 -3
  10. package/base/Compact.d.ts +1 -1
  11. package/base/Compact.js +24 -25
  12. package/base/DoNotConstruct.d.ts +1 -1
  13. package/base/DoNotConstruct.js +19 -19
  14. package/base/Enum.d.ts +1 -1
  15. package/base/Enum.js +54 -53
  16. package/base/Int.d.ts +2 -2
  17. package/base/Null.d.ts +1 -1
  18. package/base/Null.js +3 -6
  19. package/base/Option.d.ts +1 -1
  20. package/base/Option.js +21 -22
  21. package/base/Result.d.ts +2 -2
  22. package/base/Tuple.d.ts +2 -2
  23. package/base/Tuple.js +10 -7
  24. package/base/UInt.d.ts +2 -2
  25. package/base/Vec.d.ts +2 -2
  26. package/base/Vec.js +12 -9
  27. package/base/VecAny.d.ts +2 -2
  28. package/base/VecFixed.d.ts +2 -2
  29. package/base/VecFixed.js +9 -6
  30. package/base/index.d.ts +12 -12
  31. package/bundle.d.ts +7 -7
  32. package/cjs/abstract/Array.js +2 -2
  33. package/cjs/abstract/index.js +6 -6
  34. package/cjs/base/Compact.js +2 -2
  35. package/cjs/base/Enum.js +8 -8
  36. package/cjs/base/Int.js +2 -2
  37. package/cjs/base/Option.js +4 -4
  38. package/cjs/base/Result.js +2 -2
  39. package/cjs/base/Tuple.js +8 -8
  40. package/cjs/base/UInt.js +2 -2
  41. package/cjs/base/Vec.js +6 -6
  42. package/cjs/base/VecAny.js +2 -2
  43. package/cjs/base/VecFixed.js +7 -7
  44. package/cjs/base/index.js +24 -24
  45. package/cjs/bundle.js +8 -8
  46. package/cjs/detectPackage.js +3 -3
  47. package/cjs/extended/BTreeMap.js +2 -2
  48. package/cjs/extended/BTreeSet.js +5 -5
  49. package/cjs/extended/BitVec.js +2 -2
  50. package/cjs/extended/Bytes.js +3 -3
  51. package/cjs/extended/HashMap.js +2 -2
  52. package/cjs/extended/Linkage.js +10 -10
  53. package/cjs/extended/Map.js +15 -15
  54. package/cjs/extended/OptionBool.js +5 -5
  55. package/cjs/extended/Range.js +2 -2
  56. package/cjs/extended/RangeInclusive.js +2 -2
  57. package/cjs/extended/Type.js +4 -4
  58. package/cjs/extended/U8aFixed.js +2 -2
  59. package/cjs/extended/WrapperKeepOpaque.js +6 -6
  60. package/cjs/extended/WrapperOpaque.js +2 -2
  61. package/cjs/extended/index.js +29 -29
  62. package/cjs/index.js +2 -2
  63. package/cjs/native/Json.js +2 -2
  64. package/cjs/native/Set.js +2 -2
  65. package/cjs/native/Struct.js +5 -5
  66. package/cjs/native/Text.js +2 -2
  67. package/cjs/native/index.js +19 -19
  68. package/cjs/packageInfo.js +1 -1
  69. package/cjs/primitive/F32.js +2 -2
  70. package/cjs/primitive/F64.js +2 -2
  71. package/cjs/primitive/I128.js +2 -2
  72. package/cjs/primitive/I16.js +2 -2
  73. package/cjs/primitive/I256.js +2 -2
  74. package/cjs/primitive/I32.js +2 -2
  75. package/cjs/primitive/I64.js +2 -2
  76. package/cjs/primitive/I8.js +2 -2
  77. package/cjs/primitive/U128.js +2 -2
  78. package/cjs/primitive/U16.js +2 -2
  79. package/cjs/primitive/U256.js +2 -2
  80. package/cjs/primitive/U32.js +2 -2
  81. package/cjs/primitive/U64.js +2 -2
  82. package/cjs/primitive/U8.js +2 -2
  83. package/cjs/primitive/USize.js +2 -2
  84. package/cjs/primitive/index.js +45 -45
  85. package/cjs/types/index.js +4 -4
  86. package/cjs/utils/compareArray.js +2 -2
  87. package/cjs/utils/compareMap.js +2 -2
  88. package/cjs/utils/index.js +22 -22
  89. package/cjs/utils/mapToTypeMap.js +2 -2
  90. package/extended/BTreeMap.d.ts +2 -2
  91. package/extended/BTreeSet.d.ts +1 -1
  92. package/extended/BTreeSet.js +7 -8
  93. package/extended/BitVec.d.ts +2 -2
  94. package/extended/BitVec.js +12 -9
  95. package/extended/Bytes.d.ts +2 -2
  96. package/extended/HashMap.d.ts +2 -2
  97. package/extended/Linkage.d.ts +4 -4
  98. package/extended/Map.d.ts +1 -1
  99. package/extended/Map.js +11 -12
  100. package/extended/OptionBool.d.ts +3 -3
  101. package/extended/Range.d.ts +2 -2
  102. package/extended/Range.js +7 -4
  103. package/extended/RangeInclusive.d.ts +2 -2
  104. package/extended/Type.d.ts +2 -2
  105. package/extended/U8aFixed.d.ts +2 -2
  106. package/extended/WrapperKeepOpaque.d.ts +2 -2
  107. package/extended/WrapperKeepOpaque.js +23 -20
  108. package/extended/WrapperOpaque.d.ts +2 -2
  109. package/extended/index.d.ts +14 -14
  110. package/index.d.ts +2 -2
  111. package/native/Bool.d.ts +1 -1
  112. package/native/Bool.js +1 -4
  113. package/native/Date.d.ts +1 -1
  114. package/native/Date.js +1 -4
  115. package/native/Float.d.ts +1 -1
  116. package/native/Float.js +8 -10
  117. package/native/Json.d.ts +1 -1
  118. package/native/Json.js +0 -4
  119. package/native/Raw.d.ts +1 -1
  120. package/native/Raw.js +0 -4
  121. package/native/Set.d.ts +1 -1
  122. package/native/Set.js +35 -34
  123. package/native/Struct.d.ts +1 -1
  124. package/native/Struct.js +22 -21
  125. package/native/Text.d.ts +1 -1
  126. package/native/Text.js +7 -8
  127. package/native/index.d.ts +8 -8
  128. package/package.json +3 -3
  129. package/packageInfo.js +1 -1
  130. package/primitive/F32.d.ts +2 -2
  131. package/primitive/F32.js +5 -2
  132. package/primitive/F64.d.ts +2 -2
  133. package/primitive/F64.js +5 -2
  134. package/primitive/I128.d.ts +2 -2
  135. package/primitive/I128.js +5 -2
  136. package/primitive/I16.d.ts +2 -2
  137. package/primitive/I16.js +5 -2
  138. package/primitive/I256.d.ts +2 -2
  139. package/primitive/I256.js +5 -2
  140. package/primitive/I32.d.ts +2 -2
  141. package/primitive/I32.js +5 -2
  142. package/primitive/I64.d.ts +2 -2
  143. package/primitive/I64.js +5 -2
  144. package/primitive/I8.d.ts +2 -2
  145. package/primitive/I8.js +5 -2
  146. package/primitive/U128.d.ts +2 -2
  147. package/primitive/U128.js +5 -2
  148. package/primitive/U16.d.ts +2 -2
  149. package/primitive/U16.js +5 -2
  150. package/primitive/U256.d.ts +2 -2
  151. package/primitive/U256.js +5 -2
  152. package/primitive/U32.d.ts +2 -2
  153. package/primitive/U32.js +5 -2
  154. package/primitive/U64.d.ts +2 -2
  155. package/primitive/U64.js +5 -2
  156. package/primitive/U8.d.ts +2 -2
  157. package/primitive/U8.js +5 -2
  158. package/primitive/USize.d.ts +2 -2
  159. package/primitive/index.d.ts +15 -15
  160. package/types/codec.d.ts +3 -3
  161. package/types/helpers.d.ts +1 -1
  162. package/types/index.d.ts +4 -4
  163. package/types/interfaces.d.ts +2 -2
  164. package/types/registry.d.ts +3 -3
  165. package/utils/decodeU8a.d.ts +1 -1
  166. package/utils/index.d.ts +9 -9
  167. package/utils/mapToTypeMap.d.ts +1 -1
  168. package/utils/sanitize.d.ts +1 -1
  169. package/utils/sortValues.d.ts +1 -1
  170. package/utils/typeToConstructor.d.ts +1 -1
  171. package/utils/typesToMap.d.ts +1 -1
package/primitive/F64.js CHANGED
@@ -5,6 +5,9 @@ import { Float } from '../native/Float.js';
5
5
  * A 64-bit float
6
6
  */
7
7
  export class f64 extends Float.with(64) {
8
- // NOTE without this, we cannot properly determine extensions
9
- __FloatType = 'f64';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__FloatType = 'f64';
12
+ }
10
13
  }
@@ -1,5 +1,5 @@
1
- import { Int } from '../base/Int';
2
- declare const i128_base: import("../types").CodecClass<Int>;
1
+ import { Int } from '../base/Int.js';
2
+ declare const i128_base: import("../types/codec.js").CodecClass<Int>;
3
3
  /**
4
4
  * @name i128
5
5
  * @description
package/primitive/I128.js CHANGED
@@ -5,6 +5,9 @@ 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
- // NOTE without this, we cannot properly determine extensions
9
- __IntType = 'i128';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__IntType = 'i128';
12
+ }
10
13
  }
@@ -1,5 +1,5 @@
1
- import { Int } from '../base/Int';
2
- declare const i16_base: import("../types").CodecClass<Int>;
1
+ import { Int } from '../base/Int.js';
2
+ declare const i16_base: import("../types/codec.js").CodecClass<Int>;
3
3
  /**
4
4
  * @name i16
5
5
  * @description
package/primitive/I16.js CHANGED
@@ -5,6 +5,9 @@ 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
- // NOTE without this, we cannot properly determine extensions
9
- __IntType = 'i16';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__IntType = 'i16';
12
+ }
10
13
  }
@@ -1,5 +1,5 @@
1
- import { Int } from '../base/Int';
2
- declare const i256_base: import("../types").CodecClass<Int>;
1
+ import { Int } from '../base/Int.js';
2
+ declare const i256_base: import("../types/codec.js").CodecClass<Int>;
3
3
  /**
4
4
  * @name i256
5
5
  * @description
package/primitive/I256.js CHANGED
@@ -5,6 +5,9 @@ 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
- // NOTE without this, we cannot properly determine extensions
9
- __IntType = 'i256';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__IntType = 'i256';
12
+ }
10
13
  }
@@ -1,5 +1,5 @@
1
- import { Int } from '../base/Int';
2
- declare const i32_base: import("../types").CodecClass<Int>;
1
+ import { Int } from '../base/Int.js';
2
+ declare const i32_base: import("../types/codec.js").CodecClass<Int>;
3
3
  /**
4
4
  * @name i32
5
5
  * @description
package/primitive/I32.js CHANGED
@@ -5,6 +5,9 @@ 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
- // NOTE without this, we cannot properly determine extensions
9
- __IntType = 'i32';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__IntType = 'i32';
12
+ }
10
13
  }
@@ -1,5 +1,5 @@
1
- import { Int } from '../base/Int';
2
- declare const i64_base: import("../types").CodecClass<Int>;
1
+ import { Int } from '../base/Int.js';
2
+ declare const i64_base: import("../types/codec.js").CodecClass<Int>;
3
3
  /**
4
4
  * @name i64
5
5
  * @description
package/primitive/I64.js CHANGED
@@ -5,6 +5,9 @@ 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
- // NOTE without this, we cannot properly determine extensions
9
- __IntType = 'i64';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__IntType = 'i64';
12
+ }
10
13
  }
package/primitive/I8.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Int } from '../base/Int';
2
- declare const i8_base: import("../types").CodecClass<Int>;
1
+ import { Int } from '../base/Int.js';
2
+ declare const i8_base: import("../types/codec.js").CodecClass<Int>;
3
3
  /**
4
4
  * @name i8
5
5
  * @description
package/primitive/I8.js CHANGED
@@ -5,6 +5,9 @@ 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
- // NOTE without this, we cannot properly determine extensions
9
- __IntType = 'i8';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__IntType = 'i8';
12
+ }
10
13
  }
@@ -1,5 +1,5 @@
1
- import { UInt } from '../base/UInt';
2
- declare const u128_base: import("../types").CodecClass<UInt>;
1
+ import { UInt } from '../base/UInt.js';
2
+ declare const u128_base: import("../types/codec.js").CodecClass<UInt>;
3
3
  /**
4
4
  * @name u128
5
5
  * @description
package/primitive/U128.js CHANGED
@@ -5,6 +5,9 @@ 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
- // NOTE without this, we cannot properly determine extensions
9
- __UIntType = 'u128';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__UIntType = 'u128';
12
+ }
10
13
  }
@@ -1,5 +1,5 @@
1
- import { UInt } from '../base/UInt';
2
- declare const u16_base: import("../types").CodecClass<UInt>;
1
+ import { UInt } from '../base/UInt.js';
2
+ declare const u16_base: import("../types/codec.js").CodecClass<UInt>;
3
3
  /**
4
4
  * @name u16
5
5
  * @description
package/primitive/U16.js CHANGED
@@ -5,6 +5,9 @@ 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
- // NOTE without this, we cannot properly determine extensions
9
- __UIntType = 'u16';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__UIntType = 'u16';
12
+ }
10
13
  }
@@ -1,5 +1,5 @@
1
- import { UInt } from '../base/UInt';
2
- declare const u256_base: import("../types").CodecClass<UInt>;
1
+ import { UInt } from '../base/UInt.js';
2
+ declare const u256_base: import("../types/codec.js").CodecClass<UInt>;
3
3
  /**
4
4
  * @name u256
5
5
  * @description
package/primitive/U256.js CHANGED
@@ -5,6 +5,9 @@ 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
- // NOTE without this, we cannot properly determine extensions
9
- __UIntType = 'u256';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__UIntType = 'u256';
12
+ }
10
13
  }
@@ -1,5 +1,5 @@
1
- import { UInt } from '../base/UInt';
2
- declare const u32_base: import("../types").CodecClass<UInt>;
1
+ import { UInt } from '../base/UInt.js';
2
+ declare const u32_base: import("../types/codec.js").CodecClass<UInt>;
3
3
  /**
4
4
  * @name u32
5
5
  * @description
package/primitive/U32.js CHANGED
@@ -5,6 +5,9 @@ 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
- // NOTE without this, we cannot properly determine extensions
9
- __UIntType = 'u32';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__UIntType = 'u32';
12
+ }
10
13
  }
@@ -1,5 +1,5 @@
1
- import { UInt } from '../base/UInt';
2
- declare const u64_base: import("../types").CodecClass<UInt>;
1
+ import { UInt } from '../base/UInt.js';
2
+ declare const u64_base: import("../types/codec.js").CodecClass<UInt>;
3
3
  /**
4
4
  * @name u64
5
5
  * @description
package/primitive/U64.js CHANGED
@@ -5,6 +5,9 @@ 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
- // NOTE without this, we cannot properly determine extensions
9
- __UIntType = 'u64';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__UIntType = 'u64';
12
+ }
10
13
  }
package/primitive/U8.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { UInt } from '../base/UInt';
2
- declare const u8_base: import("../types").CodecClass<UInt>;
1
+ import { UInt } from '../base/UInt.js';
2
+ declare const u8_base: import("../types/codec.js").CodecClass<UInt>;
3
3
  /**
4
4
  * @name u8
5
5
  * @description
package/primitive/U8.js CHANGED
@@ -5,6 +5,9 @@ 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
- // NOTE without this, we cannot properly determine extensions
9
- __UIntType = 'u8';
8
+ constructor() {
9
+ super(...arguments);
10
+ // NOTE without this, we cannot properly determine extensions
11
+ this.__UIntType = 'u8';
12
+ }
10
13
  }
@@ -1,5 +1,5 @@
1
- import type { Registry } from '../types';
2
- import { u32 } from './U32';
1
+ import type { Registry } from '../types/index.js';
2
+ import { u32 } from './U32.js';
3
3
  /**
4
4
  * @name USize
5
5
  * @description
@@ -1,15 +1,15 @@
1
- export { f32, f32 as F32 } from './F32';
2
- export { f64, f64 as F64 } from './F64';
3
- export { i8, i8 as I8 } from './I8';
4
- export { i16, i16 as I16 } from './I16';
5
- export { i32, i32 as I32 } from './I32';
6
- export { i64, i64 as I64 } from './I64';
7
- export { i128, i128 as I128 } from './I128';
8
- export { i256, i256 as I256 } from './I256';
9
- export { u8, u8 as U8 } from './U8';
10
- export { u16, u16 as U16 } from './U16';
11
- export { u32, u32 as U32 } from './U32';
12
- export { u64, u64 as U64 } from './U64';
13
- export { u128, u128 as U128 } from './U128';
14
- export { u256, u256 as U256 } from './U256';
15
- export { usize, usize as USize } from './USize';
1
+ export { f32, f32 as F32 } from './F32.js';
2
+ export { f64, f64 as F64 } from './F64.js';
3
+ export { i8, i8 as I8 } from './I8.js';
4
+ export { i16, i16 as I16 } from './I16.js';
5
+ export { i32, i32 as I32 } from './I32.js';
6
+ export { i64, i64 as I64 } from './I64.js';
7
+ export { i128, i128 as I128 } from './I128.js';
8
+ export { i256, i256 as I256 } from './I256.js';
9
+ export { u8, u8 as U8 } from './U8.js';
10
+ export { u16, u16 as U16 } from './U16.js';
11
+ export { u32, u32 as U32 } from './U32.js';
12
+ export { u64, u64 as U64 } from './U64.js';
13
+ export { u128, u128 as U128 } from './U128.js';
14
+ export { u256, u256 as U256 } from './U256.js';
15
+ export { usize, usize as USize } from './USize.js';
package/types/codec.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type { HexString } from '@polkadot/util/types';
2
- import type { AnyJson, ToString } from './helpers';
3
- import type { IU8a } from './interfaces';
4
- import type { Registry } from './registry';
2
+ import type { AnyJson, ToString } from './helpers.js';
3
+ import type { IU8a } from './interfaces.js';
4
+ import type { Registry } from './registry.js';
5
5
  export type BareOpts = boolean | Record<string, boolean>;
6
6
  export interface Inspect {
7
7
  inner?: Inspect[];
@@ -1,7 +1,7 @@
1
1
  /// <reference types="bn.js" />
2
2
  import type { BN } from '@polkadot/util';
3
3
  import type { HexString } from '@polkadot/util/types';
4
- import type { Codec } from './codec';
4
+ import type { Codec } from './codec.js';
5
5
  export type AnyJson = string | number | boolean | null | undefined | AnyJson[] | {
6
6
  [index: string]: AnyJson;
7
7
  };
package/types/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './codec';
2
- export * from './helpers';
3
- export * from './interfaces';
4
- export * from './registry';
1
+ export * from './codec.js';
2
+ export * from './helpers.js';
3
+ export * from './interfaces.js';
4
+ export * from './registry.js';
@@ -1,7 +1,7 @@
1
1
  /// <reference types="bn.js" />
2
2
  import type { BN } from '@polkadot/util';
3
- import type { ArgsDef, Codec } from './codec';
4
- import type { AnyTuple } from './helpers';
3
+ import type { ArgsDef, Codec } from './codec.js';
4
+ import type { AnyTuple } from './helpers.js';
5
5
  export interface ICompact<T extends INumber = INumber> extends Codec {
6
6
  toBigInt(): bigint;
7
7
  toBn(): BN;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="bn.js" />
2
2
  import type { BN } from '@polkadot/util';
3
- import type { Codec, CodecClass } from './codec';
4
- import type { AnyTuple, LookupString } from './helpers';
5
- import type { ICompact, IEnum, IMap, IMethod, INumber, IOption, IResult, ISet, IStruct, ITuple, IU8a, IVec } from './interfaces';
3
+ import type { Codec, CodecClass } from './codec.js';
4
+ import type { AnyTuple, LookupString } from './helpers.js';
5
+ import type { ICompact, IEnum, IMap, IMethod, INumber, IOption, IResult, ISet, IStruct, ITuple, IU8a, IVec } from './interfaces.js';
6
6
  export type OnlyCodec<K, T, Types> = K extends keyof Types ? Types[K] : T extends ICompact | IEnum | IMap | IMethod | INumber | IOption | IResult | ISet | IStruct | ITuple | IU8a | IVec ? T : T extends Codec ? T : never;
7
7
  export interface RegistryError {
8
8
  args: string[];
@@ -1,4 +1,4 @@
1
- import type { Codec, CodecClass, Registry } from '../types';
1
+ import type { Codec, CodecClass, Registry } from '../types/index.js';
2
2
  /**
3
3
  * @internal
4
4
  *
package/utils/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- export { compareArray } from './compareArray';
2
- export { compareMap } from './compareMap';
3
- export { compareSet } from './compareSet';
4
- export { decodeU8a, decodeU8aStruct, decodeU8aVec } from './decodeU8a';
5
- export { mapToTypeMap } from './mapToTypeMap';
6
- export { typeToConstructor } from './typeToConstructor';
7
- export { sanitize } from './sanitize';
8
- export { sortAsc, sortSet, sortMap } from './sortValues';
9
- export { typesToMap } from './typesToMap';
1
+ export { compareArray } from './compareArray.js';
2
+ export { compareMap } from './compareMap.js';
3
+ export { compareSet } from './compareSet.js';
4
+ export { decodeU8a, decodeU8aStruct, decodeU8aVec } from './decodeU8a.js';
5
+ export { mapToTypeMap } from './mapToTypeMap.js';
6
+ export { typeToConstructor } from './typeToConstructor.js';
7
+ export { sanitize } from './sanitize.js';
8
+ export { sortAsc, sortSet, sortMap } from './sortValues.js';
9
+ export { typesToMap } from './typesToMap.js';
@@ -1,4 +1,4 @@
1
- import type { CodecClass, Registry } from '../types';
1
+ import type { CodecClass, Registry } from '../types/index.js';
2
2
  /**
3
3
  * @description takes an input map of the form `{ [string]: string | CodecClass }` and returns a map of `{ [string]: CodecClass }`
4
4
  */
@@ -1,4 +1,4 @@
1
- import { AnyString } from '../types';
1
+ import { AnyString } from '../types/index.js';
2
2
  type Mapper = (value: string) => string;
3
3
  export declare function trim(): Mapper;
4
4
  export declare function findClosing(value: string, start: number): number;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="bn.js" />
2
2
  import type { BN } from '@polkadot/util';
3
- import type { Codec } from '../types';
3
+ import type { Codec } from '../types/index.js';
4
4
  type SortArg = Codec | Codec[] | number[] | BN | bigint | number | Uint8Array;
5
5
  /**
6
6
  * Sort keys/values of BTreeSet/BTreeMap in ascending order for encoding compatibility with Rust's BTreeSet/BTreeMap
@@ -1,2 +1,2 @@
1
- import type { Codec, CodecClass, Registry } from '../types';
1
+ import type { Codec, CodecClass, Registry } from '../types/index.js';
2
2
  export declare function typeToConstructor<T extends Codec = Codec>(registry: Registry, type: string | CodecClass<T>): CodecClass<T>;
@@ -1,2 +1,2 @@
1
- import type { CodecClass, Registry } from '../types';
1
+ import type { CodecClass, Registry } from '../types/index.js';
2
2
  export declare function typesToMap(registry: Registry, [Types, keys]: [CodecClass[], string[]]): Record<string, string>;