Compare commits

..
16 Commits
Author SHA1 Message Date
github-actions[bot] b2c8e748c3 [CI Skip] release/stable 10.1.4
skip-checks: true
2023-03-19 08:20:05 +00:00
Jaco be9feced65 10.1.4 (#5550) 2023-03-19 10:09:54 +02:00
github-actions[bot] f73ed3ef36 [CI Skip] bump/beta 10.1.4-6-x
skip-checks: true
2023-03-18 10:08:36 +00:00
Jaco cf1fabaecf Bump deps (& remove unused overrides) (#5549) 2023-03-18 11:59:42 +02:00
github-actions[bot] ac8446b30c [CI Skip] bump/beta 10.1.4-5-x
skip-checks: true
2023-03-17 06:11:26 +00:00
Jaco abb802bc92 Bump to TS 5.0 (#5548) 2023-03-17 08:00:08 +02:00
github-actions[bot] 9cc2cd8240 [CI Skip] bump/beta 10.1.4-4-x
skip-checks: true
2023-03-16 19:40:55 +00:00
Jaco efbbde74fc Bump dev deps (#5547)
* Bump dev deps

* Bump dev
2023-03-16 21:31:57 +02:00
github-actions[bot] ba5a02b5f5 [CI Skip] bump/beta 10.1.4-3-x
skip-checks: true
2023-03-16 06:47:23 +00:00
Jaco e035ba20ac Adjust CHANGELOG (#5546)
* Adjust CHANGELOG

* typo
2023-03-16 08:38:01 +02:00
github-actions[bot] 116b6ee1b5 [CI Skip] bump/beta 10.1.4-2-x
skip-checks: true
2023-03-16 05:28:33 +00:00
Jaco 8d1736c047 Cater for runtime Metadata_* v2 (#5545)
* Cater for runtime Metadata_* v2

* Swap order, latest first (as elsewhere)
2023-03-16 07:19:32 +02:00
github-actions[bot] 4408f3a3ac [CI Skip] bump/beta 10.1.4-1-x
skip-checks: true
2023-03-15 15:23:51 +00:00
Jaco 058edbe9c5 Bump dev (#5544)
* Bump dev

* Change ref types

* Fix build
2023-03-15 17:14:35 +02:00
github-actions[bot] 0c5211c1a6 [CI Skip] bump/beta 10.1.4-0-x
skip-checks: true
2023-03-15 12:00:44 +00:00
Jaco 7a5ef6249e Bump dev (#5542) 2023-03-15 13:51:48 +02:00
211 changed files with 684 additions and 663 deletions
+8
View File
@@ -1,10 +1,18 @@
# CHANGELOG # CHANGELOG
## 10.1.4 Mar 19, 2023
Changes:
- Add methods for v2 `Metadata_*` runtime calls
## 10.1.3 Mar 15, 2023 ## 10.1.3 Mar 15, 2023
Changes: Changes:
- Remove incorrect `.module.` specifiers in typegen code - Remove incorrect `.module.` specifiers in typegen code
- Mark unsafe RPC methods (and include in `rpc.md` generation)
## 10.1.2 Mar 11, 2023 ## 10.1.2 Mar 11, 2023
+1 -1
View File
@@ -1,4 +1,4 @@
3401 Jaco 10.1.3: Remove wrong .module specifier in typegen (#5541) 3409 Jaco 10.1.4 (#5550)
83 Amaury Martiny StatementKind: Regular and Saft (#2303) 83 Amaury Martiny StatementKind: Regular and Saft (#2303)
37 Keith Ingram Update contract types and rpc (#4541) 37 Keith Ingram Update contract types and rpc (#4541)
35 Stefanie Doll Updated child storage parameters (#1709) 35 Stefanie Doll Updated child storage parameters (#1709)
+6 -6
View File
@@ -14,10 +14,10 @@
}, },
"sideEffects": false, "sideEffects": false,
"type": "module", "type": "module",
"version": "10.1.3", "version": "10.1.4",
"versions": { "versions": {
"git": "10.1.3", "git": "10.1.4",
"npm": "10.1.3" "npm": "10.1.4"
}, },
"workspaces": [ "workspaces": [
"packages/*" "packages/*"
@@ -25,7 +25,7 @@
"scripts": { "scripts": {
"build": "yarn build:interfaces && polkadot-dev-build-ts", "build": "yarn build:interfaces && polkadot-dev-build-ts",
"build:before": "(cd packages/typegen && polkadot-dev-copy-dir scripts build/scripts)", "build:before": "(cd packages/typegen && polkadot-dev-copy-dir scripts build/scripts)",
"build:interfaces": "node --loader @polkadot/dev/node/ts packages/typegen/scripts/polkadot-types-internal-interfaces.mjs", "build:interfaces": "node --loader @polkadot/dev-ts packages/typegen/scripts/polkadot-types-internal-interfaces.mjs",
"build:metadata": "yarn build:interfaces && polkadot-dev-run-test packages/types/src/metadata/v14", "build:metadata": "yarn build:interfaces && polkadot-dev-run-test packages/types/src/metadata/v14",
"build:release": "polkadot-ci-ghact-build", "build:release": "polkadot-ci-ghact-build",
"build:rollup": "polkadot-exec-rollup --config", "build:rollup": "polkadot-exec-rollup --config",
@@ -40,11 +40,11 @@
"test:one": "polkadot-dev-run-test --env node" "test:one": "polkadot-dev-run-test --env node"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/dev": "^0.71.10", "@polkadot/dev": "^0.72.15",
"@polkadot/typegen": "workspace:packages/typegen", "@polkadot/typegen": "workspace:packages/typegen",
"@types/node": "^18.15.3" "@types/node": "^18.15.3"
}, },
"resolutions": { "resolutions": {
"typescript": "^4.9.5" "typescript": "^5.0.2"
} }
} }
+7 -7
View File
@@ -18,15 +18,15 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.1.3", "version": "10.1.4",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/api-base": "10.1.3", "@polkadot/api-base": "10.1.4",
"@polkadot/rpc-augment": "10.1.3", "@polkadot/rpc-augment": "10.1.4",
"@polkadot/types": "10.1.3", "@polkadot/types": "10.1.4",
"@polkadot/types-augment": "10.1.3", "@polkadot/types-augment": "10.1.4",
"@polkadot/types-codec": "10.1.3", "@polkadot/types-codec": "10.1.4",
"@polkadot/util": "^11.0.2", "@polkadot/util": "^11.1.1",
"tslib": "^2.5.0" "tslib": "^2.5.0"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '10.1.3' }; export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '10.1.4' };
+4 -4
View File
@@ -18,12 +18,12 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.1.3", "version": "10.1.4",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/rpc-core": "10.1.3", "@polkadot/rpc-core": "10.1.4",
"@polkadot/types": "10.1.3", "@polkadot/types": "10.1.4",
"@polkadot/util": "^11.0.2", "@polkadot/util": "^11.1.1",
"rxjs": "^7.8.0", "rxjs": "^7.8.0",
"tslib": "^2.5.0" "tslib": "^2.5.0"
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '10.1.3' }; export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '10.1.4' };
+7 -2
View File
@@ -62,8 +62,7 @@ export interface PaginationOptions<A = unknown> {
startKey?: string; startKey?: string;
} }
// eslint-disable-next-line @typescript-eslint/no-unused-vars export type DecorateMethod<_ApiType extends ApiTypes, T = any> =
export type DecorateMethod<ApiType extends ApiTypes, T = any> =
<M extends (...args: any[]) => Observable<any>>(method: M, options?: DecorateMethodOptions) => T; <M extends (...args: any[]) => Observable<any>>(method: M, options?: DecorateMethodOptions) => T;
type AsCodec<R extends Codec | any> = R extends Codec type AsCodec<R extends Codec | any> = R extends Codec
@@ -71,3 +70,9 @@ type AsCodec<R extends Codec | any> = R extends Codec
: Codec; : Codec;
export type ReturnCodec<F extends AnyFunction> = AsCodec<ObsInnerType<ReturnType<F>>>; export type ReturnCodec<F extends AnyFunction> = AsCodec<ObsInnerType<ReturnType<F>>>;
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface EmptyBase<_> {
// this is use to allow use to have unused vars in augmented interfaces,
// so intentionally left empty
}
+3 -4
View File
@@ -3,14 +3,13 @@
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AnyFunction, Codec, DefinitionCallNamed } from '@polkadot/types/types'; import type { AnyFunction, Codec, DefinitionCallNamed } from '@polkadot/types/types';
import type { ApiTypes, ReturnCodec } from './base.js'; import type { ApiTypes, EmptyBase, ReturnCodec } from './base.js';
export type DecoratedCallBase<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = export type DecoratedCallBase<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> =
ApiType extends 'rxjs' ApiType extends 'rxjs'
? <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Observable<T> ? <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Observable<T>
: <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Promise<T>; : <T extends Codec | any = ReturnCodec<F>> (...args: Parameters<F>) => Promise<T>;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = DecoratedCallBase<ApiType, F> & { export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...args: any[]) => Observable<Codec>> = DecoratedCallBase<ApiType, F> & {
/** The metadata/description/definition for this method */ /** The metadata/description/definition for this method */
meta: DefinitionCallNamed meta: DefinitionCallNamed
@@ -18,8 +17,8 @@ export type AugmentedCall<ApiType extends ApiTypes, F extends AnyFunction = (...
// augmented interfaces // augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface // eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AugmentedCalls<ApiType extends ApiTypes> { export interface AugmentedCalls<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented // augmented
} }
+4 -5
View File
@@ -3,17 +3,16 @@
import type { PalletConstantMetadataLatest } from '@polkadot/types/interfaces'; import type { PalletConstantMetadataLatest } from '@polkadot/types/interfaces';
import type { Codec } from '@polkadot/types/types'; import type { Codec } from '@polkadot/types/types';
import type { ApiTypes } from './base.js'; import type { ApiTypes, EmptyBase } from './base.js';
// eslint-disable-next-line @typescript-eslint/no-unused-vars export interface AugmentedConst<_ extends ApiTypes> {
export interface AugmentedConst<ApiType extends ApiTypes> {
meta: PalletConstantMetadataLatest; meta: PalletConstantMetadataLatest;
} }
// augmented interfaces // augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface // eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AugmentedConsts<ApiType extends ApiTypes> { export interface AugmentedConsts<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented // augmented
} }
+4 -5
View File
@@ -2,15 +2,14 @@
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
import type { IsError } from '@polkadot/types/metadata/decorate/types'; import type { IsError } from '@polkadot/types/metadata/decorate/types';
import type { ApiTypes } from './base.js'; import type { ApiTypes, EmptyBase } from './base.js';
// eslint-disable-next-line @typescript-eslint/no-unused-vars export type AugmentedError<_ extends ApiTypes> = IsError;
export type AugmentedError<ApiType extends ApiTypes> = IsError;
// augmented interfaces // augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface // eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AugmentedErrors<ApiType extends ApiTypes> { export interface AugmentedErrors<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented // augmented
} }
+4 -5
View File
@@ -3,15 +3,14 @@
import type { IsEvent } from '@polkadot/types/metadata/decorate/types'; import type { IsEvent } from '@polkadot/types/metadata/decorate/types';
import type { AnyTuple } from '@polkadot/types/types'; import type { AnyTuple } from '@polkadot/types/types';
import type { ApiTypes } from './base.js'; import type { ApiTypes, EmptyBase } from './base.js';
// eslint-disable-next-line @typescript-eslint/no-unused-vars export type AugmentedEvent<_ extends ApiTypes, T extends AnyTuple = AnyTuple, N = unknown> = IsEvent<T, N>;
export type AugmentedEvent<ApiType extends ApiTypes, T extends AnyTuple = AnyTuple, N = unknown> = IsEvent<T, N>;
// augmented interfaces // augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface // eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AugmentedEvents<ApiType extends ApiTypes> { export interface AugmentedEvents<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented // augmented
} }
+3 -3
View File
@@ -6,7 +6,7 @@ import type { StorageKey, u64 } from '@polkadot/types';
import type { Hash } from '@polkadot/types/interfaces'; import type { Hash } from '@polkadot/types/interfaces';
import type { StorageEntry } from '@polkadot/types/primitive/types'; import type { StorageEntry } from '@polkadot/types/primitive/types';
import type { AnyFunction, AnyTuple, Callback, Codec, IStorageKey } from '@polkadot/types/types'; import type { AnyFunction, AnyTuple, Callback, Codec, IStorageKey } from '@polkadot/types/types';
import type { ApiTypes, DropLast, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base.js'; import type { ApiTypes, DropLast, EmptyBase, MethodResult, PaginationOptions, PromiseOrObs, ReturnCodec, UnsubscribePromise } from './base.js';
interface StorageEntryObservableMulti<R extends Codec = Codec> { interface StorageEntryObservableMulti<R extends Codec = Codec> {
<T extends Codec = R>(args: (unknown[] | unknown)[]): Observable<T[]>; <T extends Codec = R>(args: (unknown[] | unknown)[]): Observable<T[]>;
@@ -114,8 +114,8 @@ export type AugmentedQueryDoubleMap<ApiType extends ApiTypes, F extends AnyFunct
// augmented interfaces // augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface // eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AugmentedQueries<ApiType extends ApiTypes> { export interface AugmentedQueries<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented // augmented
} }
+3 -3
View File
@@ -4,7 +4,7 @@
import type { Observable } from 'rxjs'; import type { Observable } from 'rxjs';
import type { AccountId, Address, ApplyExtrinsicResult, BlockNumber, Call, DispatchError, DispatchInfo, EventRecord, Extrinsic, ExtrinsicStatus, Hash, RuntimeDispatchInfo } from '@polkadot/types/interfaces'; import type { AccountId, Address, ApplyExtrinsicResult, BlockNumber, Call, DispatchError, DispatchInfo, EventRecord, Extrinsic, ExtrinsicStatus, Hash, RuntimeDispatchInfo } from '@polkadot/types/interfaces';
import type { AnyFunction, AnyNumber, AnyTuple, Callback, CallBase, Codec, IExtrinsicEra, IKeyringPair, ISubmittableResult, Signer } from '@polkadot/types/types'; import type { AnyFunction, AnyNumber, AnyTuple, Callback, CallBase, Codec, IExtrinsicEra, IKeyringPair, ISubmittableResult, Signer } from '@polkadot/types/types';
import type { ApiTypes, PromiseOrObs } from './base.js'; import type { ApiTypes, EmptyBase, PromiseOrObs } from './base.js';
export type AugmentedSubmittable<T extends AnyFunction, A extends AnyTuple = AnyTuple> = T & CallBase<A>; export type AugmentedSubmittable<T extends AnyFunction, A extends AnyTuple = AnyTuple> = T & CallBase<A>;
@@ -81,8 +81,8 @@ export interface SubmittableExtrinsicFunction<ApiType extends ApiTypes, A extend
// augmented interfaces // augmented interfaces
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-interface // eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface AugmentedSubmittables<ApiType extends ApiTypes> { export interface AugmentedSubmittables<ApiType extends ApiTypes> extends EmptyBase<ApiType> {
// augmented // augmented
} }
+9 -9
View File
@@ -18,20 +18,20 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.1.3", "version": "10.1.4",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/api": "10.1.3", "@polkadot/api": "10.1.4",
"@polkadot/types": "10.1.3", "@polkadot/types": "10.1.4",
"@polkadot/types-codec": "10.1.3", "@polkadot/types-codec": "10.1.4",
"@polkadot/types-create": "10.1.3", "@polkadot/types-create": "10.1.4",
"@polkadot/util": "^11.0.2", "@polkadot/util": "^11.1.1",
"@polkadot/util-crypto": "^11.0.2", "@polkadot/util-crypto": "^11.1.1",
"rxjs": "^7.8.0", "rxjs": "^7.8.0",
"tslib": "^2.5.0" "tslib": "^2.5.0"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api-augment": "10.1.3", "@polkadot/api-augment": "10.1.4",
"@polkadot/keyring": "^11.0.2" "@polkadot/keyring": "^11.1.1"
} }
} }
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { Registry } from '@polkadot/types/types'; import type { Registry } from '@polkadot/types/types';
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
+1 -1
View File
@@ -23,7 +23,7 @@ function createConverter <I, O> (next: (registry: Registry, input: O) => Contrac
next(registry, step(registry, input)); next(registry, step(registry, input));
} }
export function v4ToLatest (registry: Registry, v4: ContractMetadataV4): ContractMetadataLatest { export function v4ToLatest (_registry: Registry, v4: ContractMetadataV4): ContractMetadataLatest {
return v4; return v4;
} }
+1 -1
View File
@@ -4,6 +4,6 @@
import type { ContractMetadataV3, ContractMetadataV4 } from '@polkadot/types/interfaces'; import type { ContractMetadataV3, ContractMetadataV4 } from '@polkadot/types/interfaces';
import type { Registry } from '@polkadot/types/types'; import type { Registry } from '@polkadot/types/types';
export function v3ToV4 (registry: Registry, v3: ContractMetadataV3): ContractMetadataV4 { export function v3ToV4 (_registry: Registry, v3: ContractMetadataV3): ContractMetadataV4 {
return v3; return v3;
} }
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api-contract authors & contributors // Copyright 2017-2023 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import fs from 'node:fs'; import fs from 'node:fs';
import path from 'node:path'; import path from 'node:path';
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '10.1.3' }; export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '10.1.4' };
+14 -14
View File
@@ -18,25 +18,25 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.1.3", "version": "10.1.4",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/api": "10.1.3", "@polkadot/api": "10.1.4",
"@polkadot/api-augment": "10.1.3", "@polkadot/api-augment": "10.1.4",
"@polkadot/api-base": "10.1.3", "@polkadot/api-base": "10.1.4",
"@polkadot/rpc-core": "10.1.3", "@polkadot/rpc-core": "10.1.4",
"@polkadot/types": "10.1.3", "@polkadot/types": "10.1.4",
"@polkadot/types-codec": "10.1.3", "@polkadot/types-codec": "10.1.4",
"@polkadot/util": "^11.0.2", "@polkadot/util": "^11.1.1",
"@polkadot/util-crypto": "^11.0.2", "@polkadot/util-crypto": "^11.1.1",
"rxjs": "^7.8.0", "rxjs": "^7.8.0",
"tslib": "^2.5.0" "tslib": "^2.5.0"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api": "10.1.3", "@polkadot/api": "10.1.4",
"@polkadot/api-augment": "10.1.3", "@polkadot/api-augment": "10.1.4",
"@polkadot/rpc-augment": "10.1.3", "@polkadot/rpc-augment": "10.1.4",
"@polkadot/rpc-provider": "10.1.3", "@polkadot/rpc-provider": "10.1.4",
"@polkadot/types-support": "10.1.3" "@polkadot/types-support": "10.1.4"
} }
} }
@@ -46,7 +46,7 @@ export function idAndIndex (instanceId: string, api: DeriveApi): (address?: Addr
return api.derive.accounts.indexToId(accountIndex.toString()).pipe( return api.derive.accounts.indexToId(accountIndex.toString()).pipe(
map((accountId): AccountIdAndIndex => [accountId, accountIndex]) map((accountId): AccountIdAndIndex => [accountId, accountIndex])
); );
} catch (error) { } catch {
return of([undefined, undefined]); return of([undefined, undefined]);
} }
}); });
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors // Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { SubmittableExtrinsic } from '@polkadot/api-base/types'; import type { SubmittableExtrinsic } from '@polkadot/api-base/types';
import type { Bytes, Option, StorageKey } from '@polkadot/types'; import type { Bytes, Option, StorageKey } from '@polkadot/types';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors // Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
/* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable @typescript-eslint/no-unsafe-return */
/* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-call */
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '10.1.3' }; export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '10.1.4' };
@@ -11,7 +11,6 @@ import { firstMemo, memo } from '../util/index.js';
import { erasHistoricApplyAccount } from './util.js'; import { erasHistoricApplyAccount } from './util.js';
export function _ownExposures (instanceId: string, api: DeriveApi): (accountId: Uint8Array | string, eras: EraIndex[], withActive: boolean) => Observable<DeriveOwnExposure[]> { export function _ownExposures (instanceId: string, api: DeriveApi): (accountId: Uint8Array | string, eras: EraIndex[], withActive: boolean) => Observable<DeriveOwnExposure[]> {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
return memo(instanceId, (accountId: Uint8Array | string, eras: EraIndex[], _withActive: boolean): Observable<DeriveOwnExposure[]> => return memo(instanceId, (accountId: Uint8Array | string, eras: EraIndex[], _withActive: boolean): Observable<DeriveOwnExposure[]> =>
eras.length eras.length
? combineLatest([ ? combineLatest([
@@ -12,7 +12,6 @@ import { firstMemo, memo } from '../util/index.js';
import { erasHistoricApplyAccount } from './util.js'; import { erasHistoricApplyAccount } from './util.js';
export function _ownSlashes (instanceId: string, api: DeriveApi): (accountId: Uint8Array | string, eras: EraIndex[], withActive: boolean) => Observable<DeriveStakerSlashes[]> { export function _ownSlashes (instanceId: string, api: DeriveApi): (accountId: Uint8Array | string, eras: EraIndex[], withActive: boolean) => Observable<DeriveStakerSlashes[]> {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
return memo(instanceId, (accountId: Uint8Array | string, eras: EraIndex[], _withActive: boolean): Observable<DeriveStakerSlashes[]> => return memo(instanceId, (accountId: Uint8Array | string, eras: EraIndex[], _withActive: boolean): Observable<DeriveStakerSlashes[]> =>
eras.length eras.length
? combineLatest([ ? combineLatest([
@@ -11,7 +11,6 @@ import { memo } from '../util/index.js';
import { erasHistoricApplyAccount } from './util.js'; import { erasHistoricApplyAccount } from './util.js';
export function _stakerPrefs (instanceId: string, api: DeriveApi): (accountId: Uint8Array | string, eras: EraIndex[], withActive: boolean) => Observable<DeriveStakerPrefs[]> { export function _stakerPrefs (instanceId: string, api: DeriveApi): (accountId: Uint8Array | string, eras: EraIndex[], withActive: boolean) => Observable<DeriveStakerPrefs[]> {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
return memo(instanceId, (accountId: Uint8Array | string, eras: EraIndex[], _withActive: boolean): Observable<DeriveStakerPrefs[]> => return memo(instanceId, (accountId: Uint8Array | string, eras: EraIndex[], _withActive: boolean): Observable<DeriveStakerPrefs[]> =>
api.query.staking.erasValidatorPrefs.multi(eras.map((e) => [e, accountId])).pipe( api.query.staking.erasValidatorPrefs.multi(eras.map((e) => [e, accountId])).pipe(
map((all): DeriveStakerPrefs[] => map((all): DeriveStakerPrefs[] =>
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors // Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { ApprovalFlag } from '@polkadot/types/interfaces'; import type { ApprovalFlag } from '@polkadot/types/interfaces';
+17 -17
View File
@@ -18,29 +18,29 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.1.3", "version": "10.1.4",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/api-augment": "10.1.3", "@polkadot/api-augment": "10.1.4",
"@polkadot/api-base": "10.1.3", "@polkadot/api-base": "10.1.4",
"@polkadot/api-derive": "10.1.3", "@polkadot/api-derive": "10.1.4",
"@polkadot/keyring": "^11.0.2", "@polkadot/keyring": "^11.1.1",
"@polkadot/rpc-augment": "10.1.3", "@polkadot/rpc-augment": "10.1.4",
"@polkadot/rpc-core": "10.1.3", "@polkadot/rpc-core": "10.1.4",
"@polkadot/rpc-provider": "10.1.3", "@polkadot/rpc-provider": "10.1.4",
"@polkadot/types": "10.1.3", "@polkadot/types": "10.1.4",
"@polkadot/types-augment": "10.1.3", "@polkadot/types-augment": "10.1.4",
"@polkadot/types-codec": "10.1.3", "@polkadot/types-codec": "10.1.4",
"@polkadot/types-create": "10.1.3", "@polkadot/types-create": "10.1.4",
"@polkadot/types-known": "10.1.3", "@polkadot/types-known": "10.1.4",
"@polkadot/util": "^11.0.2", "@polkadot/util": "^11.1.1",
"@polkadot/util-crypto": "^11.0.2", "@polkadot/util-crypto": "^11.1.1",
"eventemitter3": "^5.0.0", "eventemitter3": "^5.0.0",
"rxjs": "^7.8.0", "rxjs": "^7.8.0",
"tslib": "^2.5.0" "tslib": "^2.5.0"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/api-augment": "10.1.3", "@polkadot/api-augment": "10.1.4",
"@polkadot/types-support": "10.1.3" "@polkadot/types-support": "10.1.4"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '10.1.3' }; export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '10.1.4' };
+2 -2
View File
@@ -62,7 +62,7 @@ export class Combinator<T extends unknown[] = unknown[]> {
try { try {
// eslint-disable-next-line @typescript-eslint/no-floating-promises // eslint-disable-next-line @typescript-eslint/no-floating-promises
this.#callback(this.#results as T); this.#callback(this.#results as T);
} catch (error) { } catch {
// swallow, we don't want the handler to trip us up // swallow, we don't want the handler to trip us up
} }
} }
@@ -82,7 +82,7 @@ export class Combinator<T extends unknown[] = unknown[]> {
if (isFunction(unsubscribe)) { if (isFunction(unsubscribe)) {
unsubscribe(); unsubscribe();
} }
} catch (error) { } catch {
// ignore // ignore
} }
}); });
+2 -3
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api authors & contributors // Copyright 2017-2023 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { UnsubscribePromise } from '../types/index.js'; import type { UnsubscribePromise } from '../types/index.js';
@@ -98,8 +98,7 @@ describe('Combinator', (): void => {
mocker, mocker,
// eslint-disable-next-line @typescript-eslint/require-await // eslint-disable-next-line @typescript-eslint/require-await
async (): UnsubscribePromise => (): void => undefined async (): UnsubscribePromise => (): void => undefined
// eslint-disable-next-line @typescript-eslint/no-unused-vars ], (_: any[]): void => {
], (value: any[]): void => {
// ignore // ignore
}); });
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api authors & contributors // Copyright 2017-2023 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { HexString } from '@polkadot/util/types'; import type { HexString } from '@polkadot/util/types';
import type { SubmittableExtrinsic } from '../types/index.js'; import type { SubmittableExtrinsic } from '../types/index.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api authors & contributors // Copyright 2017-2023 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { augmentObject } from './augmentObject.js'; import { augmentObject } from './augmentObject.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api authors & contributors // Copyright 2017-2023 @polkadot/api authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { decorateStorage, Metadata, TypeRegistry } from '@polkadot/types'; import { decorateStorage, Metadata, TypeRegistry } from '@polkadot/types';
import metaStatic from '@polkadot/types-support/metadata/static-substrate'; import metaStatic from '@polkadot/types-support/metadata/static-substrate';
+5 -5
View File
@@ -18,13 +18,13 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.1.3", "version": "10.1.4",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/rpc-core": "10.1.3", "@polkadot/rpc-core": "10.1.4",
"@polkadot/types": "10.1.3", "@polkadot/types": "10.1.4",
"@polkadot/types-codec": "10.1.3", "@polkadot/types-codec": "10.1.4",
"@polkadot/util": "^11.0.2", "@polkadot/util": "^11.1.1",
"tslib": "^2.5.0" "tslib": "^2.5.0"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '10.1.3' }; export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '10.1.4' };
+7 -7
View File
@@ -18,18 +18,18 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.1.3", "version": "10.1.4",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/rpc-augment": "10.1.3", "@polkadot/rpc-augment": "10.1.4",
"@polkadot/rpc-provider": "10.1.3", "@polkadot/rpc-provider": "10.1.4",
"@polkadot/types": "10.1.3", "@polkadot/types": "10.1.4",
"@polkadot/util": "^11.0.2", "@polkadot/util": "^11.1.1",
"rxjs": "^7.8.0", "rxjs": "^7.8.0",
"tslib": "^2.5.0" "tslib": "^2.5.0"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/keyring": "^11.0.2", "@polkadot/keyring": "^11.1.1",
"@polkadot/rpc-augment": "10.1.3" "@polkadot/rpc-augment": "10.1.4"
} }
} }
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors // Copyright 2017-2023 @polkadot/rpc-core authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { RpcInterface } from './types/index.js'; import type { RpcInterface } from './types/index.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors // Copyright 2017-2023 @polkadot/rpc-core authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { ProviderInterface } from '@polkadot/rpc-provider/types'; import type { ProviderInterface } from '@polkadot/rpc-provider/types';
+2 -2
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors // Copyright 2017-2023 @polkadot/rpc-core authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { ProviderInterface } from '@polkadot/rpc-provider/types'; import type { ProviderInterface } from '@polkadot/rpc-provider/types';
import type { DefinitionRpc } from '@polkadot/types/types'; import type { DefinitionRpc } from '@polkadot/types/types';
@@ -33,7 +33,7 @@ describe('methodSend', (): void => {
}; };
provider = { provider = {
send: jest.fn((method: string, params: unknown[]): Promise<unknown> => send: jest.fn((_method: string, params: unknown[]): Promise<unknown> =>
Promise.resolve(params[0]) Promise.resolve(params[0])
) )
} as unknown as ProviderInterface; } as unknown as ProviderInterface;
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '10.1.3' }; export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '10.1.4' };
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-core authors & contributors // Copyright 2017-2023 @polkadot/rpc-core authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { RpcInterface } from './types/index.js'; import type { RpcInterface } from './types/index.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/api-derive authors & contributors // Copyright 2017-2023 @polkadot/api-derive authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { of, timer } from 'rxjs'; import { of, timer } from 'rxjs';
+11 -11
View File
@@ -18,26 +18,26 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.1.3", "version": "10.1.4",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/keyring": "^11.0.2", "@polkadot/keyring": "^11.1.1",
"@polkadot/types": "10.1.3", "@polkadot/types": "10.1.4",
"@polkadot/types-support": "10.1.3", "@polkadot/types-support": "10.1.4",
"@polkadot/util": "^11.0.2", "@polkadot/util": "^11.1.1",
"@polkadot/util-crypto": "^11.0.2", "@polkadot/util-crypto": "^11.1.1",
"@polkadot/x-fetch": "^11.0.2", "@polkadot/x-fetch": "^11.1.1",
"@polkadot/x-global": "^11.0.2", "@polkadot/x-global": "^11.1.1",
"@polkadot/x-ws": "^11.0.2", "@polkadot/x-ws": "^11.1.1",
"eventemitter3": "^5.0.0", "eventemitter3": "^5.0.0",
"mock-socket": "^9.2.1", "mock-socket": "^9.2.1",
"nock": "^13.3.0", "nock": "^13.3.0",
"tslib": "^2.5.0" "tslib": "^2.5.0"
}, },
"devDependencies": { "devDependencies": {
"@substrate/connect": "0.7.20" "@substrate/connect": "0.7.21"
}, },
"optionalDependencies": { "optionalDependencies": {
"@substrate/connect": "0.7.20" "@substrate/connect": "0.7.21"
} }
} }
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { JsonRpcResponse } from '../types.js'; import type { JsonRpcResponse } from '../types.js';
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { RpcCoder } from './index.js'; import { RpcCoder } from './index.js';
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { RpcCoder } from './index.js'; import { RpcCoder } from './index.js';
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { isError } from '@polkadot/util'; import { isError } from '@polkadot/util';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TEST_HTTP_URL } from '../mock/mockHttp.js'; import { TEST_HTTP_URL } from '../mock/mockHttp.js';
import { HttpProvider } from './index.js'; import { HttpProvider } from './index.js';
+5 -6
View File
@@ -112,8 +112,7 @@ export class HttpProvider implements ProviderInterface {
* @summary Events are not supported with the HttpProvider, see [[WsProvider]]. * @summary Events are not supported with the HttpProvider, see [[WsProvider]].
* @description HTTP Provider does not have 'on' emitters. WebSockets should be used instead. * @description HTTP Provider does not have 'on' emitters. WebSockets should be used instead.
*/ */
// eslint-disable-next-line @typescript-eslint/no-unused-vars public on (_type: ProviderInterfaceEmitted, _sub: ProviderInterfaceEmitCb): () => void {
public on (type: ProviderInterfaceEmitted, sub: ProviderInterfaceEmitCb): () => void {
l.error('HTTP Provider does not have \'on\' emitters, use WebSockets instead'); l.error('HTTP Provider does not have \'on\' emitters, use WebSockets instead');
return (): void => { return (): void => {
@@ -185,8 +184,8 @@ export class HttpProvider implements ProviderInterface {
/** /**
* @summary Subscriptions are not supported with the HttpProvider, see [[WsProvider]]. * @summary Subscriptions are not supported with the HttpProvider, see [[WsProvider]].
*/ */
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await // eslint-disable-next-line @typescript-eslint/require-await
public async subscribe (types: string, method: string, params: unknown[], cb: ProviderInterfaceCallback): Promise<number> { public async subscribe (_types: string, _method: string, _params: unknown[], _cb: ProviderInterfaceCallback): Promise<number> {
l.error(ERROR_SUBSCRIBE); l.error(ERROR_SUBSCRIBE);
throw new Error(ERROR_SUBSCRIBE); throw new Error(ERROR_SUBSCRIBE);
@@ -195,8 +194,8 @@ export class HttpProvider implements ProviderInterface {
/** /**
* @summary Subscriptions are not supported with the HttpProvider, see [[WsProvider]]. * @summary Subscriptions are not supported with the HttpProvider, see [[WsProvider]].
*/ */
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await // eslint-disable-next-line @typescript-eslint/require-await
public async unsubscribe (type: string, method: string, id: number): Promise<boolean> { public async unsubscribe (_type: string, _method: string, _id: number): Promise<boolean> {
l.error(ERROR_SUBSCRIBE); l.error(ERROR_SUBSCRIBE);
throw new Error(ERROR_SUBSCRIBE); throw new Error(ERROR_SUBSCRIBE);
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { Mock } from '../mock/types.js'; import type { Mock } from '../mock/types.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { LRUCache } from './lru.js'; import { LRUCache } from './lru.js';
+3 -4
View File
@@ -53,9 +53,8 @@ export class MockProvider implements ProviderInterface {
private prevNumber = new BN(-1); private prevNumber = new BN(-1);
private requests: Record<string, (...params: any[]) => unknown> = { private requests: Record<string, (...params: any[]) => unknown> = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-unsafe-member-access // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
chain_getBlock: () => this.registry.createType('SignedBlock', rpcSignedBlock.result).toJSON(), chain_getBlock: () => this.registry.createType('SignedBlock', rpcSignedBlock.result).toJSON(),
// eslint-disable-next-line @typescript-eslint/no-unused-vars
chain_getBlockHash: () => '0x1234000000000000000000000000000000000000000000000000000000000000', chain_getBlockHash: () => '0x1234000000000000000000000000000000000000000000000000000000000000',
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
chain_getFinalizedHead: () => this.registry.createType('Header', rpcHeader.result).hash, chain_getFinalizedHead: () => this.registry.createType('Header', rpcHeader.result).hash,
@@ -144,7 +143,7 @@ export class MockProvider implements ProviderInterface {
} }
// eslint-disable-next-line @typescript-eslint/require-await // eslint-disable-next-line @typescript-eslint/require-await
public async subscribe (type: string, method: string, ...params: unknown[]): Promise<number> { public async subscribe (_type: string, method: string, ...params: unknown[]): Promise<number> {
l.debug(() => ['subscribe', method, params]); l.debug(() => ['subscribe', method, params]);
if (!this.subscriptions[method]) { if (!this.subscriptions[method]) {
@@ -165,7 +164,7 @@ export class MockProvider implements ProviderInterface {
} }
// eslint-disable-next-line @typescript-eslint/require-await // eslint-disable-next-line @typescript-eslint/require-await
public async unsubscribe (type: string, method: string, id: number): Promise<boolean> { public async unsubscribe (_type: string, _method: string, id: number): Promise<boolean> {
const sub = this.subscriptionMap[id]; const sub = this.subscriptionMap[id];
l.debug(() => ['unsubscribe', id, sub]); l.debug(() => ['unsubscribe', id, sub]);
+1 -1
View File
@@ -25,7 +25,7 @@ export function mockHttp (requests: Request[]): Mock {
return requests.reduce((scope: HttpMock, request: Request) => return requests.reduce((scope: HttpMock, request: Request) =>
scope scope
.post('/') .post('/')
.reply(request.code || 200, (uri: string, body: { id: string }) => { .reply(request.code || 200, (_uri: string, body: { id: string }) => {
scope.body = scope.body || {}; scope.body = scope.body || {};
scope.body[request.method] = body; scope.body[request.method] = body;
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { ProviderInterfaceEmitted } from '../types.js'; import type { ProviderInterfaceEmitted } from '../types.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types/create'; import { TypeRegistry } from '@polkadot/types/create';
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types/create'; import { TypeRegistry } from '@polkadot/types/create';
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types/create'; import { TypeRegistry } from '@polkadot/types/create';
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '10.1.3' }; export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '10.1.4' };
@@ -113,7 +113,7 @@ class InnerChecker {
try { try {
parsedRequest = JSON.parse(request) as JSONRequest; parsedRequest = JSON.parse(request) as JSONRequest;
} catch (err) { } catch {
return; return;
} }
@@ -131,7 +131,7 @@ class InnerChecker {
try { try {
parsedResponse = JSON.parse(jsonRpcResponse) as { id: string, result: undefined | SmoldotHealth }; parsedResponse = JSON.parse(jsonRpcResponse) as { id: string, result: undefined | SmoldotHealth };
} catch (err) { } catch {
return jsonRpcResponse; return jsonRpcResponse;
} }
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
/* eslint-disable sort-keys */ /* eslint-disable sort-keys */
/* eslint-disable promise/param-names */ /* eslint-disable promise/param-names */
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { Mock } from '../mock/types.js'; import type { Mock } from '../mock/types.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { Request } from '../mock/mockWs.js'; import type { Request } from '../mock/mockWs.js';
import type { Mock } from '../mock/types.js'; import type { Mock } from '../mock/types.js';
+3 -3
View File
@@ -138,7 +138,7 @@ export class WsProvider implements ProviderInterface {
this.#endpointStats = defaultEndpointStats(); this.#endpointStats = defaultEndpointStats();
this.#timeout = timeout || DEFAULT_TIMEOUT_MS; this.#timeout = timeout || DEFAULT_TIMEOUT_MS;
if (autoConnectMs > 0) { if (autoConnectMs && autoConnectMs > 0) {
this.connectWithRetry().catch((): void => { this.connectWithRetry().catch((): void => {
// does not throw // does not throw
}); });
@@ -243,7 +243,7 @@ export class WsProvider implements ProviderInterface {
if (this.#autoConnectMs > 0) { if (this.#autoConnectMs > 0) {
try { try {
await this.connect(); await this.connect();
} catch (error) { } catch {
setTimeout((): void => { setTimeout((): void => {
this.connectWithRetry().catch((): void => { this.connectWithRetry().catch((): void => {
// does not throw // does not throw
@@ -417,7 +417,7 @@ export class WsProvider implements ProviderInterface {
return this.isConnected && !isNull(this.#websocket) return this.isConnected && !isNull(this.#websocket)
? this.send<boolean>(method, [id]) ? this.send<boolean>(method, [id])
: true; : true;
} catch (error) { } catch {
return false; return false;
} }
} }
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { Request } from '../mock/mockWs.js'; import type { Request } from '../mock/mockWs.js';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { WsProvider } from './index.js'; import { WsProvider } from './index.js';
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { Request } from '../mock/mockWs.js'; import type { Request } from '../mock/mockWs.js';
import type { Global, Mock } from './../mock/types.js'; import type { Global, Mock } from './../mock/types.js';
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/rpc-provider authors & contributors // Copyright 2017-2023 @polkadot/rpc-provider authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { Request } from '../mock/mockWs.js'; import type { Request } from '../mock/mockWs.js';
import type { Global, Mock } from './../mock/types.js'; import type { Global, Mock } from './../mock/types.js';
+13 -13
View File
@@ -18,7 +18,7 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.1.3", "version": "10.1.4",
"main": "index.js", "main": "index.js",
"bin": { "bin": {
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.mjs", "polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.mjs",
@@ -28,18 +28,18 @@
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.mjs" "polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.mjs"
}, },
"dependencies": { "dependencies": {
"@polkadot/api": "10.1.3", "@polkadot/api": "10.1.4",
"@polkadot/api-augment": "10.1.3", "@polkadot/api-augment": "10.1.4",
"@polkadot/rpc-augment": "10.1.3", "@polkadot/rpc-augment": "10.1.4",
"@polkadot/rpc-provider": "10.1.3", "@polkadot/rpc-provider": "10.1.4",
"@polkadot/types": "10.1.3", "@polkadot/types": "10.1.4",
"@polkadot/types-augment": "10.1.3", "@polkadot/types-augment": "10.1.4",
"@polkadot/types-codec": "10.1.3", "@polkadot/types-codec": "10.1.4",
"@polkadot/types-create": "10.1.3", "@polkadot/types-create": "10.1.4",
"@polkadot/types-support": "10.1.3", "@polkadot/types-support": "10.1.4",
"@polkadot/util": "^11.0.2", "@polkadot/util": "^11.1.1",
"@polkadot/util-crypto": "^11.0.2", "@polkadot/util-crypto": "^11.1.1",
"@polkadot/x-ws": "^11.0.2", "@polkadot/x-ws": "^11.1.1",
"handlebars": "^4.7.7", "handlebars": "^4.7.7",
"tslib": "^2.5.0", "tslib": "^2.5.0",
"yargs": "^17.7.1" "yargs": "^17.7.1"
+1 -1
View File
@@ -218,7 +218,7 @@ function generateLookupTypes (registry: Registry, filtered: [PortableType, TypeD
writeFile(path.join(destDir, 'index.ts'), () => generateLookupIndexTmpl({ headerType: 'defs' }), true); writeFile(path.join(destDir, 'index.ts'), () => generateLookupIndexTmpl({ headerType: 'defs' }), true);
} }
function generateRegistry (registry: Registry, filtered: [PortableType, TypeDef][], destDir: string, subPath: string): void { function generateRegistry (_registry: Registry, filtered: [PortableType, TypeDef][], destDir: string, subPath: string): void {
writeFile(path.join(destDir, `${subPath}.ts`), (): string => { writeFile(path.join(destDir, `${subPath}.ts`), (): string => {
const items = filtered const items = filtered
.map(([, { lookupName }]) => lookupName) .map(([, { lookupName }]) => lookupName)
+3 -5
View File
@@ -32,8 +32,7 @@ export function createGetter (definitions: Record<string, ModuleTypes>, name = '
} }
/** @internal */ /** @internal */
// eslint-disable-next-line @typescript-eslint/no-unused-vars function errorUnhandled (_: Registry, _definitions: Record<string, ModuleTypes>, def: TypeDef, _imports: TypeImports): string {
function errorUnhandled (_: Registry, definitions: Record<string, ModuleTypes>, def: TypeDef, imports: TypeImports): string {
throw new Error(`Generate: ${def.name || ''}: Unhandled type ${TypeDefInfo[def.info]}`); throw new Error(`Generate: ${def.name || ''}: Unhandled type ${TypeDefInfo[def.info]}`);
} }
@@ -96,7 +95,7 @@ function tsInt (_: Registry, definitions: Record<string, ModuleTypes>, def: Type
} }
/** @internal */ /** @internal */
function tsNull (registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex = -1, name }: TypeDef, imports: TypeImports): string { function tsNull (_registry: Registry, definitions: Record<string, ModuleTypes>, { lookupIndex = -1, name }: TypeDef, imports: TypeImports): string {
setImports(definitions, imports, ['Null']); setImports(definitions, imports, ['Null']);
// * @description extends [[${base}]] // * @description extends [[${base}]]
@@ -151,8 +150,7 @@ function tsResult (registry: Registry, definitions: Record<string, ModuleTypes>,
} }
/** @internal */ /** @internal */
// eslint-disable-next-line @typescript-eslint/no-unused-vars function tsSi (_registry: Registry, _definitions: Record<string, ModuleTypes>, typeDef: TypeDef, _imports: TypeImports): string {
function tsSi (registry: Registry, definitions: Record<string, ModuleTypes>, typeDef: TypeDef, imports: TypeImports): string {
// FIXME // FIXME
return `// SI: ${JSON.stringify(typeDef)}`; return `// SI: ${JSON.stringify(typeDef)}`;
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '10.1.3' }; export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '10.1.4' };
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/typegen authors & contributors // Copyright 2017-2023 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types/create'; import { TypeRegistry } from '@polkadot/types/create';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/typegen authors & contributors // Copyright 2017-2023 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
+7 -9
View File
@@ -1,8 +1,6 @@
// Copyright 2017-2023 @polkadot/typegen authors & contributors // Copyright 2017-2023 @polkadot/typegen authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/* eslint-disable @typescript-eslint/no-unused-vars */
import type { AnyString, Registry } from '@polkadot/types/types'; import type { AnyString, Registry } from '@polkadot/types/types';
import type { LookupString } from '@polkadot/types-codec/types'; import type { LookupString } from '@polkadot/types-codec/types';
import type { TypeDef } from '@polkadot/types-create/types'; import type { TypeDef } from '@polkadot/types-create/types';
@@ -139,13 +137,13 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
return singleParamNotation(registry, 'Compact', typeDef, definitions, imports, withShortcut); return singleParamNotation(registry, 'Compact', typeDef, definitions, imports, withShortcut);
}, },
[TypeDefInfo.DoNotConstruct]: (registry: Registry, { lookupName }: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => { [TypeDefInfo.DoNotConstruct]: (_registry: Registry, _typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, _withShortcut: boolean) => {
setImports(definitions, imports, ['DoNotConstruct']); setImports(definitions, imports, ['DoNotConstruct']);
return 'DoNotConstruct'; return 'DoNotConstruct';
}, },
[TypeDefInfo.Enum]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => { [TypeDefInfo.Enum]: (_registry: Registry, typeDef: TypeDef, _definitions: Record<string, ModuleTypes>, _imports: TypeImports, _withShortcut: boolean) => {
if (typeDef.lookupName) { if (typeDef.lookupName) {
return typeDef.lookupName; return typeDef.lookupName;
} }
@@ -153,15 +151,15 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
throw new Error(`TypeDefInfo.Enum: Parameter formatting not implemented on ${stringify(typeDef)}`); throw new Error(`TypeDefInfo.Enum: Parameter formatting not implemented on ${stringify(typeDef)}`);
}, },
[TypeDefInfo.Int]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => { [TypeDefInfo.Int]: (_registry: Registry, typeDef: TypeDef, _definitions: Record<string, ModuleTypes>, _imports: TypeImports, _withShortcut: boolean) => {
throw new Error(`TypeDefInfo.Int: Parameter formatting not implemented on ${stringify(typeDef)}`); throw new Error(`TypeDefInfo.Int: Parameter formatting not implemented on ${stringify(typeDef)}`);
}, },
[TypeDefInfo.UInt]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => { [TypeDefInfo.UInt]: (_registry: Registry, typeDef: TypeDef, _definitions: Record<string, ModuleTypes>, _imports: TypeImports, _withShortcut: boolean) => {
throw new Error(`TypeDefInfo.UInt: Parameter formatting not implemented on ${stringify(typeDef)}`); throw new Error(`TypeDefInfo.UInt: Parameter formatting not implemented on ${stringify(typeDef)}`);
}, },
[TypeDefInfo.Null]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => { [TypeDefInfo.Null]: (_registry: Registry, _typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, _withShortcut: boolean) => {
setImports(definitions, imports, ['Null']); setImports(definitions, imports, ['Null']);
return 'Null'; return 'Null';
@@ -171,7 +169,7 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
return singleParamNotation(registry, 'Option', typeDef, definitions, imports, withShortcut); return singleParamNotation(registry, 'Option', typeDef, definitions, imports, withShortcut);
}, },
[TypeDefInfo.Plain]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => { [TypeDefInfo.Plain]: (_registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, _withShortcut: boolean) => {
setImports(definitions, imports, [typeDef.type]); setImports(definitions, imports, [typeDef.type]);
return typeDef.type; return typeDef.type;
@@ -185,7 +183,7 @@ const formatters: Record<TypeDefInfo, (registry: Registry, typeDef: TypeDef, def
return singleParamNotation(registry, 'RangeInclusive', typeDef, definitions, imports, withShortcut); return singleParamNotation(registry, 'RangeInclusive', typeDef, definitions, imports, withShortcut);
}, },
[TypeDefInfo.Set]: (registry: Registry, typeDef: TypeDef, definitions: Record<string, ModuleTypes>, imports: TypeImports, withShortcut: boolean) => { [TypeDefInfo.Set]: (_registry: Registry, typeDef: TypeDef, _definitions: Record<string, ModuleTypes>, _imports: TypeImports, _withShortcut: boolean) => {
throw new Error(`TypeDefInfo.Set: Parameter formatting not implemented on ${stringify(typeDef)}`); throw new Error(`TypeDefInfo.Set: Parameter formatting not implemented on ${stringify(typeDef)}`);
}, },
+3
View File
@@ -36,6 +36,9 @@ async function getWsData <T> (endpoint: string, method: 'rpc_methods' | 'state_g
websocket.close(); websocket.close();
}; };
} catch (error) { } catch (error) {
console.error();
console.error(error);
console.error();
process.exit(1); process.exit(1);
} }
}); });
+4 -4
View File
@@ -18,12 +18,12 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.1.3", "version": "10.1.4",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/types": "10.1.3", "@polkadot/types": "10.1.4",
"@polkadot/types-codec": "10.1.3", "@polkadot/types-codec": "10.1.4",
"@polkadot/util": "^11.0.2", "@polkadot/util": "^11.1.1",
"tslib": "^2.5.0" "tslib": "^2.5.0"
} }
} }
+1 -1
View File
@@ -3,4 +3,4 @@
// Do not edit, auto-generated by @polkadot/dev // Do not edit, auto-generated by @polkadot/dev
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '10.1.3' }; export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '10.1.4' };
+7 -7
View File
@@ -18,17 +18,17 @@
"./detectPackage.cjs" "./detectPackage.cjs"
], ],
"type": "module", "type": "module",
"version": "10.1.3", "version": "10.1.4",
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"@polkadot/util": "^11.0.2", "@polkadot/util": "^11.1.1",
"@polkadot/x-bigint": "^11.0.2", "@polkadot/x-bigint": "^11.1.1",
"tslib": "^2.5.0" "tslib": "^2.5.0"
}, },
"devDependencies": { "devDependencies": {
"@polkadot/types": "10.1.3", "@polkadot/types": "10.1.4",
"@polkadot/types-augment": "10.1.3", "@polkadot/types-augment": "10.1.4",
"@polkadot/types-support": "10.1.3", "@polkadot/types-support": "10.1.4",
"@polkadot/util-crypto": "^11.0.2" "@polkadot/util-crypto": "^11.1.1"
} }
} }
+2 -4
View File
@@ -197,8 +197,7 @@ export abstract class AbstractInt extends BN implements INumber {
/** /**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/ */
// eslint-disable-next-line @typescript-eslint/no-unused-vars public toHuman (_isExpanded?: boolean): string {
public toHuman (isExpanded?: boolean): string {
const rawType = this.toRawType(); const rawType = this.toRawType();
if (rawType === 'Balance') { if (rawType === 'Balance') {
@@ -263,8 +262,7 @@ export abstract class AbstractInt extends BN implements INumber {
* @description Encodes the value as a Uint8Array as per the SCALE specifications * @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)
*/ */
// eslint-disable-next-line @typescript-eslint/no-unused-vars public toU8a (_isBare?: boolean): Uint8Array {
public toU8a (isBare?: boolean): Uint8Array {
return bnToU8a(this, { return bnToU8a(this, {
bitLength: this.bitLength(), bitLength: this.bitLength(),
isLe: true, isLe: true,
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import { CodecDate, Compact, U32 } from '@polkadot/types-codec'; import { CodecDate, Compact, U32 } from '@polkadot/types-codec';
+1 -2
View File
@@ -195,8 +195,7 @@ export class Compact<T extends INumber> implements ICompact<T> {
* @description Encodes the value as a Uint8Array as per the SCALE specifications * @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)
*/ */
// eslint-disable-next-line @typescript-eslint/no-unused-vars public toU8a (_isBare?: boolean): Uint8Array {
public toU8a (isBare?: boolean): Uint8Array {
return compactToU8a(this.#raw.toBn()); return compactToU8a(this.#raw.toBn());
} }
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import { DoNotConstruct } from '@polkadot/types-codec'; import { DoNotConstruct } from '@polkadot/types-codec';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { Registry } from '@polkadot/types-codec/types'; import type { Registry } from '@polkadot/types-codec/types';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import { Int } from '@polkadot/types-codec'; import { Int } from '@polkadot/types-codec';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import { Null } from '@polkadot/types-codec'; import { Null } from '@polkadot/types-codec';
+1 -2
View File
@@ -91,8 +91,7 @@ export class Null implements Codec {
* @description Encodes the value as a Uint8Array as per the SCALE specifications * @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)
*/ */
// eslint-disable-next-line @typescript-eslint/no-unused-vars public toU8a (_isBare?: boolean): Uint8Array {
public toU8a (isBare?: boolean): Uint8Array {
return new Uint8Array(); return new Uint8Array();
} }
} }
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import { bool, Bytes, Null, Option, Text, U32 } from '@polkadot/types-codec'; import { bool, Bytes, Null, Option, Text, U32 } from '@polkadot/types-codec';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import { Result, Text, u32 } from '@polkadot/types-codec'; import { Result, Text, u32 } from '@polkadot/types-codec';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { BlockNumber, VoteThreshold } from '@polkadot/types/interfaces'; import type { BlockNumber, VoteThreshold } from '@polkadot/types/interfaces';
import type { AnyTupleValue, CodecTo } from '@polkadot/types-codec/types'; import type { AnyTupleValue, CodecTo } from '@polkadot/types-codec/types';
+1 -1
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import { UInt } from '@polkadot/types-codec'; import { UInt } from '@polkadot/types-codec';
+2 -2
View File
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { PropIndex } from '@polkadot/types/interfaces/democracy'; import type { PropIndex } from '@polkadot/types/interfaces/democracy';
import type { Codec, CodecTo, ITuple } from '@polkadot/types-codec/types'; import type { Codec, CodecTo, ITuple } from '@polkadot/types-codec/types';
@@ -131,7 +131,7 @@ describe('Vec', (): void => {
it('exposes a working filter', (): void => { it('exposes a working filter', (): void => {
expect( expect(
vector.filter((e, i): boolean => i >= 3).toString() vector.filter((_, i): boolean => i >= 3).toString()
).toEqual('4567,56789'); ).toEqual('4567,56789');
}); });
+5 -5
View File
@@ -118,14 +118,14 @@ export class Vec<T extends Codec> extends AbstractArray<T> {
/** /**
* @description Finds the index of the value in the array * @description Finds the index of the value in the array
*/ */
public override indexOf (_other?: unknown): number { public override indexOf (other?: unknown): number {
// convert type first, this removes overhead from the eq // convert type first, this removes overhead from the eq
const other = _other instanceof this.#Type const check = other instanceof this.#Type
? _other ? other
: new this.#Type(this.registry, _other); : new this.#Type(this.registry, other);
for (let i = 0; i < this.length; i++) { for (let i = 0; i < this.length; i++) {
if (other.eq(this[i])) { if (check.eq(this[i])) {
return i; return i;
} }
} }
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import { Text, u16, VecFixed } from '@polkadot/types-codec'; import { Text, u16, VecFixed } from '@polkadot/types-codec';
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { CodecClass, ITuple } from '@polkadot/types-codec/types'; import type { CodecClass, ITuple } from '@polkadot/types-codec/types';
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import type { CodecClass, CodecTo } from '@polkadot/types-codec/types'; import type { CodecClass, CodecTo } from '@polkadot/types-codec/types';
@@ -1,7 +1,7 @@
// Copyright 2017-2023 @polkadot/types-codec authors & contributors // Copyright 2017-2023 @polkadot/types-codec authors & contributors
// SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: Apache-2.0
/// <reference types="@polkadot/dev/node/test/node.d.ts" /> /// <reference types="@polkadot/dev-test/globals.d.ts" />
import { TypeRegistry } from '@polkadot/types'; import { TypeRegistry } from '@polkadot/types';
import { hexToU8a } from '@polkadot/util'; import { hexToU8a } from '@polkadot/util';

Some files were not shown because too many files have changed in this diff Show More