Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@polkadot/types-codec

Package Overview
Dependencies
Maintainers
2
Versions
498
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polkadot/types-codec - npm Package Compare versions

Comparing version 10.1.4 to 10.2.1

cjs/primitive/ISize.js

9

abstract/Array.d.ts

@@ -45,2 +45,6 @@ import type { HexString } from '@polkadot/util/types';

inspect(): Inspect;
/**
* @internal
* @description Internal per-item inspection of internal values
*/
inspectInner(): Inspect[];

@@ -80,3 +84,8 @@ /**

toU8a(isBare?: boolean): Uint8Array;
/**
* @internal
* @description Internal per-item SCALE encoding of contained values
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
toU8aInner(isBare?: boolean): Uint8Array[];
}

@@ -68,2 +68,6 @@ import { compactToU8a, u8aConcatStrict, u8aToHex } from '@polkadot/util';

}
/**
* @internal
* @description Internal per-item inspection of internal values
*/
inspectInner() {

@@ -140,2 +144,7 @@ const inner = new Array(this.length);

}
/**
* @internal
* @description Internal per-item SCALE encoding of contained values
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
toU8aInner(isBare) {

@@ -142,0 +151,0 @@ const encoded = new Array(this.length);

1

abstract/Int.d.ts

@@ -79,5 +79,4 @@ /// <reference types="bn.js" />

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
toU8a(_isBare?: boolean): Uint8Array;
}

@@ -214,3 +214,2 @@ var _AbstractInt_bitLength;

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -217,0 +216,0 @@ toU8a(_isBare) {

@@ -87,3 +87,2 @@ /// <reference types="bn.js" />

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -90,0 +89,0 @@ toU8a(_isBare?: boolean): Uint8Array;

@@ -150,3 +150,2 @@ var _Compact_Type, _Compact_raw;

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -153,0 +152,0 @@ toU8a(_isBare) {

@@ -27,11 +27,38 @@ import type { HexString } from '@polkadot/util/types';

get isEmpty(): boolean;
/**
* @description Unimplemented
*/
eq(): boolean;
/**
* @description Unimplemented
*/
inspect(): Inspect;
/**
* @description Unimplemented
*/
toHex(): HexString;
/**
* @description Unimplemented
*/
toHuman(): AnyJson;
/**
* @description Unimplemented
*/
toJSON(): AnyJson;
/**
* @description Unimplemented
*/
toPrimitive(): AnyJson;
/**
* @description Unimplemented
*/
toRawType(): string;
/**
* @description Unimplemented
*/
toString(): string;
/**
* @description Unimplemented
*/
toU8a(): Uint8Array;
}

@@ -40,26 +40,53 @@ var _DoNotConstruct_neverError;

}
/**
* @description Unimplemented
*/
eq() {
throw __classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
inspect() {
throw __classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toHex() {
throw __classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toHuman() {
throw __classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toJSON() {
throw __classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toPrimitive() {
throw __classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toRawType() {
throw __classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toString() {
throw __classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toU8a() {

@@ -66,0 +93,0 @@ throw __classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");

@@ -54,5 +54,4 @@ import type { HexString } from '@polkadot/util/types';

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
toU8a(_isBare?: boolean): Uint8Array;
}

@@ -70,3 +70,2 @@ import { isNull } from '@polkadot/util';

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -73,0 +72,0 @@ toU8a(_isBare) {

@@ -71,2 +71,6 @@ "use strict";

}
/**
* @internal
* @description Internal per-item inspection of internal values
*/
inspectInner() {

@@ -143,2 +147,7 @@ const inner = new Array(this.length);

}
/**
* @internal
* @description Internal per-item SCALE encoding of contained values
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
toU8aInner(isBare) {

@@ -145,0 +154,0 @@ const encoded = new Array(this.length);

@@ -217,3 +217,2 @@ "use strict";

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -220,0 +219,0 @@ toU8a(_isBare) {

@@ -153,3 +153,2 @@ "use strict";

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -156,0 +155,0 @@ toU8a(_isBare) {

@@ -43,26 +43,53 @@ "use strict";

}
/**
* @description Unimplemented
*/
eq() {
throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
inspect() {
throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toHex() {
throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toHuman() {
throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toJSON() {
throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toPrimitive() {
throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toRawType() {
throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toString() {
throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");
}
/**
* @description Unimplemented
*/
toU8a() {

@@ -69,0 +96,0 @@ throw tslib_1.__classPrivateFieldGet(this, _DoNotConstruct_neverError, "f");

@@ -73,3 +73,2 @@ "use strict";

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -76,0 +75,0 @@ toU8a(_isBare) {

@@ -61,2 +61,5 @@ "use strict";

}
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
toHuman() {

@@ -79,3 +82,3 @@ return `0b${[...this.toU8a(true)]

toU8a(isBare) {
const bitVec = super.toU8a();
const bitVec = super.toU8a(isBare);
return isBare

@@ -82,0 +85,0 @@ ? bitVec

@@ -28,5 +28,11 @@ "use strict";

}
/**
* @description Returns the next item the Linkage is pointing to
*/
get previous() {
return this.get('previous');
}
/**
* @description Returns the previous item the Linkage is pointing to
*/
get next() {

@@ -44,3 +50,3 @@ return this.get('next');

*/
toU8a() {
toU8a(isBare) {
// As part of a storage query (where these appear), in the case of empty, the values

@@ -50,3 +56,3 @@ // are NOT populated by the node - follow the same logic, leaving it empty

? EMPTY
: super.toU8a();
: super.toU8a(isBare);
}

@@ -53,0 +59,0 @@ }

@@ -105,3 +105,2 @@ "use strict";

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -108,0 +107,0 @@ toU8a(_isBare) {

@@ -136,3 +136,2 @@ "use strict";

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -139,0 +138,0 @@ toU8a(_isBare) {

@@ -102,4 +102,6 @@ "use strict";

*/
toU8a() {
return (0, util_1.floatToU8a)(this, { bitLength: tslib_1.__classPrivateFieldGet(this, _Float_bitLength, "f") });
toU8a(_isBare) {
return (0, util_1.floatToU8a)(this, {
bitLength: tslib_1.__classPrivateFieldGet(this, _Float_bitLength, "f")
});
}

@@ -106,0 +108,0 @@ }

@@ -126,3 +126,2 @@ "use strict";

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -129,0 +128,0 @@ toU8a(_isBare) {

@@ -209,3 +209,2 @@ "use strict";

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -212,0 +211,0 @@ toU8a(_isBare) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.packageInfo = void 0;
exports.packageInfo = { name: '@polkadot/types-codec', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '10.1.4' };
exports.packageInfo = { name: '@polkadot/types-codec', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '10.2.1' };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.USize = exports.usize = exports.U256 = exports.u256 = exports.U128 = exports.u128 = exports.U64 = exports.u64 = exports.U32 = exports.u32 = exports.U16 = exports.u16 = exports.U8 = exports.u8 = exports.I256 = exports.i256 = exports.I128 = exports.i128 = exports.I64 = exports.i64 = exports.I32 = exports.i32 = exports.I16 = exports.i16 = exports.I8 = exports.i8 = exports.F64 = exports.f64 = exports.F32 = exports.f32 = void 0;
exports.USize = exports.usize = exports.U256 = exports.u256 = exports.U128 = exports.u128 = exports.U64 = exports.u64 = exports.U32 = exports.u32 = exports.U16 = exports.u16 = exports.U8 = exports.u8 = exports.ISize = exports.isize = exports.I256 = exports.i256 = exports.I128 = exports.i128 = exports.I64 = exports.i64 = exports.I32 = exports.i32 = exports.I16 = exports.i16 = exports.I8 = exports.i8 = exports.F64 = exports.f64 = exports.F32 = exports.f32 = void 0;
var F32_js_1 = require("./F32.js");

@@ -28,2 +28,5 @@ Object.defineProperty(exports, "f32", { enumerable: true, get: function () { return F32_js_1.f32; } });

Object.defineProperty(exports, "I256", { enumerable: true, get: function () { return I256_js_1.i256; } });
var ISize_js_1 = require("./ISize.js");
Object.defineProperty(exports, "isize", { enumerable: true, get: function () { return ISize_js_1.isize; } });
Object.defineProperty(exports, "ISize", { enumerable: true, get: function () { return ISize_js_1.isize; } });
var U8_js_1 = require("./U8.js");

@@ -30,0 +33,0 @@ Object.defineProperty(exports, "u8", { enumerable: true, get: function () { return U8_js_1.u8; } });

@@ -20,2 +20,5 @@ import type { AnyU8a, Inspect, Registry } from '../types/index.js';

inspect(): Inspect;
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
toHuman(): string;

@@ -22,0 +25,0 @@ /**

@@ -58,2 +58,5 @@ var _BitVec_decodedLength, _BitVec_isMsb;

}
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
toHuman() {

@@ -76,3 +79,3 @@ return `0b${[...this.toU8a(true)]

toU8a(isBare) {
const bitVec = super.toU8a();
const bitVec = super.toU8a(isBare);
return isBare

@@ -79,0 +82,0 @@ ? bitVec

@@ -13,3 +13,9 @@ import type { Codec, CodecClass, Registry } from '../types/index.js';

static withKey<O extends Codec>(Type: CodecClass | string): CodecClass<Linkage<O>>;
/**
* @description Returns the next item the Linkage is pointing to
*/
get previous(): Option<T>;
/**
* @description Returns the previous item the Linkage is pointing to
*/
get next(): Option<T>;

@@ -23,3 +29,3 @@ /**

*/
toU8a(): Uint8Array;
toU8a(isBare?: boolean): Uint8Array;
}

@@ -26,0 +32,0 @@ /**

@@ -25,5 +25,11 @@ import { Option } from '../base/Option.js';

}
/**
* @description Returns the next item the Linkage is pointing to
*/
get previous() {
return this.get('previous');
}
/**
* @description Returns the previous item the Linkage is pointing to
*/
get next() {

@@ -41,3 +47,3 @@ return this.get('next');

*/
toU8a() {
toU8a(isBare) {
// As part of a storage query (where these appear), in the case of empty, the values

@@ -47,3 +53,3 @@ // are NOT populated by the node - follow the same logic, leaving it empty

? EMPTY
: super.toU8a();
: super.toU8a(isBare);
}

@@ -50,0 +56,0 @@ }

@@ -69,5 +69,4 @@ import type { HexString } from '@polkadot/util/types';

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
toU8a(_isBare?: boolean): Uint8Array;
}

@@ -102,3 +102,2 @@ import { isU8a, u8aToHex } from '@polkadot/util';

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -105,0 +104,0 @@ toU8a(_isBare) {

@@ -83,5 +83,4 @@ /// <reference types="bn.js" />

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
toU8a(_isBare?: boolean): Uint8Array;
}

@@ -133,3 +133,2 @@ import { BN, bnToBn, bnToHex, bnToU8a, isString, isU8a, u8aToBn } from '@polkadot/util';

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -136,0 +135,0 @@ toU8a(_isBare) {

@@ -66,4 +66,4 @@ import type { HexString } from '@polkadot/util/types';

*/
toU8a(): Uint8Array;
toU8a(_isBare?: boolean): Uint8Array;
}
export {};

@@ -99,6 +99,8 @@ var _Float_bitLength;

*/
toU8a() {
return floatToU8a(this, { bitLength: __classPrivateFieldGet(this, _Float_bitLength, "f") });
toU8a(_isBare) {
return floatToU8a(this, {
bitLength: __classPrivateFieldGet(this, _Float_bitLength, "f")
});
}
}
_Float_bitLength = new WeakMap();

@@ -81,3 +81,2 @@ import type { HexString } from '@polkadot/util/types';

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -84,0 +83,0 @@ toU8a(_isBare?: boolean): Uint8Array;

@@ -123,3 +123,2 @@ import { isAscii, isUndefined, isUtf8, u8aToHex, u8aToString, u8aToU8a } from '@polkadot/util';

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -126,0 +125,0 @@ toU8a(_isBare) {

@@ -82,3 +82,2 @@ /// <reference types="bn.js" />

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -85,0 +84,0 @@ toU8a(_isBare?: boolean): Uint8Array;

@@ -206,3 +206,2 @@ var _CodecSet_allowed, _CodecSet_byteLength;

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/

@@ -209,0 +208,0 @@ toU8a(_isBare) {

@@ -21,3 +21,3 @@ {

"type": "module",
"version": "10.1.4",
"version": "10.2.1",
"main": "./cjs/index.js",

@@ -322,2 +322,7 @@ "module": "./index.js",

},
"./primitive/ISize": {
"types": "./primitive/ISize.d.ts",
"require": "./cjs/primitive/ISize.js",
"default": "./primitive/ISize.js"
},
"./primitive/U128": {

@@ -440,6 +445,6 @@ "types": "./primitive/U128.d.ts",

"dependencies": {
"@polkadot/util": "^11.1.1",
"@polkadot/x-bigint": "^11.1.1",
"@polkadot/util": "^11.1.2",
"@polkadot/x-bigint": "^11.1.2",
"tslib": "^2.5.0"
}
}

@@ -1,1 +0,1 @@

export const packageInfo = { name: '@polkadot/types-codec', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '10.1.4' };
export const packageInfo = { name: '@polkadot/types-codec', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '10.2.1' };

@@ -9,2 +9,3 @@ export { f32, f32 as F32 } from './F32.js';

export { i256, i256 as I256 } from './I256.js';
export { isize, isize as ISize } from './ISize.js';
export { u8, u8 as U8 } from './U8.js';

@@ -11,0 +12,0 @@ export { u16, u16 as U16 } from './U16.js';

@@ -9,2 +9,3 @@ export { f32, f32 as F32 } from './F32.js';

export { i256, i256 as I256 } from './I256.js';
export { isize, isize as ISize } from './ISize.js';
export { u8, u8 as U8 } from './U8.js';

@@ -11,0 +12,0 @@ export { u16, u16 as U16 } from './U16.js';

@@ -93,3 +93,4 @@ import type { HexString } from '@polkadot/util/types';

* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
* @param isBare true when the value has none of the type-specific prefixes (internal use, only available on
* some Codec types, specifically those that add encodings such as length of indexes)
*/

@@ -96,0 +97,0 @@ toU8a(isBare?: BareOpts): Uint8Array;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc