New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@polkadot/types

Package Overview
Dependencies
Maintainers
1
Versions
3046
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polkadot/types - npm Package Compare versions

Comparing version 0.31.37 to 0.31.38

2

Extrinsic.spec.js

@@ -26,4 +26,2 @@ // Copyright 2017-2018 @polkadot/types authors & contributors

console.error('signature', extrinsic.args);
expect(extrinsic.isSigned).toEqual(true);

@@ -30,0 +28,0 @@ expect(extrinsic.signature.signer.toU8a()).toEqual(new Uint8Array([0x10]));

5

ExtrinsicEra.d.ts
import { AnyU8a } from './types';
import U8aFixed from './codec/U8aFixed';
export default class ExtrinsicEra extends U8aFixed {
import U8a from './codec/U8a';
export default class ExtrinsicEra extends U8a {
constructor(value?: AnyU8a);
static decodeExtrinsicEra(value?: AnyU8a): Uint8Array;
fromU8a(input: Uint8Array): ExtrinsicEra;
}

@@ -14,11 +14,8 @@ "use strict";

var _U8aFixed = _interopRequireDefault(require("./codec/U8aFixed"));
// Copyright 2017-2018 @polkadot/types authors & contributors
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
class ExtrinsicEra extends _U8aFixed.default {
class ExtrinsicEra extends _U8a.default {
constructor(value) {
const decoded = ExtrinsicEra.decodeExtrinsicEra(value);
super(decoded, decoded.length * 8);
super(ExtrinsicEra.decodeExtrinsicEra(value));
}

@@ -39,4 +36,9 @@

fromU8a(input) {
super.fromU8a(ExtrinsicEra.decodeExtrinsicEra(input));
return this;
}
}
exports.default = ExtrinsicEra;

@@ -10,9 +10,8 @@ // Copyright 2017-2018 @polkadot/types authors & contributors

import U8a from './codec/U8a';
import U8aFixed from './codec/U8aFixed';
export default class ExtrinsicEra extends U8aFixed {
export default class ExtrinsicEra extends U8a {
constructor (value?: AnyU8a) {
const decoded = ExtrinsicEra.decodeExtrinsicEra(value);
super(decoded, (decoded.length * 8) as any);
super(
ExtrinsicEra.decodeExtrinsicEra(value)
);
}

@@ -33,2 +32,8 @@

}
fromU8a (input: Uint8Array): ExtrinsicEra {
super.fromU8a(ExtrinsicEra.decodeExtrinsicEra(input));
return this;
}
}

@@ -26,2 +26,3 @@ import { KeyringPair } from '@polkadot/keyring/types';

addSignature(method: Method, signerPair: KeyringPair, nonce: AnyNumber, blockHash: AnyU8a, era?: Uint8Array): ExtrinsicSignature;
fromJSON(input: any): ExtrinsicSignature;
fromU8a(input: Uint8Array): ExtrinsicSignature;

@@ -28,0 +29,0 @@ toU8a(isBare?: boolean): Uint8Array;

@@ -14,2 +14,4 @@ "use strict";

var _toU8a = _interopRequireDefault(require("@polkadot/util/u8a/toU8a"));
var _Struct = _interopRequireDefault(require("./codec/Struct"));

@@ -117,2 +119,6 @@

fromJSON(input) {
return this.fromU8a((0, _toU8a.default)(input));
}
fromU8a(input) {

@@ -119,0 +125,0 @@ const version = input[0];

@@ -10,2 +10,3 @@ // Copyright 2017-2018 @polkadot/types authors & contributors

import u8aConcat from '@polkadot/util/u8a/concat';
import u8aToU8a from '@polkadot/util/u8a/toU8a';

@@ -125,2 +126,6 @@ import Struct from './codec/Struct';

fromJSON (input: any) {
return this.fromU8a(u8aToU8a(input));
}
fromU8a (input: Uint8Array): ExtrinsicSignature {

@@ -127,0 +132,0 @@ const version = input[0];

{
"name": "@polkadot/types",
"version": "0.31.37",
"version": "0.31.38",
"description": "Implementation of the Parity codec",

@@ -5,0 +5,0 @@ "main": "index.js",

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

{"jsonrpc":"2.0","result":{"block":{"extrinsics":["0x010200dd2bb75b00000000"],"header":{"digest":{"logs":[]},"extrinsicsRoot":"0x06811f569c9b822d10c659695ec4b1f6391472b3a65ecc78131485bc3fafe780","number":2769,"parentHash":"0x89c31b0f09782a2c27c0be0c7e2f096b13ce6541a5d14cc43a9553e50a89314a","stateRoot":"0x6e4e88dc766d13c8975e7806e30cc1627e9553a2ebe59ab123f985d1c925c5ff"}},"justification":{"hash":"0x7ac267bb86a5b674582fba9e84d3e3e9988621124c3e33358f7771224d176795","round_number":0,"signatures":[["0xd172a74cda4c865912c32ba0a80a57ae69abae410e5ccb59dee84e2f4432db4f","0xf9aa2cd44ee75a40ec230b589f847e1cf1a921f4a85e9825f9cd3892d29eeda628c7bc44b9f55ec305c1ae745d6b96e163338bbd9ae262c60626a50405868701"]]}},"id":16}
{"jsonrpc":"2.0","result":{"block":{"extrinsics":["0x0102004629c35b00000000","0x8110f8e1ebdd3cdef7423d24fe68f3863945ea21c190907d7f3394ddf153f633c77b894af36f7a36e7ec767f4593bfd8d084b66d805605905054327a08ff604187080100000000000000270e0100ff0e6422725af0e9aede3bef6eba77bc87afadf60b9735057ae93801f4c472ad7b00407a10f35a00000000000000000000"],"header":{"digest":{"logs":[]},"extrinsicsRoot":"0x79e749f5b04d6fde65503874daf1ca2a95509dfada574565fb81c11af236397c","number":206053,"parentHash":"0x6799fcd718579b07900bde8e14e2a1bde1c386f4539ef9cbb4407eebf5cb4857","stateRoot":"0xbfe02f7c26e5dad1226eccb1f4ef5306312602f7e1edbb9be50e8b87d9c7840b"}},"justification":{"hash":"0xfab4bb3a8b0a072d3d09858dc865ad2750b2e708536b6dacc89fad369eba781a","round_number":0,"signatures":[["0x8101764f45778d4980dadaceee6e8af2517d3ab91ac9bec9cd1714fa5994081c","0x84e343ddfd126d7c7a5c8feeac33dae947a08e4bee7b94080448fd31ae00f3a5e1a3e916926535976671ee61c430c215dbda1a781a7692a6ffc8f955b9d2d603"],["0x82c39b31a2b79a90f8e66e7a77fdb85a4ed5517f2ae39f6a80565e8ecae85cf5","0x67089e8cbf4fec1c362de972c1430c468f572ceba0a26ca1ed4782155efc3ae2156cef02fb57f0012fe7766d932d2ccde9fd8d48bb4c869d7461079b66c1f002"],["0x063d7787ebca768b7445dfebe7d62cbb1625ff4dba288ea34488da266dd6dca5","0x9822441c8196fe9737e8d1aa49f4c0da046c15eba695fa89f98e2736fcc747e5ae88720fb554cc509d1e405e04194fda10a956eb85c76bde057ba01ffeef8507"],["0x4de37a07567ebcbf8c64568428a835269a566723687058e017b6d69db00a77e7","0x1753981ad2dd67d18ca7026b2b2e8c3e0071da561eda8e3532a5b4a713415248f1df6ef32b32136ba2cb75cd4b4165aa9e1abe259b533046fb199e41b67f9406"]]}},"id":8}

@@ -14,3 +14,3 @@ // Copyright 2017-2018 @polkadot/types authors & contributors

block.block.header.stateRoot.toString()
).toEqual('0x6e4e88dc766d13c8975e7806e30cc1627e9553a2ebe59ab123f985d1c925c5ff');
).toEqual('0xbfe02f7c26e5dad1226eccb1f4ef5306312602f7e1edbb9be50e8b87d9c7840b');
});

@@ -21,4 +21,20 @@

block.justification.hash.toHex()
).toEqual('0x7ac267bb86a5b674582fba9e84d3e3e9988621124c3e33358f7771224d176795');
).toEqual('0xfab4bb3a8b0a072d3d09858dc865ad2750b2e708536b6dacc89fad369eba781a');
});
describe('extrinsics', () => {
const extrinsics = block.block.extrinsics;
it('has the correct callIndex for the first', () => {
const x = extrinsics.get(0);
expect(x.callIndex).toEqual(new Uint8Array([2, 0]));
});
it('has the correct callIndex for the second', () => {
const x = extrinsics.get(1);
expect(x.callIndex).toEqual(new Uint8Array([1, 0]));
});
});
});
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