@polkadot/types-codec 10.1.2 → 10.1.4

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 (170) hide show
  1. package/abstract/Array.js +1 -1
  2. package/abstract/Base.js +1 -1
  3. package/abstract/Int.d.ts +2 -2
  4. package/abstract/Int.js +3 -5
  5. package/abstract/Object.js +1 -1
  6. package/abstract/index.js +1 -1
  7. package/base/Compact.d.ts +1 -1
  8. package/base/Compact.js +2 -3
  9. package/base/DoNotConstruct.js +1 -1
  10. package/base/Enum.js +1 -1
  11. package/base/Int.js +1 -1
  12. package/base/Null.d.ts +1 -1
  13. package/base/Null.js +2 -3
  14. package/base/Option.js +1 -1
  15. package/base/Result.js +1 -1
  16. package/base/Tuple.js +1 -1
  17. package/base/UInt.js +1 -1
  18. package/base/Vec.d.ts +1 -1
  19. package/base/Vec.js +6 -6
  20. package/base/VecAny.js +1 -1
  21. package/base/VecFixed.js +1 -1
  22. package/base/index.js +1 -1
  23. package/bundle.js +1 -1
  24. package/cjs/abstract/Array.js +1 -1
  25. package/cjs/abstract/Base.js +1 -1
  26. package/cjs/abstract/Int.js +3 -5
  27. package/cjs/abstract/Object.js +1 -1
  28. package/cjs/abstract/index.js +1 -1
  29. package/cjs/base/Compact.js +2 -3
  30. package/cjs/base/DoNotConstruct.js +1 -1
  31. package/cjs/base/Enum.js +1 -1
  32. package/cjs/base/Int.js +1 -1
  33. package/cjs/base/Null.js +2 -3
  34. package/cjs/base/Option.js +1 -1
  35. package/cjs/base/Result.js +1 -1
  36. package/cjs/base/Tuple.js +1 -1
  37. package/cjs/base/UInt.js +1 -1
  38. package/cjs/base/Vec.js +6 -6
  39. package/cjs/base/VecAny.js +1 -1
  40. package/cjs/base/VecFixed.js +1 -1
  41. package/cjs/base/index.js +1 -1
  42. package/cjs/bundle.js +1 -1
  43. package/cjs/detectOther.js +1 -1
  44. package/cjs/detectPackage.js +1 -1
  45. package/cjs/extended/BTreeMap.js +1 -1
  46. package/cjs/extended/BTreeSet.js +1 -1
  47. package/cjs/extended/BitVec.js +1 -1
  48. package/cjs/extended/Bytes.js +1 -1
  49. package/cjs/extended/HashMap.js +1 -1
  50. package/cjs/extended/Linkage.js +1 -1
  51. package/cjs/extended/Map.js +1 -1
  52. package/cjs/extended/OptionBool.js +1 -1
  53. package/cjs/extended/Range.js +1 -1
  54. package/cjs/extended/RangeInclusive.js +1 -1
  55. package/cjs/extended/Type.js +1 -1
  56. package/cjs/extended/U8aFixed.js +1 -1
  57. package/cjs/extended/WrapperKeepOpaque.js +1 -1
  58. package/cjs/extended/WrapperOpaque.js +1 -1
  59. package/cjs/extended/index.js +1 -1
  60. package/cjs/index.js +1 -1
  61. package/cjs/native/Bool.js +2 -3
  62. package/cjs/native/Date.js +2 -3
  63. package/cjs/native/Float.js +1 -1
  64. package/cjs/native/Json.js +2 -3
  65. package/cjs/native/Raw.js +2 -3
  66. package/cjs/native/Set.js +2 -3
  67. package/cjs/native/Struct.data.js +1 -1
  68. package/cjs/native/Struct.js +2 -2
  69. package/cjs/native/Text.js +1 -1
  70. package/cjs/native/index.js +1 -1
  71. package/cjs/packageInfo.js +1 -1
  72. package/cjs/primitive/F32.js +1 -1
  73. package/cjs/primitive/F64.js +1 -1
  74. package/cjs/primitive/I128.js +1 -1
  75. package/cjs/primitive/I16.js +1 -1
  76. package/cjs/primitive/I256.js +1 -1
  77. package/cjs/primitive/I32.js +1 -1
  78. package/cjs/primitive/I64.js +1 -1
  79. package/cjs/primitive/I8.js +1 -1
  80. package/cjs/primitive/U128.js +1 -1
  81. package/cjs/primitive/U16.js +1 -1
  82. package/cjs/primitive/U256.js +1 -1
  83. package/cjs/primitive/U32.js +1 -1
  84. package/cjs/primitive/U64.js +1 -1
  85. package/cjs/primitive/U8.js +1 -1
  86. package/cjs/primitive/USize.js +1 -1
  87. package/cjs/primitive/index.js +1 -1
  88. package/cjs/types/codec.js +1 -1
  89. package/cjs/types/helpers.js +1 -1
  90. package/cjs/types/index.js +1 -1
  91. package/cjs/types/interfaces.js +1 -1
  92. package/cjs/types/registry.js +1 -1
  93. package/cjs/utils/compareArray.js +1 -1
  94. package/cjs/utils/compareMap.js +1 -1
  95. package/cjs/utils/compareSet.js +1 -1
  96. package/cjs/utils/decodeU8a.js +2 -2
  97. package/cjs/utils/index.js +1 -1
  98. package/cjs/utils/mapToTypeMap.js +1 -1
  99. package/cjs/utils/sanitize.js +1 -1
  100. package/cjs/utils/sortValues.js +1 -1
  101. package/cjs/utils/typeToConstructor.js +1 -1
  102. package/cjs/utils/typesToMap.js +1 -1
  103. package/cjs/utils/util.js +1 -1
  104. package/detectOther.js +1 -1
  105. package/detectPackage.js +1 -1
  106. package/extended/BTreeMap.js +1 -1
  107. package/extended/BTreeSet.js +1 -1
  108. package/extended/BitVec.js +1 -1
  109. package/extended/Bytes.js +1 -1
  110. package/extended/HashMap.js +1 -1
  111. package/extended/Linkage.js +1 -1
  112. package/extended/Map.js +1 -1
  113. package/extended/OptionBool.js +1 -1
  114. package/extended/Range.js +1 -1
  115. package/extended/RangeInclusive.js +1 -1
  116. package/extended/Type.js +1 -1
  117. package/extended/U8aFixed.js +1 -1
  118. package/extended/WrapperKeepOpaque.js +1 -1
  119. package/extended/WrapperOpaque.js +1 -1
  120. package/extended/index.js +1 -1
  121. package/index.js +1 -1
  122. package/native/Bool.d.ts +1 -1
  123. package/native/Bool.js +2 -3
  124. package/native/Date.d.ts +1 -1
  125. package/native/Date.js +2 -3
  126. package/native/Float.js +1 -1
  127. package/native/Json.d.ts +1 -1
  128. package/native/Json.js +2 -3
  129. package/native/Raw.d.ts +1 -1
  130. package/native/Raw.js +2 -3
  131. package/native/Set.d.ts +1 -1
  132. package/native/Set.js +2 -3
  133. package/native/Struct.data.js +1 -1
  134. package/native/Struct.js +2 -2
  135. package/native/Text.js +1 -1
  136. package/native/index.js +1 -1
  137. package/package.json +4 -6
  138. package/packageInfo.js +1 -1
  139. package/primitive/F32.js +1 -1
  140. package/primitive/F64.js +1 -1
  141. package/primitive/I128.js +1 -1
  142. package/primitive/I16.js +1 -1
  143. package/primitive/I256.js +1 -1
  144. package/primitive/I32.js +1 -1
  145. package/primitive/I64.js +1 -1
  146. package/primitive/I8.js +1 -1
  147. package/primitive/U128.js +1 -1
  148. package/primitive/U16.js +1 -1
  149. package/primitive/U256.js +1 -1
  150. package/primitive/U32.js +1 -1
  151. package/primitive/U64.js +1 -1
  152. package/primitive/U8.js +1 -1
  153. package/primitive/USize.js +1 -1
  154. package/primitive/index.js +1 -1
  155. package/types/codec.js +1 -1
  156. package/types/helpers.js +1 -1
  157. package/types/index.js +1 -1
  158. package/types/interfaces.js +1 -1
  159. package/types/registry.js +1 -1
  160. package/utils/compareArray.js +1 -1
  161. package/utils/compareMap.js +1 -1
  162. package/utils/compareSet.js +1 -1
  163. package/utils/decodeU8a.js +2 -2
  164. package/utils/index.js +1 -1
  165. package/utils/mapToTypeMap.js +1 -1
  166. package/utils/sanitize.js +1 -1
  167. package/utils/sortValues.js +1 -1
  168. package/utils/typeToConstructor.js +1 -1
  169. package/utils/typesToMap.js +1 -1
  170. package/utils/util.js +1 -1
package/abstract/Array.js CHANGED
@@ -143,4 +143,4 @@ export class AbstractArray extends Array {
143
143
  }
144
144
  return encoded;
145
145
  }
146
- }
146
+ }
package/abstract/Base.js CHANGED
@@ -97,4 +97,4 @@ export class AbstractBase {
97
97
  return __classPrivateFieldGet(this, _AbstractBase_raw, "f");
98
98
  }
99
99
  }
100
- _AbstractBase_raw = new WeakMap();
100
+ _AbstractBase_raw = new WeakMap();
package/abstract/Int.d.ts CHANGED
@@ -56,7 +56,7 @@ export declare abstract class AbstractInt extends BN implements INumber {
56
56
  /**
57
57
  * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
58
58
  */
59
- toHuman(isExpanded?: boolean): string;
59
+ toHuman(_isExpanded?: boolean): string;
60
60
  /**
61
61
  * @description Converts the Object to JSON, typically used for RPC transfers
62
62
  */
@@ -78,5 +78,5 @@ export declare abstract class AbstractInt extends BN implements INumber {
78
78
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
79
79
  * @param isBare true when the value has none of the type-specific prefixes (internal)
80
80
  */
81
- toU8a(isBare?: boolean): Uint8Array;
81
+ toU8a(_isBare?: boolean): Uint8Array;
82
82
  }
package/abstract/Int.js CHANGED
@@ -156,8 +156,7 @@ export class AbstractInt extends BN {
156
156
  /**
157
157
  * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
158
158
  */
159
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
160
- toHuman(isExpanded) {
159
+ toHuman(_isExpanded) {
161
160
  const rawType = this.toRawType();
162
161
  if (rawType === 'Balance') {
163
162
  return this.isMax()
@@ -214,8 +213,7 @@ export class AbstractInt extends BN {
214
213
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
215
214
  * @param isBare true when the value has none of the type-specific prefixes (internal)
216
215
  */
217
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
218
- toU8a(isBare) {
216
+ toU8a(_isBare) {
219
217
  return bnToU8a(this, {
220
218
  bitLength: this.bitLength(),
221
219
  isLe: true,
@@ -223,4 +221,4 @@ export class AbstractInt extends BN {
223
221
  });
224
222
  }
225
223
  }
226
- _AbstractInt_bitLength = new WeakMap();
224
+ _AbstractInt_bitLength = new WeakMap();
@@ -32,4 +32,4 @@ export class AbstractObject {
32
32
  valueOf() {
33
33
  return this.$;
34
34
  }
35
- }
35
+ }
package/abstract/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { AbstractArray } from './Array.js';
2
2
  export { AbstractBase } from './Base.js';
3
- export { AbstractInt } from './Int.js';
3
+ export { AbstractInt } from './Int.js';
package/base/Compact.d.ts CHANGED
@@ -86,7 +86,7 @@ export declare class Compact<T extends INumber> implements ICompact<T> {
86
86
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
87
87
  * @param isBare true when the value has none of the type-specific prefixes (internal)
88
88
  */
89
- toU8a(isBare?: boolean): Uint8Array;
89
+ toU8a(_isBare?: boolean): Uint8Array;
90
90
  /**
91
91
  * @description Returns the embedded [[UInt]] or [[Moment]] value
92
92
  */
package/base/Compact.js CHANGED
@@ -149,8 +149,7 @@ export class Compact {
149
149
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
150
150
  * @param isBare true when the value has none of the type-specific prefixes (internal)
151
151
  */
152
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
153
- toU8a(isBare) {
152
+ toU8a(_isBare) {
154
153
  return compactToU8a(__classPrivateFieldGet(this, _Compact_raw, "f").toBn());
155
154
  }
156
155
  /**
@@ -160,4 +159,4 @@ export class Compact {
160
159
  return __classPrivateFieldGet(this, _Compact_raw, "f");
161
160
  }
162
161
  }
163
- _Compact_Type = new WeakMap(), _Compact_raw = new WeakMap();
162
+ _Compact_Type = new WeakMap(), _Compact_raw = new WeakMap();
@@ -65,4 +65,4 @@ export class DoNotConstruct {
65
65
  throw __classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
66
66
  }
67
67
  }
68
- _DoNotConstruct_neverError = new WeakMap();
68
+ _DoNotConstruct_neverError = new WeakMap();
package/base/Enum.js CHANGED
@@ -369,4 +369,4 @@ export class Enum {
369
369
  ]);
370
370
  }
371
371
  }
372
- _Enum_def = new WeakMap(), _Enum_entryIndex = new WeakMap(), _Enum_indexes = new WeakMap(), _Enum_isBasic = new WeakMap(), _Enum_isIndexed = new WeakMap(), _Enum_raw = new WeakMap();
372
+ _Enum_def = new WeakMap(), _Enum_entryIndex = new WeakMap(), _Enum_indexes = new WeakMap(), _Enum_isBasic = new WeakMap(), _Enum_isIndexed = new WeakMap(), _Enum_raw = new WeakMap();
package/base/Int.js CHANGED
@@ -23,4 +23,4 @@ export class Int extends AbstractInt {
23
23
  }
24
24
  };
25
25
  }
26
- }
26
+ }
package/base/Null.d.ts CHANGED
@@ -53,5 +53,5 @@ export declare class Null implements Codec {
53
53
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
54
54
  * @param isBare true when the value has none of the type-specific prefixes (internal)
55
55
  */
56
- toU8a(isBare?: boolean): Uint8Array;
56
+ toU8a(_isBare?: boolean): Uint8Array;
57
57
  }
package/base/Null.js CHANGED
@@ -69,8 +69,7 @@ export class Null {
69
69
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
70
70
  * @param isBare true when the value has none of the type-specific prefixes (internal)
71
71
  */
72
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
73
- toU8a(isBare) {
72
+ toU8a(_isBare) {
74
73
  return new Uint8Array();
75
74
  }
76
- }
75
+ }
package/base/Option.js CHANGED
@@ -231,4 +231,4 @@ export class Option {
231
231
  : new (__classPrivateFieldGet(this, _Option_Type, "f"))(this.registry);
232
232
  }
233
233
  }
234
- _Option_Type = new WeakMap(), _Option_raw = new WeakMap();
234
+ _Option_Type = new WeakMap(), _Option_raw = new WeakMap();
package/base/Result.js CHANGED
@@ -60,4 +60,4 @@ export class Result extends Enum {
60
60
  const Types = this._toRawStruct();
61
61
  return `Result<${Types.Ok},${Types.Err}>`;
62
62
  }
63
- }
63
+ }
package/base/Tuple.js CHANGED
@@ -113,4 +113,4 @@ export class Tuple extends AbstractArray {
113
113
  return u8aConcatStrict(this.toU8aInner(isBare));
114
114
  }
115
115
  }
116
- _Tuple_Types = new WeakMap();
116
+ _Tuple_Types = new WeakMap();
package/base/UInt.js CHANGED
@@ -20,4 +20,4 @@ export class UInt extends AbstractInt {
20
20
  }
21
21
  };
22
22
  }
23
- }
23
+ }
package/base/Vec.d.ts CHANGED
@@ -24,7 +24,7 @@ export declare class Vec<T extends Codec> extends AbstractArray<T> {
24
24
  /**
25
25
  * @description Finds the index of the value in the array
26
26
  */
27
- indexOf(_other?: unknown): number;
27
+ indexOf(other?: unknown): number;
28
28
  /**
29
29
  * @description Returns the base runtime type name for this instance
30
30
  */
package/base/Vec.js CHANGED
@@ -86,13 +86,13 @@ export class Vec extends AbstractArray {
86
86
  /**
87
87
  * @description Finds the index of the value in the array
88
88
  */
89
- indexOf(_other) {
89
+ indexOf(other) {
90
90
  // convert type first, this removes overhead from the eq
91
- const other = _other instanceof __classPrivateFieldGet(this, _Vec_Type, "f")
92
- ? _other
93
- : new (__classPrivateFieldGet(this, _Vec_Type, "f"))(this.registry, _other);
91
+ const check = other instanceof __classPrivateFieldGet(this, _Vec_Type, "f")
92
+ ? other
93
+ : new (__classPrivateFieldGet(this, _Vec_Type, "f"))(this.registry, other);
94
94
  for (let i = 0; i < this.length; i++) {
95
- if (other.eq(this[i])) {
95
+ if (check.eq(this[i])) {
96
96
  return i;
97
97
  }
98
98
  }
@@ -105,4 +105,4 @@ export class Vec extends AbstractArray {
105
105
  return `Vec<${this.registry.getClassName(__classPrivateFieldGet(this, _Vec_Type, "f")) || new (__classPrivateFieldGet(this, _Vec_Type, "f"))(this.registry).toRawType()}>`;
106
106
  }
107
107
  }
108
- _Vec_Type = new WeakMap();
108
+ _Vec_Type = new WeakMap();
package/base/VecAny.js CHANGED
@@ -14,4 +14,4 @@ export class VecAny extends AbstractArray {
14
14
  // FIXME This is basically an any type, cannot instantiate via createType
15
15
  return 'Vec<Codec>';
16
16
  }
17
- }
17
+ }
package/base/VecFixed.js CHANGED
@@ -70,4 +70,4 @@ export class VecFixed extends AbstractArray {
70
70
  return `[${this.Type};${this.length}]`;
71
71
  }
72
72
  }
73
- _VecFixed_Type = new WeakMap();
73
+ _VecFixed_Type = new WeakMap();
package/base/index.js CHANGED
@@ -9,4 +9,4 @@ export { Tuple } from './Tuple.js';
9
9
  export { UInt } from './UInt.js';
10
10
  export { Vec } from './Vec.js';
11
11
  export { VecAny } from './VecAny.js';
12
- export { VecFixed } from './VecFixed.js';
12
+ export { VecFixed } from './VecFixed.js';
package/bundle.js CHANGED
@@ -4,4 +4,4 @@ export * from './base/index.js';
4
4
  export * from './extended/index.js';
5
5
  export * from './native/index.js';
6
6
  export * from './primitive/index.js';
7
- export * from './utils/index.js';
7
+ export * from './utils/index.js';
@@ -147,4 +147,4 @@ class AbstractArray extends Array {
147
147
  return encoded;
148
148
  }
149
149
  }
150
- exports.AbstractArray = AbstractArray;
150
+ exports.AbstractArray = AbstractArray;
@@ -101,4 +101,4 @@ class AbstractBase {
101
101
  }
102
102
  }
103
103
  exports.AbstractBase = AbstractBase;
104
- _AbstractBase_raw = new WeakMap();
104
+ _AbstractBase_raw = new WeakMap();
@@ -159,8 +159,7 @@ class AbstractInt extends util_1.BN {
159
159
  /**
160
160
  * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
161
161
  */
162
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
163
- toHuman(isExpanded) {
162
+ toHuman(_isExpanded) {
164
163
  const rawType = this.toRawType();
165
164
  if (rawType === 'Balance') {
166
165
  return this.isMax()
@@ -217,8 +216,7 @@ class AbstractInt extends util_1.BN {
217
216
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
218
217
  * @param isBare true when the value has none of the type-specific prefixes (internal)
219
218
  */
220
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
221
- toU8a(isBare) {
219
+ toU8a(_isBare) {
222
220
  return (0, util_1.bnToU8a)(this, {
223
221
  bitLength: this.bitLength(),
224
222
  isLe: true,
@@ -227,4 +225,4 @@ class AbstractInt extends util_1.BN {
227
225
  }
228
226
  }
229
227
  exports.AbstractInt = AbstractInt;
230
- _AbstractInt_bitLength = new WeakMap();
228
+ _AbstractInt_bitLength = new WeakMap();
@@ -36,4 +36,4 @@ class AbstractObject {
36
36
  return this.$;
37
37
  }
38
38
  }
39
- exports.AbstractObject = AbstractObject;
39
+ exports.AbstractObject = AbstractObject;
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "AbstractArray", { enumerable: true, get: functio
6
6
  var Base_js_1 = require("./Base.js");
7
7
  Object.defineProperty(exports, "AbstractBase", { enumerable: true, get: function () { return Base_js_1.AbstractBase; } });
8
8
  var Int_js_1 = require("./Int.js");
9
- Object.defineProperty(exports, "AbstractInt", { enumerable: true, get: function () { return Int_js_1.AbstractInt; } });
9
+ Object.defineProperty(exports, "AbstractInt", { enumerable: true, get: function () { return Int_js_1.AbstractInt; } });
@@ -152,8 +152,7 @@ class Compact {
152
152
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
153
153
  * @param isBare true when the value has none of the type-specific prefixes (internal)
154
154
  */
155
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
156
- toU8a(isBare) {
155
+ toU8a(_isBare) {
157
156
  return (0, util_1.compactToU8a)(tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").toBn());
158
157
  }
159
158
  /**
@@ -164,4 +163,4 @@ class Compact {
164
163
  }
165
164
  }
166
165
  exports.Compact = Compact;
167
- _Compact_Type = new WeakMap(), _Compact_raw = new WeakMap();
166
+ _Compact_Type = new WeakMap(), _Compact_raw = new WeakMap();
@@ -69,4 +69,4 @@ class DoNotConstruct {
69
69
  }
70
70
  }
71
71
  exports.DoNotConstruct = DoNotConstruct;
72
- _DoNotConstruct_neverError = new WeakMap();
72
+ _DoNotConstruct_neverError = new WeakMap();
package/cjs/base/Enum.js CHANGED
@@ -373,4 +373,4 @@ class Enum {
373
373
  }
374
374
  }
375
375
  exports.Enum = Enum;
376
- _Enum_def = new WeakMap(), _Enum_entryIndex = new WeakMap(), _Enum_indexes = new WeakMap(), _Enum_isBasic = new WeakMap(), _Enum_isIndexed = new WeakMap(), _Enum_raw = new WeakMap();
376
+ _Enum_def = new WeakMap(), _Enum_entryIndex = new WeakMap(), _Enum_indexes = new WeakMap(), _Enum_isBasic = new WeakMap(), _Enum_isIndexed = new WeakMap(), _Enum_raw = new WeakMap();
package/cjs/base/Int.js CHANGED
@@ -27,4 +27,4 @@ class Int extends Int_js_1.AbstractInt {
27
27
  };
28
28
  }
29
29
  }
30
- exports.Int = Int;
30
+ exports.Int = Int;
package/cjs/base/Null.js CHANGED
@@ -72,9 +72,8 @@ class Null {
72
72
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
73
73
  * @param isBare true when the value has none of the type-specific prefixes (internal)
74
74
  */
75
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
76
- toU8a(isBare) {
75
+ toU8a(_isBare) {
77
76
  return new Uint8Array();
78
77
  }
79
78
  }
80
- exports.Null = Null;
79
+ exports.Null = Null;
@@ -235,4 +235,4 @@ class Option {
235
235
  }
236
236
  }
237
237
  exports.Option = Option;
238
- _Option_Type = new WeakMap(), _Option_raw = new WeakMap();
238
+ _Option_Type = new WeakMap(), _Option_raw = new WeakMap();
@@ -64,4 +64,4 @@ class Result extends Enum_js_1.Enum {
64
64
  return `Result<${Types.Ok},${Types.Err}>`;
65
65
  }
66
66
  }
67
- exports.Result = Result;
67
+ exports.Result = Result;
package/cjs/base/Tuple.js CHANGED
@@ -117,4 +117,4 @@ class Tuple extends Array_js_1.AbstractArray {
117
117
  }
118
118
  }
119
119
  exports.Tuple = Tuple;
120
- _Tuple_Types = new WeakMap();
120
+ _Tuple_Types = new WeakMap();
package/cjs/base/UInt.js CHANGED
@@ -24,4 +24,4 @@ class UInt extends Int_js_1.AbstractInt {
24
24
  };
25
25
  }
26
26
  }
27
- exports.UInt = UInt;
27
+ exports.UInt = UInt;
package/cjs/base/Vec.js CHANGED
@@ -90,13 +90,13 @@ class Vec extends Array_js_1.AbstractArray {
90
90
  /**
91
91
  * @description Finds the index of the value in the array
92
92
  */
93
- indexOf(_other) {
93
+ indexOf(other) {
94
94
  // convert type first, this removes overhead from the eq
95
- const other = _other instanceof tslib_1.__classPrivateFieldGet(this, _Vec_Type, "f")
96
- ? _other
97
- : new (tslib_1.__classPrivateFieldGet(this, _Vec_Type, "f"))(this.registry, _other);
95
+ const check = other instanceof tslib_1.__classPrivateFieldGet(this, _Vec_Type, "f")
96
+ ? other
97
+ : new (tslib_1.__classPrivateFieldGet(this, _Vec_Type, "f"))(this.registry, other);
98
98
  for (let i = 0; i < this.length; i++) {
99
- if (other.eq(this[i])) {
99
+ if (check.eq(this[i])) {
100
100
  return i;
101
101
  }
102
102
  }
@@ -110,4 +110,4 @@ class Vec extends Array_js_1.AbstractArray {
110
110
  }
111
111
  }
112
112
  exports.Vec = Vec;
113
- _Vec_Type = new WeakMap();
113
+ _Vec_Type = new WeakMap();
@@ -18,4 +18,4 @@ class VecAny extends Array_js_1.AbstractArray {
18
18
  return 'Vec<Codec>';
19
19
  }
20
20
  }
21
- exports.VecAny = VecAny;
21
+ exports.VecAny = VecAny;
@@ -74,4 +74,4 @@ class VecFixed extends Array_js_1.AbstractArray {
74
74
  }
75
75
  }
76
76
  exports.VecFixed = VecFixed;
77
- _VecFixed_Type = new WeakMap();
77
+ _VecFixed_Type = new WeakMap();
package/cjs/base/index.js CHANGED
@@ -24,4 +24,4 @@ Object.defineProperty(exports, "Vec", { enumerable: true, get: function () { ret
24
24
  var VecAny_js_1 = require("./VecAny.js");
25
25
  Object.defineProperty(exports, "VecAny", { enumerable: true, get: function () { return VecAny_js_1.VecAny; } });
26
26
  var VecFixed_js_1 = require("./VecFixed.js");
27
- Object.defineProperty(exports, "VecFixed", { enumerable: true, get: function () { return VecFixed_js_1.VecFixed; } });
27
+ Object.defineProperty(exports, "VecFixed", { enumerable: true, get: function () { return VecFixed_js_1.VecFixed; } });
package/cjs/bundle.js CHANGED
@@ -9,4 +9,4 @@ tslib_1.__exportStar(require("./base/index.js"), exports);
9
9
  tslib_1.__exportStar(require("./extended/index.js"), exports);
10
10
  tslib_1.__exportStar(require("./native/index.js"), exports);
11
11
  tslib_1.__exportStar(require("./primitive/index.js"), exports);
12
- tslib_1.__exportStar(require("./utils/index.js"), exports);
12
+ tslib_1.__exportStar(require("./utils/index.js"), exports);
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = [];
3
+ exports.default = [];
@@ -4,4 +4,4 @@ const tslib_1 = require("tslib");
4
4
  const util_1 = require("@polkadot/util");
5
5
  const detectOther_js_1 = tslib_1.__importDefault(require("./detectOther.js"));
6
6
  const packageInfo_js_1 = require("./packageInfo.js");
7
- (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, detectOther_js_1.default);
7
+ (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, detectOther_js_1.default);
@@ -11,4 +11,4 @@ class BTreeMap extends Map_js_1.CodecMap {
11
11
  };
12
12
  }
13
13
  }
14
- exports.BTreeMap = BTreeMap;
14
+ exports.BTreeMap = BTreeMap;
@@ -185,4 +185,4 @@ class BTreeSet extends Set {
185
185
  }
186
186
  }
187
187
  exports.BTreeSet = BTreeSet;
188
- _BTreeSet_ValClass = new WeakMap();
188
+ _BTreeSet_ValClass = new WeakMap();
@@ -82,4 +82,4 @@ class BitVec extends Raw_js_1.Raw {
82
82
  }
83
83
  }
84
84
  exports.BitVec = BitVec;
85
- _BitVec_decodedLength = new WeakMap(), _BitVec_isMsb = new WeakMap();
85
+ _BitVec_decodedLength = new WeakMap(), _BitVec_isMsb = new WeakMap();
@@ -71,4 +71,4 @@ class Bytes extends Raw_js_1.Raw {
71
71
  : (0, util_1.compactAddLength)(this);
72
72
  }
73
73
  }
74
- exports.Bytes = Bytes;
74
+ exports.Bytes = Bytes;
@@ -11,4 +11,4 @@ class HashMap extends Map_js_1.CodecMap {
11
11
  };
12
12
  }
13
13
  }
14
- exports.HashMap = HashMap;
14
+ exports.HashMap = HashMap;
@@ -61,4 +61,4 @@ class LinkageResult extends Tuple_js_1.Tuple {
61
61
  }, [keys, values]);
62
62
  }
63
63
  }
64
- exports.LinkageResult = LinkageResult;
64
+ exports.LinkageResult = LinkageResult;
@@ -200,4 +200,4 @@ class CodecMap extends Map {
200
200
  }
201
201
  }
202
202
  exports.CodecMap = CodecMap;
203
- _CodecMap_KeyClass = new WeakMap(), _CodecMap_ValClass = new WeakMap(), _CodecMap_type = new WeakMap();
203
+ _CodecMap_KeyClass = new WeakMap(), _CodecMap_ValClass = new WeakMap(), _CodecMap_type = new WeakMap();
@@ -73,4 +73,4 @@ class OptionBool extends Option_js_1.Option {
73
73
  : new Uint8Array([0]);
74
74
  }
75
75
  }
76
- exports.OptionBool = OptionBool;
76
+ exports.OptionBool = OptionBool;
@@ -42,4 +42,4 @@ class Range extends Tuple_js_1.Tuple {
42
42
  }
43
43
  }
44
44
  exports.Range = Range;
45
- _Range_rangeName = new WeakMap();
45
+ _Range_rangeName = new WeakMap();
@@ -14,4 +14,4 @@ class RangeInclusive extends Range_js_1.Range {
14
14
  };
15
15
  }
16
16
  }
17
- exports.RangeInclusive = RangeInclusive;
17
+ exports.RangeInclusive = RangeInclusive;
@@ -22,4 +22,4 @@ class Type extends Text_js_1.Text {
22
22
  return 'Type';
23
23
  }
24
24
  }
25
- exports.Type = Type;
25
+ exports.Type = Type;
@@ -43,4 +43,4 @@ class U8aFixed extends Raw_js_1.Raw {
43
43
  return `[u8;${this.length}]`;
44
44
  }
45
45
  }
46
- exports.U8aFixed = U8aFixed;
46
+ exports.U8aFixed = U8aFixed;
@@ -103,4 +103,4 @@ class WrapperKeepOpaque extends Bytes_js_1.Bytes {
103
103
  }
104
104
  }
105
105
  exports.WrapperKeepOpaque = WrapperKeepOpaque;
106
- _WrapperKeepOpaque_Type = new WeakMap(), _WrapperKeepOpaque_decoded = new WeakMap(), _WrapperKeepOpaque_opaqueName = new WeakMap();
106
+ _WrapperKeepOpaque_Type = new WeakMap(), _WrapperKeepOpaque_decoded = new WeakMap(), _WrapperKeepOpaque_opaqueName = new WeakMap();
@@ -20,4 +20,4 @@ class WrapperOpaque extends WrapperKeepOpaque_js_1.WrapperKeepOpaque {
20
20
  return this.unwrap();
21
21
  }
22
22
  }
23
- exports.WrapperOpaque = WrapperOpaque;
23
+ exports.WrapperOpaque = WrapperOpaque;
@@ -29,4 +29,4 @@ Object.defineProperty(exports, "U8aFixed", { enumerable: true, get: function ()
29
29
  var WrapperKeepOpaque_js_1 = require("./WrapperKeepOpaque.js");
30
30
  Object.defineProperty(exports, "WrapperKeepOpaque", { enumerable: true, get: function () { return WrapperKeepOpaque_js_1.WrapperKeepOpaque; } });
31
31
  var WrapperOpaque_js_1 = require("./WrapperOpaque.js");
32
- Object.defineProperty(exports, "WrapperOpaque", { enumerable: true, get: function () { return WrapperOpaque_js_1.WrapperOpaque; } });
32
+ Object.defineProperty(exports, "WrapperOpaque", { enumerable: true, get: function () { return WrapperOpaque_js_1.WrapperOpaque; } });
package/cjs/index.js CHANGED
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  require("./detectPackage.js");
5
- tslib_1.__exportStar(require("./bundle.js"), exports);
5
+ tslib_1.__exportStar(require("./bundle.js"), exports);
@@ -104,9 +104,8 @@ class bool extends Boolean {
104
104
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
105
105
  * @param isBare true when the value has none of the type-specific prefixes (internal)
106
106
  */
107
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
108
- toU8a(isBare) {
107
+ toU8a(_isBare) {
109
108
  return new Uint8Array([this.valueOf() ? 1 : 0]);
110
109
  }
111
110
  }
112
- exports.bool = bool;
111
+ exports.bool = bool;
@@ -135,9 +135,8 @@ class CodecDate extends Date {
135
135
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
136
136
  * @param isBare true when the value has none of the type-specific prefixes (internal)
137
137
  */
138
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
139
- toU8a(isBare) {
138
+ toU8a(_isBare) {
140
139
  return (0, util_1.bnToU8a)(this.toNumber(), U8A_OPTS);
141
140
  }
142
141
  }
143
- exports.CodecDate = CodecDate;
142
+ exports.CodecDate = CodecDate;
@@ -104,4 +104,4 @@ class Float extends Number {
104
104
  }
105
105
  }
106
106
  exports.Float = Float;
107
- _Float_bitLength = new WeakMap();
107
+ _Float_bitLength = new WeakMap();
@@ -110,9 +110,8 @@ class Json extends Map {
110
110
  /**
111
111
  * @description Unimplemented, will throw
112
112
  */
113
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
114
- toU8a(isBare) {
113
+ toU8a(_isBare) {
115
114
  throw new Error('Unimplemented');
116
115
  }
117
116
  }
118
- exports.Json = Json;
117
+ exports.Json = Json;
package/cjs/native/Raw.js CHANGED
@@ -125,8 +125,7 @@ class Raw extends Uint8Array {
125
125
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
126
126
  * @param isBare true when the value has none of the type-specific prefixes (internal)
127
127
  */
128
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
129
- toU8a(isBare) {
128
+ toU8a(_isBare) {
130
129
  return Uint8Array.from(this);
131
130
  }
132
131
  /**
@@ -139,4 +138,4 @@ class Raw extends Uint8Array {
139
138
  return (0, util_1.u8aToString)(this);
140
139
  }
141
140
  }
142
- exports.Raw = Raw;
141
+ exports.Raw = Raw;