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