@polkadot/types-codec 6.12.2-2 → 6.12.2-23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/base/Base.cjs +39 -11
  2. package/base/Base.js +36 -11
  3. package/base/Enum.cjs +8 -0
  4. package/base/Enum.js +8 -0
  5. package/extended/WrapperOpaque.cjs +1 -9
  6. package/extended/WrapperOpaque.js +1 -9
  7. package/native/Json.cjs +4 -0
  8. package/native/Json.js +4 -0
  9. package/native/Struct.cjs +15 -2
  10. package/native/Struct.data.cjs +10 -0
  11. package/native/Struct.data.js +3 -0
  12. package/native/Struct.js +15 -2
  13. package/package.json +11 -75
  14. package/packageInfo.cjs +1 -1
  15. package/packageInfo.js +1 -1
  16. package/abstract/AbstractArray.d.ts +0 -84
  17. package/abstract/AbstractInt.d.ts +0 -75
  18. package/abstract/index.d.ts +0 -2
  19. package/base/Base.d.ts +0 -54
  20. package/base/Compact.d.ts +0 -83
  21. package/base/DoNotConstruct.d.ts +0 -33
  22. package/base/Enum.d.ts +0 -101
  23. package/base/Int.d.ts +0 -16
  24. package/base/Null.d.ts +0 -54
  25. package/base/Option.d.ts +0 -88
  26. package/base/Result.d.ts +0 -46
  27. package/base/Tuple.d.ts +0 -39
  28. package/base/UInt.d.ts +0 -15
  29. package/base/Vec.d.ts +0 -28
  30. package/base/VecAny.d.ts +0 -15
  31. package/base/VecFixed.d.ts +0 -26
  32. package/base/index.d.ts +0 -13
  33. package/bundle.d.ts +0 -7
  34. package/detectPackage.d.ts +0 -1
  35. package/extended/BTreeMap.d.ts +0 -5
  36. package/extended/BTreeSet.d.ts +0 -55
  37. package/extended/BitVec.d.ts +0 -26
  38. package/extended/Bytes.d.ts +0 -25
  39. package/extended/HashMap.d.ts +0 -5
  40. package/extended/Linkage.d.ts +0 -31
  41. package/extended/Map.d.ts +0 -50
  42. package/extended/Range.d.ts +0 -30
  43. package/extended/Type.d.ts +0 -16
  44. package/extended/U8aFixed.d.ts +0 -16
  45. package/extended/WrapperOpaque.d.ts +0 -18
  46. package/extended/index.d.ts +0 -11
  47. package/index.d.ts +0 -2
  48. package/native/Bool.d.ts +0 -62
  49. package/native/Date.d.ts +0 -76
  50. package/native/Json.d.ts +0 -55
  51. package/native/Raw.d.ts +0 -90
  52. package/native/Set.d.ts +0 -76
  53. package/native/Struct.d.ts +0 -92
  54. package/native/Text.d.ts +0 -71
  55. package/native/index.d.ts +0 -7
  56. package/packageInfo.d.ts +0 -4
  57. package/primitive/I128.d.ts +0 -11
  58. package/primitive/I16.d.ts +0 -11
  59. package/primitive/I256.d.ts +0 -11
  60. package/primitive/I32.d.ts +0 -11
  61. package/primitive/I64.d.ts +0 -11
  62. package/primitive/I8.d.ts +0 -11
  63. package/primitive/U128.d.ts +0 -11
  64. package/primitive/U16.d.ts +0 -11
  65. package/primitive/U256.d.ts +0 -11
  66. package/primitive/U32.d.ts +0 -11
  67. package/primitive/U64.d.ts +0 -11
  68. package/primitive/U8.d.ts +0 -11
  69. package/primitive/USize.d.ts +0 -12
  70. package/primitive/index.d.ts +0 -13
  71. package/types/codec.d.ts +0 -77
  72. package/types/helpers.d.ts +0 -14
  73. package/types/index.d.ts +0 -4
  74. package/types/interfaces.d.ts +0 -68
  75. package/types/registry.d.ts +0 -44
  76. package/utils/compareArray.d.ts +0 -1
  77. package/utils/compareMap.d.ts +0 -1
  78. package/utils/compareSet.d.ts +0 -1
  79. package/utils/decodeU8a.d.ts +0 -13
  80. package/utils/index.d.ts +0 -9
  81. package/utils/mapToTypeMap.d.ts +0 -5
  82. package/utils/sanitize.d.ts +0 -16
  83. package/utils/sortValues.d.ts +0 -13
  84. package/utils/typeToConstructor.d.ts +0 -2
  85. package/utils/typesToMap.d.ts +0 -2
  86. package/utils/util.d.ts +0 -3
package/package.json CHANGED
@@ -20,11 +20,14 @@
20
20
  "./detectPackage.cjs"
21
21
  ],
22
22
  "type": "module",
23
- "version": "6.12.2-2",
23
+ "version": "6.12.2-23",
24
24
  "main": "index.js",
25
25
  "dependencies": {
26
- "@babel/runtime": "^7.16.3",
27
- "@polkadot/util": "^8.1.2"
26
+ "@babel/runtime": "^7.16.5",
27
+ "@polkadot/util": "^8.2.2"
28
+ },
29
+ "devDependencies": {
30
+ "@polkadot/types": "^6.12.2-23"
28
31
  },
29
32
  "exports": {
30
33
  ".": {
@@ -39,13 +42,10 @@
39
42
  "require": "./abstract/AbstractArray.cjs",
40
43
  "default": "./abstract/AbstractArray.js"
41
44
  },
42
- "./abstract/AbstractArray.d.ts": "./abstract/AbstractArray.d.ts",
43
45
  "./abstract/AbstractInt": {
44
46
  "require": "./abstract/AbstractInt.cjs",
45
47
  "default": "./abstract/AbstractInt.js"
46
48
  },
47
- "./abstract/AbstractInt.d.ts": "./abstract/AbstractInt.d.ts",
48
- "./abstract/index.d.ts": "./abstract/index.d.ts",
49
49
  "./base": {
50
50
  "require": "./base/index.cjs",
51
51
  "default": "./base/index.js"
@@ -54,78 +54,62 @@
54
54
  "require": "./base/Base.cjs",
55
55
  "default": "./base/Base.js"
56
56
  },
57
- "./base/Base.d.ts": "./base/Base.d.ts",
58
57
  "./base/Compact": {
59
58
  "require": "./base/Compact.cjs",
60
59
  "default": "./base/Compact.js"
61
60
  },
62
- "./base/Compact.d.ts": "./base/Compact.d.ts",
63
61
  "./base/DoNotConstruct": {
64
62
  "require": "./base/DoNotConstruct.cjs",
65
63
  "default": "./base/DoNotConstruct.js"
66
64
  },
67
- "./base/DoNotConstruct.d.ts": "./base/DoNotConstruct.d.ts",
68
65
  "./base/Enum": {
69
66
  "require": "./base/Enum.cjs",
70
67
  "default": "./base/Enum.js"
71
68
  },
72
- "./base/Enum.d.ts": "./base/Enum.d.ts",
73
- "./base/index.d.ts": "./base/index.d.ts",
74
69
  "./base/Int": {
75
70
  "require": "./base/Int.cjs",
76
71
  "default": "./base/Int.js"
77
72
  },
78
- "./base/Int.d.ts": "./base/Int.d.ts",
79
73
  "./base/Null": {
80
74
  "require": "./base/Null.cjs",
81
75
  "default": "./base/Null.js"
82
76
  },
83
- "./base/Null.d.ts": "./base/Null.d.ts",
84
77
  "./base/Option": {
85
78
  "require": "./base/Option.cjs",
86
79
  "default": "./base/Option.js"
87
80
  },
88
- "./base/Option.d.ts": "./base/Option.d.ts",
89
81
  "./base/Result": {
90
82
  "require": "./base/Result.cjs",
91
83
  "default": "./base/Result.js"
92
84
  },
93
- "./base/Result.d.ts": "./base/Result.d.ts",
94
85
  "./base/Tuple": {
95
86
  "require": "./base/Tuple.cjs",
96
87
  "default": "./base/Tuple.js"
97
88
  },
98
- "./base/Tuple.d.ts": "./base/Tuple.d.ts",
99
89
  "./base/UInt": {
100
90
  "require": "./base/UInt.cjs",
101
91
  "default": "./base/UInt.js"
102
92
  },
103
- "./base/UInt.d.ts": "./base/UInt.d.ts",
104
93
  "./base/Vec": {
105
94
  "require": "./base/Vec.cjs",
106
95
  "default": "./base/Vec.js"
107
96
  },
108
- "./base/Vec.d.ts": "./base/Vec.d.ts",
109
97
  "./base/VecAny": {
110
98
  "require": "./base/VecAny.cjs",
111
99
  "default": "./base/VecAny.js"
112
100
  },
113
- "./base/VecAny.d.ts": "./base/VecAny.d.ts",
114
101
  "./base/VecFixed": {
115
102
  "require": "./base/VecFixed.cjs",
116
103
  "default": "./base/VecFixed.js"
117
104
  },
118
- "./base/VecFixed.d.ts": "./base/VecFixed.d.ts",
119
105
  "./bundle": {
120
106
  "require": "./bundle.cjs",
121
107
  "default": "./bundle.js"
122
108
  },
123
- "./bundle.d.ts": "./bundle.d.ts",
124
109
  "./detectPackage": {
125
110
  "require": "./detectPackage.cjs",
126
111
  "default": "./detectPackage.js"
127
112
  },
128
- "./detectPackage.d.ts": "./detectPackage.d.ts",
129
113
  "./extended": {
130
114
  "require": "./extended/index.cjs",
131
115
  "default": "./extended/index.js"
@@ -134,59 +118,46 @@
134
118
  "require": "./extended/BitVec.cjs",
135
119
  "default": "./extended/BitVec.js"
136
120
  },
137
- "./extended/BitVec.d.ts": "./extended/BitVec.d.ts",
138
121
  "./extended/BTreeMap": {
139
122
  "require": "./extended/BTreeMap.cjs",
140
123
  "default": "./extended/BTreeMap.js"
141
124
  },
142
- "./extended/BTreeMap.d.ts": "./extended/BTreeMap.d.ts",
143
125
  "./extended/BTreeSet": {
144
126
  "require": "./extended/BTreeSet.cjs",
145
127
  "default": "./extended/BTreeSet.js"
146
128
  },
147
- "./extended/BTreeSet.d.ts": "./extended/BTreeSet.d.ts",
148
129
  "./extended/Bytes": {
149
130
  "require": "./extended/Bytes.cjs",
150
131
  "default": "./extended/Bytes.js"
151
132
  },
152
- "./extended/Bytes.d.ts": "./extended/Bytes.d.ts",
153
133
  "./extended/HashMap": {
154
134
  "require": "./extended/HashMap.cjs",
155
135
  "default": "./extended/HashMap.js"
156
136
  },
157
- "./extended/HashMap.d.ts": "./extended/HashMap.d.ts",
158
- "./extended/index.d.ts": "./extended/index.d.ts",
159
137
  "./extended/Linkage": {
160
138
  "require": "./extended/Linkage.cjs",
161
139
  "default": "./extended/Linkage.js"
162
140
  },
163
- "./extended/Linkage.d.ts": "./extended/Linkage.d.ts",
164
141
  "./extended/Map": {
165
142
  "require": "./extended/Map.cjs",
166
143
  "default": "./extended/Map.js"
167
144
  },
168
- "./extended/Map.d.ts": "./extended/Map.d.ts",
169
145
  "./extended/Range": {
170
146
  "require": "./extended/Range.cjs",
171
147
  "default": "./extended/Range.js"
172
148
  },
173
- "./extended/Range.d.ts": "./extended/Range.d.ts",
174
149
  "./extended/Type": {
175
150
  "require": "./extended/Type.cjs",
176
151
  "default": "./extended/Type.js"
177
152
  },
178
- "./extended/Type.d.ts": "./extended/Type.d.ts",
179
153
  "./extended/U8aFixed": {
180
154
  "require": "./extended/U8aFixed.cjs",
181
155
  "default": "./extended/U8aFixed.js"
182
156
  },
183
- "./extended/U8aFixed.d.ts": "./extended/U8aFixed.d.ts",
184
157
  "./extended/WrapperOpaque": {
185
158
  "require": "./extended/WrapperOpaque.cjs",
186
159
  "default": "./extended/WrapperOpaque.js"
187
160
  },
188
- "./extended/WrapperOpaque.d.ts": "./extended/WrapperOpaque.d.ts",
189
- "./index.d.ts": "./index.d.ts",
190
161
  "./native": {
191
162
  "require": "./native/index.cjs",
192
163
  "default": "./native/index.js"
@@ -195,44 +166,39 @@
195
166
  "require": "./native/Bool.cjs",
196
167
  "default": "./native/Bool.js"
197
168
  },
198
- "./native/Bool.d.ts": "./native/Bool.d.ts",
199
169
  "./native/Date": {
200
170
  "require": "./native/Date.cjs",
201
171
  "default": "./native/Date.js"
202
172
  },
203
- "./native/Date.d.ts": "./native/Date.d.ts",
204
- "./native/index.d.ts": "./native/index.d.ts",
205
173
  "./native/Json": {
206
174
  "require": "./native/Json.cjs",
207
175
  "default": "./native/Json.js"
208
176
  },
209
- "./native/Json.d.ts": "./native/Json.d.ts",
210
177
  "./native/Raw": {
211
178
  "require": "./native/Raw.cjs",
212
179
  "default": "./native/Raw.js"
213
180
  },
214
- "./native/Raw.d.ts": "./native/Raw.d.ts",
215
181
  "./native/Set": {
216
182
  "require": "./native/Set.cjs",
217
183
  "default": "./native/Set.js"
218
184
  },
219
- "./native/Set.d.ts": "./native/Set.d.ts",
220
185
  "./native/Struct": {
221
186
  "require": "./native/Struct.cjs",
222
187
  "default": "./native/Struct.js"
223
188
  },
224
- "./native/Struct.d.ts": "./native/Struct.d.ts",
189
+ "./native/Struct.data": {
190
+ "require": "./native/Struct.data.cjs",
191
+ "default": "./native/Struct.data.js"
192
+ },
225
193
  "./native/Text": {
226
194
  "require": "./native/Text.cjs",
227
195
  "default": "./native/Text.js"
228
196
  },
229
- "./native/Text.d.ts": "./native/Text.d.ts",
230
197
  "./package.json": "./package.json",
231
198
  "./packageInfo": {
232
199
  "require": "./packageInfo.cjs",
233
200
  "default": "./packageInfo.js"
234
201
  },
235
- "./packageInfo.d.ts": "./packageInfo.d.ts",
236
202
  "./primitive": {
237
203
  "require": "./primitive/index.cjs",
238
204
  "default": "./primitive/index.js"
@@ -241,68 +207,54 @@
241
207
  "require": "./primitive/I128.cjs",
242
208
  "default": "./primitive/I128.js"
243
209
  },
244
- "./primitive/I128.d.ts": "./primitive/I128.d.ts",
245
210
  "./primitive/I16": {
246
211
  "require": "./primitive/I16.cjs",
247
212
  "default": "./primitive/I16.js"
248
213
  },
249
- "./primitive/I16.d.ts": "./primitive/I16.d.ts",
250
214
  "./primitive/I256": {
251
215
  "require": "./primitive/I256.cjs",
252
216
  "default": "./primitive/I256.js"
253
217
  },
254
- "./primitive/I256.d.ts": "./primitive/I256.d.ts",
255
218
  "./primitive/I32": {
256
219
  "require": "./primitive/I32.cjs",
257
220
  "default": "./primitive/I32.js"
258
221
  },
259
- "./primitive/I32.d.ts": "./primitive/I32.d.ts",
260
222
  "./primitive/I64": {
261
223
  "require": "./primitive/I64.cjs",
262
224
  "default": "./primitive/I64.js"
263
225
  },
264
- "./primitive/I64.d.ts": "./primitive/I64.d.ts",
265
226
  "./primitive/I8": {
266
227
  "require": "./primitive/I8.cjs",
267
228
  "default": "./primitive/I8.js"
268
229
  },
269
- "./primitive/I8.d.ts": "./primitive/I8.d.ts",
270
- "./primitive/index.d.ts": "./primitive/index.d.ts",
271
230
  "./primitive/U128": {
272
231
  "require": "./primitive/U128.cjs",
273
232
  "default": "./primitive/U128.js"
274
233
  },
275
- "./primitive/U128.d.ts": "./primitive/U128.d.ts",
276
234
  "./primitive/U16": {
277
235
  "require": "./primitive/U16.cjs",
278
236
  "default": "./primitive/U16.js"
279
237
  },
280
- "./primitive/U16.d.ts": "./primitive/U16.d.ts",
281
238
  "./primitive/U256": {
282
239
  "require": "./primitive/U256.cjs",
283
240
  "default": "./primitive/U256.js"
284
241
  },
285
- "./primitive/U256.d.ts": "./primitive/U256.d.ts",
286
242
  "./primitive/U32": {
287
243
  "require": "./primitive/U32.cjs",
288
244
  "default": "./primitive/U32.js"
289
245
  },
290
- "./primitive/U32.d.ts": "./primitive/U32.d.ts",
291
246
  "./primitive/U64": {
292
247
  "require": "./primitive/U64.cjs",
293
248
  "default": "./primitive/U64.js"
294
249
  },
295
- "./primitive/U64.d.ts": "./primitive/U64.d.ts",
296
250
  "./primitive/U8": {
297
251
  "require": "./primitive/U8.cjs",
298
252
  "default": "./primitive/U8.js"
299
253
  },
300
- "./primitive/U8.d.ts": "./primitive/U8.d.ts",
301
254
  "./primitive/USize": {
302
255
  "require": "./primitive/USize.cjs",
303
256
  "default": "./primitive/USize.js"
304
257
  },
305
- "./primitive/USize.d.ts": "./primitive/USize.d.ts",
306
258
  "./types": {
307
259
  "require": "./types/index.cjs",
308
260
  "default": "./types/index.js"
@@ -311,23 +263,18 @@
311
263
  "require": "./types/codec.cjs",
312
264
  "default": "./types/codec.js"
313
265
  },
314
- "./types/codec.d.ts": "./types/codec.d.ts",
315
266
  "./types/helpers": {
316
267
  "require": "./types/helpers.cjs",
317
268
  "default": "./types/helpers.js"
318
269
  },
319
- "./types/helpers.d.ts": "./types/helpers.d.ts",
320
- "./types/index.d.ts": "./types/index.d.ts",
321
270
  "./types/interfaces": {
322
271
  "require": "./types/interfaces.cjs",
323
272
  "default": "./types/interfaces.js"
324
273
  },
325
- "./types/interfaces.d.ts": "./types/interfaces.d.ts",
326
274
  "./types/registry": {
327
275
  "require": "./types/registry.cjs",
328
276
  "default": "./types/registry.js"
329
277
  },
330
- "./types/registry.d.ts": "./types/registry.d.ts",
331
278
  "./utils": {
332
279
  "require": "./utils/index.cjs",
333
280
  "default": "./utils/index.js"
@@ -336,52 +283,41 @@
336
283
  "require": "./utils/compareArray.cjs",
337
284
  "default": "./utils/compareArray.js"
338
285
  },
339
- "./utils/compareArray.d.ts": "./utils/compareArray.d.ts",
340
286
  "./utils/compareMap": {
341
287
  "require": "./utils/compareMap.cjs",
342
288
  "default": "./utils/compareMap.js"
343
289
  },
344
- "./utils/compareMap.d.ts": "./utils/compareMap.d.ts",
345
290
  "./utils/compareSet": {
346
291
  "require": "./utils/compareSet.cjs",
347
292
  "default": "./utils/compareSet.js"
348
293
  },
349
- "./utils/compareSet.d.ts": "./utils/compareSet.d.ts",
350
294
  "./utils/decodeU8a": {
351
295
  "require": "./utils/decodeU8a.cjs",
352
296
  "default": "./utils/decodeU8a.js"
353
297
  },
354
- "./utils/decodeU8a.d.ts": "./utils/decodeU8a.d.ts",
355
- "./utils/index.d.ts": "./utils/index.d.ts",
356
298
  "./utils/mapToTypeMap": {
357
299
  "require": "./utils/mapToTypeMap.cjs",
358
300
  "default": "./utils/mapToTypeMap.js"
359
301
  },
360
- "./utils/mapToTypeMap.d.ts": "./utils/mapToTypeMap.d.ts",
361
302
  "./utils/sanitize": {
362
303
  "require": "./utils/sanitize.cjs",
363
304
  "default": "./utils/sanitize.js"
364
305
  },
365
- "./utils/sanitize.d.ts": "./utils/sanitize.d.ts",
366
306
  "./utils/sortValues": {
367
307
  "require": "./utils/sortValues.cjs",
368
308
  "default": "./utils/sortValues.js"
369
309
  },
370
- "./utils/sortValues.d.ts": "./utils/sortValues.d.ts",
371
310
  "./utils/typesToMap": {
372
311
  "require": "./utils/typesToMap.cjs",
373
312
  "default": "./utils/typesToMap.js"
374
313
  },
375
- "./utils/typesToMap.d.ts": "./utils/typesToMap.d.ts",
376
314
  "./utils/typeToConstructor": {
377
315
  "require": "./utils/typeToConstructor.cjs",
378
316
  "default": "./utils/typeToConstructor.js"
379
317
  },
380
- "./utils/typeToConstructor.d.ts": "./utils/typeToConstructor.d.ts",
381
318
  "./utils/util": {
382
319
  "require": "./utils/util.cjs",
383
320
  "default": "./utils/util.js"
384
- },
385
- "./utils/util.d.ts": "./utils/util.d.ts"
321
+ }
386
322
  }
387
323
  }
package/packageInfo.cjs CHANGED
@@ -9,6 +9,6 @@ exports.packageInfo = void 0;
9
9
  // Auto-generated by @polkadot/dev, do not edit
10
10
  const packageInfo = {
11
11
  name: '@polkadot/types-codec',
12
- version: '6.12.2-2'
12
+ version: '6.12.2-23'
13
13
  };
14
14
  exports.packageInfo = packageInfo;
package/packageInfo.js CHANGED
@@ -3,5 +3,5 @@
3
3
  // Auto-generated by @polkadot/dev, do not edit
4
4
  export const packageInfo = {
5
5
  name: '@polkadot/types-codec',
6
- version: '6.12.2-2'
6
+ version: '6.12.2-23'
7
7
  };
@@ -1,84 +0,0 @@
1
- import type { HexString } from '@polkadot/util/types';
2
- import type { AnyJson, Codec, CodecRegistry, IU8a, IVec } from '../types';
3
- /**
4
- * @name AbstractArray
5
- * @description
6
- * This manages codec arrays. It is an extension to Array, providing
7
- * specific encoding/decoding on top of the base type.
8
- * @noInheritDoc
9
- */
10
- export declare abstract class AbstractArray<T extends Codec> extends Array<T> implements IVec<T> {
11
- readonly registry: CodecRegistry;
12
- createdAtHash?: IU8a;
13
- readonly initialU8aLength?: number;
14
- protected constructor(registry: CodecRegistry, values: T[], initialU8aLength?: number);
15
- /**
16
- * @description The length of the value when encoded as a Uint8Array
17
- */
18
- get encodedLength(): number;
19
- /**
20
- * @description returns a hash of the contents
21
- */
22
- get hash(): IU8a;
23
- /**
24
- * @description Checks if the value is an empty value
25
- */
26
- get isEmpty(): boolean;
27
- /**
28
- * @description The length of the value
29
- */
30
- get length(): number;
31
- /**
32
- * @description Compares the value of the input to see if there is a match
33
- */
34
- eq(other?: unknown): boolean;
35
- /**
36
- * @description Converts the Object to an standard JavaScript Array
37
- */
38
- toArray(): T[];
39
- /**
40
- * @description Returns a hex string representation of the value
41
- */
42
- toHex(): HexString;
43
- /**
44
- * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
45
- */
46
- toHuman(isExtended?: boolean): AnyJson;
47
- /**
48
- * @description Converts the Object to JSON, typically used for RPC transfers
49
- */
50
- toJSON(): AnyJson;
51
- /**
52
- * @description Returns the base runtime type name for this instance
53
- */
54
- abstract toRawType(): string;
55
- /**
56
- * @description Returns the string representation of the value
57
- */
58
- toString(): string;
59
- /**
60
- * @description Encodes the value as a Uint8Array as per the SCALE specifications
61
- * @param isBare true when the value has none of the type-specific prefixes (internal)
62
- */
63
- toU8a(isBare?: boolean): Uint8Array;
64
- /**
65
- * @description Concatenates two arrays
66
- */
67
- concat(other: T[]): T[];
68
- /**
69
- * @description Filters the array with the callback
70
- */
71
- filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: unknown): T[];
72
- /**
73
- * @description Maps the array with the callback
74
- */
75
- map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: unknown): U[];
76
- /**
77
- * @description Checks if the array includes a specific value
78
- */
79
- includes(check: unknown): boolean;
80
- /**
81
- * @description Returns a slice of an array
82
- */
83
- slice(start?: number, end?: number): T[];
84
- }
@@ -1,75 +0,0 @@
1
- /// <reference types="bn.js" />
2
- import type { HexString } from '@polkadot/util/types';
3
- import type { AnyNumber, CodecRegistry, INumber, IU8a, UIntBitLength } from '../types';
4
- import { BN } from '@polkadot/util';
5
- export declare const DEFAULT_UINT_BITS = 64;
6
- /**
7
- * @name AbstractInt
8
- * @ignore
9
- * @noInheritDoc
10
- */
11
- export declare abstract class AbstractInt extends BN implements INumber {
12
- #private;
13
- readonly registry: CodecRegistry;
14
- createdAtHash?: IU8a;
15
- readonly encodedLength: number;
16
- constructor(registry: CodecRegistry, value?: AnyNumber, bitLength?: UIntBitLength, isSigned?: boolean);
17
- /**
18
- * @description returns a hash of the contents
19
- */
20
- get hash(): IU8a;
21
- /**
22
- * @description Checks if the value is a zero value (align elsewhere)
23
- */
24
- get isEmpty(): boolean;
25
- /**
26
- * @description Checks if the value is an unsigned type
27
- */
28
- get isUnsigned(): boolean;
29
- /**
30
- * @description Returns the number of bits in the value
31
- */
32
- bitLength(): number;
33
- /**
34
- * @description Compares the value of the input to see if there is a match
35
- */
36
- eq(other?: unknown): boolean;
37
- /**
38
- * @description True if this value is the max of the type
39
- */
40
- isMax(): boolean;
41
- /**
42
- * @description Returns a BigInt representation of the number
43
- */
44
- toBigInt(): bigint;
45
- /**
46
- * @description Returns the BN representation of the number. (Compatibility)
47
- */
48
- toBn(): BN;
49
- /**
50
- * @description Returns a hex string representation of the value
51
- */
52
- toHex(isLe?: boolean): HexString;
53
- /**
54
- * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
55
- */
56
- toHuman(isExpanded?: boolean): string;
57
- /**
58
- * @description Converts the Object to JSON, typically used for RPC transfers
59
- */
60
- toJSON(onlyHex?: boolean): any;
61
- /**
62
- * @description Returns the base runtime type name for this instance
63
- */
64
- toRawType(): string;
65
- /**
66
- * @description Returns the string representation of the value
67
- * @param base The base to use for the conversion
68
- */
69
- toString(base?: number): string;
70
- /**
71
- * @description Encodes the value as a Uint8Array as per the SCALE specifications
72
- * @param isBare true when the value has none of the type-specific prefixes (internal)
73
- */
74
- toU8a(isBare?: boolean): Uint8Array;
75
- }
@@ -1,2 +0,0 @@
1
- export { AbstractArray } from './AbstractArray';
2
- export { AbstractInt } from './AbstractInt';
package/base/Base.d.ts DELETED
@@ -1,54 +0,0 @@
1
- import type { HexString } from '@polkadot/util/types';
2
- import type { AnyJson, BareOpts, Codec, CodecRegistry, IU8a } from '../types';
3
- /**
4
- * @name Base
5
- * @description A type extends the Base class, when it holds a value
6
- */
7
- export declare abstract class Base<T extends Codec> implements Codec {
8
- readonly registry: CodecRegistry;
9
- createdAtHash?: IU8a;
10
- readonly initialU8aLength?: number;
11
- protected readonly _raw: T;
12
- protected constructor(registry: CodecRegistry, value: T, initialU8aLength?: number);
13
- /**
14
- * @description The length of the value when encoded as a Uint8Array
15
- */
16
- get encodedLength(): number;
17
- /**
18
- * @description returns a hash of the contents
19
- */
20
- get hash(): IU8a;
21
- /**
22
- * @description Checks if the value is an empty value
23
- */
24
- get isEmpty(): boolean;
25
- /**
26
- * @description Compares the value of the input to see if there is a match
27
- */
28
- eq(other?: unknown): boolean;
29
- /**
30
- * @description Returns a hex string representation of the value. isLe returns a LE (number-only) representation
31
- */
32
- toHex(isLe?: boolean): HexString;
33
- /**
34
- * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
35
- */
36
- toHuman(isExtended?: boolean): AnyJson;
37
- /**
38
- * @description Converts the Object to JSON, typically used for RPC transfers
39
- */
40
- toJSON(): AnyJson;
41
- /**
42
- * @description Returns the string representation of the value
43
- */
44
- toString(): string;
45
- /**
46
- * @description Encodes the value as a Uint8Array as per the SCALE specifications
47
- * @param isBare true when the value has none of the type-specific prefixes (internal)
48
- */
49
- toU8a(isBare?: BareOpts): Uint8Array;
50
- /**
51
- * @description Returns the base runtime type name for this instance
52
- */
53
- toRawType(): string;
54
- }