From f59cb12ec73521b3d41bc9635f44e76aab647f64 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Sun, 1 Mar 2020 09:12:17 +0100 Subject: [PATCH] Add .range([from, to?], ...args) on storage queries (#1979) * Add .between(from, to) ot storage queries * between -> range * CHANGELOG * checkTypes.manual * Tested as working --- CHANGELOG.md | 2 + package.json | 2 +- packages/api-contract/package.json | 2 +- packages/api-derive/package.json | 6 +- packages/api/package.json | 8 +- packages/api/src/base/Decorate.ts | 22 +++- packages/api/src/checkTypes.manual.ts | 4 + packages/api/src/types/storage.ts | 7 +- packages/jsonrpc/package.json | 2 +- packages/metadata/package.json | 6 +- .../metadata/src/Metadata/util/testUtil.ts | 3 +- packages/rpc-core/package.json | 4 +- packages/rpc-provider/package.json | 6 +- packages/typegen/package.json | 2 +- packages/typegen/src/metadataMd.ts | 3 +- packages/types/package.json | 6 +- packages/types/src/primitive/StorageKey.ts | 12 +- yarn.lock | 117 ++++++++++-------- 18 files changed, 124 insertions(+), 90 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d72ac99b93..e87842660c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # 1.5.0-beta.x +- Add proper support for type generation with an Enum containing an Tuple (Thanks to https://github.com/monitz87) +- Add `.range([from, to]: [Hash, Hash?], ...args: any[]): [Hash, Codec][]` on all storage entries - Allow `BTreeMap` to be initialized with a `Record` object (in addition to `Map`) - Allow for `HashMap` definitions - `Bool` will now correctly return `isEmpty` on false/default values diff --git a/package.json b/package.json index 32a2d4c09a..8f8031a142 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@babel/register": "^7.8.3", "@babel/runtime": "^7.8.4", "@polkadot/dev": "^0.50.15", - "@polkadot/ts": "^0.3.3", + "@polkadot/ts": "^0.3.6", "@polkadot/typegen": "workspace:packages/typegen", "copyfiles": "^2.2.0" } diff --git a/packages/api-contract/package.json b/packages/api-contract/package.json index 2b41fde56d..2c5acc9069 100644 --- a/packages/api-contract/package.json +++ b/packages/api-contract/package.json @@ -30,7 +30,7 @@ "@polkadot/api": "1.5.0-beta.20", "@polkadot/rpc-core": "1.5.0-beta.20", "@polkadot/types": "1.5.0-beta.20", - "@polkadot/util": "^2.5.1", + "@polkadot/util": "^2.6.1", "bn.js": "^5.1.1", "rxjs": "^6.5.4" } diff --git a/packages/api-derive/package.json b/packages/api-derive/package.json index cceb789980..48a6daebb8 100644 --- a/packages/api-derive/package.json +++ b/packages/api-derive/package.json @@ -32,13 +32,13 @@ "@polkadot/rpc-core": "1.5.0-beta.20", "@polkadot/rpc-provider": "1.5.0-beta.20", "@polkadot/types": "1.5.0-beta.20", - "@polkadot/util": "^2.5.1", - "@polkadot/util-crypto": "^2.5.1", + "@polkadot/util": "^2.6.1", + "@polkadot/util-crypto": "^2.6.1", "bn.js": "^5.1.1", "memoizee": "^0.4.14", "rxjs": "^6.5.4" }, "devDependencies": { - "@polkadot/keyring": "^2.5.1" + "@polkadot/keyring": "^2.6.1" } } diff --git a/packages/api/package.json b/packages/api/package.json index 5b55cfa560..b8d31d6403 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -28,18 +28,18 @@ "dependencies": { "@babel/runtime": "^7.8.4", "@polkadot/api-derive": "1.5.0-beta.20", - "@polkadot/keyring": "^2.5.1", + "@polkadot/keyring": "^2.6.1", "@polkadot/metadata": "1.5.0-beta.20", "@polkadot/rpc-core": "1.5.0-beta.20", "@polkadot/rpc-provider": "1.5.0-beta.20", "@polkadot/types": "1.5.0-beta.20", - "@polkadot/util": "^2.5.1", - "@polkadot/util-crypto": "^2.5.1", + "@polkadot/util": "^2.6.1", + "@polkadot/util-crypto": "^2.6.1", "bn.js": "^5.1.1", "eventemitter3": "^4.0.0", "rxjs": "^6.5.4" }, "devDependencies": { - "@polkadot/keyring": "^2.5.1" + "@polkadot/keyring": "^2.6.1" } } diff --git a/packages/api/src/base/Decorate.ts b/packages/api/src/base/Decorate.ts index e78e3396fe..0f2255d83a 100644 --- a/packages/api/src/base/Decorate.ts +++ b/packages/api/src/base/Decorate.ts @@ -4,7 +4,7 @@ import { Constants, Storage } from '@polkadot/metadata/Decorated/types'; import { RpcInterface } from '@polkadot/rpc-core/types'; -import { Call, Hash, RuntimeVersion } from '@polkadot/types/interfaces'; +import { Call, Hash, RuntimeVersion, StorageChangeSet } from '@polkadot/types/interfaces'; import { AnyFunction, CallFunction, Codec, CodecArg as Arg, ITuple, InterfaceTypes, ModulesWithCalls, Registry, RegistryTypes } from '@polkadot/types/types'; import { SubmittableExtrinsic } from '../submittable/types'; import { ApiInterfaceRx, ApiOptions, ApiTypes, DecorateMethod, DecoratedRpc, DecoratedRpcSection, QueryableModuleStorage, QueryableStorage, QueryableStorageEntry, QueryableStorageMulti, QueryableStorageMultiArg, SubmittableExtrinsicFunction, SubmittableExtrinsics, SubmittableModuleExtrinsics } from '../types'; @@ -20,7 +20,7 @@ import { WsProvider } from '@polkadot/rpc-provider'; import { Metadata, Null, Option, Text, TypeRegistry, u64, Vec } from '@polkadot/types'; import Linkage, { LinkageResult } from '@polkadot/types/codec/Linkage'; import { DEFAULT_VERSION as EXTRINSIC_DEFAULT_VERSION } from '@polkadot/types/extrinsic/constants'; -import StorageKey, { StorageEntry } from '@polkadot/types/primitive/StorageKey'; +import StorageKey, { StorageEntry, unwrapStorageType } from '@polkadot/types/primitive/StorageKey'; import { assert, compactStripLength, isNull, isUndefined, u8aConcat, u8aToHex } from '@polkadot/util'; import { createSubmittable } from '../submittable'; @@ -332,12 +332,30 @@ export default abstract class Decorate extends Events args.map((arg: Arg[] | Arg): [StorageEntry, Arg | Arg[]] => [creator, arg]))); } + decorated.range = decorateMethod((range: [Hash, Hash?], arg1?: Arg, arg2?: Arg): Observable<[Hash, Codec][]> => + this.decorateStorageRange(decorated, [arg1, arg2], range)); + decorated.size = decorateMethod((arg1?: Arg, arg2?: Arg): Observable => this._rpcCore.state.getStorageSize(getArgs(arg1, arg2))); return this.decorateFunctionMeta(creator, decorated) as unknown as QueryableStorageEntry; } + private decorateStorageRange (decorated: QueryableStorageEntry, args: [Arg?, Arg?], range: [Hash, Hash?]): Observable<[Hash, Codec][]> { + const outputType = unwrapStorageType(decorated.creator.meta.type); + + return this._rpcCore.state + .queryStorage([decorated.key(...args)], ...range) + .pipe(map((result: StorageChangeSet[]): [Hash, Codec][] => + result + .filter((change): change is StorageChangeSet => !!change.changes.length) + .map(({ block, changes: [[, value]] }): [Hash, Codec] => [ + block, + this.createType(outputType, value.unwrapOrDefault()) + ]) + )); + } + private decorateStorageLinked (creator: StorageEntry, decorateMethod: DecorateMethod): ReturnType> { const result: Map]> | null> = new Map(); let subject: BehaviorSubject; diff --git a/packages/api/src/checkTypes.manual.ts b/packages/api/src/checkTypes.manual.ts index de295af4e8..b96f398426 100644 --- a/packages/api/src/checkTypes.manual.ts +++ b/packages/api/src/checkTypes.manual.ts @@ -72,6 +72,10 @@ async function query (api: ApiPromise, keyring: TestKeyringMap): Promise { // check entries() await api.query.system.account.entries(); // should not take a param await api.query.staking.nominatorSlashInEra.entries(123); // should take a param + + // check range + await api.query.balances.freeBalance.range(['0x1234'], keyring.bob.address); + await api.query.system.events.range(['0x12345', '0x7890']); } async function rpc (api: ApiPromise): Promise { diff --git a/packages/api/src/types/storage.ts b/packages/api/src/types/storage.ts index 54b102fb75..77781c5956 100644 --- a/packages/api/src/types/storage.ts +++ b/packages/api/src/types/storage.ts @@ -26,18 +26,19 @@ export type QueryableStorageEntry = : AugmentedQuery<'promise', GenericStorageEntryFunction> & StorageEntryPromiseOverloads; export interface StorageEntryBase { - at: (hash: Hash | Uint8Array | string, ...args: Parameters) => PromiseOrObs>>; + at: >>(hash: Hash | Uint8Array | string, ...args: Parameters) => PromiseOrObs; creator: StorageEntry; - entries: (arg?: any) => PromiseOrObs>][]>; + entries: >>(arg?: any) => PromiseOrObs; hash: (...args: Parameters) => PromiseOrObs; key: (...args: Parameters) => string; keyPrefix: () => string; + range: >>([from, to]: [Hash | Uint8Array | string, Hash | Uint8Array | string | undefined] | [Hash | Uint8Array | string], ...args: Parameters) => PromiseOrObs; size: (...args: Parameters) => PromiseOrObs; multi: ApiType extends 'rxjs' ? StorageEntryObservableMulti : StorageEntryPromiseMulti; } export interface StorageEntryDoubleMap extends StorageEntryBase { - entries: (arg?: Parameters[0]) => PromiseOrObs>][]>; + entries: >>(arg?: Parameters[0]) => PromiseOrObs; } interface StorageEntryObservableMulti { diff --git a/packages/jsonrpc/package.json b/packages/jsonrpc/package.json index f8fd72947c..9c2749235e 100644 --- a/packages/jsonrpc/package.json +++ b/packages/jsonrpc/package.json @@ -28,6 +28,6 @@ "dependencies": { "@babel/runtime": "^7.8.4", "@polkadot/types": "1.5.0-beta.20", - "@polkadot/util": "^2.5.1" + "@polkadot/util": "^2.6.1" } } diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 580f190696..4707046493 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -28,11 +28,11 @@ "dependencies": { "@babel/runtime": "^7.8.4", "@polkadot/types": "1.5.0-beta.20", - "@polkadot/util": "^2.5.1", - "@polkadot/util-crypto": "^2.5.1", + "@polkadot/util": "^2.6.1", + "@polkadot/util-crypto": "^2.6.1", "bn.js": "^5.1.1" }, "devDependencies": { - "@polkadot/keyring": "^2.5.1" + "@polkadot/keyring": "^2.6.1" } } diff --git a/packages/metadata/src/Metadata/util/testUtil.ts b/packages/metadata/src/Metadata/util/testUtil.ts index 0f6f302c2d..c3f7da6fa4 100644 --- a/packages/metadata/src/Metadata/util/testUtil.ts +++ b/packages/metadata/src/Metadata/util/testUtil.ts @@ -5,7 +5,6 @@ import { Codec, Registry } from '@polkadot/types/types'; import { MetadataInterface } from '../types'; -import { createTypeUnsafe } from '@polkadot/types/create'; import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey'; import getUniqTypes from './getUniqTypes'; @@ -55,7 +54,7 @@ export function defaultValues (registry: Registry, rpcData: string, withThrow = it(`creates default types for ${location}`, (): void => { expect((): void => { try { - createTypeUnsafe(registry, inner, [fallback]); + registry.createType(inner, fallback); } catch (error) { const message = `${location}:: ${error.message}`; diff --git a/packages/rpc-core/package.json b/packages/rpc-core/package.json index 3a009ed628..0849e03a6c 100644 --- a/packages/rpc-core/package.json +++ b/packages/rpc-core/package.json @@ -31,11 +31,11 @@ "@polkadot/metadata": "1.5.0-beta.20", "@polkadot/rpc-provider": "1.5.0-beta.20", "@polkadot/types": "1.5.0-beta.20", - "@polkadot/util": "^2.5.1", + "@polkadot/util": "^2.6.1", "memoizee": "^0.4.14", "rxjs": "^6.5.4" }, "devDependencies": { - "@polkadot/keyring": "^2.5.1" + "@polkadot/keyring": "^2.6.1" } } diff --git a/packages/rpc-provider/package.json b/packages/rpc-provider/package.json index 228bcbc46b..b756c048ec 100644 --- a/packages/rpc-provider/package.json +++ b/packages/rpc-provider/package.json @@ -30,15 +30,15 @@ "@polkadot/jsonrpc": "1.5.0-beta.20", "@polkadot/metadata": "1.5.0-beta.20", "@polkadot/types": "1.5.0-beta.20", - "@polkadot/util": "^2.5.1", - "@polkadot/util-crypto": "^2.5.1", + "@polkadot/util": "^2.6.1", + "@polkadot/util-crypto": "^2.6.1", "bn.js": "^5.1.1", "eventemitter3": "^4.0.0", "isomorphic-fetch": "^2.2.1", "websocket": "^1.0.31" }, "devDependencies": { - "@polkadot/keyring": "^2.5.1", + "@polkadot/keyring": "^2.6.1", "mock-socket": "^9.0.3", "nock": "^12.0.1" } diff --git a/packages/typegen/package.json b/packages/typegen/package.json index 1a3b3c49a3..3cbb833fdf 100644 --- a/packages/typegen/package.json +++ b/packages/typegen/package.json @@ -41,7 +41,7 @@ "@polkadot/metadata": "1.5.0-beta.20", "@polkadot/rpc-provider": "1.5.0-beta.20", "@polkadot/types": "1.5.0-beta.20", - "@polkadot/util": "^2.5.1", + "@polkadot/util": "^2.6.1", "websocket": "^1.0.31", "yargs": "^15.1.0" }, diff --git a/packages/typegen/src/metadataMd.ts b/packages/typegen/src/metadataMd.ts index 4bbc201115..be73f6c0b2 100644 --- a/packages/typegen/src/metadataMd.ts +++ b/packages/typegen/src/metadataMd.ts @@ -3,6 +3,7 @@ // of the Apache-2.0 license. See the LICENSE file for details. import { MetadataLatest } from '@polkadot/types/interfaces/metadata'; +import { InterfaceTypes } from '@polkadot/types/types'; import fs from 'fs'; import interfaces from '@polkadot/jsonrpc'; @@ -176,7 +177,7 @@ function addStorage (metadata: MetadataLatest): string { let result = unwrapStorageType(func.type); if (func.modifier.isOptional) { - result = `Option<${result}>`; + result = `Option<${result}>` as keyof InterfaceTypes; } return { diff --git a/packages/types/package.json b/packages/types/package.json index 7e9d35fded..1c6be55896 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -28,15 +28,15 @@ "dependencies": { "@babel/runtime": "^7.8.4", "@polkadot/metadata": "1.5.0-beta.20", - "@polkadot/util": "^2.5.1", - "@polkadot/util-crypto": "^2.5.1", + "@polkadot/util": "^2.6.1", + "@polkadot/util-crypto": "^2.6.1", "@types/bn.js": "^4.11.6", "bn.js": "^5.1.1", "memoizee": "^0.4.14", "rxjs": "^6.5.4" }, "devDependencies": { - "@polkadot/keyring": "^2.5.1", + "@polkadot/keyring": "^2.6.1", "@types/memoizee": "^0.4.3" } } diff --git a/packages/types/src/primitive/StorageKey.ts b/packages/types/src/primitive/StorageKey.ts index 67fd9005e9..cc3002221b 100644 --- a/packages/types/src/primitive/StorageKey.ts +++ b/packages/types/src/primitive/StorageKey.ts @@ -3,7 +3,7 @@ // of the Apache-2.0 license. See the LICENSE file for details. import { StorageEntryMetadataLatest, StorageEntryTypeLatest } from '../interfaces/metadata'; -import { AnyU8a, Codec, Registry } from '../types'; +import { AnyU8a, Codec, InterfaceTypes, Registry } from '../types'; import { assert, isFunction, isString, isU8a } from '@polkadot/util'; @@ -33,20 +33,20 @@ interface StorageKeyExtra { // we unwrap the type here, turning into an output usable for createType /** @internal */ -export function unwrapStorageType (type: StorageEntryTypeLatest): string { +export function unwrapStorageType (type: StorageEntryTypeLatest): keyof InterfaceTypes { if (type.isPlain) { - return type.asPlain.toString(); + return type.asPlain.toString() as keyof InterfaceTypes; } else if (type.isDoubleMap) { - return type.asDoubleMap.value.toString(); + return type.asDoubleMap.value.toString() as keyof InterfaceTypes; } const map = type.asMap; if (map.linked.isTrue) { - return `(${map.value.toString()}, Linkage<${map.key.toString()}>)`; + return `(${map.value.toString()}, Linkage<${map.key.toString()}>)` as keyof InterfaceTypes; } - return map.value.toString(); + return map.value.toString() as keyof InterfaceTypes; } /** diff --git a/yarn.lock b/yarn.lock index 7f898bb4c0..a5d2d23f6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2759,7 +2759,7 @@ __metadata: "@polkadot/api": 1.5.0-beta.20 "@polkadot/rpc-core": 1.5.0-beta.20 "@polkadot/types": 1.5.0-beta.20 - "@polkadot/util": ^2.5.1 + "@polkadot/util": ^2.6.1 bn.js: ^5.1.1 rxjs: ^6.5.4 languageName: unknown @@ -2771,12 +2771,12 @@ __metadata: dependencies: "@babel/runtime": ^7.8.4 "@polkadot/api": 1.5.0-beta.20 - "@polkadot/keyring": ^2.5.1 + "@polkadot/keyring": ^2.6.1 "@polkadot/rpc-core": 1.5.0-beta.20 "@polkadot/rpc-provider": 1.5.0-beta.20 "@polkadot/types": 1.5.0-beta.20 - "@polkadot/util": ^2.5.1 - "@polkadot/util-crypto": ^2.5.1 + "@polkadot/util": ^2.6.1 + "@polkadot/util-crypto": ^2.6.1 bn.js: ^5.1.1 memoizee: ^0.4.14 rxjs: ^6.5.4 @@ -2789,13 +2789,13 @@ __metadata: dependencies: "@babel/runtime": ^7.8.4 "@polkadot/api-derive": 1.5.0-beta.20 - "@polkadot/keyring": ^2.5.1 + "@polkadot/keyring": ^2.6.1 "@polkadot/metadata": 1.5.0-beta.20 "@polkadot/rpc-core": 1.5.0-beta.20 "@polkadot/rpc-provider": 1.5.0-beta.20 "@polkadot/types": 1.5.0-beta.20 - "@polkadot/util": ^2.5.1 - "@polkadot/util-crypto": ^2.5.1 + "@polkadot/util": ^2.6.1 + "@polkadot/util-crypto": ^2.6.1 bn.js: ^5.1.1 eventemitter3: ^4.0.0 rxjs: ^6.5.4 @@ -2896,18 +2896,18 @@ __metadata: dependencies: "@babel/runtime": ^7.8.4 "@polkadot/types": 1.5.0-beta.20 - "@polkadot/util": ^2.5.1 + "@polkadot/util": ^2.6.1 languageName: unknown linkType: soft -"@polkadot/keyring@npm:^2.5.1": - version: 2.5.1 - resolution: "@polkadot/keyring@npm:2.5.1" +"@polkadot/keyring@npm:^2.6.1": + version: 2.6.1 + resolution: "@polkadot/keyring@npm:2.6.1" dependencies: "@babel/runtime": ^7.8.4 - "@polkadot/util": 2.5.1 - "@polkadot/util-crypto": 2.5.1 - checksum: 2/135aa8b4110912e98be0807da419e4fada8bb05e7ad7b76b051d561e88653afb5867ef06ab0870c49eda4fa178e43050e0227d3f3ec373c7d83e9c5d849c8bf4 + "@polkadot/util": 2.6.1 + "@polkadot/util-crypto": 2.6.1 + checksum: 2/79b3d8f8842c153ff5cf39206ecabb4b5c61c6d5fc118da4c26e8a83ecb90fcc307c77c9d272248ede24890141d1235ff3a4ce94b2a18f3f780f59848ca2f115 languageName: node linkType: hard @@ -2916,10 +2916,10 @@ __metadata: resolution: "@polkadot/metadata@workspace:packages/metadata" dependencies: "@babel/runtime": ^7.8.4 - "@polkadot/keyring": ^2.5.1 + "@polkadot/keyring": ^2.6.1 "@polkadot/types": 1.5.0-beta.20 - "@polkadot/util": ^2.5.1 - "@polkadot/util-crypto": ^2.5.1 + "@polkadot/util": ^2.6.1 + "@polkadot/util-crypto": ^2.6.1 bn.js: ^5.1.1 languageName: unknown linkType: soft @@ -2930,11 +2930,11 @@ __metadata: dependencies: "@babel/runtime": ^7.8.4 "@polkadot/jsonrpc": 1.5.0-beta.20 - "@polkadot/keyring": ^2.5.1 + "@polkadot/keyring": ^2.6.1 "@polkadot/metadata": 1.5.0-beta.20 "@polkadot/rpc-provider": 1.5.0-beta.20 "@polkadot/types": 1.5.0-beta.20 - "@polkadot/util": ^2.5.1 + "@polkadot/util": ^2.6.1 memoizee: ^0.4.14 rxjs: ^6.5.4 languageName: unknown @@ -2946,11 +2946,11 @@ __metadata: dependencies: "@babel/runtime": ^7.8.4 "@polkadot/jsonrpc": 1.5.0-beta.20 - "@polkadot/keyring": ^2.5.1 + "@polkadot/keyring": ^2.6.1 "@polkadot/metadata": 1.5.0-beta.20 "@polkadot/types": 1.5.0-beta.20 - "@polkadot/util": ^2.5.1 - "@polkadot/util-crypto": ^2.5.1 + "@polkadot/util": ^2.6.1 + "@polkadot/util-crypto": ^2.6.1 bn.js: ^5.1.1 eventemitter3: ^4.0.0 isomorphic-fetch: ^2.2.1 @@ -2960,12 +2960,12 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/ts@npm:^0.3.3": - version: 0.3.3 - resolution: "@polkadot/ts@npm:0.3.3" +"@polkadot/ts@npm:^0.3.6": + version: 0.3.6 + resolution: "@polkadot/ts@npm:0.3.6" dependencies: - "@types/chrome": ^0.0.97 - checksum: 2/713693135413bcb68478afbcf9832c5d62c0967dc7586999686c1d8c7f430365f60fcbe24b42539d84df1ac82ed2da2b184efd1827f5c71d2a151643fdf5f7c4 + "@types/chrome": ^0.0.98 + checksum: 2/ca84455c3372d3f6ccb4762dee49cc8e6947b2a18f5b2a676aa10b710cab4dafcd32894c0f8d0851eff394b76169eda72c5f44c16ad5bbd2885db1eca525546b languageName: node linkType: hard @@ -2981,7 +2981,7 @@ __metadata: "@polkadot/metadata": 1.5.0-beta.20 "@polkadot/rpc-provider": 1.5.0-beta.20 "@polkadot/types": 1.5.0-beta.20 - "@polkadot/util": ^2.5.1 + "@polkadot/util": ^2.6.1 "@types/websocket": ^1.0.0 "@types/yargs": ^15.0.3 websocket: ^1.0.31 @@ -3000,10 +3000,10 @@ __metadata: resolution: "@polkadot/types@workspace:packages/types" dependencies: "@babel/runtime": ^7.8.4 - "@polkadot/keyring": ^2.5.1 + "@polkadot/keyring": ^2.6.1 "@polkadot/metadata": 1.5.0-beta.20 - "@polkadot/util": ^2.5.1 - "@polkadot/util-crypto": ^2.5.1 + "@polkadot/util": ^2.6.1 + "@polkadot/util-crypto": ^2.6.1 "@types/bn.js": ^4.11.6 "@types/memoizee": ^0.4.3 bn.js: ^5.1.1 @@ -3012,30 +3012,30 @@ __metadata: languageName: unknown linkType: soft -"@polkadot/util-crypto@npm:2.5.1, @polkadot/util-crypto@npm:^2.5.1": - version: 2.5.1 - resolution: "@polkadot/util-crypto@npm:2.5.1" +"@polkadot/util-crypto@npm:2.6.1, @polkadot/util-crypto@npm:^2.6.1": + version: 2.6.1 + resolution: "@polkadot/util-crypto@npm:2.6.1" dependencies: "@babel/runtime": ^7.8.4 - "@polkadot/util": 2.5.1 - "@polkadot/wasm-crypto": ^1.0.1 - base-x: ^3.0.7 + "@polkadot/util": 2.6.1 + "@polkadot/wasm-crypto": ^1.2.1 + base-x: ^3.0.8 bip39: ^3.0.2 blakejs: ^1.1.0 bn.js: ^5.1.1 bs58: ^4.0.1 elliptic: ^6.5.2 js-sha3: ^0.8.0 - pbkdf2: ^3.0.9 + pbkdf2: ^3.0.17 tweetnacl: ^1.0.3 xxhashjs: ^0.2.2 - checksum: 2/8f39fe9bea4da5aff52d23b1ce99c9e18f03787cfa7e764a31b8768c22534d843bc233ea4086cb22df4f2643bfd17c22d451b3b0f609f9331a8c2af65c7e03af + checksum: 2/fc7030b34a574736f862e91932b8bfe46af61766b1495e132911a0dcda95905975a94474882d201123e07ca93d4d5c7fdd8017f0e5f4c1d9cdab606b8f8c014b languageName: node linkType: hard -"@polkadot/util@npm:2.5.1, @polkadot/util@npm:^2.5.1": - version: 2.5.1 - resolution: "@polkadot/util@npm:2.5.1" +"@polkadot/util@npm:2.6.1, @polkadot/util@npm:^2.6.1": + version: 2.6.1 + resolution: "@polkadot/util@npm:2.6.1" dependencies: "@babel/runtime": ^7.8.4 "@types/bn.js": ^4.11.6 @@ -3043,16 +3043,16 @@ __metadata: camelcase: ^5.3.1 chalk: ^3.0.0 ip-regex: ^4.1.0 - checksum: 2/986940cf97c1c11cd5bad44492bd15aab40bbafc4f003ed1d1559982f1b9926ffd327202bfde5a438f955329e7230102a4349d4e189cd72fcad28a243976d21c + checksum: 2/92f412fee89b8c400e6f1ecab934304715b1e4b20bfb3d28964225e570c17a95383fde594f10f87780ab11c3826839d94f95ef6e2afa2fc91d4416ec98d53289 languageName: node linkType: hard -"@polkadot/wasm-crypto@npm:^1.0.1": - version: 1.0.1 - resolution: "@polkadot/wasm-crypto@npm:1.0.1" +"@polkadot/wasm-crypto@npm:^1.2.1": + version: 1.2.1 + resolution: "@polkadot/wasm-crypto@npm:1.2.1" peerDependencies: "@polkadot/util": "*" - checksum: 2/4c2647c4c0cdad2e2f58e6c5cec387d56ff85b0f687c11fe5125561c71c51eddb92bd6719f00f00f6cf183fe5a89276a903bcebe176635770b18afa712ffaa7d + checksum: 2/d4f8cbe2f44f2590d0ec56922525e5906315247bbd15b0613e6b774e09f11f2d0cd4d2b7b332fbae23a0224dff23d8b95d19f1bfac45d79363366401e0fc82a2 languageName: node linkType: hard @@ -3131,12 +3131,12 @@ __metadata: languageName: node linkType: hard -"@types/chrome@npm:^0.0.97": - version: 0.0.97 - resolution: "@types/chrome@npm:0.0.97" +"@types/chrome@npm:^0.0.98": + version: 0.0.98 + resolution: "@types/chrome@npm:0.0.98" dependencies: "@types/filesystem": "*" - checksum: 2/b377dba0f6f59dfe7a2e4b6203499a00ff50c0d6c87e741f5bae077a7c0c2bd4cd7de560001272d94cdf9d69d82cc546eba9656407a07d306af7db2e1ea373f1 + checksum: 2/28547e07f2aae234c2891d057145f756d92d1d63fb27cc7640e937b847992544a458d10ba9709c40c79c7bdb3030b14b75b345569db810f3517022042bebfe6a languageName: node linkType: hard @@ -4655,7 +4655,7 @@ __metadata: languageName: node linkType: hard -"base-x@npm:^3.0.2, base-x@npm:^3.0.7": +"base-x@npm:^3.0.2": version: 3.0.7 resolution: "base-x@npm:3.0.7" dependencies: @@ -4664,6 +4664,15 @@ __metadata: languageName: node linkType: hard +"base-x@npm:^3.0.8": + version: 3.0.8 + resolution: "base-x@npm:3.0.8" + dependencies: + safe-buffer: ^5.0.1 + checksum: 2/9e5832ab00f4413d63f8227901c18b2a9db5f379525f70b627e6e284007dc5e7940a765ef4ab03974b4c14a664153208758656ebb86979451d1995d13e3fa29b + languageName: node + linkType: hard + "base64-js@npm:^1.0.2": version: 1.3.1 resolution: "base64-js@npm:1.3.1" @@ -13784,7 +13793,7 @@ fsevents@^2.1.2: languageName: node linkType: hard -"pbkdf2@npm:^3.0.3, pbkdf2@npm:^3.0.9": +"pbkdf2@npm:^3.0.17, pbkdf2@npm:^3.0.3, pbkdf2@npm:^3.0.9": version: 3.0.17 resolution: "pbkdf2@npm:3.0.17" dependencies: @@ -15516,7 +15525,7 @@ resolve@1.1.7: "@babel/register": ^7.8.3 "@babel/runtime": ^7.8.4 "@polkadot/dev": ^0.50.15 - "@polkadot/ts": ^0.3.3 + "@polkadot/ts": ^0.3.6 "@polkadot/typegen": "workspace:packages/typegen" copyfiles: ^2.2.0 languageName: unknown