@polkadot/types-codec 10.3.4 → 10.5.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 (66) hide show
  1. package/abstract/Array.js +21 -14
  2. package/abstract/Base.js +13 -17
  3. package/abstract/Int.js +8 -12
  4. package/base/Compact.js +20 -28
  5. package/base/DoNotConstruct.js +14 -18
  6. package/base/Enum.js +42 -53
  7. package/base/Option.js +17 -25
  8. package/base/Tuple.js +12 -19
  9. package/base/Vec.js +10 -17
  10. package/base/VecFixed.js +7 -14
  11. package/cjs/abstract/Array.js +21 -14
  12. package/cjs/abstract/Base.js +13 -17
  13. package/cjs/abstract/Int.js +8 -12
  14. package/cjs/base/Compact.js +19 -27
  15. package/cjs/base/DoNotConstruct.js +14 -18
  16. package/cjs/base/Enum.js +41 -52
  17. package/cjs/base/Option.js +16 -24
  18. package/cjs/base/Tuple.js +10 -17
  19. package/cjs/base/Vec.js +9 -16
  20. package/cjs/base/VecFixed.js +6 -13
  21. package/cjs/extended/BTreeSet.js +2 -6
  22. package/cjs/extended/BitVec.js +10 -14
  23. package/cjs/extended/Map.js +5 -11
  24. package/cjs/extended/Range.js +2 -6
  25. package/cjs/extended/WrapperKeepOpaque.js +16 -22
  26. package/cjs/native/Float.js +3 -7
  27. package/cjs/native/Set.js +15 -18
  28. package/cjs/native/Struct.js +12 -16
  29. package/cjs/native/Text.js +3 -6
  30. package/cjs/native/index.js +2 -2
  31. package/cjs/packageInfo.js +1 -1
  32. package/cjs/primitive/index.js +17 -17
  33. package/cjs/utils/index.js +6 -6
  34. package/cjs/utils/sanitize.js +16 -16
  35. package/cjs/utils/sortValues.js +2 -6
  36. package/cjs/utils/toConstructors.js +41 -0
  37. package/cjs/utils/typesToMap.js +1 -1
  38. package/extended/BTreeSet.js +2 -6
  39. package/extended/BitVec.js +10 -14
  40. package/extended/Map.js +5 -11
  41. package/extended/Range.js +2 -6
  42. package/extended/WrapperKeepOpaque.js +16 -22
  43. package/native/Float.js +3 -7
  44. package/native/Set.js +15 -18
  45. package/native/Struct.js +12 -16
  46. package/native/Text.js +3 -6
  47. package/native/index.d.ts +1 -1
  48. package/native/index.js +1 -1
  49. package/package.json +9 -14
  50. package/packageInfo.js +1 -1
  51. package/primitive/index.d.ts +16 -16
  52. package/primitive/index.js +16 -16
  53. package/types/registry.d.ts +2 -1
  54. package/utils/index.d.ts +2 -3
  55. package/utils/index.js +2 -3
  56. package/utils/sanitize.js +16 -16
  57. package/utils/sortValues.js +1 -5
  58. package/utils/toConstructors.d.ts +16 -0
  59. package/utils/toConstructors.js +35 -0
  60. package/utils/typesToMap.js +1 -1
  61. package/cjs/utils/mapToTypeMap.js +0 -18
  62. package/cjs/utils/typeToConstructor.js +0 -10
  63. package/utils/mapToTypeMap.d.ts +0 -5
  64. package/utils/mapToTypeMap.js +0 -14
  65. package/utils/typeToConstructor.d.ts +0 -2
  66. package/utils/typeToConstructor.js +0 -6
@@ -28,8 +28,9 @@ class AbstractArray extends Array {
28
28
  get encodedLength() {
29
29
  // We need to loop through all entries since they may have a variable length themselves,
30
30
  // e.g. when a Vec or Compact is contained withing, it has a variable length based on data
31
- let total = (0, util_1.compactToU8a)(this.length).length;
32
- for (let i = 0; i < this.length; i++) {
31
+ const count = this.length;
32
+ let total = (0, util_1.compactToU8a)(count).length;
33
+ for (let i = 0; i < count; i++) {
33
34
  total += this[i].encodedLength;
34
35
  }
35
36
  return total;
@@ -73,8 +74,9 @@ class AbstractArray extends Array {
73
74
  * @description Internal per-item inspection of internal values
74
75
  */
75
76
  inspectInner() {
76
- const inner = new Array(this.length);
77
- for (let i = 0; i < this.length; i++) {
77
+ const count = this.length;
78
+ const inner = new Array(count);
79
+ for (let i = 0; i < count; i++) {
78
80
  inner[i] = this[i].inspect();
79
81
  }
80
82
  return inner;
@@ -95,8 +97,9 @@ class AbstractArray extends Array {
95
97
  * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
96
98
  */
97
99
  toHuman(isExtended) {
98
- const result = new Array(this.length);
99
- for (let i = 0; i < this.length; i++) {
100
+ const count = this.length;
101
+ const result = new Array(count);
102
+ for (let i = 0; i < count; i++) {
100
103
  result[i] = this[i] && this[i].toHuman(isExtended);
101
104
  }
102
105
  return result;
@@ -105,8 +108,9 @@ class AbstractArray extends Array {
105
108
  * @description Converts the Object to JSON, typically used for RPC transfers
106
109
  */
107
110
  toJSON() {
108
- const result = new Array(this.length);
109
- for (let i = 0; i < this.length; i++) {
111
+ const count = this.length;
112
+ const result = new Array(count);
113
+ for (let i = 0; i < count; i++) {
110
114
  // We actually log inside the U8a decoding and use JSON.stringify(...), which
111
115
  // means that the Vec may be partially populated (same applies to toHuman, same check)
112
116
  result[i] = this[i] && this[i].toJSON();
@@ -117,8 +121,9 @@ class AbstractArray extends Array {
117
121
  * @description Converts the value in a best-fit primitive form
118
122
  */
119
123
  toPrimitive() {
120
- const result = new Array(this.length);
121
- for (let i = 0; i < this.length; i++) {
124
+ const count = this.length;
125
+ const result = new Array(count);
126
+ for (let i = 0; i < count; i++) {
122
127
  result[i] = this[i] && this[i].toPrimitive();
123
128
  }
124
129
  return result;
@@ -127,8 +132,9 @@ class AbstractArray extends Array {
127
132
  * @description Returns the string representation of the value
128
133
  */
129
134
  toString() {
130
- const result = new Array(this.length);
131
- for (let i = 0; i < this.length; i++) {
135
+ const count = this.length;
136
+ const result = new Array(count);
137
+ for (let i = 0; i < count; i++) {
132
138
  result[i] = this[i].toString();
133
139
  }
134
140
  return `[${result.join(', ')}]`;
@@ -149,8 +155,9 @@ class AbstractArray extends Array {
149
155
  * @param isBare true when the value has none of the type-specific prefixes (internal)
150
156
  */
151
157
  toU8aInner(isBare) {
152
- const encoded = new Array(this.length);
153
- for (let i = 0; i < this.length; i++) {
158
+ const count = this.length;
159
+ const encoded = new Array(count);
160
+ for (let i = 0; i < count; i++) {
154
161
  encoded[i] = this[i].toU8a(isBare);
155
162
  }
156
163
  return encoded;
@@ -1,17 +1,14 @@
1
1
  "use strict";
2
- var _AbstractBase_raw;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.AbstractBase = void 0;
5
- const tslib_1 = require("tslib");
6
4
  /**
7
5
  * @name Base
8
6
  * @description A type extends the Base class, when it holds a value
9
7
  */
10
8
  class AbstractBase {
11
9
  constructor(registry, value, initialU8aLength) {
12
- _AbstractBase_raw.set(this, void 0);
13
10
  this.initialU8aLength = initialU8aLength;
14
- tslib_1.__classPrivateFieldSet(this, _AbstractBase_raw, value, "f");
11
+ this.__internal__raw = value;
15
12
  this.registry = registry;
16
13
  }
17
14
  /**
@@ -30,75 +27,74 @@ class AbstractBase {
30
27
  * @description returns the inner (wrapped value)
31
28
  */
32
29
  get inner() {
33
- return tslib_1.__classPrivateFieldGet(this, _AbstractBase_raw, "f");
30
+ return this.__internal__raw;
34
31
  }
35
32
  /**
36
33
  * @description Checks if the value is an empty value
37
34
  */
38
35
  get isEmpty() {
39
- return tslib_1.__classPrivateFieldGet(this, _AbstractBase_raw, "f").isEmpty;
36
+ return this.__internal__raw.isEmpty;
40
37
  }
41
38
  /**
42
39
  * @description Compares the value of the input to see if there is a match
43
40
  */
44
41
  eq(other) {
45
- return tslib_1.__classPrivateFieldGet(this, _AbstractBase_raw, "f").eq(other);
42
+ return this.__internal__raw.eq(other);
46
43
  }
47
44
  /**
48
45
  * @description Returns a breakdown of the hex encoding for this Codec
49
46
  */
50
47
  inspect() {
51
- return tslib_1.__classPrivateFieldGet(this, _AbstractBase_raw, "f").inspect();
48
+ return this.__internal__raw.inspect();
52
49
  }
53
50
  /**
54
51
  * @description Returns a hex string representation of the value. isLe returns a LE (number-only) representation
55
52
  */
56
53
  toHex(isLe) {
57
- return tslib_1.__classPrivateFieldGet(this, _AbstractBase_raw, "f").toHex(isLe);
54
+ return this.__internal__raw.toHex(isLe);
58
55
  }
59
56
  /**
60
57
  * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
61
58
  */
62
59
  toHuman(isExtended) {
63
- return tslib_1.__classPrivateFieldGet(this, _AbstractBase_raw, "f").toHuman(isExtended);
60
+ return this.__internal__raw.toHuman(isExtended);
64
61
  }
65
62
  /**
66
63
  * @description Converts the Object to JSON, typically used for RPC transfers
67
64
  */
68
65
  toJSON() {
69
- return tslib_1.__classPrivateFieldGet(this, _AbstractBase_raw, "f").toJSON();
66
+ return this.__internal__raw.toJSON();
70
67
  }
71
68
  /**
72
69
  * @description Converts the value in a best-fit primitive form
73
70
  */
74
71
  toPrimitive() {
75
- return tslib_1.__classPrivateFieldGet(this, _AbstractBase_raw, "f").toPrimitive();
72
+ return this.__internal__raw.toPrimitive();
76
73
  }
77
74
  /**
78
75
  * @description Returns the string representation of the value
79
76
  */
80
77
  toString() {
81
- return tslib_1.__classPrivateFieldGet(this, _AbstractBase_raw, "f").toString();
78
+ return this.__internal__raw.toString();
82
79
  }
83
80
  /**
84
81
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
85
82
  * @param isBare true when the value has none of the type-specific prefixes (internal)
86
83
  */
87
84
  toU8a(isBare) {
88
- return tslib_1.__classPrivateFieldGet(this, _AbstractBase_raw, "f").toU8a(isBare);
85
+ return this.__internal__raw.toU8a(isBare);
89
86
  }
90
87
  /**
91
88
  * @description Returns the inner wrapped value (equivalent to valueOf)
92
89
  */
93
90
  unwrap() {
94
- return tslib_1.__classPrivateFieldGet(this, _AbstractBase_raw, "f");
91
+ return this.__internal__raw;
95
92
  }
96
93
  /**
97
94
  * @description Returns the inner wrapped value
98
95
  */
99
96
  valueOf() {
100
- return tslib_1.__classPrivateFieldGet(this, _AbstractBase_raw, "f");
97
+ return this.__internal__raw;
101
98
  }
102
99
  }
103
100
  exports.AbstractBase = AbstractBase;
104
- _AbstractBase_raw = new WeakMap();
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
- var _AbstractInt_bitLength;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.AbstractInt = exports.DEFAULT_UINT_BITS = void 0;
5
- const tslib_1 = require("tslib");
6
4
  const util_1 = require("@polkadot/util");
7
5
  exports.DEFAULT_UINT_BITS = 64;
8
6
  const MAX_NUMBER_BITS = 52;
@@ -74,11 +72,10 @@ class AbstractInt extends util_1.BN {
74
72
  ? (0, util_1.u8aToNumber)(value.subarray(0, bitLength / 8), { isNegative: isSigned })
75
73
  : (0, util_1.u8aToBn)(value.subarray(0, bitLength / 8), { isLe: true, isNegative: isSigned }).toString()
76
74
  : decodeAbstractInt(value, isSigned));
77
- _AbstractInt_bitLength.set(this, void 0);
78
75
  this.registry = registry;
79
- tslib_1.__classPrivateFieldSet(this, _AbstractInt_bitLength, bitLength, "f");
80
- this.encodedLength = tslib_1.__classPrivateFieldGet(this, _AbstractInt_bitLength, "f") / 8;
81
- this.initialU8aLength = tslib_1.__classPrivateFieldGet(this, _AbstractInt_bitLength, "f") / 8;
76
+ this.__internal__bitLength = bitLength;
77
+ this.encodedLength = this.__internal__bitLength / 8;
78
+ this.initialU8aLength = this.__internal__bitLength / 8;
82
79
  this.isUnsigned = !isSigned;
83
80
  const isNegative = this.isNeg();
84
81
  const maxBits = bitLength - (isSigned && !isNegative ? 1 : 0);
@@ -105,7 +102,7 @@ class AbstractInt extends util_1.BN {
105
102
  * @description Returns the number of bits in the value
106
103
  */
107
104
  bitLength() {
108
- return tslib_1.__classPrivateFieldGet(this, _AbstractInt_bitLength, "f");
105
+ return this.__internal__bitLength;
109
106
  }
110
107
  /**
111
108
  * @description Compares the value of the input to see if there is a match
@@ -131,7 +128,7 @@ class AbstractInt extends util_1.BN {
131
128
  */
132
129
  isMax() {
133
130
  const u8a = this.toU8a().filter((b) => b === 0xff);
134
- return u8a.length === (tslib_1.__classPrivateFieldGet(this, _AbstractInt_bitLength, "f") / 8);
131
+ return u8a.length === (this.__internal__bitLength / 8);
135
132
  }
136
133
  /**
137
134
  * @description Returns a BigInt representation of the number
@@ -179,9 +176,9 @@ class AbstractInt extends util_1.BN {
179
176
  toJSON(onlyHex = false) {
180
177
  // FIXME this return type should by string | number, however BN returns string
181
178
  // Options here are
182
- // - super.bitLength() - the actual used bits
183
- // - this.#bitLength - the type bits (this should be used, however contracts RPC is problematic)
184
- return onlyHex || (super.bitLength() > MAX_NUMBER_BITS)
179
+ // - super.bitLength() - the actual used bits, use hex when close to MAX_SAFE_INTEGER
180
+ // - this.__internal__bitLength - the max used bits, use hex when larger than native Rust type
181
+ return onlyHex || (this.__internal__bitLength > 128) || (super.bitLength() > MAX_NUMBER_BITS)
185
182
  ? this.toHex()
186
183
  : this.toNumber();
187
184
  }
@@ -224,4 +221,3 @@ class AbstractInt extends util_1.BN {
224
221
  }
225
222
  }
226
223
  exports.AbstractInt = AbstractInt;
227
- _AbstractInt_bitLength = new WeakMap();
@@ -1,13 +1,8 @@
1
1
  "use strict";
2
- var _Compact_Type, _Compact_raw;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.Compact = void 0;
5
- const tslib_1 = require("tslib");
6
4
  const util_1 = require("@polkadot/util");
7
5
  const index_js_1 = require("../utils/index.js");
8
- function noopSetDefinition(d) {
9
- return d;
10
- }
11
6
  function decodeCompact(registry, Type, value) {
12
7
  if ((0, util_1.isU8a)(value)) {
13
8
  const [decodedLength, bn] = (value[0] & 0b11) < 0b11
@@ -35,14 +30,12 @@ function decodeCompact(registry, Type, value) {
35
30
  * a number and making the compact representation thereof
36
31
  */
37
32
  class Compact {
38
- constructor(registry, Type, value = 0, { definition, setDefinition = noopSetDefinition } = {}) {
39
- _Compact_Type.set(this, void 0);
40
- _Compact_raw.set(this, void 0);
33
+ constructor(registry, Type, value = 0, { definition, setDefinition = util_1.identity } = {}) {
41
34
  this.registry = registry;
42
- tslib_1.__classPrivateFieldSet(this, _Compact_Type, definition || setDefinition((0, index_js_1.typeToConstructor)(registry, Type)), "f");
43
- const [raw, decodedLength] = decodeCompact(registry, tslib_1.__classPrivateFieldGet(this, _Compact_Type, "f"), value);
35
+ this.__internal__Type = definition || setDefinition((0, index_js_1.typeToConstructor)(registry, Type));
36
+ const [raw, decodedLength] = decodeCompact(registry, this.__internal__Type, value);
44
37
  this.initialU8aLength = decodedLength;
45
- tslib_1.__classPrivateFieldSet(this, _Compact_raw, raw, "f");
38
+ this.__internal__raw = raw;
46
39
  }
47
40
  static with(Type) {
48
41
  let definition;
@@ -70,20 +63,20 @@ class Compact {
70
63
  * @description Checks if the value is an empty value
71
64
  */
72
65
  get isEmpty() {
73
- return tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").isEmpty;
66
+ return this.__internal__raw.isEmpty;
74
67
  }
75
68
  /**
76
69
  * @description Returns the number of bits in the value
77
70
  */
78
71
  bitLength() {
79
- return tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").bitLength();
72
+ return this.__internal__raw.bitLength();
80
73
  }
81
74
  /**
82
75
  * @description Compares the value of the input to see if there is a match
83
76
  */
84
77
  eq(other) {
85
- return tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").eq(other instanceof Compact
86
- ? tslib_1.__classPrivateFieldGet(other, _Compact_raw, "f")
78
+ return this.__internal__raw.eq(other instanceof Compact
79
+ ? other.__internal__raw
87
80
  : other);
88
81
  }
89
82
  /**
@@ -98,68 +91,67 @@ class Compact {
98
91
  * @description Returns a BigInt representation of the number
99
92
  */
100
93
  toBigInt() {
101
- return tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").toBigInt();
94
+ return this.__internal__raw.toBigInt();
102
95
  }
103
96
  /**
104
97
  * @description Returns the BN representation of the number
105
98
  */
106
99
  toBn() {
107
- return tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").toBn();
100
+ return this.__internal__raw.toBn();
108
101
  }
109
102
  /**
110
103
  * @description Returns a hex string representation of the value. isLe returns a LE (number-only) representation
111
104
  */
112
105
  toHex(isLe) {
113
- return tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").toHex(isLe);
106
+ return this.__internal__raw.toHex(isLe);
114
107
  }
115
108
  /**
116
109
  * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
117
110
  */
118
111
  toHuman(isExtended) {
119
- return tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").toHuman(isExtended);
112
+ return this.__internal__raw.toHuman(isExtended);
120
113
  }
121
114
  /**
122
115
  * @description Converts the Object to JSON, typically used for RPC transfers
123
116
  */
124
117
  toJSON() {
125
- return tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").toJSON();
118
+ return this.__internal__raw.toJSON();
126
119
  }
127
120
  /**
128
121
  * @description Returns the number representation for the value
129
122
  */
130
123
  toNumber() {
131
- return tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").toNumber();
124
+ return this.__internal__raw.toNumber();
132
125
  }
133
126
  /**
134
127
  * @description Converts the value in a best-fit primitive form
135
128
  */
136
129
  toPrimitive() {
137
- return tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").toPrimitive();
130
+ return this.__internal__raw.toPrimitive();
138
131
  }
139
132
  /**
140
133
  * @description Returns the base runtime type name for this instance
141
134
  */
142
135
  toRawType() {
143
- return `Compact<${this.registry.getClassName(tslib_1.__classPrivateFieldGet(this, _Compact_Type, "f")) || tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").toRawType()}>`;
136
+ return `Compact<${this.registry.getClassName(this.__internal__Type) || this.__internal__raw.toRawType()}>`;
144
137
  }
145
138
  /**
146
139
  * @description Returns the string representation of the value
147
140
  */
148
141
  toString() {
149
- return tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").toString();
142
+ return this.__internal__raw.toString();
150
143
  }
151
144
  /**
152
145
  * @description Encodes the value as a Uint8Array as per the SCALE specifications
153
146
  */
154
147
  toU8a(_isBare) {
155
- return (0, util_1.compactToU8a)(tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f").toBn());
148
+ return (0, util_1.compactToU8a)(this.__internal__raw.toBn());
156
149
  }
157
150
  /**
158
151
  * @description Returns the embedded [[UInt]] or [[Moment]] value
159
152
  */
160
153
  unwrap() {
161
- return tslib_1.__classPrivateFieldGet(this, _Compact_raw, "f");
154
+ return this.__internal__raw;
162
155
  }
163
156
  }
164
157
  exports.Compact = Compact;
165
- _Compact_Type = new WeakMap(), _Compact_raw = new WeakMap();
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
- var _DoNotConstruct_neverError;
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.DoNotConstruct = void 0;
5
- const tslib_1 = require("tslib");
6
4
  /**
7
5
  * @name DoNotConstruct
8
6
  * @description
@@ -10,10 +8,9 @@ const tslib_1 = require("tslib");
10
8
  */
11
9
  class DoNotConstruct {
12
10
  constructor(registry, typeName = 'DoNotConstruct') {
13
- _DoNotConstruct_neverError.set(this, void 0);
14
11
  this.registry = registry;
15
- tslib_1.__classPrivateFieldSet(this, _DoNotConstruct_neverError, new Error(`DoNotConstruct: Cannot construct unknown type ${typeName}`), "f");
16
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
12
+ this.__internal__neverError = new Error(`DoNotConstruct: Cannot construct unknown type ${typeName}`);
13
+ throw this.__internal__neverError;
17
14
  }
18
15
  static with(typeName) {
19
16
  return class extends DoNotConstruct {
@@ -26,74 +23,73 @@ class DoNotConstruct {
26
23
  * @description The length of the value when encoded as a Uint8Array
27
24
  */
28
25
  get encodedLength() {
29
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
26
+ throw this.__internal__neverError;
30
27
  }
31
28
  /**
32
29
  * @description returns a hash of the contents
33
30
  */
34
31
  get hash() {
35
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
32
+ throw this.__internal__neverError;
36
33
  }
37
34
  /**
38
35
  * @description Checks if the value is an empty value (always true)
39
36
  */
40
37
  get isEmpty() {
41
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
38
+ throw this.__internal__neverError;
42
39
  }
43
40
  /**
44
41
  * @description Unimplemented
45
42
  */
46
43
  eq() {
47
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
44
+ throw this.__internal__neverError;
48
45
  }
49
46
  /**
50
47
  * @description Unimplemented
51
48
  */
52
49
  inspect() {
53
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
50
+ throw this.__internal__neverError;
54
51
  }
55
52
  /**
56
53
  * @description Unimplemented
57
54
  */
58
55
  toHex() {
59
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
56
+ throw this.__internal__neverError;
60
57
  }
61
58
  /**
62
59
  * @description Unimplemented
63
60
  */
64
61
  toHuman() {
65
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
62
+ throw this.__internal__neverError;
66
63
  }
67
64
  /**
68
65
  * @description Unimplemented
69
66
  */
70
67
  toJSON() {
71
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
68
+ throw this.__internal__neverError;
72
69
  }
73
70
  /**
74
71
  * @description Unimplemented
75
72
  */
76
73
  toPrimitive() {
77
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
74
+ throw this.__internal__neverError;
78
75
  }
79
76
  /**
80
77
  * @description Unimplemented
81
78
  */
82
79
  toRawType() {
83
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
80
+ throw this.__internal__neverError;
84
81
  }
85
82
  /**
86
83
  * @description Unimplemented
87
84
  */
88
85
  toString() {
89
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
86
+ throw this.__internal__neverError;
90
87
  }
91
88
  /**
92
89
  * @description Unimplemented
93
90
  */
94
91
  toU8a() {
95
- throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
92
+ throw this.__internal__neverError;
96
93
  }
97
94
  }
98
95
  exports.DoNotConstruct = DoNotConstruct;
99
- _DoNotConstruct_neverError = new WeakMap();