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.9.1 to 10.10.1

4

base/Enum.d.ts
import type { HexString } from '@polkadot/util/types';
import type { AnyJson, Codec, CodecClass, DefinitionSetter, IEnum, Inspect, IU8a, Registry } from '../types/index.js';
export interface EnumCodecClass<T = Codec> {
new (registry: Registry, value?: any, index?: number): T;
}
export type EnumCodecClass<T = Codec> = new (registry: Registry, value?: any, index?: number) => T;
interface Definition {

@@ -7,0 +5,0 @@ def: TypesDef;

@@ -50,3 +50,3 @@ import { identity, isHex, isNumber, isObject, isString, isU8a, objectProperties, stringCamelCase, stringify, stringPascalCase, u8aConcatStrict, u8aToHex, u8aToU8a } from '@polkadot/util';

const values = Object.values(def);
for (let i = 0; i < values.length; i++) {
for (let i = 0, count = values.length; i < count; i++) {
const { Type, index } = values[i];

@@ -53,0 +53,0 @@ if (index === checkIdx) {

import type { AnyTupleValue, Codec, CodecClass, DefinitionSetter, Inspect, ITuple, Registry } from '../types/index.js';
import { AbstractArray } from '../abstract/Array.js';
type TupleType = (CodecClass | string);
type TupleTypes = TupleType[] | {
[index: string]: CodecClass | string;
};
type TupleTypes = TupleType[] | Record<string, CodecClass | string>;
type Definition = [CodecClass[], string[]];

@@ -8,0 +6,0 @@ /**

@@ -53,3 +53,3 @@ "use strict";

const values = Object.values(def);
for (let i = 0; i < values.length; i++) {
for (let i = 0, count = values.length; i < count; i++) {
const { Type, index } = values[i];

@@ -56,0 +56,0 @@ if (index === checkIdx) {

@@ -8,3 +8,3 @@ "use strict";

function decodeBitVecU8a(value) {
if (!value || !value.length) {
if (!value?.length) {
return [0, new Uint8Array()];

@@ -11,0 +11,0 @@ }

@@ -31,3 +31,3 @@ "use strict";

get encodedLength() {
return 1;
return 1 | 0;
}

@@ -34,0 +34,0 @@ /**

@@ -25,3 +25,3 @@ "use strict";

get encodedLength() {
return 1;
return 1 | 0;
}

@@ -28,0 +28,0 @@ /**

@@ -29,3 +29,3 @@ "use strict";

get encodedLength() {
return 0;
return 0 | 0;
}

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

"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.9.1' };
exports.packageInfo = { name: '@polkadot/types-codec', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '10.10.1' };

@@ -5,3 +5,3 @@ import { compactFromU8aLim, compactToU8a, isString, u8aConcatStrict, u8aToU8a } from '@polkadot/util';

function decodeBitVecU8a(value) {
if (!value || !value.length) {
if (!value?.length) {
return [0, new Uint8Array()];

@@ -8,0 +8,0 @@ }

@@ -28,3 +28,3 @@ import { isHex, isU8a, u8aToU8a } from '@polkadot/util';

get encodedLength() {
return 1;
return 1 | 0;
}

@@ -31,0 +31,0 @@ /**

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

get encodedLength() {
return 1;
return 1 | 0;
}

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

@@ -26,3 +26,3 @@ import { isFunction, objectProperties, stringify } from '@polkadot/util';

get encodedLength() {
return 0;
return 0 | 0;
}

@@ -29,0 +29,0 @@ /**

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

*/
getT<T>(key: string): T;
getT<T = Codec>(key: string): T;
/**

@@ -70,0 +70,0 @@ * @description Returns a breakdown of the hex encoding for this Codec

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

"type": "module",
"version": "10.9.1",
"version": "10.10.1",
"main": "./cjs/index.js",

@@ -520,6 +520,6 @@ "module": "./index.js",

"dependencies": {
"@polkadot/util": "^12.3.1",
"@polkadot/x-bigint": "^12.3.1",
"tslib": "^2.5.3"
"@polkadot/util": "^12.5.1",
"@polkadot/x-bigint": "^12.5.1",
"tslib": "^2.6.2"
}
}

@@ -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.9.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.10.1' };
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