diff --git a/jest.config.js b/jest.config.js index ed78fa26cc..f60bedeec1 100644 --- a/jest.config.js +++ b/jest.config.js @@ -13,7 +13,8 @@ module.exports = Object.assign({}, config, { '@polkadot/typegen(.*)$': '/packages/typegen/src/$1', '@polkadot/types-known(.*)$': '/packages/types-known/src/$1', // eslint-disable-next-line sort-keys - '@polkadot/types(.*)$': '/packages/types/src/$1' + '@polkadot/types(.*)$': '/packages/types/src/$1', + '@polkadot/x-rxjs(.*)$': '/packages/x-rxjs/src/$1' }, modulePathIgnorePatterns: [ '/packages/api/build', @@ -24,7 +25,8 @@ module.exports = Object.assign({}, config, { '/packages/rpc-provider/build', '/packages/typegen/build', '/packages/types/build', - '/packages/types-known/build' + '/packages/types-known/build', + '/packages/x-rxjs/build' ], resolver: '@polkadot/dev/config/jest-resolver.cjs' }); diff --git a/package.json b/package.json index 0e5abd1bfe..8606079b64 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@babel/core": "^7.12.10", "@babel/register": "^7.12.10", "@babel/runtime": "^7.12.5", - "@polkadot/dev": "^0.60.23", + "@polkadot/dev": "^0.60.27", "@polkadot/ts": "^0.3.58", "@polkadot/typegen": "workspace:packages/typegen", "@types/jest": "^26.0.19", diff --git a/packages/api-contract/package.json b/packages/api-contract/package.json index 57fd57d787..0bce8c4061 100644 --- a/packages/api-contract/package.json +++ b/packages/api-contract/package.json @@ -15,8 +15,8 @@ "@babel/runtime": "^7.12.5", "@polkadot/api": "2.10.2-12", "@polkadot/types": "2.10.2-12", - "@polkadot/util": "^4.2.2-12", - "bn.js": "^4.11.9", - "rxjs": "^6.6.3" + "@polkadot/util": "^4.2.2-14", + "@polkadot/x-rxjs": "2.10.2-12", + "bn.js": "^4.11.9" } } diff --git a/packages/api-contract/src/base/Contract.ts b/packages/api-contract/src/base/Contract.ts index 73cff50c68..19da49a6e2 100644 --- a/packages/api-contract/src/base/Contract.ts +++ b/packages/api-contract/src/base/Contract.ts @@ -10,11 +10,11 @@ import type { AbiMessage, ContractCallOutcome, ContractOptions, DecodedEvent } f import type { ContractCallResult, ContractCallSend, ContractGeneric, ContractQuery, ContractTx, MapMessageQuery, MapMessageTx } from './types'; import BN from 'bn.js'; -import { map } from 'rxjs/operators'; import { SubmittableResult } from '@polkadot/api'; import { ApiBase } from '@polkadot/api/base'; import { assert, bnToBn, isFunction, isUndefined, logger, stringCamelCase } from '@polkadot/util'; +import { map } from '@polkadot/x-rxjs/operators'; import { Abi } from '../Abi'; import { applyOnEvent, extractOptions, formatData, isOptions } from '../util'; diff --git a/packages/api-contract/src/base/types.ts b/packages/api-contract/src/base/types.ts index e70f171820..88a33ffeac 100644 --- a/packages/api-contract/src/base/types.ts +++ b/packages/api-contract/src/base/types.ts @@ -2,11 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import type BN from 'bn.js'; -import type { Observable } from 'rxjs'; import type { SubmittableExtrinsic } from '@polkadot/api/submittable/types'; import type { ApiTypes, ObsInnerType } from '@polkadot/api/types'; import type { AccountId } from '@polkadot/types/interfaces'; import type { CodecArg } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { AbiMessage, BlueprintOptions, ContractCallOutcome, ContractOptions } from '../types'; export interface BlueprintDeploy { diff --git a/packages/api-derive/package.json b/packages/api-derive/package.json index cb5bf021af..f719eb6471 100644 --- a/packages/api-derive/package.json +++ b/packages/api-derive/package.json @@ -16,14 +16,14 @@ "@polkadot/api": "2.10.2-12", "@polkadot/rpc-core": "2.10.2-12", "@polkadot/types": "2.10.2-12", - "@polkadot/util": "^4.2.2-12", - "@polkadot/util-crypto": "^4.2.2-12", + "@polkadot/util": "^4.2.2-14", + "@polkadot/util-crypto": "^4.2.2-14", + "@polkadot/x-rxjs": "2.10.2-12", "bn.js": "^4.11.9", - "memoizee": "^0.4.14", - "rxjs": "^6.6.3" + "memoizee": "^0.4.14" }, "devDependencies": { - "@polkadot/keyring": "^4.2.2-12", + "@polkadot/keyring": "^4.2.2-14", "@polkadot/rpc-provider": "2.10.2-12" } } diff --git a/packages/api-derive/src/accounts/accountId.ts b/packages/api-derive/src/accounts/accountId.ts index 38eaa98062..dd092ac551 100644 --- a/packages/api-derive/src/accounts/accountId.ts +++ b/packages/api-derive/src/accounts/accountId.ts @@ -1,15 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; - -import { of } from 'rxjs'; -import { map } from 'rxjs/operators'; +import type { Observable } from '@polkadot/x-rxjs'; import { assertReturn, isU8a } from '@polkadot/util'; import { decodeAddress } from '@polkadot/util-crypto'; +import { of } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/accounts/flags.ts b/packages/api-derive/src/accounts/flags.ts index cb560c3074..679af0ff68 100644 --- a/packages/api-derive/src/accounts/flags.ts +++ b/packages/api-derive/src/accounts/flags.ts @@ -1,15 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Vec } from '@polkadot/types'; import type { AccountId, Address, Balance } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveAccountFlags } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/accounts/idAndIndex.ts b/packages/api-derive/src/accounts/idAndIndex.ts index e4b29a3df4..80765f8b84 100644 --- a/packages/api-derive/src/accounts/idAndIndex.ts +++ b/packages/api-derive/src/accounts/idAndIndex.ts @@ -1,16 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { AccountIdAndIndex } from '../types'; -import { of } from 'rxjs'; -import { map } from 'rxjs/operators'; - import { isU8a } from '@polkadot/util'; import { decodeAddress } from '@polkadot/util-crypto'; +import { of } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/accounts/idToIndex.ts b/packages/api-derive/src/accounts/idToIndex.ts index 8b21803bdd..faef079952 100644 --- a/packages/api-derive/src/accounts/idToIndex.ts +++ b/packages/api-derive/src/accounts/idToIndex.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { AccountId, AccountIndex } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { AccountIndexes } from '../types'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/accounts/identity.ts b/packages/api-derive/src/accounts/identity.ts index d0e6c703e2..f7f4f8b31b 100644 --- a/packages/api-derive/src/accounts/identity.ts +++ b/packages/api-derive/src/accounts/identity.ts @@ -1,17 +1,16 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Data, Option } from '@polkadot/types'; import type { AccountId, IdentityInfoAdditional, Registration } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveAccountRegistration, DeriveHasIdentity } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; - import { isHex, u8aToString } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/accounts/indexToId.ts b/packages/api-derive/src/accounts/indexToId.ts index 704f2cfd44..6ee7bdd11c 100644 --- a/packages/api-derive/src/accounts/indexToId.ts +++ b/packages/api-derive/src/accounts/indexToId.ts @@ -1,17 +1,16 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option, Vec } from '@polkadot/types'; import type { AccountId, AccountIndex, BalanceOf } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; - -import { of } from 'rxjs'; -import { map, startWith } from 'rxjs/operators'; +import type { Observable } from '@polkadot/x-rxjs'; import { ENUMSET_SIZE } from '@polkadot/types/generic/AccountIndex'; import { isFunction } from '@polkadot/util'; +import { of } from '@polkadot/x-rxjs'; +import { map, startWith } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/accounts/indexes.ts b/packages/api-derive/src/accounts/indexes.ts index 3c66b4af2d..9303ec04e5 100644 --- a/packages/api-derive/src/accounts/indexes.ts +++ b/packages/api-derive/src/accounts/indexes.ts @@ -1,17 +1,16 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Vec } from '@polkadot/types'; import type { AccountId, AccountIndex } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { AccountIndexes } from '../types'; -import { of } from 'rxjs'; -import { map, startWith, switchMap } from 'rxjs/operators'; - import { ENUMSET_SIZE } from '@polkadot/types/generic/AccountIndex'; import { isFunction } from '@polkadot/util'; +import { of } from '@polkadot/x-rxjs'; +import { map, startWith, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/accounts/info.ts b/packages/api-derive/src/accounts/info.ts index 82d857fd2c..a9c541b9c3 100644 --- a/packages/api-derive/src/accounts/info.ts +++ b/packages/api-derive/src/accounts/info.ts @@ -1,17 +1,16 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Bytes, Option, u32 } from '@polkadot/types'; import type { AccountId, AccountIndex, Address, Balance } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveAccountInfo, DeriveAccountRegistration } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; - import { u8aToString } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/balances/account.ts b/packages/api-derive/src/balances/account.ts index 39a178acad..ad6f746dd3 100644 --- a/packages/api-derive/src/balances/account.ts +++ b/packages/api-derive/src/balances/account.ts @@ -1,16 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { AccountData, AccountId, AccountIndex, AccountInfo, Address, Balance, Index } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveBalancesAccount } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; - import { isFunction } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/balances/all.ts b/packages/api-derive/src/balances/all.ts index 4c05bf509d..3f8d0f238e 100644 --- a/packages/api-derive/src/balances/all.ts +++ b/packages/api-derive/src/balances/all.ts @@ -1,17 +1,17 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option, Vec } from '@polkadot/types'; import type { AccountId, AccountIndex, Address, Balance, BalanceLock, BalanceLockTo212, BlockNumber, VestingInfo, VestingSchedule } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveBalancesAccount, DeriveBalancesAll } from '../types'; import BN from 'bn.js'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; import { bnMax, isFunction } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/balances/fees.ts b/packages/api-derive/src/balances/fees.ts index 80a271ee07..351b1c8565 100644 --- a/packages/api-derive/src/balances/fees.ts +++ b/packages/api-derive/src/balances/fees.ts @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Balance } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveFees } from '../types'; -import { of } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { of } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/balances/votingBalances.ts b/packages/api-derive/src/balances/votingBalances.ts index 8d98c99e72..7e323aafff 100644 --- a/packages/api-derive/src/balances/votingBalances.ts +++ b/packages/api-derive/src/balances/votingBalances.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { AccountId, AccountIndex, Address } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveBalancesAccount } from '../types'; -import { combineLatest, of } from 'rxjs'; +import { combineLatest, of } from '@polkadot/x-rxjs'; import { memo } from '../util'; diff --git a/packages/api-derive/src/chain/bestNumber.ts b/packages/api-derive/src/chain/bestNumber.ts index 6eebcf25e7..03ed28b3e7 100644 --- a/packages/api-derive/src/chain/bestNumber.ts +++ b/packages/api-derive/src/chain/bestNumber.ts @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { BlockNumber } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/chain/bestNumberFinalized.ts b/packages/api-derive/src/chain/bestNumberFinalized.ts index 50a5868798..a2e274c4bb 100644 --- a/packages/api-derive/src/chain/bestNumberFinalized.ts +++ b/packages/api-derive/src/chain/bestNumberFinalized.ts @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { BlockNumber } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/chain/bestNumberLag.ts b/packages/api-derive/src/chain/bestNumberLag.ts index 7a20e7b666..ebe84a5204 100644 --- a/packages/api-derive/src/chain/bestNumberLag.ts +++ b/packages/api-derive/src/chain/bestNumberLag.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { BlockNumber } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; -import { combineLatest } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { combineLatest } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/chain/getBlock.ts b/packages/api-derive/src/chain/getBlock.ts index dc45cbddc1..935bbaea06 100644 --- a/packages/api-derive/src/chain/getBlock.ts +++ b/packages/api-derive/src/chain/getBlock.ts @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; +import type { Observable } from '@polkadot/x-rxjs'; -import { combineLatest, of } from 'rxjs'; -import { catchError, map } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { catchError, map } from '@polkadot/x-rxjs/operators'; import { SignedBlockExtended } from '../type'; import { memo } from '../util'; diff --git a/packages/api-derive/src/chain/getHeader.ts b/packages/api-derive/src/chain/getHeader.ts index 0f85afc219..f1c15eab01 100644 --- a/packages/api-derive/src/chain/getHeader.ts +++ b/packages/api-derive/src/chain/getHeader.ts @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; +import type { Observable } from '@polkadot/x-rxjs'; -import { combineLatest, of } from 'rxjs'; -import { catchError, map } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { catchError, map } from '@polkadot/x-rxjs/operators'; import { HeaderExtended } from '../type'; import { memo } from '../util'; diff --git a/packages/api-derive/src/chain/subscribeNewBlocks.ts b/packages/api-derive/src/chain/subscribeNewBlocks.ts index fd0617ddd2..29455e68b2 100644 --- a/packages/api-derive/src/chain/subscribeNewBlocks.ts +++ b/packages/api-derive/src/chain/subscribeNewBlocks.ts @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { EventRecord, Hash, SignedBlock } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { FullNewBlock } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/chain/subscribeNewHeads.ts b/packages/api-derive/src/chain/subscribeNewHeads.ts index 6a07ed02b8..a28bce32be 100644 --- a/packages/api-derive/src/chain/subscribeNewHeads.ts +++ b/packages/api-derive/src/chain/subscribeNewHeads.ts @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; +import type { Observable } from '@polkadot/x-rxjs'; -import { combineLatest, of } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { HeaderExtended } from '../type'; import { memo } from '../util'; diff --git a/packages/api-derive/src/collective/proposals.ts b/packages/api-derive/src/collective/proposals.ts index ebe5a5558c..cbfbbb0b79 100644 --- a/packages/api-derive/src/collective/proposals.ts +++ b/packages/api-derive/src/collective/proposals.ts @@ -1,16 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option } from '@polkadot/types'; import type { Hash, Proposal, Votes } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveCollectiveProposal } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { catchError, map, switchMap } from 'rxjs/operators'; - import { isFunction } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { catchError, map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/contracts/fees.ts b/packages/api-derive/src/contracts/fees.ts index c0eee7b2df..99149cf498 100644 --- a/packages/api-derive/src/contracts/fees.ts +++ b/packages/api-derive/src/contracts/fees.ts @@ -1,13 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveContractFees } from '../types'; import BN from 'bn.js'; -import { of } from 'rxjs'; -import { map } from 'rxjs/operators'; + +import { of } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/council/proposals.ts b/packages/api-derive/src/council/proposals.ts index e294181f36..5b657acbe5 100644 --- a/packages/api-derive/src/council/proposals.ts +++ b/packages/api-derive/src/council/proposals.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Hash } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveCollectiveProposal } from '../types'; import { proposal as collectiveProposal, proposals as collectiveProposals } from '../collective'; diff --git a/packages/api-derive/src/council/votes.ts b/packages/api-derive/src/council/votes.ts index 6bb722641e..6e7b0b41f0 100644 --- a/packages/api-derive/src/council/votes.ts +++ b/packages/api-derive/src/council/votes.ts @@ -1,15 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Vec } from '@polkadot/types'; import type { AccountId, Balance } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveCouncilVote, DeriveCouncilVotes } from '../types'; -import { combineLatest } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { combineLatest } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/council/votesOf.ts b/packages/api-derive/src/council/votesOf.ts index 4db6081123..118523e9a9 100644 --- a/packages/api-derive/src/council/votesOf.ts +++ b/packages/api-derive/src/council/votesOf.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { AccountId } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveCouncilVote } from '../types'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/democracy/dispatchQueue.ts b/packages/api-derive/src/democracy/dispatchQueue.ts index f62c3d9547..7d3f6af728 100644 --- a/packages/api-derive/src/democracy/dispatchQueue.ts +++ b/packages/api-derive/src/democracy/dispatchQueue.ts @@ -1,17 +1,16 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option, u64, Vec } from '@polkadot/types'; import type { BlockNumber, Hash, ReferendumIndex, Scheduled } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveDispatch, DeriveProposalImage } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; - import { isFunction, stringToHex } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/democracy/locks.ts b/packages/api-derive/src/democracy/locks.ts index 2ac08376cb..b97fa27838 100644 --- a/packages/api-derive/src/democracy/locks.ts +++ b/packages/api-derive/src/democracy/locks.ts @@ -1,17 +1,17 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option } from '@polkadot/types'; import type { AccountId, ReferendumInfo, ReferendumInfoFinished, ReferendumInfoTo239, Vote, VotingDelegating, VotingDirect, VotingDirectVote } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveDemocracyLock } from '../types'; import BN from 'bn.js'; -import { of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; import { BN_ZERO, isUndefined } from '@polkadot/util'; +import { of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/democracy/nextExternal.ts b/packages/api-derive/src/democracy/nextExternal.ts index 39406f992d..22cd6bab07 100644 --- a/packages/api-derive/src/democracy/nextExternal.ts +++ b/packages/api-derive/src/democracy/nextExternal.ts @@ -1,15 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option } from '@polkadot/types'; import type { Hash, VoteThreshold } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveProposalExternal } from '../types'; -import { of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/democracy/preimage.ts b/packages/api-derive/src/democracy/preimage.ts index 347f7fd5cd..a25a9ec86b 100644 --- a/packages/api-derive/src/democracy/preimage.ts +++ b/packages/api-derive/src/democracy/preimage.ts @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Bytes, Option } from '@polkadot/types'; import type { AccountId, Balance, BlockNumber, Hash } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveProposalImage } from '../types'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; import { parseImage } from './util'; diff --git a/packages/api-derive/src/democracy/preimages.ts b/packages/api-derive/src/democracy/preimages.ts index e07a2eed0f..89f185d13d 100644 --- a/packages/api-derive/src/democracy/preimages.ts +++ b/packages/api-derive/src/democracy/preimages.ts @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Bytes, Option } from '@polkadot/types'; import type { AccountId, Balance, BlockNumber, Hash } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveProposalImage } from '../types'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; import { parseImage } from './util'; diff --git a/packages/api-derive/src/democracy/proposals.ts b/packages/api-derive/src/democracy/proposals.ts index 811f0a0fbc..be9e6979cc 100644 --- a/packages/api-derive/src/democracy/proposals.ts +++ b/packages/api-derive/src/democracy/proposals.ts @@ -1,17 +1,16 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option, Vec } from '@polkadot/types'; import type { AccountId, Balance, Hash, PropIndex } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveProposal, DeriveProposalImage } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; - import { isFunction } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/democracy/referendumIds.ts b/packages/api-derive/src/democracy/referendumIds.ts index e7f49ac727..6f53cb2a8f 100644 --- a/packages/api-derive/src/democracy/referendumIds.ts +++ b/packages/api-derive/src/democracy/referendumIds.ts @@ -1,13 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { ReferendumIndex } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import BN from 'bn.js'; -import { of } from 'rxjs'; -import { map } from 'rxjs/operators'; + +import { of } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/democracy/referendums.ts b/packages/api-derive/src/democracy/referendums.ts index e86da0b69b..f5b1ed5f72 100644 --- a/packages/api-derive/src/democracy/referendums.ts +++ b/packages/api-derive/src/democracy/referendums.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveReferendumExt } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/democracy/referendumsActive.ts b/packages/api-derive/src/democracy/referendumsActive.ts index f40ea8ac28..94c98d4e19 100644 --- a/packages/api-derive/src/democracy/referendumsActive.ts +++ b/packages/api-derive/src/democracy/referendumsActive.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveReferendum } from '../types'; -import { of } from 'rxjs'; -import { switchMap } from 'rxjs/operators'; +import { of } from '@polkadot/x-rxjs'; +import { switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/democracy/referendumsFinished.ts b/packages/api-derive/src/democracy/referendumsFinished.ts index bb7289dfa7..0f08a4142d 100644 --- a/packages/api-derive/src/democracy/referendumsFinished.ts +++ b/packages/api-derive/src/democracy/referendumsFinished.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option } from '@polkadot/types'; import type { ReferendumInfo, ReferendumInfoFinished } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/democracy/referendumsInfo.ts b/packages/api-derive/src/democracy/referendumsInfo.ts index 0d6e7af855..267704cbc1 100644 --- a/packages/api-derive/src/democracy/referendumsInfo.ts +++ b/packages/api-derive/src/democracy/referendumsInfo.ts @@ -1,17 +1,17 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option, Vec } from '@polkadot/types'; import type { AccountId, ReferendumInfo, ReferendumInfoTo239, Vote, Voting, VotingDelegating, VotingDirectVote } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveBalancesAccount, DeriveReferendum, DeriveReferendumVote, DeriveReferendumVotes } from '../types'; import BN from 'bn.js'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; import { isFunction } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; import { calcVotes, getStatus, parseImage } from './util'; diff --git a/packages/api-derive/src/democracy/sqrtElectorate.ts b/packages/api-derive/src/democracy/sqrtElectorate.ts index 421ea4f197..9b3aa4c42b 100644 --- a/packages/api-derive/src/democracy/sqrtElectorate.ts +++ b/packages/api-derive/src/democracy/sqrtElectorate.ts @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; +import type { Observable } from '@polkadot/x-rxjs'; import BN from 'bn.js'; -import { map } from 'rxjs/operators'; import { bnSqrt } from '@polkadot/util'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/elections/info.ts b/packages/api-derive/src/elections/info.ts index 8a4be07d63..01d8473ab9 100644 --- a/packages/api-derive/src/elections/info.ts +++ b/packages/api-derive/src/elections/info.ts @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { u32, Vec } from '@polkadot/types'; import type { AccountId, Balance, BlockNumber } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveElectionsInfo } from './types'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/imOnline/receivedHeartbeats.ts b/packages/api-derive/src/imOnline/receivedHeartbeats.ts index 3e9613fa9d..b0a98e48f4 100644 --- a/packages/api-derive/src/imOnline/receivedHeartbeats.ts +++ b/packages/api-derive/src/imOnline/receivedHeartbeats.ts @@ -1,16 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Bytes, Option, u32 } from '@polkadot/types'; import type { AccountId } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveHeartbeats } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; - import { BN_ZERO } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/index.spec.ts b/packages/api-derive/src/index.spec.ts index 69b9989359..fc08bd27d0 100644 --- a/packages/api-derive/src/index.spec.ts +++ b/packages/api-derive/src/index.spec.ts @@ -5,11 +5,10 @@ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/restrict-template-expressions */ -import { from, Observable } from 'rxjs'; - import { ApiRx } from '@polkadot/api/rx'; import { MockProvider } from '@polkadot/rpc-provider/mock'; import { TypeRegistry } from '@polkadot/types/create'; +import { from, Observable } from '@polkadot/x-rxjs'; import { ExactDerive } from '.'; diff --git a/packages/api-derive/src/index.ts b/packages/api-derive/src/index.ts index f8c2c33ff1..1827c38911 100644 --- a/packages/api-derive/src/index.ts +++ b/packages/api-derive/src/index.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { AnyFunction } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import * as accounts from './accounts'; import * as balances from './balances'; diff --git a/packages/api-derive/src/parachains/info.ts b/packages/api-derive/src/parachains/info.ts index 02ac55ff65..2063633561 100644 --- a/packages/api-derive/src/parachains/info.ts +++ b/packages/api-derive/src/parachains/info.ts @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { CollatorId, ParaId } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveParachainActive, DeriveParachainFull, DeriveParachainInfo } from '../types'; import type { Active, DidUpdate, Heads, ParaInfoResult, PendingSwap, RelayDispatchQueue, RetryQueue, SelectedThreads } from './types'; -import { of } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { of } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; import { didUpdateToBool } from './util'; diff --git a/packages/api-derive/src/parachains/overview.ts b/packages/api-derive/src/parachains/overview.ts index 734c833977..5841355283 100644 --- a/packages/api-derive/src/parachains/overview.ts +++ b/packages/api-derive/src/parachains/overview.ts @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { ParaId } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveParachain, DeriveParachainInfo } from '../types'; import type { DidUpdate, ParaInfoResult, PendingSwap, RelayDispatchQueueSize } from './types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; import { didUpdateToBool } from './util'; diff --git a/packages/api-derive/src/session/eraLength.ts b/packages/api-derive/src/session/eraLength.ts index b26c67703a..3e6ab01d43 100644 --- a/packages/api-derive/src/session/eraLength.ts +++ b/packages/api-derive/src/session/eraLength.ts @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { BlockNumber } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/session/eraProgress.ts b/packages/api-derive/src/session/eraProgress.ts index c682409d18..af522db631 100644 --- a/packages/api-derive/src/session/eraProgress.ts +++ b/packages/api-derive/src/session/eraProgress.ts @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { BlockNumber } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/session/indexes.ts b/packages/api-derive/src/session/indexes.ts index 8adf72579b..e896937687 100644 --- a/packages/api-derive/src/session/indexes.ts +++ b/packages/api-derive/src/session/indexes.ts @@ -1,16 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option, u32 } from '@polkadot/types'; import type { ActiveEraInfo, EraIndex, Moment, SessionIndex } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveSessionIndexes } from '../types'; -import { of } from 'rxjs'; -import { map } from 'rxjs/operators'; - import { isFunction } from '@polkadot/util'; +import { of } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/session/info.ts b/packages/api-derive/src/session/info.ts index f06d4e952e..badaf0550e 100644 --- a/packages/api-derive/src/session/info.ts +++ b/packages/api-derive/src/session/info.ts @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { u64 } from '@polkadot/types'; import type { SessionIndex } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveSessionIndexes, DeriveSessionInfo } from '../types'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/session/progress.ts b/packages/api-derive/src/session/progress.ts index e4ef36ba14..956aeb8e22 100644 --- a/packages/api-derive/src/session/progress.ts +++ b/packages/api-derive/src/session/progress.ts @@ -1,16 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option, u64 } from '@polkadot/types'; import type { SessionIndex } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveSessionInfo, DeriveSessionProgress } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; - import { isFunction } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/session/sessionProgress.ts b/packages/api-derive/src/session/sessionProgress.ts index bfe81e834d..9d43d0bf9a 100644 --- a/packages/api-derive/src/session/sessionProgress.ts +++ b/packages/api-derive/src/session/sessionProgress.ts @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { BlockNumber } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/society/candidates.ts b/packages/api-derive/src/society/candidates.ts index 692227368c..5b8ccb483e 100644 --- a/packages/api-derive/src/society/candidates.ts +++ b/packages/api-derive/src/society/candidates.ts @@ -1,15 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option, Vec } from '@polkadot/types'; import type { AccountId, BalanceOf, Bid, BidKind } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveSocietyCandidate } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/society/info.ts b/packages/api-derive/src/society/info.ts index fd2c219f10..e625227f2f 100644 --- a/packages/api-derive/src/society/info.ts +++ b/packages/api-derive/src/society/info.ts @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option, u32, Vec } from '@polkadot/types'; import type { AccountId, BalanceOf, Bid } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveSociety } from '../types'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/society/member.ts b/packages/api-derive/src/society/member.ts index 0d73125a95..456ad69b29 100644 --- a/packages/api-derive/src/society/member.ts +++ b/packages/api-derive/src/society/member.ts @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { bool, Option, Vec } from '@polkadot/types'; import type { AccountId, Balance, BlockNumber, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveSocietyMember } from '../types'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/society/members.ts b/packages/api-derive/src/society/members.ts index 96a83337a5..3a51f6231e 100644 --- a/packages/api-derive/src/society/members.ts +++ b/packages/api-derive/src/society/members.ts @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { AccountId } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveSocietyMember } from '../types'; -import { combineLatest } from 'rxjs'; -import { switchMap } from 'rxjs/operators'; +import { combineLatest } from '@polkadot/x-rxjs'; +import { switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/account.ts b/packages/api-derive/src/staking/account.ts index e3e5fcb4b6..14137d3f90 100644 --- a/packages/api-derive/src/staking/account.ts +++ b/packages/api-derive/src/staking/account.ts @@ -6,10 +6,10 @@ import type { Balance, StakingLedger, UnlockChunk } from '@polkadot/types/interf import type { DeriveSessionInfo, DeriveStakingAccount, DeriveStakingKeys, DeriveStakingQuery, DeriveUnlocking } from '../types'; import BN from 'bn.js'; -import { combineLatest, Observable } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; import { BN_ZERO } from '@polkadot/util'; +import { combineLatest, Observable } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/currentPoints.ts b/packages/api-derive/src/staking/currentPoints.ts index 553d52a751..2f2e0d430e 100644 --- a/packages/api-derive/src/staking/currentPoints.ts +++ b/packages/api-derive/src/staking/currentPoints.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { AccountId, EraPoints, EraRewardPoints, RewardPoint } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; -import { of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/electedInfo.ts b/packages/api-derive/src/staking/electedInfo.ts index d8044ed1ef..b6c23ad89d 100644 --- a/packages/api-derive/src/staking/electedInfo.ts +++ b/packages/api-derive/src/staking/electedInfo.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { AccountId } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveStakingElected } from '../types'; -import { map, switchMap } from 'rxjs/operators'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/erasExposure.ts b/packages/api-derive/src/staking/erasExposure.ts index 5186273b73..ed176c05a2 100644 --- a/packages/api-derive/src/staking/erasExposure.ts +++ b/packages/api-derive/src/staking/erasExposure.ts @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { StorageKey } from '@polkadot/types'; import type { EraIndex, Exposure } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveEraExposure, DeriveEraNominatorExposure, DeriveEraValidatorExposure } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { deriveCache, memo } from '../util'; diff --git a/packages/api-derive/src/staking/erasHistoric.ts b/packages/api-derive/src/staking/erasHistoric.ts index 1abe3c1323..08fd45a477 100644 --- a/packages/api-derive/src/staking/erasHistoric.ts +++ b/packages/api-derive/src/staking/erasHistoric.ts @@ -1,14 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option, u32 } from '@polkadot/types'; import type { ActiveEraInfo, EraIndex } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import BN from 'bn.js'; -import { of } from 'rxjs'; -import { map } from 'rxjs/operators'; + +import { of } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/erasPoints.ts b/packages/api-derive/src/staking/erasPoints.ts index b410adaf2f..7b134c11c2 100644 --- a/packages/api-derive/src/staking/erasPoints.ts +++ b/packages/api-derive/src/staking/erasPoints.ts @@ -1,15 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { EraIndex, EraRewardPoints } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveEraPoints, DeriveEraValPoints } from '../types'; -import { of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; - import { BN_ZERO } from '@polkadot/util'; +import { of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { deriveCache, memo } from '../util'; import { filterEras } from './util'; diff --git a/packages/api-derive/src/staking/erasPrefs.ts b/packages/api-derive/src/staking/erasPrefs.ts index 3e8f3936d2..0a9107360b 100644 --- a/packages/api-derive/src/staking/erasPrefs.ts +++ b/packages/api-derive/src/staking/erasPrefs.ts @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { StorageKey } from '@polkadot/types'; import type { EraIndex, ValidatorPrefs } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveEraPrefs, DeriveEraValPrefs } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { deriveCache, memo } from '../util'; diff --git a/packages/api-derive/src/staking/erasRewards.ts b/packages/api-derive/src/staking/erasRewards.ts index 4fbcdbb49d..1aa8d3018c 100644 --- a/packages/api-derive/src/staking/erasRewards.ts +++ b/packages/api-derive/src/staking/erasRewards.ts @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option } from '@polkadot/types'; import type { Balance, EraIndex } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveEraRewards } from '../types'; -import { of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { deriveCache, memo } from '../util'; import { filterEras } from './util'; diff --git a/packages/api-derive/src/staking/erasSlashes.ts b/packages/api-derive/src/staking/erasSlashes.ts index 0b8c3f63b3..b8aea7c675 100644 --- a/packages/api-derive/src/staking/erasSlashes.ts +++ b/packages/api-derive/src/staking/erasSlashes.ts @@ -1,15 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option, StorageKey } from '@polkadot/types'; import type { BalanceOf, EraIndex, Perbill } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveEraSlashes, DeriveEraValSlash } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { deriveCache, memo } from '../util'; diff --git a/packages/api-derive/src/staking/keys.ts b/packages/api-derive/src/staking/keys.ts index fac91acf5c..7c725b5a53 100644 --- a/packages/api-derive/src/staking/keys.ts +++ b/packages/api-derive/src/staking/keys.ts @@ -1,15 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option, Vec } from '@polkadot/types'; import type { AccountId, Keys } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveStakingKeys } from './types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/overview.ts b/packages/api-derive/src/staking/overview.ts index 8df9114253..9e476b90a1 100644 --- a/packages/api-derive/src/staking/overview.ts +++ b/packages/api-derive/src/staking/overview.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveStakingOverview } from '../types'; -import { combineLatest } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { combineLatest } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/ownExposure.ts b/packages/api-derive/src/staking/ownExposure.ts index 9e271b56a7..f8f2aa6e27 100644 --- a/packages/api-derive/src/staking/ownExposure.ts +++ b/packages/api-derive/src/staking/ownExposure.ts @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { EraIndex, Exposure } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveOwnExposure } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { deriveCache, memo } from '../util'; diff --git a/packages/api-derive/src/staking/ownSlashes.ts b/packages/api-derive/src/staking/ownSlashes.ts index 7d9e59312f..360bfc4d5e 100644 --- a/packages/api-derive/src/staking/ownSlashes.ts +++ b/packages/api-derive/src/staking/ownSlashes.ts @@ -1,15 +1,15 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option } from '@polkadot/types'; import type { BalanceOf, EraIndex, Perbill } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveStakerSlashes } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { deriveCache, memo } from '../util'; diff --git a/packages/api-derive/src/staking/query.ts b/packages/api-derive/src/staking/query.ts index 9314b9b35f..422efec822 100644 --- a/packages/api-derive/src/staking/query.ts +++ b/packages/api-derive/src/staking/query.ts @@ -1,17 +1,16 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option } from '@polkadot/types'; import type { AccountId, EraIndex, Exposure, Nominations, RewardDestination, StakingLedger, ValidatorPrefs } from '@polkadot/types/interfaces'; import type { ITuple } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveStakingQuery } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; - import { isFunction } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/stakerExposure.ts b/packages/api-derive/src/staking/stakerExposure.ts index 381d647865..efd556bf54 100644 --- a/packages/api-derive/src/staking/stakerExposure.ts +++ b/packages/api-derive/src/staking/stakerExposure.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { EraIndex } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveEraValidatorExposure, DeriveStakerExposure } from '../types'; -import { map, switchMap } from 'rxjs/operators'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/stakerPoints.ts b/packages/api-derive/src/staking/stakerPoints.ts index 904341e53e..c1220fe64a 100644 --- a/packages/api-derive/src/staking/stakerPoints.ts +++ b/packages/api-derive/src/staking/stakerPoints.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { EraIndex } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveStakerPoints } from '../types'; -import { map, switchMap } from 'rxjs/operators'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/stakerPrefs.ts b/packages/api-derive/src/staking/stakerPrefs.ts index a0fdc0b0e7..e8dafe1c90 100644 --- a/packages/api-derive/src/staking/stakerPrefs.ts +++ b/packages/api-derive/src/staking/stakerPrefs.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { EraIndex, ValidatorPrefs } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveStakerPrefs } from '../types'; -import { map, switchMap } from 'rxjs/operators'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/stakerRewards.ts b/packages/api-derive/src/staking/stakerRewards.ts index 365adeaf41..324ed53a57 100644 --- a/packages/api-derive/src/staking/stakerRewards.ts +++ b/packages/api-derive/src/staking/stakerRewards.ts @@ -1,18 +1,18 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option } from '@polkadot/types'; import type { AccountId, EraIndex, StakingLedger, StakingLedgerTo240 } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveEraPoints, DeriveEraPrefs, DeriveEraRewards, DeriveEraValPrefs, DeriveStakerExposure, DeriveStakerReward, DeriveStakerRewardValidator } from '../types'; import type { DeriveStakingQuery } from './types'; import BN from 'bn.js'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; import { isFunction } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/stakerSlashes.ts b/packages/api-derive/src/staking/stakerSlashes.ts index d33dab9b9d..c382d29423 100644 --- a/packages/api-derive/src/staking/stakerSlashes.ts +++ b/packages/api-derive/src/staking/stakerSlashes.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { EraIndex } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveStakerSlashes } from '../types'; -import { map, switchMap } from 'rxjs/operators'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/stashes.ts b/packages/api-derive/src/staking/stashes.ts index baed329c85..c035a24323 100644 --- a/packages/api-derive/src/staking/stashes.ts +++ b/packages/api-derive/src/staking/stashes.ts @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { AccountId } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; -import { map } from 'rxjs/operators'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/validators.ts b/packages/api-derive/src/staking/validators.ts index 13a1deb4c2..1e00fd1bc4 100644 --- a/packages/api-derive/src/staking/validators.ts +++ b/packages/api-derive/src/staking/validators.ts @@ -1,13 +1,13 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { AccountId } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveStakingValidators } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/staking/waitingInfo.ts b/packages/api-derive/src/staking/waitingInfo.ts index a271264685..183ea3c36c 100644 --- a/packages/api-derive/src/staking/waitingInfo.ts +++ b/packages/api-derive/src/staking/waitingInfo.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveStakingWaiting } from '../types'; -import { combineLatest } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/technicalCommittee/proposals.ts b/packages/api-derive/src/technicalCommittee/proposals.ts index 5ab9cf16ad..59d9a0bb86 100644 --- a/packages/api-derive/src/technicalCommittee/proposals.ts +++ b/packages/api-derive/src/technicalCommittee/proposals.ts @@ -1,8 +1,8 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveCollectiveProposal } from '../types'; import { proposals as collectiveProposals } from '../collective'; diff --git a/packages/api-derive/src/treasury/bounties.spec.ts b/packages/api-derive/src/treasury/bounties.spec.ts index a06553dec4..3eb7621504 100644 --- a/packages/api-derive/src/treasury/bounties.spec.ts +++ b/packages/api-derive/src/treasury/bounties.spec.ts @@ -6,9 +6,8 @@ import type { Bytes, Option, StorageKey } from '@polkadot/types'; import type { Bounty, BountyIndex } from '@polkadot/types/interfaces'; import type { Codec, InterfaceTypes } from '@polkadot/types/types'; -import { of } from 'rxjs'; - import { bounties } from '@polkadot/api-derive/treasury/bounties'; +import { of } from '@polkadot/x-rxjs'; import { BountyFactory } from '../../test/bountyFactory'; import { BytesFactory } from '../../test/bytesFactory'; diff --git a/packages/api-derive/src/treasury/bounties.ts b/packages/api-derive/src/treasury/bounties.ts index 9c44e306f7..a097ae5c74 100644 --- a/packages/api-derive/src/treasury/bounties.ts +++ b/packages/api-derive/src/treasury/bounties.ts @@ -1,17 +1,16 @@ // Copyright 2017-2020 @polkadot/api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { DeriveBounties } from '@polkadot/api-derive/types'; import type { Bytes, Option, StorageKey } from '@polkadot/types'; import type { Bounty } from '@polkadot/types/interfaces'; import type { Codec } from '@polkadot/types/types'; - -import { combineLatest } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import type { Observable } from '@polkadot/x-rxjs'; import { memo } from '@polkadot/api-derive/util'; +import { combineLatest } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; function parseResult ([maybeBounties, maybeDescriptions]: [Option[], Option[]]): DeriveBounties { const bounties: DeriveBounties = []; diff --git a/packages/api-derive/src/treasury/proposals.ts b/packages/api-derive/src/treasury/proposals.ts index 6eb0f16210..ed83266b7f 100644 --- a/packages/api-derive/src/treasury/proposals.ts +++ b/packages/api-derive/src/treasury/proposals.ts @@ -1,14 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Option } from '@polkadot/types'; import type { ProposalIndex, TreasuryProposal } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; import type { DeriveCollectiveProposal, DeriveTreasuryProposal, DeriveTreasuryProposals } from '../types'; -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/tx/events.ts b/packages/api-derive/src/tx/events.ts index 9cab63896f..9ed89e0606 100644 --- a/packages/api-derive/src/tx/events.ts +++ b/packages/api-derive/src/tx/events.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { EventRecord, Hash, SignedBlock } from '@polkadot/types/interfaces'; +import type { Observable } from '@polkadot/x-rxjs'; -import { combineLatest } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { combineLatest } from '@polkadot/x-rxjs'; +import { map } from '@polkadot/x-rxjs/operators'; import { memo } from '../util'; diff --git a/packages/api-derive/src/tx/signingInfo.ts b/packages/api-derive/src/tx/signingInfo.ts index 26390bd29e..d28067035a 100644 --- a/packages/api-derive/src/tx/signingInfo.ts +++ b/packages/api-derive/src/tx/signingInfo.ts @@ -1,15 +1,14 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Header, Index } from '@polkadot/types/interfaces'; import type { AnyNumber, Codec, IExtrinsicEra } from '@polkadot/types/types'; - -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import type { Observable } from '@polkadot/x-rxjs'; import { isNumber, isUndefined } from '@polkadot/util'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { FALLBACK_MAX_HASH_COUNT, FALLBACK_PERIOD, MAX_FINALITY_LAG, MORTAL_PERIOD } from './constants'; diff --git a/packages/api-derive/src/util/memo.ts b/packages/api-derive/src/util/memo.ts index b01980ef11..393ee648ea 100644 --- a/packages/api-derive/src/util/memo.ts +++ b/packages/api-derive/src/util/memo.ts @@ -1,12 +1,12 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observer, TeardownLogic } from 'rxjs'; +import type { Observer, TeardownLogic } from '@polkadot/x-rxjs'; import createMemo from 'memoizee'; -import { Observable } from 'rxjs'; import { drr, normalizer } from '@polkadot/rpc-core/util'; +import { Observable } from '@polkadot/x-rxjs'; type ObsFn = (...params: any[]) => Observable; diff --git a/packages/api/package.json b/packages/api/package.json index 17aede4782..f29442f35f 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -14,16 +14,16 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@polkadot/api-derive": "2.10.2-12", - "@polkadot/keyring": "^4.2.2-12", + "@polkadot/keyring": "^4.2.2-14", "@polkadot/metadata": "2.10.2-12", "@polkadot/rpc-core": "2.10.2-12", "@polkadot/rpc-provider": "2.10.2-12", "@polkadot/types": "2.10.2-12", "@polkadot/types-known": "2.10.2-12", - "@polkadot/util": "^4.2.2-12", - "@polkadot/util-crypto": "^4.2.2-12", + "@polkadot/util": "^4.2.2-14", + "@polkadot/util-crypto": "^4.2.2-14", + "@polkadot/x-rxjs": "2.10.2-12", "bn.js": "^4.11.9", - "eventemitter3": "^4.0.7", - "rxjs": "^6.6.3" + "eventemitter3": "^4.0.7" } } diff --git a/packages/api/src/base/Decorate.ts b/packages/api/src/base/Decorate.ts index 693b3bb2ec..49c205a65e 100644 --- a/packages/api/src/base/Decorate.ts +++ b/packages/api/src/base/Decorate.ts @@ -11,8 +11,6 @@ import type { SubmittableExtrinsic } from '../submittable/types'; import type { ApiInterfaceRx, ApiOptions, ApiTypes, DecoratedRpc, DecoratedRpcSection, DecorateMethod, PaginationOptions, QueryableConsts, QueryableModuleStorage, QueryableStorage, QueryableStorageEntry, QueryableStorageMulti, QueryableStorageMultiArg, SubmittableExtrinsicFunction, SubmittableExtrinsics, SubmittableModuleExtrinsics } from '../types'; import BN from 'bn.js'; -import { BehaviorSubject, combineLatest, Observable, of } from 'rxjs'; -import { map, switchMap, take, tap, toArray } from 'rxjs/operators'; import { decorateDerive, DeriveCustom, ExactDerive } from '@polkadot/api-derive'; import { memo } from '@polkadot/api-derive/util'; @@ -23,6 +21,8 @@ import { TypeRegistry } from '@polkadot/types/create'; import { DEFAULT_VERSION as EXTRINSIC_DEFAULT_VERSION } from '@polkadot/types/extrinsic/constants'; import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey'; import { assert, compactStripLength, logger, u8aToHex } from '@polkadot/util'; +import { BehaviorSubject, combineLatest, Observable, of } from '@polkadot/x-rxjs'; +import { map, switchMap, take, tap, toArray } from '@polkadot/x-rxjs/operators'; import { createSubmittable } from '../submittable'; import { augmentObject } from '../util/augmentObject'; diff --git a/packages/api/src/base/Init.ts b/packages/api/src/base/Init.ts index 4117776fb2..809aca0002 100644 --- a/packages/api/src/base/Init.ts +++ b/packages/api/src/base/Init.ts @@ -1,16 +1,14 @@ // Copyright 2017-2020 @polkadot/api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable, Subscription } from 'rxjs'; import type { Text } from '@polkadot/types'; import type { ChainProperties, RuntimeVersion, SignedBlock } from '@polkadot/types/interfaces'; import type { Registry } from '@polkadot/types/types'; +import type { Observable, Subscription } from '@polkadot/x-rxjs'; import type { ApiBase, ApiOptions, ApiTypes, DecorateMethod } from '../types'; import type { VersionedRegistry } from './types'; import BN from 'bn.js'; -import { of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; import { Metadata } from '@polkadot/metadata'; import { TypeRegistry } from '@polkadot/types/create'; @@ -18,6 +16,8 @@ import { LATEST_EXTRINSIC_VERSION } from '@polkadot/types/extrinsic/Extrinsic'; import { getSpecAlias, getSpecRpc, getSpecTypes, getUpgradeVersion } from '@polkadot/types-known'; import { assert, BN_ZERO, logger, u8aEq, u8aToU8a } from '@polkadot/util'; import { cryptoWaitReady } from '@polkadot/util-crypto'; +import { of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { Decorate } from './Decorate'; diff --git a/packages/api/src/detectPackage.ts b/packages/api/src/detectPackage.ts index 37f7398b5f..11da5bbd0d 100644 --- a/packages/api/src/detectPackage.ts +++ b/packages/api/src/detectPackage.ts @@ -3,6 +3,6 @@ import { detectPackage } from '@polkadot/util'; -// FIXME This really should be `import(...).then(...)`, but need to check rejections -// eslint-disable-next-line @typescript-eslint/no-var-requires -detectPackage(require('./package.json'), typeof __dirname !== 'undefined' && __dirname); +import packageJson from './package.json'; + +detectPackage(packageJson, typeof __dirname !== 'undefined' && __dirname); diff --git a/packages/api/src/promise/index.ts b/packages/api/src/promise/index.ts index 8f5aea6d63..4d8538515b 100644 --- a/packages/api/src/promise/index.ts +++ b/packages/api/src/promise/index.ts @@ -4,10 +4,9 @@ import type { Callback, Codec } from '@polkadot/types/types'; import type { ApiOptions, DecorateFn, DecorateMethodOptions, ObsInnerType, StorageEntryPromiseOverloads, UnsubscribePromise, VoidFn } from '../types'; -import { EMPTY, Observable, Subscription } from 'rxjs'; -import { catchError, tap } from 'rxjs/operators'; - import { assert, isFunction } from '@polkadot/util'; +import { EMPTY, Observable, Subscription } from '@polkadot/x-rxjs'; +import { catchError, tap } from '@polkadot/x-rxjs/operators'; import { ApiBase } from '../base'; import { Combinator, CombinatorCallback, CombinatorFunction } from './Combinator'; diff --git a/packages/api/src/rx/index.spec.ts b/packages/api/src/rx/index.spec.ts index 9d019efadb..a3d1ad28ee 100644 --- a/packages/api/src/rx/index.spec.ts +++ b/packages/api/src/rx/index.spec.ts @@ -1,14 +1,13 @@ // Copyright 2017-2020 @polkadot/api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; +import type { Observable } from '@polkadot/x-rxjs'; import type { SubmittableExtrinsic } from '../submittable/types'; -import { map, switchMap } from 'rxjs/operators'; - import { createTestPairs } from '@polkadot/keyring/testingPairs'; import { MockProvider } from '@polkadot/rpc-provider/mock'; import { TypeRegistry } from '@polkadot/types/create'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; import { SingleAccountSigner } from '../../test/util'; import { ApiRx } from '.'; diff --git a/packages/api/src/rx/index.ts b/packages/api/src/rx/index.ts index 5b99f0b14c..f568713fa9 100644 --- a/packages/api/src/rx/index.ts +++ b/packages/api/src/rx/index.ts @@ -4,7 +4,7 @@ import type { Codec } from '@polkadot/types/types'; import type { ApiOptions, DecorateFn } from '../types'; -import { from, Observable } from 'rxjs'; +import { from, Observable } from '@polkadot/x-rxjs'; import { ApiBase } from '../base'; @@ -48,8 +48,8 @@ export function decorateMethod > (method: Metho *
* * ```javascript - * import { combineLatest } from 'rxjs'; - * import { pairwise, switchMap } from 'rxjs/operators'; + * import { combineLatest } from '@polkadot/x-rxjs'; + * import { pairwise, switchMap } from '@polkadot/x-rxjs/operators'; * import { ApiRx, WsProvider } from '@polkadot/api'; * * @@ -78,7 +78,7 @@ export function decorateMethod > (method: Metho *
* * ```javascript - * import { first, switchMap } from 'rxjs/operators'; + * import { first, switchMap } from '@polkadot/x-rxjs/operators'; * import ApiRx from '@polkadot/api/rx'; * * // import the test keyring (already has dev keys for Alice, Bob, Charlie, Eve & Ferdie) @@ -122,7 +122,7 @@ export class ApiRx extends ApiBase<'rxjs'> { *
* * ```javascript - * import { switchMap } from 'rxjs/operators'; + * import { switchMap } from '@polkadot/x-rxjs/operators'; * import Api from '@polkadot/api/rx'; * * Api.create() @@ -146,7 +146,7 @@ export class ApiRx extends ApiBase<'rxjs'> { *
* * ```javascript - * import { switchMap } from 'rxjs/operators'; + * import { switchMap } from '@polkadot/x-rxjs/operators'; * import Api from '@polkadot/api/rx'; * * new Api().isReady diff --git a/packages/api/src/submittable/createClass.ts b/packages/api/src/submittable/createClass.ts index 77e1b140fc..9d6a0c47e2 100644 --- a/packages/api/src/submittable/createClass.ts +++ b/packages/api/src/submittable/createClass.ts @@ -3,16 +3,15 @@ /* eslint-disable no-dupe-class-members */ -import type { Observable } from 'rxjs'; import type { Address, ApplyExtrinsicResult, Call, Extrinsic, ExtrinsicEra, ExtrinsicStatus, Hash, Header, Index, RuntimeDispatchInfo } from '@polkadot/types/interfaces'; import type { Callback, Codec, Constructor, IKeyringPair, ISubmittableResult, Registry, SignatureOptions } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { ApiInterfaceRx, ApiTypes, SignerResult } from '../types'; import type { AddressOrPair, SignerOptions, SubmittableDryRunResult, SubmittableExtrinsic, SubmittablePaymentResult, SubmittableResultResult, SubmittableResultSubscription, SubmittableThis } from './types'; -import { of } from 'rxjs'; -import { first, map, mapTo, mergeMap, switchMap, tap } from 'rxjs/operators'; - import { assert, isBn, isFunction, isNumber, isString, isU8a } from '@polkadot/util'; +import { of } from '@polkadot/x-rxjs'; +import { first, map, mapTo, mergeMap, switchMap, tap } from '@polkadot/x-rxjs/operators'; import { ApiBase } from '../base'; import { filterEvents, isKeyringPair } from '../util'; diff --git a/packages/api/src/submittable/types.ts b/packages/api/src/submittable/types.ts index 8cabc0acf9..6f830b25b5 100644 --- a/packages/api/src/submittable/types.ts +++ b/packages/api/src/submittable/types.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { AccountId, Address, ApplyExtrinsicResult, DispatchError, DispatchInfo, EventRecord, Extrinsic, ExtrinsicStatus, Hash, RuntimeDispatchInfo } from '@polkadot/types/interfaces'; import type { AnyNumber, Callback, Codec, IExtrinsicEra, IKeyringPair, ISubmittableResult, Signer } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { ApiTypes } from '../types'; export interface SubmittableResultValue { diff --git a/packages/api/src/types/base.ts b/packages/api/src/types/base.ts index a8989249a1..7166b8a29b 100644 --- a/packages/api/src/types/base.ts +++ b/packages/api/src/types/base.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // eslint-disable-next-line @typescript-eslint/no-unused-vars -import type { Observable } from 'rxjs'; import type { AnyFunction, Callback, Codec, CodecArg } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; // Prepend an element V onto the beginning of a tuple T. // Cons<1, [2,3,4]> is [1,2,3,4] diff --git a/packages/api/src/types/rpc.ts b/packages/api/src/types/rpc.ts index 3e4613cfc1..12bb146225 100644 --- a/packages/api/src/types/rpc.ts +++ b/packages/api/src/types/rpc.ts @@ -1,9 +1,9 @@ // Copyright 2017-2020 @polkadot/api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { Json, Raw } from '@polkadot/types/codec'; import type { AnyFunction, Callback } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; // eslint-disable-next-line @typescript-eslint/no-unused-vars import { ApiTypes, PromiseResult, Push, RxResult, UnsubscribePromise } from './base'; diff --git a/packages/api/src/types/storage.ts b/packages/api/src/types/storage.ts index 6f6c76da3f..532c92411b 100644 --- a/packages/api/src/types/storage.ts +++ b/packages/api/src/types/storage.ts @@ -1,11 +1,11 @@ // Copyright 2017-2020 @polkadot/api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { StorageKey, u64 } from '@polkadot/types'; import type { Hash } from '@polkadot/types/interfaces'; import type { StorageEntry } from '@polkadot/types/primitive/types'; import type { AnyFunction, Callback, Codec, CodecArg } from '@polkadot/types/types'; +import type { Observable } from '@polkadot/x-rxjs'; import type { ApiTypes, MethodResult, ObsInnerType, PaginationOptions, PromiseOrObs, UnsubscribePromise } from './base'; interface StorageEntryObservableMulti { diff --git a/packages/api/test/typesBundleDerive.spec.ts b/packages/api/test/typesBundleDerive.spec.ts index 9d279cb513..5ac76a9e11 100644 --- a/packages/api/test/typesBundleDerive.spec.ts +++ b/packages/api/test/typesBundleDerive.spec.ts @@ -1,17 +1,16 @@ // Copyright 2017-2020 @polkadot/api authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; import type { ApiInterfaceRx } from '@polkadot/api/types'; import type { Enum, Struct } from '@polkadot/types'; import type { Option } from '@polkadot/types/codec'; import type { AccountId, AccountIndex, AccountInfo, Address, Balance, BlockNumber, Index } from '@polkadot/types/interfaces'; - -import { combineLatest, of } from 'rxjs'; -import { map, switchMap } from 'rxjs/operators'; +import type { Observable } from '@polkadot/x-rxjs'; import { ApiPromise, WsProvider } from '@polkadot/api'; import { memo } from '@polkadot/api-derive/util/memo'; +import { combineLatest, of } from '@polkadot/x-rxjs'; +import { map, switchMap } from '@polkadot/x-rxjs/operators'; interface VestingInfo extends Struct { readonly locked: Balance; diff --git a/packages/metadata/package.json b/packages/metadata/package.json index e1f9f83ea6..8f26923a91 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -15,11 +15,11 @@ "@babel/runtime": "^7.12.5", "@polkadot/types": "2.10.2-12", "@polkadot/types-known": "2.10.2-12", - "@polkadot/util": "^4.2.2-12", - "@polkadot/util-crypto": "^4.2.2-12", + "@polkadot/util": "^4.2.2-14", + "@polkadot/util-crypto": "^4.2.2-14", "bn.js": "^4.11.9" }, "devDependencies": { - "@polkadot/keyring": "^4.2.2-12" + "@polkadot/keyring": "^4.2.2-14" } } diff --git a/packages/rpc-core/package.json b/packages/rpc-core/package.json index 7dd99dab7b..5bcc5d4eea 100644 --- a/packages/rpc-core/package.json +++ b/packages/rpc-core/package.json @@ -16,11 +16,11 @@ "@polkadot/metadata": "2.10.2-12", "@polkadot/rpc-provider": "2.10.2-12", "@polkadot/types": "2.10.2-12", - "@polkadot/util": "^4.2.2-12", - "memoizee": "^0.4.14", - "rxjs": "^6.6.3" + "@polkadot/util": "^4.2.2-14", + "@polkadot/x-rxjs": "2.10.2-12", + "memoizee": "^0.4.14" }, "devDependencies": { - "@polkadot/keyring": "^4.2.2-12" + "@polkadot/keyring": "^4.2.2-14" } } diff --git a/packages/rpc-core/src/index.ts b/packages/rpc-core/src/index.ts index bc10fcf997..c44df99e57 100644 --- a/packages/rpc-core/src/index.ts +++ b/packages/rpc-core/src/index.ts @@ -1,21 +1,21 @@ // Copyright 2017-2020 @polkadot/rpc-core authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observer } from 'rxjs'; import type { ProviderInterface, ProviderInterfaceCallback } from '@polkadot/rpc-provider/types'; import type { StorageKey, Vec } from '@polkadot/types'; import type { Hash } from '@polkadot/types/interfaces'; import type { AnyJson, Codec, DefinitionRpc, DefinitionRpcExt, DefinitionRpcSub, Registry } from '@polkadot/types/types'; +import type { Observer } from '@polkadot/x-rxjs'; import type { RpcInterface, RpcInterfaceMethod } from './types'; import memoizee from 'memoizee'; -import { Observable } from 'rxjs'; -import { publishReplay, refCount } from 'rxjs/operators'; import { Option } from '@polkadot/types'; import { createClass, createTypeUnsafe } from '@polkadot/types/create'; import jsonrpc from '@polkadot/types/interfaces/jsonrpc'; import { assert, hexToU8a, isFunction, isNull, isUndefined, logger, u8aToU8a } from '@polkadot/util'; +import { Observable } from '@polkadot/x-rxjs'; +import { publishReplay, refCount } from '@polkadot/x-rxjs/operators'; import { drr, normalizer, refCountDelay } from './util'; diff --git a/packages/rpc-core/src/replay.spec.ts b/packages/rpc-core/src/replay.spec.ts index daa0309e44..74ae378d26 100644 --- a/packages/rpc-core/src/replay.spec.ts +++ b/packages/rpc-core/src/replay.spec.ts @@ -1,12 +1,11 @@ // Copyright 2017-2020 @polkadot/rpc-core authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; - -import { of } from 'rxjs'; +import type { Observable } from '@polkadot/x-rxjs'; import { MockProvider } from '@polkadot/rpc-provider/mock'; import { TypeRegistry } from '@polkadot/types/create'; +import { of } from '@polkadot/x-rxjs'; import { RpcCore } from '.'; diff --git a/packages/rpc-core/src/types.ts b/packages/rpc-core/src/types.ts index d3dfcb89e9..d97d5ff062 100644 --- a/packages/rpc-core/src/types.ts +++ b/packages/rpc-core/src/types.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/rpc-core authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; +import type { Observable } from '@polkadot/x-rxjs'; export * from './types.jsonrpc'; diff --git a/packages/rpc-core/src/util/drr.spec.ts b/packages/rpc-core/src/util/drr.spec.ts index aec458b738..74ef0e4171 100644 --- a/packages/rpc-core/src/util/drr.spec.ts +++ b/packages/rpc-core/src/util/drr.spec.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/api-derive authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { of, timer } from 'rxjs'; +import { of, timer } from '@polkadot/x-rxjs'; import { drr } from '.'; diff --git a/packages/rpc-core/src/util/drr.ts b/packages/rpc-core/src/util/drr.ts index bb2ea7fb20..a1b74d83e7 100644 --- a/packages/rpc-core/src/util/drr.ts +++ b/packages/rpc-core/src/util/drr.ts @@ -1,11 +1,10 @@ // Copyright 2017-2020 @polkadot/rpc-core authors & contributors // SPDX-License-Identifier: Apache-2.0 -import type { Observable } from 'rxjs'; - -import { catchError, distinctUntilChanged, publishReplay, refCount, tap } from 'rxjs/operators'; +import type { Observable } from '@polkadot/x-rxjs'; import { logger } from '@polkadot/util'; +import { catchError, distinctUntilChanged, publishReplay, refCount, tap } from '@polkadot/x-rxjs/operators'; import { refCountDelay } from './refCountDelay'; diff --git a/packages/rpc-core/src/util/refCountDelay.ts b/packages/rpc-core/src/util/refCountDelay.ts index 4023752082..15281c3b87 100644 --- a/packages/rpc-core/src/util/refCountDelay.ts +++ b/packages/rpc-core/src/util/refCountDelay.ts @@ -1,7 +1,7 @@ // Copyright 2017-2020 @polkadot/rpc-core authors & contributors // SPDX-License-Identifier: Apache-2.0 -import { asapScheduler, ConnectableObservable, MonoTypeOperatorFunction, Observable, Subscription, TeardownLogic } from 'rxjs'; +import { asapScheduler, ConnectableObservable, MonoTypeOperatorFunction, Observable, Subscription, TeardownLogic } from '@polkadot/x-rxjs'; /** @internal */ export function refCountDelay (delay = 1750): MonoTypeOperatorFunction { diff --git a/packages/rpc-provider/package.json b/packages/rpc-provider/package.json index ca5cdff46e..8d7e19c318 100644 --- a/packages/rpc-provider/package.json +++ b/packages/rpc-provider/package.json @@ -14,15 +14,15 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@polkadot/types": "2.10.2-12", - "@polkadot/util": "^4.2.2-12", - "@polkadot/util-crypto": "^4.2.2-12", - "@polkadot/x-fetch": "^4.2.2-12", - "@polkadot/x-ws": "^4.2.2-12", + "@polkadot/util": "^4.2.2-14", + "@polkadot/util-crypto": "^4.2.2-14", + "@polkadot/x-fetch": "^4.2.2-14", + "@polkadot/x-ws": "^4.2.2-14", "bn.js": "^4.11.9", "eventemitter3": "^4.0.7" }, "devDependencies": { - "@polkadot/keyring": "^4.2.2-12", + "@polkadot/keyring": "^4.2.2-14", "@polkadot/metadata": "2.10.2-12", "mock-socket": "^9.0.3", "nock": "^13.0.5" diff --git a/packages/rpc-provider/src/http/index.ts b/packages/rpc-provider/src/http/index.ts index ed566bd2c1..2769fcfed0 100644 --- a/packages/rpc-provider/src/http/index.ts +++ b/packages/rpc-provider/src/http/index.ts @@ -4,7 +4,7 @@ import type { ProviderInterface, ProviderInterfaceCallback, ProviderInterfaceEmitCb, ProviderInterfaceEmitted } from '../types'; import { assert, logger } from '@polkadot/util'; -import fetch from '@polkadot/x-fetch'; +import { fetch } from '@polkadot/x-fetch'; import { RpcCoder } from '../coder'; import defaults from '../defaults'; diff --git a/packages/rpc-provider/src/ws/index.ts b/packages/rpc-provider/src/ws/index.ts index bfa8693858..940d46afdf 100644 --- a/packages/rpc-provider/src/ws/index.ts +++ b/packages/rpc-provider/src/ws/index.ts @@ -8,7 +8,7 @@ import type { JsonRpcResponse, ProviderInterface, ProviderInterfaceCallback, Pro import EventEmitter from 'eventemitter3'; import { assert, isChildClass, isNull, isUndefined, logger } from '@polkadot/util'; -import WS from '@polkadot/x-ws'; +import { WebSocket } from '@polkadot/x-ws'; import { RpcCoder } from '../coder'; import defaults from '../defaults'; @@ -160,11 +160,11 @@ export class WsProvider implements ProviderInterface { public async connect (): Promise { try { this.#endpointIndex = (this.#endpointIndex + 1) % this.#endpoints.length; - this.#websocket = typeof WebSocket !== 'undefined' && isChildClass(WebSocket, WS) - ? new WS(this.#endpoints[this.#endpointIndex]) + this.#websocket = typeof global.WebSocket !== 'undefined' && isChildClass(global.WebSocket, WebSocket) + ? new WebSocket(this.#endpoints[this.#endpointIndex]) // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - WS may be an instance of w3cwebsocket, which supports headers - : new WS(this.#endpoints[this.#endpointIndex], undefined, undefined, this.#headers, undefined, { + : new WebSocket(this.#endpoints[this.#endpointIndex], undefined, undefined, this.#headers, undefined, { // default: true fragmentOutgoingMessages: true, // default: 16K diff --git a/packages/typegen/package.json b/packages/typegen/package.json index fe6d6ffadb..cb2077bfaa 100644 --- a/packages/typegen/package.json +++ b/packages/typegen/package.json @@ -26,7 +26,7 @@ "@polkadot/metadata": "2.10.2-12", "@polkadot/rpc-provider": "2.10.2-12", "@polkadot/types": "2.10.2-12", - "@polkadot/util": "^4.2.2-12", + "@polkadot/util": "^4.2.2-14", "handlebars": "^4.7.6", "websocket": "^1.0.33", "yargs": "^16.2.0" diff --git a/packages/typegen/src/fromChain.ts b/packages/typegen/src/fromChain.ts index e47123e676..1eab4e698f 100644 --- a/packages/typegen/src/fromChain.ts +++ b/packages/typegen/src/fromChain.ts @@ -5,7 +5,7 @@ import path from 'path'; import yargs from 'yargs'; import { formatNumber } from '@polkadot/util'; -import WS from '@polkadot/x-ws'; +import { WebSocket } from '@polkadot/x-ws'; import { generateDefaultConsts, generateDefaultQuery, generateDefaultRpc, generateDefaultTx } from './generate'; import { HEADER, writeFile } from './util'; @@ -60,7 +60,7 @@ export function main (): void { if (endpoint.startsWith('wss://') || endpoint.startsWith('ws://')) { try { - const websocket = new WS(endpoint); + const websocket = new WebSocket(endpoint); websocket.onclose = (event: { code: number; reason: string }): void => { console.error(`disconnected, code: '${event.code}' reason: '${event.reason}'`); diff --git a/packages/types-known/package.json b/packages/types-known/package.json index 8561229fe9..e1e65375c4 100644 --- a/packages/types-known/package.json +++ b/packages/types-known/package.json @@ -14,7 +14,7 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@polkadot/types": "2.10.2-12", - "@polkadot/util": "^4.2.2-12", + "@polkadot/util": "^4.2.2-14", "bn.js": "^4.11.9" }, "devDependencies": { diff --git a/packages/types/package.json b/packages/types/package.json index 15957d7520..908845b44d 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -14,15 +14,15 @@ "dependencies": { "@babel/runtime": "^7.12.5", "@polkadot/metadata": "2.10.2-12", - "@polkadot/util": "^4.2.2-12", - "@polkadot/util-crypto": "^4.2.2-12", + "@polkadot/util": "^4.2.2-14", + "@polkadot/util-crypto": "^4.2.2-14", + "@polkadot/x-rxjs": "2.10.2-12", "@types/bn.js": "^4.11.6", "bn.js": "^4.11.9", - "memoizee": "^0.4.14", - "rxjs": "^6.6.3" + "memoizee": "^0.4.14" }, "devDependencies": { - "@polkadot/keyring": "^4.2.2-12", + "@polkadot/keyring": "^4.2.2-14", "@types/memoizee": "^0.4.5" } } diff --git a/packages/types/src/create/registry.ts b/packages/types/src/create/registry.ts index 7c9312a623..b1179d9f29 100644 --- a/packages/types/src/create/registry.ts +++ b/packages/types/src/create/registry.ts @@ -16,6 +16,8 @@ import { Json } from '../codec/Json'; import { Raw } from '../codec/Raw'; import { defaultExtensions, expandExtensionTypes, findUnknownExtensions } from '../extrinsic/signedExtensions'; import { GenericEventData } from '../generic/Event'; +import * as baseTypes from '../index.types'; +import * as definitions from '../interfaces/definitions'; import { DoNotConstruct } from '../primitive/DoNotConstruct'; import { createClass, getTypeClass } from './createClass'; import { createType } from './createType'; @@ -122,16 +124,8 @@ export class TypeRegistry implements Registry { #signedExtensions: string[] = defaultExtensions; constructor () { - // we only want to import these on creation, i.e. we want to avoid weird - // side-effects from circular references. (Since registry is injected - // into types, this can be a real concern now) - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const baseTypes: RegistryTypes = require('../index.types'); - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - const definitions: Record = require('../interfaces/definitions'); - this.#knownDefaults = { Json, Metadata, Raw, ...baseTypes }; - this.#knownDefinitions = definitions; + this.#knownDefinitions = definitions as unknown as Record; this.init(); } diff --git a/packages/types/src/detectPackage.ts b/packages/types/src/detectPackage.ts index 59995c9f51..2036cbf98c 100644 --- a/packages/types/src/detectPackage.ts +++ b/packages/types/src/detectPackage.ts @@ -3,6 +3,8 @@ import { detectPackage } from '@polkadot/util'; +import packageJson from './package.json'; + // FIXME This really should be `import(...).then(...)`, but need to check rejections // eslint-disable-next-line @typescript-eslint/no-var-requires -detectPackage(require('./package.json'), typeof __dirname !== 'undefined' && __dirname); +detectPackage(packageJson, typeof __dirname !== 'undefined' && __dirname); diff --git a/packages/types/src/json/json.d.ts b/packages/types/src/json/json.d.ts index 82187498a7..6afafa58eb 100644 --- a/packages/types/src/json/json.d.ts +++ b/packages/types/src/json/json.d.ts @@ -4,6 +4,8 @@ // Be able to import json in TS // https://stackoverflow.com/questions/49996456/importing-json-file-in-typescript declare module '*.json' { + // eslint-disable-next-line @typescript-eslint/no-explicit-any const value: any; + export default value; } diff --git a/packages/types/src/types/index.ts b/packages/types/src/types/index.ts index 488cbfe9b7..efd3c5bacd 100644 --- a/packages/types/src/types/index.ts +++ b/packages/types/src/types/index.ts @@ -13,4 +13,4 @@ export * from './helpers'; export * from './interfaces'; export * from './registry'; -export type { Observable } from 'rxjs'; +export type { Observable } from '@polkadot/x-rxjs'; diff --git a/packages/types/src/types/registry.ts b/packages/types/src/types/registry.ts index 1ded17ffa7..0985d838a4 100644 --- a/packages/types/src/types/registry.ts +++ b/packages/types/src/types/registry.ts @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 import type BN from 'bn.js'; -import type { Observable } from 'rxjs'; +import type { Observable } from '@polkadot/x-rxjs'; import { H256 } from '../interfaces/runtime'; import { ChainProperties } from '../interfaces/system'; diff --git a/packages/x-rxjs/.skip-esm b/packages/x-rxjs/.skip-esm new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/x-rxjs/LICENSE b/packages/x-rxjs/LICENSE new file mode 100644 index 0000000000..0d381b2e97 --- /dev/null +++ b/packages/x-rxjs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/packages/x-rxjs/README.md b/packages/x-rxjs/README.md new file mode 100644 index 0000000000..4c3eeff46e --- /dev/null +++ b/packages/x-rxjs/README.md @@ -0,0 +1 @@ +# @polkadot/x-rxjs diff --git a/packages/x-rxjs/package.json b/packages/x-rxjs/package.json new file mode 100644 index 0000000000..f1ee3b1c66 --- /dev/null +++ b/packages/x-rxjs/package.json @@ -0,0 +1,18 @@ +{ + "name": "@polkadot/x-rxjs", + "version": "2.10.2-12", + "description": "A pass-through interface for RxJs (allowing node + mjs usage)", + "main": "index.js", + "sideEffects": false, + "author": "Jaco Greeff ", + "maintainers": [], + "contributors": [], + "license": "Apache-2.0", + "repository": "github:polkadot-js/api", + "bugs": "https://github.com/polkadot-js/api/issues", + "homepage": "https://github.com/polkadot-js/api/tree/master/packages/x-rxjs#readme", + "dependencies": { + "@babel/runtime": "^7.12.5", + "rxjs": "^6.6.3" + } +} diff --git a/packages/x-rxjs/src/index.ts b/packages/x-rxjs/src/index.ts new file mode 100644 index 0000000000..aded501172 --- /dev/null +++ b/packages/x-rxjs/src/index.ts @@ -0,0 +1,4 @@ +// Copyright 2017-2020 @polkadot/x-rxjs authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +export * from 'rxjs'; diff --git a/packages/x-rxjs/src/operators.ts b/packages/x-rxjs/src/operators.ts new file mode 100644 index 0000000000..b0cd236179 --- /dev/null +++ b/packages/x-rxjs/src/operators.ts @@ -0,0 +1,4 @@ +// Copyright 2017-2020 @polkadot/x-rxjs authors & contributors +// SPDX-License-Identifier: Apache-2.0 + +export * from 'rxjs/operators'; diff --git a/tsconfig.json b/tsconfig.json index 367bb87229..42ab4ab1b1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,7 +24,9 @@ "@polkadot/types": ["packages/types/src"], "@polkadot/types/*": ["packages/types/src/*"], "@polkadot/types-known": ["packages/types-known/src"], - "@polkadot/types-known/*": ["packages/types-known/src/*"] + "@polkadot/types-known/*": ["packages/types-known/src/*"], + "@polkadot/x-rxjs": ["packages/x-rxjs/src"], + "@polkadot/x-rxjs/*": ["packages/x-rxjs/src/*"], }, "skipLibCheck": true, "typeRoots": [ diff --git a/yarn.lock b/yarn.lock index 2ce7cbd631..30a4346e26 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1693,9 +1693,9 @@ __metadata: "@babel/runtime": ^7.12.5 "@polkadot/api": 2.10.2-12 "@polkadot/types": 2.10.2-12 - "@polkadot/util": ^4.2.2-12 + "@polkadot/util": ^4.2.2-14 + "@polkadot/x-rxjs": 2.10.2-12 bn.js: ^4.11.9 - rxjs: ^6.6.3 languageName: unknown linkType: soft @@ -1705,15 +1705,15 @@ __metadata: dependencies: "@babel/runtime": ^7.12.5 "@polkadot/api": 2.10.2-12 - "@polkadot/keyring": ^4.2.2-12 + "@polkadot/keyring": ^4.2.2-14 "@polkadot/rpc-core": 2.10.2-12 "@polkadot/rpc-provider": 2.10.2-12 "@polkadot/types": 2.10.2-12 - "@polkadot/util": ^4.2.2-12 - "@polkadot/util-crypto": ^4.2.2-12 + "@polkadot/util": ^4.2.2-14 + "@polkadot/util-crypto": ^4.2.2-14 + "@polkadot/x-rxjs": 2.10.2-12 bn.js: ^4.11.9 memoizee: ^0.4.14 - rxjs: ^6.6.3 languageName: unknown linkType: soft @@ -1723,41 +1723,41 @@ __metadata: dependencies: "@babel/runtime": ^7.12.5 "@polkadot/api-derive": 2.10.2-12 - "@polkadot/keyring": ^4.2.2-12 + "@polkadot/keyring": ^4.2.2-14 "@polkadot/metadata": 2.10.2-12 "@polkadot/rpc-core": 2.10.2-12 "@polkadot/rpc-provider": 2.10.2-12 "@polkadot/types": 2.10.2-12 "@polkadot/types-known": 2.10.2-12 - "@polkadot/util": ^4.2.2-12 - "@polkadot/util-crypto": ^4.2.2-12 + "@polkadot/util": ^4.2.2-14 + "@polkadot/util-crypto": ^4.2.2-14 + "@polkadot/x-rxjs": 2.10.2-12 bn.js: ^4.11.9 eventemitter3: ^4.0.7 - rxjs: ^6.6.3 languageName: unknown linkType: soft -"@polkadot/bytes-asmjs-crypto@npm:^2.0.2-12": - version: 2.0.2-12 - resolution: "@polkadot/bytes-asmjs-crypto@npm:2.0.2-12" +"@polkadot/bytes-asmjs-crypto@npm:^2.0.2-14": + version: 2.0.2-14 + resolution: "@polkadot/bytes-asmjs-crypto@npm:2.0.2-14" dependencies: "@babel/runtime": ^7.12.5 - checksum: a8a756813a0a0ed0e2cf5b4fa72a0a06ebfba50e727ef5061303d9a80d7fa09072e17c6f8027d84b3f8ffec0e20e18a195aa6622a0d8e461dbe823fde0b795fb + checksum: bfa664d6bdaeb16a0aae7c15541b275012bb20c88fd0983989b936152807a91f66abd8360362ba042d93254e8a7979097b14c4d8a4a2d16498e59853297f116f languageName: node linkType: hard -"@polkadot/bytes-wasm-crypto@npm:^2.0.2-12": - version: 2.0.2-12 - resolution: "@polkadot/bytes-wasm-crypto@npm:2.0.2-12" +"@polkadot/bytes-wasm-crypto@npm:^2.0.2-14": + version: 2.0.2-14 + resolution: "@polkadot/bytes-wasm-crypto@npm:2.0.2-14" dependencies: "@babel/runtime": ^7.12.5 - checksum: e91b8b2826cb463deb054d311d16b08997eb8ecaab5c19540501d78fc40550630da5fb1d06940c75ca3541ba0bf6479b3ccaea8f3ce5889ac122d28a63facfa3 + checksum: 09708e3fbb0d4121ffdc60839598112eaaf88b323ace5f50c5c09fd0808a59da95632a7cf14ee1e718f19b8c4a43048e72cbaefb3b3a2821cd29abaf912253c8 languageName: node linkType: hard -"@polkadot/dev@npm:^0.60.23": - version: 0.60.23 - resolution: "@polkadot/dev@npm:0.60.23" +"@polkadot/dev@npm:^0.60.27": + version: 0.60.27 + resolution: "@polkadot/dev@npm:0.60.27" dependencies: "@babel/cli": ^7.12.10 "@babel/core": ^7.12.10 @@ -1845,21 +1845,21 @@ __metadata: polkadot-exec-typedoc: scripts/polkadot-exec-typedoc.cjs polkadot-exec-vuepress: scripts/polkadot-exec-vuepress.cjs polkadot-exec-webpack: scripts/polkadot-exec-webpack.cjs - checksum: e6d1d95ea6dbc6713344f776b9638cea7c649fb56a4713d4c7f579ba0e918937a679e7dd65f09f6cf44da363767ed5a1c7689646043721c317cacfe880e66ed1 + checksum: e4e90914eed69bd21f6617265030388e4d651046e156717a816e5a4719b75abbb5641e71025d2df1a71e45265b0fcadd201450e4b4ae67abf9b56dc029a2bb65 languageName: node linkType: hard -"@polkadot/keyring@npm:^4.2.2-12": - version: 4.2.2-12 - resolution: "@polkadot/keyring@npm:4.2.2-12" +"@polkadot/keyring@npm:^4.2.2-14": + version: 4.2.2-14 + resolution: "@polkadot/keyring@npm:4.2.2-14" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/util": 4.2.2-12 - "@polkadot/util-crypto": 4.2.2-12 + "@polkadot/util": 4.2.2-14 + "@polkadot/util-crypto": 4.2.2-14 peerDependencies: - "@polkadot/util": 4.2.2-12 - "@polkadot/util-crypto": 4.2.2-12 - checksum: 7b20916f2d8f17dab71a3cd48bbc1c2695f0a20169b4ca233587778eae7b2c10358a470b61c5598b87c9e25f28848b3f9a61e545f798a562410cc7f41d883088 + "@polkadot/util": 4.2.2-14 + "@polkadot/util-crypto": 4.2.2-14 + checksum: ce58b1adb052c05dcfa41afbfdd32adfd326583dc7adbb034e1fee5241b998fcd398e2f281cc8338bb8056ea3601d6e6a3583cb8d239d8457ae6e73cf2d7ae86 languageName: node linkType: hard @@ -1868,21 +1868,21 @@ __metadata: resolution: "@polkadot/metadata@workspace:packages/metadata" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/keyring": ^4.2.2-12 + "@polkadot/keyring": ^4.2.2-14 "@polkadot/types": 2.10.2-12 "@polkadot/types-known": 2.10.2-12 - "@polkadot/util": ^4.2.2-12 - "@polkadot/util-crypto": ^4.2.2-12 + "@polkadot/util": ^4.2.2-14 + "@polkadot/util-crypto": ^4.2.2-14 bn.js: ^4.11.9 languageName: unknown linkType: soft -"@polkadot/networks@npm:4.2.2-12": - version: 4.2.2-12 - resolution: "@polkadot/networks@npm:4.2.2-12" +"@polkadot/networks@npm:4.2.2-14": + version: 4.2.2-14 + resolution: "@polkadot/networks@npm:4.2.2-14" dependencies: "@babel/runtime": ^7.12.5 - checksum: 3cce7e4bc5d9586e3c6e3c5abade3f7a469e542ba33b9b624f39d1fe58cd2c23874cdaddf6401af075f0143412c76ef45e76386f784a50ce62fe805acdb634cf + checksum: be0fe0c2e9c0f87d0402f3b265f260a74530f64f4babc0de081917dd2b9521e46ff55738574e374020fa63bf4db20946bf3bc889f9be938937fc5fa3e1e45203 languageName: node linkType: hard @@ -1891,13 +1891,13 @@ __metadata: resolution: "@polkadot/rpc-core@workspace:packages/rpc-core" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/keyring": ^4.2.2-12 + "@polkadot/keyring": ^4.2.2-14 "@polkadot/metadata": 2.10.2-12 "@polkadot/rpc-provider": 2.10.2-12 "@polkadot/types": 2.10.2-12 - "@polkadot/util": ^4.2.2-12 + "@polkadot/util": ^4.2.2-14 + "@polkadot/x-rxjs": 2.10.2-12 memoizee: ^0.4.14 - rxjs: ^6.6.3 languageName: unknown linkType: soft @@ -1906,13 +1906,13 @@ __metadata: resolution: "@polkadot/rpc-provider@workspace:packages/rpc-provider" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/keyring": ^4.2.2-12 + "@polkadot/keyring": ^4.2.2-14 "@polkadot/metadata": 2.10.2-12 "@polkadot/types": 2.10.2-12 - "@polkadot/util": ^4.2.2-12 - "@polkadot/util-crypto": ^4.2.2-12 - "@polkadot/x-fetch": ^4.2.2-12 - "@polkadot/x-ws": ^4.2.2-12 + "@polkadot/util": ^4.2.2-14 + "@polkadot/util-crypto": ^4.2.2-14 + "@polkadot/x-fetch": ^4.2.2-14 + "@polkadot/x-ws": ^4.2.2-14 bn.js: ^4.11.9 eventemitter3: ^4.0.7 mock-socket: ^9.0.3 @@ -1940,7 +1940,7 @@ __metadata: "@polkadot/metadata": 2.10.2-12 "@polkadot/rpc-provider": 2.10.2-12 "@polkadot/types": 2.10.2-12 - "@polkadot/util": ^4.2.2-12 + "@polkadot/util": ^4.2.2-14 "@types/websocket": ^1.0.1 "@types/yargs": ^15.0.11 handlebars: ^4.7.6 @@ -1961,7 +1961,7 @@ __metadata: dependencies: "@babel/runtime": ^7.12.5 "@polkadot/types": 2.10.2-12 - "@polkadot/util": ^4.2.2-12 + "@polkadot/util": ^4.2.2-14 "@types/bn.js": ^4.11.6 bn.js: ^4.11.9 languageName: unknown @@ -1972,27 +1972,27 @@ __metadata: resolution: "@polkadot/types@workspace:packages/types" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/keyring": ^4.2.2-12 + "@polkadot/keyring": ^4.2.2-14 "@polkadot/metadata": 2.10.2-12 - "@polkadot/util": ^4.2.2-12 - "@polkadot/util-crypto": ^4.2.2-12 + "@polkadot/util": ^4.2.2-14 + "@polkadot/util-crypto": ^4.2.2-14 + "@polkadot/x-rxjs": 2.10.2-12 "@types/bn.js": ^4.11.6 "@types/memoizee": ^0.4.5 bn.js: ^4.11.9 memoizee: ^0.4.14 - rxjs: ^6.6.3 languageName: unknown linkType: soft -"@polkadot/util-crypto@npm:4.2.2-12, @polkadot/util-crypto@npm:^4.2.2-12": - version: 4.2.2-12 - resolution: "@polkadot/util-crypto@npm:4.2.2-12" +"@polkadot/util-crypto@npm:4.2.2-14, @polkadot/util-crypto@npm:^4.2.2-14": + version: 4.2.2-14 + resolution: "@polkadot/util-crypto@npm:4.2.2-14" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/networks": 4.2.2-12 - "@polkadot/util": 4.2.2-12 - "@polkadot/wasm-crypto": ^2.0.2-12 - "@polkadot/x-randomvalues": 4.2.2-12 + "@polkadot/networks": 4.2.2-14 + "@polkadot/util": 4.2.2-14 + "@polkadot/wasm-crypto": ^2.0.2-14 + "@polkadot/x-randomvalues": 4.2.2-14 base-x: ^3.0.8 blakejs: ^1.1.0 bn.js: ^4.11.9 @@ -2004,86 +2004,95 @@ __metadata: tweetnacl: ^1.0.3 xxhashjs: ^0.2.2 peerDependencies: - "@polkadot/util": 4.2.2-12 - checksum: 6bc2c3266126bbc35cbf3aa5be40e5f53c918373ca3e1d12749a5d93d969e6c4fa1ed746915ec518fce78858428738d1f7fc201e9e34268e61abb64d3da09139 + "@polkadot/util": 4.2.2-14 + checksum: 3331b4616d586e082fb5dae0e5668531e7a5244b13f1d7a89e545a89d4af7557ef66a9952b6a57242c111bc9dc7202dfd410d1c09d04334bddb841867fc7f539 languageName: node linkType: hard -"@polkadot/util@npm:4.2.2-12, @polkadot/util@npm:^4.2.2-12": - version: 4.2.2-12 - resolution: "@polkadot/util@npm:4.2.2-12" +"@polkadot/util@npm:4.2.2-14, @polkadot/util@npm:^4.2.2-14": + version: 4.2.2-14 + resolution: "@polkadot/util@npm:4.2.2-14" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/x-textdecoder": 4.2.2-12 - "@polkadot/x-textencoder": 4.2.2-12 + "@polkadot/x-textdecoder": 4.2.2-14 + "@polkadot/x-textencoder": 4.2.2-14 "@types/bn.js": ^4.11.6 bn.js: ^4.11.9 camelcase: ^5.3.1 ip-regex: ^4.2.0 - checksum: 92a5cf2206a26382c44ec22d15b2cb30b1ee2a6e82bdd92106a7e6e67ceeedd1c743bc5e9ae9a5abd6569bf0f56272a479b058a5059bb3ab8774b6d9af831bed + checksum: bfe13736649b08eb08dbc6cf4a312ef13d6baf179755ecf918cc4b20ed673a551a4e0e0c95a641745a4627d14101c27759247d9f06878457f9cc4d8000a6eb70 languageName: node linkType: hard -"@polkadot/wasm-crypto@npm:^2.0.2-12": - version: 2.0.2-12 - resolution: "@polkadot/wasm-crypto@npm:2.0.2-12" +"@polkadot/wasm-crypto@npm:^2.0.2-14": + version: 2.0.2-14 + resolution: "@polkadot/wasm-crypto@npm:2.0.2-14" dependencies: "@babel/runtime": ^7.12.5 - "@polkadot/bytes-asmjs-crypto": ^2.0.2-12 - "@polkadot/bytes-wasm-crypto": ^2.0.2-12 + "@polkadot/bytes-asmjs-crypto": ^2.0.2-14 + "@polkadot/bytes-wasm-crypto": ^2.0.2-14 peerDependencies: "@polkadot/util": "*" "@polkadot/x-randomvalues": "*" - checksum: d7d2ebfecc183812957658942732a78b9e19db3bec61fb3b29d497f736f456f940d0f89d72cc121624df6856b6c50bcbc8f42a560e5aa17263e35654d3f64f89 + checksum: 7d344121bbe3115090c0203ef8ee59e0610632df4d75acda38afc34ee805deb71179346e49826a91a7ad89f06c9451fc43b351cd9af1e0996989a413ac69f49a languageName: node linkType: hard -"@polkadot/x-fetch@npm:^4.2.2-12": - version: 4.2.2-12 - resolution: "@polkadot/x-fetch@npm:4.2.2-12" +"@polkadot/x-fetch@npm:^4.2.2-14": + version: 4.2.2-14 + resolution: "@polkadot/x-fetch@npm:4.2.2-14" dependencies: "@babel/runtime": ^7.12.5 "@types/node-fetch": ^2.5.7 node-fetch: ^2.6.1 - checksum: 676b029254d1ea92ebad478ac825aeac695c3d738332be78101f49c44d43e06de33407f20f2d8ff9adc25ee70bbfbaf505e4e784df6818e8137871861b72429f + checksum: e4afe8536abb7e846cb1582c30c35d70f0567bc57c5e07163241087e12c6ac55c423dd702fa515c9dfc533162d4810960880e11e56b319365cd3181be7c40622 languageName: node linkType: hard -"@polkadot/x-randomvalues@npm:4.2.2-12": - version: 4.2.2-12 - resolution: "@polkadot/x-randomvalues@npm:4.2.2-12" +"@polkadot/x-randomvalues@npm:4.2.2-14": + version: 4.2.2-14 + resolution: "@polkadot/x-randomvalues@npm:4.2.2-14" dependencies: "@babel/runtime": ^7.12.5 - checksum: ca429802969f82bb6749d98b739d4ceca32b63d73cbdb615bfc777294096cdf78ac32e2f844e35f2ab52e8944e435fe7efabec9e88026a49a34de29cec424c1d + checksum: b8beaf8371334237607832d6e5e19291c03afcf533fff9ddd6e218e51d94273de5b534afd5b57eca31795165b3771f4f308299391299807f833bbce50776f323 languageName: node linkType: hard -"@polkadot/x-textdecoder@npm:4.2.2-12": - version: 4.2.2-12 - resolution: "@polkadot/x-textdecoder@npm:4.2.2-12" +"@polkadot/x-rxjs@2.10.2-12, @polkadot/x-rxjs@workspace:packages/x-rxjs": + version: 0.0.0-use.local + resolution: "@polkadot/x-rxjs@workspace:packages/x-rxjs" dependencies: "@babel/runtime": ^7.12.5 - checksum: 41d9329082cef36c09f5955b4d6a299c8bbea20da197b1f60c8554a4cfc98b7d5ba4f69f56e23567904e07c4dd0a8a6862424c10d236933bc0574bce08c024d9 - languageName: node - linkType: hard + rxjs: ^6.6.3 + languageName: unknown + linkType: soft -"@polkadot/x-textencoder@npm:4.2.2-12": - version: 4.2.2-12 - resolution: "@polkadot/x-textencoder@npm:4.2.2-12" +"@polkadot/x-textdecoder@npm:4.2.2-14": + version: 4.2.2-14 + resolution: "@polkadot/x-textdecoder@npm:4.2.2-14" dependencies: "@babel/runtime": ^7.12.5 - checksum: 69c1a25e912d22d668f74bc03db13fb05e4bfe42ece3da958f0f29b3046288b361d6bbbf9aed3b7a29f10d805f649b99c6cb8469facd65b73433555cba56c931 + checksum: 0516ef3abd8e04fe964f6d2aa95a09c80f9f6d8b3d1a62b9df2aae004393c1660ec5d18ce8be23f61043d0cc9903920731b598d5dd1c49f9f1be8d9ee955684f languageName: node linkType: hard -"@polkadot/x-ws@npm:^4.2.2-12": - version: 4.2.2-12 - resolution: "@polkadot/x-ws@npm:4.2.2-12" +"@polkadot/x-textencoder@npm:4.2.2-14": + version: 4.2.2-14 + resolution: "@polkadot/x-textencoder@npm:4.2.2-14" + dependencies: + "@babel/runtime": ^7.12.5 + checksum: 2d9c66b1e6e5e5ceb06c552f48f51bb38e881a77a7134a08ab2d725ab42612964234564064d6fb1d47de6d831469b23f9af3662a18867fe4c50cbd9258279c08 + languageName: node + linkType: hard + +"@polkadot/x-ws@npm:^4.2.2-14": + version: 4.2.2-14 + resolution: "@polkadot/x-ws@npm:4.2.2-14" dependencies: "@babel/runtime": ^7.12.5 "@types/websocket": ^1.0.1 websocket: ^1.0.33 - checksum: 1e79415e10da4b66abff01192c5eb6999af3a103a811a9f860993e16b6f9e7c166e657fc6e15c0f8f5a5eac68fceb8afa3da6c222d4ce585d8b7b0741d1a3eb5 + checksum: ab2a1b54077bc8bcbb8839f6e96b2da079365f3f3f5063009324fefd8e6b872c986718f85ffc5b49ca9ca0a5c32431dbd12dd035ae5fbecfeda634b8b16ed16c languageName: node linkType: hard @@ -9252,7 +9261,7 @@ fsevents@~2.1.2: "@babel/core": ^7.12.10 "@babel/register": ^7.12.10 "@babel/runtime": ^7.12.5 - "@polkadot/dev": ^0.60.23 + "@polkadot/dev": ^0.60.27 "@polkadot/ts": ^0.3.58 "@polkadot/typegen": "workspace:packages/typegen" "@types/jest": ^26.0.19