@polkadot/types-codec 8.5.2-8 → 8.6.2-0
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.
- package/cjs/extended/Bytes.js +2 -2
- package/cjs/native/Struct.js +2 -2
- package/cjs/packageInfo.js +1 -1
- package/extended/Bytes.d.ts +1 -1
- package/extended/Bytes.js +2 -2
- package/native/Struct.d.ts +1 -1
- package/native/Struct.js +2 -2
- package/package.json +3 -3
- package/packageInfo.js +1 -1
- package/types/codec.d.ts +1 -1
package/cjs/extended/Bytes.js
CHANGED
|
@@ -54,10 +54,10 @@ class Bytes extends _Raw.Raw {
|
|
|
54
54
|
*/
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
inspect() {
|
|
57
|
+
inspect(isBare) {
|
|
58
58
|
const clength = (0, _util.compactToU8a)(this.length);
|
|
59
59
|
return {
|
|
60
|
-
outer: this.length ? [clength, super.toU8a()] : [clength]
|
|
60
|
+
outer: isBare ? [super.toU8a()] : this.length ? [clength, super.toU8a()] : [clength]
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
/**
|
package/cjs/native/Struct.js
CHANGED
|
@@ -215,11 +215,11 @@ class Struct extends Map {
|
|
|
215
215
|
*/
|
|
216
216
|
|
|
217
217
|
|
|
218
|
-
inspect() {
|
|
218
|
+
inspect(isBare) {
|
|
219
219
|
const inner = new Array();
|
|
220
220
|
|
|
221
221
|
for (const [k, v] of this.entries()) {
|
|
222
|
-
inner.push({ ...v.inspect(),
|
|
222
|
+
inner.push({ ...v.inspect(!isBare || (0, _util.isBoolean)(isBare) ? isBare : isBare[k]),
|
|
223
223
|
name: (0, _util.stringCamelCase)(k)
|
|
224
224
|
});
|
|
225
225
|
}
|
package/cjs/packageInfo.js
CHANGED
package/extended/Bytes.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare class Bytes extends Raw {
|
|
|
16
16
|
/**
|
|
17
17
|
* @description Returns a breakdown of the hex encoding for this Codec
|
|
18
18
|
*/
|
|
19
|
-
inspect(): Inspect;
|
|
19
|
+
inspect(isBare?: boolean): Inspect;
|
|
20
20
|
/**
|
|
21
21
|
* @description Returns the base runtime type name for this instance
|
|
22
22
|
*/
|
package/extended/Bytes.js
CHANGED
|
@@ -45,10 +45,10 @@ export class Bytes extends Raw {
|
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
inspect() {
|
|
48
|
+
inspect(isBare) {
|
|
49
49
|
const clength = compactToU8a(this.length);
|
|
50
50
|
return {
|
|
51
|
-
outer: this.length ? [clength, super.toU8a()] : [clength]
|
|
51
|
+
outer: isBare ? [super.toU8a()] : this.length ? [clength, super.toU8a()] : [clength]
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
54
|
/**
|
package/native/Struct.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ export declare class Struct<S extends TypesDef = TypesDef, V extends {
|
|
|
68
68
|
/**
|
|
69
69
|
* @description Returns a breakdown of the hex encoding for this Codec
|
|
70
70
|
*/
|
|
71
|
-
inspect(): Inspect;
|
|
71
|
+
inspect(isBare?: BareOpts): Inspect;
|
|
72
72
|
/**
|
|
73
73
|
* @description Converts the Object to an standard JavaScript Array
|
|
74
74
|
*/
|
package/native/Struct.js
CHANGED
|
@@ -204,11 +204,11 @@ export class Struct extends Map {
|
|
|
204
204
|
*/
|
|
205
205
|
|
|
206
206
|
|
|
207
|
-
inspect() {
|
|
207
|
+
inspect(isBare) {
|
|
208
208
|
const inner = new Array();
|
|
209
209
|
|
|
210
210
|
for (const [k, v] of this.entries()) {
|
|
211
|
-
inner.push({ ...v.inspect(),
|
|
211
|
+
inner.push({ ...v.inspect(!isBare || isBoolean(isBare) ? isBare : isBare[k]),
|
|
212
212
|
name: stringCamelCase(k)
|
|
213
213
|
});
|
|
214
214
|
}
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"./cjs/detectPackage.js"
|
|
21
21
|
],
|
|
22
22
|
"type": "module",
|
|
23
|
-
"version": "8.
|
|
23
|
+
"version": "8.6.2-0",
|
|
24
24
|
"main": "./cjs/index.js",
|
|
25
25
|
"module": "./index.js",
|
|
26
26
|
"types": "./index.d.ts",
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
}
|
|
415
415
|
},
|
|
416
416
|
"dependencies": {
|
|
417
|
-
"@babel/runtime": "^7.18.
|
|
418
|
-
"@polkadot/util": "^9.
|
|
417
|
+
"@babel/runtime": "^7.18.3",
|
|
418
|
+
"@polkadot/util": "^9.3.1"
|
|
419
419
|
}
|
|
420
420
|
}
|
package/packageInfo.js
CHANGED
|
@@ -5,5 +5,5 @@ export const packageInfo = {
|
|
|
5
5
|
name: '@polkadot/types-codec',
|
|
6
6
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
7
7
|
type: 'esm',
|
|
8
|
-
version: '8.
|
|
8
|
+
version: '8.6.2-0'
|
|
9
9
|
};
|
package/types/codec.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export interface Codec {
|
|
|
47
47
|
/**
|
|
48
48
|
* @description Returns a breakdown of the hex encoding for this Codec
|
|
49
49
|
*/
|
|
50
|
-
inspect(): Inspect;
|
|
50
|
+
inspect(isBare?: BareOpts): Inspect;
|
|
51
51
|
/**
|
|
52
52
|
* @description Returns a hex string representation of the value. isLe returns a LE (number-only) representation
|
|
53
53
|
*/
|